@zzclub/pipeline 0.13.0 → 0.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/commands/wechat-export.ts +1 -1
- package/src/imgx/chrome-render.test.ts +17 -2
- package/src/imgx/chrome-render.ts +80 -26
- package/src/imgx/runtime.ts +0 -61
- package/src/wechat-preview/assets/browser-dist/editor-export.js +53 -52
- package/src/wechat-preview/assets/templates/export-shell.html +6 -0
- package/src/wechat-preview/browser/editor-export.ts +8 -15
- package/src/wechat-preview/index.ts +20 -18
- package/src/wechat-preview/server/types.ts +1 -0
- package/src/wechat-preview/wechat-export.integration.test.ts +128 -3
- package/src/wechat-preview/wechat-renderer.ts +29 -8
|
@@ -1,52 +1,53 @@
|
|
|
1
|
-
var
|
|
2
|
-
`))}function Pp(){return new Wt(Ut.stackOverFlow,"Stack over flow, cannot pop on an empty stack.")}function zb(e){return new Wt(Ut.parserMatchError,`Cannot match target parser for node: ${ga(e)}.`)}function Kb(e){return new Wt(Ut.serializerMatchError,`Cannot match target serializer for node: ${ga(e)}.`)}function sn(e){return new Wt(Ut.expectDomTypeError,`Expect to be a dom, but get: ${ga(e)}.`)}function Va(){return new Wt(Ut.callCommandBeforeEditorView,"You're trying to call a command before editor view initialized, make sure to get commandManager from ctx after editor view has been initialized")}function qb(e){return new Wt(Ut.missingNodeInSchema,`Missing node in schema, milkdown cannot find "${e}" in schema.`)}function Yb(e){return new Wt(Ut.missingMarkInSchema,`Missing mark in schema, milkdown cannot find "${e}" in schema.`)}var Hp=class{constructor(){this.sliceMap=new Map,this.get=e=>{const t=typeof e=="string"?[...this.sliceMap.values()].find(n=>n.type.name===e):this.sliceMap.get(e.id);if(!t)throw Ub(typeof e=="string"?e:e.name);return t},this.remove=e=>{const t=typeof e=="string"?[...this.sliceMap.values()].find(n=>n.type.name===e):this.sliceMap.get(e.id);t&&this.sliceMap.delete(t.type.id)},this.has=e=>typeof e=="string"?[...this.sliceMap.values()].some(t=>t.type.name===e):this.sliceMap.has(e.id)}},Gb=class{#t=[];#e;#r=()=>{this.#t.forEach(t=>t(this.#e))};constructor(t,n,r){this.set=i=>{this.#e=i,this.#r()},this.get=()=>this.#e,this.update=i=>{this.#e=i(this.#e),this.#r()},this.type=r,this.#e=n,t.set(r.id,this)}on(t){return this.#t.push(t),()=>{this.#t=this.#t.filter(n=>n!==t)}}once(t){const n=this.on(r=>{t(r),n()});return n}off(t){this.#t=this.#t.filter(n=>n!==t)}offAll(){this.#t=[]}},Vb=class{constructor(e,t){this.id=Symbol(`Context-${t}`),this.name=t,this._defaultValue=e,this._typeInfo=()=>{throw ba()}}create(e,t=this._defaultValue){return new Gb(e,t,this)}},Ae=(e,t)=>new Vb(e,t),Jb=class{#t;#e;#r;#n=new Set;#a=new Set;#u=new Map;#i=new Map;constructor(e,t,n){this.read=()=>({metadata:this.#t,injectedSlices:[...this.#n].map(r=>({name:typeof r=="string"?r:r.name,value:this.#s(r)})),consumedSlices:[...this.#a].map(r=>({name:typeof r=="string"?r:r.name,value:this.#s(r)})),recordedTimers:[...this.#u].map(([r,{duration:i}])=>({name:r.name,duration:i,status:this.#o(r)})),waitTimers:[...this.#i].map(([r,{duration:i}])=>({name:r.name,duration:i,status:this.#o(r)}))}),this.onRecord=r=>{this.#u.set(r,{start:Date.now(),duration:0})},this.onClear=r=>{this.#u.delete(r)},this.onDone=r=>{const i=this.#u.get(r);i&&(i.duration=Date.now()-i.start)},this.onWait=(r,i)=>{const u=Date.now();i.finally(()=>{this.#i.set(r,{duration:Date.now()-u})}).catch(console.error)},this.onInject=r=>{this.#n.add(r)},this.onRemove=r=>{this.#n.delete(r)},this.onUse=r=>{this.#a.add(r)},this.#e=e,this.#r=t,this.#t=n}#s=e=>this.#e.get(e).get();#o=e=>this.#r.get(e).status},jb=class Up{#t;#e;#r;#n;constructor(t,n,r){this.produce=i=>i&&Object.keys(i).length?new Up(this.#t,this.#e,{...i}):this,this.inject=(i,u)=>{const s=i.create(this.#t.sliceMap);return u!=null&&s.set(u),this.#n?.onInject(i),this},this.remove=i=>(this.#t.remove(i),this.#n?.onRemove(i),this),this.record=i=>(i.create(this.#e.store),this.#n?.onRecord(i),this),this.clearTimer=i=>(this.#e.remove(i),this.#n?.onClear(i),this),this.isInjected=i=>this.#t.has(i),this.isRecorded=i=>this.#e.has(i),this.use=i=>(this.#n?.onUse(i),this.#t.get(i)),this.get=i=>this.use(i).get(),this.set=(i,u)=>this.use(i).set(u),this.update=(i,u)=>this.use(i).update(u),this.timer=i=>this.#e.get(i),this.done=i=>{this.timer(i).done(),this.#n?.onDone(i)},this.wait=i=>{const u=this.timer(i).start();return this.#n?.onWait(i,u),u},this.waitTimers=async i=>{await Promise.all(this.get(i).map(u=>this.wait(u)))},this.#t=t,this.#e=n,this.#r=r,r&&(this.#n=new Jb(t,n,r))}get meta(){return this.#r}get inspector(){return this.#n}},Zb=class{constructor(){this.store=new Map,this.get=e=>{const t=this.store.get(e.id);if(!t)throw Wb(e.name);return t},this.remove=e=>{this.store.delete(e.id)},this.has=e=>this.store.has(e.id)}},Xb=class{#t=null;#e=null;#r;#n="pending";constructor(e,t){this.start=()=>(this.#t??=new Promise((n,r)=>{this.#e=i=>{i instanceof CustomEvent&&i.detail.id===this.#r&&(this.#n="resolved",this.#a(),i.stopImmediatePropagation(),n())},this.#u(()=>{this.#n==="pending"&&(this.#n="rejected"),this.#a(),r(new Error(`Timing ${this.type.name} timeout.`))}),this.#n="pending",addEventListener(this.type.name,this.#e)}),this.#t),this.done=()=>{const n=new CustomEvent(this.type.name,{detail:{id:this.#r}});dispatchEvent(n)},this.#r=Symbol(t.name),this.type=t,e.set(t.id,this)}get status(){return this.#n}#a=()=>{this.#e&&removeEventListener(this.type.name,this.#e)};#u=e=>{setTimeout(()=>{e()},this.type.timeout)}},$b=class{constructor(e,t=3e3){this.create=n=>new Xb(n,this),this.id=Symbol(`Timer-${e}`),this.name=e,this.timeout=t}},an=(e,t=3e3)=>new $b(e,t);class e2 extends Error{name="Assertion";code="ERR_ASSERTION";constructor(t,n,r,i,u){super(t),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.actual=n,this.expected=r,this.generated=u,this.operator=i}}function D(e,t){t2(!!e,!1,!0,"ok","Expected value to be truthy",t)}function t2(e,t,n,r,i,u){if(!e)throw u instanceof Error?u:new e2(u||i,t,n,r,!u)}const n2={};function Tc(e,t){const n=n2,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Wp(e,r,i)}function Wp(e,t,n){if(r2(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Of(e.children,t,n)}return Array.isArray(e)?Of(e,t,n):""}function Of(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Wp(e[i],t,n);return r.join("")}function r2(e){return!!(e&&typeof e=="object")}const Rf=document.createElement("i");function Cc(e){const t="&"+e+";";Rf.innerHTML=t;const n=Rf.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}const A={carriageReturn:-5,lineFeed:-4,carriageReturnLineFeed:-3,horizontalTab:-2,virtualSpace:-1,eof:null,nul:0,ht:9,lf:10,vt:11,cr:13,space:32,exclamationMark:33,quotationMark:34,numberSign:35,ampersand:38,apostrophe:39,leftParenthesis:40,rightParenthesis:41,asterisk:42,plusSign:43,comma:44,dash:45,dot:46,slash:47,digit0:48,digit1:49,digit2:50,digit3:51,digit4:52,digit5:53,digit6:54,digit7:55,digit8:56,digit9:57,colon:58,semicolon:59,lessThan:60,equalsTo:61,greaterThan:62,questionMark:63,atSign:64,uppercaseA:65,uppercaseH:72,uppercaseW:87,uppercaseX:88,leftSquareBracket:91,backslash:92,rightSquareBracket:93,caret:94,underscore:95,graveAccent:96,lowercaseA:97,lowercaseH:104,lowercaseW:119,lowercaseX:120,leftCurlyBrace:123,verticalBar:124,tilde:126,del:127,byteOrderMarker:65279,replacementCharacter:65533},J={attentionSideAfter:2,atxHeadingOpeningFenceSizeMax:6,autolinkDomainSizeMax:63,autolinkSchemeSizeMax:32,cdataOpeningString:"CDATA[",characterGroupPunctuation:2,characterGroupWhitespace:1,characterReferenceDecimalSizeMax:7,characterReferenceHexadecimalSizeMax:6,characterReferenceNamedSizeMax:31,codeFencedSequenceSizeMin:3,contentTypeContent:"content",contentTypeFlow:"flow",contentTypeString:"string",contentTypeText:"text",hardBreakPrefixSizeMin:2,htmlBasic:6,htmlCdata:5,htmlComment:2,htmlComplete:7,htmlDeclaration:4,htmlInstruction:3,htmlRawSizeMax:8,htmlRaw:1,linkResourceDestinationBalanceMax:32,linkReferenceSizeMax:999,listItemValueSizeMax:10,numericBaseDecimal:10,numericBaseHexadecimal:16,tabSize:4,thematicBreakMarkerCountMin:3,v8MaxSafeChunkSize:1e4},g={data:"data",whitespace:"whitespace",lineEnding:"lineEnding",lineEndingBlank:"lineEndingBlank",linePrefix:"linePrefix",lineSuffix:"lineSuffix",atxHeading:"atxHeading",atxHeadingSequence:"atxHeadingSequence",atxHeadingText:"atxHeadingText",autolink:"autolink",autolinkEmail:"autolinkEmail",autolinkMarker:"autolinkMarker",autolinkProtocol:"autolinkProtocol",characterEscape:"characterEscape",characterEscapeValue:"characterEscapeValue",characterReference:"characterReference",characterReferenceMarker:"characterReferenceMarker",characterReferenceMarkerNumeric:"characterReferenceMarkerNumeric",characterReferenceMarkerHexadecimal:"characterReferenceMarkerHexadecimal",characterReferenceValue:"characterReferenceValue",codeFenced:"codeFenced",codeFencedFence:"codeFencedFence",codeFencedFenceSequence:"codeFencedFenceSequence",codeFencedFenceInfo:"codeFencedFenceInfo",codeFencedFenceMeta:"codeFencedFenceMeta",codeFlowValue:"codeFlowValue",codeIndented:"codeIndented",codeText:"codeText",codeTextData:"codeTextData",codeTextPadding:"codeTextPadding",codeTextSequence:"codeTextSequence",content:"content",definition:"definition",definitionDestination:"definitionDestination",definitionDestinationLiteral:"definitionDestinationLiteral",definitionDestinationLiteralMarker:"definitionDestinationLiteralMarker",definitionDestinationRaw:"definitionDestinationRaw",definitionDestinationString:"definitionDestinationString",definitionLabel:"definitionLabel",definitionLabelMarker:"definitionLabelMarker",definitionLabelString:"definitionLabelString",definitionMarker:"definitionMarker",definitionTitle:"definitionTitle",definitionTitleMarker:"definitionTitleMarker",definitionTitleString:"definitionTitleString",emphasis:"emphasis",emphasisSequence:"emphasisSequence",emphasisText:"emphasisText",escapeMarker:"escapeMarker",hardBreakEscape:"hardBreakEscape",hardBreakTrailing:"hardBreakTrailing",htmlFlow:"htmlFlow",htmlFlowData:"htmlFlowData",htmlText:"htmlText",htmlTextData:"htmlTextData",image:"image",label:"label",labelText:"labelText",labelLink:"labelLink",labelImage:"labelImage",labelMarker:"labelMarker",labelImageMarker:"labelImageMarker",labelEnd:"labelEnd",link:"link",paragraph:"paragraph",reference:"reference",referenceMarker:"referenceMarker",referenceString:"referenceString",resource:"resource",resourceDestination:"resourceDestination",resourceDestinationLiteral:"resourceDestinationLiteral",resourceDestinationLiteralMarker:"resourceDestinationLiteralMarker",resourceDestinationRaw:"resourceDestinationRaw",resourceDestinationString:"resourceDestinationString",resourceMarker:"resourceMarker",resourceTitle:"resourceTitle",resourceTitleMarker:"resourceTitleMarker",resourceTitleString:"resourceTitleString",setextHeading:"setextHeading",setextHeadingText:"setextHeadingText",setextHeadingLine:"setextHeadingLine",setextHeadingLineSequence:"setextHeadingLineSequence",strong:"strong",strongSequence:"strongSequence",strongText:"strongText",thematicBreak:"thematicBreak",thematicBreakSequence:"thematicBreakSequence",blockQuote:"blockQuote",blockQuotePrefix:"blockQuotePrefix",blockQuoteMarker:"blockQuoteMarker",blockQuotePrefixWhitespace:"blockQuotePrefixWhitespace",listOrdered:"listOrdered",listUnordered:"listUnordered",listItemIndent:"listItemIndent",listItemMarker:"listItemMarker",listItemPrefix:"listItemPrefix",listItemPrefixWhitespace:"listItemPrefixWhitespace",listItemValue:"listItemValue",chunkContent:"chunkContent",chunkFlow:"chunkFlow",chunkText:"chunkText",chunkString:"chunkString"},An={ht:" ",lf:`
|
|
3
|
-
`,cr:"\r",space:" ",replacementCharacter:"�"};function St(e,t,n,r){const i=e.length;let u=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<J.v8MaxSafeChunkSize)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);u<r.length;)s=r.slice(u,u+J.v8MaxSafeChunkSize),s.unshift(t,0),e.splice(...s),u+=J.v8MaxSafeChunkSize,t+=J.v8MaxSafeChunkSize}function Lt(e,t){return e.length>0?(St(e,e.length,0,t),e):t}const Mf={}.hasOwnProperty;function Qp(e){const t={};let n=-1;for(;++n<e.length;)i2(t,e[n]);return t}function i2(e,t){let n;for(n in t){const i=(Mf.call(e,n)?e[n]:void 0)||(e[n]={}),u=t[n];let s;if(u)for(s in u){Mf.call(i,s)||(i[s]=[]);const a=u[s];u2(i[s],Array.isArray(a)?a:a?[a]:[])}}}function u2(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);St(e,0,0,r)}function zp(e,t){const n=Number.parseInt(e,t);return n<A.ht||n===A.vt||n>A.cr&&n<A.space||n>A.tilde&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?An.replacementCharacter:String.fromCodePoint(n)}function qt(e){return e.replace(/[\t\n\r ]+/g,An.space).replace(/^ | $/g,"").toLowerCase().toUpperCase()}const at=tr(/[A-Za-z]/),At=tr(/[\dA-Za-z]/),s2=tr(/[#-'*+\--9=?A-Z^-~]/);function Ls(e){return e!==null&&(e<A.space||e===A.del)}const El=tr(/\d/),a2=tr(/[\dA-Fa-f]/),o2=tr(/[!-/:-@[-`{-~]/);function $(e){return e!==null&&e<A.horizontalTab}function Ne(e){return e!==null&&(e<A.nul||e===A.space)}function me(e){return e===A.horizontalTab||e===A.virtualSpace||e===A.space}const Ea=tr(new RegExp("\\p{P}|\\p{S}","u")),Nr=tr(/\s/);function tr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ee(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let u=0;return s;function s(o){return me(o)?(e.enter(n),a(o)):t(o)}function a(o){return me(o)&&u++<i?(e.consume(o),a):(e.exit(n),t(o))}}const l2={tokenize:c2};function c2(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(D(a===A.eof||$(a),"expected eol or eof"),a===A.eof){e.consume(a);return}return e.enter(g.lineEnding),e.consume(a),e.exit(g.lineEnding),Ee(e,t,g.linePrefix)}function i(a){return D(a!==A.eof&&!$(a),"expected anything other than a line ending or EOF"),e.enter(g.paragraph),u(a)}function u(a){const o=e.enter(g.chunkText,{contentType:J.contentTypeText,previous:n});return n&&(n.next=o),n=o,s(a)}function s(a){if(a===A.eof){e.exit(g.chunkText),e.exit(g.paragraph),e.consume(a);return}return $(a)?(e.consume(a),e.exit(g.chunkText),u):(e.consume(a),s)}}const d2={tokenize:f2},Bf={tokenize:h2};function f2(e){const t=this,n=[];let r=0,i,u,s;return a;function a(w){if(r<n.length){const L=n[r];return t.containerState=L[1],D(L[0].continuation,"expected `continuation` to be defined on container construct"),e.attempt(L[0].continuation,o,l)(w)}return l(w)}function o(w){if(D(t.containerState,"expected `containerState` to be defined after continuation"),r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&O();const L=t.events.length;let _=L,I;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type===g.chunkFlow){I=t.events[_][1].end;break}D(I,"could not find previous flow chunk"),E(r);let B=L;for(;B<t.events.length;)t.events[B][1].end={...I},B++;return St(t.events,_+1,0,t.events.slice(L)),t.events.length=B,l(w)}return a(w)}function l(w){if(r===n.length){if(!i)return f(w);if(i.currentConstruct&&i.currentConstruct.concrete)return m(w);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Bf,c,d)(w)}function c(w){return i&&O(),E(r),f(w)}function d(w){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,m(w)}function f(w){return t.containerState={},e.attempt(Bf,h,m)(w)}function h(w){return D(t.currentConstruct,"expected `currentConstruct` to be defined on tokenizer"),D(t.containerState,"expected `containerState` to be defined on tokenizer"),r++,n.push([t.currentConstruct,t.containerState]),f(w)}function m(w){if(w===A.eof){i&&O(),E(0),e.consume(w);return}return i=i||t.parser.flow(t.now()),e.enter(g.chunkFlow,{_tokenizer:i,contentType:J.contentTypeFlow,previous:u}),b(w)}function b(w){if(w===A.eof){T(e.exit(g.chunkFlow),!0),E(0),e.consume(w);return}return $(w)?(e.consume(w),T(e.exit(g.chunkFlow)),r=0,t.interrupt=void 0,a):(e.consume(w),b)}function T(w,L){D(i,"expected `childFlow` to be defined when continuing");const _=t.sliceStream(w);if(L&&_.push(null),w.previous=u,u&&(u.next=w),u=w,i.defineSkip(w.start),i.write(_),t.parser.lazy[w.start.line]){let I=i.events.length;for(;I--;)if(i.events[I][1].start.offset<s&&(!i.events[I][1].end||i.events[I][1].end.offset>s))return;const B=t.events.length;let G=B,M,S;for(;G--;)if(t.events[G][0]==="exit"&&t.events[G][1].type===g.chunkFlow){if(M){S=t.events[G][1].end;break}M=!0}for(D(S,"could not find previous flow chunk"),E(r),I=B;I<t.events.length;)t.events[I][1].end={...S},I++;St(t.events,G+1,0,t.events.slice(B)),t.events.length=I}}function E(w){let L=n.length;for(;L-- >w;){const _=n[L];t.containerState=_[1],D(_[0].exit,"expected `exit` to be defined on container construct"),_[0].exit.call(t,e)}n.length=w}function O(){D(t.containerState,"expected `containerState` to be defined when closing flow"),D(i,"expected `childFlow` to be defined when closing it"),i.write([A.eof]),u=void 0,i=void 0,t.containerState._closeFlow=void 0}}function h2(e,t,n){return D(this.parser.constructs.disable.null,"expected `disable.null` to be populated"),Ee(e,e.attempt(this.parser.constructs.document,t,n),g.linePrefix,this.parser.constructs.disable.null.includes("codeIndented")?void 0:J.tabSize)}function ui(e){if(e===A.eof||Ne(e)||Nr(e))return J.characterGroupWhitespace;if(Ea(e))return J.characterGroupPunctuation}function ya(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const u=e[i].resolveAll;u&&!r.includes(u)&&(t=u(t,n),r.push(u))}return t}const yl={name:"attention",resolveAll:p2,tokenize:m2};function p2(e,t){let n=-1,r,i,u,s,a,o,l,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;o=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},f={...e[n][1].start};Lf(d,-o),Lf(f,o),s={type:o>1?g.strongSequence:g.emphasisSequence,start:d,end:{...e[r][1].end}},a={type:o>1?g.strongSequence:g.emphasisSequence,start:{...e[n][1].start},end:f},u={type:o>1?g.strongText:g.emphasisText,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:o>1?g.strong:g.emphasis,start:{...s.start},end:{...a.end}},e[r][1].end={...s.start},e[n][1].start={...a.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Lt(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=Lt(l,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",u,t]]),D(t.parser.constructs.insideSpan.null,"expected `insideSpan` to be populated"),l=Lt(l,ya(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Lt(l,[["exit",u,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,l=Lt(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,St(e,r-1,n-r+3,l),n=r+l.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function m2(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=ui(r);let u;return s;function s(o){return D(o===A.asterisk||o===A.underscore,"expected asterisk or underscore"),u=o,e.enter("attentionSequence"),a(o)}function a(o){if(o===u)return e.consume(o),a;const l=e.exit("attentionSequence"),c=ui(o);D(n,"expected `attentionMarkers` to be populated");const d=!c||c===J.characterGroupPunctuation&&i||n.includes(o),f=!i||i===J.characterGroupPunctuation&&c||n.includes(r);return l._open=!!(u===A.asterisk?d:d&&(i||!f)),l._close=!!(u===A.asterisk?f:f&&(c||!d)),t(o)}}function Lf(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const A2={name:"autolink",tokenize:g2};function g2(e,t,n){let r=0;return i;function i(h){return D(h===A.lessThan,"expected `<`"),e.enter(g.autolink),e.enter(g.autolinkMarker),e.consume(h),e.exit(g.autolinkMarker),e.enter(g.autolinkProtocol),u}function u(h){return at(h)?(e.consume(h),s):h===A.atSign?n(h):l(h)}function s(h){return h===A.plusSign||h===A.dash||h===A.dot||At(h)?(r=1,a(h)):l(h)}function a(h){return h===A.colon?(e.consume(h),r=0,o):(h===A.plusSign||h===A.dash||h===A.dot||At(h))&&r++<J.autolinkSchemeSizeMax?(e.consume(h),a):(r=0,l(h))}function o(h){return h===A.greaterThan?(e.exit(g.autolinkProtocol),e.enter(g.autolinkMarker),e.consume(h),e.exit(g.autolinkMarker),e.exit(g.autolink),t):h===A.eof||h===A.space||h===A.lessThan||Ls(h)?n(h):(e.consume(h),o)}function l(h){return h===A.atSign?(e.consume(h),c):s2(h)?(e.consume(h),l):n(h)}function c(h){return At(h)?d(h):n(h)}function d(h){return h===A.dot?(e.consume(h),r=0,c):h===A.greaterThan?(e.exit(g.autolinkProtocol).type=g.autolinkEmail,e.enter(g.autolinkMarker),e.consume(h),e.exit(g.autolinkMarker),e.exit(g.autolink),t):f(h)}function f(h){if((h===A.dash||At(h))&&r++<J.autolinkDomainSizeMax){const m=h===A.dash?f:d;return e.consume(h),m}return n(h)}}const Ru={partial:!0,tokenize:b2};function b2(e,t,n){return r;function r(u){return me(u)?Ee(e,i,g.linePrefix)(u):i(u)}function i(u){return u===A.eof||$(u)?t(u):n(u)}}const Kp={continuation:{tokenize:y2},exit:T2,name:"blockQuote",tokenize:E2};function E2(e,t,n){const r=this;return i;function i(s){if(s===A.greaterThan){const a=r.containerState;return D(a,"expected `containerState` to be defined in container"),a.open||(e.enter(g.blockQuote,{_container:!0}),a.open=!0),e.enter(g.blockQuotePrefix),e.enter(g.blockQuoteMarker),e.consume(s),e.exit(g.blockQuoteMarker),u}return n(s)}function u(s){return me(s)?(e.enter(g.blockQuotePrefixWhitespace),e.consume(s),e.exit(g.blockQuotePrefixWhitespace),e.exit(g.blockQuotePrefix),t):(e.exit(g.blockQuotePrefix),t(s))}}function y2(e,t,n){const r=this;return i;function i(s){return me(s)?(D(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),Ee(e,u,g.linePrefix,r.parser.constructs.disable.null.includes("codeIndented")?void 0:J.tabSize)(s)):u(s)}function u(s){return e.attempt(Kp,t,n)(s)}}function T2(e){e.exit(g.blockQuote)}const qp={name:"characterEscape",tokenize:C2};function C2(e,t,n){return r;function r(u){return D(u===A.backslash,"expected `\\`"),e.enter(g.characterEscape),e.enter(g.escapeMarker),e.consume(u),e.exit(g.escapeMarker),i}function i(u){return o2(u)?(e.enter(g.characterEscapeValue),e.consume(u),e.exit(g.characterEscapeValue),e.exit(g.characterEscape),t):n(u)}}const Yp={name:"characterReference",tokenize:x2};function x2(e,t,n){const r=this;let i=0,u,s;return a;function a(d){return D(d===A.ampersand,"expected `&`"),e.enter(g.characterReference),e.enter(g.characterReferenceMarker),e.consume(d),e.exit(g.characterReferenceMarker),o}function o(d){return d===A.numberSign?(e.enter(g.characterReferenceMarkerNumeric),e.consume(d),e.exit(g.characterReferenceMarkerNumeric),l):(e.enter(g.characterReferenceValue),u=J.characterReferenceNamedSizeMax,s=At,c(d))}function l(d){return d===A.uppercaseX||d===A.lowercaseX?(e.enter(g.characterReferenceMarkerHexadecimal),e.consume(d),e.exit(g.characterReferenceMarkerHexadecimal),e.enter(g.characterReferenceValue),u=J.characterReferenceHexadecimalSizeMax,s=a2,c):(e.enter(g.characterReferenceValue),u=J.characterReferenceDecimalSizeMax,s=El,c(d))}function c(d){if(d===A.semicolon&&i){const f=e.exit(g.characterReferenceValue);return s===At&&!Cc(r.sliceSerialize(f))?n(d):(e.enter(g.characterReferenceMarker),e.consume(d),e.exit(g.characterReferenceMarker),e.exit(g.characterReference),t)}return s(d)&&i++<u?(e.consume(d),c):n(d)}}const vf={partial:!0,tokenize:S2},Ff={concrete:!0,name:"codeFenced",tokenize:k2};function k2(e,t,n){const r=this,i={partial:!0,tokenize:_};let u=0,s=0,a;return o;function o(I){return l(I)}function l(I){D(I===A.graveAccent||I===A.tilde,"expected `` ` `` or `~`");const B=r.events[r.events.length-1];return u=B&&B[1].type===g.linePrefix?B[2].sliceSerialize(B[1],!0).length:0,a=I,e.enter(g.codeFenced),e.enter(g.codeFencedFence),e.enter(g.codeFencedFenceSequence),c(I)}function c(I){return I===a?(s++,e.consume(I),c):s<J.codeFencedSequenceSizeMin?n(I):(e.exit(g.codeFencedFenceSequence),me(I)?Ee(e,d,g.whitespace)(I):d(I))}function d(I){return I===A.eof||$(I)?(e.exit(g.codeFencedFence),r.interrupt?t(I):e.check(vf,b,L)(I)):(e.enter(g.codeFencedFenceInfo),e.enter(g.chunkString,{contentType:J.contentTypeString}),f(I))}function f(I){return I===A.eof||$(I)?(e.exit(g.chunkString),e.exit(g.codeFencedFenceInfo),d(I)):me(I)?(e.exit(g.chunkString),e.exit(g.codeFencedFenceInfo),Ee(e,h,g.whitespace)(I)):I===A.graveAccent&&I===a?n(I):(e.consume(I),f)}function h(I){return I===A.eof||$(I)?d(I):(e.enter(g.codeFencedFenceMeta),e.enter(g.chunkString,{contentType:J.contentTypeString}),m(I))}function m(I){return I===A.eof||$(I)?(e.exit(g.chunkString),e.exit(g.codeFencedFenceMeta),d(I)):I===A.graveAccent&&I===a?n(I):(e.consume(I),m)}function b(I){return D($(I),"expected eol"),e.attempt(i,L,T)(I)}function T(I){return D($(I),"expected eol"),e.enter(g.lineEnding),e.consume(I),e.exit(g.lineEnding),E}function E(I){return u>0&&me(I)?Ee(e,O,g.linePrefix,u+1)(I):O(I)}function O(I){return I===A.eof||$(I)?e.check(vf,b,L)(I):(e.enter(g.codeFlowValue),w(I))}function w(I){return I===A.eof||$(I)?(e.exit(g.codeFlowValue),O(I)):(e.consume(I),w)}function L(I){return e.exit(g.codeFenced),t(I)}function _(I,B,G){let M=0;return S;function S(ee){return D($(ee),"expected eol"),I.enter(g.lineEnding),I.consume(ee),I.exit(g.lineEnding),V}function V(ee){return D(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),I.enter(g.codeFencedFence),me(ee)?Ee(I,Y,g.linePrefix,r.parser.constructs.disable.null.includes("codeIndented")?void 0:J.tabSize)(ee):Y(ee)}function Y(ee){return ee===a?(I.enter(g.codeFencedFenceSequence),U(ee)):G(ee)}function U(ee){return ee===a?(M++,I.consume(ee),U):M>=s?(I.exit(g.codeFencedFenceSequence),me(ee)?Ee(I,j,g.whitespace)(ee):j(ee)):G(ee)}function j(ee){return ee===A.eof||$(ee)?(I.exit(g.codeFencedFence),B(ee)):G(ee)}}}function S2(e,t,n){const r=this;return i;function i(s){return s===A.eof?n(s):(D($(s),"expected eol"),e.enter(g.lineEnding),e.consume(s),e.exit(g.lineEnding),u)}function u(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Ja={name:"codeIndented",tokenize:w2},I2={partial:!0,tokenize:N2};function w2(e,t,n){const r=this;return i;function i(l){return D(me(l)),e.enter(g.codeIndented),Ee(e,u,g.linePrefix,J.tabSize+1)(l)}function u(l){const c=r.events[r.events.length-1];return c&&c[1].type===g.linePrefix&&c[2].sliceSerialize(c[1],!0).length>=J.tabSize?s(l):n(l)}function s(l){return l===A.eof?o(l):$(l)?e.attempt(I2,s,o)(l):(e.enter(g.codeFlowValue),a(l))}function a(l){return l===A.eof||$(l)?(e.exit(g.codeFlowValue),s(l)):(e.consume(l),a)}function o(l){return e.exit(g.codeIndented),t(l)}}function N2(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):$(s)?(e.enter(g.lineEnding),e.consume(s),e.exit(g.lineEnding),i):Ee(e,u,g.linePrefix,J.tabSize+1)(s)}function u(s){const a=r.events[r.events.length-1];return a&&a[1].type===g.linePrefix&&a[2].sliceSerialize(a[1],!0).length>=J.tabSize?t(s):$(s)?i(s):n(s)}}const D2={name:"codeText",previous:Gp,resolve:_2,tokenize:O2};function _2(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===g.lineEnding||e[n][1].type==="space")&&(e[t][1].type===g.lineEnding||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type===g.codeTextData){e[n][1].type=g.codeTextPadding,e[t][1].type=g.codeTextPadding,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==g.lineEnding&&(i=r):(r===t||e[r][1].type===g.lineEnding)&&(e[i][1].type=g.codeTextData,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Gp(e){return e!==A.graveAccent||this.events[this.events.length-1][1].type===g.characterEscape}function O2(e,t,n){const r=this;let i=0,u,s;return a;function a(f){return D(f===A.graveAccent,"expected `` ` ``"),D(Gp.call(r,r.previous),"expected correct previous"),e.enter(g.codeText),e.enter(g.codeTextSequence),o(f)}function o(f){return f===A.graveAccent?(e.consume(f),i++,o):(e.exit(g.codeTextSequence),l(f))}function l(f){return f===A.eof?n(f):f===A.space?(e.enter("space"),e.consume(f),e.exit("space"),l):f===A.graveAccent?(s=e.enter(g.codeTextSequence),u=0,d(f)):$(f)?(e.enter(g.lineEnding),e.consume(f),e.exit(g.lineEnding),l):(e.enter(g.codeTextData),c(f))}function c(f){return f===A.eof||f===A.space||f===A.graveAccent||$(f)?(e.exit(g.codeTextData),l(f)):(e.consume(f),c)}function d(f){return f===A.graveAccent?(e.consume(f),u++,d):u===i?(e.exit(g.codeTextSequence),e.exit(g.codeText),t(f)):(s.type=g.codeTextData,c(f))}}class R2{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const u=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Di(this.left,r),u.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Di(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Di(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Di(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Di(this.left,n.reverse())}}}function Di(e,t){let n=0;if(t.length<J.v8MaxSafeChunkSize)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+J.v8MaxSafeChunkSize)),n+=J.v8MaxSafeChunkSize}function Vp(e){const t={};let n=-1,r,i,u,s,a,o,l;const c=new R2(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type===g.chunkFlow&&c.get(n-1)[1].type===g.listItemPrefix&&(D(r[1]._tokenizer,"expected `_tokenizer` on subtokens"),o=r[1]._tokenizer.events,u=0,u<o.length&&o[u][1].type===g.lineEndingBlank&&(u+=2),u<o.length&&o[u][1].type===g.content))for(;++u<o.length&&o[u][1].type!==g.content;)o[u][1].type===g.chunkText&&(o[u][1]._isInFirstContentOfListItem=!0,u++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,M2(c,n)),n=t[n],l=!0);else if(r[1]._container){for(u=n,i=void 0;u--;)if(s=c.get(u),s[1].type===g.lineEnding||s[1].type===g.lineEndingBlank)s[0]==="enter"&&(i&&(c.get(i)[1].type=g.lineEndingBlank),s[1].type=g.lineEnding,i=u);else if(!(s[1].type===g.linePrefix||s[1].type===g.listItemIndent))break;i&&(r[1].end={...c.get(i)[1].start},a=c.slice(i,n),a.unshift(r),c.splice(i,n-i+1,a))}}return St(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!l}function M2(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const u=[];D(n.contentType,"expected `contentType` on subtokens");let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const a=s.events,o=[],l={};let c,d,f=-1,h=n,m=0,b=0;const T=[b];for(;h;){for(;e.get(++i)[1]!==h;);D(!d||h.previous===d,"expected previous to match"),D(!d||d.next===h,"expected next to match"),u.push(i),h._tokenizer||(c=r.sliceStream(h),h.next||c.push(A.eof),d&&s.defineSkip(h.start),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=h,h=h.next}for(h=n;++f<a.length;)a[f][0]==="exit"&&a[f-1][0]==="enter"&&a[f][1].type===a[f-1][1].type&&a[f][1].start.line!==a[f][1].end.line&&(D(h,"expected a current token"),b=f+1,T.push(b),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(s.events=[],h?(h._tokenizer=void 0,h.previous=void 0,D(!h.next,"expected no next token")):T.pop(),f=T.length;f--;){const E=a.slice(T[f],T[f+1]),O=u.pop();D(O!==void 0,"expected a start position when splicing"),o.push([O,O+E.length-1]),e.splice(O,2,E)}for(o.reverse(),f=-1;++f<o.length;)l[m+o[f][0]]=m+o[f][1],m+=o[f][1]-o[f][0]-1;return l}const B2={resolve:v2,tokenize:F2},L2={partial:!0,tokenize:P2};function v2(e){return Vp(e),e}function F2(e,t){let n;return r;function r(a){return D(a!==A.eof&&!$(a),"expected no eof or eol"),e.enter(g.content),n=e.enter(g.chunkContent,{contentType:J.contentTypeContent}),i(a)}function i(a){return a===A.eof?u(a):$(a)?e.check(L2,s,u)(a):(e.consume(a),i)}function u(a){return e.exit(g.chunkContent),e.exit(g.content),t(a)}function s(a){return D($(a),"expected eol"),e.consume(a),e.exit(g.chunkContent),D(n,"expected previous token"),n.next=e.enter(g.chunkContent,{contentType:J.contentTypeContent,previous:n}),n=n.next,i}}function P2(e,t,n){const r=this;return i;function i(s){return D($(s),"expected a line ending"),e.exit(g.chunkContent),e.enter(g.lineEnding),e.consume(s),e.exit(g.lineEnding),Ee(e,u,g.linePrefix)}function u(s){if(s===A.eof||$(s))return n(s);D(r.parser.constructs.disable.null,"expected `disable.null` to be populated");const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type===g.linePrefix&&a[2].sliceSerialize(a[1],!0).length>=J.tabSize?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Jp(e,t,n,r,i,u,s,a,o){const l=o||Number.POSITIVE_INFINITY;let c=0;return d;function d(E){return E===A.lessThan?(e.enter(r),e.enter(i),e.enter(u),e.consume(E),e.exit(u),f):E===A.eof||E===A.space||E===A.rightParenthesis||Ls(E)?n(E):(e.enter(r),e.enter(s),e.enter(a),e.enter(g.chunkString,{contentType:J.contentTypeString}),b(E))}function f(E){return E===A.greaterThan?(e.enter(u),e.consume(E),e.exit(u),e.exit(i),e.exit(r),t):(e.enter(a),e.enter(g.chunkString,{contentType:J.contentTypeString}),h(E))}function h(E){return E===A.greaterThan?(e.exit(g.chunkString),e.exit(a),f(E)):E===A.eof||E===A.lessThan||$(E)?n(E):(e.consume(E),E===A.backslash?m:h)}function m(E){return E===A.lessThan||E===A.greaterThan||E===A.backslash?(e.consume(E),h):h(E)}function b(E){return!c&&(E===A.eof||E===A.rightParenthesis||Ne(E))?(e.exit(g.chunkString),e.exit(a),e.exit(s),e.exit(r),t(E)):c<l&&E===A.leftParenthesis?(e.consume(E),c++,b):E===A.rightParenthesis?(e.consume(E),c--,b):E===A.eof||E===A.space||E===A.leftParenthesis||Ls(E)?n(E):(e.consume(E),E===A.backslash?T:b)}function T(E){return E===A.leftParenthesis||E===A.rightParenthesis||E===A.backslash?(e.consume(E),b):b(E)}}function jp(e,t,n,r,i,u){const s=this;let a=0,o;return l;function l(h){return D(h===A.leftSquareBracket,"expected `[`"),e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(u),c}function c(h){return a>J.linkReferenceSizeMax||h===A.eof||h===A.leftSquareBracket||h===A.rightSquareBracket&&!o||h===A.caret&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):h===A.rightSquareBracket?(e.exit(u),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):$(h)?(e.enter(g.lineEnding),e.consume(h),e.exit(g.lineEnding),c):(e.enter(g.chunkString,{contentType:J.contentTypeString}),d(h))}function d(h){return h===A.eof||h===A.leftSquareBracket||h===A.rightSquareBracket||$(h)||a++>J.linkReferenceSizeMax?(e.exit(g.chunkString),c(h)):(e.consume(h),o||(o=!me(h)),h===A.backslash?f:d)}function f(h){return h===A.leftSquareBracket||h===A.backslash||h===A.rightSquareBracket?(e.consume(h),a++,d):d(h)}}function Zp(e,t,n,r,i,u){let s;return a;function a(f){return f===A.quotationMark||f===A.apostrophe||f===A.leftParenthesis?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),s=f===A.leftParenthesis?A.rightParenthesis:f,o):n(f)}function o(f){return f===s?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):(e.enter(u),l(f))}function l(f){return f===s?(e.exit(u),o(s)):f===A.eof?n(f):$(f)?(e.enter(g.lineEnding),e.consume(f),e.exit(g.lineEnding),Ee(e,l,g.linePrefix)):(e.enter(g.chunkString,{contentType:J.contentTypeString}),c(f))}function c(f){return f===s||f===A.eof||$(f)?(e.exit(g.chunkString),l(f)):(e.consume(f),f===A.backslash?d:c)}function d(f){return f===s||f===A.backslash?(e.consume(f),c):c(f)}}function Ki(e,t){let n;return r;function r(i){return $(i)?(e.enter(g.lineEnding),e.consume(i),e.exit(g.lineEnding),n=!0,r):me(i)?Ee(e,r,n?g.linePrefix:g.lineSuffix)(i):t(i)}}const H2={name:"definition",tokenize:W2},U2={partial:!0,tokenize:Q2};function W2(e,t,n){const r=this;let i;return u;function u(h){return e.enter(g.definition),s(h)}function s(h){return D(h===A.leftSquareBracket,"expected `[`"),jp.call(r,e,a,n,g.definitionLabel,g.definitionLabelMarker,g.definitionLabelString)(h)}function a(h){return i=qt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===A.colon?(e.enter(g.definitionMarker),e.consume(h),e.exit(g.definitionMarker),o):n(h)}function o(h){return Ne(h)?Ki(e,l)(h):l(h)}function l(h){return Jp(e,c,n,g.definitionDestination,g.definitionDestinationLiteral,g.definitionDestinationLiteralMarker,g.definitionDestinationRaw,g.definitionDestinationString)(h)}function c(h){return e.attempt(U2,d,d)(h)}function d(h){return me(h)?Ee(e,f,g.whitespace)(h):f(h)}function f(h){return h===A.eof||$(h)?(e.exit(g.definition),r.parser.defined.push(i),t(h)):n(h)}}function Q2(e,t,n){return r;function r(a){return Ne(a)?Ki(e,i)(a):n(a)}function i(a){return Zp(e,u,n,g.definitionTitle,g.definitionTitleMarker,g.definitionTitleString)(a)}function u(a){return me(a)?Ee(e,s,g.whitespace)(a):s(a)}function s(a){return a===A.eof||$(a)?t(a):n(a)}}const z2={name:"hardBreakEscape",tokenize:K2};function K2(e,t,n){return r;function r(u){return D(u===A.backslash,"expected `\\`"),e.enter(g.hardBreakEscape),e.consume(u),i}function i(u){return $(u)?(e.exit(g.hardBreakEscape),t(u)):n(u)}}const q2={name:"headingAtx",resolve:Y2,tokenize:G2};function Y2(e,t){let n=e.length-2,r=3,i,u;return e[r][1].type===g.whitespace&&(r+=2),n-2>r&&e[n][1].type===g.whitespace&&(n-=2),e[n][1].type===g.atxHeadingSequence&&(r===n-1||n-4>r&&e[n-2][1].type===g.whitespace)&&(n-=r+1===n?2:4),n>r&&(i={type:g.atxHeadingText,start:e[r][1].start,end:e[n][1].end},u={type:g.chunkText,start:e[r][1].start,end:e[n][1].end,contentType:J.contentTypeText},St(e,r,n-r+1,[["enter",i,t],["enter",u,t],["exit",u,t],["exit",i,t]])),e}function G2(e,t,n){let r=0;return i;function i(c){return e.enter(g.atxHeading),u(c)}function u(c){return D(c===A.numberSign,"expected `#`"),e.enter(g.atxHeadingSequence),s(c)}function s(c){return c===A.numberSign&&r++<J.atxHeadingOpeningFenceSizeMax?(e.consume(c),s):c===A.eof||Ne(c)?(e.exit(g.atxHeadingSequence),a(c)):n(c)}function a(c){return c===A.numberSign?(e.enter(g.atxHeadingSequence),o(c)):c===A.eof||$(c)?(e.exit(g.atxHeading),t(c)):me(c)?Ee(e,a,g.whitespace)(c):(e.enter(g.atxHeadingText),l(c))}function o(c){return c===A.numberSign?(e.consume(c),o):(e.exit(g.atxHeadingSequence),a(c))}function l(c){return c===A.eof||c===A.numberSign||Ne(c)?(e.exit(g.atxHeadingText),a(c)):(e.consume(c),l)}}const V2=["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"],Pf=["pre","script","style","textarea"],J2={concrete:!0,name:"htmlFlow",resolveTo:X2,tokenize:$2},j2={partial:!0,tokenize:tE},Z2={partial:!0,tokenize:eE};function X2(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type===g.htmlFlow););return t>1&&e[t-2][1].type===g.linePrefix&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function $2(e,t,n){const r=this;let i,u,s,a,o;return l;function l(N){return c(N)}function c(N){return D(N===A.lessThan,"expected `<`"),e.enter(g.htmlFlow),e.enter(g.htmlFlowData),e.consume(N),d}function d(N){return N===A.exclamationMark?(e.consume(N),f):N===A.slash?(e.consume(N),u=!0,b):N===A.questionMark?(e.consume(N),i=J.htmlInstruction,r.interrupt?t:k):at(N)?(D(N!==null),e.consume(N),s=String.fromCharCode(N),T):n(N)}function f(N){return N===A.dash?(e.consume(N),i=J.htmlComment,h):N===A.leftSquareBracket?(e.consume(N),i=J.htmlCdata,a=0,m):at(N)?(e.consume(N),i=J.htmlDeclaration,r.interrupt?t:k):n(N)}function h(N){return N===A.dash?(e.consume(N),r.interrupt?t:k):n(N)}function m(N){const Ge=J.cdataOpeningString;return N===Ge.charCodeAt(a++)?(e.consume(N),a===Ge.length?r.interrupt?t:Y:m):n(N)}function b(N){return at(N)?(D(N!==null),e.consume(N),s=String.fromCharCode(N),T):n(N)}function T(N){if(N===A.eof||N===A.slash||N===A.greaterThan||Ne(N)){const Ge=N===A.slash,zt=s.toLowerCase();return!Ge&&!u&&Pf.includes(zt)?(i=J.htmlRaw,r.interrupt?t(N):Y(N)):V2.includes(s.toLowerCase())?(i=J.htmlBasic,Ge?(e.consume(N),E):r.interrupt?t(N):Y(N)):(i=J.htmlComplete,r.interrupt&&!r.parser.lazy[r.now().line]?n(N):u?O(N):w(N))}return N===A.dash||At(N)?(e.consume(N),s+=String.fromCharCode(N),T):n(N)}function E(N){return N===A.greaterThan?(e.consume(N),r.interrupt?t:Y):n(N)}function O(N){return me(N)?(e.consume(N),O):S(N)}function w(N){return N===A.slash?(e.consume(N),S):N===A.colon||N===A.underscore||at(N)?(e.consume(N),L):me(N)?(e.consume(N),w):S(N)}function L(N){return N===A.dash||N===A.dot||N===A.colon||N===A.underscore||At(N)?(e.consume(N),L):_(N)}function _(N){return N===A.equalsTo?(e.consume(N),I):me(N)?(e.consume(N),_):w(N)}function I(N){return N===A.eof||N===A.lessThan||N===A.equalsTo||N===A.greaterThan||N===A.graveAccent?n(N):N===A.quotationMark||N===A.apostrophe?(e.consume(N),o=N,B):me(N)?(e.consume(N),I):G(N)}function B(N){return N===o?(e.consume(N),o=null,M):N===A.eof||$(N)?n(N):(e.consume(N),B)}function G(N){return N===A.eof||N===A.quotationMark||N===A.apostrophe||N===A.slash||N===A.lessThan||N===A.equalsTo||N===A.greaterThan||N===A.graveAccent||Ne(N)?_(N):(e.consume(N),G)}function M(N){return N===A.slash||N===A.greaterThan||me(N)?w(N):n(N)}function S(N){return N===A.greaterThan?(e.consume(N),V):n(N)}function V(N){return N===A.eof||$(N)?Y(N):me(N)?(e.consume(N),V):n(N)}function Y(N){return N===A.dash&&i===J.htmlComment?(e.consume(N),se):N===A.lessThan&&i===J.htmlRaw?(e.consume(N),z):N===A.greaterThan&&i===J.htmlDeclaration?(e.consume(N),fe):N===A.questionMark&&i===J.htmlInstruction?(e.consume(N),k):N===A.rightSquareBracket&&i===J.htmlCdata?(e.consume(N),we):$(N)&&(i===J.htmlBasic||i===J.htmlComplete)?(e.exit(g.htmlFlowData),e.check(j2,Re,U)(N)):N===A.eof||$(N)?(e.exit(g.htmlFlowData),U(N)):(e.consume(N),Y)}function U(N){return e.check(Z2,j,Re)(N)}function j(N){return D($(N)),e.enter(g.lineEnding),e.consume(N),e.exit(g.lineEnding),ee}function ee(N){return N===A.eof||$(N)?U(N):(e.enter(g.htmlFlowData),Y(N))}function se(N){return N===A.dash?(e.consume(N),k):Y(N)}function z(N){return N===A.slash?(e.consume(N),s="",te):Y(N)}function te(N){if(N===A.greaterThan){const Ge=s.toLowerCase();return Pf.includes(Ge)?(e.consume(N),fe):Y(N)}return at(N)&&s.length<J.htmlRawSizeMax?(D(N!==null),e.consume(N),s+=String.fromCharCode(N),te):Y(N)}function we(N){return N===A.rightSquareBracket?(e.consume(N),k):Y(N)}function k(N){return N===A.greaterThan?(e.consume(N),fe):N===A.dash&&i===J.htmlComment?(e.consume(N),k):Y(N)}function fe(N){return N===A.eof||$(N)?(e.exit(g.htmlFlowData),Re(N)):(e.consume(N),fe)}function Re(N){return e.exit(g.htmlFlow),t(N)}}function eE(e,t,n){const r=this;return i;function i(s){return $(s)?(e.enter(g.lineEnding),e.consume(s),e.exit(g.lineEnding),u):n(s)}function u(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function tE(e,t,n){return r;function r(i){return D($(i),"expected a line ending"),e.enter(g.lineEnding),e.consume(i),e.exit(g.lineEnding),e.attempt(Ru,t,n)}}const nE={name:"htmlText",tokenize:rE};function rE(e,t,n){const r=this;let i,u,s;return a;function a(k){return D(k===A.lessThan,"expected `<`"),e.enter(g.htmlText),e.enter(g.htmlTextData),e.consume(k),o}function o(k){return k===A.exclamationMark?(e.consume(k),l):k===A.slash?(e.consume(k),_):k===A.questionMark?(e.consume(k),w):at(k)?(e.consume(k),G):n(k)}function l(k){return k===A.dash?(e.consume(k),c):k===A.leftSquareBracket?(e.consume(k),u=0,m):at(k)?(e.consume(k),O):n(k)}function c(k){return k===A.dash?(e.consume(k),h):n(k)}function d(k){return k===A.eof?n(k):k===A.dash?(e.consume(k),f):$(k)?(s=d,z(k)):(e.consume(k),d)}function f(k){return k===A.dash?(e.consume(k),h):d(k)}function h(k){return k===A.greaterThan?se(k):k===A.dash?f(k):d(k)}function m(k){const fe=J.cdataOpeningString;return k===fe.charCodeAt(u++)?(e.consume(k),u===fe.length?b:m):n(k)}function b(k){return k===A.eof?n(k):k===A.rightSquareBracket?(e.consume(k),T):$(k)?(s=b,z(k)):(e.consume(k),b)}function T(k){return k===A.rightSquareBracket?(e.consume(k),E):b(k)}function E(k){return k===A.greaterThan?se(k):k===A.rightSquareBracket?(e.consume(k),E):b(k)}function O(k){return k===A.eof||k===A.greaterThan?se(k):$(k)?(s=O,z(k)):(e.consume(k),O)}function w(k){return k===A.eof?n(k):k===A.questionMark?(e.consume(k),L):$(k)?(s=w,z(k)):(e.consume(k),w)}function L(k){return k===A.greaterThan?se(k):w(k)}function _(k){return at(k)?(e.consume(k),I):n(k)}function I(k){return k===A.dash||At(k)?(e.consume(k),I):B(k)}function B(k){return $(k)?(s=B,z(k)):me(k)?(e.consume(k),B):se(k)}function G(k){return k===A.dash||At(k)?(e.consume(k),G):k===A.slash||k===A.greaterThan||Ne(k)?M(k):n(k)}function M(k){return k===A.slash?(e.consume(k),se):k===A.colon||k===A.underscore||at(k)?(e.consume(k),S):$(k)?(s=M,z(k)):me(k)?(e.consume(k),M):se(k)}function S(k){return k===A.dash||k===A.dot||k===A.colon||k===A.underscore||At(k)?(e.consume(k),S):V(k)}function V(k){return k===A.equalsTo?(e.consume(k),Y):$(k)?(s=V,z(k)):me(k)?(e.consume(k),V):M(k)}function Y(k){return k===A.eof||k===A.lessThan||k===A.equalsTo||k===A.greaterThan||k===A.graveAccent?n(k):k===A.quotationMark||k===A.apostrophe?(e.consume(k),i=k,U):$(k)?(s=Y,z(k)):me(k)?(e.consume(k),Y):(e.consume(k),j)}function U(k){return k===i?(e.consume(k),i=void 0,ee):k===A.eof?n(k):$(k)?(s=U,z(k)):(e.consume(k),U)}function j(k){return k===A.eof||k===A.quotationMark||k===A.apostrophe||k===A.lessThan||k===A.equalsTo||k===A.graveAccent?n(k):k===A.slash||k===A.greaterThan||Ne(k)?M(k):(e.consume(k),j)}function ee(k){return k===A.slash||k===A.greaterThan||Ne(k)?M(k):n(k)}function se(k){return k===A.greaterThan?(e.consume(k),e.exit(g.htmlTextData),e.exit(g.htmlText),t):n(k)}function z(k){return D(s,"expected return state"),D($(k),"expected eol"),e.exit(g.htmlTextData),e.enter(g.lineEnding),e.consume(k),e.exit(g.lineEnding),te}function te(k){return D(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),me(k)?Ee(e,we,g.linePrefix,r.parser.constructs.disable.null.includes("codeIndented")?void 0:J.tabSize)(k):we(k)}function we(k){return e.enter(g.htmlTextData),s(k)}}const xc={name:"labelEnd",resolveAll:aE,resolveTo:oE,tokenize:lE},iE={tokenize:cE},uE={tokenize:dE},sE={tokenize:fE};function aE(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type===g.labelImage||r.type===g.labelLink||r.type===g.labelEnd){const i=r.type===g.labelImage?4:2;r.type=g.data,t+=i}}return e.length!==n.length&&St(e,0,e.length,n),e}function oE(e,t){let n=e.length,r=0,i,u,s,a;for(;n--;)if(i=e[n][1],u){if(i.type===g.link||i.type===g.labelLink&&i._inactive)break;e[n][0]==="enter"&&i.type===g.labelLink&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type===g.labelImage||i.type===g.labelLink)&&!i._balanced&&(u=n,i.type!==g.labelLink)){r=2;break}}else i.type===g.labelEnd&&(s=n);D(u!==void 0,"`open` is supposed to be found"),D(s!==void 0,"`close` is supposed to be found");const o={type:e[u][1].type===g.labelLink?g.link:g.image,start:{...e[u][1].start},end:{...e[e.length-1][1].end}},l={type:g.label,start:{...e[u][1].start},end:{...e[s][1].end}},c={type:g.labelText,start:{...e[u+r+2][1].end},end:{...e[s-2][1].start}};return a=[["enter",o,t],["enter",l,t]],a=Lt(a,e.slice(u+1,u+r+3)),a=Lt(a,[["enter",c,t]]),D(t.parser.constructs.insideSpan.null,"expected `insideSpan.null` to be populated"),a=Lt(a,ya(t.parser.constructs.insideSpan.null,e.slice(u+r+4,s-3),t)),a=Lt(a,[["exit",c,t],e[s-2],e[s-1],["exit",l,t]]),a=Lt(a,e.slice(s+1)),a=Lt(a,[["exit",o,t]]),St(e,u,e.length,a),e}function lE(e,t,n){const r=this;let i=r.events.length,u,s;for(;i--;)if((r.events[i][1].type===g.labelImage||r.events[i][1].type===g.labelLink)&&!r.events[i][1]._balanced){u=r.events[i][1];break}return a;function a(f){return D(f===A.rightSquareBracket,"expected `]`"),u?u._inactive?d(f):(s=r.parser.defined.includes(qt(r.sliceSerialize({start:u.end,end:r.now()}))),e.enter(g.labelEnd),e.enter(g.labelMarker),e.consume(f),e.exit(g.labelMarker),e.exit(g.labelEnd),o):n(f)}function o(f){return f===A.leftParenthesis?e.attempt(iE,c,s?c:d)(f):f===A.leftSquareBracket?e.attempt(uE,c,s?l:d)(f):s?c(f):d(f)}function l(f){return e.attempt(sE,c,d)(f)}function c(f){return t(f)}function d(f){return u._balanced=!0,n(f)}}function cE(e,t,n){return r;function r(d){return D(d===A.leftParenthesis,"expected left paren"),e.enter(g.resource),e.enter(g.resourceMarker),e.consume(d),e.exit(g.resourceMarker),i}function i(d){return Ne(d)?Ki(e,u)(d):u(d)}function u(d){return d===A.rightParenthesis?c(d):Jp(e,s,a,g.resourceDestination,g.resourceDestinationLiteral,g.resourceDestinationLiteralMarker,g.resourceDestinationRaw,g.resourceDestinationString,J.linkResourceDestinationBalanceMax)(d)}function s(d){return Ne(d)?Ki(e,o)(d):c(d)}function a(d){return n(d)}function o(d){return d===A.quotationMark||d===A.apostrophe||d===A.leftParenthesis?Zp(e,l,n,g.resourceTitle,g.resourceTitleMarker,g.resourceTitleString)(d):c(d)}function l(d){return Ne(d)?Ki(e,c)(d):c(d)}function c(d){return d===A.rightParenthesis?(e.enter(g.resourceMarker),e.consume(d),e.exit(g.resourceMarker),e.exit(g.resource),t):n(d)}}function dE(e,t,n){const r=this;return i;function i(a){return D(a===A.leftSquareBracket,"expected left bracket"),jp.call(r,e,u,s,g.reference,g.referenceMarker,g.referenceString)(a)}function u(a){return r.parser.defined.includes(qt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function s(a){return n(a)}}function fE(e,t,n){return r;function r(u){return D(u===A.leftSquareBracket,"expected left bracket"),e.enter(g.reference),e.enter(g.referenceMarker),e.consume(u),e.exit(g.referenceMarker),i}function i(u){return u===A.rightSquareBracket?(e.enter(g.referenceMarker),e.consume(u),e.exit(g.referenceMarker),e.exit(g.reference),t):n(u)}}const hE={name:"labelStartImage",resolveAll:xc.resolveAll,tokenize:pE};function pE(e,t,n){const r=this;return i;function i(a){return D(a===A.exclamationMark,"expected `!`"),e.enter(g.labelImage),e.enter(g.labelImageMarker),e.consume(a),e.exit(g.labelImageMarker),u}function u(a){return a===A.leftSquareBracket?(e.enter(g.labelMarker),e.consume(a),e.exit(g.labelMarker),e.exit(g.labelImage),s):n(a)}function s(a){return a===A.caret&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const mE={name:"labelStartLink",resolveAll:xc.resolveAll,tokenize:AE};function AE(e,t,n){const r=this;return i;function i(s){return D(s===A.leftSquareBracket,"expected `[`"),e.enter(g.labelLink),e.enter(g.labelMarker),e.consume(s),e.exit(g.labelMarker),e.exit(g.labelLink),u}function u(s){return s===A.caret&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const ja={name:"lineEnding",tokenize:gE};function gE(e,t){return n;function n(r){return D($(r),"expected eol"),e.enter(g.lineEnding),e.consume(r),e.exit(g.lineEnding),Ee(e,t,g.linePrefix)}}const ys={name:"thematicBreak",tokenize:bE};function bE(e,t,n){let r=0,i;return u;function u(l){return e.enter(g.thematicBreak),s(l)}function s(l){return D(l===A.asterisk||l===A.dash||l===A.underscore,"expected `*`, `-`, or `_`"),i=l,a(l)}function a(l){return l===i?(e.enter(g.thematicBreakSequence),o(l)):r>=J.thematicBreakMarkerCountMin&&(l===A.eof||$(l))?(e.exit(g.thematicBreak),t(l)):n(l)}function o(l){return l===i?(e.consume(l),r++,o):(e.exit(g.thematicBreakSequence),me(l)?Ee(e,a,g.whitespace)(l):a(l))}}const ht={continuation:{tokenize:CE},exit:kE,name:"list",tokenize:TE},EE={partial:!0,tokenize:SE},yE={partial:!0,tokenize:xE};function TE(e,t,n){const r=this,i=r.events[r.events.length-1];let u=i&&i[1].type===g.linePrefix?i[2].sliceSerialize(i[1],!0).length:0,s=0;return a;function a(h){D(r.containerState,"expected state");const m=r.containerState.type||(h===A.asterisk||h===A.plusSign||h===A.dash?g.listUnordered:g.listOrdered);if(m===g.listUnordered?!r.containerState.marker||h===r.containerState.marker:El(h)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m===g.listUnordered)return e.enter(g.listItemPrefix),h===A.asterisk||h===A.dash?e.check(ys,n,l)(h):l(h);if(!r.interrupt||h===A.digit1)return e.enter(g.listItemPrefix),e.enter(g.listItemValue),o(h)}return n(h)}function o(h){return D(r.containerState,"expected state"),El(h)&&++s<J.listItemValueSizeMax?(e.consume(h),o):(!r.interrupt||s<2)&&(r.containerState.marker?h===r.containerState.marker:h===A.rightParenthesis||h===A.dot)?(e.exit(g.listItemValue),l(h)):n(h)}function l(h){return D(r.containerState,"expected state"),D(h!==A.eof,"eof (`null`) is not a marker"),e.enter(g.listItemMarker),e.consume(h),e.exit(g.listItemMarker),r.containerState.marker=r.containerState.marker||h,e.check(Ru,r.interrupt?n:c,e.attempt(EE,f,d))}function c(h){return D(r.containerState,"expected state"),r.containerState.initialBlankLine=!0,u++,f(h)}function d(h){return me(h)?(e.enter(g.listItemPrefixWhitespace),e.consume(h),e.exit(g.listItemPrefixWhitespace),f):n(h)}function f(h){return D(r.containerState,"expected state"),r.containerState.size=u+r.sliceSerialize(e.exit(g.listItemPrefix),!0).length,t(h)}}function CE(e,t,n){const r=this;return D(r.containerState,"expected state"),r.containerState._closeFlow=void 0,e.check(Ru,i,u);function i(a){return D(r.containerState,"expected state"),D(typeof r.containerState.size=="number","expected size"),r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ee(e,t,g.listItemIndent,r.containerState.size+1)(a)}function u(a){return D(r.containerState,"expected state"),r.containerState.furtherBlankLines||!me(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(yE,t,s)(a))}function s(a){return D(r.containerState,"expected state"),r.containerState._closeFlow=!0,r.interrupt=void 0,D(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),Ee(e,e.attempt(ht,t,n),g.linePrefix,r.parser.constructs.disable.null.includes("codeIndented")?void 0:J.tabSize)(a)}}function xE(e,t,n){const r=this;return D(r.containerState,"expected state"),D(typeof r.containerState.size=="number","expected size"),Ee(e,i,g.listItemIndent,r.containerState.size+1);function i(u){D(r.containerState,"expected state");const s=r.events[r.events.length-1];return s&&s[1].type===g.listItemIndent&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(u):n(u)}}function kE(e){D(this.containerState,"expected state"),D(typeof this.containerState.type=="string","expected type"),e.exit(this.containerState.type)}function SE(e,t,n){const r=this;return D(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),Ee(e,i,g.listItemPrefixWhitespace,r.parser.constructs.disable.null.includes("codeIndented")?void 0:J.tabSize+1);function i(u){const s=r.events[r.events.length-1];return!me(u)&&s&&s[1].type===g.listItemPrefixWhitespace?t(u):n(u)}}const Hf={name:"setextUnderline",resolveTo:IE,tokenize:wE};function IE(e,t){let n=e.length,r,i,u;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type===g.content){r=n;break}e[n][1].type===g.paragraph&&(i=n)}else e[n][1].type===g.content&&e.splice(n,1),!u&&e[n][1].type===g.definition&&(u=n);D(i!==void 0,"expected a `text` index to be found"),D(r!==void 0,"expected a `text` index to be found"),D(e[r][2]===t,"enter context should be same"),D(e[e.length-1][2]===t,"enter context should be same");const s={type:g.setextHeading,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=g.setextHeadingText,u?(e.splice(i,0,["enter",s,t]),e.splice(u+1,0,["exit",e[r][1],t]),e[r][1].end={...e[u][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function wE(e,t,n){const r=this;let i;return u;function u(l){let c=r.events.length,d;for(D(l===A.dash||l===A.equalsTo,"expected `=` or `-`");c--;)if(r.events[c][1].type!==g.lineEnding&&r.events[c][1].type!==g.linePrefix&&r.events[c][1].type!==g.content){d=r.events[c][1].type===g.paragraph;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter(g.setextHeadingLine),i=l,s(l)):n(l)}function s(l){return e.enter(g.setextHeadingLineSequence),a(l)}function a(l){return l===i?(e.consume(l),a):(e.exit(g.setextHeadingLineSequence),me(l)?Ee(e,o,g.lineSuffix)(l):o(l))}function o(l){return l===A.eof||$(l)?(e.exit(g.setextHeadingLine),t(l)):n(l)}}const NE={tokenize:DE};function DE(e){const t=this,n=e.attempt(Ru,r,e.attempt(this.parser.constructs.flowInitial,i,Ee(e,e.attempt(this.parser.constructs.flow,i,e.attempt(B2,i)),g.linePrefix)));return n;function r(u){if(D(u===A.eof||$(u),"expected eol or eof"),u===A.eof){e.consume(u);return}return e.enter(g.lineEndingBlank),e.consume(u),e.exit(g.lineEndingBlank),t.currentConstruct=void 0,n}function i(u){if(D(u===A.eof||$(u),"expected eol or eof"),u===A.eof){e.consume(u);return}return e.enter(g.lineEnding),e.consume(u),e.exit(g.lineEnding),t.currentConstruct=void 0,n}}const _E={resolveAll:$p()},OE=Xp("string"),RE=Xp("text");function Xp(e){return{resolveAll:$p(e==="text"?ME:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],u=n.attempt(i,s,a);return s;function s(c){return l(c)?u(c):a(c)}function a(c){if(c===A.eof){n.consume(c);return}return n.enter(g.data),n.consume(c),o}function o(c){return l(c)?(n.exit(g.data),u(c)):(n.consume(c),o)}function l(c){if(c===A.eof)return!0;const d=i[c];let f=-1;if(d)for(D(Array.isArray(d),"expected `disable.null` to be populated");++f<d.length;){const h=d[f];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function $p(e){return t;function t(n,r){let i=-1,u;for(;++i<=n.length;)u===void 0?n[i]&&n[i][1].type===g.data&&(u=i,i++):(!n[i]||n[i][1].type!==g.data)&&(i!==u+2&&(n[u][1].end=n[i-1][1].end,n.splice(u+2,i-u-2),i=u+2),u=void 0);return e?e(n,r):n}}function ME(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===g.lineEnding)&&e[n-1][1].type===g.data){const r=e[n-1][1],i=t.sliceStream(r);let u=i.length,s=-1,a=0,o;for(;u--;){const l=i[u];if(typeof l=="string"){for(s=l.length;l.charCodeAt(s-1)===A.space;)a++,s--;if(s)break;s=-1}else if(l===A.horizontalTab)o=!0,a++;else if(l!==A.virtualSpace){u++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const l={type:n===e.length||o||a<J.hardBreakPrefixSizeMin?g.lineSuffix:g.hardBreakTrailing,start:{_bufferIndex:u?s:r.start._bufferIndex+s,_index:r.start._index+u,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...l.start},r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}const BE={[A.asterisk]:ht,[A.plusSign]:ht,[A.dash]:ht,[A.digit0]:ht,[A.digit1]:ht,[A.digit2]:ht,[A.digit3]:ht,[A.digit4]:ht,[A.digit5]:ht,[A.digit6]:ht,[A.digit7]:ht,[A.digit8]:ht,[A.digit9]:ht,[A.greaterThan]:Kp},LE={[A.leftSquareBracket]:H2},vE={[A.horizontalTab]:Ja,[A.virtualSpace]:Ja,[A.space]:Ja},FE={[A.numberSign]:q2,[A.asterisk]:ys,[A.dash]:[Hf,ys],[A.lessThan]:J2,[A.equalsTo]:Hf,[A.underscore]:ys,[A.graveAccent]:Ff,[A.tilde]:Ff},PE={[A.ampersand]:Yp,[A.backslash]:qp},HE={[A.carriageReturn]:ja,[A.lineFeed]:ja,[A.carriageReturnLineFeed]:ja,[A.exclamationMark]:hE,[A.ampersand]:Yp,[A.asterisk]:yl,[A.lessThan]:[A2,nE],[A.leftSquareBracket]:mE,[A.backslash]:[z2,qp],[A.rightSquareBracket]:xc,[A.underscore]:yl,[A.graveAccent]:D2},UE={null:[yl,_E]},WE={null:[A.asterisk,A.underscore]},QE={null:[]},zE=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:WE,contentInitial:LE,disable:QE,document:BE,flow:FE,flowInitial:vE,insideSpan:UE,string:PE,text:HE},Symbol.toStringTag,{value:"Module"}));function Ta(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function KE(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){var i=!1;try{i=this instanceof r}catch{}return i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var rs={exports:{}},Za,Uf;function qE(){if(Uf)return Za;Uf=1;var e=1e3,t=e*60,n=t*60,r=n*24,i=r*7,u=r*365.25;Za=function(c,d){d=d||{};var f=typeof c;if(f==="string"&&c.length>0)return s(c);if(f==="number"&&isFinite(c))return d.long?o(c):a(c);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(c))};function s(c){if(c=String(c),!(c.length>100)){var d=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(c);if(d){var f=parseFloat(d[1]),h=(d[2]||"ms").toLowerCase();switch(h){case"years":case"year":case"yrs":case"yr":case"y":return f*u;case"weeks":case"week":case"w":return f*i;case"days":case"day":case"d":return f*r;case"hours":case"hour":case"hrs":case"hr":case"h":return f*n;case"minutes":case"minute":case"mins":case"min":case"m":return f*t;case"seconds":case"second":case"secs":case"sec":case"s":return f*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return f;default:return}}}}function a(c){var d=Math.abs(c);return d>=r?Math.round(c/r)+"d":d>=n?Math.round(c/n)+"h":d>=t?Math.round(c/t)+"m":d>=e?Math.round(c/e)+"s":c+"ms"}function o(c){var d=Math.abs(c);return d>=r?l(c,d,r,"day"):d>=n?l(c,d,n,"hour"):d>=t?l(c,d,t,"minute"):d>=e?l(c,d,e,"second"):c+" ms"}function l(c,d,f,h){var m=d>=f*1.5;return Math.round(c/f)+" "+h+(m?"s":"")}return Za}var Xa,Wf;function YE(){if(Wf)return Xa;Wf=1;function e(t){r.debug=r,r.default=r,r.coerce=l,r.disable=a,r.enable=u,r.enabled=o,r.humanize=qE(),r.destroy=c,Object.keys(t).forEach(d=>{r[d]=t[d]}),r.names=[],r.skips=[],r.formatters={};function n(d){let f=0;for(let h=0;h<d.length;h++)f=(f<<5)-f+d.charCodeAt(h),f|=0;return r.colors[Math.abs(f)%r.colors.length]}r.selectColor=n;function r(d){let f,h=null,m,b;function T(...E){if(!T.enabled)return;const O=T,w=Number(new Date),L=w-(f||w);O.diff=L,O.prev=f,O.curr=w,f=w,E[0]=r.coerce(E[0]),typeof E[0]!="string"&&E.unshift("%O");let _=0;E[0]=E[0].replace(/%([a-zA-Z%])/g,(B,G)=>{if(B==="%%")return"%";_++;const M=r.formatters[G];if(typeof M=="function"){const S=E[_];B=M.call(O,S),E.splice(_,1),_--}return B}),r.formatArgs.call(O,E),(O.log||r.log).apply(O,E)}return T.namespace=d,T.useColors=r.useColors(),T.color=r.selectColor(d),T.extend=i,T.destroy=r.destroy,Object.defineProperty(T,"enabled",{enumerable:!0,configurable:!1,get:()=>h!==null?h:(m!==r.namespaces&&(m=r.namespaces,b=r.enabled(d)),b),set:E=>{h=E}}),typeof r.init=="function"&&r.init(T),T}function i(d,f){const h=r(this.namespace+(typeof f>"u"?":":f)+d);return h.log=this.log,h}function u(d){r.save(d),r.namespaces=d,r.names=[],r.skips=[];const f=(typeof d=="string"?d:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const h of f)h[0]==="-"?r.skips.push(h.slice(1)):r.names.push(h)}function s(d,f){let h=0,m=0,b=-1,T=0;for(;h<d.length;)if(m<f.length&&(f[m]===d[h]||f[m]==="*"))f[m]==="*"?(b=m,T=h,m++):(h++,m++);else if(b!==-1)m=b+1,T++,h=T;else return!1;for(;m<f.length&&f[m]==="*";)m++;return m===f.length}function a(){const d=[...r.names,...r.skips.map(f=>"-"+f)].join(",");return r.enable(""),d}function o(d){for(const f of r.skips)if(s(d,f))return!1;for(const f of r.names)if(s(d,f))return!0;return!1}function l(d){return d instanceof Error?d.stack||d.message:d}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}return Xa=e,Xa}var Qf;function GE(){return Qf||(Qf=1,(function(e,t){var n={};t.formatArgs=i,t.save=u,t.load=s,t.useColors=r,t.storage=a(),t.destroy=(()=>{let l=!1;return()=>{l||(l=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function r(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let l;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(l=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(l[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function i(l){if(l[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+l[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const c="color: "+this.color;l.splice(1,0,c,"color: inherit");let d=0,f=0;l[0].replace(/%[a-zA-Z%]/g,h=>{h!=="%%"&&(d++,h==="%c"&&(f=d))}),l.splice(f,0,c)}t.log=console.debug||console.log||(()=>{});function u(l){try{l?t.storage.setItem("debug",l):t.storage.removeItem("debug")}catch{}}function s(){let l;try{l=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch{}return!l&&typeof process<"u"&&"env"in process&&(l=n.DEBUG),l}function a(){try{return localStorage}catch{}}e.exports=YE()(t);const{formatters:o}=e.exports;o.j=function(l){try{return JSON.stringify(l)}catch(c){return"[UnexpectedJSONParseError]: "+c.message}}})(rs,rs.exports)),rs.exports}var VE=GE();const JE=Ta(VE),lr=JE("micromark");function jE(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},u=[];let s=[],a=[],o=!0;const l={attempt:M(B),check:M(G),consume:L,enter:_,exit:I,interrupt:M(G,{interrupt:!0})},c={code:A.eof,containerState:{},defineSkip:E,events:[],now:T,parser:e,previous:A.eof,sliceSerialize:m,sliceStream:b,write:h};let d=t.tokenize.call(c,l),f;return t.resolveAll&&u.push(t),c;function h(U){return s=Lt(s,U),O(),s[s.length-1]!==A.eof?[]:(S(t,0),c.events=ya(u,c.events,c),c.events)}function m(U,j){return XE(b(U),j)}function b(U){return ZE(s,U)}function T(){const{_bufferIndex:U,_index:j,line:ee,column:se,offset:z}=r;return{_bufferIndex:U,_index:j,line:ee,column:se,offset:z}}function E(U){i[U.line]=U.column,Y(),lr("position: define skip: `%j`",r)}function O(){let U;for(;r._index<s.length;){const j=s[r._index];if(typeof j=="string")for(U=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===U&&r._bufferIndex<j.length;)w(j.charCodeAt(r._bufferIndex));else w(j)}}function w(U){D(o===!0,"expected character to be consumed"),o=void 0,lr("main: passing `%s` to %s",U,d&&d.name),f=U,D(typeof d=="function","expected state"),d=d(U)}function L(U){D(U===f,"expected given code to equal expected code"),lr("consume: `%s`",U),D(o===void 0,"expected code to not have been consumed: this might be because `return x(code)` instead of `return x` was used"),D(U===null?c.events.length===0||c.events[c.events.length-1][0]==="exit":c.events[c.events.length-1][0]==="enter","expected last token to be open"),$(U)?(r.line++,r.column=1,r.offset+=U===A.carriageReturnLineFeed?2:1,Y(),lr("position: after eol: `%j`",r)):U!==A.virtualSpace&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=U,o=!0}function _(U,j){const ee=j||{};return ee.type=U,ee.start=T(),D(typeof U=="string","expected string type"),D(U.length>0,"expected non-empty string"),lr("enter: `%s`",U),c.events.push(["enter",ee,c]),a.push(ee),ee}function I(U){D(typeof U=="string","expected string type"),D(U.length>0,"expected non-empty string");const j=a.pop();return D(j,"cannot close w/o open tokens"),j.end=T(),D(U===j.type,"expected exit token to match current token"),D(!(j.start._index===j.end._index&&j.start._bufferIndex===j.end._bufferIndex),"expected non-empty token (`"+U+"`)"),lr("exit: `%s`",j.type),c.events.push(["exit",j,c]),j}function B(U,j){S(U,j.from)}function G(U,j){j.restore()}function M(U,j){return ee;function ee(se,z,te){let we,k,fe,Re;return Array.isArray(se)?Ge(se):"tokenize"in se?Ge([se]):N(se);function N(Be){return Bn;function Bn(Ot){const ge=Ot!==null&&Be[Ot],Vt=Ot!==null&&Be.null,Kt=[...Array.isArray(ge)?ge:ge?[ge]:[],...Array.isArray(Vt)?Vt:Vt?[Vt]:[]];return Ge(Kt)(Ot)}}function Ge(Be){return we=Be,k=0,Be.length===0?(D(te,"expected `bogusState` to be given"),te):zt(Be[k])}function zt(Be){return Bn;function Bn(Ot){return Re=V(),fe=Be,Be.partial||(c.currentConstruct=Be),D(c.parser.constructs.disable.null,"expected `disable.null` to be populated"),Be.name&&c.parser.constructs.disable.null.includes(Be.name)?ln(Ot):Be.tokenize.call(j?Object.assign(Object.create(c),j):c,l,Si,ln)(Ot)}}function Si(Be){return D(Be===f,"expected code"),o=!0,U(fe,Re),z}function ln(Be){return D(Be===f,"expected code"),o=!0,Re.restore(),++k<we.length?zt(we[k]):te}}}function S(U,j){U.resolveAll&&!u.includes(U)&&u.push(U),U.resolve&&St(c.events,j,c.events.length-j,U.resolve(c.events.slice(j),c)),U.resolveTo&&(c.events=U.resolveTo(c.events,c)),D(U.partial||c.events.length===0||c.events[c.events.length-1][0]==="exit","expected last token to end")}function V(){const U=T(),j=c.previous,ee=c.currentConstruct,se=c.events.length,z=Array.from(a);return{from:se,restore:te};function te(){r=U,c.previous=j,c.currentConstruct=ee,c.events.length=se,a=z,Y(),lr("position: restore: `%j`",r)}}function Y(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function ZE(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,u=t.end._bufferIndex;let s;if(n===i)D(u>-1,"expected non-negative end buffer index"),D(r>-1,"expected non-negative start buffer index"),s=[e[n].slice(r,u)];else{if(s=e.slice(n,i),r>-1){const a=s[0];typeof a=="string"?s[0]=a.slice(r):(D(r===0,"expected `startBufferIndex` to be `0`"),s.shift())}u>0&&s.push(e[i].slice(0,u))}return s}function XE(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const u=e[n];let s;if(typeof u=="string")s=u;else switch(u){case A.carriageReturn:{s=An.cr;break}case A.lineFeed:{s=An.lf;break}case A.carriageReturnLineFeed:{s=An.cr+An.lf;break}case A.horizontalTab:{s=t?An.space:An.ht;break}case A.virtualSpace:{if(!t&&i)continue;s=An.space;break}default:D(typeof u=="number","expected number"),s=String.fromCharCode(u)}i=u===A.horizontalTab,r.push(s)}return r.join("")}function $E(e){const r={constructs:Qp([zE,...(e||{}).extensions||[]]),content:i(l2),defined:[],document:i(d2),flow:i(NE),lazy:{},string:i(OE),text:i(RE)};return r;function i(u){return s;function s(a){return jE(r,u,a)}}}function ey(e){for(;!Vp(e););return e}const zf=/[\0\t\n\r]/g;function ty(){let e=1,t="",n=!0,r;return i;function i(u,s,a){const o=[];let l,c,d,f,h;for(u=t+(typeof u=="string"?u.toString():new TextDecoder(s||void 0).decode(u)),d=0,t="",n&&(u.charCodeAt(0)===A.byteOrderMarker&&d++,n=void 0);d<u.length;){if(zf.lastIndex=d,l=zf.exec(u),f=l&&l.index!==void 0?l.index:u.length,h=u.charCodeAt(f),!l){t=u.slice(d);break}if(h===A.lf&&d===f&&r)o.push(A.carriageReturnLineFeed),r=void 0;else switch(r&&(o.push(A.carriageReturn),r=void 0),d<f&&(o.push(u.slice(d,f)),e+=f-d),h){case A.nul:{o.push(A.replacementCharacter),e++;break}case A.ht:{for(c=Math.ceil(e/J.tabSize)*J.tabSize,o.push(A.horizontalTab);e++<c;)o.push(A.virtualSpace);break}case A.lf:{o.push(A.lineFeed),e=1;break}default:r=!0,e=1}d=f+1}return a&&(r&&o.push(A.carriageReturn),t&&o.push(t),o.push(A.eof)),o}}const ny=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function em(e){return e.replace(ny,ry)}function ry(e,t,n){if(t)return t;if(n.charCodeAt(0)===A.numberSign){const i=n.charCodeAt(1),u=i===A.lowercaseX||i===A.uppercaseX;return zp(n.slice(u?2:1),u?J.numericBaseHexadecimal:J.numericBaseDecimal)}return Cc(n)||e}function qi(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Kf(e.position):"start"in e||"end"in e?Kf(e):"line"in e||"column"in e?Tl(e):""}function Tl(e){return qf(e&&e.line)+":"+qf(e&&e.column)}function Kf(e){return Tl(e&&e.start)+"-"+Tl(e&&e.end)}function qf(e){return e&&typeof e=="number"?e:1}const tm={}.hasOwnProperty;function iy(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),uy(n)(ey($E(n).document().write(ty()(e,t,!0))))}function uy(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(Ii),autolinkProtocol:M,autolinkEmail:M,atxHeading:u(es),blockQuote:u(Ot),characterEscape:M,characterReference:M,codeFenced:u(ge),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:u(ge,s),codeText:u(Vt,s),codeTextData:M,data:M,codeFlowValue:M,definition:u(Kt),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:u($u),hardBreakEscape:u(ts),hardBreakTrailing:u(ts),htmlFlow:u(ns,s),htmlFlowData:M,htmlText:u(ns,s),htmlTextData:M,image:u(Ga),label:s,link:u(Ii),listItem:u(cn),listItemValue:f,listOrdered:u(et,d),listUnordered:u(et),paragraph:u(Ue),reference:N,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:u(es),strong:u(st),thematicBreak:u(ct)},exit:{atxHeading:o(),atxHeadingSequence:_,autolink:o(),autolinkEmail:Bn,autolinkProtocol:Be,blockQuote:o(),characterEscapeValue:S,characterReferenceMarkerHexadecimal:zt,characterReferenceMarkerNumeric:zt,characterReferenceValue:Si,characterReference:ln,codeFenced:o(T),codeFencedFence:b,codeFencedFenceInfo:h,codeFencedFenceMeta:m,codeFlowValue:S,codeIndented:o(E),codeText:o(ee),codeTextData:S,data:S,definition:o(),definitionDestinationString:L,definitionLabelString:O,definitionTitleString:w,emphasis:o(),hardBreakEscape:o(Y),hardBreakTrailing:o(Y),htmlFlow:o(U),htmlFlowData:S,htmlText:o(j),htmlTextData:S,image:o(z),label:we,labelText:te,lineEnding:V,link:o(se),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:Ge,resourceDestinationString:k,resourceTitleString:fe,resource:Re,setextHeading:o(G),setextHeadingLineSequence:B,setextHeadingText:I,strong:o(),thematicBreak:o()}};nm(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(F){let P={type:"root",children:[]};const X={stack:[P],tokenStack:[],config:t,enter:a,exit:l,buffer:s,resume:c,data:n},ie=[];let be=-1;for(;++be<F.length;)if(F[be][1].type===g.listOrdered||F[be][1].type===g.listUnordered)if(F[be][0]==="enter")ie.push(be);else{const dt=ie.pop();D(typeof dt=="number","expected list to be open"),be=i(F,dt,be)}for(be=-1;++be<F.length;){const dt=t[F[be][0]];tm.call(dt,F[be][1].type)&&dt[F[be][1].type].call(Object.assign({sliceSerialize:F[be][2].sliceSerialize},X),F[be][1])}if(X.tokenStack.length>0){const dt=X.tokenStack[X.tokenStack.length-1];(dt[1]||Yf).call(X,void 0,dt[0])}for(P.position={start:Ln(F.length>0?F[0][1].start:{line:1,column:1,offset:0}),end:Ln(F.length>0?F[F.length-2][1].end:{line:1,column:1,offset:0})},be=-1;++be<t.transforms.length;)P=t.transforms[be](P)||P;return P}function i(F,P,X){let ie=P-1,be=-1,dt=!1,or,dn,wi,Ni;for(;++ie<=X;){const Tt=F[ie];switch(Tt[1].type){case g.listUnordered:case g.listOrdered:case g.blockQuote:{Tt[0]==="enter"?be++:be--,Ni=void 0;break}case g.lineEndingBlank:{Tt[0]==="enter"&&(or&&!Ni&&!be&&!wi&&(wi=ie),Ni=void 0);break}case g.linePrefix:case g.listItemValue:case g.listItemMarker:case g.listItemPrefix:case g.listItemPrefixWhitespace:break;default:Ni=void 0}if(!be&&Tt[0]==="enter"&&Tt[1].type===g.listItemPrefix||be===-1&&Tt[0]==="exit"&&(Tt[1].type===g.listUnordered||Tt[1].type===g.listOrdered)){if(or){let Qr=ie;for(dn=void 0;Qr--;){const fn=F[Qr];if(fn[1].type===g.lineEnding||fn[1].type===g.lineEndingBlank){if(fn[0]==="exit")continue;dn&&(F[dn][1].type=g.lineEndingBlank,dt=!0),fn[1].type=g.lineEnding,dn=Qr}else if(!(fn[1].type===g.linePrefix||fn[1].type===g.blockQuotePrefix||fn[1].type===g.blockQuotePrefixWhitespace||fn[1].type===g.blockQuoteMarker||fn[1].type===g.listItemIndent))break}wi&&(!dn||wi<dn)&&(or._spread=!0),or.end=Object.assign({},dn?F[dn][1].start:Tt[1].end),F.splice(dn||ie,0,["exit",or,Tt[2]]),ie++,X++}if(Tt[1].type===g.listItemPrefix){const Qr={type:"listItem",_spread:!1,start:Object.assign({},Tt[1].start),end:void 0};or=Qr,F.splice(ie,0,["enter",Qr,Tt[2]]),ie++,X++,wi=void 0,Ni=!0}}}return F[P][1]._spread=dt,X}function u(F,P){return X;function X(ie){a.call(this,F(ie),ie),P&&P.call(this,ie)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(F,P,X){const ie=this.stack[this.stack.length-1];D(ie,"expected `parent`"),D("children"in ie,"expected `parent`"),ie.children.push(F),this.stack.push(F),this.tokenStack.push([P,X||void 0]),F.position={start:Ln(P.start),end:void 0}}function o(F){return P;function P(X){F&&F.call(this,X),l.call(this,X)}}function l(F,P){const X=this.stack.pop();D(X,"expected `node`");const ie=this.tokenStack.pop();if(ie)ie[0].type!==F.type&&(P?P.call(this,F,ie[0]):(ie[1]||Yf).call(this,F,ie[0]));else throw new Error("Cannot close `"+F.type+"` ("+qi({start:F.start,end:F.end})+"): it’s not open");D(X.type!=="fragment","unexpected fragment `exit`ed"),D(X.position,"expected `position` to be defined"),X.position.end=Ln(F.end)}function c(){return Tc(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(F){if(this.data.expectingFirstListItemValue){const P=this.stack[this.stack.length-2];D(P,"expected nodes on stack"),D(P.type==="list","expected list on stack"),P.start=Number.parseInt(this.sliceSerialize(F),J.numericBaseDecimal),this.data.expectingFirstListItemValue=void 0}}function h(){const F=this.resume(),P=this.stack[this.stack.length-1];D(P,"expected node on stack"),D(P.type==="code","expected code on stack"),P.lang=F}function m(){const F=this.resume(),P=this.stack[this.stack.length-1];D(P,"expected node on stack"),D(P.type==="code","expected code on stack"),P.meta=F}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){const F=this.resume(),P=this.stack[this.stack.length-1];D(P,"expected node on stack"),D(P.type==="code","expected code on stack"),P.value=F.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const F=this.resume(),P=this.stack[this.stack.length-1];D(P,"expected node on stack"),D(P.type==="code","expected code on stack"),P.value=F.replace(/(\r?\n|\r)$/g,"")}function O(F){const P=this.resume(),X=this.stack[this.stack.length-1];D(X,"expected node on stack"),D(X.type==="definition","expected definition on stack"),X.label=P,X.identifier=qt(this.sliceSerialize(F)).toLowerCase()}function w(){const F=this.resume(),P=this.stack[this.stack.length-1];D(P,"expected node on stack"),D(P.type==="definition","expected definition on stack"),P.title=F}function L(){const F=this.resume(),P=this.stack[this.stack.length-1];D(P,"expected node on stack"),D(P.type==="definition","expected definition on stack"),P.url=F}function _(F){const P=this.stack[this.stack.length-1];if(D(P,"expected node on stack"),D(P.type==="heading","expected heading on stack"),!P.depth){const X=this.sliceSerialize(F).length;D(X===1||X===2||X===3||X===4||X===5||X===6,"expected `depth` between `1` and `6`"),P.depth=X}}function I(){this.data.setextHeadingSlurpLineEnding=!0}function B(F){const P=this.stack[this.stack.length-1];D(P,"expected node on stack"),D(P.type==="heading","expected heading on stack"),P.depth=this.sliceSerialize(F).codePointAt(0)===A.equalsTo?1:2}function G(){this.data.setextHeadingSlurpLineEnding=void 0}function M(F){const P=this.stack[this.stack.length-1];D(P,"expected node on stack"),D("children"in P,"expected parent on stack");const X=P.children;let ie=X[X.length-1];(!ie||ie.type!=="text")&&(ie=Fe(),ie.position={start:Ln(F.start),end:void 0},X.push(ie)),this.stack.push(ie)}function S(F){const P=this.stack.pop();D(P,"expected a `node` to be on the stack"),D("value"in P,"expected a `literal` to be on the stack"),D(P.position,"expected `node` to have an open position"),P.value+=this.sliceSerialize(F),P.position.end=Ln(F.end)}function V(F){const P=this.stack[this.stack.length-1];if(D(P,"expected `node`"),this.data.atHardBreak){D("children"in P,"expected `parent`");const X=P.children[P.children.length-1];D(X.position,"expected tail to have a starting position"),X.position.end=Ln(F.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(P.type)&&(M.call(this,F),S.call(this,F))}function Y(){this.data.atHardBreak=!0}function U(){const F=this.resume(),P=this.stack[this.stack.length-1];D(P,"expected node on stack"),D(P.type==="html","expected html on stack"),P.value=F}function j(){const F=this.resume(),P=this.stack[this.stack.length-1];D(P,"expected node on stack"),D(P.type==="html","expected html on stack"),P.value=F}function ee(){const F=this.resume(),P=this.stack[this.stack.length-1];D(P,"expected node on stack"),D(P.type==="inlineCode","expected inline code on stack"),P.value=F}function se(){const F=this.stack[this.stack.length-1];if(D(F,"expected node on stack"),D(F.type==="link","expected link on stack"),this.data.inReference){const P=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=P,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function z(){const F=this.stack[this.stack.length-1];if(D(F,"expected node on stack"),D(F.type==="image","expected image on stack"),this.data.inReference){const P=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=P,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function te(F){const P=this.sliceSerialize(F),X=this.stack[this.stack.length-2];D(X,"expected ancestor on stack"),D(X.type==="image"||X.type==="link","expected image or link on stack"),X.label=em(P),X.identifier=qt(P).toLowerCase()}function we(){const F=this.stack[this.stack.length-1];D(F,"expected node on stack"),D(F.type==="fragment","expected fragment on stack");const P=this.resume(),X=this.stack[this.stack.length-1];if(D(X,"expected node on stack"),D(X.type==="image"||X.type==="link","expected image or link on stack"),this.data.inReference=!0,X.type==="link"){const ie=F.children;X.children=ie}else X.alt=P}function k(){const F=this.resume(),P=this.stack[this.stack.length-1];D(P,"expected node on stack"),D(P.type==="image"||P.type==="link","expected image or link on stack"),P.url=F}function fe(){const F=this.resume(),P=this.stack[this.stack.length-1];D(P,"expected node on stack"),D(P.type==="image"||P.type==="link","expected image or link on stack"),P.title=F}function Re(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function Ge(F){const P=this.resume(),X=this.stack[this.stack.length-1];D(X,"expected node on stack"),D(X.type==="image"||X.type==="link","expected image reference or link reference on stack"),X.label=P,X.identifier=qt(this.sliceSerialize(F)).toLowerCase(),this.data.referenceType="full"}function zt(F){D(F.type==="characterReferenceMarkerNumeric"||F.type==="characterReferenceMarkerHexadecimal"),this.data.characterReferenceType=F.type}function Si(F){const P=this.sliceSerialize(F),X=this.data.characterReferenceType;let ie;if(X)ie=zp(P,X===g.characterReferenceMarkerNumeric?J.numericBaseDecimal:J.numericBaseHexadecimal),this.data.characterReferenceType=void 0;else{const dt=Cc(P);D(dt!==!1,"expected reference to decode"),ie=dt}const be=this.stack[this.stack.length-1];D(be,"expected `node`"),D("value"in be,"expected `node.value`"),be.value+=ie}function ln(F){const P=this.stack.pop();D(P,"expected `node`"),D(P.position,"expected `node.position`"),P.position.end=Ln(F.end)}function Be(F){S.call(this,F);const P=this.stack[this.stack.length-1];D(P,"expected node on stack"),D(P.type==="link","expected link on stack"),P.url=this.sliceSerialize(F)}function Bn(F){S.call(this,F);const P=this.stack[this.stack.length-1];D(P,"expected node on stack"),D(P.type==="link","expected link on stack"),P.url="mailto:"+this.sliceSerialize(F)}function Ot(){return{type:"blockquote",children:[]}}function ge(){return{type:"code",lang:null,meta:null,value:""}}function Vt(){return{type:"inlineCode",value:""}}function Kt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function $u(){return{type:"emphasis",children:[]}}function es(){return{type:"heading",depth:0,children:[]}}function ts(){return{type:"break"}}function ns(){return{type:"html",value:""}}function Ga(){return{type:"image",title:null,url:"",alt:null}}function Ii(){return{type:"link",title:null,url:"",children:[]}}function et(F){return{type:"list",ordered:F.type==="listOrdered",start:null,spread:F._spread,children:[]}}function cn(F){return{type:"listItem",spread:F._spread,checked:null,children:[]}}function Ue(){return{type:"paragraph",children:[]}}function st(){return{type:"strong",children:[]}}function Fe(){return{type:"text",value:""}}function ct(){return{type:"thematicBreak"}}}function Ln(e){return{line:e.line,column:e.column,offset:e.offset}}function nm(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?nm(e,r):sy(e,r)}}function sy(e,t){let n;for(n in t)if(tm.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Yf(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+qi({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+qi({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+qi({start:t.start,end:t.end})+") is still open")}function Cl(e){const t=this;t.parser=n;function n(r){return iy(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}const Gf={}.hasOwnProperty;function ay(e,t){const n=t||{};function r(i,...u){let s=r.invalid;const a=r.handlers;if(i&&Gf.call(i,e)){const o=String(i[e]);s=Gf.call(a,o)?a[o]:r.unknown}if(s)return s.call(this,i,...u)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const oy={}.hasOwnProperty;function rm(e,t){let n=-1,r;if(t.extensions)for(;++n<t.extensions.length;)rm(e,t.extensions[n]);for(r in t)if(oy.call(t,r))switch(r){case"extensions":break;case"unsafe":{Vf(e[r],t[r]);break}case"join":{Vf(e[r],t[r]);break}case"handlers":{ly(e[r],t[r]);break}default:e.options[r]=t[r]}return e}function Vf(e,t){t&&e.push(...t)}function ly(e,t){t&&Object.assign(e,t)}function cy(e,t,n,r){const i=n.enter("blockquote"),u=n.createTracker(r);u.move("> "),u.shift(2);const s=n.indentLines(n.containerFlow(e,u.current()),dy);return i(),s}function dy(e,t,n){return">"+(n?"":" ")+e}function im(e,t){return Jf(e,t.inConstruct,!0)&&!Jf(e,t.notInConstruct,!1)}function Jf(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function jf(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
4
|
-
`&&im(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
5
|
-
|
|
1
|
+
var yf=e=>{throw TypeError(e)};var Tf=(e,t,n)=>t.has(e)||yf("Cannot "+n);var le=(e,t,n)=>(Tf(e,t,"read from private field"),n?n.call(e):t.get(e)),_e=(e,t,n)=>t.has(e)?yf("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Pr=(e,t,n,r)=>(Tf(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var Bt=(function(e){return e.docTypeError="docTypeError",e.contextNotFound="contextNotFound",e.timerNotFound="timerNotFound",e.ctxCallOutOfScope="ctxCallOutOfScope",e.createNodeInParserFail="createNodeInParserFail",e.stackOverFlow="stackOverFlow",e.parserMatchError="parserMatchError",e.serializerMatchError="serializerMatchError",e.getAtomFromSchemaFail="getAtomFromSchemaFail",e.expectDomTypeError="expectDomTypeError",e.callCommandBeforeEditorView="callCommandBeforeEditorView",e.missingRootElement="missingRootElement",e.missingNodeInSchema="missingNodeInSchema",e.missingMarkInSchema="missingMarkInSchema",e.ctxNotBind="ctxNotBind",e.missingYjsDoc="missingYjsDoc",e})({}),Lt=class extends Error{constructor(e,t){super(t),this.name="MilkdownError",this.code=e}},kb=(e,t)=>typeof t=="function"?"[Function]":t,ca=e=>JSON.stringify(e,kb);function Ib(e){return new Lt(Bt.docTypeError,`Doc type error, unsupported type: ${ca(e)}`)}function Sb(e){return new Lt(Bt.contextNotFound,`Context "${e}" not found, do you forget to inject it?`)}function wb(e){return new Lt(Bt.timerNotFound,`Timer "${e}" not found, do you forget to record it?`)}function da(){return new Lt(Bt.ctxCallOutOfScope,"Should not call a context out of the plugin.")}function Nb(e,t,n){const r=`Cannot create node for ${"name"in e?e.name:e}`,i=s=>{if(s==null)return"null";if(Array.isArray(s))return`[${s.map(i).join(", ")}]`;if(typeof s=="object")return"toJSON"in s&&typeof s.toJSON=="function"?JSON.stringify(s.toJSON()):"spec"in s?JSON.stringify(s.spec):JSON.stringify(s);if(typeof s=="string"||typeof s=="number"||typeof s=="boolean")return JSON.stringify(s);if(typeof s=="function")return`[Function: ${s.name||"anonymous"}]`;try{return String(s)}catch{return"[Unserializable]"}},u=[["[Description]",r],["[Attributes]",t],["[Content]",(n??[]).map(s=>s?typeof s=="object"&&"type"in s?`${s}`:i(s):"null")]].reduce((s,[a,o])=>{const l=`${a}: ${i(o)}.`;return s.concat(l)},[]);return new Lt(Bt.createNodeInParserFail,u.join(`
|
|
2
|
+
`))}function Sp(){return new Lt(Bt.stackOverFlow,"Stack over flow, cannot pop on an empty stack.")}function Db(e){return new Lt(Bt.parserMatchError,`Cannot match target parser for node: ${ca(e)}.`)}function _b(e){return new Lt(Bt.serializerMatchError,`Cannot match target serializer for node: ${ca(e)}.`)}function en(e){return new Lt(Bt.expectDomTypeError,`Expect to be a dom, but get: ${ca(e)}.`)}function Ua(){return new Lt(Bt.callCommandBeforeEditorView,"You're trying to call a command before editor view initialized, make sure to get commandManager from ctx after editor view has been initialized")}function Ob(e){return new Lt(Bt.missingNodeInSchema,`Missing node in schema, milkdown cannot find "${e}" in schema.`)}function Rb(e){return new Lt(Bt.missingMarkInSchema,`Missing mark in schema, milkdown cannot find "${e}" in schema.`)}var wp=class{constructor(){this.sliceMap=new Map,this.get=e=>{const t=typeof e=="string"?[...this.sliceMap.values()].find(n=>n.type.name===e):this.sliceMap.get(e.id);if(!t)throw Sb(typeof e=="string"?e:e.name);return t},this.remove=e=>{const t=typeof e=="string"?[...this.sliceMap.values()].find(n=>n.type.name===e):this.sliceMap.get(e.id);t&&this.sliceMap.delete(t.type.id)},this.has=e=>typeof e=="string"?[...this.sliceMap.values()].some(t=>t.type.name===e):this.sliceMap.has(e.id)}},Mb=class{#t=[];#e;#r=()=>{this.#t.forEach(t=>t(this.#e))};constructor(t,n,r){this.set=i=>{this.#e=i,this.#r()},this.get=()=>this.#e,this.update=i=>{this.#e=i(this.#e),this.#r()},this.type=r,this.#e=n,t.set(r.id,this)}on(t){return this.#t.push(t),()=>{this.#t=this.#t.filter(n=>n!==t)}}once(t){const n=this.on(r=>{t(r),n()});return n}off(t){this.#t=this.#t.filter(n=>n!==t)}offAll(){this.#t=[]}},Bb=class{constructor(e,t){this.id=Symbol(`Context-${t}`),this.name=t,this._defaultValue=e,this._typeInfo=()=>{throw da()}}create(e,t=this._defaultValue){return new Mb(e,t,this)}},fe=(e,t)=>new Bb(e,t),Lb=class{#t;#e;#r;#n=new Set;#a=new Set;#u=new Map;#i=new Map;constructor(e,t,n){this.read=()=>({metadata:this.#t,injectedSlices:[...this.#n].map(r=>({name:typeof r=="string"?r:r.name,value:this.#s(r)})),consumedSlices:[...this.#a].map(r=>({name:typeof r=="string"?r:r.name,value:this.#s(r)})),recordedTimers:[...this.#u].map(([r,{duration:i}])=>({name:r.name,duration:i,status:this.#o(r)})),waitTimers:[...this.#i].map(([r,{duration:i}])=>({name:r.name,duration:i,status:this.#o(r)}))}),this.onRecord=r=>{this.#u.set(r,{start:Date.now(),duration:0})},this.onClear=r=>{this.#u.delete(r)},this.onDone=r=>{const i=this.#u.get(r);i&&(i.duration=Date.now()-i.start)},this.onWait=(r,i)=>{const u=Date.now();i.finally(()=>{this.#i.set(r,{duration:Date.now()-u})}).catch(console.error)},this.onInject=r=>{this.#n.add(r)},this.onRemove=r=>{this.#n.delete(r)},this.onUse=r=>{this.#a.add(r)},this.#e=e,this.#r=t,this.#t=n}#s=e=>this.#e.get(e).get();#o=e=>this.#r.get(e).status},vb=class Np{#t;#e;#r;#n;constructor(t,n,r){this.produce=i=>i&&Object.keys(i).length?new Np(this.#t,this.#e,{...i}):this,this.inject=(i,u)=>{const s=i.create(this.#t.sliceMap);return u!=null&&s.set(u),this.#n?.onInject(i),this},this.remove=i=>(this.#t.remove(i),this.#n?.onRemove(i),this),this.record=i=>(i.create(this.#e.store),this.#n?.onRecord(i),this),this.clearTimer=i=>(this.#e.remove(i),this.#n?.onClear(i),this),this.isInjected=i=>this.#t.has(i),this.isRecorded=i=>this.#e.has(i),this.use=i=>(this.#n?.onUse(i),this.#t.get(i)),this.get=i=>this.use(i).get(),this.set=(i,u)=>this.use(i).set(u),this.update=(i,u)=>this.use(i).update(u),this.timer=i=>this.#e.get(i),this.done=i=>{this.timer(i).done(),this.#n?.onDone(i)},this.wait=i=>{const u=this.timer(i).start();return this.#n?.onWait(i,u),u},this.waitTimers=async i=>{await Promise.all(this.get(i).map(u=>this.wait(u)))},this.#t=t,this.#e=n,this.#r=r,r&&(this.#n=new Lb(t,n,r))}get meta(){return this.#r}get inspector(){return this.#n}},Pb=class{constructor(){this.store=new Map,this.get=e=>{const t=this.store.get(e.id);if(!t)throw wb(e.name);return t},this.remove=e=>{this.store.delete(e.id)},this.has=e=>this.store.has(e.id)}},Fb=class{#t=null;#e=null;#r;#n="pending";constructor(e,t){this.start=()=>(this.#t??=new Promise((n,r)=>{this.#e=i=>{i instanceof CustomEvent&&i.detail.id===this.#r&&(this.#n="resolved",this.#a(),i.stopImmediatePropagation(),n())},this.#u(()=>{this.#n==="pending"&&(this.#n="rejected"),this.#a(),r(new Error(`Timing ${this.type.name} timeout.`))}),this.#n="pending",addEventListener(this.type.name,this.#e)}),this.#t),this.done=()=>{const n=new CustomEvent(this.type.name,{detail:{id:this.#r}});dispatchEvent(n)},this.#r=Symbol(t.name),this.type=t,e.set(t.id,this)}get status(){return this.#n}#a=()=>{this.#e&&removeEventListener(this.type.name,this.#e)};#u=e=>{setTimeout(()=>{e()},this.type.timeout)}},Hb=class{constructor(e,t=3e3){this.create=n=>new Fb(n,this),this.id=Symbol(`Timer-${e}`),this.name=e,this.timeout=t}},tn=(e,t=3e3)=>new Hb(e,t);const Ub={};function dc(e,t){const n=Ub,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Dp(e,r,i)}function Dp(e,t,n){if(Wb(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Cf(e.children,t,n)}return Array.isArray(e)?Cf(e,t,n):""}function Cf(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Dp(e[i],t,n);return r.join("")}function Wb(e){return!!(e&&typeof e=="object")}const xf=document.createElement("i");function fc(e){const t="&"+e+";";xf.innerHTML=t;const n=xf.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function yt(e,t,n,r){const i=e.length;let u=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);u<r.length;)s=r.slice(u,u+1e4),s.unshift(t,0),e.splice(...s),u+=1e4,t+=1e4}function Dt(e,t){return e.length>0?(yt(e,e.length,0,t),e):t}const kf={}.hasOwnProperty;function _p(e){const t={};let n=-1;for(;++n<e.length;)Kb(t,e[n]);return t}function Kb(e,t){let n;for(n in t){const i=(kf.call(e,n)?e[n]:void 0)||(e[n]={}),u=t[n];let s;if(u)for(s in u){kf.call(i,s)||(i[s]=[]);const a=u[s];Qb(i[s],Array.isArray(a)?a:a?[a]:[])}}}function Qb(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);yt(e,0,0,r)}function Op(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Ht(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const rt=jn(/[A-Za-z]/),dt=jn(/[\dA-Za-z]/),Yb=jn(/[#-'*+\--9=?A-Z^-~]/);function Ns(e){return e!==null&&(e<32||e===127)}const ll=jn(/\d/),zb=jn(/[\dA-Fa-f]/),Gb=jn(/[!-/:-@[-`{-~]/);function X(e){return e!==null&&e<-2}function xe(e){return e!==null&&(e<0||e===32)}function de(e){return e===-2||e===-1||e===32}const fa=jn(new RegExp("\\p{P}|\\p{S}","u")),Cr=jn(/\s/);function jn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function he(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let u=0;return s;function s(o){return de(o)?(e.enter(n),a(o)):t(o)}function a(o){return de(o)&&u++<i?(e.consume(o),a):(e.exit(n),t(o))}}const Vb={tokenize:qb};function qb(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),he(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),u(a)}function u(a){const o=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=o),n=o,s(a)}function s(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return X(a)?(e.consume(a),e.exit("chunkText"),u):(e.consume(a),s)}}const Jb={tokenize:jb},If={tokenize:Zb};function jb(e){const t=this,n=[];let r=0,i,u,s;return a;function a(I){if(r<n.length){const R=n[r];return t.containerState=R[1],e.attempt(R[0].continuation,o,l)(I)}return l(I)}function o(I){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&N();const R=t.events.length;let w=R,k;for(;w--;)if(t.events[w][0]==="exit"&&t.events[w][1].type==="chunkFlow"){k=t.events[w][1].end;break}g(r);let O=R;for(;O<t.events.length;)t.events[O][1].end={...k},O++;return yt(t.events,w+1,0,t.events.slice(R)),t.events.length=O,l(I)}return a(I)}function l(I){if(r===n.length){if(!i)return f(I);if(i.currentConstruct&&i.currentConstruct.concrete)return m(I);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(If,c,d)(I)}function c(I){return i&&N(),g(r),f(I)}function d(I){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,m(I)}function f(I){return t.containerState={},e.attempt(If,p,m)(I)}function p(I){return r++,n.push([t.currentConstruct,t.containerState]),f(I)}function m(I){if(I===null){i&&N(),g(0),e.consume(I);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:u}),A(I)}function A(I){if(I===null){E(e.exit("chunkFlow"),!0),g(0),e.consume(I);return}return X(I)?(e.consume(I),E(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(I),A)}function E(I,R){const w=t.sliceStream(I);if(R&&w.push(null),I.previous=u,u&&(u.next=I),u=I,i.defineSkip(I.start),i.write(w),t.parser.lazy[I.start.line]){let k=i.events.length;for(;k--;)if(i.events[k][1].start.offset<s&&(!i.events[k][1].end||i.events[k][1].end.offset>s))return;const O=t.events.length;let Q=O,_,x;for(;Q--;)if(t.events[Q][0]==="exit"&&t.events[Q][1].type==="chunkFlow"){if(_){x=t.events[Q][1].end;break}_=!0}for(g(r),k=O;k<t.events.length;)t.events[k][1].end={...x},k++;yt(t.events,Q+1,0,t.events.slice(O)),t.events.length=k}}function g(I){let R=n.length;for(;R-- >I;){const w=n[R];t.containerState=w[1],w[0].exit.call(t,e)}n.length=I}function N(){i.write([null]),u=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Zb(e,t,n){return he(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function $r(e){if(e===null||xe(e)||Cr(e))return 1;if(fa(e))return 2}function ha(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const u=e[i].resolveAll;u&&!r.includes(u)&&(t=u(t,n),r.push(u))}return t}const cl={name:"attention",resolveAll:Xb,tokenize:$b};function Xb(e,t){let n=-1,r,i,u,s,a,o,l,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;o=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},f={...e[n][1].start};Sf(d,-o),Sf(f,o),s={type:o>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},a={type:o>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},u={type:o>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:o>1?"strong":"emphasis",start:{...s.start},end:{...a.end}},e[r][1].end={...s.start},e[n][1].start={...a.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Dt(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=Dt(l,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",u,t]]),l=Dt(l,ha(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Dt(l,[["exit",u,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,l=Dt(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,yt(e,r-1,n-r+3,l),n=r+l.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function $b(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=$r(r);let u;return s;function s(o){return u=o,e.enter("attentionSequence"),a(o)}function a(o){if(o===u)return e.consume(o),a;const l=e.exit("attentionSequence"),c=$r(o),d=!c||c===2&&i||n.includes(o),f=!i||i===2&&c||n.includes(r);return l._open=!!(u===42?d:d&&(i||!f)),l._close=!!(u===42?f:f&&(c||!d)),t(o)}}function Sf(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const e2={name:"autolink",tokenize:t2};function t2(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(p){return rt(p)?(e.consume(p),s):p===64?n(p):l(p)}function s(p){return p===43||p===45||p===46||dt(p)?(r=1,a(p)):l(p)}function a(p){return p===58?(e.consume(p),r=0,o):(p===43||p===45||p===46||dt(p))&&r++<32?(e.consume(p),a):(r=0,l(p))}function o(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Ns(p)?n(p):(e.consume(p),o)}function l(p){return p===64?(e.consume(p),c):Yb(p)?(e.consume(p),l):n(p)}function c(p){return dt(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),r=0,c):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):f(p)}function f(p){if((p===45||dt(p))&&r++<63){const m=p===45?f:d;return e.consume(p),m}return n(p)}}const Su={partial:!0,tokenize:n2};function n2(e,t,n){return r;function r(u){return de(u)?he(e,i,"linePrefix")(u):i(u)}function i(u){return u===null||X(u)?t(u):n(u)}}const Rp={continuation:{tokenize:i2},exit:u2,name:"blockQuote",tokenize:r2};function r2(e,t,n){const r=this;return i;function i(s){if(s===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),u}return n(s)}function u(s){return de(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function i2(e,t,n){const r=this;return i;function i(s){return de(s)?he(e,u,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):u(s)}function u(s){return e.attempt(Rp,t,n)(s)}}function u2(e){e.exit("blockQuote")}const Mp={name:"characterEscape",tokenize:s2};function s2(e,t,n){return r;function r(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),i}function i(u){return Gb(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(u)}}const Bp={name:"characterReference",tokenize:a2};function a2(e,t,n){const r=this;let i=0,u,s;return a;function a(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),o}function o(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),u=31,s=dt,c(d))}function l(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,s=zb,c):(e.enter("characterReferenceValue"),u=7,s=ll,c(d))}function c(d){if(d===59&&i){const f=e.exit("characterReferenceValue");return s===dt&&!fc(r.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(d)&&i++<u?(e.consume(d),c):n(d)}}const wf={partial:!0,tokenize:l2},Nf={concrete:!0,name:"codeFenced",tokenize:o2};function o2(e,t,n){const r=this,i={partial:!0,tokenize:w};let u=0,s=0,a;return o;function o(k){return l(k)}function l(k){const O=r.events[r.events.length-1];return u=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,a=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(k)}function c(k){return k===a?(s++,e.consume(k),c):s<3?n(k):(e.exit("codeFencedFenceSequence"),de(k)?he(e,d,"whitespace")(k):d(k))}function d(k){return k===null||X(k)?(e.exit("codeFencedFence"),r.interrupt?t(k):e.check(wf,A,R)(k)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(k))}function f(k){return k===null||X(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(k)):de(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),he(e,p,"whitespace")(k)):k===96&&k===a?n(k):(e.consume(k),f)}function p(k){return k===null||X(k)?d(k):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(k))}function m(k){return k===null||X(k)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(k)):k===96&&k===a?n(k):(e.consume(k),m)}function A(k){return e.attempt(i,R,E)(k)}function E(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),g}function g(k){return u>0&&de(k)?he(e,N,"linePrefix",u+1)(k):N(k)}function N(k){return k===null||X(k)?e.check(wf,A,R)(k):(e.enter("codeFlowValue"),I(k))}function I(k){return k===null||X(k)?(e.exit("codeFlowValue"),N(k)):(e.consume(k),I)}function R(k){return e.exit("codeFenced"),t(k)}function w(k,O,Q){let _=0;return x;function x(q){return k.enter("lineEnding"),k.consume(q),k.exit("lineEnding"),B}function B(q){return k.enter("codeFencedFence"),de(q)?he(k,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(q):P(q)}function P(q){return q===a?(k.enter("codeFencedFenceSequence"),G(q)):Q(q)}function G(q){return q===a?(_++,k.consume(q),G):_>=s?(k.exit("codeFencedFenceSequence"),de(q)?he(k,J,"whitespace")(q):J(q)):Q(q)}function J(q){return q===null||X(q)?(k.exit("codeFencedFence"),O(q)):Q(q)}}}function l2(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),u)}function u(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Wa={name:"codeIndented",tokenize:d2},c2={partial:!0,tokenize:f2};function d2(e,t,n){const r=this;return i;function i(l){return e.enter("codeIndented"),he(e,u,"linePrefix",5)(l)}function u(l){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?s(l):n(l)}function s(l){return l===null?o(l):X(l)?e.attempt(c2,s,o)(l):(e.enter("codeFlowValue"),a(l))}function a(l){return l===null||X(l)?(e.exit("codeFlowValue"),s(l)):(e.consume(l),a)}function o(l){return e.exit("codeIndented"),t(l)}}function f2(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):X(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):he(e,u,"linePrefix",5)(s)}function u(s){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):X(s)?i(s):n(s)}}const h2={name:"codeText",previous:m2,resolve:p2,tokenize:A2};function p2(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function m2(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function A2(e,t,n){let r=0,i,u;return s;function s(d){return e.enter("codeText"),e.enter("codeTextSequence"),a(d)}function a(d){return d===96?(e.consume(d),r++,a):(e.exit("codeTextSequence"),o(d))}function o(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),o):d===96?(u=e.enter("codeTextSequence"),i=0,c(d)):X(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),o):(e.enter("codeTextData"),l(d))}function l(d){return d===null||d===32||d===96||X(d)?(e.exit("codeTextData"),o(d)):(e.consume(d),l)}function c(d){return d===96?(e.consume(d),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(u.type="codeTextData",l(d))}}class g2{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const u=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&xi(this.left,r),u.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),xi(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),xi(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);xi(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);xi(this.left,n.reverse())}}}function xi(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Lp(e){const t={};let n=-1,r,i,u,s,a,o,l;const c=new g2(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(o=r[1]._tokenizer.events,u=0,u<o.length&&o[u][1].type==="lineEndingBlank"&&(u+=2),u<o.length&&o[u][1].type==="content"))for(;++u<o.length&&o[u][1].type!=="content";)o[u][1].type==="chunkText"&&(o[u][1]._isInFirstContentOfListItem=!0,u++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,b2(c,n)),n=t[n],l=!0);else if(r[1]._container){for(u=n,i=void 0;u--;)if(s=c.get(u),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=u);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...c.get(i)[1].start},a=c.slice(i,n),a.unshift(r),c.splice(i,n-i+1,a))}}return yt(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!l}function b2(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const u=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const a=s.events,o=[],l={};let c,d,f=-1,p=n,m=0,A=0;const E=[A];for(;p;){for(;e.get(++i)[1]!==p;);u.push(i),p._tokenizer||(c=r.sliceStream(p),p.next||c.push(null),d&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<a.length;)a[f][0]==="exit"&&a[f-1][0]==="enter"&&a[f][1].type===a[f-1][1].type&&a[f][1].start.line!==a[f][1].end.line&&(A=f+1,E.push(A),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):E.pop(),f=E.length;f--;){const g=a.slice(E[f],E[f+1]),N=u.pop();o.push([N,N+g.length-1]),e.splice(N,2,g)}for(o.reverse(),f=-1;++f<o.length;)l[m+o[f][0]]=m+o[f][1],m+=o[f][1]-o[f][0]-1;return l}const E2={resolve:T2,tokenize:C2},y2={partial:!0,tokenize:x2};function T2(e){return Lp(e),e}function C2(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?u(a):X(a)?e.check(y2,s,u)(a):(e.consume(a),i)}function u(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function s(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function x2(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),he(e,u,"linePrefix")}function u(s){if(s===null||X(s))return n(s);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function vp(e,t,n,r,i,u,s,a,o){const l=o||Number.POSITIVE_INFINITY;let c=0;return d;function d(g){return g===60?(e.enter(r),e.enter(i),e.enter(u),e.consume(g),e.exit(u),f):g===null||g===32||g===41||Ns(g)?n(g):(e.enter(r),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),A(g))}function f(g){return g===62?(e.enter(u),e.consume(g),e.exit(u),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===62?(e.exit("chunkString"),e.exit(a),f(g)):g===null||g===60||X(g)?n(g):(e.consume(g),g===92?m:p)}function m(g){return g===60||g===62||g===92?(e.consume(g),p):p(g)}function A(g){return!c&&(g===null||g===41||xe(g))?(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(r),t(g)):c<l&&g===40?(e.consume(g),c++,A):g===41?(e.consume(g),c--,A):g===null||g===32||g===40||Ns(g)?n(g):(e.consume(g),g===92?E:A)}function E(g){return g===40||g===41||g===92?(e.consume(g),A):A(g)}}function Pp(e,t,n,r,i,u){const s=this;let a=0,o;return l;function l(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(u),c}function c(p){return a>999||p===null||p===91||p===93&&!o||p===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?n(p):p===93?(e.exit(u),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):X(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||X(p)||a++>999?(e.exit("chunkString"),c(p)):(e.consume(p),o||(o=!de(p)),p===92?f:d)}function f(p){return p===91||p===92||p===93?(e.consume(p),a++,d):d(p)}}function Fp(e,t,n,r,i,u){let s;return a;function a(f){return f===34||f===39||f===40?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),s=f===40?41:f,o):n(f)}function o(f){return f===s?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):(e.enter(u),l(f))}function l(f){return f===s?(e.exit(u),o(s)):f===null?n(f):X(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),he(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(f){return f===s||f===null||X(f)?(e.exit("chunkString"),l(f)):(e.consume(f),f===92?d:c)}function d(f){return f===s||f===92?(e.consume(f),c):c(f)}}function Fi(e,t){let n;return r;function r(i){return X(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):de(i)?he(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const k2={name:"definition",tokenize:S2},I2={partial:!0,tokenize:w2};function S2(e,t,n){const r=this;let i;return u;function u(p){return e.enter("definition"),s(p)}function s(p){return Pp.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=Ht(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),o):n(p)}function o(p){return xe(p)?Fi(e,l)(p):l(p)}function l(p){return vp(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return e.attempt(I2,d,d)(p)}function d(p){return de(p)?he(e,f,"whitespace")(p):f(p)}function f(p){return p===null||X(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function w2(e,t,n){return r;function r(a){return xe(a)?Fi(e,i)(a):n(a)}function i(a){return Fp(e,u,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function u(a){return de(a)?he(e,s,"whitespace")(a):s(a)}function s(a){return a===null||X(a)?t(a):n(a)}}const N2={name:"hardBreakEscape",tokenize:D2};function D2(e,t,n){return r;function r(u){return e.enter("hardBreakEscape"),e.consume(u),i}function i(u){return X(u)?(e.exit("hardBreakEscape"),t(u)):n(u)}}const _2={name:"headingAtx",resolve:O2,tokenize:R2};function O2(e,t){let n=e.length-2,r=3,i,u;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},u={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},yt(e,r,n-r+1,[["enter",i,t],["enter",u,t],["exit",u,t],["exit",i,t]])),e}function R2(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),u(c)}function u(c){return e.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&r++<6?(e.consume(c),s):c===null||xe(c)?(e.exit("atxHeadingSequence"),a(c)):n(c)}function a(c){return c===35?(e.enter("atxHeadingSequence"),o(c)):c===null||X(c)?(e.exit("atxHeading"),t(c)):de(c)?he(e,a,"whitespace")(c):(e.enter("atxHeadingText"),l(c))}function o(c){return c===35?(e.consume(c),o):(e.exit("atxHeadingSequence"),a(c))}function l(c){return c===null||c===35||xe(c)?(e.exit("atxHeadingText"),a(c)):(e.consume(c),l)}}const M2=["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"],Df=["pre","script","style","textarea"],B2={concrete:!0,name:"htmlFlow",resolveTo:P2,tokenize:F2},L2={partial:!0,tokenize:U2},v2={partial:!0,tokenize:H2};function P2(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function F2(e,t,n){const r=this;let i,u,s,a,o;return l;function l(S){return c(S)}function c(S){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(S),d}function d(S){return S===33?(e.consume(S),f):S===47?(e.consume(S),u=!0,A):S===63?(e.consume(S),i=3,r.interrupt?t:C):rt(S)?(e.consume(S),s=String.fromCharCode(S),E):n(S)}function f(S){return S===45?(e.consume(S),i=2,p):S===91?(e.consume(S),i=5,a=0,m):rt(S)?(e.consume(S),i=4,r.interrupt?t:C):n(S)}function p(S){return S===45?(e.consume(S),r.interrupt?t:C):n(S)}function m(S){const tt="CDATA[";return S===tt.charCodeAt(a++)?(e.consume(S),a===tt.length?r.interrupt?t:P:m):n(S)}function A(S){return rt(S)?(e.consume(S),s=String.fromCharCode(S),E):n(S)}function E(S){if(S===null||S===47||S===62||xe(S)){const tt=S===47,Pt=s.toLowerCase();return!tt&&!u&&Df.includes(Pt)?(i=1,r.interrupt?t(S):P(S)):M2.includes(s.toLowerCase())?(i=6,tt?(e.consume(S),g):r.interrupt?t(S):P(S)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(S):u?N(S):I(S))}return S===45||dt(S)?(e.consume(S),s+=String.fromCharCode(S),E):n(S)}function g(S){return S===62?(e.consume(S),r.interrupt?t:P):n(S)}function N(S){return de(S)?(e.consume(S),N):x(S)}function I(S){return S===47?(e.consume(S),x):S===58||S===95||rt(S)?(e.consume(S),R):de(S)?(e.consume(S),I):x(S)}function R(S){return S===45||S===46||S===58||S===95||dt(S)?(e.consume(S),R):w(S)}function w(S){return S===61?(e.consume(S),k):de(S)?(e.consume(S),w):I(S)}function k(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),o=S,O):de(S)?(e.consume(S),k):Q(S)}function O(S){return S===o?(e.consume(S),o=null,_):S===null||X(S)?n(S):(e.consume(S),O)}function Q(S){return S===null||S===34||S===39||S===47||S===60||S===61||S===62||S===96||xe(S)?w(S):(e.consume(S),Q)}function _(S){return S===47||S===62||de(S)?I(S):n(S)}function x(S){return S===62?(e.consume(S),B):n(S)}function B(S){return S===null||X(S)?P(S):de(S)?(e.consume(S),B):n(S)}function P(S){return S===45&&i===2?(e.consume(S),se):S===60&&i===1?(e.consume(S),W):S===62&&i===4?(e.consume(S),oe):S===63&&i===3?(e.consume(S),C):S===93&&i===5?(e.consume(S),ke):X(S)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(L2,Ne,G)(S)):S===null||X(S)?(e.exit("htmlFlowData"),G(S)):(e.consume(S),P)}function G(S){return e.check(v2,J,Ne)(S)}function J(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),q}function q(S){return S===null||X(S)?G(S):(e.enter("htmlFlowData"),P(S))}function se(S){return S===45?(e.consume(S),C):P(S)}function W(S){return S===47?(e.consume(S),s="",V):P(S)}function V(S){if(S===62){const tt=s.toLowerCase();return Df.includes(tt)?(e.consume(S),oe):P(S)}return rt(S)&&s.length<8?(e.consume(S),s+=String.fromCharCode(S),V):P(S)}function ke(S){return S===93?(e.consume(S),C):P(S)}function C(S){return S===62?(e.consume(S),oe):S===45&&i===2?(e.consume(S),C):P(S)}function oe(S){return S===null||X(S)?(e.exit("htmlFlowData"),Ne(S)):(e.consume(S),oe)}function Ne(S){return e.exit("htmlFlow"),t(S)}}function H2(e,t,n){const r=this;return i;function i(s){return X(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),u):n(s)}function u(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function U2(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Su,t,n)}}const W2={name:"htmlText",tokenize:K2};function K2(e,t,n){const r=this;let i,u,s;return a;function a(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),o}function o(C){return C===33?(e.consume(C),l):C===47?(e.consume(C),w):C===63?(e.consume(C),I):rt(C)?(e.consume(C),Q):n(C)}function l(C){return C===45?(e.consume(C),c):C===91?(e.consume(C),u=0,m):rt(C)?(e.consume(C),N):n(C)}function c(C){return C===45?(e.consume(C),p):n(C)}function d(C){return C===null?n(C):C===45?(e.consume(C),f):X(C)?(s=d,W(C)):(e.consume(C),d)}function f(C){return C===45?(e.consume(C),p):d(C)}function p(C){return C===62?se(C):C===45?f(C):d(C)}function m(C){const oe="CDATA[";return C===oe.charCodeAt(u++)?(e.consume(C),u===oe.length?A:m):n(C)}function A(C){return C===null?n(C):C===93?(e.consume(C),E):X(C)?(s=A,W(C)):(e.consume(C),A)}function E(C){return C===93?(e.consume(C),g):A(C)}function g(C){return C===62?se(C):C===93?(e.consume(C),g):A(C)}function N(C){return C===null||C===62?se(C):X(C)?(s=N,W(C)):(e.consume(C),N)}function I(C){return C===null?n(C):C===63?(e.consume(C),R):X(C)?(s=I,W(C)):(e.consume(C),I)}function R(C){return C===62?se(C):I(C)}function w(C){return rt(C)?(e.consume(C),k):n(C)}function k(C){return C===45||dt(C)?(e.consume(C),k):O(C)}function O(C){return X(C)?(s=O,W(C)):de(C)?(e.consume(C),O):se(C)}function Q(C){return C===45||dt(C)?(e.consume(C),Q):C===47||C===62||xe(C)?_(C):n(C)}function _(C){return C===47?(e.consume(C),se):C===58||C===95||rt(C)?(e.consume(C),x):X(C)?(s=_,W(C)):de(C)?(e.consume(C),_):se(C)}function x(C){return C===45||C===46||C===58||C===95||dt(C)?(e.consume(C),x):B(C)}function B(C){return C===61?(e.consume(C),P):X(C)?(s=B,W(C)):de(C)?(e.consume(C),B):_(C)}function P(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),i=C,G):X(C)?(s=P,W(C)):de(C)?(e.consume(C),P):(e.consume(C),J)}function G(C){return C===i?(e.consume(C),i=void 0,q):C===null?n(C):X(C)?(s=G,W(C)):(e.consume(C),G)}function J(C){return C===null||C===34||C===39||C===60||C===61||C===96?n(C):C===47||C===62||xe(C)?_(C):(e.consume(C),J)}function q(C){return C===47||C===62||xe(C)?_(C):n(C)}function se(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),t):n(C)}function W(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),V}function V(C){return de(C)?he(e,ke,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):ke(C)}function ke(C){return e.enter("htmlTextData"),s(C)}}const hc={name:"labelEnd",resolveAll:G2,resolveTo:V2,tokenize:q2},Q2={tokenize:J2},Y2={tokenize:j2},z2={tokenize:Z2};function G2(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&yt(e,0,e.length,n),e}function V2(e,t){let n=e.length,r=0,i,u,s,a;for(;n--;)if(i=e[n][1],u){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(u=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const o={type:e[u][1].type==="labelLink"?"link":"image",start:{...e[u][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[u][1].start},end:{...e[s][1].end}},c={type:"labelText",start:{...e[u+r+2][1].end},end:{...e[s-2][1].start}};return a=[["enter",o,t],["enter",l,t]],a=Dt(a,e.slice(u+1,u+r+3)),a=Dt(a,[["enter",c,t]]),a=Dt(a,ha(t.parser.constructs.insideSpan.null,e.slice(u+r+4,s-3),t)),a=Dt(a,[["exit",c,t],e[s-2],e[s-1],["exit",l,t]]),a=Dt(a,e.slice(s+1)),a=Dt(a,[["exit",o,t]]),yt(e,u,e.length,a),e}function q2(e,t,n){const r=this;let i=r.events.length,u,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){u=r.events[i][1];break}return a;function a(f){return u?u._inactive?d(f):(s=r.parser.defined.includes(Ht(r.sliceSerialize({start:u.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),o):n(f)}function o(f){return f===40?e.attempt(Q2,c,s?c:d)(f):f===91?e.attempt(Y2,c,s?l:d)(f):s?c(f):d(f)}function l(f){return e.attempt(z2,c,d)(f)}function c(f){return t(f)}function d(f){return u._balanced=!0,n(f)}}function J2(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return xe(d)?Fi(e,u)(d):u(d)}function u(d){return d===41?c(d):vp(e,s,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return xe(d)?Fi(e,o)(d):c(d)}function a(d){return n(d)}function o(d){return d===34||d===39||d===40?Fp(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function l(d){return xe(d)?Fi(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function j2(e,t,n){const r=this;return i;function i(a){return Pp.call(r,e,u,s,"reference","referenceMarker","referenceString")(a)}function u(a){return r.parser.defined.includes(Ht(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function s(a){return n(a)}}function Z2(e,t,n){return r;function r(u){return e.enter("reference"),e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),i}function i(u){return u===93?(e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),e.exit("reference"),t):n(u)}}const X2={name:"labelStartImage",resolveAll:hc.resolveAll,tokenize:$2};function $2(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),u}function u(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),s):n(a)}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const eE={name:"labelStartLink",resolveAll:hc.resolveAll,tokenize:tE};function tE(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),u}function u(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Ka={name:"lineEnding",tokenize:nE};function nE(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),he(e,t,"linePrefix")}}const hs={name:"thematicBreak",tokenize:rE};function rE(e,t,n){let r=0,i;return u;function u(l){return e.enter("thematicBreak"),s(l)}function s(l){return i=l,a(l)}function a(l){return l===i?(e.enter("thematicBreakSequence"),o(l)):r>=3&&(l===null||X(l))?(e.exit("thematicBreak"),t(l)):n(l)}function o(l){return l===i?(e.consume(l),r++,o):(e.exit("thematicBreakSequence"),de(l)?he(e,a,"whitespace")(l):a(l))}}const ot={continuation:{tokenize:aE},exit:lE,name:"list",tokenize:sE},iE={partial:!0,tokenize:cE},uE={partial:!0,tokenize:oE};function sE(e,t,n){const r=this,i=r.events[r.events.length-1];let u=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return a;function a(p){const m=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:ll(p)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(hs,n,l)(p):l(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(p)}return n(p)}function o(p){return ll(p)&&++s<10?(e.consume(p),o):(!r.interrupt||s<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),l(p)):n(p)}function l(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Su,r.interrupt?n:c,e.attempt(iE,f,d))}function c(p){return r.containerState.initialBlankLine=!0,u++,f(p)}function d(p){return de(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),f):n(p)}function f(p){return r.containerState.size=u+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function aE(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Su,i,u);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,he(e,t,"listItemIndent",r.containerState.size+1)(a)}function u(a){return r.containerState.furtherBlankLines||!de(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(uE,t,s)(a))}function s(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,he(e,e.attempt(ot,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function oE(e,t,n){const r=this;return he(e,i,"listItemIndent",r.containerState.size+1);function i(u){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(u):n(u)}}function lE(e){e.exit(this.containerState.type)}function cE(e,t,n){const r=this;return he(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(u){const s=r.events[r.events.length-1];return!de(u)&&s&&s[1].type==="listItemPrefixWhitespace"?t(u):n(u)}}const _f={name:"setextUnderline",resolveTo:dE,tokenize:fE};function dE(e,t){let n=e.length,r,i,u;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!u&&e[n][1].type==="definition"&&(u=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",u?(e.splice(i,0,["enter",s,t]),e.splice(u+1,0,["exit",e[r][1],t]),e[r][1].end={...e[u][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function fE(e,t,n){const r=this;let i;return u;function u(l){let c=r.events.length,d;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){d=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=l,s(l)):n(l)}function s(l){return e.enter("setextHeadingLineSequence"),a(l)}function a(l){return l===i?(e.consume(l),a):(e.exit("setextHeadingLineSequence"),de(l)?he(e,o,"lineSuffix")(l):o(l))}function o(l){return l===null||X(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const hE={tokenize:pE};function pE(e){const t=this,n=e.attempt(Su,r,e.attempt(this.parser.constructs.flowInitial,i,he(e,e.attempt(this.parser.constructs.flow,i,e.attempt(E2,i)),"linePrefix")));return n;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const mE={resolveAll:Up()},AE=Hp("string"),gE=Hp("text");function Hp(e){return{resolveAll:Up(e==="text"?bE:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],u=n.attempt(i,s,a);return s;function s(c){return l(c)?u(c):a(c)}function a(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),o}function o(c){return l(c)?(n.exit("data"),u(c)):(n.consume(c),o)}function l(c){if(c===null)return!0;const d=i[c];let f=-1;if(d)for(;++f<d.length;){const p=d[f];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Up(e){return t;function t(n,r){let i=-1,u;for(;++i<=n.length;)u===void 0?n[i]&&n[i][1].type==="data"&&(u=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==u+2&&(n[u][1].end=n[i-1][1].end,n.splice(u+2,i-u-2),i=u+2),u=void 0);return e?e(n,r):n}}function bE(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let u=i.length,s=-1,a=0,o;for(;u--;){const l=i[u];if(typeof l=="string"){for(s=l.length;l.charCodeAt(s-1)===32;)a++,s--;if(s)break;s=-1}else if(l===-2)o=!0,a++;else if(l!==-1){u++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const l={type:n===e.length||o||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?s:r.start._bufferIndex+s,_index:r.start._index+u,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...l.start},r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}const EE={42:ot,43:ot,45:ot,48:ot,49:ot,50:ot,51:ot,52:ot,53:ot,54:ot,55:ot,56:ot,57:ot,62:Rp},yE={91:k2},TE={[-2]:Wa,[-1]:Wa,32:Wa},CE={35:_2,42:hs,45:[_f,hs],60:B2,61:_f,95:hs,96:Nf,126:Nf},xE={38:Bp,92:Mp},kE={[-5]:Ka,[-4]:Ka,[-3]:Ka,33:X2,38:Bp,42:cl,60:[e2,W2],91:eE,92:[N2,Mp],93:hc,95:cl,96:h2},IE={null:[cl,mE]},SE={null:[42,95]},wE={null:[]},NE=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:SE,contentInitial:yE,disable:wE,document:EE,flow:CE,flowInitial:TE,insideSpan:IE,string:xE,text:kE},Symbol.toStringTag,{value:"Module"}));function DE(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},u=[];let s=[],a=[];const o={attempt:O(w),check:O(k),consume:N,enter:I,exit:R,interrupt:O(k,{interrupt:!0})},l={code:null,containerState:{},defineSkip:A,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d};let c=t.tokenize.call(l,o);return t.resolveAll&&u.push(t),l;function d(B){return s=Dt(s,B),E(),s[s.length-1]!==null?[]:(Q(t,0),l.events=ha(u,l.events,l),l.events)}function f(B,P){return OE(p(B),P)}function p(B){return _E(s,B)}function m(){const{_bufferIndex:B,_index:P,line:G,column:J,offset:q}=r;return{_bufferIndex:B,_index:P,line:G,column:J,offset:q}}function A(B){i[B.line]=B.column,x()}function E(){let B;for(;r._index<s.length;){const P=s[r._index];if(typeof P=="string")for(B=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===B&&r._bufferIndex<P.length;)g(P.charCodeAt(r._bufferIndex));else g(P)}}function g(B){c=c(B)}function N(B){X(B)?(r.line++,r.column=1,r.offset+=B===-3?2:1,x()):B!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=B}function I(B,P){const G=P||{};return G.type=B,G.start=m(),l.events.push(["enter",G,l]),a.push(G),G}function R(B){const P=a.pop();return P.end=m(),l.events.push(["exit",P,l]),P}function w(B,P){Q(B,P.from)}function k(B,P){P.restore()}function O(B,P){return G;function G(J,q,se){let W,V,ke,C;return Array.isArray(J)?Ne(J):"tokenize"in J?Ne([J]):oe(J);function oe(Le){return Kt;function Kt(Qt){const rn=Qt!==null&&Le[Qt],un=Qt!==null&&Le.null,ge=[...Array.isArray(rn)?rn:rn?[rn]:[],...Array.isArray(un)?un:un?[un]:[]];return Ne(ge)(Qt)}}function Ne(Le){return W=Le,V=0,Le.length===0?se:S(Le[V])}function S(Le){return Kt;function Kt(Qt){return C=_(),ke=Le,Le.partial||(l.currentConstruct=Le),Le.name&&l.parser.constructs.disable.null.includes(Le.name)?Pt():Le.tokenize.call(P?Object.assign(Object.create(l),P):l,o,tt,Pt)(Qt)}}function tt(Le){return B(ke,C),q}function Pt(Le){return C.restore(),++V<W.length?S(W[V]):se}}}function Q(B,P){B.resolveAll&&!u.includes(B)&&u.push(B),B.resolve&&yt(l.events,P,l.events.length-P,B.resolve(l.events.slice(P),l)),B.resolveTo&&(l.events=B.resolveTo(l.events,l))}function _(){const B=m(),P=l.previous,G=l.currentConstruct,J=l.events.length,q=Array.from(a);return{from:J,restore:se};function se(){r=B,l.previous=P,l.currentConstruct=G,l.events.length=J,a=q,x()}}function x(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function _E(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,u=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,u)];else{if(s=e.slice(n,i),r>-1){const a=s[0];typeof a=="string"?s[0]=a.slice(r):s.shift()}u>0&&s.push(e[i].slice(0,u))}return s}function OE(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const u=e[n];let s;if(typeof u=="string")s=u;else switch(u){case-5:{s="\r";break}case-4:{s=`
|
|
3
|
+
`;break}case-3:{s=`\r
|
|
4
|
+
`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(u)}i=u===-2,r.push(s)}return r.join("")}function RE(e){const r={constructs:_p([NE,...(e||{}).extensions||[]]),content:i(Vb),defined:[],document:i(Jb),flow:i(hE),lazy:{},string:i(AE),text:i(gE)};return r;function i(u){return s;function s(a){return DE(r,u,a)}}}function ME(e){for(;!Lp(e););return e}const Of=/[\0\t\n\r]/g;function BE(){let e=1,t="",n=!0,r;return i;function i(u,s,a){const o=[];let l,c,d,f,p;for(u=t+(typeof u=="string"?u.toString():new TextDecoder(s||void 0).decode(u)),d=0,t="",n&&(u.charCodeAt(0)===65279&&d++,n=void 0);d<u.length;){if(Of.lastIndex=d,l=Of.exec(u),f=l&&l.index!==void 0?l.index:u.length,p=u.charCodeAt(f),!l){t=u.slice(d);break}if(p===10&&d===f&&r)o.push(-3),r=void 0;else switch(r&&(o.push(-5),r=void 0),d<f&&(o.push(u.slice(d,f)),e+=f-d),p){case 0:{o.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,o.push(-2);e++<c;)o.push(-1);break}case 10:{o.push(-4),e=1;break}default:r=!0,e=1}d=f+1}return a&&(r&&o.push(-5),t&&o.push(t),o.push(null)),o}}const LE=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Wp(e){return e.replace(LE,vE)}function vE(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),u=i===120||i===88;return Op(n.slice(u?2:1),u?16:10)}return fc(n)||e}function Hi(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Rf(e.position):"start"in e||"end"in e?Rf(e):"line"in e||"column"in e?dl(e):""}function dl(e){return Mf(e&&e.line)+":"+Mf(e&&e.column)}function Rf(e){return dl(e&&e.start)+"-"+dl(e&&e.end)}function Mf(e){return e&&typeof e=="number"?e:1}const Kp={}.hasOwnProperty;function PE(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),FE(n)(ME(RE(n).document().write(BE()(e,t,!0))))}function FE(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(yi),autolinkProtocol:_,autolinkEmail:_,atxHeading:u(qu),blockQuote:u(un),characterEscape:_,characterReference:_,codeFenced:u(ge),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:u(ge,s),codeText:u(Ei,s),codeTextData:_,data:_,codeFlowValue:_,definition:u(sn),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:u(Vu),hardBreakEscape:u(Ju),hardBreakTrailing:u(Ju),htmlFlow:u(ju,s),htmlFlowData:_,htmlText:u(ju,s),htmlTextData:_,image:u(Ha),label:s,link:u(yi),listItem:u(an),listItemValue:f,listOrdered:u(Je,d),listUnordered:u(Je),paragraph:u(ve),reference:S,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:u(qu),strong:u(nt),thematicBreak:u(st)},exit:{atxHeading:o(),atxHeadingSequence:w,autolink:o(),autolinkEmail:rn,autolinkProtocol:Qt,blockQuote:o(),characterEscapeValue:x,characterReferenceMarkerHexadecimal:Pt,characterReferenceMarkerNumeric:Pt,characterReferenceValue:Le,characterReference:Kt,codeFenced:o(E),codeFencedFence:A,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:x,codeIndented:o(g),codeText:o(q),codeTextData:x,data:x,definition:o(),definitionDestinationString:R,definitionLabelString:N,definitionTitleString:I,emphasis:o(),hardBreakEscape:o(P),hardBreakTrailing:o(P),htmlFlow:o(G),htmlFlowData:x,htmlText:o(J),htmlTextData:x,image:o(W),label:ke,labelText:V,lineEnding:B,link:o(se),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:tt,resourceDestinationString:C,resourceTitleString:oe,resource:Ne,setextHeading:o(Q),setextHeadingLineSequence:O,setextHeadingText:k,strong:o(),thematicBreak:o()}};Qp(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(L){let Y={type:"root",children:[]};const j={stack:[Y],tokenStack:[],config:t,enter:a,exit:l,buffer:s,resume:c,data:n},te=[];let Ae=-1;for(;++Ae<L.length;)if(L[Ae][1].type==="listOrdered"||L[Ae][1].type==="listUnordered")if(L[Ae][0]==="enter")te.push(Ae);else{const Ft=te.pop();Ae=i(L,Ft,Ae)}for(Ae=-1;++Ae<L.length;){const Ft=t[L[Ae][0]];Kp.call(Ft,L[Ae][1].type)&&Ft[L[Ae][1].type].call(Object.assign({sliceSerialize:L[Ae][2].sliceSerialize},j),L[Ae][1])}if(j.tokenStack.length>0){const Ft=j.tokenStack[j.tokenStack.length-1];(Ft[1]||Bf).call(j,void 0,Ft[0])}for(Y.position={start:_n(L.length>0?L[0][1].start:{line:1,column:1,offset:0}),end:_n(L.length>0?L[L.length-2][1].end:{line:1,column:1,offset:0})},Ae=-1;++Ae<t.transforms.length;)Y=t.transforms[Ae](Y)||Y;return Y}function i(L,Y,j){let te=Y-1,Ae=-1,Ft=!1,rr,on,Ti,Ci;for(;++te<=j;){const At=L[te];switch(At[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{At[0]==="enter"?Ae++:Ae--,Ci=void 0;break}case"lineEndingBlank":{At[0]==="enter"&&(rr&&!Ci&&!Ae&&!Ti&&(Ti=te),Ci=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ci=void 0}if(!Ae&&At[0]==="enter"&&At[1].type==="listItemPrefix"||Ae===-1&&At[0]==="exit"&&(At[1].type==="listUnordered"||At[1].type==="listOrdered")){if(rr){let vr=te;for(on=void 0;vr--;){const ln=L[vr];if(ln[1].type==="lineEnding"||ln[1].type==="lineEndingBlank"){if(ln[0]==="exit")continue;on&&(L[on][1].type="lineEndingBlank",Ft=!0),ln[1].type="lineEnding",on=vr}else if(!(ln[1].type==="linePrefix"||ln[1].type==="blockQuotePrefix"||ln[1].type==="blockQuotePrefixWhitespace"||ln[1].type==="blockQuoteMarker"||ln[1].type==="listItemIndent"))break}Ti&&(!on||Ti<on)&&(rr._spread=!0),rr.end=Object.assign({},on?L[on][1].start:At[1].end),L.splice(on||te,0,["exit",rr,At[2]]),te++,j++}if(At[1].type==="listItemPrefix"){const vr={type:"listItem",_spread:!1,start:Object.assign({},At[1].start),end:void 0};rr=vr,L.splice(te,0,["enter",vr,At[2]]),te++,j++,Ti=void 0,Ci=!0}}}return L[Y][1]._spread=Ft,j}function u(L,Y){return j;function j(te){a.call(this,L(te),te),Y&&Y.call(this,te)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(L,Y,j){this.stack[this.stack.length-1].children.push(L),this.stack.push(L),this.tokenStack.push([Y,j||void 0]),L.position={start:_n(Y.start),end:void 0}}function o(L){return Y;function Y(j){L&&L.call(this,j),l.call(this,j)}}function l(L,Y){const j=this.stack.pop(),te=this.tokenStack.pop();if(te)te[0].type!==L.type&&(Y?Y.call(this,L,te[0]):(te[1]||Bf).call(this,L,te[0]));else throw new Error("Cannot close `"+L.type+"` ("+Hi({start:L.start,end:L.end})+"): it’s not open");j.position.end=_n(L.end)}function c(){return dc(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(L){if(this.data.expectingFirstListItemValue){const Y=this.stack[this.stack.length-2];Y.start=Number.parseInt(this.sliceSerialize(L),10),this.data.expectingFirstListItemValue=void 0}}function p(){const L=this.resume(),Y=this.stack[this.stack.length-1];Y.lang=L}function m(){const L=this.resume(),Y=this.stack[this.stack.length-1];Y.meta=L}function A(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const L=this.resume(),Y=this.stack[this.stack.length-1];Y.value=L.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const L=this.resume(),Y=this.stack[this.stack.length-1];Y.value=L.replace(/(\r?\n|\r)$/g,"")}function N(L){const Y=this.resume(),j=this.stack[this.stack.length-1];j.label=Y,j.identifier=Ht(this.sliceSerialize(L)).toLowerCase()}function I(){const L=this.resume(),Y=this.stack[this.stack.length-1];Y.title=L}function R(){const L=this.resume(),Y=this.stack[this.stack.length-1];Y.url=L}function w(L){const Y=this.stack[this.stack.length-1];if(!Y.depth){const j=this.sliceSerialize(L).length;Y.depth=j}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function O(L){const Y=this.stack[this.stack.length-1];Y.depth=this.sliceSerialize(L).codePointAt(0)===61?1:2}function Q(){this.data.setextHeadingSlurpLineEnding=void 0}function _(L){const j=this.stack[this.stack.length-1].children;let te=j[j.length-1];(!te||te.type!=="text")&&(te=Re(),te.position={start:_n(L.start),end:void 0},j.push(te)),this.stack.push(te)}function x(L){const Y=this.stack.pop();Y.value+=this.sliceSerialize(L),Y.position.end=_n(L.end)}function B(L){const Y=this.stack[this.stack.length-1];if(this.data.atHardBreak){const j=Y.children[Y.children.length-1];j.position.end=_n(L.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Y.type)&&(_.call(this,L),x.call(this,L))}function P(){this.data.atHardBreak=!0}function G(){const L=this.resume(),Y=this.stack[this.stack.length-1];Y.value=L}function J(){const L=this.resume(),Y=this.stack[this.stack.length-1];Y.value=L}function q(){const L=this.resume(),Y=this.stack[this.stack.length-1];Y.value=L}function se(){const L=this.stack[this.stack.length-1];if(this.data.inReference){const Y=this.data.referenceType||"shortcut";L.type+="Reference",L.referenceType=Y,delete L.url,delete L.title}else delete L.identifier,delete L.label;this.data.referenceType=void 0}function W(){const L=this.stack[this.stack.length-1];if(this.data.inReference){const Y=this.data.referenceType||"shortcut";L.type+="Reference",L.referenceType=Y,delete L.url,delete L.title}else delete L.identifier,delete L.label;this.data.referenceType=void 0}function V(L){const Y=this.sliceSerialize(L),j=this.stack[this.stack.length-2];j.label=Wp(Y),j.identifier=Ht(Y).toLowerCase()}function ke(){const L=this.stack[this.stack.length-1],Y=this.resume(),j=this.stack[this.stack.length-1];if(this.data.inReference=!0,j.type==="link"){const te=L.children;j.children=te}else j.alt=Y}function C(){const L=this.resume(),Y=this.stack[this.stack.length-1];Y.url=L}function oe(){const L=this.resume(),Y=this.stack[this.stack.length-1];Y.title=L}function Ne(){this.data.inReference=void 0}function S(){this.data.referenceType="collapsed"}function tt(L){const Y=this.resume(),j=this.stack[this.stack.length-1];j.label=Y,j.identifier=Ht(this.sliceSerialize(L)).toLowerCase(),this.data.referenceType="full"}function Pt(L){this.data.characterReferenceType=L.type}function Le(L){const Y=this.sliceSerialize(L),j=this.data.characterReferenceType;let te;j?(te=Op(Y,j==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):te=fc(Y);const Ae=this.stack[this.stack.length-1];Ae.value+=te}function Kt(L){const Y=this.stack.pop();Y.position.end=_n(L.end)}function Qt(L){x.call(this,L);const Y=this.stack[this.stack.length-1];Y.url=this.sliceSerialize(L)}function rn(L){x.call(this,L);const Y=this.stack[this.stack.length-1];Y.url="mailto:"+this.sliceSerialize(L)}function un(){return{type:"blockquote",children:[]}}function ge(){return{type:"code",lang:null,meta:null,value:""}}function Ei(){return{type:"inlineCode",value:""}}function sn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Vu(){return{type:"emphasis",children:[]}}function qu(){return{type:"heading",depth:0,children:[]}}function Ju(){return{type:"break"}}function ju(){return{type:"html",value:""}}function Ha(){return{type:"image",title:null,url:"",alt:null}}function yi(){return{type:"link",title:null,url:"",children:[]}}function Je(L){return{type:"list",ordered:L.type==="listOrdered",start:null,spread:L._spread,children:[]}}function an(L){return{type:"listItem",spread:L._spread,checked:null,children:[]}}function ve(){return{type:"paragraph",children:[]}}function nt(){return{type:"strong",children:[]}}function Re(){return{type:"text",value:""}}function st(){return{type:"thematicBreak"}}}function _n(e){return{line:e.line,column:e.column,offset:e.offset}}function Qp(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Qp(e,r):HE(e,r)}}function HE(e,t){let n;for(n in t)if(Kp.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Bf(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Hi({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Hi({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Hi({start:t.start,end:t.end})+") is still open")}function fl(e){const t=this;t.parser=n;function n(r){return PE(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}const Lf={}.hasOwnProperty;function UE(e,t){const n=t||{};function r(i,...u){let s=r.invalid;const a=r.handlers;if(i&&Lf.call(i,e)){const o=String(i[e]);s=Lf.call(a,o)?a[o]:r.unknown}if(s)return s.call(this,i,...u)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const WE={}.hasOwnProperty;function Yp(e,t){let n=-1,r;if(t.extensions)for(;++n<t.extensions.length;)Yp(e,t.extensions[n]);for(r in t)if(WE.call(t,r))switch(r){case"extensions":break;case"unsafe":{vf(e[r],t[r]);break}case"join":{vf(e[r],t[r]);break}case"handlers":{KE(e[r],t[r]);break}default:e.options[r]=t[r]}return e}function vf(e,t){t&&e.push(...t)}function KE(e,t){t&&Object.assign(e,t)}function QE(e,t,n,r){const i=n.enter("blockquote"),u=n.createTracker(r);u.move("> "),u.shift(2);const s=n.indentLines(n.containerFlow(e,u.current()),YE);return i(),s}function YE(e,t,n){return">"+(n?"":" ")+e}function zp(e,t){return Pf(e,t.inConstruct,!0)&&!Pf(e,t.notInConstruct,!1)}function Pf(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Ff(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
5
|
+
`&&zp(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
6
|
+
`}function zE(e,t){const n=String(e);let r=n.indexOf(t),i=r,u=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++u>s&&(s=u):u=1,i=r+t.length,r=n.indexOf(t,i);return s}function hl(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function GE(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function VE(e,t,n,r){const i=GE(n),u=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(hl(e,n)){const d=n.enter("codeIndented"),f=n.indentLines(u,qE);return d(),f}const a=n.createTracker(r),o=i.repeat(Math.max(zE(u,i)+1,3)),l=n.enter("codeFenced");let c=a.move(o);if(e.lang){const d=n.enter(`codeFencedLang${s}`);c+=a.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...a.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${s}`);c+=a.move(" "),c+=a.move(n.safe(e.meta,{before:c,after:`
|
|
6
7
|
`,encode:["`"],...a.current()})),d()}return c+=a.move(`
|
|
7
8
|
`),u&&(c+=a.move(u+`
|
|
8
|
-
`)),c+=a.move(o),l(),c}function
|
|
9
|
-
`,...o.current()}))),a(),e.title&&(a=n.enter(`title${u}`),l+=o.move(" "+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),a()),s(),l}function
|
|
9
|
+
`)),c+=a.move(o),l(),c}function qE(e,t,n){return(n?"":" ")+e}function pc(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function JE(e,t,n,r){const i=pc(n),u=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let a=n.enter("label");const o=n.createTracker(r);let l=o.move("[");return l+=o.move(n.safe(n.associationId(e),{before:l,after:"]",...o.current()})),l+=o.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),l+=o.move("<"),l+=o.move(n.safe(e.url,{before:l,after:">",...o.current()})),l+=o.move(">")):(a=n.enter("destinationRaw"),l+=o.move(n.safe(e.url,{before:l,after:e.title?" ":`
|
|
10
|
+
`,...o.current()}))),a(),e.title&&(a=n.enter(`title${u}`),l+=o.move(" "+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),a()),s(),l}function jE(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Vn(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ds(e,t,n){const r=$r(e),i=$r(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Gp.peek=ZE;function Gp(e,t,n,r){const i=jE(n),u=n.enter("emphasis"),s=n.createTracker(r),a=s.move(i);let o=s.move(n.containerPhrasing(e,{after:i,before:a,...s.current()}));const l=o.charCodeAt(0),c=Ds(r.before.charCodeAt(r.before.length-1),l,i);c.inside&&(o=Vn(l)+o.slice(1));const d=o.charCodeAt(o.length-1),f=Ds(r.after.charCodeAt(0),d,i);f.inside&&(o=o.slice(0,-1)+Vn(d));const p=s.move(i);return u(),n.attentionEncodeSurroundingInfo={after:f.outside,before:c.outside},a+o+p}function ZE(e,t,n){return n.options.emphasis||"*"}const pa=(function(e){if(e==null)return ty;if(typeof e=="function")return ma(e);if(typeof e=="object")return Array.isArray(e)?XE(e):$E(e);if(typeof e=="string")return ey(e);throw new Error("Expected function, string, or object as test")});function XE(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=pa(e[n]);return ma(r);function r(...i){let u=-1;for(;++u<t.length;)if(t[u].apply(this,i))return!0;return!1}}function $E(e){const t=e;return ma(n);function n(r){const i=r;let u;for(u in e)if(i[u]!==t[u])return!1;return!0}}function ey(e){return ma(t);function t(n){return n&&n.type===e}}function ma(e){return t;function t(n,r,i){return!!(ny(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function ty(){return!0}function ny(e){return e!==null&&typeof e=="object"&&"type"in e}const Vp=[],ry=!0,pl=!1,ml="skip";function mc(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const u=pa(i),s=r?-1:1;a(e,void 0,[])();function a(o,l,c){const d=o&&typeof o=="object"?o:{};if(typeof d.type=="string"){const p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(o.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=Vp,m,A,E;if((!t||u(o,l,c[c.length-1]||void 0))&&(p=iy(n(o,c)),p[0]===pl))return p;if("children"in o&&o.children){const g=o;if(g.children&&p[0]!==ml)for(A=(r?g.children.length:-1)+s,E=c.concat(g);A>-1&&A<g.children.length;){const N=g.children[A];if(m=a(N,A,E)(),m[0]===pl)return m;A=typeof m[1]=="number"?m[1]:A+s}}return p}}}function iy(e){return Array.isArray(e)?e:typeof e=="number"?[ry,e]:e==null?Vp:[e]}function oi(e,t,n,r){let i,u,s;typeof t=="function"&&typeof n!="function"?(u=void 0,s=t,i=n):(u=t,s=n,i=r),mc(e,u,a,i);function a(o,l){const c=l[l.length-1],d=c?c.children.indexOf(o):void 0;return s(o,d,c)}}function qp(e,t){let n=!1;return oi(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,pl}),!!((!e.depth||e.depth<3)&&dc(e)&&(t.options.setext||n))}function uy(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),u=n.createTracker(r);if(qp(e,n)){const c=n.enter("headingSetext"),d=n.enter("phrasing"),f=n.containerPhrasing(e,{...u.current(),before:`
|
|
10
11
|
`,after:`
|
|
11
12
|
`});return d(),c(),f+`
|
|
12
13
|
`+(i===1?"=":"-").repeat(f.length-(Math.max(f.lastIndexOf("\r"),f.lastIndexOf(`
|
|
13
14
|
`))+1))}const s="#".repeat(i),a=n.enter("headingAtx"),o=n.enter("phrasing");u.move(s+" ");let l=n.containerPhrasing(e,{before:"# ",after:`
|
|
14
|
-
`,...u.current()});return/^[\t ]/.test(l)&&(l=
|
|
15
|
-
`,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:
|
|
16
|
-
]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:
|
|
17
|
-
*])`},{character:"*",inConstruct:"phrasing",notInConstruct:
|
|
15
|
+
`,...u.current()});return/^[\t ]/.test(l)&&(l=Vn(l.charCodeAt(0))+l.slice(1)),l=l?s+" "+l:s,n.options.closeAtx&&(l+=" "+s),o(),a(),l}Jp.peek=sy;function Jp(e){return e.value||""}function sy(){return"<"}jp.peek=ay;function jp(e,t,n,r){const i=pc(n),u=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let a=n.enter("label");const o=n.createTracker(r);let l=o.move("![");return l+=o.move(n.safe(e.alt,{before:l,after:"]",...o.current()})),l+=o.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),l+=o.move("<"),l+=o.move(n.safe(e.url,{before:l,after:">",...o.current()})),l+=o.move(">")):(a=n.enter("destinationRaw"),l+=o.move(n.safe(e.url,{before:l,after:e.title?" ":")",...o.current()}))),a(),e.title&&(a=n.enter(`title${u}`),l+=o.move(" "+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),a()),l+=o.move(")"),s(),l}function ay(){return"!"}Zp.peek=oy;function Zp(e,t,n,r){const i=e.referenceType,u=n.enter("imageReference");let s=n.enter("label");const a=n.createTracker(r);let o=a.move("![");const l=n.safe(e.alt,{before:o,after:"]",...a.current()});o+=a.move(l+"]["),s();const c=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:o,after:"]",...a.current()});return s(),n.stack=c,u(),i==="full"||!l||l!==d?o+=a.move(d+"]"):i==="shortcut"?o=o.slice(0,-1):o+=a.move("]"),o}function oy(){return"!"}Xp.peek=ly;function Xp(e,t,n){let r=e.value||"",i="`",u=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++u<n.unsafe.length;){const s=n.unsafe[u],a=n.compilePattern(s);let o;if(s.atBreak)for(;o=a.exec(r);){let l=o.index;r.charCodeAt(l)===10&&r.charCodeAt(l-1)===13&&l--,r=r.slice(0,l)+" "+r.slice(o.index+1)}}return i+r+i}function ly(){return"`"}function $p(e,t){const n=dc(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}em.peek=cy;function em(e,t,n,r){const i=pc(n),u=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let a,o;if($p(e,n)){const c=n.stack;n.stack=[],a=n.enter("autolink");let d=s.move("<");return d+=s.move(n.containerPhrasing(e,{before:d,after:">",...s.current()})),d+=s.move(">"),a(),n.stack=c,d}a=n.enter("link"),o=n.enter("label");let l=s.move("[");return l+=s.move(n.containerPhrasing(e,{before:l,after:"](",...s.current()})),l+=s.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),l+=s.move("<"),l+=s.move(n.safe(e.url,{before:l,after:">",...s.current()})),l+=s.move(">")):(o=n.enter("destinationRaw"),l+=s.move(n.safe(e.url,{before:l,after:e.title?" ":")",...s.current()}))),o(),e.title&&(o=n.enter(`title${u}`),l+=s.move(" "+i),l+=s.move(n.safe(e.title,{before:l,after:i,...s.current()})),l+=s.move(i),o()),l+=s.move(")"),a(),l}function cy(e,t,n){return $p(e,n)?"<":"["}tm.peek=dy;function tm(e,t,n,r){const i=e.referenceType,u=n.enter("linkReference");let s=n.enter("label");const a=n.createTracker(r);let o=a.move("[");const l=n.containerPhrasing(e,{before:o,after:"]",...a.current()});o+=a.move(l+"]["),s();const c=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:o,after:"]",...a.current()});return s(),n.stack=c,u(),i==="full"||!l||l!==d?o+=a.move(d+"]"):i==="shortcut"?o=o.slice(0,-1):o+=a.move("]"),o}function dy(){return"["}function Ac(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function fy(e){const t=Ac(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function hy(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function nm(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function py(e,t,n,r){const i=n.enter("list"),u=n.bulletCurrent;let s=e.ordered?hy(n):Ac(n);const a=e.ordered?s==="."?")":".":fy(n);let o=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(o=!0),nm(n)===s&&c){let d=-1;for(;++d<e.children.length;){const f=e.children[d];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){o=!0;break}}}}o&&(s=a),n.bulletCurrent=s;const l=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=u,i(),l}function my(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Ay(e,t,n,r){const i=my(n);let u=n.bulletCurrent||Ac(n);t&&t.type==="list"&&t.ordered&&(u=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+u);let s=u.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const a=n.createTracker(r);a.move(u+" ".repeat(s-u.length)),a.shift(s);const o=n.enter("listItem"),l=n.indentLines(n.containerFlow(e,a.current()),c);return o(),l;function c(d,f,p){return f?(p?"":" ".repeat(s))+d:(p?u:u+" ".repeat(s-u.length))+d}}function gy(e,t,n,r){const i=n.enter("paragraph"),u=n.enter("phrasing"),s=n.containerPhrasing(e,r);return u(),i(),s}const by=pa(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Ey(e,t,n,r){return(e.children.some(function(s){return by(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function yy(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}rm.peek=Ty;function rm(e,t,n,r){const i=yy(n),u=n.enter("strong"),s=n.createTracker(r),a=s.move(i+i);let o=s.move(n.containerPhrasing(e,{after:i,before:a,...s.current()}));const l=o.charCodeAt(0),c=Ds(r.before.charCodeAt(r.before.length-1),l,i);c.inside&&(o=Vn(l)+o.slice(1));const d=o.charCodeAt(o.length-1),f=Ds(r.after.charCodeAt(0),d,i);f.inside&&(o=o.slice(0,-1)+Vn(d));const p=s.move(i+i);return u(),n.attentionEncodeSurroundingInfo={after:f.outside,before:c.outside},a+o+p}function Ty(e,t,n){return n.options.strong||"*"}function Cy(e,t,n,r){return n.safe(e.value,r)}function xy(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function ky(e,t,n){const r=(nm(n)+(n.options.ruleSpaces?" ":"")).repeat(xy(n));return n.options.ruleSpaces?r.slice(0,-1):r}const gc={blockquote:QE,break:Ff,code:VE,definition:JE,emphasis:Gp,hardBreak:Ff,heading:uy,html:Jp,image:jp,imageReference:Zp,inlineCode:Xp,link:em,linkReference:tm,list:py,listItem:Ay,paragraph:gy,root:Ey,strong:rm,text:Cy,thematicBreak:ky},Iy=[Sy];function Sy(e,t,n,r){if(t.type==="code"&&hl(t,r)&&(e.type==="list"||e.type===t.type&&hl(e,r)))return!1;if("spread"in n&&typeof n.spread=="boolean")return e.type==="paragraph"&&(e.type===t.type||t.type==="definition"||t.type==="heading"&&qp(t,r))?void 0:n.spread?1:0}const ir=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],wy=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:`
|
|
16
|
+
`,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:ir},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
|
|
17
|
+
]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:ir},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r
|
|
18
|
+
*])`},{character:"*",inConstruct:"phrasing",notInConstruct:ir},{atBreak:!0,character:"+",after:`(?:[ \r
|
|
18
19
|
])`},{atBreak:!0,character:"-",after:`(?:[ \r
|
|
19
20
|
-])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r
|
|
20
|
-
]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:
|
|
21
|
-
`)&&c.type==="html"&&(u[u.length-1]=u[u.length-1].replace(/(\r?\n|\r)$/," "),a=" ",l=t.createTracker(n),l.move(u.join("")));let f=t.handle(c,e,t,{...l.current(),after:d,before:a});o&&o===f.slice(0,1)&&(f=
|
|
21
|
+
]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:ir},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:ir},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:ir},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:ir},{atBreak:!0,character:"~"}];function Ny(e){return e.label||!e.identifier?e.label||"":Wp(e.identifier)}function Dy(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function _y(e,t,n){const r=t.indexStack,i=e.children||[],u=[];let s=-1,a=n.before,o;r.push(-1);let l=t.createTracker(n);for(;++s<i.length;){const c=i[s];let d;if(r[r.length-1]=s,s+1<i.length){let m=t.handle.handlers[i[s+1].type];m&&m.peek&&(m=m.peek),d=m?m(i[s+1],e,t,{before:"",after:"",...l.current()}).charAt(0):""}else d=n.after;u.length>0&&(a==="\r"||a===`
|
|
22
|
+
`)&&c.type==="html"&&(u[u.length-1]=u[u.length-1].replace(/(\r?\n|\r)$/," "),a=" ",l=t.createTracker(n),l.move(u.join("")));let f=t.handle(c,e,t,{...l.current(),after:d,before:a});o&&o===f.slice(0,1)&&(f=Vn(o.charCodeAt(0))+f.slice(1));const p=t.attentionEncodeSurroundingInfo;t.attentionEncodeSurroundingInfo=void 0,o=void 0,p&&(u.length>0&&p.before&&a===u[u.length-1].slice(-1)&&(u[u.length-1]=u[u.length-1].slice(0,-1)+Vn(a.charCodeAt(0))),p.after&&(o=d)),l.move(f),u.push(f),a=f.slice(-1)}return r.pop(),u.join("")}function Oy(e,t,n){const r=t.indexStack,i=e.children||[],u=t.createTracker(n),s=[];let a=-1;for(r.push(-1);++a<i.length;){const o=i[a];r[r.length-1]=a,s.push(u.move(t.handle(o,e,t,{before:`
|
|
22
23
|
`,after:`
|
|
23
|
-
`,...u.current()}))),o.type!=="list"&&(t.bulletLastUsed=void 0),a<i.length-1&&s.push(u.move(
|
|
24
|
+
`,...u.current()}))),o.type!=="list"&&(t.bulletLastUsed=void 0),a<i.length-1&&s.push(u.move(Ry(o,i[a+1],e,t)))}return r.pop(),s.join("")}function Ry(e,t,n,r){let i=r.join.length;for(;i--;){const u=r.join[i](e,t,n,r);if(u===!0||u===1)break;if(typeof u=="number")return`
|
|
24
25
|
`.repeat(1+u);if(u===!1)return`
|
|
25
26
|
|
|
26
27
|
<!---->
|
|
27
28
|
|
|
28
29
|
`}return`
|
|
29
30
|
|
|
30
|
-
`}const
|
|
31
|
+
`}const My=/\r?\n|\r/g;function By(e,t){const n=[];let r=0,i=0,u;for(;u=My.exec(e);)s(e.slice(r,u.index)),n.push(u[0]),r=u.index+u[0].length,i++;return s(e.slice(r)),n.join("");function s(a){n.push(t(a,i,!a))}}function Ly(e,t,n){const r=(n.before||"")+(t||"")+(n.after||""),i=[],u=[],s={};let a=-1;for(;++a<e.unsafe.length;){const c=e.unsafe[a];if(!zp(e.stack,c))continue;const d=e.compilePattern(c);let f;for(;f=d.exec(r);){const p="before"in c||!!c.atBreak,m="after"in c,A=f.index+(p?f[1].length:0);i.includes(A)?(s[A].before&&!p&&(s[A].before=!1),s[A].after&&!m&&(s[A].after=!1)):(i.push(A),s[A]={before:p,after:m})}}i.sort(vy);let o=n.before?n.before.length:0;const l=r.length-(n.after?n.after.length:0);for(a=-1;++a<i.length;){const c=i[a];c<o||c>=l||c+1<l&&i[a+1]===c+1&&s[c].after&&!s[c+1].before&&!s[c+1].after||i[a-1]===c-1&&s[c].before&&!s[c-1].before&&!s[c-1].after||(o!==c&&u.push(Hf(r.slice(o,c),"\\")),o=c,/[!-/:-@[-`{-~]/.test(r.charAt(c))&&(!n.encode||!n.encode.includes(r.charAt(c)))?u.push("\\"):(u.push(Vn(r.charCodeAt(c))),o++))}return u.push(Hf(r.slice(o,l),n.after)),u.join("")}function vy(e,t){return e-t}function Hf(e,t){const n=/\\(?=[!-/:-@[-`{-~])/g,r=[],i=[],u=e+t;let s=-1,a=0,o;for(;o=n.exec(u);)r.push(o.index);for(;++s<r.length;)a!==r[s]&&i.push(e.slice(a,r[s])),i.push("\\"),a=r[s];return i.push(e.slice(a)),i.join("")}function Py(e){const t=e||{},n=t.now||{};let r=t.lineShift||0,i=n.line||1,u=n.column||1;return{move:o,current:s,shift:a};function s(){return{now:{line:i,column:u},lineShift:r}}function a(l){r+=l}function o(l){const c=l||"",d=c.split(/\r?\n|\r/g),f=d[d.length-1];return i+=d.length-1,u=d.length===1?u+f.length:1+f.length+r,c}}function Fy(e,t){const n=t||{},r={associationId:Ny,containerPhrasing:Ky,containerFlow:Qy,createTracker:Py,compilePattern:Dy,enter:u,handlers:{...gc},handle:void 0,indentLines:By,indexStack:[],join:[...Iy],options:{},safe:Yy,stack:[],unsafe:[...wy]};Yp(r,n),r.options.tightDefinitions&&r.join.push(Wy),r.handle=UE("type",{invalid:Hy,unknown:Uy,handlers:r.handlers});let i=r.handle(e,void 0,r,{before:`
|
|
31
32
|
`,after:`
|
|
32
33
|
`,now:{line:1,column:1},lineShift:0});return i&&i.charCodeAt(i.length-1)!==10&&i.charCodeAt(i.length-1)!==13&&(i+=`
|
|
33
|
-
`),i;function u(s){return r.stack.push(s),a;function a(){r.stack.pop()}}}function s3(e){throw new Error("Cannot handle value `"+e+"`, expected node")}function a3(e){const t=e;throw new Error("Cannot handle unknown node `"+t.type+"`")}function o3(e,t){if(e.type==="definition"&&e.type===t.type)return 0}function l3(e,t){return Zy(e,this,t)}function c3(e,t){return Xy(e,this,t)}function d3(e,t){return n3(this,e,t)}function Il(e){const t=this;t.compiler=n;function n(r){return u3(r,{...t.data("settings"),...e,extensions:t.data("toMarkdownExtensions")||[]})}}function Xf(e){if(e)throw e}var $a,$f;function f3(){if($f)return $a;$f=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(l){return typeof Array.isArray=="function"?Array.isArray(l):t.call(l)==="[object Array]"},u=function(l){if(!l||t.call(l)!=="[object Object]")return!1;var c=e.call(l,"constructor"),d=l.constructor&&l.constructor.prototype&&e.call(l.constructor.prototype,"isPrototypeOf");if(l.constructor&&!c&&!d)return!1;var f;for(f in l);return typeof f>"u"||e.call(l,f)},s=function(l,c){n&&c.name==="__proto__"?n(l,c.name,{enumerable:!0,configurable:!0,value:c.newValue,writable:!0}):l[c.name]=c.newValue},a=function(l,c){if(c==="__proto__")if(e.call(l,c)){if(r)return r(l,c).value}else return;return l[c]};return $a=function o(){var l,c,d,f,h,m,b=arguments[0],T=1,E=arguments.length,O=!1;for(typeof b=="boolean"&&(O=b,b=arguments[1]||{},T=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});T<E;++T)if(l=arguments[T],l!=null)for(c in l)d=a(b,c),f=a(l,c),b!==f&&(O&&f&&(u(f)||(h=i(f)))?(h?(h=!1,m=d&&i(d)?d:[]):m=d&&u(d)?d:{},s(b,{name:c,newValue:o(O,m,f)})):typeof f<"u"&&s(b,{name:c,newValue:f}));return b},$a}var h3=f3();const eo=Ta(h3);function wl(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function p3(){const e=[],t={run:n,use:r};return t;function n(...i){let u=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);a(null,...i);function a(o,...l){const c=e[++u];let d=-1;if(o){s(o);return}for(;++d<i.length;)(l[d]===null||l[d]===void 0)&&(l[d]=i[d]);i=l,c?m3(c,a)(...l):s(null,...l)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function m3(e,t){let n;return r;function r(...s){const a=e.length>s.length;let o;a&&s.push(i);try{o=e.apply(this,s)}catch(l){const c=l;if(a&&n)throw c;return i(c)}a||(o&&o.then&&typeof o.then=="function"?o.then(u,i):o instanceof Error?i(o):u(o))}function i(s,...a){n||(n=!0,t(s,...a))}function u(s){i(null,s)}}class Et extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",u={},s=!1;if(n&&("line"in n&&"column"in n?u={place:n}:"start"in n&&"end"in n?u={place:n}:"type"in n?u={ancestors:[n],place:n.position}:u={...n}),typeof t=="string"?i=t:!u.cause&&t&&(s=!0,i=t.message,u.cause=t),!u.ruleId&&!u.source&&typeof r=="string"){const o=r.indexOf(":");o===-1?u.ruleId=r:(u.source=r.slice(0,o),u.ruleId=r.slice(o+1))}if(!u.place&&u.ancestors&&u.ancestors){const o=u.ancestors[u.ancestors.length-1];o&&(u.place=o.position)}const a=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=qi(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=s&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Et.prototype.file="";Et.prototype.name="";Et.prototype.reason="";Et.prototype.message="";Et.prototype.stack="";Et.prototype.column=void 0;Et.prototype.line=void 0;Et.prototype.ancestors=void 0;Et.prototype.cause=void 0;Et.prototype.fatal=void 0;Et.prototype.place=void 0;Et.prototype.ruleId=void 0;Et.prototype.source=void 0;const Jt={basename:A3,dirname:g3,extname:b3,join:E3,sep:"/"};function A3(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Mu(e);let n=0,r=-1,i=e.length,u;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(u){n=i+1;break}}else r<0&&(u=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(u){n=i+1;break}}else s<0&&(u=!0,s=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function g3(e){if(Mu(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function b3(e){Mu(e);let t=e.length,n=-1,r=0,i=-1,u=0,s;for(;t--;){const a=e.codePointAt(t);if(a===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),a===46?i<0?i=t:u!==1&&(u=1):i>-1&&(u=-1)}return i<0||n<0||u===0||u===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function E3(...e){let t=-1,n;for(;++t<e.length;)Mu(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":y3(n)}function y3(e){Mu(e);const t=e.codePointAt(0)===47;let n=T3(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function T3(e,t){let n="",r=0,i=-1,u=0,s=-1,a,o;for(;++s<=e.length;){if(s<e.length)a=e.codePointAt(s);else{if(a===47)break;a=47}if(a===47){if(!(i===s-1||u===1))if(i!==s-1&&u===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(o=n.lastIndexOf("/"),o!==n.length-1){o<0?(n="",r=0):(n=n.slice(0,o),r=n.length-1-n.lastIndexOf("/")),i=s,u=0;continue}}else if(n.length>0){n="",r=0,i=s,u=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,u=0}else a===46&&u>-1?u++:u=-1}return n}function Mu(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const C3={cwd:x3};function x3(){return"/"}function Nl(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function k3(e){if(typeof e=="string")e=new URL(e);else if(!Nl(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return S3(e)}function S3(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const to=["history","path","basename","stem","extname","dirname"];class I3{constructor(t){let n;t?Nl(t)?n={path:t}:typeof t=="string"||w3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":C3.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<to.length;){const u=to[r];u in n&&n[u]!==void 0&&n[u]!==null&&(this[u]=u==="history"?[...n[u]]:n[u])}let i;for(i in n)to.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Jt.basename(this.path):void 0}set basename(t){ro(t,"basename"),no(t,"basename"),this.path=Jt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Jt.dirname(this.path):void 0}set dirname(t){eh(this.basename,"dirname"),this.path=Jt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Jt.extname(this.path):void 0}set extname(t){if(no(t,"extname"),eh(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Jt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Nl(t)&&(t=k3(t)),ro(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Jt.basename(this.path,this.extname):void 0}set stem(t){ro(t,"stem"),no(t,"stem"),this.path=Jt.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Et(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function no(e,t){if(e&&e.includes(Jt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Jt.sep+"`")}function ro(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function eh(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function w3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const N3=(function(e){const r=this.constructor.prototype,i=r[e],u=function(){return i.apply(u,arguments)};return Object.setPrototypeOf(u,r),u}),D3={}.hasOwnProperty;class Nc extends N3{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=p3()}copy(){const t=new Nc;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(eo(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(so("data",this.frozen),this.namespace[t]=n,this):D3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(so("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=is(t),r=this.parser||this.Parser;return io("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),io("process",this.parser||this.Parser),uo("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(u,s){const a=is(t),o=r.parse(a);r.run(o,a,function(c,d,f){if(c||!d||!f)return l(c);const h=d,m=r.stringify(h,f);O3(m)?f.value=m:f.result=m,l(c,f)});function l(c,d){c||!d?s(c):u?u(d):(D(n,"`done` is defined if `resolve` is not"),n(void 0,d))}}}processSync(t){let n=!1,r;return this.freeze(),io("processSync",this.parser||this.Parser),uo("processSync",this.compiler||this.Compiler),this.process(t,i),nh("processSync","process",n),D(r,"we either bailed on an error or have a tree"),r;function i(u,s){n=!0,Xf(u),r=s}}run(t,n,r){th(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?u(void 0,r):new Promise(u);function u(s,a){D(typeof n!="function","`file` can’t be a `done` anymore, we checked");const o=is(n);i.run(t,o,l);function l(c,d,f){const h=d||t;c?a(c):s?s(h):(D(r,"`done` is defined if `resolve` is not"),r(void 0,h,f))}}}runSync(t,n){let r=!1,i;return this.run(t,n,u),nh("runSync","run",r),D(i,"we either bailed on an error or have a tree"),i;function u(s,a){Xf(s),i=a,r=!0}}stringify(t,n){this.freeze();const r=is(n),i=this.compiler||this.Compiler;return uo("stringify",i),th(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(so("use",this.frozen),t!=null)if(typeof t=="function")o(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function u(l){if(typeof l=="function")o(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[c,...d]=l;o(c,d)}else s(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function s(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(l.plugins),l.settings&&(i.settings=eo(!0,i.settings,l.settings))}function a(l){let c=-1;if(l!=null)if(Array.isArray(l))for(;++c<l.length;){const d=l[c];u(d)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function o(l,c){let d=-1,f=-1;for(;++d<r.length;)if(r[d][0]===l){f=d;break}if(f===-1)r.push([l,...c]);else if(c.length>0){let[h,...m]=c;const b=r[f][1];wl(b)&&wl(h)&&(h=eo(!0,b,h)),r[f]=[l,h,...m]}}}}const Dl=new Nc().freeze();function io(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function uo(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function so(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function th(e){if(!wl(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function nh(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function is(e){return _3(e)?e:new I3(e)}function _3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function O3(e){return typeof e=="string"||R3(e)}function R3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function Je(e){this.content=e}Je.prototype={constructor:Je,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 r=n&&n!=e?this.remove(n):this,i=r.find(e),u=r.content.slice();return i==-1?u.push(n||e,t):(u[i+1]=t,n&&(u[i]=n)),new Je(u)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new Je(n)},addToStart:function(e,t){return new Je([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new Je(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),u=r.find(e);return i.splice(u==-1?i.length:u,0,t,n),new Je(i)},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=Je.from(e),e.size?new Je(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=Je.from(e),e.size?new Je(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=Je.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}};Je.from=function(e){if(e instanceof Je)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Je(t)};function gm(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),u=t.child(r);if(i==u){n+=i.nodeSize;continue}if(!i.sameMarkup(u))return n;if(i.isText&&i.text!=u.text){for(let s=0;i.text[s]==u.text[s];s++)n++;return n}if(i.content.size||u.content.size){let s=gm(i.content,u.content,n+1);if(s!=null)return s}n+=i.nodeSize}}function bm(e,t,n,r){for(let i=e.childCount,u=t.childCount;;){if(i==0||u==0)return i==u?null:{a:n,b:r};let s=e.child(--i),a=t.child(--u),o=s.nodeSize;if(s==a){n-=o,r-=o;continue}if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let l=0,c=Math.min(s.text.length,a.text.length);for(;l<c&&s.text[s.text.length-l-1]==a.text[a.text.length-l-1];)l++,n--,r--;return{a:n,b:r}}if(s.content.size||a.content.size){let l=bm(s.content,a.content,n-1,r-1);if(l)return l}n-=o,r-=o}}class Q{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let r=0;r<t.length;r++)this.size+=t[r].nodeSize}nodesBetween(t,n,r,i=0,u){for(let s=0,a=0;a<n;s++){let o=this.content[s],l=a+o.nodeSize;if(l>t&&r(o,i+a,u||null,s)!==!1&&o.content.size){let c=a+1;o.nodesBetween(Math.max(0,t-c),Math.min(o.content.size,n-c),r,i+c)}a=l}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,i){let u="",s=!0;return this.nodesBetween(t,n,(a,o)=>{let l=a.isText?a.text.slice(Math.max(t,o)-o,n-o):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&l||a.isTextblock)&&r&&(s?s=!1:u+=r),u+=l},0),u}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),u=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),u=1);u<t.content.length;u++)i.push(t.content[u]);return new Q(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let u=0,s=0;s<n;u++){let a=this.content[u],o=s+a.nodeSize;o>t&&((s<t||o>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))),r.push(a),i+=a.nodeSize),s=o}return new Q(r,i)}cutByIndex(t,n){return t==n?Q.empty:t==0&&n==this.content.length?this:new Q(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),u=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new Q(i,u)}addToStart(t){return new Q([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new Q(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,r=0;n<this.content.length;n++){let i=this.content[n];t(i,r,n),r+=i.nodeSize}}findDiffStart(t,n=0){return gm(this,t,n)}findDiffEnd(t,n=this.size,r=t.size){return bm(this,t,n,r)}findIndex(t){if(t==0)return us(0,t);if(t==this.size)return us(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=this.child(n),u=r+i.nodeSize;if(u>=t)return u==t?us(n+1,u):us(n,r);r=u}}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 Q.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new Q(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return Q.empty;let n,r=0;for(let i=0;i<t.length;i++){let u=t[i];r+=u.nodeSize,i&&u.isText&&t[i-1].sameMarkup(u)?(n||(n=t.slice(0,i)),n[n.length-1]=u.withText(n[n.length-1].text+u.text)):n&&n.push(u)}return new Q(n||t,r)}static from(t){if(!t)return Q.empty;if(t instanceof Q)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new Q([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Q.empty=new Q([],0);const ao={index:0,offset:0};function us(e,t){return ao.index=e,ao.offset=t,ao}function Fs(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 r=0;r<e.length;r++)if(!Fs(e[r],t[r]))return!1}else{for(let r in e)if(!(r in t)||!Fs(e[r],t[r]))return!1;for(let r in t)if(!(r in e))return!1}return!0}class ye{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,r=!1;for(let i=0;i<t.length;i++){let u=t[i];if(this.eq(u))return t;if(this.type.excludes(u.type))n||(n=t.slice(0,i));else{if(u.type.excludes(this.type))return t;!r&&u.type.rank>this.type.rank&&(n||(n=t.slice(0,i)),n.push(this),r=!0),n&&n.push(u)}}return n||(n=t.slice()),r||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&&Fs(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 r=t.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].eq(n[r]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return ye.none;if(t instanceof ye)return[t];let n=t.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}}ye.none=[];class Ps extends Error{}class Z{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=ym(this.content,t+this.openStart,n);return r&&new Z(r,this.openStart,this.openEnd)}removeBetween(t,n){return new Z(Em(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 Z.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Z(Q.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let u=t.firstChild;u&&!u.isLeaf&&(n||!u.type.spec.isolating);u=u.firstChild)r++;for(let u=t.lastChild;u&&!u.isLeaf&&(n||!u.type.spec.isolating);u=u.lastChild)i++;return new Z(t,r,i)}}Z.empty=new Z(Q.empty,0,0);function Em(e,t,n){let{index:r,offset:i}=e.findIndex(t),u=e.maybeChild(r),{index:s,offset:a}=e.findIndex(n);if(i==t||u.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(r!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(r,u.copy(Em(u.content,t-i-1,n-i-1)))}function ym(e,t,n,r){let{index:i,offset:u}=e.findIndex(t),s=e.maybeChild(i);if(u==t||s.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));let a=ym(s.content,t-u-1,n,s);return a&&e.replaceChild(i,s.copy(a))}function M3(e,t,n){if(n.openStart>e.depth)throw new Ps("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Ps("Inconsistent open depths");return Tm(e,t,n,0)}function Tm(e,t,n,r){let i=e.index(r),u=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let s=Tm(e,t,n,r+1);return u.copy(u.content.replaceChild(i,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let s=e.parent,a=s.content;return Er(s,a.cut(0,e.parentOffset).append(n.content).append(a.cut(t.parentOffset)))}else{let{start:s,end:a}=B3(n,e);return Er(u,xm(e,s,a,t,r))}else return Er(u,Hs(e,t,r))}function Cm(e,t){if(!t.type.compatibleContent(e.type))throw new Ps("Cannot join "+t.type.name+" onto "+e.type.name)}function _l(e,t,n){let r=e.node(n);return Cm(r,t.node(n)),r}function br(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 Yi(e,t,n,r){let i=(t||e).node(n),u=0,s=t?t.index(n):i.childCount;e&&(u=e.index(n),e.depth>n?u++:e.textOffset&&(br(e.nodeAfter,r),u++));for(let a=u;a<s;a++)br(i.child(a),r);t&&t.depth==n&&t.textOffset&&br(t.nodeBefore,r)}function Er(e,t){return e.type.checkContent(t),e.copy(t)}function xm(e,t,n,r,i){let u=e.depth>i&&_l(e,t,i+1),s=r.depth>i&&_l(n,r,i+1),a=[];return Yi(null,e,i,a),u&&s&&t.index(i)==n.index(i)?(Cm(u,s),br(Er(u,xm(e,t,n,r,i+1)),a)):(u&&br(Er(u,Hs(e,t,i+1)),a),Yi(t,n,i,a),s&&br(Er(s,Hs(n,r,i+1)),a)),Yi(r,null,i,a),new Q(a)}function Hs(e,t,n){let r=[];if(Yi(null,e,n,r),e.depth>n){let i=_l(e,t,n+1);br(Er(i,Hs(e,t,n+1)),r)}return Yi(t,null,n,r),new Q(r)}function B3(e,t){let n=t.depth-e.openStart,i=t.node(n).copy(e.content);for(let u=n-1;u>=0;u--)i=t.node(u).copy(Q.from(i));return{start:i.resolveNoCache(e.openStart+n),end:i.resolveNoCache(i.content.size-e.openEnd-n)}}class ou{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,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 r=this.pos-this.path[this.path.length-1],i=t.child(n);return r?t.child(n).cut(r):i}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 r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let u=0;u<t;u++)i+=r.child(u).nodeSize;return i}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return ye.none;if(this.textOffset)return t.child(n).marks;let r=t.maybeChild(n-1),i=t.maybeChild(n);if(!r){let a=r;r=i,i=a}let u=r.marks;for(var s=0;s<u.length;s++)u[s].type.spec.inclusive===!1&&(!i||!u[s].isInSet(i.marks))&&(u=u[s--].removeFromSet(u));return u}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=t.parent.maybeChild(t.index());for(var u=0;u<r.length;u++)r[u].type.spec.inclusive===!1&&(!i||!r[u].isInSet(i.marks))&&(r=r[u--].removeFromSet(r));return r}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 r=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);r>=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new km(this,t,r);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 r=[],i=0,u=n;for(let s=t;;){let{index:a,offset:o}=s.content.findIndex(u),l=u-o;if(r.push(s,a,i+o),!l||(s=s.child(a),s.isText))break;u=l-1,i+=o+1}return new ou(n,r,u)}static resolveCached(t,n){let r=rh.get(t);if(r)for(let u=0;u<r.elts.length;u++){let s=r.elts[u];if(s.pos==n)return s}else rh.set(t,r=new L3);let i=r.elts[r.i]=ou.resolve(t,n);return r.i=(r.i+1)%v3,i}}class L3{constructor(){this.elts=[],this.i=0}}const v3=12,rh=new WeakMap;class km{constructor(t,n,r){this.$from=t,this.$to=n,this.depth=r}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)}}const F3=Object.create(null);let kn=class Ol{constructor(t,n,r,i=ye.none){this.type=t,this.attrs=n,this.marks=i,this.content=r||Q.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,r,i=0){this.content.nodesBetween(t,n,r,i,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,r,i){return this.content.textBetween(t,n,r,i)}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,r){return this.type==t&&Fs(this.attrs,n||t.defaultAttrs||F3)&&ye.sameSet(this.marks,r||ye.none)}copy(t=null){return t==this.content?this:new Ol(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new Ol(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,r=!1){if(t==n)return Z.empty;let i=this.resolve(t),u=this.resolve(n),s=r?0:i.sharedDepth(n),a=i.start(s),l=i.node(s).content.cut(i.pos-a,u.pos-a);return new Z(l,i.depth-s,u.depth-s)}replace(t,n,r){return M3(this.resolve(t),this.resolve(n),r)}nodeAt(t){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(t);if(n=n.maybeChild(r),!n)return null;if(i==t||n.isText)return n;t-=i+1}}childAfter(t){let{index:n,offset:r}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(t);if(r<t)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(t){return ou.resolveCached(this,t)}resolveNoCache(t){return ou.resolve(this,t)}rangeHasMark(t,n,r){let i=!1;return n>t&&this.nodesBetween(t,n,u=>(r.isInSet(u.marks)&&(i=!0),!i)),i}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()+")"),Sm(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,r=Q.empty,i=0,u=r.childCount){let s=this.contentMatchAt(t).matchFragment(r,i,u),a=s&&s.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let o=i;o<u;o++)if(!this.type.allowsMarks(r.child(o).marks))return!1;return!0}canReplaceWith(t,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let u=this.contentMatchAt(t).matchType(r),s=u&&u.matchFragment(this.content,n);return s?s.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let t=ye.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),t=r.addToSet(t)}if(!ye.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 r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=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,r)}let i=Q.fromJSON(t,n.content),u=t.nodeType(n.type).create(n.attrs,i,r);return u.type.checkAttrs(u.attrs),u}};kn.prototype.text=void 0;class Us extends kn{constructor(t,n,r,i){if(super(t,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Sm(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 Us(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new Us(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 Sm(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class Dr{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new P3(t,n);if(r.next==null)return Dr.empty;let i=Im(r);r.next&&r.err("Unexpected trailing text");let u=q3(K3(i));return Y3(u,r),u}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,r=t.childCount){let i=this;for(let u=n;i&&u<r;u++)i=i.matchType(t.child(u).type);return i}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 r=0;r<t.next.length;r++)if(this.next[n].type==t.next[r].type)return!0;return!1}fillBefore(t,n=!1,r=0){let i=[this];function u(s,a){let o=s.matchFragment(t,r);if(o&&(!n||o.validEnd))return Q.from(a.map(l=>l.createAndFill()));for(let l=0;l<s.next.length;l++){let{type:c,next:d}=s.next[l];if(!(c.isText||c.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let f=u(d,a.concat(c));if(f)return f}}return null}return u(this,[])}findWrapping(t){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==t)return this.wrapCache[r+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),u=i.match;if(u.matchType(t)){let s=[];for(let a=i;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<u.next.length;s++){let{type:a,next:o}=u.next[s];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!i.type||o.validEnd)&&(r.push({match:a.contentMatch,type:a,via:i}),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(r){t.push(r);for(let i=0;i<r.next.length;i++)t.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),t.map((r,i)=>{let u=i+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)u+=(s?", ":"")+r.next[s].type.name+"->"+t.indexOf(r.next[s].next);return u}).join(`
|
|
34
|
-
`)}}Dr.empty=new Dr(!0);class P3{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 Im(e){let t=[];do t.push(H3(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function H3(e){let t=[];do t.push(U3(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function U3(e){let t=z3(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=W3(e,t);else break;return t}function ih(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function W3(e,t){let n=ih(e),r=n;return e.eat(",")&&(e.next!="}"?r=ih(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function Q3(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let u in n){let s=n[u];s.isInGroup(t)&&i.push(s)}return i.length==0&&e.err("No node type or group '"+t+"' found"),i}function z3(e){if(e.eat("(")){let t=Im(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=Q3(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 K3(e){let t=[[]];return i(u(e,0),n()),t;function n(){return t.push([])-1}function r(s,a,o){let l={term:o,to:a};return t[s].push(l),l}function i(s,a){s.forEach(o=>o.to=a)}function u(s,a){if(s.type=="choice")return s.exprs.reduce((o,l)=>o.concat(u(l,a)),[]);if(s.type=="seq")for(let o=0;;o++){let l=u(s.exprs[o],a);if(o==s.exprs.length-1)return l;i(l,a=n())}else if(s.type=="star"){let o=n();return r(a,o),i(u(s.expr,o),o),[r(o)]}else if(s.type=="plus"){let o=n();return i(u(s.expr,a),o),i(u(s.expr,o),o),[r(o)]}else{if(s.type=="opt")return[r(a)].concat(u(s.expr,a));if(s.type=="range"){let o=a;for(let l=0;l<s.min;l++){let c=n();i(u(s.expr,o),c),o=c}if(s.max==-1)i(u(s.expr,o),o);else for(let l=s.min;l<s.max;l++){let c=n();r(o,c),i(u(s.expr,o),c),o=c}return[r(o)]}else{if(s.type=="name")return[r(a,void 0,s.value)];throw new Error("Unknown expr type")}}}}function wm(e,t){return t-e}function uh(e,t){let n=[];return r(t),n.sort(wm);function r(i){let u=e[i];if(u.length==1&&!u[0].term)return r(u[0].to);n.push(i);for(let s=0;s<u.length;s++){let{term:a,to:o}=u[s];!a&&n.indexOf(o)==-1&&r(o)}}}function q3(e){let t=Object.create(null);return n(uh(e,0));function n(r){let i=[];r.forEach(s=>{e[s].forEach(({term:a,to:o})=>{if(!a)return;let l;for(let c=0;c<i.length;c++)i[c][0]==a&&(l=i[c][1]);uh(e,o).forEach(c=>{l||i.push([a,l=[]]),l.indexOf(c)==-1&&l.push(c)})})});let u=t[r.join(",")]=new Dr(r.indexOf(e.length-1)>-1);for(let s=0;s<i.length;s++){let a=i[s][1].sort(wm);u.next.push({type:i[s][0],next:t[a.join(",")]||n(a)})}return u}}function Y3(e,t){for(let n=0,r=[e];n<r.length;n++){let i=r[n],u=!i.validEnd,s=[];for(let a=0;a<i.next.length;a++){let{type:o,next:l}=i.next[a];s.push(o.name),u&&!(o.isText||o.hasRequiredAttrs())&&(u=!1),r.indexOf(l)==-1&&r.push(l)}u&&t.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Nm(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function Dm(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(i===void 0){let u=e[r];if(u.hasDefault)i=u.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function _m(e,t,n,r){for(let i in t)if(!(i in e))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);for(let i in e){let u=e[i];u.validate&&u.validate(t[i])}}function Om(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new V3(e,r,t[r]);return n}let sh=class Rm{constructor(t,n,r){this.name=t,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=Om(t,r.attrs),this.defaultAttrs=Nm(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||t=="text"),this.isText=t=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Dr.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:Dm(this.attrs,t)}create(t=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new kn(this,this.computeAttrs(t),Q.from(n),ye.setFrom(r))}createChecked(t=null,n,r){return n=Q.from(n),this.checkContent(n),new kn(this,this.computeAttrs(t),n,ye.setFrom(r))}createAndFill(t=null,n,r){if(t=this.computeAttrs(t),n=Q.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let i=this.contentMatch.matchFragment(n),u=i&&i.fillBefore(Q.empty,!0);return u?new kn(this,t,n.append(u),ye.setFrom(r)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let r=0;r<t.childCount;r++)if(!this.allowsMarks(t.child(r).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){_m(this.attrs,t,"node",this.name)}allowsMarkType(t){return this.markSet==null||this.markSet.indexOf(t)>-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;n<t.length;n++)if(!this.allowsMarkType(t[n].type))return!1;return!0}allowedMarks(t){if(this.markSet==null)return t;let n;for(let r=0;r<t.length;r++)this.allowsMarkType(t[r].type)?n&&n.push(t[r]):n||(n=t.slice(0,r));return n?n.length?n:ye.none:t}static compile(t,n){let r=Object.create(null);t.forEach((u,s)=>r[u]=new Rm(u,n,s));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let u in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function G3(e,t,n){let r=n.split("|");return i=>{let u=i===null?"null":typeof i;if(r.indexOf(u)<0)throw new RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${u}`)}}class V3{constructor(t,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?G3(t,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class ka{constructor(t,n,r,i){this.name=t,this.rank=n,this.schema=r,this.spec=i,this.attrs=Om(t,i.attrs),this.excluded=null;let u=Nm(this.attrs);this.instance=u?new ye(this,u):null}create(t=null){return!t&&this.instance?this.instance:new ye(this,Dm(this.attrs,t))}static compile(t,n){let r=Object.create(null),i=0;return t.forEach((u,s)=>r[u]=new ka(u,i++,n,s)),r}removeFromSet(t){for(var n=0;n<t.length;n++)t[n].type==this&&(t=t.slice(0,n).concat(t.slice(n+1)),n--);return t}isInSet(t){for(let n=0;n<t.length;n++)if(t[n].type==this)return t[n]}checkAttrs(t){_m(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}}class J3{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let i in t)n[i]=t[i];n.nodes=Je.from(t.nodes),n.marks=Je.from(t.marks||{}),this.nodes=sh.compile(this.spec.nodes,this),this.marks=ka.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let u=this.nodes[i],s=u.spec.content||"",a=u.spec.marks;if(u.contentMatch=r[s]||(r[s]=Dr.parse(s,this.nodes)),u.inlineContent=u.contentMatch.inlineContent,u.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!u.isInline||!u.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=u}u.markSet=a=="_"?null:a?ah(this,a.split(" ")):a==""||!u.inlineContent?[]:null}for(let i in this.marks){let u=this.marks[i],s=u.spec.excludes;u.excluded=s==null?[u]:s==""?[]:ah(this,s.split(" "))}this.nodeFromJSON=i=>kn.fromJSON(this,i),this.markFromJSON=i=>ye.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,r,i){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof sh){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,r,i)}text(t,n){let r=this.nodes.text;return new Us(r,r.defaultAttrs,t,ye.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 ah(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],u=e.marks[i],s=u;if(u)n.push(u);else for(let a in e.marks){let o=e.marks[a];(i=="_"||o.spec.group&&o.spec.group.split(" ").indexOf(i)>-1)&&n.push(s=o)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}function j3(e){return e.tag!=null}function Z3(e){return e.style!=null}let Dc=class Rl{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(i=>{if(j3(i))this.tags.push(i);else if(Z3(i)){let u=/[^=]*/.exec(i.style)[0];r.indexOf(u)<0&&r.push(u),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let u=t.nodes[i.node];return u.contentMatch.matchType(u)})}parse(t,n={}){let r=new lh(this,n,!1);return r.addAll(t,ye.none,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new lh(this,n,!0);return r.addAll(t,ye.none,n.from,n.to),Z.maxOpen(r.finish())}matchTag(t,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let u=this.tags[i];if(eT(t,u.tag)&&(u.namespace===void 0||t.namespaceURI==u.namespace)&&(!u.context||n.matchesContext(u.context))){if(u.getAttrs){let s=u.getAttrs(t);if(s===!1)continue;u.attrs=s||void 0}return u}}}matchStyle(t,n,r,i){for(let u=i?this.styles.indexOf(i)+1:0;u<this.styles.length;u++){let s=this.styles[u],a=s.style;if(!(a.indexOf(t)!=0||s.context&&!r.matchesContext(s.context)||a.length>t.length&&(a.charCodeAt(t.length)!=61||a.slice(t.length+1)!=n))){if(s.getAttrs){let o=s.getAttrs(n);if(o===!1)continue;s.attrs=o||void 0}return s}}}static schemaRules(t){let n=[];function r(i){let u=i.priority==null?50:i.priority,s=0;for(;s<n.length;s++){let a=n[s];if((a.priority==null?50:a.priority)<u)break}n.splice(s,0,i)}for(let i in t.marks){let u=t.marks[i].spec.parseDOM;u&&u.forEach(s=>{r(s=ch(s)),s.mark||s.ignore||s.clearMark||(s.mark=i)})}for(let i in t.nodes){let u=t.nodes[i].spec.parseDOM;u&&u.forEach(s=>{r(s=ch(s)),s.node||s.ignore||s.mark||(s.node=i)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new Rl(t,Rl.schemaRules(t)))}};const Mm={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},X3={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Bm={ol:!0,ul:!0},lu=1,Ml=2,Gi=4;function oh(e,t,n){return t!=null?(t?lu:0)|(t==="full"?Ml:0):e&&e.whitespace=="pre"?lu|Ml:n&~Gi}class ss{constructor(t,n,r,i,u,s){this.type=t,this.attrs=n,this.marks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=ye.none,this.match=u||(s&Gi?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(Q.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(t.type))?(this.match=r,i):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&lu)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let u=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=u.withText(u.text.slice(0,u.text.length-i[0].length))}}let n=Q.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(Q.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&&!Mm.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class lh{constructor(t,n,r){this.parser=t,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=n.topNode,u,s=oh(null,n.preserveWhitespace,0)|(r?Gi:0);i?u=new ss(i.type,i.attrs,ye.none,!0,n.topMatch||i.type.contentMatch,s):r?u=new ss(null,null,ye.none,!0,null,s):u=new ss(t.schema.topNodeType,null,ye.none,!0,null,s),this.nodes=[u],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 r=t.nodeValue,i=this.top,u=i.options&Ml?"full":this.localPreserveWS||(i.options&lu)>0,{schema:s}=this.parser;if(u==="full"||i.inlineContext(t)||/[^ \t\r\n\u000c]/.test(r)){if(u)if(u==="full")r=r.replace(/\r\n?/g,`
|
|
35
|
-
`);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let a=r.split(/\r?\n|\r/);for(let o=0;o<a.length;o++)o&&this.insertNode(s.linebreakReplacement.create(),n,!0),a[o]&&this.insertNode(s.text(a[o]),n,!/\S/.test(a[o]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let a=i.content[i.content.length-1],o=t.previousSibling;(!a||o&&o.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(r=r.slice(1))}r&&this.insertNode(s.text(r),n,!/\S/.test(r)),this.findInText(t)}else this.findInside(t)}addElement(t,n,r){let i=this.localPreserveWS,u=this.top;(t.tagName=="PRE"||/pre/.test(t.style&&t.style.whiteSpace))&&(this.localPreserveWS=!0);let s=t.nodeName.toLowerCase(),a;
|
|
36
|
-
`),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 r=t.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let u=this.parser.matchedStyles[i],s=r.getPropertyValue(u);if(s)for(let a=void 0;;){let o=this.parser.matchStyle(u,s,this,a);if(!o)break;if(o.ignore)return null;if(o.clearMark?n=n.filter(l=>!o.clearMark(l)):n=n.concat(this.parser.schema.marks[o.mark].create(o.attrs)),o.consuming===!1)a=o;else break}}return n}addElementByRule(t,n,r,i){let u,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,t.nodeName=="BR")||this.leafFallback(t,r);else{let o=this.enter(s,n.attrs||null,r,n.preserveWhitespace);o&&(u=!0,r=o)}else{let o=this.parser.schema.marks[n.mark];r=r.concat(o.create(n.attrs))}let a=this.top;if(s&&s.isLeaf)this.findInside(t);else if(i)this.addElement(t,r,i);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(o=>this.insertNode(o,r,!1));else{let o=t;typeof n.contentElement=="string"?o=t.querySelector(n.contentElement):typeof n.contentElement=="function"?o=n.contentElement(t):n.contentElement&&(o=n.contentElement),this.findAround(t,o,!0),this.addAll(o,r),this.findAround(t,o,!1)}u&&this.sync(a)&&this.open--}addAll(t,n,r,i){let u=r||0;for(let s=r?t.childNodes[r]:t.firstChild,a=i==null?null:t.childNodes[i];s!=a;s=s.nextSibling,++u)this.findAtPoint(t,u),this.addDOM(s,n);this.findAtPoint(t,u)}findPlace(t,n,r){let i,u;for(let s=this.open,a=0;s>=0;s--){let o=this.nodes[s],l=o.findWrapping(t);if(l&&(!i||i.length>l.length+a)&&(i=l,u=o,!l.length))break;if(o.solid){if(r)break;a+=2}}if(!i)return null;this.sync(u);for(let s=0;s<i.length;s++)n=this.enterInner(i[s],null,n,!1);return n}insertNode(t,n,r){if(t.isInline&&this.needsBlock&&!this.top.type){let u=this.textblockFromContext();u&&(n=this.enterInner(u,null,n))}let i=this.findPlace(t,n,r);if(i){this.closeExtra();let u=this.top;u.match&&(u.match=u.match.matchType(t.type));let s=ye.none;for(let a of i.concat(t.marks))(u.type?u.type.allowsMarkType(a.type):dh(a.type,t.type))&&(s=a.addToSet(s));return u.content.push(t.mark(s)),!0}return!1}enter(t,n,r,i){let u=this.findPlace(t.create(n),r,!1);return u&&(u=this.enterInner(t,n,r,!0,i)),u}enterInner(t,n,r,i=!1,u){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(t);let a=oh(t,u,s.options);s.options&Gi&&s.content.length==0&&(a|=Gi);let o=ye.none;return r=r.filter(l=>(s.type?s.type.allowsMarkType(l.type):dh(l.type,t))?(o=l.addToSet(o),!1):!0),this.nodes.push(new ss(t,n,o,i,null,a)),this.open++,r}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|=lu)}return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)t+=r[i].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==t&&this.find[r].offset==n&&(this.find[r].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,r){if(t!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&t.nodeType==1&&t.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].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("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),u=-(r?r.depth+1:0)+(i?0:1),s=(a,o)=>{for(;a>=0;a--){let l=n[a];if(l==""){if(a==n.length-1||a==0)continue;for(;o>=u;o--)if(s(a-1,o))return!0;return!1}else{let c=o>0||o==0&&i?this.nodes[o].type:r&&o>=u?r.node(o-u).type:null;if(!c||c.name!=l&&!c.isInGroup(l))return!1;o--}}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 r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function $3(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&Bm.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function eT(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function ch(e){let t={};for(let n in e)t[n]=e[n];return t}function dh(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let u=[],s=a=>{u.push(a);for(let o=0;o<a.edgeCount;o++){let{type:l,next:c}=a.edge(o);if(l==t||u.indexOf(c)<0&&s(c))return!0}};if(s(i.contentMatch))return!0}}class Fr{constructor(t,n){this.nodes=t,this.marks=n}serializeFragment(t,n={},r){r||(r=oo(n).createDocumentFragment());let i=r,u=[];return t.forEach(s=>{if(u.length||s.marks.length){let a=0,o=0;for(;a<u.length&&o<s.marks.length;){let l=s.marks[o];if(!this.marks[l.type.name]){o++;continue}if(!l.eq(u[a][0])||l.type.spec.spanning===!1)break;a++,o++}for(;a<u.length;)i=u.pop()[1];for(;o<s.marks.length;){let l=s.marks[o++],c=this.serializeMark(l,s.isInline,n);c&&(u.push([l,i]),i.appendChild(c.dom),i=c.contentDOM||c.dom)}}i.appendChild(this.serializeNodeInner(s,n))}),r}serializeNodeInner(t,n){let{dom:r,contentDOM:i}=Ts(oo(n),this.nodes[t.type.name](t),null,t.attrs);if(i){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,n,i)}return r}serializeNode(t,n={}){let r=this.serializeNodeInner(t,n);for(let i=t.marks.length-1;i>=0;i--){let u=this.serializeMark(t.marks[i],t.isInline,n);u&&((u.contentDOM||u.dom).appendChild(r),r=u.dom)}return r}serializeMark(t,n,r={}){let i=this.marks[t.type.name];return i&&Ts(oo(r),i(t,n),null,t.attrs)}static renderSpec(t,n,r=null,i){return Ts(t,n,r,i)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new Fr(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=fh(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return fh(t.marks)}}function fh(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function oo(e){return e.document||window.document}const hh=new WeakMap;function tT(e){let t=hh.get(e);return t===void 0&&hh.set(e,t=nT(e)),t}function nT(e){let t=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")t||(t=[]),t.push(r);else for(let i=0;i<r.length;i++)n(r[i]);else for(let i in r)n(r[i])}return n(e),t}function Ts(e,t,n,r){if(typeof t=="string")return{dom:e.createTextNode(t)};if(t.nodeType!=null)return{dom:t};if(t.dom&&t.dom.nodeType!=null)return t;let i=t[0],u;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(u=tT(r))&&u.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=i.indexOf(" ");s>0&&(n=i.slice(0,s),i=i.slice(s+1));let a,o=n?e.createElementNS(n,i):e.createElement(i),l=t[1],c=1;if(l&&typeof l=="object"&&l.nodeType==null&&!Array.isArray(l)){c=2;for(let d in l)if(l[d]!=null){let f=d.indexOf(" ");f>0?o.setAttributeNS(d.slice(0,f),d.slice(f+1),l[d]):d=="style"&&o.style?o.style.cssText=l[d]:o.setAttribute(d,l[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:o,contentDOM:o}}else{let{dom:h,contentDOM:m}=Ts(e,f,n,r);if(o.appendChild(h),m){if(a)throw new RangeError("Multiple content holes");a=m}}}return{dom:o,contentDOM:a}}const Lm=65535,vm=Math.pow(2,16);function rT(e,t){return e+t*vm}function ph(e){return e&Lm}function iT(e){return(e-(e&Lm))/vm}const Fm=1,Pm=2,Cs=4,Hm=8;class Bl{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&Hm)>0}get deletedBefore(){return(this.delInfo&(Fm|Cs))>0}get deletedAfter(){return(this.delInfo&(Pm|Cs))>0}get deletedAcross(){return(this.delInfo&Cs)>0}}class xt{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&xt.empty)return xt.empty}recover(t){let n=0,r=ph(t);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+n+iT(t)}mapResult(t,n=1){return this._map(t,n,!1)}map(t,n=1){return this._map(t,n,!0)}_map(t,n,r){let i=0,u=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let o=this.ranges[a]-(this.inverted?i:0);if(o>t)break;let l=this.ranges[a+u],c=this.ranges[a+s],d=o+l;if(t<=d){let f=l?t==o?-1:t==d?1:n:n,h=o+i+(f<0?0:c);if(r)return h;let m=t==(n<0?o:d)?null:rT(a/3,t-o),b=t==o?Pm:t==d?Fm:Cs;return(n<0?t!=o:t!=d)&&(b|=Hm),new Bl(h,b,m)}i+=c-l}return r?t+i:new Bl(t+i,0,null)}touches(t,n){let r=0,i=ph(n),u=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let o=this.ranges[a]-(this.inverted?r:0);if(o>t)break;let l=this.ranges[a+u],c=o+l;if(t<=c&&a==i*3)return!0;r+=this.ranges[a+s]-l}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,u=0;i<this.ranges.length;i+=3){let s=this.ranges[i],a=s-(this.inverted?u:0),o=s+(this.inverted?0:u),l=this.ranges[i+n],c=this.ranges[i+r];t(a,a+l,o,o+c),u+=c-l}}invert(){return new xt(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?xt.empty:new xt(t<0?[0,-t,0]:[0,0,t])}}xt.empty=new xt([]);class Ws{constructor(t,n,r=0,i=t?t.length:0){this.mirror=n,this.from=r,this.to=i,this._maps=t||[],this.ownData=!(t||n)}get maps(){return this._maps}slice(t=0,n=this.maps.length){return new Ws(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,r=this._maps.length;n<t._maps.length;n++){let i=t.getMirror(n);this.appendMap(t._maps[n],i!=null&&i<n?r+i: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,r=this._maps.length+t._maps.length;n>=0;n--){let i=t.getMirror(n);this.appendMap(t._maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let t=new Ws;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;r<this.to;r++)t=this._maps[r].map(t,n);return t}mapResult(t,n=1){return this._map(t,n,!1)}_map(t,n,r){let i=0;for(let u=this.from;u<this.to;u++){let s=this._maps[u],a=s.mapResult(t,n);if(a.recover!=null){let o=this.getMirror(u);if(o!=null&&o>u&&o<this.to){u=o,t=this._maps[o].recover(a.recover);continue}}i|=a.delInfo,t=a.pos}return r?t:new Bl(t,i,null)}}const lo=Object.create(null);class it{getMap(){return xt.empty}merge(t){return null}static fromJSON(t,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=lo[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in lo)throw new RangeError("Duplicate use of step JSON ID "+t);return lo[t]=n,n.prototype.jsonID=t,n}}class He{constructor(t,n){this.doc=t,this.failed=n}static ok(t){return new He(t,null)}static fail(t){return new He(null,t)}static fromReplace(t,n,r,i){try{return He.ok(t.replace(n,r,i))}catch(u){if(u instanceof Ps)return He.fail(u.message);throw u}}}function _c(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let u=e.child(i);u.content.size&&(u=u.copy(_c(u.content,t,u))),u.isInline&&(u=t(u,n,i)),r.push(u)}return Q.fromArray(r)}class Cn extends it{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=t.resolve(this.from),i=r.node(r.sharedDepth(this.to)),u=new Z(_c(n.content,(s,a)=>!s.isAtom||!a.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),i),n.openStart,n.openEnd);return He.fromReplace(t,this.from,this.to,u)}invert(){return new en(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Cn(n.pos,r.pos,this.mark)}merge(t){return t instanceof Cn&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Cn(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 Cn(n.from,n.to,t.markFromJSON(n.mark))}}it.jsonID("addMark",Cn);class en extends it{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new Z(_c(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),t),n.openStart,n.openEnd);return He.fromReplace(t,this.from,this.to,r)}invert(){return new Cn(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new en(n.pos,r.pos,this.mark)}merge(t){return t instanceof en&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new en(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 en(n.from,n.to,t.markFromJSON(n.mark))}}it.jsonID("removeMark",en);class zn extends it{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return He.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return He.fromReplace(t,this.pos,this.pos+1,new Z(Q.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new zn(this.pos,n.marks[i]);return new zn(this.pos,this.mark)}}return new _r(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new zn(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 zn(n.pos,t.markFromJSON(n.mark))}}it.jsonID("addNodeMark",zn);class _r extends it{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return He.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return He.fromReplace(t,this.pos,this.pos+1,new Z(Q.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new zn(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new _r(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 _r(n.pos,t.markFromJSON(n.mark))}}it.jsonID("removeNodeMark",_r);class Pe extends it{constructor(t,n,r,i=!1){super(),this.from=t,this.to=n,this.slice=r,this.structure=i}apply(t){return this.structure&&Ll(t,this.from,this.to)?He.fail("Structure replace would overwrite content"):He.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new xt([this.from,this.to-this.from,this.slice.size])}invert(t){return new Pe(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.to,-1),r=this.from==this.to&&Pe.MAP_BIAS<0?n:t.mapResult(this.from,1);return r.deletedAcross&&n.deletedAcross?null:new Pe(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(t){if(!(t instanceof Pe)||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?Z.empty:new Z(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new Pe(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?Z.empty:new Z(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new Pe(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 Pe(n.from,n.to,Z.fromJSON(t,n.slice),!!n.structure)}}Pe.MAP_BIAS=1;it.jsonID("replace",Pe);class nt extends it{constructor(t,n,r,i,u,s,a=!1){super(),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=u,this.insert=s,this.structure=a}apply(t){if(this.structure&&(Ll(t,this.from,this.gapFrom)||Ll(t,this.gapTo,this.to)))return He.fail("Structure gap-replace would overwrite content");let n=t.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return He.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?He.fromReplace(t,this.from,this.to,r):He.fail("Content does not fit in gap")}getMap(){return new xt([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 nt(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),r=t.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:t.map(this.gapFrom,-1),u=this.to==this.gapTo?r.pos:t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||u>r.pos?null:new nt(n.pos,r.pos,i,u,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 nt(n.from,n.to,n.gapFrom,n.gapTo,Z.fromJSON(t,n.slice),n.insert,!!n.structure)}}it.jsonID("replaceAround",nt);function Ll(e,t,n){let r=e.resolve(t),i=n-t,u=r.depth;for(;i>0&&u>0&&r.indexAfter(u)==r.node(u).childCount;)u--,i--;if(i>0){let s=r.node(u).maybeChild(r.indexAfter(u));for(;i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}}return!1}function uT(e,t,n,r){let i=[],u=[],s,a;e.doc.nodesBetween(t,n,(o,l,c)=>{if(!o.isInline)return;let d=o.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let f=Math.max(l,t),h=Math.min(l+o.nodeSize,n),m=r.addToSet(d);for(let b=0;b<d.length;b++)d[b].isInSet(m)||(s&&s.to==f&&s.mark.eq(d[b])?s.to=h:i.push(s=new en(f,h,d[b])));a&&a.to==f?a.to=h:u.push(a=new Cn(f,h,r))}}),i.forEach(o=>e.step(o)),u.forEach(o=>e.step(o))}function sT(e,t,n,r){let i=[],u=0;e.doc.nodesBetween(t,n,(s,a)=>{if(!s.isInline)return;u++;let o=null;if(r instanceof ka){let l=s.marks,c;for(;c=r.isInSet(l);)(o||(o=[])).push(c),l=c.removeFromSet(l)}else r?r.isInSet(s.marks)&&(o=[r]):o=s.marks;if(o&&o.length){let l=Math.min(a+s.nodeSize,n);for(let c=0;c<o.length;c++){let d=o[c],f;for(let h=0;h<i.length;h++){let m=i[h];m.step==u-1&&d.eq(i[h].style)&&(f=m)}f?(f.to=l,f.step=u):i.push({style:d,from:Math.max(a,t),to:l,step:u})}}}),i.forEach(s=>e.step(new en(s.from,s.to,s.style)))}function Oc(e,t,n,r=n.contentMatch,i=!0){let u=e.doc.nodeAt(t),s=[],a=t+1;for(let o=0;o<u.childCount;o++){let l=u.child(o),c=a+l.nodeSize,d=r.matchType(l.type);if(!d)s.push(new Pe(a,c,Z.empty));else{r=d;for(let f=0;f<l.marks.length;f++)n.allowsMarkType(l.marks[f].type)||e.step(new en(a,c,l.marks[f]));if(i&&l.isText&&n.whitespace!="pre"){let f,h=/\r?\n|\r/g,m;for(;f=h.exec(l.text);)m||(m=new Z(Q.from(n.schema.text(" ",n.allowedMarks(l.marks))),0,0)),s.push(new Pe(a+f.index,a+f.index+f[0].length,m))}}a=c}if(!r.validEnd){let o=r.fillBefore(Q.empty,!0);e.replace(a,a,new Z(o,0,0))}for(let o=s.length-1;o>=0;o--)e.step(s[o])}function aT(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Sa(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth,i=0,u=0;;--r){let s=e.$from.node(r),a=e.$from.index(r)+i,o=e.$to.indexAfter(r)-u;if(r<e.depth&&s.canReplace(a,o,n))return r;if(r==0||s.type.spec.isolating||!aT(s,a,o))break;a&&(i=1),o<s.childCount&&(u=1)}return null}function oT(e,t,n){let{$from:r,$to:i,depth:u}=t,s=r.before(u+1),a=i.after(u+1),o=s,l=a,c=Q.empty,d=0;for(let m=u,b=!1;m>n;m--)b||r.index(m)>0?(b=!0,c=Q.from(r.node(m).copy(c)),d++):o--;let f=Q.empty,h=0;for(let m=u,b=!1;m>n;m--)b||i.after(m+1)<i.end(m)?(b=!0,f=Q.from(i.node(m).copy(f)),h++):l++;e.step(new nt(o,l,s,a,new Z(c.append(f),d,h),c.size-d,!0))}function Rc(e,t,n=null,r=e){let i=lT(e,t),u=i&&cT(r,t);return u?i.map(mh).concat({type:t,attrs:n}).concat(u.map(mh)):null}function mh(e){return{type:e,attrs:null}}function lT(e,t){let{parent:n,startIndex:r,endIndex:i}=e,u=n.contentMatchAt(r).findWrapping(t);if(!u)return null;let s=u.length?u[0]:t;return n.canReplaceWith(r,i,s)?u:null}function cT(e,t){let{parent:n,startIndex:r,endIndex:i}=e,u=n.child(r),s=t.contentMatch.findWrapping(u.type);if(!s)return null;let o=(s.length?s[s.length-1]:t).contentMatch;for(let l=r;o&&l<i;l++)o=o.matchType(n.child(l).type);return!o||!o.validEnd?null:s}function dT(e,t,n){let r=Q.empty;for(let s=n.length-1;s>=0;s--){if(r.size){let a=n[s].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=Q.from(n[s].type.create(n[s].attrs,r))}let i=t.start,u=t.end;e.step(new nt(i,u,i,u,new Z(r,0,0),n.length,!0))}function fT(e,t,n,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let u=e.steps.length;e.doc.nodesBetween(t,n,(s,a)=>{let o=typeof i=="function"?i(s):i;if(s.isTextblock&&!s.hasMarkup(r,o)&&hT(e.doc,e.mapping.slice(u).map(a),r)){let l=null;if(r.schema.linebreakReplacement){let h=r.whitespace=="pre",m=!!r.contentMatch.matchType(r.schema.linebreakReplacement);h&&!m?l=!1:!h&&m&&(l=!0)}l===!1&&Wm(e,s,a,u),Oc(e,e.mapping.slice(u).map(a,1),r,void 0,l===null);let c=e.mapping.slice(u),d=c.map(a,1),f=c.map(a+s.nodeSize,1);return e.step(new nt(d,f,d+1,f-1,new Z(Q.from(r.create(o,null,s.marks)),0,0),1,!0)),l===!0&&Um(e,s,a,u),!1}})}function Um(e,t,n,r){t.forEach((i,u)=>{if(i.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(i.text);){let o=e.mapping.slice(r).map(n+1+u+s.index);e.replaceWith(o,o+1,t.type.schema.linebreakReplacement.create())}}})}function Wm(e,t,n,r){t.forEach((i,u)=>{if(i.type==i.type.schema.linebreakReplacement){let s=e.mapping.slice(r).map(n+1+u);e.replaceWith(s,s+1,t.type.schema.text(`
|
|
37
|
-
`))}})}function hT(e,t,n){let r=e.resolve(t),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function pT(e,t,n,r,i){let u=e.doc.nodeAt(t);if(!u)throw new RangeError("No node at given position");n||(n=u.type);let s=n.create(r,null,i||u.marks);if(u.isLeaf)return e.replaceWith(t,t+u.nodeSize,s);if(!n.validContent(u.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new nt(t,t+u.nodeSize,t+1,t+u.nodeSize-1,new Z(Q.from(s),0,0),1,!0))}function Vi(e,t,n=1,r){let i=e.resolve(t),u=i.depth-n,s=r&&r[r.length-1]||i.parent;if(u<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!s.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let l=i.depth-1,c=n-2;l>u;l--,c--){let d=i.node(l),f=i.index(l);if(d.type.spec.isolating)return!1;let h=d.content.cutByIndex(f,d.childCount),m=r&&r[c+1];m&&(h=h.replaceChild(0,m.type.create(m.attrs)));let b=r&&r[c]||d;if(!d.canReplace(f+1,d.childCount)||!b.type.validContent(h))return!1}let a=i.indexAfter(u),o=r&&r[0];return i.node(u).canReplaceWith(a,a,o?o.type:i.node(u+1).type)}function mT(e,t,n=1,r){let i=e.doc.resolve(t),u=Q.empty,s=Q.empty;for(let a=i.depth,o=i.depth-n,l=n-1;a>o;a--,l--){u=Q.from(i.node(a).copy(u));let c=r&&r[l];s=Q.from(c?c.type.create(c.attrs,s):i.node(a).copy(s))}e.step(new Pe(t,t,new Z(u.append(s),n,n),!0))}function Ia(e,t){let n=e.resolve(t),r=n.index();return gT(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function AT(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let i=0;i<t.childCount;i++){let u=t.child(i),s=u.type==r?e.type.schema.nodes.text:u.type;if(n=n.matchType(s),!n||!e.type.allowsMarks(u.marks))return!1}return n.validEnd}function gT(e,t){return!!(e&&t&&!e.isLeaf&&AT(e,t))}function bT(e,t,n){let r=null,{linebreakReplacement:i}=e.doc.type.schema,u=e.doc.resolve(t-n),s=u.node().type;if(i&&s.inlineContent){let c=s.whitespace=="pre",d=!!s.contentMatch.matchType(i);c&&!d?r=!1:!c&&d&&(r=!0)}let a=e.steps.length;if(r===!1){let c=e.doc.resolve(t+n);Wm(e,c.node(),c.before(),a)}s.inlineContent&&Oc(e,t+n-1,s,u.node().contentMatchAt(u.index()),r==null);let o=e.mapping.slice(a),l=o.map(t-n);if(e.step(new Pe(l,o.map(t+n,-1),Z.empty,!0)),r===!0){let c=e.doc.resolve(l);Um(e,c.node(),c.before(),e.steps.length)}return e}function ET(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let i=r.depth-1;i>=0;i--){let u=r.index(i);if(r.node(i).canReplaceWith(u,u,n))return r.before(i+1);if(u>0)return null}if(r.parentOffset==r.parent.content.size)for(let i=r.depth-1;i>=0;i--){let u=r.indexAfter(i);if(r.node(i).canReplaceWith(u,u,n))return r.after(i+1);if(u<r.node(i).childCount)return null}return null}function yT(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let u=0;u<n.openStart;u++)i=i.firstChild.content;for(let u=1;u<=(n.openStart==0&&n.size?2:1);u++)for(let s=r.depth;s>=0;s--){let a=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,o=r.index(s)+(a>0?1:0),l=r.node(s),c=!1;if(u==1)c=l.canReplace(o,o,i);else{let d=l.contentMatchAt(o).findWrapping(i.firstChild.type);c=d&&l.canReplaceWith(o,o,d[0])}if(c)return a==0?r.pos:a<0?r.before(s+1):r.after(s+1)}return null}function wa(e,t,n=t,r=Z.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),u=e.resolve(n);return Qm(i,u,r)?new Pe(t,n,r):new TT(i,u,r).fit()}function Qm(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class TT{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=Q.empty;for(let i=0;i<=t.depth;i++){let u=t.node(i);this.frontier.push({type:u.type,match:u.contentMatchAt(t.indexAfter(i))})}for(let i=t.depth;i>0;i--)this.placed=Q.from(t.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let l=this.findFittable();l?this.placeNodes(l):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(t<0?this.$to:r.doc.resolve(t));if(!i)return null;let u=this.placed,s=r.depth,a=i.depth;for(;s&&a&&u.childCount==1;)u=u.firstChild.content,s--,a--;let o=new Z(u,s,a);return t>-1?new nt(r.pos,t,this.$to.pos,this.$to.end(),o,n):o.size||r.pos!=this.$to.pos?new Pe(r.pos,i.pos,o):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<t;r++){let u=n.firstChild;if(n.childCount>1&&(i=0),u.type.spec.isolating&&i<=r){t=r;break}n=u.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let i,u=null;r?(u=co(this.unplaced.content,r-1).firstChild,i=u.content):i=this.unplaced.content;let s=i.firstChild;for(let a=this.depth;a>=0;a--){let{type:o,match:l}=this.frontier[a],c,d=null;if(n==1&&(s?l.matchType(s.type)||(d=l.fillBefore(Q.from(s),!1)):u&&o.compatibleContent(u.type)))return{sliceDepth:r,frontierDepth:a,parent:u,inject:d};if(n==2&&s&&(c=l.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:a,parent:u,wrap:c};if(u&&l.matchType(u.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=co(t,n);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new Z(t,n+1,Math.max(r,i.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=co(t,n);if(i.childCount<=1&&n>0){let u=t.size-n<=n+i.size;this.unplaced=new Z(Hi(t,n-1,1),n-1,u?n-1:r)}else this.unplaced=new Z(Hi(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:i,wrap:u}){for(;this.depth>n;)this.closeFrontierNode();if(u)for(let b=0;b<u.length;b++)this.openFrontierNode(u[b]);let s=this.unplaced,a=r?r.content:s.content,o=s.openStart-t,l=0,c=[],{match:d,type:f}=this.frontier[n];if(i){for(let b=0;b<i.childCount;b++)c.push(i.child(b));d=d.matchFragment(i)}let h=a.size+t-(s.content.size-s.openEnd);for(;l<a.childCount;){let b=a.child(l),T=d.matchType(b.type);if(!T)break;l++,(l>1||o==0||b.content.size)&&(d=T,c.push(zm(b.mark(f.allowedMarks(b.marks)),l==1?o:0,l==a.childCount?h:-1)))}let m=l==a.childCount;m||(h=-1),this.placed=Ui(this.placed,n,Q.from(c)),this.frontier[n].match=d,m&&h<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let b=0,T=a;b<h;b++){let E=T.lastChild;this.frontier.push({type:E.type,match:E.contentMatchAt(E.childCount)}),T=E.content}this.unplaced=m?t==0?Z.empty:new Z(Hi(s.content,t-1,1),t-1,h<0?s.openEnd:t-1):new Z(Hi(s.content,t,l),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t=this.frontier[this.depth],n;if(!t.type.isTextblock||!fo(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:r}=this.$to,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:i}=this.frontier[n],u=n<t.depth&&t.end(n+1)==t.pos+(t.depth-(n+1)),s=fo(t,n,i,r,u);if(s){for(let a=n-1;a>=0;a--){let{match:o,type:l}=this.frontier[a],c=fo(t,a,l,o,!0);if(!c||c.childCount)continue e}return{depth:n,fit:s,move:u?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=Ui(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let i=t.node(r),u=i.type.contentMatch.fillBefore(i.content,!0,t.index(r));this.openFrontierNode(i.type,i.attrs,u)}return t}openFrontierNode(t,n=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(t),this.placed=Ui(this.placed,this.depth,Q.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(Q.empty,!0);n.childCount&&(this.placed=Ui(this.placed,this.frontier.length,n))}}function Hi(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(Hi(e.firstChild.content,t-1,n)))}function Ui(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(Ui(e.lastChild.content,t-1,n)))}function co(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function zm(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,zm(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(Q.empty,!0)))),e.copy(r)}function fo(e,t,n,r,i){let u=e.node(t),s=i?e.indexAfter(t):e.index(t);if(s==u.childCount&&!n.compatibleContent(u.type))return null;let a=r.fillBefore(u.content,!0,s);return a&&!CT(n,u.content,s)?a:null}function CT(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}function xT(e){return e.spec.defining||e.spec.definingForContent}function kT(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let i=e.doc.resolve(t),u=e.doc.resolve(n);if(Qm(i,u,r))return e.step(new Pe(t,n,r));let s=qm(i,u);s[s.length-1]==0&&s.pop();let a=-(i.depth+1);s.unshift(a);for(let f=i.depth,h=i.pos-1;f>0;f--,h--){let m=i.node(f).type.spec;if(m.defining||m.definingAsContext||m.isolating)break;s.indexOf(f)>-1?a=f:i.before(f)==h&&s.splice(1,0,-f)}let o=s.indexOf(a),l=[],c=r.openStart;for(let f=r.content,h=0;;h++){let m=f.firstChild;if(l.push(m),h==r.openStart)break;f=m.content}for(let f=c-1;f>=0;f--){let h=l[f],m=xT(h.type);if(m&&!h.sameMarkup(i.node(Math.abs(a)-1)))c=f;else if(m||!h.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let h=(f+c+1)%(r.openStart+1),m=l[h];if(m)for(let b=0;b<s.length;b++){let T=s[(b+o)%s.length],E=!0;T<0&&(E=!1,T=-T);let O=i.node(T-1),w=i.index(T-1);if(O.canReplaceWith(w,w,m.type,m.marks))return e.replace(i.before(T),E?u.after(T):n,new Z(Km(r.content,0,r.openStart,h),h,r.openEnd))}}let d=e.steps.length;for(let f=s.length-1;f>=0&&(e.replace(t,n,r),!(e.steps.length>d));f--){let h=s[f];h<0||(t=i.before(h),n=u.after(h))}}function Km(e,t,n,r,i){if(t<n){let u=e.firstChild;e=e.replaceChild(0,u.copy(Km(u.content,t+1,n,r,u)))}if(t>r){let u=i.contentMatchAt(0),s=u.fillBefore(e).append(e);e=s.append(u.matchFragment(s).fillBefore(Q.empty,!0))}return e}function ST(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let i=ET(e.doc,t,r.type);i!=null&&(t=n=i)}e.replaceRange(t,n,new Z(Q.from(r),0,0))}function IT(e,t,n){let r=e.doc.resolve(t),i=e.doc.resolve(n);if(r.parent.isTextblock&&i.parent.isTextblock&&r.start()!=i.start()&&r.parentOffset==0&&i.parentOffset==0){let s=r.sharedDepth(n),a=!1;for(let o=r.depth;o>s;o--)r.node(o).type.spec.isolating&&(a=!0);for(let o=i.depth;o>s;o--)i.node(o).type.spec.isolating&&(a=!0);if(!a){for(let o=r.depth;o>0&&t==r.start(o);o--)t=r.before(o);for(let o=i.depth;o>0&&n==i.start(o);o--)n=i.before(o);r=e.doc.resolve(t),i=e.doc.resolve(n)}}let u=qm(r,i);for(let s=0;s<u.length;s++){let a=u[s],o=s==u.length-1;if(o&&a==0||r.node(a).type.contentMatch.validEnd)return e.delete(r.start(a),i.end(a));if(a>0&&(o||r.node(a-1).canReplace(r.index(a-1),i.indexAfter(a-1))))return e.delete(r.before(a),i.after(a))}for(let s=1;s<=r.depth&&s<=i.depth;s++)if(t-r.start(s)==r.depth-s&&n>r.end(s)&&i.end(s)-n!=i.depth-s&&r.start(s-1)==i.start(s-1)&&r.node(s-1).canReplace(r.index(s-1),i.index(s-1)))return e.delete(r.before(s),n);e.delete(t,n)}function qm(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let i=r;i>=0;i--){let u=e.start(i);if(u<e.pos-(e.depth-i)||t.end(i)>t.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;(u==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==u-1)&&n.push(i)}return n}class $r extends it{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return He.fail("No node at attribute step's position");let r=Object.create(null);for(let u in n.attrs)r[u]=n.attrs[u];r[this.attr]=this.value;let i=n.type.create(r,null,n.marks);return He.fromReplace(t,this.pos,this.pos+1,new Z(Q.from(i),0,n.isLeaf?0:1))}getMap(){return xt.empty}invert(t){return new $r(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 $r(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 $r(n.pos,n.attr,n.value)}}it.jsonID("attr",$r);class cu extends it{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let i in t.attrs)n[i]=t.attrs[i];n[this.attr]=this.value;let r=t.type.create(n,t.content,t.marks);return He.ok(r)}getMap(){return xt.empty}invert(t){return new cu(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 cu(n.attr,n.value)}}it.jsonID("docAttr",cu);let si=class extends Error{};si=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};si.prototype=Object.create(Error.prototype);si.prototype.constructor=si;si.prototype.name="TransformError";class Ym{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Ws}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new si(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 r=0;r<this.mapping.maps.length;r++){let i=this.mapping.maps[r];r&&(t=i.map(t,1),n=i.map(n,-1)),i.forEach((u,s,a,o)=>{t=Math.min(t,a),n=Math.max(n,o)})}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,r=Z.empty){let i=wa(this.doc,t,n,r);return i&&this.step(i),this}replaceWith(t,n,r){return this.replace(t,n,new Z(Q.from(r),0,0))}delete(t,n){return this.replace(t,n,Z.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,r){return kT(this,t,n,r),this}replaceRangeWith(t,n,r){return ST(this,t,n,r),this}deleteRange(t,n){return IT(this,t,n),this}lift(t,n){return oT(this,t,n),this}join(t,n=1){return bT(this,t,n),this}wrap(t,n){return dT(this,t,n),this}setBlockType(t,n=t,r,i=null){return fT(this,t,n,r,i),this}setNodeMarkup(t,n,r=null,i){return pT(this,t,n,r,i),this}setNodeAttribute(t,n,r){return this.step(new $r(t,n,r)),this}setDocAttribute(t,n){return this.step(new cu(t,n)),this}addNodeMark(t,n){return this.step(new zn(t,n)),this}removeNodeMark(t,n){let r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(n instanceof ye)n.isInSet(r.marks)&&this.step(new _r(t,n));else{let i=r.marks,u,s=[];for(;u=n.isInSet(i);)s.push(new _r(t,u)),i=u.removeFromSet(i);for(let a=s.length-1;a>=0;a--)this.step(s[a])}return this}split(t,n=1,r){return mT(this,t,n,r),this}addMark(t,n,r){return uT(this,t,n,r),this}removeMark(t,n,r){return sT(this,t,n,r),this}clearIncompatible(t,n,r){return Oc(this,t,n,r),this}}const ho=Object.create(null);class ce{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new Gm(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=Z.empty){let r=n.content.lastChild,i=null;for(let a=0;a<n.openEnd;a++)i=r,r=r.lastChild;let u=t.steps.length,s=this.ranges;for(let a=0;a<s.length;a++){let{$from:o,$to:l}=s[a],c=t.mapping.slice(u);t.replaceRange(c.map(o.pos),c.map(l.pos),a?Z.empty:n),a==0&&bh(t,u,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(t,n){let r=t.steps.length,i=this.ranges;for(let u=0;u<i.length;u++){let{$from:s,$to:a}=i[u],o=t.mapping.slice(r),l=o.map(s.pos),c=o.map(a.pos);u?t.deleteRange(l,c):(t.replaceRangeWith(l,c,n),bh(t,r,n.isInline?-1:1))}}static findFrom(t,n,r=!1){let i=t.parent.inlineContent?new de(t):Gr(t.node(0),t.parent,t.pos,t.index(),n,r);if(i)return i;for(let u=t.depth-1;u>=0;u--){let s=n<0?Gr(t.node(0),t.node(u),t.before(u+1),t.index(u),n,r):Gr(t.node(0),t.node(u),t.after(u+1),t.index(u)+1,n,r);if(s)return s}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new It(t.node(0))}static atStart(t){return Gr(t,t,0,0,1)||new It(t)}static atEnd(t){return Gr(t,t,t.content.size,t.childCount,-1)||new It(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=ho[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in ho)throw new RangeError("Duplicate use of selection JSON ID "+t);return ho[t]=n,n.prototype.jsonID=t,n}getBookmark(){return de.between(this.$anchor,this.$head).getBookmark()}}ce.prototype.visible=!0;class Gm{constructor(t,n){this.$from=t,this.$to=n}}let Ah=!1;function gh(e){!Ah&&!e.parent.inlineContent&&(Ah=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class de extends ce{constructor(t,n=t){gh(t),gh(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return ce.near(r);let i=t.resolve(n.map(this.anchor));return new de(i.parent.inlineContent?i:r,r)}replace(t,n=Z.empty){if(super.replace(t,n),n==Z.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof de&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new Na(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 de(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let i=t.resolve(n);return new this(i,r==n?i:t.resolve(r))}static between(t,n,r){let i=t.pos-n.pos;if((!r||i)&&(r=i>=0?1:-1),!n.parent.inlineContent){let u=ce.findFrom(n,r,!0)||ce.findFrom(n,-r,!0);if(u)n=u.$head;else return ce.near(n,r)}return t.parent.inlineContent||(i==0?t=n:(t=(ce.findFrom(t,-r,!0)||ce.findFrom(t,r,!0)).$anchor,t.pos<n.pos!=i<0&&(t=n))),new de(t,n)}}ce.jsonID("text",de);class Na{constructor(t,n){this.anchor=t,this.head=n}map(t){return new Na(t.map(this.anchor),t.map(this.head))}resolve(t){return de.between(t.resolve(this.anchor),t.resolve(this.head))}}class oe extends ce{constructor(t){let n=t.nodeAfter,r=t.node(0).resolve(t.pos+n.nodeSize);super(t,r),this.node=n}map(t,n){let{deleted:r,pos:i}=n.mapResult(this.anchor),u=t.resolve(i);return r?ce.near(u):new oe(u)}content(){return new Z(Q.from(this.node),0,0)}eq(t){return t instanceof oe&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Mc(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new oe(t.resolve(n.anchor))}static create(t,n){return new oe(t.resolve(n))}static isSelectable(t){return!t.isText&&t.type.spec.selectable!==!1}}oe.prototype.visible=!1;ce.jsonID("node",oe);class Mc{constructor(t){this.anchor=t}map(t){let{deleted:n,pos:r}=t.mapResult(this.anchor);return n?new Na(r,r):new Mc(r)}resolve(t){let n=t.resolve(this.anchor),r=n.nodeAfter;return r&&oe.isSelectable(r)?new oe(n):ce.near(n)}}class It extends ce{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,n=Z.empty){if(n==Z.empty){t.delete(0,t.doc.content.size);let r=ce.atStart(t.doc);r.eq(t.selection)||t.setSelection(r)}else super.replace(t,n)}toJSON(){return{type:"all"}}static fromJSON(t){return new It(t)}map(t){return new It(t)}eq(t){return t instanceof It}getBookmark(){return wT}}ce.jsonID("all",It);const wT={map(){return this},resolve(e){return new It(e)}};function Gr(e,t,n,r,i,u=!1){if(t.inlineContent)return de.create(e,n);for(let s=r-(i>0?0:1);i>0?s<t.childCount:s>=0;s+=i){let a=t.child(s);if(a.isAtom){if(!u&&oe.isSelectable(a))return oe.create(e,n-(i<0?a.nodeSize:0))}else{let o=Gr(e,a,n+i,i<0?a.childCount:0,i,u);if(o)return o}n+=a.nodeSize*i}return null}function bh(e,t,n){let r=e.steps.length-1;if(r<t)return;let i=e.steps[r];if(!(i instanceof Pe||i instanceof nt))return;let u=e.mapping.maps[r],s;u.forEach((a,o,l,c)=>{s==null&&(s=c)}),e.setSelection(ce.near(e.doc.resolve(s),n))}const Eh=1,as=2,yh=4;class NT extends Ym{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|Eh)&~as,this.storedMarks=null,this}get selectionSet(){return(this.updated&Eh)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=as,this}ensureMarks(t){return ye.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&as)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&~as,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,n=!0){let r=this.selection;return n&&(t=t.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||ye.none))),r.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,n,r){let i=this.doc.type.schema;if(n==null)return t?this.replaceSelectionWith(i.text(t),!0):this.deleteSelection();{if(r==null&&(r=n),!t)return this.deleteRange(n,r);let u=this.storedMarks;if(!u){let s=this.doc.resolve(n);u=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,i.text(t,u)),!this.selection.empty&&this.selection.to==n+t.length&&this.setSelection(ce.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|=yh,this}get scrolledIntoView(){return(this.updated&yh)>0}}function Th(e,t){return!t||!e?e:e.bind(t)}class Wi{constructor(t,n,r){this.name=t,this.init=Th(n.init,r),this.apply=Th(n.apply,r)}}const DT=[new Wi("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new Wi("selection",{init(e,t){return e.selection||ce.atStart(t.doc)},apply(e){return e.selection}}),new Wi("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new Wi("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];class po{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=DT.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Wi(r.key,r.spec.state,r))})}}class Xr{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 r=0;r<this.config.plugins.length;r++)if(r!=n){let i=this.config.plugins[r];if(i.spec.filterTransaction&&!i.spec.filterTransaction.call(i,t,this))return!1}return!0}applyTransaction(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};let n=[t],r=this.applyInner(t),i=null;for(;;){let u=!1;for(let s=0;s<this.config.plugins.length;s++){let a=this.config.plugins[s];if(a.spec.appendTransaction){let o=i?i[s].n:0,l=i?i[s].state:this,c=o<n.length&&a.spec.appendTransaction.call(a,o?n.slice(o):n,l,r);if(c&&r.filterTransaction(c,s)){if(c.setMeta("appendedTransaction",t),!i){i=[];for(let d=0;d<this.config.plugins.length;d++)i.push(d<s?{state:r,n:n.length}:{state:this,n:0})}n.push(c),r=r.applyInner(c),u=!0}i&&(i[s]={state:r,n:n.length})}}if(!u)return{state:r,transactions:n}}}applyInner(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new Xr(this.config),r=this.config.fields;for(let i=0;i<r.length;i++){let u=r[i];n[u.name]=u.apply(t,this[u.name],this,n)}return n}get tr(){return new NT(this)}static create(t){let n=new po(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new Xr(n);for(let i=0;i<n.fields.length;i++)r[n.fields[i].name]=n.fields[i].init(t,r);return r}reconfigure(t){let n=new po(this.schema,t.plugins),r=n.fields,i=new Xr(n);for(let u=0;u<r.length;u++){let s=r[u].name;i[s]=this.hasOwnProperty(s)?this[s]:r[u].init(t,i)}return i}toJSON(t){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),t&&typeof t=="object")for(let r in t){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=t[r],u=i.spec.state;u&&u.toJSON&&(n[r]=u.toJSON.call(i,this[i.key]))}return n}static fromJSON(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let i=new po(t.schema,t.plugins),u=new Xr(i);return i.fields.forEach(s=>{if(s.name=="doc")u.doc=kn.fromJSON(t.schema,n.doc);else if(s.name=="selection")u.selection=ce.fromJSON(u.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(u.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let a in r){let o=r[a],l=o.spec.state;if(o.key==s.name&&l&&l.fromJSON&&Object.prototype.hasOwnProperty.call(n,a)){u[s.name]=l.fromJSON.call(o,t,n[a],u);return}}u[s.name]=s.init(t,u)}}),u}}function Vm(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):r=="handleDOMEvents"&&(i=Vm(i,t,{})),n[r]=i}return n}class wt{constructor(t){this.spec=t,this.props={},t.props&&Vm(t.props,this,this.props),this.key=t.key?t.key.key:Jm("plugin")}getState(t){return t[this.key]}}const mo=Object.create(null);function Jm(e){return e in mo?e+"$"+ ++mo[e]:(mo[e]=0,e+"$")}class Nt{constructor(t="key"){this.key=Jm(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const Bc=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function jm(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}const Zm=(e,t,n)=>{let r=jm(e,n);if(!r)return!1;let i=Lc(r);if(!i){let s=r.blockRange(),a=s&&Sa(s);return a==null?!1:(t&&t(e.tr.lift(s,a).scrollIntoView()),!0)}let u=i.nodeBefore;if(eA(e,i,t,-1))return!0;if(r.parent.content.size==0&&(ai(u,"end")||oe.isSelectable(u)))for(let s=r.depth;;s--){let a=wa(e.doc,r.before(s),r.after(s),Z.empty);if(a&&a.slice.size<a.to-a.from){if(t){let o=e.tr.step(a);o.setSelection(ai(u,"end")?ce.findFrom(o.doc.resolve(o.mapping.map(i.pos,-1)),-1):oe.create(o.doc,i.pos-u.nodeSize)),t(o.scrollIntoView())}return!0}if(s==1||r.node(s-1).childCount>1)break}return u.isAtom&&i.depth==r.depth-1?(t&&t(e.tr.delete(i.pos-u.nodeSize,i.pos).scrollIntoView()),!0):!1},_T=(e,t,n)=>{let r=jm(e,n);if(!r)return!1;let i=Lc(r);return i?OT(e,i,t):!1};function OT(e,t,n){let r=t.nodeBefore,i=r,u=t.pos-1;for(;!i.isTextblock;u--){if(i.type.spec.isolating)return!1;let c=i.lastChild;if(!c)return!1;i=c}let s=t.nodeAfter,a=s,o=t.pos+1;for(;!a.isTextblock;o++){if(a.type.spec.isolating)return!1;let c=a.firstChild;if(!c)return!1;a=c}let l=wa(e.doc,u,o,Z.empty);if(!l||l.from!=u||l instanceof Pe&&l.slice.size>=o-u)return!1;if(n){let c=e.tr.step(l);c.setSelection(de.create(c.doc,u)),n(c.scrollIntoView())}return!0}function ai(e,t,n=!1){for(let r=e;r;r=t=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const Xm=(e,t,n)=>{let{$head:r,empty:i}=e.selection,u=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;u=Lc(r)}let s=u&&u.nodeBefore;return!s||!oe.isSelectable(s)?!1:(t&&t(e.tr.setSelection(oe.create(e.doc,u.pos-s.nodeSize)).scrollIntoView()),!0)};function Lc(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 RT(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size)?null:n}const MT=(e,t,n)=>{let r=RT(e,n);if(!r)return!1;let i=$m(r);if(!i)return!1;let u=i.nodeAfter;if(eA(e,i,t,1))return!0;if(r.parent.content.size==0&&(ai(u,"start")||oe.isSelectable(u))){let s=wa(e.doc,r.before(),r.after(),Z.empty);if(s&&s.slice.size<s.to-s.from){if(t){let a=e.tr.step(s);a.setSelection(ai(u,"start")?ce.findFrom(a.doc.resolve(a.mapping.map(i.pos)),1):oe.create(a.doc,a.mapping.map(i.pos))),t(a.scrollIntoView())}return!0}}return u.isAtom&&i.depth==r.depth-1?(t&&t(e.tr.delete(i.pos,i.pos+u.nodeSize).scrollIntoView()),!0):!1},BT=(e,t,n)=>{let{$head:r,empty:i}=e.selection,u=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;u=$m(r)}let s=u&&u.nodeAfter;return!s||!oe.isSelectable(s)?!1:(t&&t(e.tr.setSelection(oe.create(e.doc,u.pos)).scrollIntoView()),!0)};function $m(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}const LT=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(`
|
|
38
|
-
`).scrollIntoView()),!0)};function
|
|
39
|
-
`,e,t):!1}}});return t}function Bu(e,t,n={}){return new Dt(e,(r,i,u,s)=>{var a,o,l,c;const{tr:d}=r,f=i.length;let h=i[f-1],m=i[0],b=[],T;const E={group:h,fullMatch:m,start:u,end:s},O=(a=n.updateCaptured)==null?void 0:a.call(n,E);if(Object.assign(E,O),{group:h,fullMatch:m,start:u,end:s}=E,m===null||h?.trim()==="")return null;if(h){const w=m.search(/\S/),L=u+m.indexOf(h),_=L+h.length;b=(o=d.storedMarks)!=null?o:[],_<s&&d.delete(_,s),L>u&&d.delete(u+w,L),T=u+w+h.length;const I=(l=n.getAttr)==null?void 0:l.call(n,i);d.addMark(u,T,t.create(I)),d.setStoredMarks(b),(c=n.beforeDispatch)==null||c.call(n,{match:i,start:u,end:s,tr:d})}return d})}function uA(e){return Object.assign(Object.create(e),e).setTime(Date.now())}function iC(e,t){return Array.isArray(e)&&e.includes(t.type)||t.type===e}function uC(e){return t=>{for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r)){const i=t.before(n),u=t.after(n);return{from:i,to:u,node:r}}}}}function sC(e,t){return uC(n=>n.type===t)(e)}function aC(e){return t=>{for(let n=t.depth;n>0;n--){const r=t.node(n);if(e(r))return{pos:t.before(n),start:t.start(n),depth:n,node:r}}}}function oC(e,t){if(!(e instanceof oe))return;const{node:n,$from:r}=e;if(iC(t,n))return{node:n,pos:r.pos,start:r.start(r.depth),depth:r.depth}}const lC=(e,t)=>{const{selection:n,doc:r}=e;if(n instanceof oe)return{hasNode:n.node.type===t,pos:n.from,target:n.node};const{from:i,to:u}=n;let s=!1,a=-1,o=null;return r.nodesBetween(i,u,(l,c)=>o?!1:l.type===t?(s=!0,a=c,o=l,!1):!0),{hasNode:s,pos:a,target:o}};var er={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:"'"},Qs={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},cC=typeof navigator<"u"&&/Mac/.test(navigator.platform),dC=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var je=0;je<10;je++)er[48+je]=er[96+je]=String(je);for(var je=1;je<=24;je++)er[je+111]="F"+je;for(var je=65;je<=90;je++)er[je]=String.fromCharCode(je+32),Qs[je]=String.fromCharCode(je);for(var bo in er)Qs.hasOwnProperty(bo)||(Qs[bo]=er[bo]);function fC(e){var t=cC&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||dC&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?Qs:er)[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}const hC=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),pC=typeof navigator<"u"&&/Win/.test(navigator.platform);function mC(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let r,i,u,s;for(let a=0;a<t.length-1;a++){let o=t[a];if(/^(cmd|meta|m)$/i.test(o))s=!0;else if(/^a(lt)?$/i.test(o))r=!0;else if(/^(c|ctrl|control)$/i.test(o))i=!0;else if(/^s(hift)?$/i.test(o))u=!0;else if(/^mod$/i.test(o))hC?s=!0:i=!0;else throw new Error("Unrecognized modifier name: "+o)}return r&&(n="Alt-"+n),i&&(n="Ctrl-"+n),s&&(n="Meta-"+n),u&&(n="Shift-"+n),n}function AC(e){let t=Object.create(null);for(let n in e)t[mC(n)]=e[n];return t}function Eo(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 gC(e){return new wt({props:{handleKeyDown:sA(e)}})}function sA(e){let t=AC(e);return function(n,r){let i=fC(r),u,s=t[Eo(i,r)];if(s&&s(n.state,n.dispatch,n))return!0;if(i.length==1&&i!=" "){if(r.shiftKey){let a=t[Eo(i,r,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(pC&&r.ctrlKey&&r.altKey)&&(u=er[r.keyCode])&&u!=i){let a=t[Eo(u,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}var aA=class{},oA=class{constructor(){this.elements=[],this.size=()=>this.elements.length,this.top=()=>this.elements.at(-1),this.push=e=>{this.top()?.push(e)},this.open=e=>{this.elements.push(e)},this.close=()=>{const e=this.elements.pop();if(!e)throw Pp();return e}}},bC=class lA extends aA{constructor(t,n,r){super(),this.type=t,this.content=n,this.attrs=r}push(t,...n){this.content.push(t,...n)}pop(){return this.content.pop()}static create(t,n,r){return new lA(t,n,r)}},jt,Su,oa,la,ca,Iu,wu,Sr,EC=(Sr=class extends oA{constructor(n){super();Le(this,jt,ye.none);Le(this,Su,n=>n.isText);Le(this,oa,(n,r)=>{if(he(this,Su).call(this,n)&&he(this,Su).call(this,r)&&ye.sameSet(n.marks,r.marks))return this.schema.text(n.text+r.text,n.marks)});Le(this,la,n=>{const r=Object.values({...this.schema.nodes,...this.schema.marks}).find(i=>i.spec.parseMarkdown.match(n));if(!r)throw zb(n);return r});Le(this,ca,n=>{const r=he(this,la).call(this,n);r.spec.parseMarkdown.runner(this,n,r)});Le(this,Iu,()=>{zr(this,jt,ye.none);const n=this.close();return he(this,wu).call(this,n.type,n.attrs,n.content)});Le(this,wu,(n,r,i)=>{const u=n.createAndFill(r,i,he(this,jt));if(!u)throw Qb(n,r,i);return this.push(u),u});this.injectRoot=(r,i,u)=>(this.openNode(i,u),this.next(r.children),this),this.openNode=(r,i)=>(this.open(bC.create(r,[],i)),this),this.closeNode=()=>{try{he(this,Iu).call(this)}catch(r){console.error(r)}return this},this.addNode=(r,i,u)=>{try{he(this,wu).call(this,r,i,u)}catch(s){console.error(s)}return this},this.openMark=(r,i)=>(zr(this,jt,r.create(i).addToSet(he(this,jt))),this),this.closeMark=r=>(zr(this,jt,r.removeFromSet(he(this,jt))),this),this.addText=r=>{try{const i=this.top();if(!i)throw Pp();const u=i.pop(),s=this.schema.text(r,he(this,jt));if(!u)return i.push(s),this;const a=he(this,oa).call(this,u,s);return a?(i.push(a),this):(i.push(u,s),this)}catch(i){return console.error(i),this}},this.build=()=>{let r;do r=he(this,Iu).call(this);while(this.size());return r},this.next=(r=[])=>([r].flat().forEach(i=>he(this,ca).call(this,i)),this),this.toDoc=()=>this.build(),this.run=(r,i)=>{const u=r.runSync(r.parse(i),i);return this.next(u),this},this.schema=n}},jt=new WeakMap,Su=new WeakMap,oa=new WeakMap,la=new WeakMap,ca=new WeakMap,Iu=new WeakMap,wu=new WeakMap,Sr.create=(n,r)=>{const i=new Sr(n);return u=>(i.run(r,u),i.toDoc())},Sr),Ir,kh=(Ir=class extends aA{constructor(t,n,r,i={}){super(),this.type=t,this.children=n,this.value=r,this.props=i,this.push=(u,...s)=>{this.children||(this.children=[]),this.children.push(u,...s)},this.pop=()=>this.children?.pop()}},Ir.create=(t,n,r,i={})=>new Ir(t,n,r,i),Ir),yC=e=>Object.prototype.hasOwnProperty.call(e,"size"),yn,Nu,da,fa,Du,ha,_u,pa,ma,ii,gr,Aa,Ou,wr,TC=(wr=class extends oA{constructor(n){super();Le(this,yn,ye.none);Le(this,Nu,n=>{const r=Object.values({...this.schema.nodes,...this.schema.marks}).find(i=>i.spec.toMarkdown.match(n));if(!r)throw Kb(n.type);return r});Le(this,da,n=>he(this,Nu).call(this,n).spec.toMarkdown.runner(this,n));Le(this,fa,(n,r)=>he(this,Nu).call(this,n).spec.toMarkdown.runner(this,n,r));Le(this,Du,n=>{const{marks:r}=n,i=u=>u.type.spec.priority??50;[...r].sort((u,s)=>i(u)-i(s)).every(u=>!he(this,fa).call(this,u,n))&&he(this,da).call(this,n),r.forEach(u=>he(this,Ou).call(this,u))});Le(this,ha,(n,r)=>{if(n.type===r||n.children?.length!==1)return n;const i=o=>{if(o.type===r)return o.value!=null?null:o;if(o.children?.length!==1)return null;const[l]=o.children;return l?i(l):null},u=i(n);if(!u)return n;const s=u.children?[...u.children]:void 0,a={...n,children:s};return a.children=s,u.children=[a],u});Le(this,_u,n=>{const{children:r}=n;return r&&(n.children=r.reduce((i,u,s)=>{if(s===0)return[u];const a=i.at(-1);if(a&&a.isMark&&u.isMark){u=he(this,ha).call(this,u,a.type);const{children:o,...l}=u,{children:c,...d}=a;if(u.type===a.type&&o&&c&&JSON.stringify(l)===JSON.stringify(d)){const f={...d,children:[...c,...o]};return i.slice(0,-1).concat(he(this,_u).call(this,f))}}return i.concat(u)},[])),n});Le(this,pa,n=>{const r={...n.props,type:n.type};return n.children&&(r.children=n.children),n.value&&(r.value=n.value),r});Le(this,ma,(n,r)=>{let i="",u="";const s=n.children;let a=-1,o=-1;const l=d=>{d&&d.forEach((f,h)=>{f.type==="text"&&f.value&&(a<0&&(a=h),o=h)})};if(s){l(s);const d=s?.[o],f=s?.[a];if(d&&d.value.endsWith(" ")){const h=d.value,m=h.trimEnd();u=h.slice(m.length),d.value=m}if(f&&f.value.startsWith(" ")){const h=f.value,m=h.trimStart();i=h.slice(0,h.length-m.length),f.value=m}}i.length&&he(this,gr).call(this,"text",void 0,i);const c=r();return u.length&&he(this,gr).call(this,"text",void 0,u),c});Le(this,ii,(n=!1)=>{const r=this.close(),i=()=>he(this,gr).call(this,r.type,r.children,r.value,r.props);return n?he(this,ma).call(this,r,i):i()});Le(this,gr,(n,r,i,u)=>{const s=kh.create(n,r,i,u),a=he(this,_u).call(this,he(this,pa).call(this,s));return this.push(a),a});Le(this,Aa,(n,r,i,u)=>n.isInSet(he(this,yn))?this:(zr(this,yn,n.addToSet(he(this,yn))),this.openNode(r,i,{...u,isMark:!0})));Le(this,Ou,n=>{n.isInSet(he(this,yn))&&(zr(this,yn,n.type.removeFromSet(he(this,yn))),he(this,ii).call(this,!0))});this.openNode=(r,i,u)=>(this.open(kh.create(r,void 0,i,u)),this),this.closeNode=()=>(he(this,ii).call(this),this),this.addNode=(r,i,u,s)=>(he(this,gr).call(this,r,i,u,s),this),this.withMark=(r,i,u,s)=>(he(this,Aa).call(this,r,i,u,s),this),this.closeMark=r=>(he(this,Ou).call(this,r),this),this.build=()=>{let r=null;do r=he(this,ii).call(this);while(this.size());return r},this.next=r=>yC(r)?(r.forEach(i=>{he(this,Du).call(this,i)}),this):(he(this,Du).call(this,r),this),this.toString=r=>r.stringify(this.build()),this.run=r=>(this.next(r),this),this.schema=n}},yn=new WeakMap,Nu=new WeakMap,da=new WeakMap,fa=new WeakMap,Du=new WeakMap,ha=new WeakMap,_u=new WeakMap,pa=new WeakMap,ma=new WeakMap,ii=new WeakMap,gr=new WeakMap,Aa=new WeakMap,Ou=new WeakMap,wr.create=(n,r)=>{const i=new wr(n);return u=>(i.run(u),i.toString(r))},wr);const Ze=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},oi=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let Hl=null;const gn=function(e,t,n){let r=Hl||(Hl=document.createRange());return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},CC=function(){Hl=null},Or=function(e,t,n,r){return n&&(Sh(e,t,n,r,-1)||Sh(e,t,n,r,1))},xC=/^(img|br|input|textarea|hr)$/i;function Sh(e,t,n,r,i){for(var u;;){if(e==n&&t==r)return!0;if(t==(i<0?0:vt(e))){let s=e.parentNode;if(!s||s.nodeType!=1||Lu(e)||xC.test(e.nodeName)||e.contentEditable=="false")return!1;t=Ze(e)+(i<0?0:1),e=s}else if(e.nodeType==1){let s=e.childNodes[t+(i<0?-1:0)];if(s.nodeType==1&&s.contentEditable=="false")if(!((u=s.pmViewDesc)===null||u===void 0)&&u.ignoreForSelection)t+=i;else return!1;else e=s,t=i<0?vt(e):0}else return!1}}function vt(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function kC(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable=="false")return null;e=e.childNodes[t-1],t=vt(e)}else if(e.parentNode&&!Lu(e))t=Ze(e),e=e.parentNode;else return null}}function SC(e,t){for(;;){if(e.nodeType==3&&t<e.nodeValue.length)return e;if(e.nodeType==1&&t<e.childNodes.length){if(e.contentEditable=="false")return null;e=e.childNodes[t],t=0}else if(e.parentNode&&!Lu(e))t=Ze(e)+1,e=e.parentNode;else return null}}function IC(e,t,n){for(let r=t==0,i=t==vt(e);r||i;){if(e==n)return!0;let u=Ze(e);if(e=e.parentNode,!e)return!1;r=r&&u==0,i=i&&u==vt(e)}}function Lu(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)}const _a=function(e){return e.focusNode&&Or(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function hr(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function wC(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function NC(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:Math.min(vt(r.offsetNode),r.offset)}}catch{}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:Math.min(vt(r.startContainer),r.startOffset)}}}const nn=typeof navigator<"u"?navigator:null,Ih=typeof document<"u"?document:null,rr=nn&&nn.userAgent||"",Ul=/Edge\/(\d+)/.exec(rr),cA=/MSIE \d/.exec(rr),Wl=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(rr),gt=!!(cA||Wl||Ul),Jn=cA?document.documentMode:Wl?+Wl[1]:Ul?+Ul[1]:0,Ft=!gt&&/gecko\/(\d+)/i.test(rr);Ft&&+(/Firefox\/(\d+)/.exec(rr)||[0,0])[1];const Ql=!gt&&/Chrome\/(\d+)/.exec(rr),Xe=!!Ql,dA=Ql?+Ql[1]:0,rt=!gt&&!!nn&&/Apple Computer/.test(nn.vendor),li=rt&&(/Mobile\/\w+/.test(rr)||!!nn&&nn.maxTouchPoints>2),Mt=li||(nn?/Mac/.test(nn.platform):!1),fA=nn?/Win/.test(nn.platform):!1,xn=/Android \d/.test(rr),vu=!!Ih&&"webkitFontSmoothing"in Ih.documentElement.style,DC=vu?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function _C(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 hn(e,t){return typeof e=="number"?e:e[t]}function OC(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function wh(e,t,n){let r=e.someProp("scrollThreshold")||0,i=e.someProp("scrollMargin")||5,u=e.dom.ownerDocument;for(let s=n||e.dom;s;){if(s.nodeType!=1){s=oi(s);continue}let a=s,o=a==u.body,l=o?_C(u):OC(a),c=0,d=0;if(t.top<l.top+hn(r,"top")?d=-(l.top-t.top+hn(i,"top")):t.bottom>l.bottom-hn(r,"bottom")&&(d=t.bottom-t.top>l.bottom-l.top?t.top+hn(i,"top")-l.top:t.bottom-l.bottom+hn(i,"bottom")),t.left<l.left+hn(r,"left")?c=-(l.left-t.left+hn(i,"left")):t.right>l.right-hn(r,"right")&&(c=t.right-l.right+hn(i,"right")),c||d)if(o)u.defaultView.scrollBy(c,d);else{let h=a.scrollLeft,m=a.scrollTop;d&&(a.scrollTop+=d),c&&(a.scrollLeft+=c);let b=a.scrollLeft-h,T=a.scrollTop-m;t={left:t.left-b,top:t.top-T,right:t.right-b,bottom:t.bottom-T}}let f=o?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(f))break;s=f=="absolute"?s.offsetParent:oi(s)}}function RC(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,i;for(let u=(t.left+t.right)/2,s=n+1;s<Math.min(innerHeight,t.bottom);s+=5){let a=e.root.elementFromPoint(u,s);if(!a||a==e.dom||!e.dom.contains(a))continue;let o=a.getBoundingClientRect();if(o.top>=n-20){r=a,i=o.top;break}}return{refDOM:r,refTop:i,stack:hA(e.dom)}}function hA(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=oi(r));return t}function MC({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;pA(n,r==0?0:r-t)}function pA(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:i,left:u}=e[n];r.scrollTop!=i+t&&(r.scrollTop=i+t),r.scrollLeft!=u&&(r.scrollLeft=u)}}let Kr=null;function BC(e){if(e.setActive)return e.setActive();if(Kr)return e.focus(Kr);let t=hA(e);e.focus(Kr==null?{get preventScroll(){return Kr={preventScroll:!0},!0}}:void 0),Kr||(Kr=!1,pA(t,0))}function mA(e,t){let n,r=2e8,i,u=0,s=t.top,a=t.top,o,l;for(let c=e.firstChild,d=0;c;c=c.nextSibling,d++){let f;if(c.nodeType==1)f=c.getClientRects();else if(c.nodeType==3)f=gn(c).getClientRects();else continue;for(let h=0;h<f.length;h++){let m=f[h];if(m.top<=s&&m.bottom>=a){s=Math.max(m.bottom,s),a=Math.min(m.top,a);let b=m.left>t.left?m.left-t.left:m.right<t.left?t.left-m.right:0;if(b<r){n=c,r=b,i=b&&n.nodeType==3?{left:m.right<t.left?m.right:m.left,top:t.top}:t,c.nodeType==1&&b&&(u=d+(t.left>=(m.left+m.right)/2?1:0));continue}}else m.top>t.top&&!o&&m.left<=t.left&&m.right>=t.left&&(o=c,l={left:Math.max(m.left,Math.min(m.right,t.left)),top:m.top});!n&&(t.left>=m.right&&t.top>=m.top||t.left>=m.left&&t.top>=m.bottom)&&(u=d+1)}}return!n&&o&&(n=o,i=l,r=0),n&&n.nodeType==3?LC(n,i):!n||r&&n.nodeType==1?{node:e,offset:u}:mA(n,i)}function LC(e,t){let n=e.nodeValue.length,r=document.createRange(),i;for(let u=0;u<n;u++){r.setEnd(e,u+1),r.setStart(e,u);let s=vn(r,1);if(s.top!=s.bottom&&Uc(t,s)){i={node:e,offset:u+(t.left>=(s.left+s.right)/2?1:0)};break}}return r.detach(),i||{node:e,offset:0}}function Uc(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function vC(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}function FC(e,t,n){let{node:r,offset:i}=mA(t,n),u=-1;if(r.nodeType==1&&!r.firstChild){let s=r.getBoundingClientRect();u=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(r,i,u)}function PC(e,t,n,r){let i=-1;for(let u=t,s=!1;u!=e.dom;){let a=e.docView.nearestDesc(u,!0),o;if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)&&((o=a.dom.getBoundingClientRect()).width||o.height)&&(a.node.isBlock&&a.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(a.dom.nodeName)&&(!s&&o.left>r.left||o.top>r.top?i=a.posBefore:(!s&&o.right<r.left||o.bottom<r.top)&&(i=a.posAfter),s=!0),!a.contentDOM&&i<0&&!a.node.isText))return(a.node.isBlock?r.top<(o.top+o.bottom)/2:r.left<(o.left+o.right)/2)?a.posBefore:a.posAfter;u=a.dom.parentNode}return i>-1?i:e.docView.posFromDOM(t,n,-1)}function AA(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),u=i;;){let s=e.childNodes[u];if(s.nodeType==1){let a=s.getClientRects();for(let o=0;o<a.length;o++){let l=a[o];if(Uc(t,l))return AA(s,t,l)}}if((u=(u+1)%r)==i)break}return e}function HC(e,t){let n=e.dom.ownerDocument,r,i=0,u=NC(n,t.left,t.top);u&&({node:r,offset:i}=u);let s=(e.root.elementFromPoint?e.root:n).elementFromPoint(t.left,t.top),a;if(!s||!e.dom.contains(s.nodeType!=1?s.parentNode:s)){let l=e.dom.getBoundingClientRect();if(!Uc(t,l)||(s=AA(e.dom,t,l),!s))return null}if(rt)for(let l=s;r&&l;l=oi(l))l.draggable&&(r=void 0);if(s=vC(s,t),r){if(Ft&&r.nodeType==1&&(i=Math.min(i,r.childNodes.length),i<r.childNodes.length)){let c=r.childNodes[i],d;c.nodeName=="IMG"&&(d=c.getBoundingClientRect()).right<=t.left&&d.bottom>t.top&&i++}let l;vu&&i&&r.nodeType==1&&(l=r.childNodes[i-1]).nodeType==1&&l.contentEditable=="false"&&l.getBoundingClientRect().top>=t.top&&i--,r==e.dom&&i==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?a=e.state.doc.content.size:(i==0||r.nodeType!=1||r.childNodes[i-1].nodeName!="BR")&&(a=PC(e,r,i,t))}a==null&&(a=FC(e,s,t));let o=e.docView.nearestDesc(s,!0);return{pos:a,inside:o?o.posAtStart-o.border:-1}}function Nh(e){return e.top<e.bottom||e.left<e.right}function vn(e,t){let n=e.getClientRects();if(n.length){let r=n[t<0?0:n.length-1];if(Nh(r))return r}return Array.prototype.find.call(n,Nh)||e.getBoundingClientRect()}const UC=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function gA(e,t,n){let{node:r,offset:i,atom:u}=e.docView.domFromPos(t,n<0?-1:1),s=vu||Ft;if(r.nodeType==3)if(s&&(UC.test(r.nodeValue)||(n<0?!i:i==r.nodeValue.length))){let o=vn(gn(r,i,i),n);if(Ft&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let l=vn(gn(r,i-1,i-1),-1);if(l.top==o.top){let c=vn(gn(r,i,i+1),-1);if(c.top!=o.top)return _i(c,c.left<l.left)}}return o}else{let o=i,l=i,c=n<0?1:-1;return n<0&&!i?(l++,c=-1):n>=0&&i==r.nodeValue.length?(o--,c=1):n<0?o--:l++,_i(vn(gn(r,o,l),c),c<0)}if(!e.state.doc.resolve(t-(u||0)).parent.inlineContent){if(u==null&&i&&(n<0||i==vt(r))){let o=r.childNodes[i-1];if(o.nodeType==1)return yo(o.getBoundingClientRect(),!1)}if(u==null&&i<vt(r)){let o=r.childNodes[i];if(o.nodeType==1)return yo(o.getBoundingClientRect(),!0)}return yo(r.getBoundingClientRect(),n>=0)}if(u==null&&i&&(n<0||i==vt(r))){let o=r.childNodes[i-1],l=o.nodeType==3?gn(o,vt(o)-(s?0:1)):o.nodeType==1&&(o.nodeName!="BR"||!o.nextSibling)?o:null;if(l)return _i(vn(l,1),!1)}if(u==null&&i<vt(r)){let o=r.childNodes[i];for(;o.pmViewDesc&&o.pmViewDesc.ignoreForCoords;)o=o.nextSibling;let l=o?o.nodeType==3?gn(o,0,s?0:1):o.nodeType==1?o:null:null;if(l)return _i(vn(l,-1),!0)}return _i(vn(r.nodeType==3?gn(r):r,-n),n>=0)}function _i(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 yo(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 bA(e,t,n){let r=e.state,i=e.root.activeElement;r!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),i!=e.dom&&i&&i.focus()}}function WC(e,t,n){let r=t.selection,i=n=="up"?r.$from:r.$to;return bA(e,t,()=>{let{node:u}=e.docView.domFromPos(i.pos,n=="up"?-1:1);for(;;){let a=e.docView.nearestDesc(u,!0);if(!a)break;if(a.node.isBlock){u=a.contentDOM||a.dom;break}u=a.dom.parentNode}let s=gA(e,i.pos,1);for(let a=u.firstChild;a;a=a.nextSibling){let o;if(a.nodeType==1)o=a.getClientRects();else if(a.nodeType==3)o=gn(a,0,a.nodeValue.length).getClientRects();else continue;for(let l=0;l<o.length;l++){let c=o[l];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})}const QC=/[\u0590-\u08ac]/;function zC(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,u=!i,s=i==r.parent.content.size,a=e.domSelection();return a?!QC.test(r.parent.textContent)||!a.modify?n=="left"||n=="backward"?u:s:bA(e,t,()=>{let{focusNode:o,focusOffset:l,anchorNode:c,anchorOffset:d}=e.domSelectionRange(),f=a.caretBidiLevel;a.modify("move",n,"character");let h=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:m,focusOffset:b}=e.domSelectionRange(),T=m&&!h.contains(m.nodeType==1?m:m.parentNode)||o==m&&l==b;try{a.collapse(c,d),o&&(o!=c||l!=d)&&a.extend&&a.extend(o,l)}catch{}return f!=null&&(a.caretBidiLevel=f),T}):r.pos==r.start()||r.pos==r.end()}let Dh=null,_h=null,Oh=!1;function KC(e,t,n){return Dh==t&&_h==n?Oh:(Dh=t,_h=n,Oh=n=="up"||n=="down"?WC(e,t,n):zC(e,t,n))}const Pt=0,Rh=1,mr=2,rn=3;class Fu{constructor(t,n,r,i){this.parent=t,this.children=n,this.dom=r,this.contentDOM=i,this.dirty=Pt,r.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,n,r){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let n=0;n<this.children.length;n++)t+=this.children[n].size;return t}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let t=0;t<this.children.length;t++)this.children[t].destroy()}posBeforeChild(t){for(let n=0,r=this.posAtStart;;n++){let i=this.children[n];if(i==t)return r;r+=i.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,r){if(this.contentDOM&&this.contentDOM.contains(t.nodeType==1?t:t.parentNode))if(r<0){let u,s;if(t==this.contentDOM)u=t.childNodes[n-1];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;u=t.previousSibling}for(;u&&!((s=u.pmViewDesc)&&s.parent==this);)u=u.previousSibling;return u?this.posBeforeChild(s)+s.size:this.posAtStart}else{let u,s;if(t==this.contentDOM)u=t.childNodes[n];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;u=t.nextSibling}for(;u&&!((s=u.pmViewDesc)&&s.parent==this);)u=u.nextSibling;return u?this.posBeforeChild(s):this.posAtEnd}let i;if(t==this.dom&&this.contentDOM)i=n>Ze(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let u=t;;u=u.parentNode){if(u==this.dom){i=!1;break}if(u.previousSibling)break}if(i==null&&n==t.childNodes.length)for(let u=t;;u=u.parentNode){if(u==this.dom){i=!0;break}if(u.nextSibling)break}}return i??r>0?this.posAtEnd:this.posAtStart}nearestDesc(t,n=!1){for(let r=!0,i=t;i;i=i.parentNode){let u=this.getDesc(i),s;if(u&&(!n||u.node))if(r&&(s=u.nodeDOM)&&!(s.nodeType==1?s.contains(t.nodeType==1?t:t.parentNode):s==t))r=!1;else return u}}getDesc(t){let n=t.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(t,n,r){for(let i=t;i;i=i.parentNode){let u=this.getDesc(i);if(u)return u.localPosFromDOM(t,n,r)}return-1}descAt(t){for(let n=0,r=0;n<this.children.length;n++){let i=this.children[n],u=r+i.size;if(r==t&&u!=r){for(;!i.border&&i.children.length;)for(let s=0;s<i.children.length;s++){let a=i.children[s];if(a.size){i=a;break}}return i}if(t<u)return i.descAt(t-r-i.border);r=u}}domFromPos(t,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:t+1};let r=0,i=0;for(let u=0;r<this.children.length;r++){let s=this.children[r],a=u+s.size;if(a>t||s instanceof yA){i=t-u;break}u=a}if(i)return this.children[r].domFromPos(i-this.children[r].border,n);for(let u;r&&!(u=this.children[r-1]).size&&u instanceof EA&&u.side>=0;r--);if(n<=0){let u,s=!0;for(;u=r?this.children[r-1]:null,!(!u||u.dom.parentNode==this.contentDOM);r--,s=!1);return u&&n&&s&&!u.border&&!u.domAtom?u.domFromPos(u.size,n):{node:this.contentDOM,offset:u?Ze(u.dom)+1:0}}else{let u,s=!0;for(;u=r<this.children.length?this.children[r]:null,!(!u||u.dom.parentNode==this.contentDOM);r++,s=!1);return u&&s&&!u.border&&!u.domAtom?u.domFromPos(0,n):{node:this.contentDOM,offset:u?Ze(u.dom):this.contentDOM.childNodes.length}}}parseRange(t,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:t,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let i=-1,u=-1;for(let s=r,a=0;;a++){let o=this.children[a],l=s+o.size;if(i==-1&&t<=l){let c=s+o.border;if(t>=c&&n<=l-o.border&&o.node&&o.contentDOM&&this.contentDOM.contains(o.contentDOM))return o.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)){i=Ze(f.dom)+1;break}t-=f.size}i==-1&&(i=0)}if(i>-1&&(l>n||a==this.children.length-1)){n=l;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)){u=Ze(d.dom);break}n+=d.size}u==-1&&(u=this.contentDOM.childNodes.length);break}s=l}return{node:this.contentDOM,from:t,to:n,fromOffset:i,toOffset:u}}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:r}=this.domFromPos(t,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+t);return n.childNodes[r]}setSelection(t,n,r,i=!1){let u=Math.min(t,n),s=Math.max(t,n);for(let h=0,m=0;h<this.children.length;h++){let b=this.children[h],T=m+b.size;if(u>m&&s<T)return b.setSelection(t-m-b.border,n-m-b.border,r,i);m=T}let a=this.domFromPos(t,t?-1:1),o=n==t?a:this.domFromPos(n,n?-1:1),l=r.root.getSelection(),c=r.domSelectionRange(),d=!1;if((Ft||rt)&&t==n){let{node:h,offset:m}=a;if(h.nodeType==3){if(d=!!(m&&h.nodeValue[m-1]==`
|
|
40
|
-
`),d&&m==h.nodeValue.length)for(let b=h,T;b;b=b.parentNode){if(T=b.nextSibling){T.nodeName=="BR"&&(a=o={node:T.parentNode,offset:Ze(T)+1});break}let E=b.pmViewDesc;if(E&&E.node&&E.node.isBlock)break}}else{let b=h.childNodes[m-1];d=b&&(b.nodeName=="BR"||b.contentEditable=="false")}}if(Ft&&c.focusNode&&c.focusNode!=o.node&&c.focusNode.nodeType==1){let h=c.focusNode.childNodes[c.focusOffset];h&&h.contentEditable=="false"&&(i=!0)}if(!(i||d&&rt)&&Or(a.node,a.offset,c.anchorNode,c.anchorOffset)&&Or(o.node,o.offset,c.focusNode,c.focusOffset))return;let f=!1;if((l.extend||t==n)&&!(d&&Ft)){l.collapse(a.node,a.offset);try{t!=n&&l.extend(o.node,o.offset),f=!0}catch{}}if(!f){if(t>n){let m=a;a=o,o=m}let h=document.createRange();h.setEnd(o.node,o.offset),h.setStart(a.node,a.offset),l.removeAllRanges(),l.addRange(h)}}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 r=0,i=0;i<this.children.length;i++){let u=this.children[i],s=r+u.size;if(r==s?t<=s&&n>=r:t<s&&n>r){let a=r+u.border,o=s-u.border;if(t>=a&&n<=o){this.dirty=t==r||n==s?mr:Rh,t==a&&n==o&&(u.contentLost||u.dom.parentNode!=this.contentDOM)?u.dirty=rn:u.markDirty(t-a,n-a);return}else u.dirty=u.dom==u.contentDOM&&u.dom.parentNode==this.contentDOM&&!u.children.length?mr:rn}r=s}this.dirty=mr}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?mr:Rh;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(t){return!1}}class EA extends Fu{constructor(t,n,r,i){let u,s=n.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>{if(!u)return i;if(u.parent)return u.parent.posBeforeChild(u)})),!n.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(t,[],s,null),this.widget=n,this.widget=n,u=this}matchesWidget(t){return this.dirty==Pt&&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}}class qC extends Fu{constructor(t,n,r,i){super(t,[],n,null),this.textDOM=r,this.text=i}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}}class Rr extends Fu{constructor(t,n,r,i,u){super(t,[],r,i),this.mark=n,this.spec=u}static create(t,n,r,i){let u=i.nodeViews[n.type.name],s=u&&u(n,i,r);return(!s||!s.dom)&&(s=Fr.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new Rr(t,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&rn||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=rn&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=Pt){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=Pt}}slice(t,n,r){let i=Rr.create(this.parent,this.mark,!0,r),u=this.children,s=this.size;n<s&&(u=Kl(u,n,s,r)),t>0&&(u=Kl(u,0,t,r));for(let a=0;a<u.length;a++)u[a].parent=i;return i.children=u,i}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class jn extends Fu{constructor(t,n,r,i,u,s,a,o,l){super(t,[],u,s),this.node=n,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=a}static create(t,n,r,i,u,s){let a=u.nodeViews[n.type.name],o,l=a&&a(n,u,()=>{if(!o)return s;if(o.parent)return o.parent.posBeforeChild(o)},r,i),c=l&&l.dom,d=l&&l.contentDOM;if(n.isText){if(!c)c=document.createTextNode(n.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:d}=Fr.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=xA(c,r,n),l?o=new YC(t,n,r,i,c,d||null,f,l,u,s+1):n.isText?new Oa(t,n,r,i,c,f,u):new jn(t,n,r,i,c,d||null,f,u,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>Q.empty)}return t}matchesNode(t,n,r){return this.dirty==Pt&&t.eq(this.node)&&zs(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let r=this.node.inlineContent,i=n,u=t.composing?this.localCompositionInfo(t,n):null,s=u&&u.pos>-1?u:null,a=u&&u.pos<0,o=new VC(this,s&&s.node,t);ZC(this.node,this.innerDeco,(l,c,d)=>{l.spec.marks?o.syncToMarks(l.spec.marks,r,t,c):l.type.side>=0&&!d&&o.syncToMarks(c==this.node.childCount?ye.none:this.node.child(c).marks,r,t,c),o.placeWidget(l,t,i)},(l,c,d,f)=>{o.syncToMarks(l.marks,r,t,f);let h;o.findNodeMatch(l,c,d,f)||a&&t.state.selection.from>i&&t.state.selection.to<i+l.nodeSize&&(h=o.findIndexWithChild(u.node))>-1&&o.updateNodeAt(l,c,d,h,t)||o.updateNextNode(l,c,d,t,f,i)||o.addNode(l,c,d,t,i),i+=l.nodeSize}),o.syncToMarks([],r,t,0),this.node.isTextblock&&o.addTextblockHacks(),o.destroyRest(),(o.changed||this.dirty==mr)&&(s&&this.protectLocalComposition(t,s),TA(this.contentDOM,this.children,t),li&&XC(this.dom))}localCompositionInfo(t,n){let{from:r,to:i}=t.state.selection;if(!(t.state.selection instanceof de)||r<n||i>n+this.node.content.size)return null;let u=t.input.compositionNode;if(!u||!this.dom.contains(u.parentNode))return null;if(this.node.inlineContent){let s=u.nodeValue,a=$C(this.node.content,s,r-n,i-n);return a<0?null:{node:u,pos:a,text:s}}else return{node:u,pos:-1,text:""}}protectLocalComposition(t,{node:n,pos:r,text:i}){if(this.getDesc(n))return;let u=n;for(;u.parentNode!=this.contentDOM;u=u.parentNode){for(;u.previousSibling;)u.parentNode.removeChild(u.previousSibling);for(;u.nextSibling;)u.parentNode.removeChild(u.nextSibling);u.pmViewDesc&&(u.pmViewDesc=void 0)}let s=new qC(this,u,n,i);t.input.compositionNodes.push(s),this.children=Kl(this.children,r,r+i.length,t,s)}update(t,n,r,i){return this.dirty==rn||!t.sameMarkup(this.node)?!1:(this.updateInner(t,n,r,i),!0)}updateInner(t,n,r,i){this.updateOuterDeco(n),this.node=t,this.innerDeco=r,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=Pt}updateOuterDeco(t){if(zs(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=CA(this.dom,this.nodeDOM,zl(this.outerDeco,this.node,n),zl(t,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function Mh(e,t,n,r,i){xA(r,t,e);let u=new jn(void 0,e,t,n,r,r,r,i,0);return u.contentDOM&&u.updateChildren(i,0),u}class Oa extends jn{constructor(t,n,r,i,u,s,a){super(t,n,r,i,u,null,s,a,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,n,r,i){return this.dirty==rn||this.dirty!=Pt&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Pt||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=t,this.dirty=Pt,!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,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(t,n,r)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,n,r){let i=this.node.cut(t,n),u=document.createTextNode(i.text);return new Oa(this.parent,i,this.outerDeco,this.innerDeco,u,u,r)}markDirty(t,n){super.markDirty(t,n),this.dom!=this.nodeDOM&&(t==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=rn)}get domAtom(){return!1}isText(t){return this.node.text==t}}class yA extends Fu{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==Pt&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class YC extends jn{constructor(t,n,r,i,u,s,a,o,l,c){super(t,n,r,i,u,s,a,l,c),this.spec=o}update(t,n,r,i){if(this.dirty==rn)return!1;if(this.spec.update&&(this.node.type==t.type||this.spec.multiType)){let u=this.spec.update(t,n,r);return u&&this.updateInner(t,n,r,i),u}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,n,r,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,n,r,i){this.spec.setSelection?this.spec.setSelection(t,n,r.root):super.setSelection(t,n,r,i)}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 TA(e,t,n){let r=e.firstChild,i=!1;for(let u=0;u<t.length;u++){let s=t[u],a=s.dom;if(a.parentNode==e){for(;a!=r;)r=Bh(r),i=!0;r=r.nextSibling}else i=!0,e.insertBefore(a,r);if(s instanceof Rr){let o=r?r.previousSibling:e.lastChild;TA(s.contentDOM,s.children,n),r=o?o.nextSibling:e.firstChild}}for(;r;)r=Bh(r),i=!0;i&&n.trackWrites==e&&(n.trackWrites=null)}const Ji=function(e){e&&(this.nodeName=e)};Ji.prototype=Object.create(null);const Ar=[new Ji];function zl(e,t,n){if(e.length==0)return Ar;let r=n?Ar[0]:new Ji,i=[r];for(let u=0;u<e.length;u++){let s=e[u].type.attrs;if(s){s.nodeName&&i.push(r=new Ji(s.nodeName));for(let a in s){let o=s[a];o!=null&&(n&&i.length==1&&i.push(r=new Ji(t.isInline?"span":"div")),a=="class"?r.class=(r.class?r.class+" ":"")+o:a=="style"?r.style=(r.style?r.style+";":"")+o:a!="nodeName"&&(r[a]=o))}}}return i}function CA(e,t,n,r){if(n==Ar&&r==Ar)return t;let i=t;for(let u=0;u<r.length;u++){let s=r[u],a=n[u];if(u){let o;a&&a.nodeName==s.nodeName&&i!=e&&(o=i.parentNode)&&o.nodeName.toLowerCase()==s.nodeName||(o=document.createElement(s.nodeName),o.pmIsDeco=!0,o.appendChild(i),a=Ar[0]),i=o}GC(i,a||Ar[0],s)}return i}function GC(e,t,n){for(let r in t)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&e.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let u=0;u<r.length;u++)i.indexOf(r[u])==-1&&e.classList.remove(r[u]);for(let u=0;u<i.length;u++)r.indexOf(i[u])==-1&&e.classList.add(i[u]);e.classList.length==0&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,i;for(;i=r.exec(t.style);)e.style.removeProperty(i[1])}n.style&&(e.style.cssText+=n.style)}}function xA(e,t,n){return CA(e,e,Ar,zl(t,n,e.nodeType!=1))}function zs(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 Bh(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class VC{constructor(t,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=JC(t.node.content,t)}destroyBetween(t,n){if(t!=n){for(let r=t;r<n;r++)this.top.children[r].destroy();this.top.children.splice(t,n-t),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(t,n,r,i){let u=0,s=this.stack.length>>1,a=Math.min(s,t.length);for(;u<a&&(u==s-1?this.top:this.stack[u+1<<1]).matchesMark(t[u])&&t[u].type.spec.spanning!==!1;)u++;for(;u<s;)this.destroyRest(),this.top.dirty=Pt,this.index=this.stack.pop(),this.top=this.stack.pop(),s--;for(;s<t.length;){this.stack.push(this.top,this.index+1);let o=-1,l=this.top.children.length;i<this.preMatch.index&&(l=Math.min(this.index+3,l));for(let c=this.index;c<l;c++){let d=this.top.children[c];if(d.matchesMark(t[s])&&!this.isLocked(d.dom)){o=c;break}}if(o>-1)o>this.index&&(this.changed=!0,this.destroyBetween(this.index,o)),this.top=this.top.children[this.index];else{let c=Rr.create(this.top,t[s],n,r);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,s++}}findNodeMatch(t,n,r,i){let u=-1,s;if(i>=this.preMatch.index&&(s=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&s.matchesNode(t,n,r))u=this.top.children.indexOf(s,this.index);else for(let a=this.index,o=Math.min(this.top.children.length,a+5);a<o;a++){let l=this.top.children[a];if(l.matchesNode(t,n,r)&&!this.preMatch.matched.has(l)){u=a;break}}return u<0?!1:(this.destroyBetween(this.index,u),this.index++,!0)}updateNodeAt(t,n,r,i,u){let s=this.top.children[i];return s.dirty==rn&&s.dom==s.contentDOM&&(s.dirty=mr),s.update(t,n,r,u)?(this.destroyBetween(this.index,i),this.index++,!0):!1}findIndexWithChild(t){for(;;){let n=t.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=t.pmViewDesc;if(r){for(let i=this.index;i<this.top.children.length;i++)if(this.top.children[i]==r)return i}return-1}t=n}}updateNextNode(t,n,r,i,u,s){for(let a=this.index;a<this.top.children.length;a++){let o=this.top.children[a];if(o instanceof jn){let l=this.preMatch.matched.get(o);if(l!=null&&l!=u)return!1;let c=o.dom,d,f=this.isLocked(c)&&!(t.isText&&o.node&&o.node.isText&&o.nodeDOM.nodeValue==t.text&&o.dirty!=rn&&zs(n,o.outerDeco));if(!f&&o.update(t,n,r,i))return this.destroyBetween(this.index,a),o.dom!=c&&(this.changed=!0),this.index++,!0;if(!f&&(d=this.recreateWrapper(o,t,n,r,i,s)))return this.destroyBetween(this.index,a),this.top.children[this.index]=d,d.contentDOM&&(d.dirty=mr,d.updateChildren(i,s+1),d.dirty=Pt),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(t,n,r,i,u,s){if(t.dirty||n.isAtom||!t.children.length||!t.node.content.eq(n.content)||!zs(r,t.outerDeco)||!i.eq(t.innerDeco))return null;let a=jn.create(this.top,n,r,i,u,s);if(a.contentDOM){a.children=t.children,t.children=[];for(let o of a.children)o.parent=a}return t.destroy(),a}addNode(t,n,r,i,u){let s=jn.create(this.top,t,n,r,i,u);s.contentDOM&&s.updateChildren(i,u+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(t,n,r){let i=this.index<this.top.children.length?this.top.children[this.index]:null;if(i&&i.matchesWidget(t)&&(t==i.widget||!i.widget.type.toDOM.parentNode))this.index++;else{let u=new EA(this.top,t,n,r);this.top.children.splice(this.index++,0,u),this.changed=!0}}addTextblockHacks(){let t=this.top.children[this.index-1],n=this.top;for(;t instanceof Rr;)n=t,t=n.children[n.children.length-1];(!t||!(t instanceof Oa)||/\n$/.test(t.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(t.node.text))&&((rt||Xe)&&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 r=document.createElement(t);t=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),t=="BR"&&(r.className="ProseMirror-trailingBreak");let i=new yA(this.top,[],r,null);n!=this.top?n.children.push(i):n.children.splice(this.index++,0,i),this.changed=!0}}isLocked(t){return this.lock&&(t==this.lock||t.nodeType==1&&t.contains(this.lock.parentNode))}}function JC(e,t){let n=t,r=n.children.length,i=e.childCount,u=new Map,s=[];e:for(;i>0;){let a;for(;;)if(r){let l=n.children[r-1];if(l instanceof Rr)n=l,r=l.children.length;else{a=l,r--;break}}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let o=a.node;if(o){if(o!=e.child(i-1))break;--i,u.set(a,i),s.push(a)}}return{index:i,matched:u,matches:s.reverse()}}function jC(e,t){return e.type.side-t.type.side}function ZC(e,t,n,r){let i=t.locals(e),u=0;if(i.length==0){for(let l=0;l<e.childCount;l++){let c=e.child(l);r(c,i,t.forChild(u,c),l),u+=c.nodeSize}return}let s=0,a=[],o=null;for(let l=0;;){let c,d;for(;s<i.length&&i[s].to==u;){let T=i[s++];T.widget&&(c?(d||(d=[c])).push(T):c=T)}if(c)if(d){d.sort(jC);for(let T=0;T<d.length;T++)n(d[T],l,!!o)}else n(c,l,!!o);let f,h;if(o)h=-1,f=o,o=null;else if(l<e.childCount)h=l,f=e.child(l++);else break;for(let T=0;T<a.length;T++)a[T].to<=u&&a.splice(T--,1);for(;s<i.length&&i[s].from<=u&&i[s].to>u;)a.push(i[s++]);let m=u+f.nodeSize;if(f.isText){let T=m;s<i.length&&i[s].from<T&&(T=i[s].from);for(let E=0;E<a.length;E++)a[E].to<T&&(T=a[E].to);T<m&&(o=f.cut(T-u),f=f.cut(0,T-u),m=T,h=-1)}else for(;s<i.length&&i[s].to<m;)s++;let b=f.isInline&&!f.isLeaf?a.filter(T=>!T.inline):a.slice();r(f,b,t.forChild(u,f),h),u=m}}function XC(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 $C(e,t,n,r){for(let i=0,u=0;i<e.childCount&&u<=r;){let s=e.child(i++),a=u;if(u+=s.nodeSize,!s.isText)continue;let o=s.text;for(;i<e.childCount;){let l=e.child(i++);if(u+=l.nodeSize,!l.isText)break;o+=l.text}if(u>=n){if(u>=r&&o.slice(r-t.length-a,r-a)==t)return r-t.length;let l=a<r?o.lastIndexOf(t,r-a-1):-1;if(l>=0&&l+t.length+a>=n)return a+l;if(n==r&&o.length>=r+t.length-a&&o.slice(r-a,r-a+t.length)==t)return r}}return-1}function Kl(e,t,n,r,i){let u=[];for(let s=0,a=0;s<e.length;s++){let o=e[s],l=a,c=a+=o.size;l>=n||c<=t?u.push(o):(l<t&&u.push(o.slice(0,t-l,r)),i&&(u.push(i),i=void 0),c>n&&u.push(o.slice(n-l,o.size,r)))}return u}function Wc(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),u=i&&i.size==0,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a=r.resolve(s),o,l;if(_a(n)){for(o=s;i&&!i.node;)i=i.parent;let d=i.node;if(i&&d.isAtom&&oe.isSelectable(d)&&i.parent&&!(d.isInline&&IC(n.focusNode,n.focusOffset,i.dom))){let f=i.posBefore;l=new oe(s==f?a:r.resolve(f))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let d=s,f=s;for(let h=0;h<n.rangeCount;h++){let m=n.getRangeAt(h);d=Math.min(d,e.docView.posFromDOM(m.startContainer,m.startOffset,1)),f=Math.max(f,e.docView.posFromDOM(m.endContainer,m.endOffset,-1))}if(d<0)return null;[o,s]=f==e.state.selection.anchor?[f,d]:[d,f],a=r.resolve(s)}else o=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(o<0)return null}let c=r.resolve(o);if(!l){let d=t=="pointer"||e.state.selection.head<a.pos&&!u?1:-1;l=Qc(e,c,a,d)}return l}function kA(e){return e.editable?e.hasFocus():IA(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Sn(e,t=!1){let n=e.state.selection;if(SA(e,n),!!kA(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&Xe){let r=e.domSelectionRange(),i=e.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&Or(r.anchorNode,r.anchorOffset,i.anchorNode,i.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)tx(e);else{let{anchor:r,head:i}=n,u,s;Lh&&!(n instanceof de)&&(n.$from.parent.inlineContent||(u=vh(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(s=vh(e,n.to))),e.docView.setSelection(r,i,e,t),Lh&&(u&&Fh(u),s&&Fh(s)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&ex(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const Lh=rt||Xe&&dA<63;function vh(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),i=r<n.childNodes.length?n.childNodes[r]:null,u=r?n.childNodes[r-1]:null;if(rt&&i&&i.contentEditable=="false")return To(i);if((!i||i.contentEditable=="false")&&(!u||u.contentEditable=="false")){if(i)return To(i);if(u)return To(u)}}function To(e){return e.contentEditable="true",rt&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function Fh(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function ex(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=i)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!kA(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function tx(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,r=n.nodeName=="IMG";r?t.collapse(n.parentNode,Ze(n)+1):t.collapse(n,0),!r&&!e.state.selection.visible&>&&Jn<=11&&(n.disabled=!0,n.disabled=!1)}function SA(e,t){if(t instanceof oe){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Ph(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Ph(e)}function Ph(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Qc(e,t,n,r){return e.someProp("createSelectionBetween",i=>i(e,t,n))||de.between(t,n,r)}function Hh(e){return e.editable&&!e.hasFocus()?!1:IA(e)}function IA(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function nx(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return Or(t.node,t.offset,n.anchorNode,n.anchorOffset)}function ql(e,t){let{$anchor:n,$head:r}=e.selection,i=t>0?n.max(r):n.min(r),u=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return u&&ce.findFrom(u,t)}function Pn(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Uh(e,t,n){let r=e.state.selection;if(r instanceof de)if(n.indexOf("s")>-1){let{$head:i}=r,u=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter;if(!u||u.isText||!u.isLeaf)return!1;let s=e.state.doc.resolve(i.pos+u.nodeSize*(t<0?-1:1));return Pn(e,new de(r.$anchor,s))}else if(r.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let i=ql(e.state,t);return i&&i instanceof oe?Pn(e,i):!1}else if(!(Mt&&n.indexOf("m")>-1)){let i=r.$head,u=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter,s;if(!u||u.isText)return!1;let a=t<0?i.pos-u.nodeSize:i.pos;return u.isAtom||(s=e.docView.descAt(a))&&!s.contentDOM?oe.isSelectable(u)?Pn(e,new oe(t<0?e.state.doc.resolve(i.pos-u.nodeSize):i)):vu?Pn(e,new de(e.state.doc.resolve(t<0?a:a+u.nodeSize))):!1:!1}}else return!1;else{if(r instanceof oe&&r.node.isInline)return Pn(e,new de(t>0?r.$to:r.$from));{let i=ql(e.state,t);return i?Pn(e,i):!1}}}function Ks(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function ji(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function qr(e,t){return t<0?rx(e):ix(e)}function rx(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,u,s=!1;for(Ft&&n.nodeType==1&&r<Ks(n)&&ji(n.childNodes[r],-1)&&(s=!0);;)if(r>0){if(n.nodeType!=1)break;{let a=n.childNodes[r-1];if(ji(a,-1))i=n,u=--r;else if(a.nodeType==3)n=a,r=n.nodeValue.length;else break}}else{if(wA(n))break;{let a=n.previousSibling;for(;a&&ji(a,-1);)i=n.parentNode,u=Ze(a),a=a.previousSibling;if(a)n=a,r=Ks(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}s?Yl(e,n,r):i&&Yl(e,i,u)}function ix(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i=Ks(n),u,s;for(;;)if(r<i){if(n.nodeType!=1)break;let a=n.childNodes[r];if(ji(a,1))u=n,s=++r;else break}else{if(wA(n))break;{let a=n.nextSibling;for(;a&&ji(a,1);)u=a.parentNode,s=Ze(a)+1,a=a.nextSibling;if(a)n=a,r=0,i=Ks(n);else{if(n=n.parentNode,n==e.dom)break;r=i=0}}}u&&Yl(e,u,s)}function wA(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function ux(e,t){for(;e&&t==e.childNodes.length&&!Lu(e);)t=Ze(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=0}}function sx(e,t){for(;e&&!t&&!Lu(e);)t=Ze(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=e.childNodes.length}}function Yl(e,t,n){if(t.nodeType!=3){let u,s;(s=ux(t,n))?(t=s,n=0):(u=sx(t,n))&&(t=u,n=u.nodeValue.length)}let r=e.domSelection();if(!r)return;if(_a(r)){let u=document.createRange();u.setEnd(t,n),u.setStart(t,n),r.removeAllRanges(),r.addRange(u)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:i}=e;setTimeout(()=>{e.state==i&&Sn(e)},50)}function Wh(e,t){let n=e.state.doc.resolve(t);if(!(Xe||fA)&&n.parent.inlineContent){let i=e.coordsAtPos(t);if(t>n.start()){let u=e.coordsAtPos(t-1),s=(u.top+u.bottom)/2;if(s>i.top&&s<i.bottom&&Math.abs(u.left-i.left)>1)return u.left<i.left?"ltr":"rtl"}if(t<n.end()){let u=e.coordsAtPos(t+1),s=(u.top+u.bottom)/2;if(s>i.top&&s<i.bottom&&Math.abs(u.left-i.left)>1)return u.left>i.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function Qh(e,t,n){let r=e.state.selection;if(r instanceof de&&!r.empty||n.indexOf("s")>-1||Mt&&n.indexOf("m")>-1)return!1;let{$from:i,$to:u}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let s=ql(e.state,t);if(s&&s instanceof oe)return Pn(e,s)}if(!i.parent.inlineContent){let s=t<0?i:u,a=r instanceof It?ce.near(s,t):ce.findFrom(s,t);return a?Pn(e,a):!1}return!1}function zh(e,t){if(!(e.state.selection instanceof de))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let u=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(u&&!u.isText){let s=e.state.tr;return t<0?s.delete(n.pos-u.nodeSize,n.pos):s.delete(n.pos,n.pos+u.nodeSize),e.dispatch(s),!0}return!1}function Kh(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function ax(e){if(!rt||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let r=t.firstChild;Kh(e,r,"true"),setTimeout(()=>Kh(e,r,"false"),20)}return!1}function ox(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function lx(e,t){let n=t.keyCode,r=ox(t);if(n==8||Mt&&n==72&&r=="c")return zh(e,-1)||qr(e,-1);if(n==46&&!t.shiftKey||Mt&&n==68&&r=="c")return zh(e,1)||qr(e,1);if(n==13||n==27)return!0;if(n==37||Mt&&n==66&&r=="c"){let i=n==37?Wh(e,e.state.selection.from)=="ltr"?-1:1:-1;return Uh(e,i,r)||qr(e,i)}else if(n==39||Mt&&n==70&&r=="c"){let i=n==39?Wh(e,e.state.selection.from)=="ltr"?1:-1:1;return Uh(e,i,r)||qr(e,i)}else{if(n==38||Mt&&n==80&&r=="c")return Qh(e,-1,r)||qr(e,-1);if(n==40||Mt&&n==78&&r=="c")return ax(e)||Qh(e,1,r)||qr(e,1);if(r==(Mt?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function zc(e,t){e.someProp("transformCopied",h=>{t=h(t,e)});let n=[],{content:r,openStart:i,openEnd:u}=t;for(;i>1&&u>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,u--;let h=r.firstChild;n.push(h.type.name,h.attrs!=h.type.defaultAttrs?h.attrs:null),r=h.content}let s=e.someProp("clipboardSerializer")||Fr.fromSchema(e.state.schema),a=MA(),o=a.createElement("div");o.appendChild(s.serializeFragment(r,{document:a}));let l=o.firstChild,c,d=0;for(;l&&l.nodeType==1&&(c=RA[l.nodeName.toLowerCase()]);){for(let h=c.length-1;h>=0;h--){let m=a.createElement(c[h]);for(;o.firstChild;)m.appendChild(o.firstChild);o.appendChild(m),d++}l=o.firstChild}l&&l.nodeType==1&&l.setAttribute("data-pm-slice",`${i} ${u}${d?` -${d}`:""} ${JSON.stringify(n)}`);let f=e.someProp("clipboardTextSerializer",h=>h(t,e))||t.content.textBetween(0,t.content.size,`
|
|
41
|
-
|
|
42
|
-
`);return{dom:o,text:f,slice:t}}function
|
|
43
|
-
`))),0,0),e.someProp("transformPasted",f=>{a=f(a,e,!0)}),a;let d=e.someProp("clipboardTextParser",f=>f(t,i,r,e));if(d)a=d;else{let f=i.marks(),{schema:h}=e.state,m=Fr.fromSchema(h);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(b=>{let T=s.appendChild(document.createElement("p"));b&&T.appendChild(m.serializeNode(h.text(b,f)))})}}else e.someProp("transformPastedHTML",d=>{n=d(n,e)}),s=hx(n),vu&&px(s);let l=s&&s.querySelector("[data-pm-slice]"),c=l&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(l.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let f=s.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;s=f}if(a||(a=(e.someProp("clipboardParser")||e.someProp("domParser")||Dc.fromSchema(e.state.schema)).parseSlice(s,{preserveWhitespace:!!(o||c),context:i,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!cx.test(f.parentNode.nodeName)?{ignore:!0}:null}})),c)a=mx(qh(a,+c[1],+c[2]),c[4]);else if(a=Z.maxOpen(dx(a.content,i),!0),a.openStart||a.openEnd){let d=0,f=0;for(let h=a.content.firstChild;d<a.openStart&&!h.type.spec.isolating;d++,h=h.firstChild);for(let h=a.content.lastChild;f<a.openEnd&&!h.type.spec.isolating;f++,h=h.lastChild);a=qh(a,d,f)}return e.someProp("transformPasted",d=>{a=d(a,e,o)}),a}const cx=/^(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 dx(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let i=t.node(n).contentMatchAt(t.index(n)),u,s=[];if(e.forEach(a=>{if(!s)return;let o=i.findWrapping(a.type),l;if(!o)return s=null;if(l=s.length&&u.length&&_A(o,u,a,s[s.length-1],0))s[s.length-1]=l;else{s.length&&(s[s.length-1]=OA(s[s.length-1],u.length));let c=DA(a,o);s.push(c),i=i.matchType(c.type),u=o}}),s)return Q.from(s)}return e}function DA(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,Q.from(e));return e}function _A(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let u=_A(e,t,n,r.lastChild,i+1);if(u)return r.copy(r.content.replaceChild(r.childCount-1,u));if(r.contentMatchAt(r.childCount).matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(Q.from(DA(n,e,i+1))))}}function OA(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,OA(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(Q.empty,!0);return e.copy(n.append(r))}function Gl(e,t,n,r,i,u){let s=t<0?e.firstChild:e.lastChild,a=s.content;return e.childCount>1&&(u=0),i<r-1&&(a=Gl(a,t,n,r,i+1,u)),i>=n&&(a=t<0?s.contentMatchAt(0).fillBefore(a,u<=i).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(Q.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function qh(e,t,n){return t<e.openStart&&(e=new Z(Gl(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new Z(Gl(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const 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"]};let Yh=null;function MA(){return Yh||(Yh=document.implementation.createHTMLDocument("title"))}let Co=null;function fx(e){let t=window.trustedTypes;return t?(Co||(Co=t.defaultPolicy||t.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),Co.createHTML(e)):e}function hx(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=MA().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),i;if((i=r&&RA[r[1].toLowerCase()])&&(e=i.map(u=>"<"+u+">").join("")+e+i.map(u=>"</"+u+">").reverse().join("")),n.innerHTML=fx(e),i)for(let u=0;u<i.length;u++)n=n.querySelector(i[u])||n;return n}function px(e){let t=e.querySelectorAll(Xe?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}function mx(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,r;try{r=JSON.parse(t)}catch{return e}let{content:i,openStart:u,openEnd:s}=e;for(let a=r.length-2;a>=0;a-=2){let o=n.nodes[r[a]];if(!o||o.hasRequiredAttrs())break;i=Q.from(o.create(r[a+1],i)),u++,s++}return new Z(i,u,s)}const ot={},lt={},Ax={touchstart:!0,touchmove:!0};class gx{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 bx(e){for(let t in ot){let n=ot[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=r=>{yx(e,r)&&!Kc(e,r)&&(e.editable||!(r.type in lt))&&n(e,r)},Ax[t]?{passive:!0}:void 0)}rt&&e.dom.addEventListener("input",()=>null),Vl(e)}function Kn(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function Ex(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function Vl(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=r=>Kc(e,r))})}function Kc(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function yx(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 Tx(e,t){!Kc(e,t)&&ot[t.type]&&(e.editable||!(t.type in lt))&&ot[t.type](e,t)}lt.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!LA(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(xn&&Xe&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),li&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",i=>i(e,hr(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",r=>r(e,n))||lx(e,n)?n.preventDefault():Kn(e,"key")};lt.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};lt.keypress=(e,t)=>{let n=t;if(LA(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||Mt&&n.metaKey)return;if(e.someProp("handleKeyPress",i=>i(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof de)||!r.$from.sameParent(r.$to)){let i=String.fromCharCode(n.charCode),u=()=>e.state.tr.insertText(i).scrollIntoView();!/[\r\n]/.test(i)&&!e.someProp("handleTextInput",s=>s(e,r.$from.pos,r.$to.pos,i,u))&&e.dispatch(u()),n.preventDefault()}};function Ra(e){return{left:e.clientX,top:e.clientY}}function Cx(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function qc(e,t,n,r,i){if(r==-1)return!1;let u=e.state.doc.resolve(r);for(let s=u.depth+1;s>0;s--)if(e.someProp(t,a=>s>u.depth?a(e,n,u.nodeAfter,u.before(s),i,!0):a(e,n,u.node(s),u.before(s),i,!1)))return!0;return!1}function ei(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);r.setMeta("pointer",!0),e.dispatch(r)}function xx(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&oe.isSelectable(r)?(ei(e,new oe(n)),!0):!1}function kx(e,t){if(t==-1)return!1;let n=e.state.selection,r,i;n instanceof oe&&(r=n.node);let u=e.state.doc.resolve(t);for(let s=u.depth+1;s>0;s--){let a=s>u.depth?u.nodeAfter:u.node(s);if(oe.isSelectable(a)){r&&n.$from.depth>0&&s>=n.$from.depth&&u.before(n.$from.depth+1)==n.$from.pos?i=u.before(n.$from.depth):i=u.before(s);break}}return i!=null?(ei(e,oe.create(e.state.doc,i)),!0):!1}function Sx(e,t,n,r,i){return qc(e,"handleClickOn",t,n,r)||e.someProp("handleClick",u=>u(e,t,r))||(i?kx(e,n):xx(e,n))}function Ix(e,t,n,r){return qc(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",i=>i(e,t,r))}function wx(e,t,n,r){return qc(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",i=>i(e,t,r))||Nx(e,n,r)}function Nx(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(ei(e,de.create(r,0,r.content.size)),!0):!1;let i=r.resolve(t);for(let u=i.depth+1;u>0;u--){let s=u>i.depth?i.nodeAfter:i.node(u),a=i.before(u);if(s.inlineContent)ei(e,de.create(r,a+1,a+1+s.content.size));else if(oe.isSelectable(s))ei(e,oe.create(r,a));else continue;return!0}}function Yc(e){return qs(e)}const BA=Mt?"metaKey":"ctrlKey";ot.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=Yc(e),i=Date.now(),u="singleClick";i-e.input.lastClick.time<500&&Cx(n,e.input.lastClick)&&!n[BA]&&e.input.lastClick.button==n.button&&(e.input.lastClick.type=="singleClick"?u="doubleClick":e.input.lastClick.type=="doubleClick"&&(u="tripleClick")),e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:u,button:n.button};let s=e.posAtCoords(Ra(n));s&&(u=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new Dx(e,s,n,!!r)):(u=="doubleClick"?Ix:wx)(e,s.pos,s.inside,n)?n.preventDefault():Kn(e,"pointer"))};class Dx{constructor(t,n,r,i){this.view=t,this.pos=n,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[BA],this.allowDefault=r.shiftKey;let u,s;if(n.inside>-1)u=t.state.doc.nodeAt(n.inside),s=n.inside;else{let c=t.state.doc.resolve(n.pos);u=c.parent,s=c.depth?c.before():0}const a=i?null:r.target,o=a?t.docView.nearestDesc(a,!0):null;this.target=o&&o.nodeDOM.nodeType==1?o.nodeDOM:null;let{selection:l}=t.state;r.button==0&&(u.type.spec.draggable&&u.type.spec.selectable!==!1||l instanceof oe&&l.from<=s&&l.to>s)&&(this.mightDrag={node:u,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Ft&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),Kn(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Sn(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(Ra(t))),this.updateAllowDefault(t),this.allowDefault||!n?Kn(this.view,"pointer"):Sx(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||rt&&this.mightDrag&&!this.mightDrag.node.isAtom||Xe&&!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)?(ei(this.view,ce.near(this.view.state.doc.resolve(n.pos))),t.preventDefault()):Kn(this.view,"pointer")}move(t){this.updateAllowDefault(t),Kn(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}ot.touchstart=e=>{e.input.lastTouch=Date.now(),Yc(e),Kn(e,"pointer")};ot.touchmove=e=>{e.input.lastTouch=Date.now(),Kn(e,"pointer")};ot.contextmenu=e=>Yc(e);function LA(e,t){return e.composing?!0:rt&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const _x=xn?5e3:-1;lt.compositionstart=lt.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof de&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||Xe&&fA&&Ox(e)))e.markCursor=e.state.storedMarks||n.marks(),qs(e,!0),e.markCursor=null;else if(qs(e,!t.selection.empty),Ft&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=e.domSelectionRange();for(let i=r.focusNode,u=r.focusOffset;i&&i.nodeType==1&&u!=0;){let s=u<0?i.lastChild:i.childNodes[u-1];if(!s)break;if(s.nodeType==3){let a=e.domSelection();a&&a.collapse(s,s.nodeValue.length);break}else i=s,u=-1}}e.input.composing=!0}vA(e,_x)};function Ox(e){let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(!t||t.nodeType!=1||n>=t.childNodes.length)return!1;let r=t.childNodes[n];return r.nodeType==1&&r.contentEditable=="false"}lt.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.badSafariComposition?e.domObserver.forceFlush():e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,vA(e,20))};function vA(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>qs(e),t))}function FA(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=Mx());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function Rx(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=kC(t.focusNode,t.focusOffset),r=SC(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let i=r.pmViewDesc,u=e.domObserver.lastChangedTextNode;if(n==u||r==u)return u;if(!i||!i.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let s=n.pmViewDesc;if(!(!s||!s.isText(n.nodeValue)))return r}}return n||r}function Mx(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function qs(e,t=!1){if(!(xn&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),FA(e),t||e.docView&&e.docView.dirty){let n=Wc(e),r=e.state.selection;return n&&!n.eq(r)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function Bx(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 r=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}const fu=gt&&Jn<15||li&&DC<604;ot.copy=lt.cut=(e,t)=>{let n=t,r=e.state.selection,i=n.type=="cut";if(r.empty)return;let u=fu?null:n.clipboardData,s=r.content(),{dom:a,text:o}=zc(e,s);u?(n.preventDefault(),u.clearData(),u.setData("text/html",a.innerHTML),u.setData("text/plain",o)):Bx(e,a),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function Lx(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function vx(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let i=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?hu(e,r.value,null,i,t):hu(e,r.textContent,r.innerHTML,i,t)},50)}function hu(e,t,n,r,i){let u=NA(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",o=>o(e,i,u||Z.empty)))return!0;if(!u)return!1;let s=Lx(u),a=s?e.state.tr.replaceSelectionWith(s,r):e.state.tr.replaceSelection(u);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function PA(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," "):""}lt.paste=(e,t)=>{let n=t;if(e.composing&&!xn)return;let r=fu?null:n.clipboardData,i=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&hu(e,PA(r),r.getData("text/html"),i,n)?n.preventDefault():vx(e,n)};class HA{constructor(t,n,r){this.slice=t,this.move=n,this.node=r}}const Fx=Mt?"altKey":"ctrlKey";function UA(e,t){let n;return e.someProp("dragCopies",r=>{n=n||r(t)}),n!=null?!n:!t[Fx]}ot.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=e.state.selection,u=i.empty?null:e.posAtCoords(Ra(n)),s;if(!(u&&u.pos>=i.from&&u.pos<=(i instanceof oe?i.to-1:i.to))){if(r&&r.mightDrag)s=oe.create(e.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=e.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=e.docView&&(s=oe.create(e.state.doc,d.posBefore))}}let a=(s||e.state.selection).content(),{dom:o,text:l,slice:c}=zc(e,a);(!n.dataTransfer.files.length||!Xe||dA>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(fu?"Text":"text/html",o.innerHTML),n.dataTransfer.effectAllowed="copyMove",fu||n.dataTransfer.setData("text/plain",l),e.dragging=new HA(c,UA(e,n),s)};ot.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};lt.dragover=lt.dragenter=(e,t)=>t.preventDefault();lt.drop=(e,t)=>{try{Px(e,t,e.dragging)}finally{e.dragging=null}};function Px(e,t,n){if(!t.dataTransfer)return;let r=e.posAtCoords(Ra(t));if(!r)return;let i=e.state.doc.resolve(r.pos),u=n&&n.slice;u?e.someProp("transformPasted",h=>{u=h(u,e,!1)}):u=NA(e,PA(t.dataTransfer),fu?null:t.dataTransfer.getData("text/html"),!1,i);let s=!!(n&&UA(e,t));if(e.someProp("handleDrop",h=>h(e,t,u||Z.empty,s))){t.preventDefault();return}if(!u)return;t.preventDefault();let a=u?yT(e.state.doc,i.pos,u):i.pos;a==null&&(a=i.pos);let o=e.state.tr;if(s){let{node:h}=n;h?h.replace(o):o.deleteSelection()}let l=o.mapping.map(a),c=u.openStart==0&&u.openEnd==0&&u.content.childCount==1,d=o.doc;if(c?o.replaceRangeWith(l,l,u.content.firstChild):o.replaceRange(l,l,u),o.doc.eq(d))return;let f=o.doc.resolve(l);if(c&&oe.isSelectable(u.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(u.content.firstChild))o.setSelection(new oe(f));else{let h=o.mapping.map(a);o.mapping.maps[o.mapping.maps.length-1].forEach((m,b,T,E)=>h=E),o.setSelection(Qc(e,f,o.doc.resolve(h)))}e.focus(),e.dispatch(o.setMeta("uiEvent","drop"))}ot.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())&&Sn(e)},20))};ot.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)};ot.beforeinput=(e,t)=>{if(Xe&&xn&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:r}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=r||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",u=>u(e,hr(8,"Backspace")))))return;let{$cursor:i}=e.state.selection;i&&i.pos>0&&e.dispatch(e.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let e in lt)ot[e]=lt[e];function pu(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}class Ys{constructor(t,n){this.toDOM=t,this.spec=n||yr,this.side=this.spec.side||0}map(t,n,r,i){let{pos:u,deleted:s}=t.mapResult(n.from+i,this.side<0?-1:1);return s?null:new $e(u-r,u-r,this)}valid(){return!0}eq(t){return this==t||t instanceof Ys&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&pu(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class Zn{constructor(t,n){this.attrs=t,this.spec=n||yr}map(t,n,r,i){let u=t.map(n.from+i,this.spec.inclusiveStart?-1:1)-r,s=t.map(n.to+i,this.spec.inclusiveEnd?1:-1)-r;return u>=s?null:new $e(u,s,this)}valid(t,n){return n.from<n.to}eq(t){return this==t||t instanceof Zn&&pu(this.attrs,t.attrs)&&pu(this.spec,t.spec)}static is(t){return t.type instanceof Zn}destroy(){}}class Gc{constructor(t,n){this.attrs=t,this.spec=n||yr}map(t,n,r,i){let u=t.mapResult(n.from+i,1);if(u.deleted)return null;let s=t.mapResult(n.to+i,-1);return s.deleted||s.pos<=u.pos?null:new $e(u.pos-r,s.pos-r,this)}valid(t,n){let{index:r,offset:i}=t.content.findIndex(n.from),u;return i==n.from&&!(u=t.child(r)).isText&&i+u.nodeSize==n.to}eq(t){return this==t||t instanceof Gc&&pu(this.attrs,t.attrs)&&pu(this.spec,t.spec)}destroy(){}}class $e{constructor(t,n,r){this.from=t,this.to=n,this.type=r}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,r){return this.type.map(t,this,n,r)}static widget(t,n,r){return new $e(t,t,new Ys(n,r))}static inline(t,n,r,i){return new $e(t,n,new Zn(r,i))}static node(t,n,r,i){return new $e(t,n,new Gc(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof Zn}get widget(){return this.type instanceof Ys}}const Vr=[],yr={};class Oe{constructor(t,n){this.local=t.length?t:Vr,this.children=n.length?n:Vr}static create(t,n){return n.length?Gs(n,t,0,yr):tt}find(t,n,r){let i=[];return this.findInner(t??0,n??1e9,i,0,r),i}findInner(t,n,r,i,u){for(let s=0;s<this.local.length;s++){let a=this.local[s];a.from<=n&&a.to>=t&&(!u||u(a.spec))&&r.push(a.copy(a.from+i,a.to+i))}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,r,i+a,u)}}map(t,n,r){return this==tt||t.maps.length==0?this:this.mapInner(t,n,0,0,r||yr)}mapInner(t,n,r,i,u){let s;for(let a=0;a<this.local.length;a++){let o=this.local[a].map(t,r,i);o&&o.type.valid(n,o)?(s||(s=[])).push(o):u.onRemove&&u.onRemove(this.local[a].spec)}return this.children.length?Hx(this.children,s||[],t,n,r,i,u):s?new Oe(s.sort(Tr),Vr):tt}add(t,n){return n.length?this==tt?Oe.create(t,n):this.addInner(t,n,0):this}addInner(t,n,r){let i,u=0;t.forEach((a,o)=>{let l=o+r,c;if(c=QA(n,a,l)){for(i||(i=this.children.slice());u<i.length&&i[u]<o;)u+=3;i[u]==o?i[u+2]=i[u+2].addInner(a,c,l+1):i.splice(u,0,o,o+a.nodeSize,Gs(c,a,l+1,yr)),u+=3}});let s=WA(u?zA(n):n,-r);for(let a=0;a<s.length;a++)s[a].type.valid(t,s[a])||s.splice(a--,1);return new Oe(s.length?this.local.concat(s).sort(Tr):this.local,i||this.children)}remove(t){return t.length==0||this==tt?this:this.removeInner(t,0)}removeInner(t,n){let r=this.children,i=this.local;for(let u=0;u<r.length;u+=3){let s,a=r[u]+n,o=r[u+1]+n;for(let c=0,d;c<t.length;c++)(d=t[c])&&d.from>a&&d.to<o&&(t[c]=null,(s||(s=[])).push(d));if(!s)continue;r==this.children&&(r=this.children.slice());let l=r[u+2].removeInner(s,a+1);l!=tt?r[u+2]=l:(r.splice(u,3),u-=3)}if(i.length){for(let u=0,s;u<t.length;u++)if(s=t[u])for(let a=0;a<i.length;a++)i[a].eq(s,n)&&(i==this.local&&(i=this.local.slice()),i.splice(a--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new Oe(i,r):tt}forChild(t,n){if(this==tt)return this;if(n.isLeaf)return Oe.empty;let r,i;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=t){this.children[a]==t&&(r=this.children[a+2]);break}let u=t+1,s=u+n.content.size;for(let a=0;a<this.local.length;a++){let o=this.local[a];if(o.from<s&&o.to>u&&o.type instanceof Zn){let l=Math.max(u,o.from)-u,c=Math.min(s,o.to)-u;l<c&&(i||(i=[])).push(o.copy(l,c))}}if(i){let a=new Oe(i.sort(Tr),Vr);return r?new Wn([a,r]):a}return r||tt}eq(t){if(this==t)return!0;if(!(t instanceof Oe)||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 Vc(this.localsInner(t))}localsInner(t){if(this==tt)return Vr;if(t.inlineContent||!this.local.some(Zn.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Zn||n.push(this.local[r]);return n}forEachSet(t){t(this)}}Oe.empty=new Oe([],[]);Oe.removeOverlap=Vc;const tt=Oe.empty;class Wn{constructor(t){this.members=t}map(t,n){const r=this.members.map(i=>i.map(t,n,yr));return Wn.from(r)}forChild(t,n){if(n.isLeaf)return Oe.empty;let r=[];for(let i=0;i<this.members.length;i++){let u=this.members[i].forChild(t,n);u!=tt&&(u instanceof Wn?r=r.concat(u.members):r.push(u))}return Wn.from(r)}eq(t){if(!(t instanceof Wn)||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,r=!0;for(let i=0;i<this.members.length;i++){let u=this.members[i].localsInner(t);if(u.length)if(!n)n=u;else{r&&(n=n.slice(),r=!1);for(let s=0;s<u.length;s++)n.push(u[s])}}return n?Vc(r?n:n.sort(Tr)):Vr}static from(t){switch(t.length){case 0:return tt;case 1:return t[0];default:return new Wn(t.every(n=>n instanceof Oe)?t:t.reduce((n,r)=>n.concat(r instanceof Oe?r:r.members),[]))}}forEachSet(t){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(t)}}function Hx(e,t,n,r,i,u,s){let a=e.slice();for(let l=0,c=u;l<n.maps.length;l++){let d=0;n.maps[l].forEach((f,h,m,b)=>{let T=b-m-(h-f);for(let E=0;E<a.length;E+=3){let O=a[E+1];if(O<0||f>O+c-d)continue;let w=a[E]+c-d;h>=w?a[E+1]=f<=w?-2:-1:f>=c&&T&&(a[E]+=T,a[E+1]+=T)}d+=T}),c=n.maps[l].map(c,-1)}let o=!1;for(let l=0;l<a.length;l+=3)if(a[l+1]<0){if(a[l+1]==-2){o=!0,a[l+1]=-1;continue}let c=n.map(e[l]+u),d=c-i;if(d<0||d>=r.content.size){o=!0;continue}let f=n.map(e[l+1]+u,-1),h=f-i,{index:m,offset:b}=r.content.findIndex(d),T=r.maybeChild(m);if(T&&b==d&&b+T.nodeSize==h){let E=a[l+2].mapInner(n,T,c+1,e[l]+u+1,s);E!=tt?(a[l]=d,a[l+1]=h,a[l+2]=E):(a[l+1]=-2,o=!0)}else o=!0}if(o){let l=Ux(a,e,t,n,i,u,s),c=Gs(l,r,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 h=c.children[d];for(;f<a.length&&a[f]<h;)f+=3;a.splice(f,0,c.children[d],c.children[d+1],c.children[d+2])}}return new Oe(t.sort(Tr),a)}function WA(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let i=e[r];n.push(new $e(i.from+t,i.to+t,i.type))}return n}function Ux(e,t,n,r,i,u,s){function a(o,l){for(let c=0;c<o.local.length;c++){let d=o.local[c].map(r,i,l);d?n.push(d):s.onRemove&&s.onRemove(o.local[c].spec)}for(let c=0;c<o.children.length;c+=3)a(o.children[c+2],o.children[c]+l+1)}for(let o=0;o<e.length;o+=3)e[o+1]==-1&&a(e[o+2],t[o]+u+1);return n}function QA(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,i=null;for(let u=0,s;u<e.length;u++)(s=e[u])&&s.from>n&&s.to<r&&((i||(i=[])).push(s),e[u]=null);return i}function zA(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function Gs(e,t,n,r){let i=[],u=!1;t.forEach((a,o)=>{let l=QA(e,a,o+n);if(l){u=!0;let c=Gs(l,a,n+o+1,r);c!=tt&&i.push(o,o+a.nodeSize,c)}});let s=WA(u?zA(e):e,-n).sort(Tr);for(let a=0;a<s.length;a++)s[a].type.valid(t,s[a])||(r.onRemove&&r.onRemove(s[a].spec),s.splice(a--,1));return s.length||i.length?new Oe(s,i):tt}function Tr(e,t){return e.from-t.from||e.to-t.to}function Vc(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let i=n+1;i<t.length;i++){let u=t[i];if(u.from==r.from){u.to!=r.to&&(t==e&&(t=e.slice()),t[i]=u.copy(u.from,r.to),Gh(t,i+1,u.copy(r.to,u.to)));continue}else{u.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,u.from),Gh(t,i,r.copy(u.from,r.to)));break}}}return t}function Gh(e,t,n){for(;t<e.length&&Tr(n,e[t])>0;)t++;e.splice(t,0,n)}function xo(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=tt&&t.push(r)}),e.cursorWrapper&&t.push(Oe.create(e.state.doc,[e.cursorWrapper.deco])),Wn.from(t)}const Wx={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Qx=gt&&Jn<=11;class zx{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}}class Kx{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new zx,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;i<r.length;i++)this.queue.push(r[i]);gt&&Jn<=11&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():rt&&t.composing&&r.some(i=>i.type=="childList"&&i.target.nodeName=="TR")?(t.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),Qx&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.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,Wx)),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(Hh(this.view)){if(this.suppressingSelectionUpdates)return Sn(this.view);if(gt&&Jn<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&Or(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,r;for(let u=t.focusNode;u;u=oi(u))n.add(u);for(let u=t.anchorNode;u;u=oi(u))if(n.has(u)){r=u;break}let i=r&&this.view.docView.nearestDesc(r);if(i&&i.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))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 r=t.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&Hh(t)&&!this.ignoreSelectionChange(r),u=-1,s=-1,a=!1,o=[];if(t.editable)for(let c=0;c<n.length;c++){let d=this.registerMutation(n[c],o);d&&(u=u<0?d.from:Math.min(d.from,u),s=s<0?d.to:Math.max(d.to,s),d.typeOver&&(a=!0))}if(o.some(c=>c.nodeName=="BR")&&(t.input.lastKeyCode==8||t.input.lastKeyCode==46)){for(let c of o)if(c.nodeName=="BR"&&c.parentNode){let d=c.nextSibling;for(;d&&d.nodeType==1;){if(d.contentEditable=="false"){c.parentNode.removeChild(c);break}d=d.firstChild}}}else if(Ft&&o.length){let c=o.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 h=f.parentNode;h&&h.nodeName=="LI"&&(!d||Gx(t,d)!=h)&&f.remove()}}}let l=null;u<0&&i&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)<Date.now()-300&&_a(r)&&(l=Wc(t))&&l.eq(ce.near(t.state.doc.resolve(0),1))?(t.input.lastFocus=0,Sn(t),this.currentSelection.set(r),t.scrollToSelection()):(u>-1||i)&&(u>-1&&(t.docView.markDirty(u,s),qx(t)),t.input.badSafariComposition&&(t.input.badSafariComposition=!1,Vx(t,o)),this.handleDOMChange(u,s,a,o),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||Sn(t),this.currentSelection.set(r))}registerMutation(t,n){if(n.indexOf(t.target)>-1)return null;let r=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(r==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!r||r.ignoreMutation(t))return null;if(t.type=="childList"){for(let c=0;c<t.addedNodes.length;c++){let d=t.addedNodes[c];n.push(d),d.nodeType==3&&(this.lastChangedTextNode=d)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(t.target))return{from:r.posBefore,to:r.posAfter};let i=t.previousSibling,u=t.nextSibling;if(gt&&Jn<=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)&&(i=d),(!f||Array.prototype.indexOf.call(t.addedNodes,f)<0)&&(u=f)}let s=i&&i.parentNode==t.target?Ze(i)+1:0,a=r.localPosFromDOM(t.target,s,-1),o=u&&u.parentNode==t.target?Ze(u):t.target.childNodes.length,l=r.localPosFromDOM(t.target,o,1);return{from:a,to:l}}else return t.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=t.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:t.target.nodeValue==t.oldValue})}}let Vh=new WeakMap,Jh=!1;function qx(e){if(!Vh.has(e)&&(Vh.set(e,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1)){if(e.requiresGeckoHackNode=Ft,Jh)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."),Jh=!0}}function jh(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,u=t.endOffset,s=e.domAtPos(e.state.selection.anchor);return Or(s.node,s.offset,i,u)&&([n,r,i,u]=[i,u,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:u}}function Yx(e,t){if(t.getComposedRanges){let i=t.getComposedRanges(e.root)[0];if(i)return jh(e,i)}let n;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return e.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",r,!0),n?jh(e,n):null}function Gx(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let r=e.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function Vx(e,t){var n;let{focusNode:r,focusOffset:i}=e.domSelectionRange();for(let u of t)if(((n=u.parentNode)===null||n===void 0?void 0:n.nodeName)=="TR"){let s=u.nextSibling;for(;s&&s.nodeName!="TD"&&s.nodeName!="TH";)s=s.nextSibling;if(s){let a=s;for(;;){let o=a.firstChild;if(!o||o.nodeType!=1||o.contentEditable=="false"||/^(BR|IMG)$/.test(o.nodeName))break;a=o}a.insertBefore(u,a.firstChild),r==u&&e.domSelection().collapse(u,i)}else u.parentNode.removeChild(u)}}function Jx(e,t,n){let{node:r,fromOffset:i,toOffset:u,from:s,to:a}=e.docView.parseRange(t,n),o=e.domSelectionRange(),l,c=o.anchorNode;if(c&&e.dom.contains(c.nodeType==1?c:c.parentNode)&&(l=[{node:c,offset:o.anchorOffset}],_a(o)||l.push({node:o.focusNode,offset:o.focusOffset})),Xe&&e.input.lastKeyCode===8)for(let T=u;T>i;T--){let E=r.childNodes[T-1],O=E.pmViewDesc;if(E.nodeName=="BR"&&!O){u=T;break}if(!O||O.size)break}let d=e.state.doc,f=e.someProp("domParser")||Dc.fromSchema(e.state.schema),h=d.resolve(s),m=null,b=f.parse(r,{topNode:h.parent,topMatch:h.parent.contentMatchAt(h.index()),topOpen:!0,from:i,to:u,preserveWhitespace:h.parent.type.whitespace=="pre"?"full":!0,findPositions:l,ruleFromNode:jx,context:h});if(l&&l[0].pos!=null){let T=l[0].pos,E=l[1]&&l[1].pos;E==null&&(E=T),m={anchor:T+s,head:E+s}}return{doc:b,sel:m,from:s,to:a}}function jx(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(rt&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(e.parentNode.lastChild==e||rt&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}const Zx=/^(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 Xx(e,t,n,r,i){let u=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let B=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,G=Wc(e,B);if(G&&!e.state.selection.eq(G)){if(Xe&&xn&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",S=>S(e,hr(13,"Enter"))))return;let M=e.state.tr.setSelection(G);B=="pointer"?M.setMeta("pointer",!0):B=="key"&&M.scrollIntoView(),u&&M.setMeta("composition",u),e.dispatch(M)}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 o=e.state.selection,l=Jx(e,t,n),c=e.state.doc,d=c.slice(l.from,l.to),f,h;e.input.lastKeyCode===8&&Date.now()-100<e.input.lastKeyCodeTime?(f=e.state.selection.to,h="end"):(f=e.state.selection.from,h="start"),e.input.lastKeyCode=null;let m=tk(d.content,l.doc.content,l.from,f,h);if(m&&e.input.domChangeCount++,(li&&e.input.lastIOSEnter>Date.now()-225||xn)&&i.some(B=>B.nodeType==1&&!Zx.test(B.nodeName))&&(!m||m.endA>=m.endB)&&e.someProp("handleKeyDown",B=>B(e,hr(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!m)if(r&&o instanceof de&&!o.empty&&o.$head.sameParent(o.$anchor)&&!e.composing&&!(l.sel&&l.sel.anchor!=l.sel.head))m={start:o.from,endA:o.to,endB:o.to};else{if(l.sel){let B=Zh(e,e.state.doc,l.sel);if(B&&!B.eq(e.state.selection)){let G=e.state.tr.setSelection(B);u&&G.setMeta("composition",u),e.dispatch(G)}}return}e.state.selection.from<e.state.selection.to&&m.start==m.endB&&e.state.selection instanceof de&&(m.start>e.state.selection.from&&m.start<=e.state.selection.from+2&&e.state.selection.from>=l.from?m.start=e.state.selection.from:m.endA<e.state.selection.to&&m.endA>=e.state.selection.to-2&&e.state.selection.to<=l.to&&(m.endB+=e.state.selection.to-m.endA,m.endA=e.state.selection.to)),gt&&Jn<=11&&m.endB==m.start+1&&m.endA==m.start&&m.start>l.from&&l.doc.textBetween(m.start-l.from-1,m.start-l.from+1)==" "&&(m.start--,m.endA--,m.endB--);let b=l.doc.resolveNoCache(m.start-l.from),T=l.doc.resolveNoCache(m.endB-l.from),E=c.resolve(m.start),O=b.sameParent(T)&&b.parent.inlineContent&&E.end()>=m.endA;if((li&&e.input.lastIOSEnter>Date.now()-225&&(!O||i.some(B=>B.nodeName=="DIV"||B.nodeName=="P"))||!O&&b.pos<l.doc.content.size&&(!b.sameParent(T)||!b.parent.inlineContent)&&b.pos<T.pos&&!/\S/.test(l.doc.textBetween(b.pos,T.pos,"","")))&&e.someProp("handleKeyDown",B=>B(e,hr(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>m.start&&ek(c,m.start,m.endA,b,T)&&e.someProp("handleKeyDown",B=>B(e,hr(8,"Backspace")))){xn&&Xe&&e.domObserver.suppressSelectionUpdates();return}Xe&&m.endB==m.start&&(e.input.lastChromeDelete=Date.now()),xn&&!O&&b.start()!=T.start()&&T.parentOffset==0&&b.depth==T.depth&&l.sel&&l.sel.anchor==l.sel.head&&l.sel.head==m.endA&&(m.endB-=2,T=l.doc.resolveNoCache(m.endB-l.from),setTimeout(()=>{e.someProp("handleKeyDown",function(B){return B(e,hr(13,"Enter"))})},20));let w=m.start,L=m.endA,_=B=>{let G=B||e.state.tr.replace(w,L,l.doc.slice(m.start-l.from,m.endB-l.from));if(l.sel){let M=Zh(e,G.doc,l.sel);M&&!(Xe&&e.composing&&M.empty&&(m.start!=m.endB||e.input.lastChromeDelete<Date.now()-100)&&(M.head==w||M.head==G.mapping.map(L)-1)||gt&&M.empty&&M.head==w)&&G.setSelection(M)}return u&&G.setMeta("composition",u),G.scrollIntoView()},I;if(O)if(b.pos==T.pos){gt&&Jn<=11&&b.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>Sn(e),20));let B=_(e.state.tr.delete(w,L)),G=c.resolve(m.start).marksAcross(c.resolve(m.endA));G&&B.ensureMarks(G),e.dispatch(B)}else if(m.endA==m.endB&&(I=$x(b.parent.content.cut(b.parentOffset,T.parentOffset),E.parent.content.cut(E.parentOffset,m.endA-E.start())))){let B=_(e.state.tr);I.type=="add"?B.addMark(w,L,I.mark):B.removeMark(w,L,I.mark),e.dispatch(B)}else if(b.parent.child(b.index()).isText&&b.index()==T.index()-(T.textOffset?0:1)){let B=b.parent.textBetween(b.parentOffset,T.parentOffset),G=()=>_(e.state.tr.insertText(B,w,L));e.someProp("handleTextInput",M=>M(e,w,L,B,G))||e.dispatch(G())}else e.dispatch(_());else e.dispatch(_())}function Zh(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:Qc(e,t.resolve(n.anchor),t.resolve(n.head))}function $x(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,i=n,u=r,s,a,o;for(let c=0;c<r.length;c++)i=r[c].removeFromSet(i);for(let c=0;c<n.length;c++)u=n[c].removeFromSet(u);if(i.length==1&&u.length==0)a=i[0],s="add",o=c=>c.mark(a.addToSet(c.marks));else if(i.length==0&&u.length==1)a=u[0],s="remove",o=c=>c.mark(a.removeFromSet(c.marks));else return null;let l=[];for(let c=0;c<t.childCount;c++)l.push(o(t.child(c)));if(Q.from(l).eq(e))return{mark:a,type:s}}function ek(e,t,n,r,i){if(n-t<=i.pos-r.pos||ko(r,!0,!1)<i.pos)return!1;let u=e.resolve(t);if(!r.parent.isTextblock){let a=u.nodeAfter;return a!=null&&n==t+a.nodeSize}if(u.parentOffset<u.parent.content.size||!u.parent.isTextblock)return!1;let s=e.resolve(ko(u,!0,!0));return!s.parent.isTextblock||s.pos>n||ko(s,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(s.parent.content)}function ko(e,t,n){let r=e.depth,i=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,i++,t=!1;if(n){let u=e.node(r).maybeChild(e.indexAfter(r));for(;u&&!u.isLeaf;)u=u.firstChild,i++}return i}function tk(e,t,n,r,i){let u=e.findDiffStart(t,n);if(u==null)return null;let{a:s,b:a}=e.findDiffEnd(t,n+e.size,n+t.size);if(i=="end"){let o=Math.max(0,u-Math.min(s,a));r-=s+o-u}if(s<u&&e.size<t.size){let o=r<=u&&r>=s?u-r:0;u-=o,u&&u<t.size&&Xh(t.textBetween(u-1,u+1))&&(u+=o?1:-1),a=u+(a-s),s=u}else if(a<u){let o=r<=u&&r>=a?u-r:0;u-=o,u&&u<e.size&&Xh(e.textBetween(u-1,u+1))&&(u+=o?1:-1),s=u+(s-a),a=u}return{start:u,endA:s,endB:a}}function Xh(e){if(e.length!=2)return!1;let t=e.charCodeAt(0),n=e.charCodeAt(1);return t>=56320&&t<=57343&&n>=55296&&n<=56319}class KA{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 gx,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(r0),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=t0(this),e0(this),this.nodeViews=n0(this),this.docView=Mh(this.state.doc,$h(this),xo(this),this.dom,this),this.domObserver=new Kx(this,(r,i,u,s)=>Xx(this,r,i,u,s)),this.domObserver.start(),bx(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&&Vl(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(r0),this.directPlugins=t.plugins),this.updateStateInner(t.state,n)}setProps(t){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in t)n[r]=t[r];this.update(n)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,n){var r;let i=this.state,u=!1,s=!1;t.storedMarks&&this.composing&&(FA(this),s=!0),this.state=t;let a=i.plugins!=t.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let h=n0(this);rk(h,this.nodeViews)&&(this.nodeViews=h,u=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&Vl(this),this.editable=t0(this),e0(this);let o=xo(this),l=$h(this),c=i.plugins!=t.plugins&&!i.doc.eq(t.doc)?"reset":t.scrollToSelection>i.scrollToSelection?"to selection":"preserve",d=u||!this.docView.matchesNode(t.doc,l,o);(d||!t.selection.eq(i.selection))&&(s=!0);let f=c=="preserve"&&s&&this.dom.style.overflowAnchor==null&&RC(this);if(s){this.domObserver.stop();let h=d&&(gt||Xe)&&!this.composing&&!i.selection.empty&&!t.selection.empty&&nk(i.selection,t.selection);if(d){let m=Xe?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=Rx(this)),(u||!this.docView.update(t.doc,l,o,this))&&(this.docView.updateOuterDeco(l),this.docView.destroy(),this.docView=Mh(t.doc,l,o,this.dom,this)),m&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(h=!0)}h||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&nx(this))?Sn(this,h):(SA(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((r=this.dragging)===null||r===void 0)&&r.node&&!i.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,i),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():f&&MC(f)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!(!t||!this.dom.contains(t.nodeType==1?t:t.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof oe){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&wh(this,n.getBoundingClientRect(),t)}else wh(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 r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,t)}}updateDraggedNode(t,n){let r=t.node,i=-1;if(r.from<this.state.doc.content.size&&this.state.doc.nodeAt(r.from)==r.node)i=r.from;else{let u=r.from+(this.state.doc.content.size-n.doc.content.size);(u>0&&u<this.state.doc.content.size&&this.state.doc.nodeAt(u))==r.node&&(i=u)}this.dragging=new HA(t.slice,t.move,i<0?void 0:oe.create(this.state.doc,i))}someProp(t,n){let r=this._props&&this._props[t],i;if(r!=null&&(i=n?n(r):r))return i;for(let s=0;s<this.directPlugins.length;s++){let a=this.directPlugins[s].props[t];if(a!=null&&(i=n?n(a):a))return i}let u=this.state.plugins;if(u)for(let s=0;s<u.length;s++){let a=u[s].props[t];if(a!=null&&(i=n?n(a):a))return i}}hasFocus(){if(gt){let t=this.root.activeElement;if(t==this.dom)return!0;if(!t||!this.dom.contains(t))return!1;for(;t&&this.dom!=t&&this.dom.contains(t);){if(t.contentEditable=="false")return!1;t=t.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&BC(this.dom),Sn(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 HC(this,t)}coordsAtPos(t,n=1){return gA(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,r=-1){let i=this.docView.posFromDOM(t,n,r);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(t,n){return KC(this,n||this.state,t)}pasteHTML(t,n){return hu(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return hu(this,t,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(t){return zc(this,t)}destroy(){this.docView&&(Ex(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],xo(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,CC())}get isDestroyed(){return this.docView==null}dispatchEvent(t){return Tx(this,t)}domSelectionRange(){let t=this.domSelection();return t?rt&&this.root.nodeType===11&&wC(this.dom.ownerDocument)==this.dom&&Yx(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}KA.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};function $h(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 r in n)r=="class"?t.class+=" "+n[r]:r=="style"?t.style=(t.style?t.style+";":"")+n[r]:!t[r]&&r!="contenteditable"&&r!="nodeName"&&(t[r]=String(n[r]))}),t.translate||(t.translate="no"),[$e.node(0,e.state.doc.content.size,t)]}function e0(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:$e.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function t0(e){return!e.someProp("editable",t=>t(e.state)===!1)}function nk(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 n0(e){let t=Object.create(null);function n(r){for(let i in r)Object.prototype.hasOwnProperty.call(t,i)||(t[i]=r[i])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function rk(e,t){let n=0,r=0;for(let i in e){if(e[i]!=t[i])return!0;n++}for(let i in t)r++;return n!=r}function r0(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")}function _n(e,t){return e.meta={package:"@milkdown/core",group:"System",...t},e}var qA={text:(e,t,n,r)=>{const i=e.value;return/^[^*_\\]*\s+$/.test(i)?i:n.safe(i,{...r,encode:[]})},strong:(e,t,n,r)=>{const i=e.marker||n.options.strong||"*",u=n.enter("strong"),s=n.createTracker(r);let a=s.move(i+i);return a+=s.move(n.containerPhrasing(e,{before:a,after:i,...s.current()})),a+=s.move(i+i),u(),a},emphasis:(e,t,n,r)=>{const i=e.marker||n.options.emphasis||"*",u=n.enter("emphasis"),s=n.createTracker(r);let a=s.move(i);return a+=s.move(n.containerPhrasing(e,{before:a,after:i,...s.current()})),a+=s.move(i),u(),a}},In=Ae({},"editorView"),Qi=Ae({},"editorState"),So=Ae([],"initTimer"),i0=Ae({},"editor"),mu=Ae([],"inputRules"),Mr=Ae([],"prosePlugins"),Au=Ae([],"remarkPlugins"),Jl=Ae([],"nodeView"),jl=Ae([],"markView"),Cr=Ae(Dl().use(Cl).use(Il),"remark"),Zi=Ae({handlers:qA,encode:[]},"remarkStringifyOptions"),xs=an("ConfigReady");function ik(e){const t=n=>(n.record(xs),async()=>(await e(n),n.done(xs),()=>{n.clearTimer(xs)}));return _n(t,{displayName:"Config"}),t}var ti=an("InitReady");function uk(e){const t=n=>(n.inject(i0,e).inject(Mr,[]).inject(Au,[]).inject(mu,[]).inject(Jl,[]).inject(jl,[]).inject(Zi,{handlers:qA,encode:[]}).inject(Cr,Dl().use(Cl).use(Il)).inject(So,[xs]).record(ti),async()=>{await n.waitTimers(So);const r=n.get(Zi);return n.set(Cr,Dl().use(Cl).use(Il,r)),n.done(ti),()=>{n.remove(i0).remove(Mr).remove(Au).remove(mu).remove(Jl).remove(jl).remove(Zi).remove(Cr).remove(So).clearTimer(ti)}});return _n(t,{displayName:"Init"}),t}var bt=an("SchemaReady"),Io=Ae([],"schemaTimer"),wn=Ae({},"schema"),Xi=Ae([],"nodes"),$i=Ae([],"marks");function u0(e){return{...e,parseDOM:e.parseDOM?.map(t=>({priority:e.priority,...t}))}}var YA=e=>(e.inject(wn,{}).inject(Xi,[]).inject($i,[]).inject(Io,[ti]).record(bt),async()=>{await e.waitTimers(Io);const t=e.get(Cr),n=e.get(Au).reduce((i,u)=>i.use(u.plugin,u.options),t);e.set(Cr,n);const r=new J3({nodes:Object.fromEntries(e.get(Xi).map(([i,u])=>[i,u0(u)])),marks:Object.fromEntries(e.get($i).map(([i,u])=>[i,u0(u)]))});return e.set(wn,r),e.done(bt),()=>{e.remove(wn).remove(Xi).remove($i).remove(Io).clearTimer(bt)}});_n(YA,{displayName:"Schema"});var GA=class{constructor(){this.setCtx=e=>{this.#e=e},this.chain=()=>{if(this.#e==null)throw Va();const e=this.#e,t=[],n=this.get.bind(this),r={run:()=>{const u=mi(...t),s=e.get(In);return u(s.state,s.dispatch,s)},inline:u=>(t.push(u),r),pipe:i.bind(this)};function i(u,s){const a=n(u);return t.push(a(s)),r}return r}}#t=new Hp;#e=null;get ctx(){return this.#e}create(e,t){const n=e.create(this.#t.sliceMap);return n.set(t),n}get(e){return this.#t.get(e).get()}remove(e){return this.#t.remove(e)}call(e,t){if(this.#e==null)throw Va();const n=this.get(e)(t),r=this.#e.get(In);return n(r.state,r.dispatch,r)}inline(e){if(this.#e==null)throw Va();const t=this.#e.get(In);return e(t.state,t.dispatch,t)}};function sk(e="cmdKey"){return Ae((()=>()=>!1),e)}var ke=Ae(new GA,"commands"),wo=Ae([bt],"commandsTimer"),eu=an("CommandsReady"),VA=e=>{const t=new GA;return t.setCtx(e),e.inject(ke,t).inject(wo,[bt]).record(eu),async()=>(await e.waitTimers(wo),e.done(eu),()=>{e.remove(ke).remove(wo).clearTimer(eu)})};_n(VA,{displayName:"Commands"});function ak(e){return e.Backspace=mi(JT,Bc,_T,Xm),e}var JA=class{constructor(){this.setCtx=e=>{this.#t=e},this.add=e=>(this.#e.push(e),()=>{this.#e=this.#e.filter(t=>t!==e)}),this.addObjectKeymap=e=>{const t=[];return Object.entries(e).forEach(([n,r])=>{if(typeof r=="function"){const i={key:n,onRun:()=>r};this.#e.push(i),t.push(()=>{this.#e=this.#e.filter(u=>u!==i)})}else this.#e.push(r),t.push(()=>{this.#e=this.#e.filter(i=>i!==r)})}),()=>{t.forEach(n=>n())}},this.addBaseKeymap=()=>{const e=ak(GT);return this.addObjectKeymap(e)},this.build=()=>{const e={};return this.#e.forEach(t=>{e[t.key]=[...e[t.key]||[],t]}),Object.fromEntries(Object.entries(e).map(([t,n])=>{const r=n.sort((u,s)=>(s.priority??50)-(u.priority??50));return[t,(u,s,a)=>{const o=this.#t;if(o==null)throw ba();return mi(...r.map(l=>l.onRun(o)))(u,s,a)}]}))}}#t=null;#e=[];get ctx(){return this.#t}},Vs=Ae(new JA,"keymap"),No=Ae([bt],"keymapTimer"),tu=an("KeymapReady"),ok=e=>{const t=new JA;return t.setCtx(e),e.inject(Vs,t).inject(No,[bt]).record(tu),async()=>(await e.waitTimers(No),e.done(tu),()=>{e.remove(Vs).remove(No).clearTimer(tu)})},ks=an("ParserReady"),jA=(()=>{throw ba()}),Ss=Ae(jA,"parser"),Do=Ae([],"parserTimer"),ZA=e=>(e.inject(Ss,jA).inject(Do,[bt]).record(ks),async()=>{await e.waitTimers(Do);const t=e.get(Cr),n=e.get(wn);return e.set(Ss,EC.create(n,t)),e.done(ks),()=>{e.remove(Ss).remove(Do).clearTimer(ks)}});_n(ZA,{displayName:"Parser"});var Is=an("SerializerReady"),_o=Ae([],"serializerTimer"),XA=(()=>{throw ba()}),Oo=Ae(XA,"serializer"),$A=e=>(e.inject(Oo,XA).inject(_o,[bt]).record(Is),async()=>{await e.waitTimers(_o);const t=e.get(Cr),n=e.get(wn);return e.set(Oo,TC.create(n,t)),e.done(Is),()=>{e.remove(Oo).remove(_o).clearTimer(Is)}});_n($A,{displayName:"Serializer"});var ws=Ae("","defaultValue"),Ro=Ae(e=>e,"stateOptions"),Mo=Ae([],"editorStateTimer"),Ns=an("EditorStateReady");function lk(e,t,n){if(typeof e=="string")return t(e);if(e.type==="html")return Dc.fromSchema(n).parse(e.dom);if(e.type==="json")return kn.fromJSON(n,e.value);throw Hb(e)}var ck=new Nt("MILKDOWN_STATE_TRACKER"),e1=e=>(e.inject(ws,"").inject(Qi,{}).inject(Ro,t=>t).inject(Mo,[ks,Is,eu,tu]).record(Ns),async()=>{await e.waitTimers(Mo);const t=e.get(wn),n=e.get(Ss),r=e.get(mu),i=e.get(Ro),u=e.get(Mr),s=lk(e.get(ws),n,t),a=e.get(Vs),o=a.addBaseKeymap(),l=[...u,new wt({key:ck,state:{init:()=>{},apply:(f,h,m,b)=>{e.set(Qi,b)}}}),rC({rules:r}),gC(a.build())];e.set(Mr,l);const c=i({schema:t,doc:s,plugins:l}),d=Xr.create(c);return e.set(Qi,d),e.done(Ns),()=>{o(),e.remove(ws).remove(Qi).remove(Ro).remove(Mo).clearTimer(Ns)}});_n(e1,{displayName:"EditorState"});var gu=Ae([],"pasteRule"),Bo=Ae([bt],"pasteRuleTimer"),Ds=an("PasteRuleReady"),t1=e=>(e.inject(gu,[]).inject(Bo,[bt]).record(Ds),async()=>(await e.waitTimers(Bo),e.done(Ds),()=>{e.remove(gu).remove(Bo).clearTimer(Ds)}));_n(t1,{displayName:"PasteRule"});var Lo=an("EditorViewReady"),vo=Ae([],"editorViewTimer"),Fo=Ae({},"editorViewOptions"),_s=Ae(null,"root"),Zl=Ae(null,"rootDOM"),Xl=Ae({},"rootAttrs");function dk(e,t){const n=document.createElement("div");n.className="milkdown",e.appendChild(n),t.set(Zl,n);const r=t.get(Xl);return Object.entries(r).forEach(([i,u])=>n.setAttribute(i,u)),n}function fk(e){e.classList.add("editor"),e.setAttribute("role","textbox")}var hk=new Nt("MILKDOWN_VIEW_CLEAR"),n1=e=>(e.inject(_s,document.body).inject(In,{}).inject(Fo,{}).inject(Zl,null).inject(Xl,{}).inject(vo,[Ns,Ds]).record(Lo),async()=>{await e.wait(ti);const t=e.get(_s)||document.body,n=typeof t=="string"?document.querySelector(t):t;e.update(Mr,s=>[new wt({key:hk,view:a=>{const o=n?dk(n,e):void 0;return(()=>{if(o&&n){const c=a.dom;n.replaceChild(o,c),o.appendChild(c)}})(),{destroy:()=>{o?.parentNode&&o?.parentNode.replaceChild(a.dom,o),o?.remove()}}}}),...s]),await e.waitTimers(vo);const r=e.get(Qi),i=e.get(Fo),u=new KA(n,{state:r,nodeViews:Object.fromEntries(e.get(Jl)),markViews:Object.fromEntries(e.get(jl)),transformPasted:(s,a,o)=>(e.get(gu).sort((l,c)=>(c.priority??50)-(l.priority??50)).map(l=>l.run).forEach(l=>{s=l(s,a,o)}),s),...i});return fk(u.dom),e.set(In,u),e.done(Lo),()=>{u?.destroy(),e.remove(_s).remove(In).remove(Fo).remove(Zl).remove(Xl).remove(vo).clearTimer(Lo)}});_n(n1,{displayName:"EditorView"});var Rt=(function(e){return e.Idle="Idle",e.OnCreate="OnCreate",e.Created="Created",e.OnDestroy="OnDestroy",e.Destroyed="Destroyed",e})({}),pk=class r1{constructor(){this.enableInspector=(t=!0)=>(this.#t=t,this),this.onStatusChange=t=>(this.#n=t,this),this.config=t=>(this.#r.push(t),this),this.removeConfig=t=>(this.#r=this.#r.filter(n=>n!==t),this),this.use=t=>{const n=[t].flat();return n.flat().forEach(r=>{this.#i.set(r,{ctx:void 0,handler:void 0,cleanup:void 0})}),this.#e===Rt.Created&&this.#c(n,this.#i),this},this.remove=async t=>this.#e===Rt.OnCreate?(console.warn("[Milkdown]: You are trying to remove plugins when the editor is creating, this is not recommended, please check your code."),new Promise(n=>{setTimeout(()=>{n(this.remove(t))},50)})):(await this.#d([t].flat(),!0),this),this.create=async()=>this.#e===Rt.OnCreate?this:(this.#e===Rt.Created&&await this.destroy(),this.#l(Rt.OnCreate),this.#h(),this.#c([...this.#i.keys()],this.#i),await Promise.all([this.#f(this.#s),this.#f(this.#i)].flat()),this.#l(Rt.Created),this),this.destroy=async(t=!1)=>this.#e===Rt.Destroyed||this.#e===Rt.OnDestroy?this:this.#e===Rt.OnCreate?new Promise(n=>{setTimeout(()=>{n(this.destroy(t))},50)}):(t&&(this.#r=[]),this.#l(Rt.OnDestroy),await this.#d([...this.#i.keys()],t),await this.#p(),this.#l(Rt.Destroyed),this),this.action=t=>t(this.#o),this.inspect=()=>this.#t?[...this.#s.values(),...this.#i.values()].map(({ctx:t})=>t?.inspector?.read()).filter(t=>!!t):(console.warn("[Milkdown]: You are trying to collect inspection when inspector is disabled, please enable inspector by `editor.enableInspector()` first."),[])}static make(){return new r1}#t=!1;#e=Rt.Idle;#r=[];#n=()=>{};#a=new Hp;#u=new Zb;#i=new Map;#s=new Map;#o=new jb(this.#a,this.#u);#h=()=>{const t=ik(async r=>{await Promise.all(this.#r.map(i=>Promise.resolve(i(r))))}),n=[YA,ZA,$A,VA,ok,t1,e1,n1,uk(this),t];this.#c(n,this.#s)};#c=(t,n)=>{t.forEach(r=>{const i=this.#o.produce(this.#t?r.meta:void 0),u=r(i);n.set(r,{ctx:i,handler:u,cleanup:void 0})})};#d=(t,n=!1)=>Promise.all([t].flat().map(async r=>{const i=this.#i.get(r)?.cleanup;return n?this.#i.delete(r):this.#i.set(r,{ctx:void 0,handler:void 0,cleanup:void 0}),typeof i=="function"?i():i}));#p=async()=>{await Promise.all([...this.#s.entries()].map(async([t,{cleanup:n}])=>typeof n=="function"?n():n)),this.#s.clear()};#l=t=>{this.#e=t,this.#n(t)};#f=t=>[...t.entries()].map(async([n,r])=>{const{ctx:i,handler:u}=r;if(!u)return;const s=await u();t.set(n,{ctx:i,handler:u,cleanup:s})});get ctx(){return this.#o}get status(){return this.#e}};function le(e,t){const n=sk(e),r=i=>async()=>{r.key=n,await i.wait(eu);const u=t(i);return i.get(ke).create(n,u),r.run=s=>i.get(ke).call(e,s),()=>{i.get(ke).remove(n)}};return r}function yt(e){const t=n=>async()=>{await n.wait(bt);const r=e(n);return n.update(mu,i=>[...i,r]),t.inputRule=r,()=>{n.update(mu,i=>i.filter(u=>u!==r))}};return t}function mk(e){const t=n=>async()=>{await n.wait(bt);const r=e(n);return n.update(gu,i=>[...i,r]),t.pasteRule=r,()=>{n.update(gu,i=>i.filter(u=>u!==r))}};return t}function Ak(e,t){const n=r=>async()=>{const i=t(r);return r.update($i,u=>[...u.filter(s=>s[0]!==e),[e,i]]),n.id=e,n.schema=i,()=>{r.update($i,u=>u.filter(([s])=>s!==e))}};return n.type=r=>{const i=r.get(wn).marks[e];if(!i)throw Yb(e);return i},n}function Jc(e,t){const n=r=>async()=>{const i=t(r);return r.update(Xi,u=>[...u.filter(s=>s[0]!==e),[e,i]]),n.id=e,n.schema=i,()=>{r.update(Xi,u=>u.filter(([s])=>s!==e))}};return n.type=r=>{const i=r.get(wn).nodes[e];if(!i)throw qb(e);return i},n}function On(e){let t;const n=r=>async()=>(await r.wait(bt),t=e(r),r.update(Mr,i=>[...i,t]),()=>{r.update(Mr,i=>i.filter(u=>u!==t))});return n.plugin=()=>t,n.key=()=>t.spec.key,n}function gk(e){const t=n=>async()=>{await n.wait(tu);const r=n.get(Vs),i=e(n),u=r.addObjectKeymap(i);return t.keymap=i,()=>{u()}};return t}function ir(e,t){const n=Ae(e,t),r=i=>(i.inject(n),()=>()=>{i.remove(n)});return r.key=n,r}function Qe(e,t){const n=ir(t,e),r=Jc(e,u=>u.get(n.key)(u)),i=[n,r];return i.id=r.id,i.node=r,i.type=u=>r.type(u),i.ctx=n,i.key=n.key,i.extendSchema=u=>Qe(e,u(t)),i}function Ai(e,t){const n=ir(t,e),r=Ak(e,u=>u.get(n.key)(u)),i=[n,r];return i.id=r.id,i.mark=r,i.type=u=>r.type(u),i.ctx=n,i.key=n.key,i.extendSchema=u=>Ai(e,u(t)),i}function _t(e,t){const n=ir(Object.fromEntries(Object.entries(t).map(([u,{shortcuts:s,priority:a}])=>[u,{shortcuts:s,priority:a}])),`${e}Keymap`),r=gk(u=>{const s=u.get(n.key),a=Object.entries(t).flatMap(([o,{command:l}])=>{const c=s[o],d=[c.shortcuts].flat(),f=c.priority;return d.map(h=>[h,{key:h,onRun:l,priority:f}])});return Object.fromEntries(a)}),i=[n,r];return i.ctx=n,i.shortcuts=r,i.key=n.key,i.keymap=r.keymap,i}var Yt=(e,t=()=>({}))=>ir(t,`${e}Attr`),Pu=(e,t=()=>({}))=>ir(t,`${e}Attr`);function Pr(e,t,n){const r=ir({},e),i=s=>async()=>{await s.wait(ti);const a={plugin:t(s),options:s.get(r.key)};return s.update(Au,o=>[...o,a]),()=>{s.update(Au,o=>o.filter(l=>l!==a))}},u=[r,i];return u.id=e,u.plugin=i,u.options=r,u}function bk(){return e=>{const t=document.createElement("div"),n=e.get(wn),r=e.get(In),i=Fr.fromSchema(n).serializeFragment(r.state.doc.content);return t.appendChild(i),t.innerHTML}}function Ek(e,t){return function(n,r){let{$from:i,$to:u,node:s}=n.selection;if(s&&s.isBlock||i.depth<2||!i.sameParent(u))return!1;let a=i.node(-1);if(a.type!=e)return!1;if(i.parent.content.size==0&&i.node(-1).childCount==i.indexAfter(-1)){if(i.depth==3||i.node(-3).type!=e||i.index(-2)!=i.node(-2).childCount-1)return!1;if(r){let d=Q.empty,f=i.index(-1)?1:i.index(-2)?2:3;for(let E=i.depth-f;E>=i.depth-3;E--)d=Q.from(i.node(E).copy(d));let h=i.indexAfter(-1)<i.node(-2).childCount?1:i.indexAfter(-2)<i.node(-3).childCount?2:3;d=d.append(Q.from(e.createAndFill()));let m=i.before(i.depth-(f-1)),b=n.tr.replace(m,i.after(-h),new Z(d,4-f,0)),T=-1;b.doc.nodesBetween(m,b.doc.content.size,(E,O)=>{if(T>-1)return!1;E.isTextblock&&E.content.size==0&&(T=O+1)}),T>-1&&b.setSelection(ce.near(b.doc.resolve(T))),r(b.scrollIntoView())}return!0}let o=u.pos==i.end()?a.contentMatchAt(0).defaultType:null,l=n.tr.delete(i.pos,u.pos),c=o?[null,{type:o}]:void 0;return Vi(l.doc,i.pos,2,c)?(r&&r(l.split(i.pos,2,c).scrollIntoView()),!0):!1}}function yk(e){return function(t,n){let{$from:r,$to:i}=t.selection,u=r.blockRange(i,s=>s.childCount>0&&s.firstChild.type==e);return u?n?r.node(u.depth-1).type==e?Tk(t,n,e,u):Ck(t,n,u):!0:!1}}function Tk(e,t,n,r){let i=e.tr,u=r.end,s=r.$to.end(r.depth);u<s&&(i.step(new nt(u-1,s,u,s,new Z(Q.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new km(i.doc.resolve(r.$from.pos),i.doc.resolve(s),r.depth));const a=Sa(r);if(a==null)return!1;i.lift(r,a);let o=i.doc.resolve(i.mapping.map(u,-1)-1);return Ia(i.doc,o.pos)&&o.nodeBefore.type==o.nodeAfter.type&&i.join(o.pos),t(i.scrollIntoView()),!0}function Ck(e,t,n){let r=e.tr,i=n.parent;for(let h=n.end,m=n.endIndex-1,b=n.startIndex;m>b;m--)h-=i.child(m).nodeSize,r.delete(h-1,h+1);let u=r.doc.resolve(n.start),s=u.nodeAfter;if(r.mapping.map(n.end)!=n.start+u.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,o=n.endIndex==i.childCount,l=u.node(-1),c=u.index(-1);if(!l.canReplace(c+(a?0:1),c+1,s.content.append(o?Q.empty:Q.from(i))))return!1;let d=u.pos,f=d+s.nodeSize;return r.step(new nt(d-(a?1:0),f+(o?1:0),d+1,f-1,new Z((a?Q.empty:Q.from(i.copy(Q.empty))).append(o?Q.empty:Q.from(i.copy(Q.empty))),a?0:1,o?0:1),a?0:1)),t(r.scrollIntoView()),!0}function xk(e){return function(t,n){let{$from:r,$to:i}=t.selection,u=r.blockRange(i,l=>l.childCount>0&&l.firstChild.type==e);if(!u)return!1;let s=u.startIndex;if(s==0)return!1;let a=u.parent,o=a.child(s-1);if(o.type!=e)return!1;if(n){let l=o.lastChild&&o.lastChild.type==a.type,c=Q.from(l?e.create():null),d=new Z(Q.from(e.create(null,Q.from(a.type.create(null,c)))),l?3:1,0),f=u.start,h=u.end;n(t.tr.step(new nt(f-(l?3:1),h,f,h,d,1,!0)).scrollIntoView())}return!0}}function kk(e){const t=new Map;if(!e||!e.type)throw new Error("mdast-util-definitions expected node");return pi(e,"definition",function(r){const i=s0(r.identifier);i&&!t.get(i)&&t.set(i,r)}),n;function n(r){const i=s0(r);return t.get(i)}}function s0(e){return String(e||"").toUpperCase()}function Sk(){return function(e){const t=kk(e);pi(e,function(n,r,i){if(n.type==="definition"&&i!==void 0&&typeof r=="number")return i.children.splice(r,1),[Sl,r];if(n.type==="imageReference"||n.type==="linkReference"){const u=t(n.identifier);if(u&&i&&typeof r=="number")return i.children[r]=n.type==="imageReference"?{type:"image",url:u.url,title:u.title,alt:n.alt}:{type:"link",url:u.url,title:u.title,children:n.children},[Sl,r]}})}}function i1(e,t){if(!(t.childCount>=1&&t.lastChild?.type.name==="hardbreak")){e.next(t.content);return}const n=[];t.content.forEach((r,i,u)=>{u!==t.childCount-1&&n.push(r)}),e.next(Q.fromArray(n))}function H(e,t){return Object.assign(e,{meta:{package:"@milkdown/preset-commonmark",...t}}),e}var jc=Pu("emphasis");H(jc,{displayName:"Attr<emphasis>",group:"Emphasis"});var gi=Ai("emphasis",e=>({attrs:{marker:{default:e.get(Zi).emphasis||"*",validate:"string"}},parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style",getAttrs:t=>t==="italic"}],toDOM:t=>["em",e.get(jc.key)(t)],parseMarkdown:{match:t=>t.type==="emphasis",runner:(t,n,r)=>{t.openMark(r,{marker:n.marker}),t.next(n.children),t.closeMark(r)}},toMarkdown:{match:t=>t.type.name==="emphasis",runner:(t,n)=>{t.withMark(n,"emphasis",void 0,{marker:n.attrs.marker})}}}));H(gi.mark,{displayName:"MarkSchema<emphasis>",group:"Emphasis"});H(gi.ctx,{displayName:"MarkSchemaCtx<emphasis>",group:"Emphasis"});var Zc=le("ToggleEmphasis",e=>()=>Da(gi.type(e)));H(Zc,{displayName:"Command<toggleEmphasisCommand>",group:"Emphasis"});var u1=yt(e=>Bu(/(?:^|[^*])\*([^*]+)\*$/,gi.type(e),{getAttr:()=>({marker:"*"}),updateCaptured:({fullMatch:t,start:n})=>t.startsWith("*")?{}:{fullMatch:t.slice(1),start:n+1}}));H(u1,{displayName:"InputRule<emphasis>|Star",group:"Emphasis"});var s1=yt(e=>Bu(/\b_(?![_\s])(.*?[^_\s])_\b/,gi.type(e),{getAttr:()=>({marker:"_"}),updateCaptured:({fullMatch:t,start:n})=>t.startsWith("_")?{}:{fullMatch:t.slice(1),start:n+1}}));H(s1,{displayName:"InputRule<emphasis>|Underscore",group:"Emphasis"});var Xc=_t("emphasisKeymap",{ToggleEmphasis:{shortcuts:"Mod-i",command:e=>{const t=e.get(ke);return()=>t.call(Zc.key)}}});H(Xc.ctx,{displayName:"KeymapCtx<emphasis>",group:"Emphasis"});H(Xc.shortcuts,{displayName:"Keymap<emphasis>",group:"Emphasis"});var $c=Pu("strong");H($c,{displayName:"Attr<strong>",group:"Strong"});var Hu=Ai("strong",e=>({attrs:{marker:{default:e.get(Zi).strong||"*",validate:"string"}},parseDOM:[{tag:"b",getAttrs:t=>t.style.fontWeight!="normal"&&null},{tag:"strong"},{style:"font-style",getAttrs:t=>t==="bold"},{style:"font-weight=400",clearMark:t=>t.type.name=="strong"},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}],toDOM:t=>["strong",e.get($c.key)(t)],parseMarkdown:{match:t=>t.type==="strong",runner:(t,n,r)=>{t.openMark(r,{marker:n.marker}),t.next(n.children),t.closeMark(r)}},toMarkdown:{match:t=>t.type.name==="strong",runner:(t,n)=>{t.withMark(n,"strong",void 0,{marker:n.attrs.marker})}}}));H(Hu.mark,{displayName:"MarkSchema<strong>",group:"Strong"});H(Hu.ctx,{displayName:"MarkSchemaCtx<strong>",group:"Strong"});var ed=le("ToggleStrong",e=>()=>Da(Hu.type(e)));H(ed,{displayName:"Command<toggleStrongCommand>",group:"Strong"});var a1=yt(e=>Bu(new RegExp("(?<![\\w:/])(?:\\*\\*|__)([^*_]+?)(?:\\*\\*|__)(?![\\w/])$"),Hu.type(e),{getAttr:t=>({marker:t[0].startsWith("*")?"*":"_"})}));H(a1,{displayName:"InputRule<strong>",group:"Strong"});var td=_t("strongKeymap",{ToggleBold:{shortcuts:["Mod-b"],command:e=>{const t=e.get(ke);return()=>t.call(ed.key)}}});H(td.ctx,{displayName:"KeymapCtx<strong>",group:"Strong"});H(td.shortcuts,{displayName:"Keymap<strong>",group:"Strong"});var nd=Pu("inlineCode");H(nd,{displayName:"Attr<inlineCode>",group:"InlineCode"});var qn=Ai("inlineCode",e=>({priority:100,code:!0,parseDOM:[{tag:"code"}],toDOM:t=>["code",e.get(nd.key)(t)],parseMarkdown:{match:t=>t.type==="inlineCode",runner:(t,n,r)=>{t.openMark(r),t.addText(n.value),t.closeMark(r)}},toMarkdown:{match:t=>t.type.name==="inlineCode",runner:(t,n,r)=>(t.withMark(n,"inlineCode",r.text||""),!0)}}));H(qn.mark,{displayName:"MarkSchema<inlineCode>",group:"InlineCode"});H(qn.ctx,{displayName:"MarkSchemaCtx<inlineCode>",group:"InlineCode"});var rd=le("ToggleInlineCode",e=>()=>(t,n)=>{const{selection:r,tr:i}=t;if(r.empty)return!1;const{from:u,to:s}=r;return t.doc.rangeHasMark(u,s,qn.type(e))?(n?.(i.removeMark(u,s,qn.type(e))),!0):(Object.keys(t.schema.marks).filter(a=>a!==qn.type.name).map(a=>t.schema.marks[a]).forEach(a=>{i.removeMark(u,s,a)}),n?.(i.addMark(u,s,qn.type(e).create())),!0)});H(rd,{displayName:"Command<toggleInlineCodeCommand>",group:"InlineCode"});var o1=yt(e=>Bu(/(?:`)([^`]+)(?:`)$/,qn.type(e)));H(o1,{displayName:"InputRule<inlineCodeInputRule>",group:"InlineCode"});var id=_t("inlineCodeKeymap",{ToggleInlineCode:{shortcuts:"Mod-e",command:e=>{const t=e.get(ke);return()=>t.call(rd.key)}}});H(id.ctx,{displayName:"KeymapCtx<inlineCode>",group:"InlineCode"});H(id.shortcuts,{displayName:"Keymap<inlineCode>",group:"InlineCode"});var ud=Pu("link");H(ud,{displayName:"Attr<link>",group:"Link"});var ni=Ai("link",e=>({attrs:{href:{validate:"string"},title:{default:null,validate:"string|null"}},parseDOM:[{tag:"a[href]",getAttrs:t=>{if(!(t instanceof HTMLElement))throw sn(t);return{href:t.getAttribute("href"),title:t.getAttribute("title")}}}],toDOM:t=>["a",{...e.get(ud.key)(t),...t.attrs}],parseMarkdown:{match:t=>t.type==="link",runner:(t,n,r)=>{const i=n.url,u=n.title;t.openMark(r,{href:i,title:u}),t.next(n.children),t.closeMark(r)}},toMarkdown:{match:t=>t.type.name==="link",runner:(t,n)=>{t.withMark(n,"link",void 0,{title:n.attrs.title,url:n.attrs.href})}}}));H(ni.mark,{displayName:"MarkSchema<link>",group:"Link"});var l1=le("ToggleLink",e=>(t={})=>Da(ni.type(e),t));H(l1,{displayName:"Command<toggleLinkCommand>",group:"Link"});var c1=le("UpdateLink",e=>(t={})=>(n,r)=>{if(!r)return!1;let i,u=-1;const{selection:s}=n,{from:a,to:o}=s;if(n.doc.nodesBetween(a,a===o?o+1:o,(m,b)=>{if(ni.type(e).isInSet(m.marks))return i=m,u=b,!1}),!i)return!1;const l=i.marks.find(({type:m})=>m===ni.type(e));if(!l)return!1;const c=u,d=u+i.nodeSize,{tr:f}=n,h=ni.type(e).create({...l.attrs,...t});return h?(r(f.removeMark(c,d,l).addMark(c,d,h).setSelection(new de(f.selection.$anchor)).scrollIntoView()),!0):!1});H(c1,{displayName:"Command<updateLinkCommand>",group:"Link"});var d1=Jc("doc",()=>({content:"block+",parseMarkdown:{match:({type:e})=>e==="root",runner:(e,t,n)=>{e.injectRoot(t,n)}},toMarkdown:{match:e=>e.type.name==="doc",runner:(e,t)=>{e.openNode("root"),e.next(t.content)}}}));H(d1,{displayName:"NodeSchema<doc>",group:"Doc"});function Ik(e){return Sc(e,t=>t.type==="html"&&["<br />","<br>","<br >","<br/>"].includes(t.value?.trim()),(t,n)=>{if(!n.length)return;const r=n[n.length-1];if(!r)return;const i=r.children.indexOf(t);i!==-1&&r.children.splice(i,1)},!0)}var Ma=Pr("remark-preserve-empty-line",()=>()=>Ik);H(Ma.plugin,{displayName:"Remark<remarkPreserveEmptyLine>",group:"Remark"});H(Ma.options,{displayName:"RemarkConfig<remarkPreserveEmptyLine>",group:"Remark"});var sd=Yt("paragraph");H(sd,{displayName:"Attr<paragraph>",group:"Paragraph"});var un=Qe("paragraph",e=>({content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM:t=>["p",e.get(sd.key)(t),0],parseMarkdown:{match:t=>t.type==="paragraph",runner:(t,n,r)=>{t.openNode(r),n.children?t.next(n.children):t.addText(n.value||""),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="paragraph",runner:(t,n)=>{const r=e.get(In).state?.doc.lastChild;t.openNode("paragraph"),(!n.content||n.content.size===0)&&n!==r&&wk(e)?t.addNode("html",void 0,"<br />"):i1(t,n),t.closeNode()}}}));function wk(e){let t=!1;try{e.get(Ma.id),t=!0}catch{t=!1}return t}H(un.node,{displayName:"NodeSchema<paragraph>",group:"Paragraph"});H(un.ctx,{displayName:"NodeSchemaCtx<paragraph>",group:"Paragraph"});var ad=le("TurnIntoText",e=>()=>du(un.type(e)));H(ad,{displayName:"Command<turnIntoTextCommand>",group:"Paragraph"});var od=_t("paragraphKeymap",{TurnIntoText:{shortcuts:"Mod-Alt-0",command:e=>{const t=e.get(ke);return()=>t.call(ad.key)}}});H(od.ctx,{displayName:"KeymapCtx<paragraph>",group:"Paragraph"});H(od.shortcuts,{displayName:"Keymap<paragraph>",group:"Paragraph"});var Nk=Array(6).fill(0).map((e,t)=>t+1);function Dk(e){return e.textContent.toLowerCase().trim().replace(/\s+/g,"-")}var Ba=ir(Dk,"headingIdGenerator");H(Ba,{displayName:"Ctx<HeadingIdGenerator>",group:"Heading"});var ld=Yt("heading");H(ld,{displayName:"Attr<heading>",group:"Heading"});var Hr=Qe("heading",e=>{const t=e.get(Ba.key);return{content:"inline*",group:"block",defining:!0,attrs:{id:{default:"",validate:"string"},level:{default:1,validate:"number"}},parseDOM:Nk.map(n=>({tag:`h${n}`,getAttrs:r=>{if(!(r instanceof HTMLElement))throw sn(r);return{level:n,id:r.id}}})),toDOM:n=>[`h${n.attrs.level}`,{...e.get(ld.key)(n),id:n.attrs.id||t(n)},0],parseMarkdown:{match:({type:n})=>n==="heading",runner:(n,r,i)=>{const u=r.depth;n.openNode(i,{level:u}),n.next(r.children),n.closeNode()}},toMarkdown:{match:n=>n.type.name==="heading",runner:(n,r)=>{n.openNode("heading",void 0,{depth:r.attrs.level}),i1(n,r),n.closeNode()}}}});H(Hr.node,{displayName:"NodeSchema<heading>",group:"Heading"});H(Hr.ctx,{displayName:"NodeSchemaCtx<heading>",group:"Heading"});var f1=yt(e=>rA(/^(?<hashes>#+)\s$/,Hr.type(e),t=>{const n=t.groups?.hashes?.length||0,{$from:r}=e.get(In).state.selection,i=r.node();if(i.type.name==="heading"){let u=Number(i.attrs.level)+Number(n);return u>6&&(u=6),{level:u}}return{level:n}}));H(f1,{displayName:"InputRule<wrapInHeadingInputRule>",group:"Heading"});var Hn=le("WrapInHeading",e=>t=>(t??=1,t<1?du(un.type(e)):du(Hr.type(e),{level:t})));H(Hn,{displayName:"Command<wrapInHeadingCommand>",group:"Heading"});var cd=le("DowngradeHeading",e=>()=>(t,n,r)=>{const{$from:i}=t.selection,u=i.node();if(u.type!==Hr.type(e)||!t.selection.empty||i.parentOffset!==0)return!1;const s=u.attrs.level-1;return s?(n?.(t.tr.setNodeMarkup(t.selection.$from.before(),void 0,{...u.attrs,level:s})),!0):du(un.type(e))(t,n,r)});H(cd,{displayName:"Command<downgradeHeadingCommand>",group:"Heading"});var dd=_t("headingKeymap",{TurnIntoH1:{shortcuts:"Mod-Alt-1",command:e=>{const t=e.get(ke);return()=>t.call(Hn.key,1)}},TurnIntoH2:{shortcuts:"Mod-Alt-2",command:e=>{const t=e.get(ke);return()=>t.call(Hn.key,2)}},TurnIntoH3:{shortcuts:"Mod-Alt-3",command:e=>{const t=e.get(ke);return()=>t.call(Hn.key,3)}},TurnIntoH4:{shortcuts:"Mod-Alt-4",command:e=>{const t=e.get(ke);return()=>t.call(Hn.key,4)}},TurnIntoH5:{shortcuts:"Mod-Alt-5",command:e=>{const t=e.get(ke);return()=>t.call(Hn.key,5)}},TurnIntoH6:{shortcuts:"Mod-Alt-6",command:e=>{const t=e.get(ke);return()=>t.call(Hn.key,6)}},DowngradeHeading:{shortcuts:["Delete","Backspace"],command:e=>{const t=e.get(ke);return()=>t.call(cd.key)}}});H(dd.ctx,{displayName:"KeymapCtx<heading>",group:"Heading"});H(dd.shortcuts,{displayName:"Keymap<heading>",group:"Heading"});var fd=Yt("blockquote");H(fd,{displayName:"Attr<blockquote>",group:"Blockquote"});var Uu=Qe("blockquote",e=>({content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:t=>["blockquote",e.get(fd.key)(t),0],parseMarkdown:{match:({type:t})=>t==="blockquote",runner:(t,n,r)=>{t.openNode(r).next(n.children).closeNode()}},toMarkdown:{match:t=>t.type.name==="blockquote",runner:(t,n)=>{t.openNode("blockquote").next(n.content).closeNode()}}}));H(Uu.node,{displayName:"NodeSchema<blockquote>",group:"Blockquote"});H(Uu.ctx,{displayName:"NodeSchemaCtx<blockquote>",group:"Blockquote"});var h1=yt(e=>Pc(/^\s*>\s$/,Uu.type(e)));H(h1,{displayName:"InputRule<wrapInBlockquoteInputRule>",group:"Blockquote"});var hd=le("WrapInBlockquote",e=>()=>Fc(Uu.type(e)));H(hd,{displayName:"Command<wrapInBlockquoteCommand>",group:"Blockquote"});var pd=_t("blockquoteKeymap",{WrapInBlockquote:{shortcuts:"Mod-Shift-b",command:e=>{const t=e.get(ke);return()=>t.call(hd.key)}}});H(pd.ctx,{displayName:"KeymapCtx<blockquote>",group:"Blockquote"});H(pd.shortcuts,{displayName:"Keymap<blockquote>",group:"Blockquote"});var md=Yt("codeBlock",()=>({pre:{},code:{}}));H(md,{displayName:"Attr<codeBlock>",group:"CodeBlock"});var Wu=Qe("code_block",e=>({content:"text*",group:"block",marks:"",defining:!0,code:!0,attrs:{language:{default:"",validate:"string"}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:t=>{if(!(t instanceof HTMLElement))throw sn(t);return{language:t.dataset.language}}}],toDOM:t=>{const n=e.get(md.key)(t),r=t.attrs.language,i=r&&r.length>0?{"data-language":r}:void 0;return["pre",{...n.pre,...i},["code",n.code,0]]},parseMarkdown:{match:({type:t})=>t==="code",runner:(t,n,r)=>{const i=n.lang??"",u=n.value;t.openNode(r,{language:i}),u&&t.addText(u),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="code_block",runner:(t,n)=>{t.addNode("code",void 0,n.content.firstChild?.text||"",{lang:n.attrs.language})}}}));H(Wu.node,{displayName:"NodeSchema<codeBlock>",group:"CodeBlock"});H(Wu.ctx,{displayName:"NodeSchemaCtx<codeBlock>",group:"CodeBlock"});var p1=yt(e=>rA(/^```(?<language>[a-z]*)?[\s\n]$/,Wu.type(e),t=>({language:t.groups?.language??""})));H(p1,{displayName:"InputRule<createCodeBlockInputRule>",group:"CodeBlock"});var Ad=le("CreateCodeBlock",e=>(t="")=>du(Wu.type(e),{language:t}));H(Ad,{displayName:"Command<createCodeBlockCommand>",group:"CodeBlock"});var _k=le("UpdateCodeBlockLanguage",()=>({pos:e,language:t}={pos:-1,language:""})=>(n,r)=>e>=0?(r?.(n.tr.setNodeAttribute(e,"language",t)),!0):!1);H(_k,{displayName:"Command<updateCodeBlockLanguageCommand>",group:"CodeBlock"});var gd=_t("codeBlockKeymap",{CreateCodeBlock:{shortcuts:"Mod-Alt-c",command:e=>{const t=e.get(ke);return()=>t.call(Ad.key)}}});H(gd.ctx,{displayName:"KeymapCtx<codeBlock>",group:"CodeBlock"});H(gd.shortcuts,{displayName:"Keymap<codeBlock>",group:"CodeBlock"});var bd=Yt("image");H(bd,{displayName:"Attr<image>",group:"Image"});var bi=Qe("image",e=>({inline:!0,group:"inline",selectable:!0,draggable:!0,marks:"",atom:!0,defining:!0,isolating:!0,attrs:{src:{default:"",validate:"string"},alt:{default:"",validate:"string"},title:{default:"",validate:"string"}},parseDOM:[{tag:"img[src]",getAttrs:t=>{if(!(t instanceof HTMLElement))throw sn(t);return{src:t.getAttribute("src")||"",alt:t.getAttribute("alt")||"",title:t.getAttribute("title")||t.getAttribute("alt")||""}}}],toDOM:t=>["img",{...e.get(bd.key)(t),...t.attrs}],parseMarkdown:{match:({type:t})=>t==="image",runner:(t,n,r)=>{const i=n.url,u=n.alt,s=n.title;t.addNode(r,{src:i,alt:u,title:s})}},toMarkdown:{match:t=>t.type.name==="image",runner:(t,n)=>{t.addNode("image",void 0,void 0,{title:n.attrs.title,url:n.attrs.src,alt:n.attrs.alt})}}}));H(bi.node,{displayName:"NodeSchema<image>",group:"Image"});H(bi.ctx,{displayName:"NodeSchemaCtx<image>",group:"Image"});var m1=le("InsertImage",e=>(t={})=>(n,r)=>{if(!r)return!0;const{src:i="",alt:u="",title:s=""}=t,a=bi.type(e).create({src:i,alt:u,title:s});return a&&r(n.tr.replaceSelectionWith(a).scrollIntoView()),!0});H(m1,{displayName:"Command<insertImageCommand>",group:"Image"});var A1=le("UpdateImage",e=>(t={})=>(n,r)=>{const i=oC(n.selection,bi.type(e));if(!i)return!1;const{node:u,pos:s}=i,a={...u.attrs},{src:o,alt:l,title:c}=t;return o!==void 0&&(a.src=o),l!==void 0&&(a.alt=l),c!==void 0&&(a.title=c),r?.(n.tr.setNodeMarkup(s,void 0,a).scrollIntoView()),!0});H(A1,{displayName:"Command<updateImageCommand>",group:"Image"});var Ok=yt(e=>new Dt(/!\[(?<alt>.*?)]\((?<filename>.*?)\s*(?="|\))"?(?<title>[^"]+)?"?\)/,(t,n,r,i)=>{const[u,s,a="",o]=n;return u?t.tr.replaceWith(r,i,bi.type(e).create({src:a,alt:s,title:o})):null}));H(Ok,{displayName:"InputRule<insertImageInputRule>",group:"Image"});var Js=Yt("hardbreak",e=>({"data-type":"hardbreak","data-is-inline":e.attrs.isInline}));H(Js,{displayName:"Attr<hardbreak>",group:"Hardbreak"});var xr=Qe("hardbreak",e=>({inline:!0,group:"inline",attrs:{isInline:{default:!1,validate:"boolean"}},selectable:!1,parseDOM:[{tag:"br"},{tag:'span[data-type="hardbreak"]',getAttrs:()=>({isInline:!0})}],toDOM:t=>t.attrs.isInline?["span",e.get(Js.key)(t)," "]:["br",e.get(Js.key)(t)],parseMarkdown:{match:({type:t})=>t==="break",runner:(t,n,r)=>{t.addNode(r,{isInline:!!n.data?.isInline})}},leafText:()=>`
|
|
34
|
+
`),i;function u(s){return r.stack.push(s),a;function a(){r.stack.pop()}}}function Hy(e){throw new Error("Cannot handle value `"+e+"`, expected node")}function Uy(e){const t=e;throw new Error("Cannot handle unknown node `"+t.type+"`")}function Wy(e,t){if(e.type==="definition"&&e.type===t.type)return 0}function Ky(e,t){return _y(e,this,t)}function Qy(e,t){return Oy(e,this,t)}function Yy(e,t){return Ly(this,e,t)}function Al(e){const t=this;t.compiler=n;function n(r){return Fy(r,{...t.data("settings"),...e,extensions:t.data("toMarkdownExtensions")||[]})}}function Uf(e){if(e)throw e}function bc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function zy(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){var i=!1;try{i=this instanceof r}catch{}return i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Qa,Wf;function Gy(){if(Wf)return Qa;Wf=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(l){return typeof Array.isArray=="function"?Array.isArray(l):t.call(l)==="[object Array]"},u=function(l){if(!l||t.call(l)!=="[object Object]")return!1;var c=e.call(l,"constructor"),d=l.constructor&&l.constructor.prototype&&e.call(l.constructor.prototype,"isPrototypeOf");if(l.constructor&&!c&&!d)return!1;var f;for(f in l);return typeof f>"u"||e.call(l,f)},s=function(l,c){n&&c.name==="__proto__"?n(l,c.name,{enumerable:!0,configurable:!0,value:c.newValue,writable:!0}):l[c.name]=c.newValue},a=function(l,c){if(c==="__proto__")if(e.call(l,c)){if(r)return r(l,c).value}else return;return l[c]};return Qa=function o(){var l,c,d,f,p,m,A=arguments[0],E=1,g=arguments.length,N=!1;for(typeof A=="boolean"&&(N=A,A=arguments[1]||{},E=2),(A==null||typeof A!="object"&&typeof A!="function")&&(A={});E<g;++E)if(l=arguments[E],l!=null)for(c in l)d=a(A,c),f=a(l,c),A!==f&&(N&&f&&(u(f)||(p=i(f)))?(p?(p=!1,m=d&&i(d)?d:[]):m=d&&u(d)?d:{},s(A,{name:c,newValue:o(N,m,f)})):typeof f<"u"&&s(A,{name:c,newValue:f}));return A},Qa}var Vy=Gy();const Ya=bc(Vy);function gl(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function qy(){const e=[],t={run:n,use:r};return t;function n(...i){let u=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);a(null,...i);function a(o,...l){const c=e[++u];let d=-1;if(o){s(o);return}for(;++d<i.length;)(l[d]===null||l[d]===void 0)&&(l[d]=i[d]);i=l,c?Jy(c,a)(...l):s(null,...l)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Jy(e,t){let n;return r;function r(...s){const a=e.length>s.length;let o;a&&s.push(i);try{o=e.apply(this,s)}catch(l){const c=l;if(a&&n)throw c;return i(c)}a||(o&&o.then&&typeof o.then=="function"?o.then(u,i):o instanceof Error?i(o):u(o))}function i(s,...a){n||(n=!0,t(s,...a))}function u(s){i(null,s)}}class pt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",u={},s=!1;if(n&&("line"in n&&"column"in n?u={place:n}:"start"in n&&"end"in n?u={place:n}:"type"in n?u={ancestors:[n],place:n.position}:u={...n}),typeof t=="string"?i=t:!u.cause&&t&&(s=!0,i=t.message,u.cause=t),!u.ruleId&&!u.source&&typeof r=="string"){const o=r.indexOf(":");o===-1?u.ruleId=r:(u.source=r.slice(0,o),u.ruleId=r.slice(o+1))}if(!u.place&&u.ancestors&&u.ancestors){const o=u.ancestors[u.ancestors.length-1];o&&(u.place=o.position)}const a=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=Hi(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=s&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}pt.prototype.file="";pt.prototype.name="";pt.prototype.reason="";pt.prototype.message="";pt.prototype.stack="";pt.prototype.column=void 0;pt.prototype.line=void 0;pt.prototype.ancestors=void 0;pt.prototype.cause=void 0;pt.prototype.fatal=void 0;pt.prototype.place=void 0;pt.prototype.ruleId=void 0;pt.prototype.source=void 0;const Yt={basename:jy,dirname:Zy,extname:Xy,join:$y,sep:"/"};function jy(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');wu(e);let n=0,r=-1,i=e.length,u;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(u){n=i+1;break}}else r<0&&(u=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(u){n=i+1;break}}else s<0&&(u=!0,s=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function Zy(e){if(wu(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Xy(e){wu(e);let t=e.length,n=-1,r=0,i=-1,u=0,s;for(;t--;){const a=e.codePointAt(t);if(a===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),a===46?i<0?i=t:u!==1&&(u=1):i>-1&&(u=-1)}return i<0||n<0||u===0||u===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function $y(...e){let t=-1,n;for(;++t<e.length;)wu(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":e3(n)}function e3(e){wu(e);const t=e.codePointAt(0)===47;let n=t3(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function t3(e,t){let n="",r=0,i=-1,u=0,s=-1,a,o;for(;++s<=e.length;){if(s<e.length)a=e.codePointAt(s);else{if(a===47)break;a=47}if(a===47){if(!(i===s-1||u===1))if(i!==s-1&&u===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(o=n.lastIndexOf("/"),o!==n.length-1){o<0?(n="",r=0):(n=n.slice(0,o),r=n.length-1-n.lastIndexOf("/")),i=s,u=0;continue}}else if(n.length>0){n="",r=0,i=s,u=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,u=0}else a===46&&u>-1?u++:u=-1}return n}function wu(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const n3={cwd:r3};function r3(){return"/"}function bl(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function i3(e){if(typeof e=="string")e=new URL(e);else if(!bl(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return u3(e)}function u3(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const za=["history","path","basename","stem","extname","dirname"];class s3{constructor(t){let n;t?bl(t)?n={path:t}:typeof t=="string"||a3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":n3.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<za.length;){const u=za[r];u in n&&n[u]!==void 0&&n[u]!==null&&(this[u]=u==="history"?[...n[u]]:n[u])}let i;for(i in n)za.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Yt.basename(this.path):void 0}set basename(t){Va(t,"basename"),Ga(t,"basename"),this.path=Yt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Yt.dirname(this.path):void 0}set dirname(t){Kf(this.basename,"dirname"),this.path=Yt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Yt.extname(this.path):void 0}set extname(t){if(Ga(t,"extname"),Kf(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Yt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){bl(t)&&(t=i3(t)),Va(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Yt.basename(this.path,this.extname):void 0}set stem(t){Va(t,"stem"),Ga(t,"stem"),this.path=Yt.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new pt(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Ga(e,t){if(e&&e.includes(Yt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Yt.sep+"`")}function Va(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Kf(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function a3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const o3=(function(e){const r=this.constructor.prototype,i=r[e],u=function(){return i.apply(u,arguments)};return Object.setPrototypeOf(u,r),u}),l3={}.hasOwnProperty;class Ec extends o3{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=qy()}copy(){const t=new Ec;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Ya(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ja("data",this.frozen),this.namespace[t]=n,this):l3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ja("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Zu(t),r=this.parser||this.Parser;return qa("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),qa("process",this.parser||this.Parser),Ja("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(u,s){const a=Zu(t),o=r.parse(a);r.run(o,a,function(c,d,f){if(c||!d||!f)return l(c);const p=d,m=r.stringify(p,f);d3(m)?f.value=m:f.result=m,l(c,f)});function l(c,d){c||!d?s(c):u?u(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),qa("processSync",this.parser||this.Parser),Ja("processSync",this.compiler||this.Compiler),this.process(t,i),Yf("processSync","process",n),r;function i(u,s){n=!0,Uf(u),r=s}}run(t,n,r){Qf(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?u(void 0,r):new Promise(u);function u(s,a){const o=Zu(n);i.run(t,o,l);function l(c,d,f){const p=d||t;c?a(c):s?s(p):r(void 0,p,f)}}}runSync(t,n){let r=!1,i;return this.run(t,n,u),Yf("runSync","run",r),i;function u(s,a){Uf(s),i=a,r=!0}}stringify(t,n){this.freeze();const r=Zu(n),i=this.compiler||this.Compiler;return Ja("stringify",i),Qf(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(ja("use",this.frozen),t!=null)if(typeof t=="function")o(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function u(l){if(typeof l=="function")o(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[c,...d]=l;o(c,d)}else s(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function s(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(l.plugins),l.settings&&(i.settings=Ya(!0,i.settings,l.settings))}function a(l){let c=-1;if(l!=null)if(Array.isArray(l))for(;++c<l.length;){const d=l[c];u(d)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function o(l,c){let d=-1,f=-1;for(;++d<r.length;)if(r[d][0]===l){f=d;break}if(f===-1)r.push([l,...c]);else if(c.length>0){let[p,...m]=c;const A=r[f][1];gl(A)&&gl(p)&&(p=Ya(!0,A,p)),r[f]=[l,p,...m]}}}}const El=new Ec().freeze();function qa(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ja(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ja(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Qf(e){if(!gl(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Yf(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Zu(e){return c3(e)?e:new s3(e)}function c3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function d3(e){return typeof e=="string"||f3(e)}function f3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function Ye(e){this.content=e}Ye.prototype={constructor:Ye,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 r=n&&n!=e?this.remove(n):this,i=r.find(e),u=r.content.slice();return i==-1?u.push(n||e,t):(u[i+1]=t,n&&(u[i]=n)),new Ye(u)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new Ye(n)},addToStart:function(e,t){return new Ye([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new Ye(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),u=r.find(e);return i.splice(u==-1?i.length:u,0,t,n),new Ye(i)},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=Ye.from(e),e.size?new Ye(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=Ye.from(e),e.size?new Ye(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=Ye.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}};Ye.from=function(e){if(e instanceof Ye)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Ye(t)};function im(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),u=t.child(r);if(i==u){n+=i.nodeSize;continue}if(!i.sameMarkup(u))return n;if(i.isText&&i.text!=u.text){for(let s=0;i.text[s]==u.text[s];s++)n++;return n}if(i.content.size||u.content.size){let s=im(i.content,u.content,n+1);if(s!=null)return s}n+=i.nodeSize}}function um(e,t,n,r){for(let i=e.childCount,u=t.childCount;;){if(i==0||u==0)return i==u?null:{a:n,b:r};let s=e.child(--i),a=t.child(--u),o=s.nodeSize;if(s==a){n-=o,r-=o;continue}if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let l=0,c=Math.min(s.text.length,a.text.length);for(;l<c&&s.text[s.text.length-l-1]==a.text[a.text.length-l-1];)l++,n--,r--;return{a:n,b:r}}if(s.content.size||a.content.size){let l=um(s.content,a.content,n-1,r-1);if(l)return l}n-=o,r-=o}}class H{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let r=0;r<t.length;r++)this.size+=t[r].nodeSize}nodesBetween(t,n,r,i=0,u){for(let s=0,a=0;a<n;s++){let o=this.content[s],l=a+o.nodeSize;if(l>t&&r(o,i+a,u||null,s)!==!1&&o.content.size){let c=a+1;o.nodesBetween(Math.max(0,t-c),Math.min(o.content.size,n-c),r,i+c)}a=l}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,i){let u="",s=!0;return this.nodesBetween(t,n,(a,o)=>{let l=a.isText?a.text.slice(Math.max(t,o)-o,n-o):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&l||a.isTextblock)&&r&&(s?s=!1:u+=r),u+=l},0),u}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),u=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),u=1);u<t.content.length;u++)i.push(t.content[u]);return new H(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let u=0,s=0;s<n;u++){let a=this.content[u],o=s+a.nodeSize;o>t&&((s<t||o>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))),r.push(a),i+=a.nodeSize),s=o}return new H(r,i)}cutByIndex(t,n){return t==n?H.empty:t==0&&n==this.content.length?this:new H(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),u=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new H(i,u)}addToStart(t){return new H([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new H(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,r=0;n<this.content.length;n++){let i=this.content[n];t(i,r,n),r+=i.nodeSize}}findDiffStart(t,n=0){return im(this,t,n)}findDiffEnd(t,n=this.size,r=t.size){return um(this,t,n,r)}findIndex(t){if(t==0)return Xu(0,t);if(t==this.size)return Xu(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=this.child(n),u=r+i.nodeSize;if(u>=t)return u==t?Xu(n+1,u):Xu(n,r);r=u}}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 H.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new H(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return H.empty;let n,r=0;for(let i=0;i<t.length;i++){let u=t[i];r+=u.nodeSize,i&&u.isText&&t[i-1].sameMarkup(u)?(n||(n=t.slice(0,i)),n[n.length-1]=u.withText(n[n.length-1].text+u.text)):n&&n.push(u)}return new H(n||t,r)}static from(t){if(!t)return H.empty;if(t instanceof H)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new H([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}H.empty=new H([],0);const Za={index:0,offset:0};function Xu(e,t){return Za.index=e,Za.offset=t,Za}function _s(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 r=0;r<e.length;r++)if(!_s(e[r],t[r]))return!1}else{for(let r in e)if(!(r in t)||!_s(e[r],t[r]))return!1;for(let r in t)if(!(r in e))return!1}return!0}class pe{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,r=!1;for(let i=0;i<t.length;i++){let u=t[i];if(this.eq(u))return t;if(this.type.excludes(u.type))n||(n=t.slice(0,i));else{if(u.type.excludes(this.type))return t;!r&&u.type.rank>this.type.rank&&(n||(n=t.slice(0,i)),n.push(this),r=!0),n&&n.push(u)}}return n||(n=t.slice()),r||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&&_s(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 r=t.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].eq(n[r]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return pe.none;if(t instanceof pe)return[t];let n=t.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}}pe.none=[];class Os extends Error{}class z{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=am(this.content,t+this.openStart,n);return r&&new z(r,this.openStart,this.openEnd)}removeBetween(t,n){return new z(sm(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 z.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new z(H.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let u=t.firstChild;u&&!u.isLeaf&&(n||!u.type.spec.isolating);u=u.firstChild)r++;for(let u=t.lastChild;u&&!u.isLeaf&&(n||!u.type.spec.isolating);u=u.lastChild)i++;return new z(t,r,i)}}z.empty=new z(H.empty,0,0);function sm(e,t,n){let{index:r,offset:i}=e.findIndex(t),u=e.maybeChild(r),{index:s,offset:a}=e.findIndex(n);if(i==t||u.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(r!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(r,u.copy(sm(u.content,t-i-1,n-i-1)))}function am(e,t,n,r){let{index:i,offset:u}=e.findIndex(t),s=e.maybeChild(i);if(u==t||s.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));let a=am(s.content,t-u-1,n,s);return a&&e.replaceChild(i,s.copy(a))}function h3(e,t,n){if(n.openStart>e.depth)throw new Os("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Os("Inconsistent open depths");return om(e,t,n,0)}function om(e,t,n,r){let i=e.index(r),u=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let s=om(e,t,n,r+1);return u.copy(u.content.replaceChild(i,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let s=e.parent,a=s.content;return hr(s,a.cut(0,e.parentOffset).append(n.content).append(a.cut(t.parentOffset)))}else{let{start:s,end:a}=p3(n,e);return hr(u,cm(e,s,a,t,r))}else return hr(u,Rs(e,t,r))}function lm(e,t){if(!t.type.compatibleContent(e.type))throw new Os("Cannot join "+t.type.name+" onto "+e.type.name)}function yl(e,t,n){let r=e.node(n);return lm(r,t.node(n)),r}function fr(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 Ui(e,t,n,r){let i=(t||e).node(n),u=0,s=t?t.index(n):i.childCount;e&&(u=e.index(n),e.depth>n?u++:e.textOffset&&(fr(e.nodeAfter,r),u++));for(let a=u;a<s;a++)fr(i.child(a),r);t&&t.depth==n&&t.textOffset&&fr(t.nodeBefore,r)}function hr(e,t){return e.type.checkContent(t),e.copy(t)}function cm(e,t,n,r,i){let u=e.depth>i&&yl(e,t,i+1),s=r.depth>i&&yl(n,r,i+1),a=[];return Ui(null,e,i,a),u&&s&&t.index(i)==n.index(i)?(lm(u,s),fr(hr(u,cm(e,t,n,r,i+1)),a)):(u&&fr(hr(u,Rs(e,t,i+1)),a),Ui(t,n,i,a),s&&fr(hr(s,Rs(n,r,i+1)),a)),Ui(r,null,i,a),new H(a)}function Rs(e,t,n){let r=[];if(Ui(null,e,n,r),e.depth>n){let i=yl(e,t,n+1);fr(hr(i,Rs(e,t,n+1)),r)}return Ui(t,null,n,r),new H(r)}function p3(e,t){let n=t.depth-e.openStart,i=t.node(n).copy(e.content);for(let u=n-1;u>=0;u--)i=t.node(u).copy(H.from(i));return{start:i.resolveNoCache(e.openStart+n),end:i.resolveNoCache(i.content.size-e.openEnd-n)}}class nu{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,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 r=this.pos-this.path[this.path.length-1],i=t.child(n);return r?t.child(n).cut(r):i}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 r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let u=0;u<t;u++)i+=r.child(u).nodeSize;return i}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return pe.none;if(this.textOffset)return t.child(n).marks;let r=t.maybeChild(n-1),i=t.maybeChild(n);if(!r){let a=r;r=i,i=a}let u=r.marks;for(var s=0;s<u.length;s++)u[s].type.spec.inclusive===!1&&(!i||!u[s].isInSet(i.marks))&&(u=u[s--].removeFromSet(u));return u}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=t.parent.maybeChild(t.index());for(var u=0;u<r.length;u++)r[u].type.spec.inclusive===!1&&(!i||!r[u].isInSet(i.marks))&&(r=r[u--].removeFromSet(r));return r}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 r=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);r>=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new dm(this,t,r);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 r=[],i=0,u=n;for(let s=t;;){let{index:a,offset:o}=s.content.findIndex(u),l=u-o;if(r.push(s,a,i+o),!l||(s=s.child(a),s.isText))break;u=l-1,i+=o+1}return new nu(n,r,u)}static resolveCached(t,n){let r=zf.get(t);if(r)for(let u=0;u<r.elts.length;u++){let s=r.elts[u];if(s.pos==n)return s}else zf.set(t,r=new m3);let i=r.elts[r.i]=nu.resolve(t,n);return r.i=(r.i+1)%A3,i}}class m3{constructor(){this.elts=[],this.i=0}}const A3=12,zf=new WeakMap;class dm{constructor(t,n,r){this.$from=t,this.$to=n,this.depth=r}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)}}const g3=Object.create(null);let yn=class Tl{constructor(t,n,r,i=pe.none){this.type=t,this.attrs=n,this.marks=i,this.content=r||H.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,r,i=0){this.content.nodesBetween(t,n,r,i,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,r,i){return this.content.textBetween(t,n,r,i)}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,r){return this.type==t&&_s(this.attrs,n||t.defaultAttrs||g3)&&pe.sameSet(this.marks,r||pe.none)}copy(t=null){return t==this.content?this:new Tl(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new Tl(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,r=!1){if(t==n)return z.empty;let i=this.resolve(t),u=this.resolve(n),s=r?0:i.sharedDepth(n),a=i.start(s),l=i.node(s).content.cut(i.pos-a,u.pos-a);return new z(l,i.depth-s,u.depth-s)}replace(t,n,r){return h3(this.resolve(t),this.resolve(n),r)}nodeAt(t){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(t);if(n=n.maybeChild(r),!n)return null;if(i==t||n.isText)return n;t-=i+1}}childAfter(t){let{index:n,offset:r}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(t);if(r<t)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(t){return nu.resolveCached(this,t)}resolveNoCache(t){return nu.resolve(this,t)}rangeHasMark(t,n,r){let i=!1;return n>t&&this.nodesBetween(t,n,u=>(r.isInSet(u.marks)&&(i=!0),!i)),i}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()+")"),fm(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,r=H.empty,i=0,u=r.childCount){let s=this.contentMatchAt(t).matchFragment(r,i,u),a=s&&s.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let o=i;o<u;o++)if(!this.type.allowsMarks(r.child(o).marks))return!1;return!0}canReplaceWith(t,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let u=this.contentMatchAt(t).matchType(r),s=u&&u.matchFragment(this.content,n);return s?s.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let t=pe.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),t=r.addToSet(t)}if(!pe.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 r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=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,r)}let i=H.fromJSON(t,n.content),u=t.nodeType(n.type).create(n.attrs,i,r);return u.type.checkAttrs(u.attrs),u}};yn.prototype.text=void 0;class Ms extends yn{constructor(t,n,r,i){if(super(t,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):fm(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 Ms(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new Ms(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 fm(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class xr{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new b3(t,n);if(r.next==null)return xr.empty;let i=hm(r);r.next&&r.err("Unexpected trailing text");let u=I3(k3(i));return S3(u,r),u}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,r=t.childCount){let i=this;for(let u=n;i&&u<r;u++)i=i.matchType(t.child(u).type);return i}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 r=0;r<t.next.length;r++)if(this.next[n].type==t.next[r].type)return!0;return!1}fillBefore(t,n=!1,r=0){let i=[this];function u(s,a){let o=s.matchFragment(t,r);if(o&&(!n||o.validEnd))return H.from(a.map(l=>l.createAndFill()));for(let l=0;l<s.next.length;l++){let{type:c,next:d}=s.next[l];if(!(c.isText||c.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let f=u(d,a.concat(c));if(f)return f}}return null}return u(this,[])}findWrapping(t){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==t)return this.wrapCache[r+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),u=i.match;if(u.matchType(t)){let s=[];for(let a=i;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<u.next.length;s++){let{type:a,next:o}=u.next[s];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!i.type||o.validEnd)&&(r.push({match:a.contentMatch,type:a,via:i}),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(r){t.push(r);for(let i=0;i<r.next.length;i++)t.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),t.map((r,i)=>{let u=i+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)u+=(s?", ":"")+r.next[s].type.name+"->"+t.indexOf(r.next[s].next);return u}).join(`
|
|
35
|
+
`)}}xr.empty=new xr(!0);class b3{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 hm(e){let t=[];do t.push(E3(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function E3(e){let t=[];do t.push(y3(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function y3(e){let t=x3(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=T3(e,t);else break;return t}function Gf(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function T3(e,t){let n=Gf(e),r=n;return e.eat(",")&&(e.next!="}"?r=Gf(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function C3(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let u in n){let s=n[u];s.isInGroup(t)&&i.push(s)}return i.length==0&&e.err("No node type or group '"+t+"' found"),i}function x3(e){if(e.eat("(")){let t=hm(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=C3(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 k3(e){let t=[[]];return i(u(e,0),n()),t;function n(){return t.push([])-1}function r(s,a,o){let l={term:o,to:a};return t[s].push(l),l}function i(s,a){s.forEach(o=>o.to=a)}function u(s,a){if(s.type=="choice")return s.exprs.reduce((o,l)=>o.concat(u(l,a)),[]);if(s.type=="seq")for(let o=0;;o++){let l=u(s.exprs[o],a);if(o==s.exprs.length-1)return l;i(l,a=n())}else if(s.type=="star"){let o=n();return r(a,o),i(u(s.expr,o),o),[r(o)]}else if(s.type=="plus"){let o=n();return i(u(s.expr,a),o),i(u(s.expr,o),o),[r(o)]}else{if(s.type=="opt")return[r(a)].concat(u(s.expr,a));if(s.type=="range"){let o=a;for(let l=0;l<s.min;l++){let c=n();i(u(s.expr,o),c),o=c}if(s.max==-1)i(u(s.expr,o),o);else for(let l=s.min;l<s.max;l++){let c=n();r(o,c),i(u(s.expr,o),c),o=c}return[r(o)]}else{if(s.type=="name")return[r(a,void 0,s.value)];throw new Error("Unknown expr type")}}}}function pm(e,t){return t-e}function Vf(e,t){let n=[];return r(t),n.sort(pm);function r(i){let u=e[i];if(u.length==1&&!u[0].term)return r(u[0].to);n.push(i);for(let s=0;s<u.length;s++){let{term:a,to:o}=u[s];!a&&n.indexOf(o)==-1&&r(o)}}}function I3(e){let t=Object.create(null);return n(Vf(e,0));function n(r){let i=[];r.forEach(s=>{e[s].forEach(({term:a,to:o})=>{if(!a)return;let l;for(let c=0;c<i.length;c++)i[c][0]==a&&(l=i[c][1]);Vf(e,o).forEach(c=>{l||i.push([a,l=[]]),l.indexOf(c)==-1&&l.push(c)})})});let u=t[r.join(",")]=new xr(r.indexOf(e.length-1)>-1);for(let s=0;s<i.length;s++){let a=i[s][1].sort(pm);u.next.push({type:i[s][0],next:t[a.join(",")]||n(a)})}return u}}function S3(e,t){for(let n=0,r=[e];n<r.length;n++){let i=r[n],u=!i.validEnd,s=[];for(let a=0;a<i.next.length;a++){let{type:o,next:l}=i.next[a];s.push(o.name),u&&!(o.isText||o.hasRequiredAttrs())&&(u=!1),r.indexOf(l)==-1&&r.push(l)}u&&t.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function mm(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function Am(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(i===void 0){let u=e[r];if(u.hasDefault)i=u.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function gm(e,t,n,r){for(let i in t)if(!(i in e))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);for(let i in e){let u=e[i];u.validate&&u.validate(t[i])}}function bm(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new N3(e,r,t[r]);return n}let qf=class Em{constructor(t,n,r){this.name=t,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=bm(t,r.attrs),this.defaultAttrs=mm(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||t=="text"),this.isText=t=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==xr.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:Am(this.attrs,t)}create(t=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new yn(this,this.computeAttrs(t),H.from(n),pe.setFrom(r))}createChecked(t=null,n,r){return n=H.from(n),this.checkContent(n),new yn(this,this.computeAttrs(t),n,pe.setFrom(r))}createAndFill(t=null,n,r){if(t=this.computeAttrs(t),n=H.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let i=this.contentMatch.matchFragment(n),u=i&&i.fillBefore(H.empty,!0);return u?new yn(this,t,n.append(u),pe.setFrom(r)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let r=0;r<t.childCount;r++)if(!this.allowsMarks(t.child(r).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){gm(this.attrs,t,"node",this.name)}allowsMarkType(t){return this.markSet==null||this.markSet.indexOf(t)>-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;n<t.length;n++)if(!this.allowsMarkType(t[n].type))return!1;return!0}allowedMarks(t){if(this.markSet==null)return t;let n;for(let r=0;r<t.length;r++)this.allowsMarkType(t[r].type)?n&&n.push(t[r]):n||(n=t.slice(0,r));return n?n.length?n:pe.none:t}static compile(t,n){let r=Object.create(null);t.forEach((u,s)=>r[u]=new Em(u,n,s));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let u in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function w3(e,t,n){let r=n.split("|");return i=>{let u=i===null?"null":typeof i;if(r.indexOf(u)<0)throw new RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${u}`)}}class N3{constructor(t,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?w3(t,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Aa{constructor(t,n,r,i){this.name=t,this.rank=n,this.schema=r,this.spec=i,this.attrs=bm(t,i.attrs),this.excluded=null;let u=mm(this.attrs);this.instance=u?new pe(this,u):null}create(t=null){return!t&&this.instance?this.instance:new pe(this,Am(this.attrs,t))}static compile(t,n){let r=Object.create(null),i=0;return t.forEach((u,s)=>r[u]=new Aa(u,i++,n,s)),r}removeFromSet(t){for(var n=0;n<t.length;n++)t[n].type==this&&(t=t.slice(0,n).concat(t.slice(n+1)),n--);return t}isInSet(t){for(let n=0;n<t.length;n++)if(t[n].type==this)return t[n]}checkAttrs(t){gm(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}}class D3{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let i in t)n[i]=t[i];n.nodes=Ye.from(t.nodes),n.marks=Ye.from(t.marks||{}),this.nodes=qf.compile(this.spec.nodes,this),this.marks=Aa.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let u=this.nodes[i],s=u.spec.content||"",a=u.spec.marks;if(u.contentMatch=r[s]||(r[s]=xr.parse(s,this.nodes)),u.inlineContent=u.contentMatch.inlineContent,u.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!u.isInline||!u.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=u}u.markSet=a=="_"?null:a?Jf(this,a.split(" ")):a==""||!u.inlineContent?[]:null}for(let i in this.marks){let u=this.marks[i],s=u.spec.excludes;u.excluded=s==null?[u]:s==""?[]:Jf(this,s.split(" "))}this.nodeFromJSON=i=>yn.fromJSON(this,i),this.markFromJSON=i=>pe.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,r,i){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof qf){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,r,i)}text(t,n){let r=this.nodes.text;return new Ms(r,r.defaultAttrs,t,pe.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 Jf(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],u=e.marks[i],s=u;if(u)n.push(u);else for(let a in e.marks){let o=e.marks[a];(i=="_"||o.spec.group&&o.spec.group.split(" ").indexOf(i)>-1)&&n.push(s=o)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}function _3(e){return e.tag!=null}function O3(e){return e.style!=null}let yc=class Cl{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(i=>{if(_3(i))this.tags.push(i);else if(O3(i)){let u=/[^=]*/.exec(i.style)[0];r.indexOf(u)<0&&r.push(u),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let u=t.nodes[i.node];return u.contentMatch.matchType(u)})}parse(t,n={}){let r=new Zf(this,n,!1);return r.addAll(t,pe.none,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new Zf(this,n,!0);return r.addAll(t,pe.none,n.from,n.to),z.maxOpen(r.finish())}matchTag(t,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let u=this.tags[i];if(B3(t,u.tag)&&(u.namespace===void 0||t.namespaceURI==u.namespace)&&(!u.context||n.matchesContext(u.context))){if(u.getAttrs){let s=u.getAttrs(t);if(s===!1)continue;u.attrs=s||void 0}return u}}}matchStyle(t,n,r,i){for(let u=i?this.styles.indexOf(i)+1:0;u<this.styles.length;u++){let s=this.styles[u],a=s.style;if(!(a.indexOf(t)!=0||s.context&&!r.matchesContext(s.context)||a.length>t.length&&(a.charCodeAt(t.length)!=61||a.slice(t.length+1)!=n))){if(s.getAttrs){let o=s.getAttrs(n);if(o===!1)continue;s.attrs=o||void 0}return s}}}static schemaRules(t){let n=[];function r(i){let u=i.priority==null?50:i.priority,s=0;for(;s<n.length;s++){let a=n[s];if((a.priority==null?50:a.priority)<u)break}n.splice(s,0,i)}for(let i in t.marks){let u=t.marks[i].spec.parseDOM;u&&u.forEach(s=>{r(s=Xf(s)),s.mark||s.ignore||s.clearMark||(s.mark=i)})}for(let i in t.nodes){let u=t.nodes[i].spec.parseDOM;u&&u.forEach(s=>{r(s=Xf(s)),s.node||s.ignore||s.mark||(s.node=i)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new Cl(t,Cl.schemaRules(t)))}};const ym={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},R3={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Tm={ol:!0,ul:!0},ru=1,xl=2,Wi=4;function jf(e,t,n){return t!=null?(t?ru:0)|(t==="full"?xl:0):e&&e.whitespace=="pre"?ru|xl:n&~Wi}class $u{constructor(t,n,r,i,u,s){this.type=t,this.attrs=n,this.marks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=pe.none,this.match=u||(s&Wi?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(H.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(t.type))?(this.match=r,i):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&ru)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let u=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=u.withText(u.text.slice(0,u.text.length-i[0].length))}}let n=H.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(H.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&&!ym.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class Zf{constructor(t,n,r){this.parser=t,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=n.topNode,u,s=jf(null,n.preserveWhitespace,0)|(r?Wi:0);i?u=new $u(i.type,i.attrs,pe.none,!0,n.topMatch||i.type.contentMatch,s):r?u=new $u(null,null,pe.none,!0,null,s):u=new $u(t.schema.topNodeType,null,pe.none,!0,null,s),this.nodes=[u],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 r=t.nodeValue,i=this.top,u=i.options&xl?"full":this.localPreserveWS||(i.options&ru)>0,{schema:s}=this.parser;if(u==="full"||i.inlineContext(t)||/[^ \t\r\n\u000c]/.test(r)){if(u)if(u==="full")r=r.replace(/\r\n?/g,`
|
|
36
|
+
`);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let a=r.split(/\r?\n|\r/);for(let o=0;o<a.length;o++)o&&this.insertNode(s.linebreakReplacement.create(),n,!0),a[o]&&this.insertNode(s.text(a[o]),n,!/\S/.test(a[o]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let a=i.content[i.content.length-1],o=t.previousSibling;(!a||o&&o.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(r=r.slice(1))}r&&this.insertNode(s.text(r),n,!/\S/.test(r)),this.findInText(t)}else this.findInside(t)}addElement(t,n,r){let i=this.localPreserveWS,u=this.top;(t.tagName=="PRE"||/pre/.test(t.style&&t.style.whiteSpace))&&(this.localPreserveWS=!0);let s=t.nodeName.toLowerCase(),a;Tm.hasOwnProperty(s)&&this.parser.normalizeLists&&M3(t);let o=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(a=this.parser.matchTag(t,this,r));e:if(o?o.ignore:R3.hasOwnProperty(s))this.findInside(t),this.ignoreFallback(t,n);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(t=o.skip);let l,c=this.needsBlock;if(ym.hasOwnProperty(s))u.content.length&&u.content[0].isInline&&this.open&&(this.open--,u=this.top),l=!0,u.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,n);break e}let d=o&&o.skip?n:this.readStyles(t,n);d&&this.addAll(t,d),l&&this.sync(u),this.needsBlock=c}else{let l=this.readStyles(t,n);l&&this.addElementByRule(t,o,l,o.consuming===!1?a:void 0)}this.localPreserveWS=i}leafFallback(t,n){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(`
|
|
37
|
+
`),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 r=t.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let u=this.parser.matchedStyles[i],s=r.getPropertyValue(u);if(s)for(let a=void 0;;){let o=this.parser.matchStyle(u,s,this,a);if(!o)break;if(o.ignore)return null;if(o.clearMark?n=n.filter(l=>!o.clearMark(l)):n=n.concat(this.parser.schema.marks[o.mark].create(o.attrs)),o.consuming===!1)a=o;else break}}return n}addElementByRule(t,n,r,i){let u,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,t.nodeName=="BR")||this.leafFallback(t,r);else{let o=this.enter(s,n.attrs||null,r,n.preserveWhitespace);o&&(u=!0,r=o)}else{let o=this.parser.schema.marks[n.mark];r=r.concat(o.create(n.attrs))}let a=this.top;if(s&&s.isLeaf)this.findInside(t);else if(i)this.addElement(t,r,i);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(o=>this.insertNode(o,r,!1));else{let o=t;typeof n.contentElement=="string"?o=t.querySelector(n.contentElement):typeof n.contentElement=="function"?o=n.contentElement(t):n.contentElement&&(o=n.contentElement),this.findAround(t,o,!0),this.addAll(o,r),this.findAround(t,o,!1)}u&&this.sync(a)&&this.open--}addAll(t,n,r,i){let u=r||0;for(let s=r?t.childNodes[r]:t.firstChild,a=i==null?null:t.childNodes[i];s!=a;s=s.nextSibling,++u)this.findAtPoint(t,u),this.addDOM(s,n);this.findAtPoint(t,u)}findPlace(t,n,r){let i,u;for(let s=this.open,a=0;s>=0;s--){let o=this.nodes[s],l=o.findWrapping(t);if(l&&(!i||i.length>l.length+a)&&(i=l,u=o,!l.length))break;if(o.solid){if(r)break;a+=2}}if(!i)return null;this.sync(u);for(let s=0;s<i.length;s++)n=this.enterInner(i[s],null,n,!1);return n}insertNode(t,n,r){if(t.isInline&&this.needsBlock&&!this.top.type){let u=this.textblockFromContext();u&&(n=this.enterInner(u,null,n))}let i=this.findPlace(t,n,r);if(i){this.closeExtra();let u=this.top;u.match&&(u.match=u.match.matchType(t.type));let s=pe.none;for(let a of i.concat(t.marks))(u.type?u.type.allowsMarkType(a.type):$f(a.type,t.type))&&(s=a.addToSet(s));return u.content.push(t.mark(s)),!0}return!1}enter(t,n,r,i){let u=this.findPlace(t.create(n),r,!1);return u&&(u=this.enterInner(t,n,r,!0,i)),u}enterInner(t,n,r,i=!1,u){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(t);let a=jf(t,u,s.options);s.options&Wi&&s.content.length==0&&(a|=Wi);let o=pe.none;return r=r.filter(l=>(s.type?s.type.allowsMarkType(l.type):$f(l.type,t))?(o=l.addToSet(o),!1):!0),this.nodes.push(new $u(t,n,o,i,null,a)),this.open++,r}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|=ru)}return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)t+=r[i].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==t&&this.find[r].offset==n&&(this.find[r].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,r){if(t!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&t.nodeType==1&&t.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].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("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),u=-(r?r.depth+1:0)+(i?0:1),s=(a,o)=>{for(;a>=0;a--){let l=n[a];if(l==""){if(a==n.length-1||a==0)continue;for(;o>=u;o--)if(s(a-1,o))return!0;return!1}else{let c=o>0||o==0&&i?this.nodes[o].type:r&&o>=u?r.node(o-u).type:null;if(!c||c.name!=l&&!c.isInGroup(l))return!1;o--}}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 r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function M3(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&Tm.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function B3(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function Xf(e){let t={};for(let n in e)t[n]=e[n];return t}function $f(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let u=[],s=a=>{u.push(a);for(let o=0;o<a.edgeCount;o++){let{type:l,next:c}=a.edge(o);if(l==t||u.indexOf(c)<0&&s(c))return!0}};if(s(i.contentMatch))return!0}}class Or{constructor(t,n){this.nodes=t,this.marks=n}serializeFragment(t,n={},r){r||(r=Xa(n).createDocumentFragment());let i=r,u=[];return t.forEach(s=>{if(u.length||s.marks.length){let a=0,o=0;for(;a<u.length&&o<s.marks.length;){let l=s.marks[o];if(!this.marks[l.type.name]){o++;continue}if(!l.eq(u[a][0])||l.type.spec.spanning===!1)break;a++,o++}for(;a<u.length;)i=u.pop()[1];for(;o<s.marks.length;){let l=s.marks[o++],c=this.serializeMark(l,s.isInline,n);c&&(u.push([l,i]),i.appendChild(c.dom),i=c.contentDOM||c.dom)}}i.appendChild(this.serializeNodeInner(s,n))}),r}serializeNodeInner(t,n){let{dom:r,contentDOM:i}=ps(Xa(n),this.nodes[t.type.name](t),null,t.attrs);if(i){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,n,i)}return r}serializeNode(t,n={}){let r=this.serializeNodeInner(t,n);for(let i=t.marks.length-1;i>=0;i--){let u=this.serializeMark(t.marks[i],t.isInline,n);u&&((u.contentDOM||u.dom).appendChild(r),r=u.dom)}return r}serializeMark(t,n,r={}){let i=this.marks[t.type.name];return i&&ps(Xa(r),i(t,n),null,t.attrs)}static renderSpec(t,n,r=null,i){return ps(t,n,r,i)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new Or(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=eh(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return eh(t.marks)}}function eh(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function Xa(e){return e.document||window.document}const th=new WeakMap;function L3(e){let t=th.get(e);return t===void 0&&th.set(e,t=v3(e)),t}function v3(e){let t=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")t||(t=[]),t.push(r);else for(let i=0;i<r.length;i++)n(r[i]);else for(let i in r)n(r[i])}return n(e),t}function ps(e,t,n,r){if(typeof t=="string")return{dom:e.createTextNode(t)};if(t.nodeType!=null)return{dom:t};if(t.dom&&t.dom.nodeType!=null)return t;let i=t[0],u;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(u=L3(r))&&u.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=i.indexOf(" ");s>0&&(n=i.slice(0,s),i=i.slice(s+1));let a,o=n?e.createElementNS(n,i):e.createElement(i),l=t[1],c=1;if(l&&typeof l=="object"&&l.nodeType==null&&!Array.isArray(l)){c=2;for(let d in l)if(l[d]!=null){let f=d.indexOf(" ");f>0?o.setAttributeNS(d.slice(0,f),d.slice(f+1),l[d]):d=="style"&&o.style?o.style.cssText=l[d]:o.setAttribute(d,l[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:o,contentDOM:o}}else{let{dom:p,contentDOM:m}=ps(e,f,n,r);if(o.appendChild(p),m){if(a)throw new RangeError("Multiple content holes");a=m}}}return{dom:o,contentDOM:a}}const Cm=65535,xm=Math.pow(2,16);function P3(e,t){return e+t*xm}function nh(e){return e&Cm}function F3(e){return(e-(e&Cm))/xm}const km=1,Im=2,ms=4,Sm=8;class kl{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&Sm)>0}get deletedBefore(){return(this.delInfo&(km|ms))>0}get deletedAfter(){return(this.delInfo&(Im|ms))>0}get deletedAcross(){return(this.delInfo&ms)>0}}class bt{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&bt.empty)return bt.empty}recover(t){let n=0,r=nh(t);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+n+F3(t)}mapResult(t,n=1){return this._map(t,n,!1)}map(t,n=1){return this._map(t,n,!0)}_map(t,n,r){let i=0,u=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let o=this.ranges[a]-(this.inverted?i:0);if(o>t)break;let l=this.ranges[a+u],c=this.ranges[a+s],d=o+l;if(t<=d){let f=l?t==o?-1:t==d?1:n:n,p=o+i+(f<0?0:c);if(r)return p;let m=t==(n<0?o:d)?null:P3(a/3,t-o),A=t==o?Im:t==d?km:ms;return(n<0?t!=o:t!=d)&&(A|=Sm),new kl(p,A,m)}i+=c-l}return r?t+i:new kl(t+i,0,null)}touches(t,n){let r=0,i=nh(n),u=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let o=this.ranges[a]-(this.inverted?r:0);if(o>t)break;let l=this.ranges[a+u],c=o+l;if(t<=c&&a==i*3)return!0;r+=this.ranges[a+s]-l}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,u=0;i<this.ranges.length;i+=3){let s=this.ranges[i],a=s-(this.inverted?u:0),o=s+(this.inverted?0:u),l=this.ranges[i+n],c=this.ranges[i+r];t(a,a+l,o,o+c),u+=c-l}}invert(){return new bt(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?bt.empty:new bt(t<0?[0,-t,0]:[0,0,t])}}bt.empty=new bt([]);class Bs{constructor(t,n,r=0,i=t?t.length:0){this.mirror=n,this.from=r,this.to=i,this._maps=t||[],this.ownData=!(t||n)}get maps(){return this._maps}slice(t=0,n=this.maps.length){return new Bs(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,r=this._maps.length;n<t._maps.length;n++){let i=t.getMirror(n);this.appendMap(t._maps[n],i!=null&&i<n?r+i: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,r=this._maps.length+t._maps.length;n>=0;n--){let i=t.getMirror(n);this.appendMap(t._maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let t=new Bs;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;r<this.to;r++)t=this._maps[r].map(t,n);return t}mapResult(t,n=1){return this._map(t,n,!1)}_map(t,n,r){let i=0;for(let u=this.from;u<this.to;u++){let s=this._maps[u],a=s.mapResult(t,n);if(a.recover!=null){let o=this.getMirror(u);if(o!=null&&o>u&&o<this.to){u=o,t=this._maps[o].recover(a.recover);continue}}i|=a.delInfo,t=a.pos}return r?t:new kl(t,i,null)}}const $a=Object.create(null);class $e{getMap(){return bt.empty}merge(t){return null}static fromJSON(t,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=$a[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in $a)throw new RangeError("Duplicate use of step JSON ID "+t);return $a[t]=n,n.prototype.jsonID=t,n}}class Be{constructor(t,n){this.doc=t,this.failed=n}static ok(t){return new Be(t,null)}static fail(t){return new Be(null,t)}static fromReplace(t,n,r,i){try{return Be.ok(t.replace(n,r,i))}catch(u){if(u instanceof Os)return Be.fail(u.message);throw u}}}function Tc(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let u=e.child(i);u.content.size&&(u=u.copy(Tc(u.content,t,u))),u.isInline&&(u=t(u,n,i)),r.push(u)}return H.fromArray(r)}class bn extends $e{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=t.resolve(this.from),i=r.node(r.sharedDepth(this.to)),u=new z(Tc(n.content,(s,a)=>!s.isAtom||!a.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),i),n.openStart,n.openEnd);return Be.fromReplace(t,this.from,this.to,u)}invert(){return new Jt(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new bn(n.pos,r.pos,this.mark)}merge(t){return t instanceof bn&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new bn(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 bn(n.from,n.to,t.markFromJSON(n.mark))}}$e.jsonID("addMark",bn);class Jt extends $e{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new z(Tc(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),t),n.openStart,n.openEnd);return Be.fromReplace(t,this.from,this.to,r)}invert(){return new bn(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Jt(n.pos,r.pos,this.mark)}merge(t){return t instanceof Jt&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Jt(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 Jt(n.from,n.to,t.markFromJSON(n.mark))}}$e.jsonID("removeMark",Jt);class Fn extends $e{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return Be.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Be.fromReplace(t,this.pos,this.pos+1,new z(H.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new Fn(this.pos,n.marks[i]);return new Fn(this.pos,this.mark)}}return new kr(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Fn(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 Fn(n.pos,t.markFromJSON(n.mark))}}$e.jsonID("addNodeMark",Fn);class kr extends $e{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return Be.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Be.fromReplace(t,this.pos,this.pos+1,new z(H.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new Fn(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new kr(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 kr(n.pos,t.markFromJSON(n.mark))}}$e.jsonID("removeNodeMark",kr);class Me extends $e{constructor(t,n,r,i=!1){super(),this.from=t,this.to=n,this.slice=r,this.structure=i}apply(t){return this.structure&&Il(t,this.from,this.to)?Be.fail("Structure replace would overwrite content"):Be.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new bt([this.from,this.to-this.from,this.slice.size])}invert(t){return new Me(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.to,-1),r=this.from==this.to&&Me.MAP_BIAS<0?n:t.mapResult(this.from,1);return r.deletedAcross&&n.deletedAcross?null:new Me(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(t){if(!(t instanceof Me)||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?z.empty:new z(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new Me(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?z.empty:new z(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new Me(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 Me(n.from,n.to,z.fromJSON(t,n.slice),!!n.structure)}}Me.MAP_BIAS=1;$e.jsonID("replace",Me);class Ze extends $e{constructor(t,n,r,i,u,s,a=!1){super(),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=u,this.insert=s,this.structure=a}apply(t){if(this.structure&&(Il(t,this.from,this.gapFrom)||Il(t,this.gapTo,this.to)))return Be.fail("Structure gap-replace would overwrite content");let n=t.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Be.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?Be.fromReplace(t,this.from,this.to,r):Be.fail("Content does not fit in gap")}getMap(){return new bt([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 Ze(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),r=t.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:t.map(this.gapFrom,-1),u=this.to==this.gapTo?r.pos:t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||u>r.pos?null:new Ze(n.pos,r.pos,i,u,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 Ze(n.from,n.to,n.gapFrom,n.gapTo,z.fromJSON(t,n.slice),n.insert,!!n.structure)}}$e.jsonID("replaceAround",Ze);function Il(e,t,n){let r=e.resolve(t),i=n-t,u=r.depth;for(;i>0&&u>0&&r.indexAfter(u)==r.node(u).childCount;)u--,i--;if(i>0){let s=r.node(u).maybeChild(r.indexAfter(u));for(;i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}}return!1}function H3(e,t,n,r){let i=[],u=[],s,a;e.doc.nodesBetween(t,n,(o,l,c)=>{if(!o.isInline)return;let d=o.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let f=Math.max(l,t),p=Math.min(l+o.nodeSize,n),m=r.addToSet(d);for(let A=0;A<d.length;A++)d[A].isInSet(m)||(s&&s.to==f&&s.mark.eq(d[A])?s.to=p:i.push(s=new Jt(f,p,d[A])));a&&a.to==f?a.to=p:u.push(a=new bn(f,p,r))}}),i.forEach(o=>e.step(o)),u.forEach(o=>e.step(o))}function U3(e,t,n,r){let i=[],u=0;e.doc.nodesBetween(t,n,(s,a)=>{if(!s.isInline)return;u++;let o=null;if(r instanceof Aa){let l=s.marks,c;for(;c=r.isInSet(l);)(o||(o=[])).push(c),l=c.removeFromSet(l)}else r?r.isInSet(s.marks)&&(o=[r]):o=s.marks;if(o&&o.length){let l=Math.min(a+s.nodeSize,n);for(let c=0;c<o.length;c++){let d=o[c],f;for(let p=0;p<i.length;p++){let m=i[p];m.step==u-1&&d.eq(i[p].style)&&(f=m)}f?(f.to=l,f.step=u):i.push({style:d,from:Math.max(a,t),to:l,step:u})}}}),i.forEach(s=>e.step(new Jt(s.from,s.to,s.style)))}function Cc(e,t,n,r=n.contentMatch,i=!0){let u=e.doc.nodeAt(t),s=[],a=t+1;for(let o=0;o<u.childCount;o++){let l=u.child(o),c=a+l.nodeSize,d=r.matchType(l.type);if(!d)s.push(new Me(a,c,z.empty));else{r=d;for(let f=0;f<l.marks.length;f++)n.allowsMarkType(l.marks[f].type)||e.step(new Jt(a,c,l.marks[f]));if(i&&l.isText&&n.whitespace!="pre"){let f,p=/\r?\n|\r/g,m;for(;f=p.exec(l.text);)m||(m=new z(H.from(n.schema.text(" ",n.allowedMarks(l.marks))),0,0)),s.push(new Me(a+f.index,a+f.index+f[0].length,m))}}a=c}if(!r.validEnd){let o=r.fillBefore(H.empty,!0);e.replace(a,a,new z(o,0,0))}for(let o=s.length-1;o>=0;o--)e.step(s[o])}function W3(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function ga(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth,i=0,u=0;;--r){let s=e.$from.node(r),a=e.$from.index(r)+i,o=e.$to.indexAfter(r)-u;if(r<e.depth&&s.canReplace(a,o,n))return r;if(r==0||s.type.spec.isolating||!W3(s,a,o))break;a&&(i=1),o<s.childCount&&(u=1)}return null}function K3(e,t,n){let{$from:r,$to:i,depth:u}=t,s=r.before(u+1),a=i.after(u+1),o=s,l=a,c=H.empty,d=0;for(let m=u,A=!1;m>n;m--)A||r.index(m)>0?(A=!0,c=H.from(r.node(m).copy(c)),d++):o--;let f=H.empty,p=0;for(let m=u,A=!1;m>n;m--)A||i.after(m+1)<i.end(m)?(A=!0,f=H.from(i.node(m).copy(f)),p++):l++;e.step(new Ze(o,l,s,a,new z(c.append(f),d,p),c.size-d,!0))}function xc(e,t,n=null,r=e){let i=Q3(e,t),u=i&&Y3(r,t);return u?i.map(rh).concat({type:t,attrs:n}).concat(u.map(rh)):null}function rh(e){return{type:e,attrs:null}}function Q3(e,t){let{parent:n,startIndex:r,endIndex:i}=e,u=n.contentMatchAt(r).findWrapping(t);if(!u)return null;let s=u.length?u[0]:t;return n.canReplaceWith(r,i,s)?u:null}function Y3(e,t){let{parent:n,startIndex:r,endIndex:i}=e,u=n.child(r),s=t.contentMatch.findWrapping(u.type);if(!s)return null;let o=(s.length?s[s.length-1]:t).contentMatch;for(let l=r;o&&l<i;l++)o=o.matchType(n.child(l).type);return!o||!o.validEnd?null:s}function z3(e,t,n){let r=H.empty;for(let s=n.length-1;s>=0;s--){if(r.size){let a=n[s].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=H.from(n[s].type.create(n[s].attrs,r))}let i=t.start,u=t.end;e.step(new Ze(i,u,i,u,new z(r,0,0),n.length,!0))}function G3(e,t,n,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let u=e.steps.length;e.doc.nodesBetween(t,n,(s,a)=>{let o=typeof i=="function"?i(s):i;if(s.isTextblock&&!s.hasMarkup(r,o)&&V3(e.doc,e.mapping.slice(u).map(a),r)){let l=null;if(r.schema.linebreakReplacement){let p=r.whitespace=="pre",m=!!r.contentMatch.matchType(r.schema.linebreakReplacement);p&&!m?l=!1:!p&&m&&(l=!0)}l===!1&&Nm(e,s,a,u),Cc(e,e.mapping.slice(u).map(a,1),r,void 0,l===null);let c=e.mapping.slice(u),d=c.map(a,1),f=c.map(a+s.nodeSize,1);return e.step(new Ze(d,f,d+1,f-1,new z(H.from(r.create(o,null,s.marks)),0,0),1,!0)),l===!0&&wm(e,s,a,u),!1}})}function wm(e,t,n,r){t.forEach((i,u)=>{if(i.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(i.text);){let o=e.mapping.slice(r).map(n+1+u+s.index);e.replaceWith(o,o+1,t.type.schema.linebreakReplacement.create())}}})}function Nm(e,t,n,r){t.forEach((i,u)=>{if(i.type==i.type.schema.linebreakReplacement){let s=e.mapping.slice(r).map(n+1+u);e.replaceWith(s,s+1,t.type.schema.text(`
|
|
38
|
+
`))}})}function V3(e,t,n){let r=e.resolve(t),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function q3(e,t,n,r,i){let u=e.doc.nodeAt(t);if(!u)throw new RangeError("No node at given position");n||(n=u.type);let s=n.create(r,null,i||u.marks);if(u.isLeaf)return e.replaceWith(t,t+u.nodeSize,s);if(!n.validContent(u.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new Ze(t,t+u.nodeSize,t+1,t+u.nodeSize-1,new z(H.from(s),0,0),1,!0))}function Ki(e,t,n=1,r){let i=e.resolve(t),u=i.depth-n,s=r&&r[r.length-1]||i.parent;if(u<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!s.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let l=i.depth-1,c=n-2;l>u;l--,c--){let d=i.node(l),f=i.index(l);if(d.type.spec.isolating)return!1;let p=d.content.cutByIndex(f,d.childCount),m=r&&r[c+1];m&&(p=p.replaceChild(0,m.type.create(m.attrs)));let A=r&&r[c]||d;if(!d.canReplace(f+1,d.childCount)||!A.type.validContent(p))return!1}let a=i.indexAfter(u),o=r&&r[0];return i.node(u).canReplaceWith(a,a,o?o.type:i.node(u+1).type)}function J3(e,t,n=1,r){let i=e.doc.resolve(t),u=H.empty,s=H.empty;for(let a=i.depth,o=i.depth-n,l=n-1;a>o;a--,l--){u=H.from(i.node(a).copy(u));let c=r&&r[l];s=H.from(c?c.type.create(c.attrs,s):i.node(a).copy(s))}e.step(new Me(t,t,new z(u.append(s),n,n),!0))}function ba(e,t){let n=e.resolve(t),r=n.index();return Z3(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function j3(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let i=0;i<t.childCount;i++){let u=t.child(i),s=u.type==r?e.type.schema.nodes.text:u.type;if(n=n.matchType(s),!n||!e.type.allowsMarks(u.marks))return!1}return n.validEnd}function Z3(e,t){return!!(e&&t&&!e.isLeaf&&j3(e,t))}function X3(e,t,n){let r=null,{linebreakReplacement:i}=e.doc.type.schema,u=e.doc.resolve(t-n),s=u.node().type;if(i&&s.inlineContent){let c=s.whitespace=="pre",d=!!s.contentMatch.matchType(i);c&&!d?r=!1:!c&&d&&(r=!0)}let a=e.steps.length;if(r===!1){let c=e.doc.resolve(t+n);Nm(e,c.node(),c.before(),a)}s.inlineContent&&Cc(e,t+n-1,s,u.node().contentMatchAt(u.index()),r==null);let o=e.mapping.slice(a),l=o.map(t-n);if(e.step(new Me(l,o.map(t+n,-1),z.empty,!0)),r===!0){let c=e.doc.resolve(l);wm(e,c.node(),c.before(),e.steps.length)}return e}function $3(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let i=r.depth-1;i>=0;i--){let u=r.index(i);if(r.node(i).canReplaceWith(u,u,n))return r.before(i+1);if(u>0)return null}if(r.parentOffset==r.parent.content.size)for(let i=r.depth-1;i>=0;i--){let u=r.indexAfter(i);if(r.node(i).canReplaceWith(u,u,n))return r.after(i+1);if(u<r.node(i).childCount)return null}return null}function eT(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let u=0;u<n.openStart;u++)i=i.firstChild.content;for(let u=1;u<=(n.openStart==0&&n.size?2:1);u++)for(let s=r.depth;s>=0;s--){let a=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,o=r.index(s)+(a>0?1:0),l=r.node(s),c=!1;if(u==1)c=l.canReplace(o,o,i);else{let d=l.contentMatchAt(o).findWrapping(i.firstChild.type);c=d&&l.canReplaceWith(o,o,d[0])}if(c)return a==0?r.pos:a<0?r.before(s+1):r.after(s+1)}return null}function Ea(e,t,n=t,r=z.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),u=e.resolve(n);return Dm(i,u,r)?new Me(t,n,r):new tT(i,u,r).fit()}function Dm(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class tT{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=H.empty;for(let i=0;i<=t.depth;i++){let u=t.node(i);this.frontier.push({type:u.type,match:u.contentMatchAt(t.indexAfter(i))})}for(let i=t.depth;i>0;i--)this.placed=H.from(t.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let l=this.findFittable();l?this.placeNodes(l):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(t<0?this.$to:r.doc.resolve(t));if(!i)return null;let u=this.placed,s=r.depth,a=i.depth;for(;s&&a&&u.childCount==1;)u=u.firstChild.content,s--,a--;let o=new z(u,s,a);return t>-1?new Ze(r.pos,t,this.$to.pos,this.$to.end(),o,n):o.size||r.pos!=this.$to.pos?new Me(r.pos,i.pos,o):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<t;r++){let u=n.firstChild;if(n.childCount>1&&(i=0),u.type.spec.isolating&&i<=r){t=r;break}n=u.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let i,u=null;r?(u=eo(this.unplaced.content,r-1).firstChild,i=u.content):i=this.unplaced.content;let s=i.firstChild;for(let a=this.depth;a>=0;a--){let{type:o,match:l}=this.frontier[a],c,d=null;if(n==1&&(s?l.matchType(s.type)||(d=l.fillBefore(H.from(s),!1)):u&&o.compatibleContent(u.type)))return{sliceDepth:r,frontierDepth:a,parent:u,inject:d};if(n==2&&s&&(c=l.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:a,parent:u,wrap:c};if(u&&l.matchType(u.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=eo(t,n);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new z(t,n+1,Math.max(r,i.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=eo(t,n);if(i.childCount<=1&&n>0){let u=t.size-n<=n+i.size;this.unplaced=new z(Mi(t,n-1,1),n-1,u?n-1:r)}else this.unplaced=new z(Mi(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:i,wrap:u}){for(;this.depth>n;)this.closeFrontierNode();if(u)for(let A=0;A<u.length;A++)this.openFrontierNode(u[A]);let s=this.unplaced,a=r?r.content:s.content,o=s.openStart-t,l=0,c=[],{match:d,type:f}=this.frontier[n];if(i){for(let A=0;A<i.childCount;A++)c.push(i.child(A));d=d.matchFragment(i)}let p=a.size+t-(s.content.size-s.openEnd);for(;l<a.childCount;){let A=a.child(l),E=d.matchType(A.type);if(!E)break;l++,(l>1||o==0||A.content.size)&&(d=E,c.push(_m(A.mark(f.allowedMarks(A.marks)),l==1?o:0,l==a.childCount?p:-1)))}let m=l==a.childCount;m||(p=-1),this.placed=Bi(this.placed,n,H.from(c)),this.frontier[n].match=d,m&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let A=0,E=a;A<p;A++){let g=E.lastChild;this.frontier.push({type:g.type,match:g.contentMatchAt(g.childCount)}),E=g.content}this.unplaced=m?t==0?z.empty:new z(Mi(s.content,t-1,1),t-1,p<0?s.openEnd:t-1):new z(Mi(s.content,t,l),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t=this.frontier[this.depth],n;if(!t.type.isTextblock||!to(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:r}=this.$to,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:i}=this.frontier[n],u=n<t.depth&&t.end(n+1)==t.pos+(t.depth-(n+1)),s=to(t,n,i,r,u);if(s){for(let a=n-1;a>=0;a--){let{match:o,type:l}=this.frontier[a],c=to(t,a,l,o,!0);if(!c||c.childCount)continue e}return{depth:n,fit:s,move:u?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=Bi(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let i=t.node(r),u=i.type.contentMatch.fillBefore(i.content,!0,t.index(r));this.openFrontierNode(i.type,i.attrs,u)}return t}openFrontierNode(t,n=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(t),this.placed=Bi(this.placed,this.depth,H.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(H.empty,!0);n.childCount&&(this.placed=Bi(this.placed,this.frontier.length,n))}}function Mi(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(Mi(e.firstChild.content,t-1,n)))}function Bi(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(Bi(e.lastChild.content,t-1,n)))}function eo(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function _m(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,_m(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(H.empty,!0)))),e.copy(r)}function to(e,t,n,r,i){let u=e.node(t),s=i?e.indexAfter(t):e.index(t);if(s==u.childCount&&!n.compatibleContent(u.type))return null;let a=r.fillBefore(u.content,!0,s);return a&&!nT(n,u.content,s)?a:null}function nT(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}function rT(e){return e.spec.defining||e.spec.definingForContent}function iT(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let i=e.doc.resolve(t),u=e.doc.resolve(n);if(Dm(i,u,r))return e.step(new Me(t,n,r));let s=Rm(i,u);s[s.length-1]==0&&s.pop();let a=-(i.depth+1);s.unshift(a);for(let f=i.depth,p=i.pos-1;f>0;f--,p--){let m=i.node(f).type.spec;if(m.defining||m.definingAsContext||m.isolating)break;s.indexOf(f)>-1?a=f:i.before(f)==p&&s.splice(1,0,-f)}let o=s.indexOf(a),l=[],c=r.openStart;for(let f=r.content,p=0;;p++){let m=f.firstChild;if(l.push(m),p==r.openStart)break;f=m.content}for(let f=c-1;f>=0;f--){let p=l[f],m=rT(p.type);if(m&&!p.sameMarkup(i.node(Math.abs(a)-1)))c=f;else if(m||!p.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let p=(f+c+1)%(r.openStart+1),m=l[p];if(m)for(let A=0;A<s.length;A++){let E=s[(A+o)%s.length],g=!0;E<0&&(g=!1,E=-E);let N=i.node(E-1),I=i.index(E-1);if(N.canReplaceWith(I,I,m.type,m.marks))return e.replace(i.before(E),g?u.after(E):n,new z(Om(r.content,0,r.openStart,p),p,r.openEnd))}}let d=e.steps.length;for(let f=s.length-1;f>=0&&(e.replace(t,n,r),!(e.steps.length>d));f--){let p=s[f];p<0||(t=i.before(p),n=u.after(p))}}function Om(e,t,n,r,i){if(t<n){let u=e.firstChild;e=e.replaceChild(0,u.copy(Om(u.content,t+1,n,r,u)))}if(t>r){let u=i.contentMatchAt(0),s=u.fillBefore(e).append(e);e=s.append(u.matchFragment(s).fillBefore(H.empty,!0))}return e}function uT(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let i=$3(e.doc,t,r.type);i!=null&&(t=n=i)}e.replaceRange(t,n,new z(H.from(r),0,0))}function sT(e,t,n){let r=e.doc.resolve(t),i=e.doc.resolve(n);if(r.parent.isTextblock&&i.parent.isTextblock&&r.start()!=i.start()&&r.parentOffset==0&&i.parentOffset==0){let s=r.sharedDepth(n),a=!1;for(let o=r.depth;o>s;o--)r.node(o).type.spec.isolating&&(a=!0);for(let o=i.depth;o>s;o--)i.node(o).type.spec.isolating&&(a=!0);if(!a){for(let o=r.depth;o>0&&t==r.start(o);o--)t=r.before(o);for(let o=i.depth;o>0&&n==i.start(o);o--)n=i.before(o);r=e.doc.resolve(t),i=e.doc.resolve(n)}}let u=Rm(r,i);for(let s=0;s<u.length;s++){let a=u[s],o=s==u.length-1;if(o&&a==0||r.node(a).type.contentMatch.validEnd)return e.delete(r.start(a),i.end(a));if(a>0&&(o||r.node(a-1).canReplace(r.index(a-1),i.indexAfter(a-1))))return e.delete(r.before(a),i.after(a))}for(let s=1;s<=r.depth&&s<=i.depth;s++)if(t-r.start(s)==r.depth-s&&n>r.end(s)&&i.end(s)-n!=i.depth-s&&r.start(s-1)==i.start(s-1)&&r.node(s-1).canReplace(r.index(s-1),i.index(s-1)))return e.delete(r.before(s),n);e.delete(t,n)}function Rm(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let i=r;i>=0;i--){let u=e.start(i);if(u<e.pos-(e.depth-i)||t.end(i)>t.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;(u==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==u-1)&&n.push(i)}return n}class Vr extends $e{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return Be.fail("No node at attribute step's position");let r=Object.create(null);for(let u in n.attrs)r[u]=n.attrs[u];r[this.attr]=this.value;let i=n.type.create(r,null,n.marks);return Be.fromReplace(t,this.pos,this.pos+1,new z(H.from(i),0,n.isLeaf?0:1))}getMap(){return bt.empty}invert(t){return new Vr(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 Vr(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 Vr(n.pos,n.attr,n.value)}}$e.jsonID("attr",Vr);class iu extends $e{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let i in t.attrs)n[i]=t.attrs[i];n[this.attr]=this.value;let r=t.type.create(n,t.content,t.marks);return Be.ok(r)}getMap(){return bt.empty}invert(t){return new iu(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 iu(n.attr,n.value)}}$e.jsonID("docAttr",iu);let ei=class extends Error{};ei=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};ei.prototype=Object.create(Error.prototype);ei.prototype.constructor=ei;ei.prototype.name="TransformError";class Mm{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Bs}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new ei(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 r=0;r<this.mapping.maps.length;r++){let i=this.mapping.maps[r];r&&(t=i.map(t,1),n=i.map(n,-1)),i.forEach((u,s,a,o)=>{t=Math.min(t,a),n=Math.max(n,o)})}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,r=z.empty){let i=Ea(this.doc,t,n,r);return i&&this.step(i),this}replaceWith(t,n,r){return this.replace(t,n,new z(H.from(r),0,0))}delete(t,n){return this.replace(t,n,z.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,r){return iT(this,t,n,r),this}replaceRangeWith(t,n,r){return uT(this,t,n,r),this}deleteRange(t,n){return sT(this,t,n),this}lift(t,n){return K3(this,t,n),this}join(t,n=1){return X3(this,t,n),this}wrap(t,n){return z3(this,t,n),this}setBlockType(t,n=t,r,i=null){return G3(this,t,n,r,i),this}setNodeMarkup(t,n,r=null,i){return q3(this,t,n,r,i),this}setNodeAttribute(t,n,r){return this.step(new Vr(t,n,r)),this}setDocAttribute(t,n){return this.step(new iu(t,n)),this}addNodeMark(t,n){return this.step(new Fn(t,n)),this}removeNodeMark(t,n){let r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(n instanceof pe)n.isInSet(r.marks)&&this.step(new kr(t,n));else{let i=r.marks,u,s=[];for(;u=n.isInSet(i);)s.push(new kr(t,u)),i=u.removeFromSet(i);for(let a=s.length-1;a>=0;a--)this.step(s[a])}return this}split(t,n=1,r){return J3(this,t,n,r),this}addMark(t,n,r){return H3(this,t,n,r),this}removeMark(t,n,r){return U3(this,t,n,r),this}clearIncompatible(t,n,r){return Cc(this,t,n,r),this}}const no=Object.create(null);class ue{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new Bm(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=z.empty){let r=n.content.lastChild,i=null;for(let a=0;a<n.openEnd;a++)i=r,r=r.lastChild;let u=t.steps.length,s=this.ranges;for(let a=0;a<s.length;a++){let{$from:o,$to:l}=s[a],c=t.mapping.slice(u);t.replaceRange(c.map(o.pos),c.map(l.pos),a?z.empty:n),a==0&&sh(t,u,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(t,n){let r=t.steps.length,i=this.ranges;for(let u=0;u<i.length;u++){let{$from:s,$to:a}=i[u],o=t.mapping.slice(r),l=o.map(s.pos),c=o.map(a.pos);u?t.deleteRange(l,c):(t.replaceRangeWith(l,c,n),sh(t,r,n.isInline?-1:1))}}static findFrom(t,n,r=!1){let i=t.parent.inlineContent?new ae(t):Wr(t.node(0),t.parent,t.pos,t.index(),n,r);if(i)return i;for(let u=t.depth-1;u>=0;u--){let s=n<0?Wr(t.node(0),t.node(u),t.before(u+1),t.index(u),n,r):Wr(t.node(0),t.node(u),t.after(u+1),t.index(u)+1,n,r);if(s)return s}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new Tt(t.node(0))}static atStart(t){return Wr(t,t,0,0,1)||new Tt(t)}static atEnd(t){return Wr(t,t,t.content.size,t.childCount,-1)||new Tt(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=no[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in no)throw new RangeError("Duplicate use of selection JSON ID "+t);return no[t]=n,n.prototype.jsonID=t,n}getBookmark(){return ae.between(this.$anchor,this.$head).getBookmark()}}ue.prototype.visible=!0;class Bm{constructor(t,n){this.$from=t,this.$to=n}}let ih=!1;function uh(e){!ih&&!e.parent.inlineContent&&(ih=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class ae extends ue{constructor(t,n=t){uh(t),uh(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return ue.near(r);let i=t.resolve(n.map(this.anchor));return new ae(i.parent.inlineContent?i:r,r)}replace(t,n=z.empty){if(super.replace(t,n),n==z.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof ae&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new ya(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 ae(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let i=t.resolve(n);return new this(i,r==n?i:t.resolve(r))}static between(t,n,r){let i=t.pos-n.pos;if((!r||i)&&(r=i>=0?1:-1),!n.parent.inlineContent){let u=ue.findFrom(n,r,!0)||ue.findFrom(n,-r,!0);if(u)n=u.$head;else return ue.near(n,r)}return t.parent.inlineContent||(i==0?t=n:(t=(ue.findFrom(t,-r,!0)||ue.findFrom(t,r,!0)).$anchor,t.pos<n.pos!=i<0&&(t=n))),new ae(t,n)}}ue.jsonID("text",ae);class ya{constructor(t,n){this.anchor=t,this.head=n}map(t){return new ya(t.map(this.anchor),t.map(this.head))}resolve(t){return ae.between(t.resolve(this.anchor),t.resolve(this.head))}}class re extends ue{constructor(t){let n=t.nodeAfter,r=t.node(0).resolve(t.pos+n.nodeSize);super(t,r),this.node=n}map(t,n){let{deleted:r,pos:i}=n.mapResult(this.anchor),u=t.resolve(i);return r?ue.near(u):new re(u)}content(){return new z(H.from(this.node),0,0)}eq(t){return t instanceof re&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new kc(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new re(t.resolve(n.anchor))}static create(t,n){return new re(t.resolve(n))}static isSelectable(t){return!t.isText&&t.type.spec.selectable!==!1}}re.prototype.visible=!1;ue.jsonID("node",re);class kc{constructor(t){this.anchor=t}map(t){let{deleted:n,pos:r}=t.mapResult(this.anchor);return n?new ya(r,r):new kc(r)}resolve(t){let n=t.resolve(this.anchor),r=n.nodeAfter;return r&&re.isSelectable(r)?new re(n):ue.near(n)}}class Tt extends ue{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,n=z.empty){if(n==z.empty){t.delete(0,t.doc.content.size);let r=ue.atStart(t.doc);r.eq(t.selection)||t.setSelection(r)}else super.replace(t,n)}toJSON(){return{type:"all"}}static fromJSON(t){return new Tt(t)}map(t){return new Tt(t)}eq(t){return t instanceof Tt}getBookmark(){return aT}}ue.jsonID("all",Tt);const aT={map(){return this},resolve(e){return new Tt(e)}};function Wr(e,t,n,r,i,u=!1){if(t.inlineContent)return ae.create(e,n);for(let s=r-(i>0?0:1);i>0?s<t.childCount:s>=0;s+=i){let a=t.child(s);if(a.isAtom){if(!u&&re.isSelectable(a))return re.create(e,n-(i<0?a.nodeSize:0))}else{let o=Wr(e,a,n+i,i<0?a.childCount:0,i,u);if(o)return o}n+=a.nodeSize*i}return null}function sh(e,t,n){let r=e.steps.length-1;if(r<t)return;let i=e.steps[r];if(!(i instanceof Me||i instanceof Ze))return;let u=e.mapping.maps[r],s;u.forEach((a,o,l,c)=>{s==null&&(s=c)}),e.setSelection(ue.near(e.doc.resolve(s),n))}const ah=1,es=2,oh=4;class oT extends Mm{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|ah)&~es,this.storedMarks=null,this}get selectionSet(){return(this.updated&ah)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=es,this}ensureMarks(t){return pe.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&es)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&~es,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,n=!0){let r=this.selection;return n&&(t=t.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||pe.none))),r.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,n,r){let i=this.doc.type.schema;if(n==null)return t?this.replaceSelectionWith(i.text(t),!0):this.deleteSelection();{if(r==null&&(r=n),!t)return this.deleteRange(n,r);let u=this.storedMarks;if(!u){let s=this.doc.resolve(n);u=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,i.text(t,u)),!this.selection.empty&&this.selection.to==n+t.length&&this.setSelection(ue.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|=oh,this}get scrolledIntoView(){return(this.updated&oh)>0}}function lh(e,t){return!t||!e?e:e.bind(t)}class Li{constructor(t,n,r){this.name=t,this.init=lh(n.init,r),this.apply=lh(n.apply,r)}}const lT=[new Li("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new Li("selection",{init(e,t){return e.selection||ue.atStart(t.doc)},apply(e){return e.selection}}),new Li("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new Li("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];class ro{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=lT.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Li(r.key,r.spec.state,r))})}}class Gr{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 r=0;r<this.config.plugins.length;r++)if(r!=n){let i=this.config.plugins[r];if(i.spec.filterTransaction&&!i.spec.filterTransaction.call(i,t,this))return!1}return!0}applyTransaction(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};let n=[t],r=this.applyInner(t),i=null;for(;;){let u=!1;for(let s=0;s<this.config.plugins.length;s++){let a=this.config.plugins[s];if(a.spec.appendTransaction){let o=i?i[s].n:0,l=i?i[s].state:this,c=o<n.length&&a.spec.appendTransaction.call(a,o?n.slice(o):n,l,r);if(c&&r.filterTransaction(c,s)){if(c.setMeta("appendedTransaction",t),!i){i=[];for(let d=0;d<this.config.plugins.length;d++)i.push(d<s?{state:r,n:n.length}:{state:this,n:0})}n.push(c),r=r.applyInner(c),u=!0}i&&(i[s]={state:r,n:n.length})}}if(!u)return{state:r,transactions:n}}}applyInner(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new Gr(this.config),r=this.config.fields;for(let i=0;i<r.length;i++){let u=r[i];n[u.name]=u.apply(t,this[u.name],this,n)}return n}get tr(){return new oT(this)}static create(t){let n=new ro(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new Gr(n);for(let i=0;i<n.fields.length;i++)r[n.fields[i].name]=n.fields[i].init(t,r);return r}reconfigure(t){let n=new ro(this.schema,t.plugins),r=n.fields,i=new Gr(n);for(let u=0;u<r.length;u++){let s=r[u].name;i[s]=this.hasOwnProperty(s)?this[s]:r[u].init(t,i)}return i}toJSON(t){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),t&&typeof t=="object")for(let r in t){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=t[r],u=i.spec.state;u&&u.toJSON&&(n[r]=u.toJSON.call(i,this[i.key]))}return n}static fromJSON(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let i=new ro(t.schema,t.plugins),u=new Gr(i);return i.fields.forEach(s=>{if(s.name=="doc")u.doc=yn.fromJSON(t.schema,n.doc);else if(s.name=="selection")u.selection=ue.fromJSON(u.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(u.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let a in r){let o=r[a],l=o.spec.state;if(o.key==s.name&&l&&l.fromJSON&&Object.prototype.hasOwnProperty.call(n,a)){u[s.name]=l.fromJSON.call(o,t,n[a],u);return}}u[s.name]=s.init(t,u)}}),u}}function Lm(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):r=="handleDOMEvents"&&(i=Lm(i,t,{})),n[r]=i}return n}class Ct{constructor(t){this.spec=t,this.props={},t.props&&Lm(t.props,this,this.props),this.key=t.key?t.key.key:vm("plugin")}getState(t){return t[this.key]}}const io=Object.create(null);function vm(e){return e in io?e+"$"+ ++io[e]:(io[e]=0,e+"$")}class xt{constructor(t="key"){this.key=vm(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const Ic=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function Pm(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}const Fm=(e,t,n)=>{let r=Pm(e,n);if(!r)return!1;let i=Sc(r);if(!i){let s=r.blockRange(),a=s&&ga(s);return a==null?!1:(t&&t(e.tr.lift(s,a).scrollIntoView()),!0)}let u=i.nodeBefore;if(Wm(e,i,t,-1))return!0;if(r.parent.content.size==0&&(ti(u,"end")||re.isSelectable(u)))for(let s=r.depth;;s--){let a=Ea(e.doc,r.before(s),r.after(s),z.empty);if(a&&a.slice.size<a.to-a.from){if(t){let o=e.tr.step(a);o.setSelection(ti(u,"end")?ue.findFrom(o.doc.resolve(o.mapping.map(i.pos,-1)),-1):re.create(o.doc,i.pos-u.nodeSize)),t(o.scrollIntoView())}return!0}if(s==1||r.node(s-1).childCount>1)break}return u.isAtom&&i.depth==r.depth-1?(t&&t(e.tr.delete(i.pos-u.nodeSize,i.pos).scrollIntoView()),!0):!1},cT=(e,t,n)=>{let r=Pm(e,n);if(!r)return!1;let i=Sc(r);return i?dT(e,i,t):!1};function dT(e,t,n){let r=t.nodeBefore,i=r,u=t.pos-1;for(;!i.isTextblock;u--){if(i.type.spec.isolating)return!1;let c=i.lastChild;if(!c)return!1;i=c}let s=t.nodeAfter,a=s,o=t.pos+1;for(;!a.isTextblock;o++){if(a.type.spec.isolating)return!1;let c=a.firstChild;if(!c)return!1;a=c}let l=Ea(e.doc,u,o,z.empty);if(!l||l.from!=u||l instanceof Me&&l.slice.size>=o-u)return!1;if(n){let c=e.tr.step(l);c.setSelection(ae.create(c.doc,u)),n(c.scrollIntoView())}return!0}function ti(e,t,n=!1){for(let r=e;r;r=t=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const Hm=(e,t,n)=>{let{$head:r,empty:i}=e.selection,u=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;u=Sc(r)}let s=u&&u.nodeBefore;return!s||!re.isSelectable(s)?!1:(t&&t(e.tr.setSelection(re.create(e.doc,u.pos-s.nodeSize)).scrollIntoView()),!0)};function Sc(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 fT(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size)?null:n}const hT=(e,t,n)=>{let r=fT(e,n);if(!r)return!1;let i=Um(r);if(!i)return!1;let u=i.nodeAfter;if(Wm(e,i,t,1))return!0;if(r.parent.content.size==0&&(ti(u,"start")||re.isSelectable(u))){let s=Ea(e.doc,r.before(),r.after(),z.empty);if(s&&s.slice.size<s.to-s.from){if(t){let a=e.tr.step(s);a.setSelection(ti(u,"start")?ue.findFrom(a.doc.resolve(a.mapping.map(i.pos)),1):re.create(a.doc,a.mapping.map(i.pos))),t(a.scrollIntoView())}return!0}}return u.isAtom&&i.depth==r.depth-1?(t&&t(e.tr.delete(i.pos,i.pos+u.nodeSize).scrollIntoView()),!0):!1},pT=(e,t,n)=>{let{$head:r,empty:i}=e.selection,u=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;u=Um(r)}let s=u&&u.nodeAfter;return!s||!re.isSelectable(s)?!1:(t&&t(e.tr.setSelection(re.create(e.doc,u.pos)).scrollIntoView()),!0)};function Um(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}const mT=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(`
|
|
39
|
+
`).scrollIntoView()),!0)};function wc(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const AT=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),u=n.indexAfter(-1),s=wc(i.contentMatchAt(u));if(!s||!i.canReplaceWith(u,u,s))return!1;if(t){let a=n.after(),o=e.tr.replaceWith(a,a,s.createAndFill());o.setSelection(ue.near(o.doc.resolve(a),1)),t(o.scrollIntoView())}return!0},gT=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof Tt||r.parent.inlineContent||i.parent.inlineContent)return!1;let u=wc(i.parent.contentMatchAt(i.indexAfter()));if(!u||!u.isTextblock)return!1;if(t){let s=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,a=e.tr.insert(s,u.createAndFill());a.setSelection(ae.create(a.doc,s+1)),t(a.scrollIntoView())}return!0},bT=(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 u=n.before();if(Ki(e.doc,u))return t&&t(e.tr.split(u).scrollIntoView()),!0}let r=n.blockRange(),i=r&&ga(r);return i==null?!1:(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)};function ET(e){return(t,n)=>{let{$from:r,$to:i}=t.selection;if(t.selection instanceof re&&t.selection.node.isBlock)return!r.parentOffset||!Ki(t.doc,r.pos)?!1:(n&&n(t.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let u=[],s,a,o=!1,l=!1;for(let p=r.depth;;p--)if(r.node(p).isBlock){o=r.end(p)==r.pos+(r.depth-p),l=r.start(p)==r.pos-(r.depth-p),a=wc(r.node(p-1).contentMatchAt(r.indexAfter(p-1))),u.unshift(o&&a?{type:a}:null),s=p;break}else{if(p==1)return!1;u.unshift(null)}let c=t.tr;(t.selection instanceof ae||t.selection instanceof Tt)&&c.deleteSelection();let d=c.mapping.map(r.pos),f=Ki(c.doc,d,u.length,u);if(f||(u[0]=a?{type:a}:null,f=Ki(c.doc,d,u.length,u)),!f)return!1;if(c.split(d,u.length,u),!o&&l&&r.node(s).type!=a){let p=c.mapping.map(r.before(s)),m=c.doc.resolve(p);a&&r.node(s-1).canReplaceWith(m.index(),m.index()+1,a)&&c.setNodeMarkup(c.mapping.map(r.before(s)),a)}return n&&n(c.scrollIntoView()),!0}}const yT=ET(),TT=(e,t)=>(t&&t(e.tr.setSelection(new Tt(e.doc))),!0);function CT(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,u=t.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&t.parent.canReplace(u-1,u)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(u,u+1)||!(i.isTextblock||ba(e.doc,t.pos))?!1:(n&&n(e.tr.join(t.pos).scrollIntoView()),!0)}function Wm(e,t,n,r){let i=t.nodeBefore,u=t.nodeAfter,s,a,o=i.type.spec.isolating||u.type.spec.isolating;if(!o&&CT(e,t,n))return!0;let l=!o&&t.parent.canReplace(t.index(),t.index()+1);if(l&&(s=(a=i.contentMatchAt(i.childCount)).findWrapping(u.type))&&a.matchType(s[0]||u.type).validEnd){if(n){let p=t.pos+u.nodeSize,m=H.empty;for(let g=s.length-1;g>=0;g--)m=H.from(s[g].create(null,m));m=H.from(i.copy(m));let A=e.tr.step(new Ze(t.pos-1,p,t.pos,p,new z(m,1,0),s.length,!0)),E=A.doc.resolve(p+2*s.length);E.nodeAfter&&E.nodeAfter.type==i.type&&ba(A.doc,E.pos)&&A.join(E.pos),n(A.scrollIntoView())}return!0}let c=u.type.spec.isolating||r>0&&o?null:ue.findFrom(t,1),d=c&&c.$from.blockRange(c.$to),f=d&&ga(d);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(d,f).scrollIntoView()),!0;if(l&&ti(u,"start",!0)&&ti(i,"end")){let p=i,m=[];for(;m.push(p),!p.isTextblock;)p=p.lastChild;let A=u,E=1;for(;!A.isTextblock;A=A.firstChild)E++;if(p.canReplace(p.childCount,p.childCount,A.content)){if(n){let g=H.empty;for(let I=m.length-1;I>=0;I--)g=H.from(m[I].copy(g));let N=e.tr.step(new Ze(t.pos-m.length,t.pos+u.nodeSize,t.pos+E,t.pos+u.nodeSize-E,new z(g,m.length,0),0,!0));n(N.scrollIntoView())}return!0}}return!1}function Km(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,u=i.depth;for(;i.node(u).isInline;){if(!u)return!1;u--}return i.node(u).isTextblock?(n&&n(t.tr.setSelection(ae.create(t.doc,e<0?i.start(u):i.end(u)))),!0):!1}}const xT=Km(-1),kT=Km(1);function Nc(e,t=null){return function(n,r){let{$from:i,$to:u}=n.selection,s=i.blockRange(u),a=s&&xc(s,e,t);return a?(r&&r(n.tr.wrap(s,a).scrollIntoView()),!0):!1}}function uu(e,t=null){return function(n,r){let i=!1;for(let u=0;u<n.selection.ranges.length&&!i;u++){let{$from:{pos:s},$to:{pos:a}}=n.selection.ranges[u];n.doc.nodesBetween(s,a,(o,l)=>{if(i)return!1;if(!(!o.isTextblock||o.hasMarkup(e,t)))if(o.type==e)i=!0;else{let c=n.doc.resolve(l),d=c.index();i=c.parent.canReplaceWith(d,d+1,e)}})}if(!i)return!1;if(r){let u=n.tr;for(let s=0;s<n.selection.ranges.length;s++){let{$from:{pos:a},$to:{pos:o}}=n.selection.ranges[s];u.setBlockType(a,o,e,t)}r(u.scrollIntoView())}return!0}}function IT(e,t,n,r){for(let i=0;i<t.length;i++){let{$from:u,$to:s}=t[i],a=u.depth==0?e.inlineContent&&e.type.allowsMarkType(n):!1;if(e.nodesBetween(u.pos,s.pos,(o,l)=>{if(a)return!1;a=o.inlineContent&&o.type.allowsMarkType(n)}),a)return!0}return!1}function Ta(e,t=null,n){return function(r,i){let{empty:u,$cursor:s,ranges:a}=r.selection;if(u&&!s||!IT(r.doc,a,e))return!1;if(i)if(s)e.isInSet(r.storedMarks||s.marks())?i(r.tr.removeStoredMark(e)):i(r.tr.addStoredMark(e.create(t)));else{let o,l=r.tr;o=!a.some(c=>r.doc.rangeHasMark(c.$from.pos,c.$to.pos,e));for(let c=0;c<a.length;c++){let{$from:d,$to:f}=a[c];if(!o)l.removeMark(d.pos,f.pos,e);else{let p=d.pos,m=f.pos,A=d.nodeAfter,E=f.nodeBefore,g=A&&A.isText?/^\s*/.exec(A.text)[0].length:0,N=E&&E.isText?/\s*$/.exec(E.text)[0].length:0;p+g<m&&(p+=g,m-=N),l.addMark(p,m,e.create(t))}}i(l.scrollIntoView())}return!0}}function li(...e){return function(t,n,r){for(let i=0;i<e.length;i++)if(e[i](t,n,r))return!0;return!1}}let uo=li(Ic,Fm,Hm),ch=li(Ic,hT,pT);const mn={Enter:li(mT,gT,bT,yT),"Mod-Enter":AT,Backspace:uo,"Mod-Backspace":uo,"Shift-Backspace":uo,Delete:ch,"Mod-Delete":ch,"Mod-a":TT},Qm={"Ctrl-h":mn.Backspace,"Alt-Backspace":mn["Mod-Backspace"],"Ctrl-d":mn.Delete,"Ctrl-Alt-Backspace":mn["Mod-Delete"],"Alt-Delete":mn["Mod-Delete"],"Alt-d":mn["Mod-Delete"],"Ctrl-a":xT,"Ctrl-e":kT};for(let e in mn)Qm[e]=mn[e];const ST=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform?os.platform()=="darwin":!1,wT=ST?Qm:mn;class kt{constructor(t,n,r={}){this.match=t,this.match=t,this.handler=typeof n=="string"?NT(n):n,this.undoable=r.undoable!==!1,this.inCode=r.inCode||!1,this.inCodeMark=r.inCodeMark!==!1}}function NT(e){return function(t,n,r,i){let u=e;if(n[1]){let s=n[0].lastIndexOf(n[1]);u+=n[0].slice(s+n[1].length),r+=s;let a=r-i;a>0&&(u=n[0].slice(s-a,s)+u,r=i)}return t.tr.insertText(u,r,i)}}const DT=(e,t)=>{let n=e.plugins;for(let r=0;r<n.length;r++){let i=n[r],u;if(i.spec.isInputRules&&(u=i.getState(e))){if(t){let s=e.tr,a=u.transform;for(let o=a.steps.length-1;o>=0;o--)s.step(a.steps[o].invert(a.docs[o]));if(u.text){let o=s.doc.resolve(u.from).marks();s.replaceWith(u.from,u.to,e.schema.text(u.text,o))}else s.delete(u.from,u.to);t(s)}return!0}}return!1};new kt(/--$/,"—",{inCodeMark:!1});new kt(/\.\.\.$/,"…",{inCodeMark:!1});new kt(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“",{inCodeMark:!1});new kt(/"$/,"”",{inCodeMark:!1});new kt(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘",{inCodeMark:!1});new kt(/'$/,"’",{inCodeMark:!1});function Dc(e,t,n=null,r){return new kt(e,(i,u,s,a)=>{let o=n instanceof Function?n(u):n,l=i.tr.delete(s,a),c=l.doc.resolve(s),d=c.blockRange(),f=d&&xc(d,t,o);if(!f)return null;l.wrap(d,f);let p=l.doc.resolve(s-1).nodeBefore;return p&&p.type==t&&ba(l.doc,s-1)&&(!r||r(u,p))&&l.join(s-1),l})}function Ym(e,t,n=null){return new kt(e,(r,i,u,s)=>{let a=r.doc.resolve(u),o=n instanceof Function?n(i):n;return a.node(-1).canReplaceWith(a.index(-1),a.indexAfter(-1),t)?r.tr.delete(u,s).setBlockType(u,u,t,o):null})}const qn=typeof navigator<"u"?navigator:null,dh=typeof document<"u"?document:null,Zn=qn&&qn.userAgent||"",Sl=/Edge\/(\d+)/.exec(Zn),zm=/MSIE \d/.exec(Zn),wl=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Zn),_c=!!(zm||wl||Sl);zm?document.documentMode:wl?+wl[1]:Sl&&+Sl[1];const _T=!_c&&/gecko\/(\d+)/i.test(Zn);_T&&+(/Firefox\/(\d+)/.exec(Zn)||[0,0])[1];const Nl=!_c&&/Chrome\/(\d+)/.exec(Zn),OT=!!Nl;Nl&&+Nl[1];const RT=!_c&&!!qn&&/Apple Computer/.test(qn.vendor),MT=RT&&(/Mobile\/\w+/.test(Zn)||!!qn&&qn.maxTouchPoints>2);MT||qn&&/Mac/.test(qn.platform);const BT=/Android \d/.test(Zn),LT=!!dh&&"webkitFontSmoothing"in dh.documentElement.style;LT&&+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1];function so(e,t,n,r,i,u){if(e.composing)return!1;const s=e.state,a=s.doc.resolve(t);if(a.parent.type.spec.code)return!1;const o=a.parent.textBetween(Math.max(0,a.parentOffset-500),a.parentOffset,void 0,"")+r;for(let l of i){const c=l,d=c.match.exec(o),f=d&&d[0]&&c.handler(s,d,t-(d[0].length-r.length),n);if(f)return c.undoable!==!1&&f.setMeta(u,{transform:f,from:t,to:n,text:r}),e.dispatch(f),!0}return!1}const vT=new xt("MILKDOWN_CUSTOM_INPUTRULES");function PT({rules:e}){const t=new Ct({key:vT,isInputRules:!0,state:{init(){return null},apply(n,r){const i=n.getMeta(this);return i||(n.selectionSet||n.docChanged?null:r)}},props:{handleTextInput(n,r,i,u){return so(n,r,i,u,e,t)},handleDOMEvents:{compositionend:n=>(setTimeout(()=>{const{$cursor:r}=n.state.selection;r&&so(n,r.pos,r.pos,"",e,t)}),!1),keydown:(n,r)=>!(BT&&OT&&r.key==="Enter")||n.composing?!1:n.someProp("handleKeyDown",i=>i(n,r))?(r.preventDefault(),!0):!1},handleKeyDown(n,r){if(r.key!=="Enter")return!1;const{$cursor:i}=n.state.selection;return i?so(n,i.pos,i.pos,`
|
|
40
|
+
`,e,t):!1}}});return t}function Nu(e,t,n={}){return new kt(e,(r,i,u,s)=>{var a,o,l,c;const{tr:d}=r,f=i.length;let p=i[f-1],m=i[0],A=[],E;const g={group:p,fullMatch:m,start:u,end:s},N=(a=n.updateCaptured)==null?void 0:a.call(n,g);if(Object.assign(g,N),{group:p,fullMatch:m,start:u,end:s}=g,m===null||p?.trim()==="")return null;if(p){const I=m.search(/\S/),R=u+m.indexOf(p),w=R+p.length;A=(o=d.storedMarks)!=null?o:[],w<s&&d.delete(w,s),R>u&&d.delete(u+I,R),E=u+I+p.length;const k=(l=n.getAttr)==null?void 0:l.call(n,i);d.addMark(u,E,t.create(k)),d.setStoredMarks(A),(c=n.beforeDispatch)==null||c.call(n,{match:i,start:u,end:s,tr:d})}return d})}function Gm(e){return Object.assign(Object.create(e),e).setTime(Date.now())}function FT(e,t){return Array.isArray(e)&&e.includes(t.type)||t.type===e}function HT(e){return t=>{for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r)){const i=t.before(n),u=t.after(n);return{from:i,to:u,node:r}}}}}function UT(e,t){return HT(n=>n.type===t)(e)}function WT(e){return t=>{for(let n=t.depth;n>0;n--){const r=t.node(n);if(e(r))return{pos:t.before(n),start:t.start(n),depth:n,node:r}}}}function KT(e,t){if(!(e instanceof re))return;const{node:n,$from:r}=e;if(FT(t,n))return{node:n,pos:r.pos,start:r.start(r.depth),depth:r.depth}}const QT=(e,t)=>{const{selection:n,doc:r}=e;if(n instanceof re)return{hasNode:n.node.type===t,pos:n.from,target:n.node};const{from:i,to:u}=n;let s=!1,a=-1,o=null;return r.nodesBetween(i,u,(l,c)=>o?!1:l.type===t?(s=!0,a=c,o=l,!1):!0),{hasNode:s,pos:a,target:o}};var Jn={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:"'"},Ls={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},YT=typeof navigator<"u"&&/Mac/.test(navigator.platform),zT=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var ze=0;ze<10;ze++)Jn[48+ze]=Jn[96+ze]=String(ze);for(var ze=1;ze<=24;ze++)Jn[ze+111]="F"+ze;for(var ze=65;ze<=90;ze++)Jn[ze]=String.fromCharCode(ze+32),Ls[ze]=String.fromCharCode(ze);for(var ao in Jn)Ls.hasOwnProperty(ao)||(Ls[ao]=Jn[ao]);function GT(e){var t=YT&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||zT&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?Ls:Jn)[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}const VT=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),qT=typeof navigator<"u"&&/Win/.test(navigator.platform);function JT(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let r,i,u,s;for(let a=0;a<t.length-1;a++){let o=t[a];if(/^(cmd|meta|m)$/i.test(o))s=!0;else if(/^a(lt)?$/i.test(o))r=!0;else if(/^(c|ctrl|control)$/i.test(o))i=!0;else if(/^s(hift)?$/i.test(o))u=!0;else if(/^mod$/i.test(o))VT?s=!0:i=!0;else throw new Error("Unrecognized modifier name: "+o)}return r&&(n="Alt-"+n),i&&(n="Ctrl-"+n),s&&(n="Meta-"+n),u&&(n="Shift-"+n),n}function jT(e){let t=Object.create(null);for(let n in e)t[JT(n)]=e[n];return t}function oo(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 ZT(e){return new Ct({props:{handleKeyDown:Vm(e)}})}function Vm(e){let t=jT(e);return function(n,r){let i=GT(r),u,s=t[oo(i,r)];if(s&&s(n.state,n.dispatch,n))return!0;if(i.length==1&&i!=" "){if(r.shiftKey){let a=t[oo(i,r,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(qT&&r.ctrlKey&&r.altKey)&&(u=Jn[r.keyCode])&&u!=i){let a=t[oo(u,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}var qm=class{},Jm=class{constructor(){this.elements=[],this.size=()=>this.elements.length,this.top=()=>this.elements.at(-1),this.push=e=>{this.top()?.push(e)},this.open=e=>{this.elements.push(e)},this.close=()=>{const e=this.elements.pop();if(!e)throw Sp();return e}}},XT=class jm extends qm{constructor(t,n,r){super(),this.type=t,this.content=n,this.attrs=r}push(t,...n){this.content.push(t,...n)}pop(){return this.content.pop()}static create(t,n,r){return new jm(t,n,r)}},zt,Eu,ta,na,ra,yu,Tu,Er,$T=(Er=class extends Jm{constructor(n){super();_e(this,zt,pe.none);_e(this,Eu,n=>n.isText);_e(this,ta,(n,r)=>{if(le(this,Eu).call(this,n)&&le(this,Eu).call(this,r)&&pe.sameSet(n.marks,r.marks))return this.schema.text(n.text+r.text,n.marks)});_e(this,na,n=>{const r=Object.values({...this.schema.nodes,...this.schema.marks}).find(i=>i.spec.parseMarkdown.match(n));if(!r)throw Db(n);return r});_e(this,ra,n=>{const r=le(this,na).call(this,n);r.spec.parseMarkdown.runner(this,n,r)});_e(this,yu,()=>{Pr(this,zt,pe.none);const n=this.close();return le(this,Tu).call(this,n.type,n.attrs,n.content)});_e(this,Tu,(n,r,i)=>{const u=n.createAndFill(r,i,le(this,zt));if(!u)throw Nb(n,r,i);return this.push(u),u});this.injectRoot=(r,i,u)=>(this.openNode(i,u),this.next(r.children),this),this.openNode=(r,i)=>(this.open(XT.create(r,[],i)),this),this.closeNode=()=>{try{le(this,yu).call(this)}catch(r){console.error(r)}return this},this.addNode=(r,i,u)=>{try{le(this,Tu).call(this,r,i,u)}catch(s){console.error(s)}return this},this.openMark=(r,i)=>(Pr(this,zt,r.create(i).addToSet(le(this,zt))),this),this.closeMark=r=>(Pr(this,zt,r.removeFromSet(le(this,zt))),this),this.addText=r=>{try{const i=this.top();if(!i)throw Sp();const u=i.pop(),s=this.schema.text(r,le(this,zt));if(!u)return i.push(s),this;const a=le(this,ta).call(this,u,s);return a?(i.push(a),this):(i.push(u,s),this)}catch(i){return console.error(i),this}},this.build=()=>{let r;do r=le(this,yu).call(this);while(this.size());return r},this.next=(r=[])=>([r].flat().forEach(i=>le(this,ra).call(this,i)),this),this.toDoc=()=>this.build(),this.run=(r,i)=>{const u=r.runSync(r.parse(i),i);return this.next(u),this},this.schema=n}},zt=new WeakMap,Eu=new WeakMap,ta=new WeakMap,na=new WeakMap,ra=new WeakMap,yu=new WeakMap,Tu=new WeakMap,Er.create=(n,r)=>{const i=new Er(n);return u=>(i.run(r,u),i.toDoc())},Er),yr,fh=(yr=class extends qm{constructor(t,n,r,i={}){super(),this.type=t,this.children=n,this.value=r,this.props=i,this.push=(u,...s)=>{this.children||(this.children=[]),this.children.push(u,...s)},this.pop=()=>this.children?.pop()}},yr.create=(t,n,r,i={})=>new yr(t,n,r,i),yr),eC=e=>Object.prototype.hasOwnProperty.call(e,"size"),An,Cu,ia,ua,xu,sa,ku,aa,oa,Xr,dr,la,Iu,Tr,tC=(Tr=class extends Jm{constructor(n){super();_e(this,An,pe.none);_e(this,Cu,n=>{const r=Object.values({...this.schema.nodes,...this.schema.marks}).find(i=>i.spec.toMarkdown.match(n));if(!r)throw _b(n.type);return r});_e(this,ia,n=>le(this,Cu).call(this,n).spec.toMarkdown.runner(this,n));_e(this,ua,(n,r)=>le(this,Cu).call(this,n).spec.toMarkdown.runner(this,n,r));_e(this,xu,n=>{const{marks:r}=n,i=u=>u.type.spec.priority??50;[...r].sort((u,s)=>i(u)-i(s)).every(u=>!le(this,ua).call(this,u,n))&&le(this,ia).call(this,n),r.forEach(u=>le(this,Iu).call(this,u))});_e(this,sa,(n,r)=>{if(n.type===r||n.children?.length!==1)return n;const i=o=>{if(o.type===r)return o.value!=null?null:o;if(o.children?.length!==1)return null;const[l]=o.children;return l?i(l):null},u=i(n);if(!u)return n;const s=u.children?[...u.children]:void 0,a={...n,children:s};return a.children=s,u.children=[a],u});_e(this,ku,n=>{const{children:r}=n;return r&&(n.children=r.reduce((i,u,s)=>{if(s===0)return[u];const a=i.at(-1);if(a&&a.isMark&&u.isMark){u=le(this,sa).call(this,u,a.type);const{children:o,...l}=u,{children:c,...d}=a;if(u.type===a.type&&o&&c&&JSON.stringify(l)===JSON.stringify(d)){const f={...d,children:[...c,...o]};return i.slice(0,-1).concat(le(this,ku).call(this,f))}}return i.concat(u)},[])),n});_e(this,aa,n=>{const r={...n.props,type:n.type};return n.children&&(r.children=n.children),n.value&&(r.value=n.value),r});_e(this,oa,(n,r)=>{let i="",u="";const s=n.children;let a=-1,o=-1;const l=d=>{d&&d.forEach((f,p)=>{f.type==="text"&&f.value&&(a<0&&(a=p),o=p)})};if(s){l(s);const d=s?.[o],f=s?.[a];if(d&&d.value.endsWith(" ")){const p=d.value,m=p.trimEnd();u=p.slice(m.length),d.value=m}if(f&&f.value.startsWith(" ")){const p=f.value,m=p.trimStart();i=p.slice(0,p.length-m.length),f.value=m}}i.length&&le(this,dr).call(this,"text",void 0,i);const c=r();return u.length&&le(this,dr).call(this,"text",void 0,u),c});_e(this,Xr,(n=!1)=>{const r=this.close(),i=()=>le(this,dr).call(this,r.type,r.children,r.value,r.props);return n?le(this,oa).call(this,r,i):i()});_e(this,dr,(n,r,i,u)=>{const s=fh.create(n,r,i,u),a=le(this,ku).call(this,le(this,aa).call(this,s));return this.push(a),a});_e(this,la,(n,r,i,u)=>n.isInSet(le(this,An))?this:(Pr(this,An,n.addToSet(le(this,An))),this.openNode(r,i,{...u,isMark:!0})));_e(this,Iu,n=>{n.isInSet(le(this,An))&&(Pr(this,An,n.type.removeFromSet(le(this,An))),le(this,Xr).call(this,!0))});this.openNode=(r,i,u)=>(this.open(fh.create(r,void 0,i,u)),this),this.closeNode=()=>(le(this,Xr).call(this),this),this.addNode=(r,i,u,s)=>(le(this,dr).call(this,r,i,u,s),this),this.withMark=(r,i,u,s)=>(le(this,la).call(this,r,i,u,s),this),this.closeMark=r=>(le(this,Iu).call(this,r),this),this.build=()=>{let r=null;do r=le(this,Xr).call(this);while(this.size());return r},this.next=r=>eC(r)?(r.forEach(i=>{le(this,xu).call(this,i)}),this):(le(this,xu).call(this,r),this),this.toString=r=>r.stringify(this.build()),this.run=r=>(this.next(r),this),this.schema=n}},An=new WeakMap,Cu=new WeakMap,ia=new WeakMap,ua=new WeakMap,xu=new WeakMap,sa=new WeakMap,ku=new WeakMap,aa=new WeakMap,oa=new WeakMap,Xr=new WeakMap,dr=new WeakMap,la=new WeakMap,Iu=new WeakMap,Tr.create=(n,r)=>{const i=new Tr(n);return u=>(i.run(u),i.toString(r))},Tr);const Ge=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},ni=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let Dl=null;const hn=function(e,t,n){let r=Dl||(Dl=document.createRange());return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},nC=function(){Dl=null},Ir=function(e,t,n,r){return n&&(hh(e,t,n,r,-1)||hh(e,t,n,r,1))},rC=/^(img|br|input|textarea|hr)$/i;function hh(e,t,n,r,i){for(var u;;){if(e==n&&t==r)return!0;if(t==(i<0?0:_t(e))){let s=e.parentNode;if(!s||s.nodeType!=1||Du(e)||rC.test(e.nodeName)||e.contentEditable=="false")return!1;t=Ge(e)+(i<0?0:1),e=s}else if(e.nodeType==1){let s=e.childNodes[t+(i<0?-1:0)];if(s.nodeType==1&&s.contentEditable=="false")if(!((u=s.pmViewDesc)===null||u===void 0)&&u.ignoreForSelection)t+=i;else return!1;else e=s,t=i<0?_t(e):0}else return!1}}function _t(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function iC(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable=="false")return null;e=e.childNodes[t-1],t=_t(e)}else if(e.parentNode&&!Du(e))t=Ge(e),e=e.parentNode;else return null}}function uC(e,t){for(;;){if(e.nodeType==3&&t<e.nodeValue.length)return e;if(e.nodeType==1&&t<e.childNodes.length){if(e.contentEditable=="false")return null;e=e.childNodes[t],t=0}else if(e.parentNode&&!Du(e))t=Ge(e)+1,e=e.parentNode;else return null}}function sC(e,t,n){for(let r=t==0,i=t==_t(e);r||i;){if(e==n)return!0;let u=Ge(e);if(e=e.parentNode,!e)return!1;r=r&&u==0,i=i&&u==_t(e)}}function Du(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)}const Ca=function(e){return e.focusNode&&Ir(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function ar(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function aC(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function oC(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:Math.min(_t(r.offsetNode),r.offset)}}catch{}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:Math.min(_t(r.startContainer),r.startOffset)}}}const Zt=typeof navigator<"u"?navigator:null,ph=typeof document<"u"?document:null,Xn=Zt&&Zt.userAgent||"",_l=/Edge\/(\d+)/.exec(Xn),Zm=/MSIE \d/.exec(Xn),Ol=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Xn),ft=!!(Zm||Ol||_l),Yn=Zm?document.documentMode:Ol?+Ol[1]:_l?+_l[1]:0,Ot=!ft&&/gecko\/(\d+)/i.test(Xn);Ot&&+(/Firefox\/(\d+)/.exec(Xn)||[0,0])[1];const Rl=!ft&&/Chrome\/(\d+)/.exec(Xn),Ve=!!Rl,Xm=Rl?+Rl[1]:0,Xe=!ft&&!!Zt&&/Apple Computer/.test(Zt.vendor),ri=Xe&&(/Mobile\/\w+/.test(Xn)||!!Zt&&Zt.maxTouchPoints>2),wt=ri||(Zt?/Mac/.test(Zt.platform):!1),$m=Zt?/Win/.test(Zt.platform):!1,En=/Android \d/.test(Xn),_u=!!ph&&"webkitFontSmoothing"in ph.documentElement.style,lC=_u?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function cC(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 cn(e,t){return typeof e=="number"?e:e[t]}function dC(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function mh(e,t,n){let r=e.someProp("scrollThreshold")||0,i=e.someProp("scrollMargin")||5,u=e.dom.ownerDocument;for(let s=n||e.dom;s;){if(s.nodeType!=1){s=ni(s);continue}let a=s,o=a==u.body,l=o?cC(u):dC(a),c=0,d=0;if(t.top<l.top+cn(r,"top")?d=-(l.top-t.top+cn(i,"top")):t.bottom>l.bottom-cn(r,"bottom")&&(d=t.bottom-t.top>l.bottom-l.top?t.top+cn(i,"top")-l.top:t.bottom-l.bottom+cn(i,"bottom")),t.left<l.left+cn(r,"left")?c=-(l.left-t.left+cn(i,"left")):t.right>l.right-cn(r,"right")&&(c=t.right-l.right+cn(i,"right")),c||d)if(o)u.defaultView.scrollBy(c,d);else{let p=a.scrollLeft,m=a.scrollTop;d&&(a.scrollTop+=d),c&&(a.scrollLeft+=c);let A=a.scrollLeft-p,E=a.scrollTop-m;t={left:t.left-A,top:t.top-E,right:t.right-A,bottom:t.bottom-E}}let f=o?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(f))break;s=f=="absolute"?s.offsetParent:ni(s)}}function fC(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,i;for(let u=(t.left+t.right)/2,s=n+1;s<Math.min(innerHeight,t.bottom);s+=5){let a=e.root.elementFromPoint(u,s);if(!a||a==e.dom||!e.dom.contains(a))continue;let o=a.getBoundingClientRect();if(o.top>=n-20){r=a,i=o.top;break}}return{refDOM:r,refTop:i,stack:eA(e.dom)}}function eA(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=ni(r));return t}function hC({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;tA(n,r==0?0:r-t)}function tA(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:i,left:u}=e[n];r.scrollTop!=i+t&&(r.scrollTop=i+t),r.scrollLeft!=u&&(r.scrollLeft=u)}}let Fr=null;function pC(e){if(e.setActive)return e.setActive();if(Fr)return e.focus(Fr);let t=eA(e);e.focus(Fr==null?{get preventScroll(){return Fr={preventScroll:!0},!0}}:void 0),Fr||(Fr=!1,tA(t,0))}function nA(e,t){let n,r=2e8,i,u=0,s=t.top,a=t.top,o,l;for(let c=e.firstChild,d=0;c;c=c.nextSibling,d++){let f;if(c.nodeType==1)f=c.getClientRects();else if(c.nodeType==3)f=hn(c).getClientRects();else continue;for(let p=0;p<f.length;p++){let m=f[p];if(m.top<=s&&m.bottom>=a){s=Math.max(m.bottom,s),a=Math.min(m.top,a);let A=m.left>t.left?m.left-t.left:m.right<t.left?t.left-m.right:0;if(A<r){n=c,r=A,i=A&&n.nodeType==3?{left:m.right<t.left?m.right:m.left,top:t.top}:t,c.nodeType==1&&A&&(u=d+(t.left>=(m.left+m.right)/2?1:0));continue}}else m.top>t.top&&!o&&m.left<=t.left&&m.right>=t.left&&(o=c,l={left:Math.max(m.left,Math.min(m.right,t.left)),top:m.top});!n&&(t.left>=m.right&&t.top>=m.top||t.left>=m.left&&t.top>=m.bottom)&&(u=d+1)}}return!n&&o&&(n=o,i=l,r=0),n&&n.nodeType==3?mC(n,i):!n||r&&n.nodeType==1?{node:e,offset:u}:nA(n,i)}function mC(e,t){let n=e.nodeValue.length,r=document.createRange(),i;for(let u=0;u<n;u++){r.setEnd(e,u+1),r.setStart(e,u);let s=On(r,1);if(s.top!=s.bottom&&Oc(t,s)){i={node:e,offset:u+(t.left>=(s.left+s.right)/2?1:0)};break}}return r.detach(),i||{node:e,offset:0}}function Oc(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function AC(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}function gC(e,t,n){let{node:r,offset:i}=nA(t,n),u=-1;if(r.nodeType==1&&!r.firstChild){let s=r.getBoundingClientRect();u=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(r,i,u)}function bC(e,t,n,r){let i=-1;for(let u=t,s=!1;u!=e.dom;){let a=e.docView.nearestDesc(u,!0),o;if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)&&((o=a.dom.getBoundingClientRect()).width||o.height)&&(a.node.isBlock&&a.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(a.dom.nodeName)&&(!s&&o.left>r.left||o.top>r.top?i=a.posBefore:(!s&&o.right<r.left||o.bottom<r.top)&&(i=a.posAfter),s=!0),!a.contentDOM&&i<0&&!a.node.isText))return(a.node.isBlock?r.top<(o.top+o.bottom)/2:r.left<(o.left+o.right)/2)?a.posBefore:a.posAfter;u=a.dom.parentNode}return i>-1?i:e.docView.posFromDOM(t,n,-1)}function rA(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),u=i;;){let s=e.childNodes[u];if(s.nodeType==1){let a=s.getClientRects();for(let o=0;o<a.length;o++){let l=a[o];if(Oc(t,l))return rA(s,t,l)}}if((u=(u+1)%r)==i)break}return e}function EC(e,t){let n=e.dom.ownerDocument,r,i=0,u=oC(n,t.left,t.top);u&&({node:r,offset:i}=u);let s=(e.root.elementFromPoint?e.root:n).elementFromPoint(t.left,t.top),a;if(!s||!e.dom.contains(s.nodeType!=1?s.parentNode:s)){let l=e.dom.getBoundingClientRect();if(!Oc(t,l)||(s=rA(e.dom,t,l),!s))return null}if(Xe)for(let l=s;r&&l;l=ni(l))l.draggable&&(r=void 0);if(s=AC(s,t),r){if(Ot&&r.nodeType==1&&(i=Math.min(i,r.childNodes.length),i<r.childNodes.length)){let c=r.childNodes[i],d;c.nodeName=="IMG"&&(d=c.getBoundingClientRect()).right<=t.left&&d.bottom>t.top&&i++}let l;_u&&i&&r.nodeType==1&&(l=r.childNodes[i-1]).nodeType==1&&l.contentEditable=="false"&&l.getBoundingClientRect().top>=t.top&&i--,r==e.dom&&i==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?a=e.state.doc.content.size:(i==0||r.nodeType!=1||r.childNodes[i-1].nodeName!="BR")&&(a=bC(e,r,i,t))}a==null&&(a=gC(e,s,t));let o=e.docView.nearestDesc(s,!0);return{pos:a,inside:o?o.posAtStart-o.border:-1}}function Ah(e){return e.top<e.bottom||e.left<e.right}function On(e,t){let n=e.getClientRects();if(n.length){let r=n[t<0?0:n.length-1];if(Ah(r))return r}return Array.prototype.find.call(n,Ah)||e.getBoundingClientRect()}const yC=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function iA(e,t,n){let{node:r,offset:i,atom:u}=e.docView.domFromPos(t,n<0?-1:1),s=_u||Ot;if(r.nodeType==3)if(s&&(yC.test(r.nodeValue)||(n<0?!i:i==r.nodeValue.length))){let o=On(hn(r,i,i),n);if(Ot&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let l=On(hn(r,i-1,i-1),-1);if(l.top==o.top){let c=On(hn(r,i,i+1),-1);if(c.top!=o.top)return ki(c,c.left<l.left)}}return o}else{let o=i,l=i,c=n<0?1:-1;return n<0&&!i?(l++,c=-1):n>=0&&i==r.nodeValue.length?(o--,c=1):n<0?o--:l++,ki(On(hn(r,o,l),c),c<0)}if(!e.state.doc.resolve(t-(u||0)).parent.inlineContent){if(u==null&&i&&(n<0||i==_t(r))){let o=r.childNodes[i-1];if(o.nodeType==1)return lo(o.getBoundingClientRect(),!1)}if(u==null&&i<_t(r)){let o=r.childNodes[i];if(o.nodeType==1)return lo(o.getBoundingClientRect(),!0)}return lo(r.getBoundingClientRect(),n>=0)}if(u==null&&i&&(n<0||i==_t(r))){let o=r.childNodes[i-1],l=o.nodeType==3?hn(o,_t(o)-(s?0:1)):o.nodeType==1&&(o.nodeName!="BR"||!o.nextSibling)?o:null;if(l)return ki(On(l,1),!1)}if(u==null&&i<_t(r)){let o=r.childNodes[i];for(;o.pmViewDesc&&o.pmViewDesc.ignoreForCoords;)o=o.nextSibling;let l=o?o.nodeType==3?hn(o,0,s?0:1):o.nodeType==1?o:null:null;if(l)return ki(On(l,-1),!0)}return ki(On(r.nodeType==3?hn(r):r,-n),n>=0)}function ki(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 lo(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 uA(e,t,n){let r=e.state,i=e.root.activeElement;r!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),i!=e.dom&&i&&i.focus()}}function TC(e,t,n){let r=t.selection,i=n=="up"?r.$from:r.$to;return uA(e,t,()=>{let{node:u}=e.docView.domFromPos(i.pos,n=="up"?-1:1);for(;;){let a=e.docView.nearestDesc(u,!0);if(!a)break;if(a.node.isBlock){u=a.contentDOM||a.dom;break}u=a.dom.parentNode}let s=iA(e,i.pos,1);for(let a=u.firstChild;a;a=a.nextSibling){let o;if(a.nodeType==1)o=a.getClientRects();else if(a.nodeType==3)o=hn(a,0,a.nodeValue.length).getClientRects();else continue;for(let l=0;l<o.length;l++){let c=o[l];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})}const CC=/[\u0590-\u08ac]/;function xC(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,u=!i,s=i==r.parent.content.size,a=e.domSelection();return a?!CC.test(r.parent.textContent)||!a.modify?n=="left"||n=="backward"?u:s:uA(e,t,()=>{let{focusNode:o,focusOffset:l,anchorNode:c,anchorOffset:d}=e.domSelectionRange(),f=a.caretBidiLevel;a.modify("move",n,"character");let p=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:m,focusOffset:A}=e.domSelectionRange(),E=m&&!p.contains(m.nodeType==1?m:m.parentNode)||o==m&&l==A;try{a.collapse(c,d),o&&(o!=c||l!=d)&&a.extend&&a.extend(o,l)}catch{}return f!=null&&(a.caretBidiLevel=f),E}):r.pos==r.start()||r.pos==r.end()}let gh=null,bh=null,Eh=!1;function kC(e,t,n){return gh==t&&bh==n?Eh:(gh=t,bh=n,Eh=n=="up"||n=="down"?TC(e,t,n):xC(e,t,n))}const Rt=0,yh=1,lr=2,Xt=3;class Ou{constructor(t,n,r,i){this.parent=t,this.children=n,this.dom=r,this.contentDOM=i,this.dirty=Rt,r.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,n,r){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let n=0;n<this.children.length;n++)t+=this.children[n].size;return t}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let t=0;t<this.children.length;t++)this.children[t].destroy()}posBeforeChild(t){for(let n=0,r=this.posAtStart;;n++){let i=this.children[n];if(i==t)return r;r+=i.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,r){if(this.contentDOM&&this.contentDOM.contains(t.nodeType==1?t:t.parentNode))if(r<0){let u,s;if(t==this.contentDOM)u=t.childNodes[n-1];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;u=t.previousSibling}for(;u&&!((s=u.pmViewDesc)&&s.parent==this);)u=u.previousSibling;return u?this.posBeforeChild(s)+s.size:this.posAtStart}else{let u,s;if(t==this.contentDOM)u=t.childNodes[n];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;u=t.nextSibling}for(;u&&!((s=u.pmViewDesc)&&s.parent==this);)u=u.nextSibling;return u?this.posBeforeChild(s):this.posAtEnd}let i;if(t==this.dom&&this.contentDOM)i=n>Ge(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let u=t;;u=u.parentNode){if(u==this.dom){i=!1;break}if(u.previousSibling)break}if(i==null&&n==t.childNodes.length)for(let u=t;;u=u.parentNode){if(u==this.dom){i=!0;break}if(u.nextSibling)break}}return i??r>0?this.posAtEnd:this.posAtStart}nearestDesc(t,n=!1){for(let r=!0,i=t;i;i=i.parentNode){let u=this.getDesc(i),s;if(u&&(!n||u.node))if(r&&(s=u.nodeDOM)&&!(s.nodeType==1?s.contains(t.nodeType==1?t:t.parentNode):s==t))r=!1;else return u}}getDesc(t){let n=t.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(t,n,r){for(let i=t;i;i=i.parentNode){let u=this.getDesc(i);if(u)return u.localPosFromDOM(t,n,r)}return-1}descAt(t){for(let n=0,r=0;n<this.children.length;n++){let i=this.children[n],u=r+i.size;if(r==t&&u!=r){for(;!i.border&&i.children.length;)for(let s=0;s<i.children.length;s++){let a=i.children[s];if(a.size){i=a;break}}return i}if(t<u)return i.descAt(t-r-i.border);r=u}}domFromPos(t,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:t+1};let r=0,i=0;for(let u=0;r<this.children.length;r++){let s=this.children[r],a=u+s.size;if(a>t||s instanceof aA){i=t-u;break}u=a}if(i)return this.children[r].domFromPos(i-this.children[r].border,n);for(let u;r&&!(u=this.children[r-1]).size&&u instanceof sA&&u.side>=0;r--);if(n<=0){let u,s=!0;for(;u=r?this.children[r-1]:null,!(!u||u.dom.parentNode==this.contentDOM);r--,s=!1);return u&&n&&s&&!u.border&&!u.domAtom?u.domFromPos(u.size,n):{node:this.contentDOM,offset:u?Ge(u.dom)+1:0}}else{let u,s=!0;for(;u=r<this.children.length?this.children[r]:null,!(!u||u.dom.parentNode==this.contentDOM);r++,s=!1);return u&&s&&!u.border&&!u.domAtom?u.domFromPos(0,n):{node:this.contentDOM,offset:u?Ge(u.dom):this.contentDOM.childNodes.length}}}parseRange(t,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:t,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let i=-1,u=-1;for(let s=r,a=0;;a++){let o=this.children[a],l=s+o.size;if(i==-1&&t<=l){let c=s+o.border;if(t>=c&&n<=l-o.border&&o.node&&o.contentDOM&&this.contentDOM.contains(o.contentDOM))return o.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)){i=Ge(f.dom)+1;break}t-=f.size}i==-1&&(i=0)}if(i>-1&&(l>n||a==this.children.length-1)){n=l;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)){u=Ge(d.dom);break}n+=d.size}u==-1&&(u=this.contentDOM.childNodes.length);break}s=l}return{node:this.contentDOM,from:t,to:n,fromOffset:i,toOffset:u}}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:r}=this.domFromPos(t,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+t);return n.childNodes[r]}setSelection(t,n,r,i=!1){let u=Math.min(t,n),s=Math.max(t,n);for(let p=0,m=0;p<this.children.length;p++){let A=this.children[p],E=m+A.size;if(u>m&&s<E)return A.setSelection(t-m-A.border,n-m-A.border,r,i);m=E}let a=this.domFromPos(t,t?-1:1),o=n==t?a:this.domFromPos(n,n?-1:1),l=r.root.getSelection(),c=r.domSelectionRange(),d=!1;if((Ot||Xe)&&t==n){let{node:p,offset:m}=a;if(p.nodeType==3){if(d=!!(m&&p.nodeValue[m-1]==`
|
|
41
|
+
`),d&&m==p.nodeValue.length)for(let A=p,E;A;A=A.parentNode){if(E=A.nextSibling){E.nodeName=="BR"&&(a=o={node:E.parentNode,offset:Ge(E)+1});break}let g=A.pmViewDesc;if(g&&g.node&&g.node.isBlock)break}}else{let A=p.childNodes[m-1];d=A&&(A.nodeName=="BR"||A.contentEditable=="false")}}if(Ot&&c.focusNode&&c.focusNode!=o.node&&c.focusNode.nodeType==1){let p=c.focusNode.childNodes[c.focusOffset];p&&p.contentEditable=="false"&&(i=!0)}if(!(i||d&&Xe)&&Ir(a.node,a.offset,c.anchorNode,c.anchorOffset)&&Ir(o.node,o.offset,c.focusNode,c.focusOffset))return;let f=!1;if((l.extend||t==n)&&!(d&&Ot)){l.collapse(a.node,a.offset);try{t!=n&&l.extend(o.node,o.offset),f=!0}catch{}}if(!f){if(t>n){let m=a;a=o,o=m}let p=document.createRange();p.setEnd(o.node,o.offset),p.setStart(a.node,a.offset),l.removeAllRanges(),l.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 r=0,i=0;i<this.children.length;i++){let u=this.children[i],s=r+u.size;if(r==s?t<=s&&n>=r:t<s&&n>r){let a=r+u.border,o=s-u.border;if(t>=a&&n<=o){this.dirty=t==r||n==s?lr:yh,t==a&&n==o&&(u.contentLost||u.dom.parentNode!=this.contentDOM)?u.dirty=Xt:u.markDirty(t-a,n-a);return}else u.dirty=u.dom==u.contentDOM&&u.dom.parentNode==this.contentDOM&&!u.children.length?lr:Xt}r=s}this.dirty=lr}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?lr:yh;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(t){return!1}}class sA extends Ou{constructor(t,n,r,i){let u,s=n.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>{if(!u)return i;if(u.parent)return u.parent.posBeforeChild(u)})),!n.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(t,[],s,null),this.widget=n,this.widget=n,u=this}matchesWidget(t){return this.dirty==Rt&&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}}class IC extends Ou{constructor(t,n,r,i){super(t,[],n,null),this.textDOM=r,this.text=i}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}}class Sr extends Ou{constructor(t,n,r,i,u){super(t,[],r,i),this.mark=n,this.spec=u}static create(t,n,r,i){let u=i.nodeViews[n.type.name],s=u&&u(n,i,r);return(!s||!s.dom)&&(s=Or.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new Sr(t,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&Xt||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=Xt&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=Rt){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=Rt}}slice(t,n,r){let i=Sr.create(this.parent,this.mark,!0,r),u=this.children,s=this.size;n<s&&(u=Bl(u,n,s,r)),t>0&&(u=Bl(u,0,t,r));for(let a=0;a<u.length;a++)u[a].parent=i;return i.children=u,i}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class zn extends Ou{constructor(t,n,r,i,u,s,a,o,l){super(t,[],u,s),this.node=n,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=a}static create(t,n,r,i,u,s){let a=u.nodeViews[n.type.name],o,l=a&&a(n,u,()=>{if(!o)return s;if(o.parent)return o.parent.posBeforeChild(o)},r,i),c=l&&l.dom,d=l&&l.contentDOM;if(n.isText){if(!c)c=document.createTextNode(n.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:d}=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=cA(c,r,n),l?o=new SC(t,n,r,i,c,d||null,f,l,u,s+1):n.isText?new xa(t,n,r,i,c,f,u):new zn(t,n,r,i,c,d||null,f,u,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>H.empty)}return t}matchesNode(t,n,r){return this.dirty==Rt&&t.eq(this.node)&&vs(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let r=this.node.inlineContent,i=n,u=t.composing?this.localCompositionInfo(t,n):null,s=u&&u.pos>-1?u:null,a=u&&u.pos<0,o=new NC(this,s&&s.node,t);OC(this.node,this.innerDeco,(l,c,d)=>{l.spec.marks?o.syncToMarks(l.spec.marks,r,t,c):l.type.side>=0&&!d&&o.syncToMarks(c==this.node.childCount?pe.none:this.node.child(c).marks,r,t,c),o.placeWidget(l,t,i)},(l,c,d,f)=>{o.syncToMarks(l.marks,r,t,f);let p;o.findNodeMatch(l,c,d,f)||a&&t.state.selection.from>i&&t.state.selection.to<i+l.nodeSize&&(p=o.findIndexWithChild(u.node))>-1&&o.updateNodeAt(l,c,d,p,t)||o.updateNextNode(l,c,d,t,f,i)||o.addNode(l,c,d,t,i),i+=l.nodeSize}),o.syncToMarks([],r,t,0),this.node.isTextblock&&o.addTextblockHacks(),o.destroyRest(),(o.changed||this.dirty==lr)&&(s&&this.protectLocalComposition(t,s),oA(this.contentDOM,this.children,t),ri&&RC(this.dom))}localCompositionInfo(t,n){let{from:r,to:i}=t.state.selection;if(!(t.state.selection instanceof ae)||r<n||i>n+this.node.content.size)return null;let u=t.input.compositionNode;if(!u||!this.dom.contains(u.parentNode))return null;if(this.node.inlineContent){let s=u.nodeValue,a=MC(this.node.content,s,r-n,i-n);return a<0?null:{node:u,pos:a,text:s}}else return{node:u,pos:-1,text:""}}protectLocalComposition(t,{node:n,pos:r,text:i}){if(this.getDesc(n))return;let u=n;for(;u.parentNode!=this.contentDOM;u=u.parentNode){for(;u.previousSibling;)u.parentNode.removeChild(u.previousSibling);for(;u.nextSibling;)u.parentNode.removeChild(u.nextSibling);u.pmViewDesc&&(u.pmViewDesc=void 0)}let s=new IC(this,u,n,i);t.input.compositionNodes.push(s),this.children=Bl(this.children,r,r+i.length,t,s)}update(t,n,r,i){return this.dirty==Xt||!t.sameMarkup(this.node)?!1:(this.updateInner(t,n,r,i),!0)}updateInner(t,n,r,i){this.updateOuterDeco(n),this.node=t,this.innerDeco=r,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=Rt}updateOuterDeco(t){if(vs(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=lA(this.dom,this.nodeDOM,Ml(this.outerDeco,this.node,n),Ml(t,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function Th(e,t,n,r,i){cA(r,t,e);let u=new zn(void 0,e,t,n,r,r,r,i,0);return u.contentDOM&&u.updateChildren(i,0),u}class xa extends zn{constructor(t,n,r,i,u,s,a){super(t,n,r,i,u,null,s,a,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,n,r,i){return this.dirty==Xt||this.dirty!=Rt&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Rt||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=t,this.dirty=Rt,!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,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(t,n,r)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,n,r){let i=this.node.cut(t,n),u=document.createTextNode(i.text);return new xa(this.parent,i,this.outerDeco,this.innerDeco,u,u,r)}markDirty(t,n){super.markDirty(t,n),this.dom!=this.nodeDOM&&(t==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=Xt)}get domAtom(){return!1}isText(t){return this.node.text==t}}class aA extends Ou{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==Rt&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class SC extends zn{constructor(t,n,r,i,u,s,a,o,l,c){super(t,n,r,i,u,s,a,l,c),this.spec=o}update(t,n,r,i){if(this.dirty==Xt)return!1;if(this.spec.update&&(this.node.type==t.type||this.spec.multiType)){let u=this.spec.update(t,n,r);return u&&this.updateInner(t,n,r,i),u}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,n,r,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,n,r,i){this.spec.setSelection?this.spec.setSelection(t,n,r.root):super.setSelection(t,n,r,i)}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 oA(e,t,n){let r=e.firstChild,i=!1;for(let u=0;u<t.length;u++){let s=t[u],a=s.dom;if(a.parentNode==e){for(;a!=r;)r=Ch(r),i=!0;r=r.nextSibling}else i=!0,e.insertBefore(a,r);if(s instanceof Sr){let o=r?r.previousSibling:e.lastChild;oA(s.contentDOM,s.children,n),r=o?o.nextSibling:e.firstChild}}for(;r;)r=Ch(r),i=!0;i&&n.trackWrites==e&&(n.trackWrites=null)}const Qi=function(e){e&&(this.nodeName=e)};Qi.prototype=Object.create(null);const cr=[new Qi];function Ml(e,t,n){if(e.length==0)return cr;let r=n?cr[0]:new Qi,i=[r];for(let u=0;u<e.length;u++){let s=e[u].type.attrs;if(s){s.nodeName&&i.push(r=new Qi(s.nodeName));for(let a in s){let o=s[a];o!=null&&(n&&i.length==1&&i.push(r=new Qi(t.isInline?"span":"div")),a=="class"?r.class=(r.class?r.class+" ":"")+o:a=="style"?r.style=(r.style?r.style+";":"")+o:a!="nodeName"&&(r[a]=o))}}}return i}function lA(e,t,n,r){if(n==cr&&r==cr)return t;let i=t;for(let u=0;u<r.length;u++){let s=r[u],a=n[u];if(u){let o;a&&a.nodeName==s.nodeName&&i!=e&&(o=i.parentNode)&&o.nodeName.toLowerCase()==s.nodeName||(o=document.createElement(s.nodeName),o.pmIsDeco=!0,o.appendChild(i),a=cr[0]),i=o}wC(i,a||cr[0],s)}return i}function wC(e,t,n){for(let r in t)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&e.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let u=0;u<r.length;u++)i.indexOf(r[u])==-1&&e.classList.remove(r[u]);for(let u=0;u<i.length;u++)r.indexOf(i[u])==-1&&e.classList.add(i[u]);e.classList.length==0&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,i;for(;i=r.exec(t.style);)e.style.removeProperty(i[1])}n.style&&(e.style.cssText+=n.style)}}function cA(e,t,n){return lA(e,e,cr,Ml(t,n,e.nodeType!=1))}function vs(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 Ch(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class NC{constructor(t,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=DC(t.node.content,t)}destroyBetween(t,n){if(t!=n){for(let r=t;r<n;r++)this.top.children[r].destroy();this.top.children.splice(t,n-t),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(t,n,r,i){let u=0,s=this.stack.length>>1,a=Math.min(s,t.length);for(;u<a&&(u==s-1?this.top:this.stack[u+1<<1]).matchesMark(t[u])&&t[u].type.spec.spanning!==!1;)u++;for(;u<s;)this.destroyRest(),this.top.dirty=Rt,this.index=this.stack.pop(),this.top=this.stack.pop(),s--;for(;s<t.length;){this.stack.push(this.top,this.index+1);let o=-1,l=this.top.children.length;i<this.preMatch.index&&(l=Math.min(this.index+3,l));for(let c=this.index;c<l;c++){let d=this.top.children[c];if(d.matchesMark(t[s])&&!this.isLocked(d.dom)){o=c;break}}if(o>-1)o>this.index&&(this.changed=!0,this.destroyBetween(this.index,o)),this.top=this.top.children[this.index];else{let c=Sr.create(this.top,t[s],n,r);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,s++}}findNodeMatch(t,n,r,i){let u=-1,s;if(i>=this.preMatch.index&&(s=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&s.matchesNode(t,n,r))u=this.top.children.indexOf(s,this.index);else for(let a=this.index,o=Math.min(this.top.children.length,a+5);a<o;a++){let l=this.top.children[a];if(l.matchesNode(t,n,r)&&!this.preMatch.matched.has(l)){u=a;break}}return u<0?!1:(this.destroyBetween(this.index,u),this.index++,!0)}updateNodeAt(t,n,r,i,u){let s=this.top.children[i];return s.dirty==Xt&&s.dom==s.contentDOM&&(s.dirty=lr),s.update(t,n,r,u)?(this.destroyBetween(this.index,i),this.index++,!0):!1}findIndexWithChild(t){for(;;){let n=t.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=t.pmViewDesc;if(r){for(let i=this.index;i<this.top.children.length;i++)if(this.top.children[i]==r)return i}return-1}t=n}}updateNextNode(t,n,r,i,u,s){for(let a=this.index;a<this.top.children.length;a++){let o=this.top.children[a];if(o instanceof zn){let l=this.preMatch.matched.get(o);if(l!=null&&l!=u)return!1;let c=o.dom,d,f=this.isLocked(c)&&!(t.isText&&o.node&&o.node.isText&&o.nodeDOM.nodeValue==t.text&&o.dirty!=Xt&&vs(n,o.outerDeco));if(!f&&o.update(t,n,r,i))return this.destroyBetween(this.index,a),o.dom!=c&&(this.changed=!0),this.index++,!0;if(!f&&(d=this.recreateWrapper(o,t,n,r,i,s)))return this.destroyBetween(this.index,a),this.top.children[this.index]=d,d.contentDOM&&(d.dirty=lr,d.updateChildren(i,s+1),d.dirty=Rt),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(t,n,r,i,u,s){if(t.dirty||n.isAtom||!t.children.length||!t.node.content.eq(n.content)||!vs(r,t.outerDeco)||!i.eq(t.innerDeco))return null;let a=zn.create(this.top,n,r,i,u,s);if(a.contentDOM){a.children=t.children,t.children=[];for(let o of a.children)o.parent=a}return t.destroy(),a}addNode(t,n,r,i,u){let s=zn.create(this.top,t,n,r,i,u);s.contentDOM&&s.updateChildren(i,u+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(t,n,r){let i=this.index<this.top.children.length?this.top.children[this.index]:null;if(i&&i.matchesWidget(t)&&(t==i.widget||!i.widget.type.toDOM.parentNode))this.index++;else{let u=new sA(this.top,t,n,r);this.top.children.splice(this.index++,0,u),this.changed=!0}}addTextblockHacks(){let t=this.top.children[this.index-1],n=this.top;for(;t instanceof Sr;)n=t,t=n.children[n.children.length-1];(!t||!(t instanceof xa)||/\n$/.test(t.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(t.node.text))&&((Xe||Ve)&&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 r=document.createElement(t);t=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),t=="BR"&&(r.className="ProseMirror-trailingBreak");let i=new aA(this.top,[],r,null);n!=this.top?n.children.push(i):n.children.splice(this.index++,0,i),this.changed=!0}}isLocked(t){return this.lock&&(t==this.lock||t.nodeType==1&&t.contains(this.lock.parentNode))}}function DC(e,t){let n=t,r=n.children.length,i=e.childCount,u=new Map,s=[];e:for(;i>0;){let a;for(;;)if(r){let l=n.children[r-1];if(l instanceof Sr)n=l,r=l.children.length;else{a=l,r--;break}}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let o=a.node;if(o){if(o!=e.child(i-1))break;--i,u.set(a,i),s.push(a)}}return{index:i,matched:u,matches:s.reverse()}}function _C(e,t){return e.type.side-t.type.side}function OC(e,t,n,r){let i=t.locals(e),u=0;if(i.length==0){for(let l=0;l<e.childCount;l++){let c=e.child(l);r(c,i,t.forChild(u,c),l),u+=c.nodeSize}return}let s=0,a=[],o=null;for(let l=0;;){let c,d;for(;s<i.length&&i[s].to==u;){let E=i[s++];E.widget&&(c?(d||(d=[c])).push(E):c=E)}if(c)if(d){d.sort(_C);for(let E=0;E<d.length;E++)n(d[E],l,!!o)}else n(c,l,!!o);let f,p;if(o)p=-1,f=o,o=null;else if(l<e.childCount)p=l,f=e.child(l++);else break;for(let E=0;E<a.length;E++)a[E].to<=u&&a.splice(E--,1);for(;s<i.length&&i[s].from<=u&&i[s].to>u;)a.push(i[s++]);let m=u+f.nodeSize;if(f.isText){let E=m;s<i.length&&i[s].from<E&&(E=i[s].from);for(let g=0;g<a.length;g++)a[g].to<E&&(E=a[g].to);E<m&&(o=f.cut(E-u),f=f.cut(0,E-u),m=E,p=-1)}else for(;s<i.length&&i[s].to<m;)s++;let A=f.isInline&&!f.isLeaf?a.filter(E=>!E.inline):a.slice();r(f,A,t.forChild(u,f),p),u=m}}function RC(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 MC(e,t,n,r){for(let i=0,u=0;i<e.childCount&&u<=r;){let s=e.child(i++),a=u;if(u+=s.nodeSize,!s.isText)continue;let o=s.text;for(;i<e.childCount;){let l=e.child(i++);if(u+=l.nodeSize,!l.isText)break;o+=l.text}if(u>=n){if(u>=r&&o.slice(r-t.length-a,r-a)==t)return r-t.length;let l=a<r?o.lastIndexOf(t,r-a-1):-1;if(l>=0&&l+t.length+a>=n)return a+l;if(n==r&&o.length>=r+t.length-a&&o.slice(r-a,r-a+t.length)==t)return r}}return-1}function Bl(e,t,n,r,i){let u=[];for(let s=0,a=0;s<e.length;s++){let o=e[s],l=a,c=a+=o.size;l>=n||c<=t?u.push(o):(l<t&&u.push(o.slice(0,t-l,r)),i&&(u.push(i),i=void 0),c>n&&u.push(o.slice(n-l,o.size,r)))}return u}function Rc(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),u=i&&i.size==0,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a=r.resolve(s),o,l;if(Ca(n)){for(o=s;i&&!i.node;)i=i.parent;let d=i.node;if(i&&d.isAtom&&re.isSelectable(d)&&i.parent&&!(d.isInline&&sC(n.focusNode,n.focusOffset,i.dom))){let f=i.posBefore;l=new re(s==f?a:r.resolve(f))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let d=s,f=s;for(let p=0;p<n.rangeCount;p++){let m=n.getRangeAt(p);d=Math.min(d,e.docView.posFromDOM(m.startContainer,m.startOffset,1)),f=Math.max(f,e.docView.posFromDOM(m.endContainer,m.endOffset,-1))}if(d<0)return null;[o,s]=f==e.state.selection.anchor?[f,d]:[d,f],a=r.resolve(s)}else o=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(o<0)return null}let c=r.resolve(o);if(!l){let d=t=="pointer"||e.state.selection.head<a.pos&&!u?1:-1;l=Mc(e,c,a,d)}return l}function dA(e){return e.editable?e.hasFocus():hA(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Tn(e,t=!1){let n=e.state.selection;if(fA(e,n),!!dA(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&Ve){let r=e.domSelectionRange(),i=e.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&Ir(r.anchorNode,r.anchorOffset,i.anchorNode,i.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)LC(e);else{let{anchor:r,head:i}=n,u,s;xh&&!(n instanceof ae)&&(n.$from.parent.inlineContent||(u=kh(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(s=kh(e,n.to))),e.docView.setSelection(r,i,e,t),xh&&(u&&Ih(u),s&&Ih(s)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&BC(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const xh=Xe||Ve&&Xm<63;function kh(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),i=r<n.childNodes.length?n.childNodes[r]:null,u=r?n.childNodes[r-1]:null;if(Xe&&i&&i.contentEditable=="false")return co(i);if((!i||i.contentEditable=="false")&&(!u||u.contentEditable=="false")){if(i)return co(i);if(u)return co(u)}}function co(e){return e.contentEditable="true",Xe&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function Ih(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function BC(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=i)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!dA(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function LC(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,r=n.nodeName=="IMG";r?t.collapse(n.parentNode,Ge(n)+1):t.collapse(n,0),!r&&!e.state.selection.visible&&ft&&Yn<=11&&(n.disabled=!0,n.disabled=!1)}function fA(e,t){if(t instanceof re){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Sh(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Sh(e)}function Sh(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Mc(e,t,n,r){return e.someProp("createSelectionBetween",i=>i(e,t,n))||ae.between(t,n,r)}function wh(e){return e.editable&&!e.hasFocus()?!1:hA(e)}function hA(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function vC(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return Ir(t.node,t.offset,n.anchorNode,n.anchorOffset)}function Ll(e,t){let{$anchor:n,$head:r}=e.selection,i=t>0?n.max(r):n.min(r),u=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return u&&ue.findFrom(u,t)}function Mn(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Nh(e,t,n){let r=e.state.selection;if(r instanceof ae)if(n.indexOf("s")>-1){let{$head:i}=r,u=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter;if(!u||u.isText||!u.isLeaf)return!1;let s=e.state.doc.resolve(i.pos+u.nodeSize*(t<0?-1:1));return Mn(e,new ae(r.$anchor,s))}else if(r.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let i=Ll(e.state,t);return i&&i instanceof re?Mn(e,i):!1}else if(!(wt&&n.indexOf("m")>-1)){let i=r.$head,u=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter,s;if(!u||u.isText)return!1;let a=t<0?i.pos-u.nodeSize:i.pos;return u.isAtom||(s=e.docView.descAt(a))&&!s.contentDOM?re.isSelectable(u)?Mn(e,new re(t<0?e.state.doc.resolve(i.pos-u.nodeSize):i)):_u?Mn(e,new ae(e.state.doc.resolve(t<0?a:a+u.nodeSize))):!1:!1}}else return!1;else{if(r instanceof re&&r.node.isInline)return Mn(e,new ae(t>0?r.$to:r.$from));{let i=Ll(e.state,t);return i?Mn(e,i):!1}}}function Ps(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Yi(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function Hr(e,t){return t<0?PC(e):FC(e)}function PC(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,u,s=!1;for(Ot&&n.nodeType==1&&r<Ps(n)&&Yi(n.childNodes[r],-1)&&(s=!0);;)if(r>0){if(n.nodeType!=1)break;{let a=n.childNodes[r-1];if(Yi(a,-1))i=n,u=--r;else if(a.nodeType==3)n=a,r=n.nodeValue.length;else break}}else{if(pA(n))break;{let a=n.previousSibling;for(;a&&Yi(a,-1);)i=n.parentNode,u=Ge(a),a=a.previousSibling;if(a)n=a,r=Ps(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}s?vl(e,n,r):i&&vl(e,i,u)}function FC(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i=Ps(n),u,s;for(;;)if(r<i){if(n.nodeType!=1)break;let a=n.childNodes[r];if(Yi(a,1))u=n,s=++r;else break}else{if(pA(n))break;{let a=n.nextSibling;for(;a&&Yi(a,1);)u=a.parentNode,s=Ge(a)+1,a=a.nextSibling;if(a)n=a,r=0,i=Ps(n);else{if(n=n.parentNode,n==e.dom)break;r=i=0}}}u&&vl(e,u,s)}function pA(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function HC(e,t){for(;e&&t==e.childNodes.length&&!Du(e);)t=Ge(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=0}}function UC(e,t){for(;e&&!t&&!Du(e);)t=Ge(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=e.childNodes.length}}function vl(e,t,n){if(t.nodeType!=3){let u,s;(s=HC(t,n))?(t=s,n=0):(u=UC(t,n))&&(t=u,n=u.nodeValue.length)}let r=e.domSelection();if(!r)return;if(Ca(r)){let u=document.createRange();u.setEnd(t,n),u.setStart(t,n),r.removeAllRanges(),r.addRange(u)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:i}=e;setTimeout(()=>{e.state==i&&Tn(e)},50)}function Dh(e,t){let n=e.state.doc.resolve(t);if(!(Ve||$m)&&n.parent.inlineContent){let i=e.coordsAtPos(t);if(t>n.start()){let u=e.coordsAtPos(t-1),s=(u.top+u.bottom)/2;if(s>i.top&&s<i.bottom&&Math.abs(u.left-i.left)>1)return u.left<i.left?"ltr":"rtl"}if(t<n.end()){let u=e.coordsAtPos(t+1),s=(u.top+u.bottom)/2;if(s>i.top&&s<i.bottom&&Math.abs(u.left-i.left)>1)return u.left>i.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function _h(e,t,n){let r=e.state.selection;if(r instanceof ae&&!r.empty||n.indexOf("s")>-1||wt&&n.indexOf("m")>-1)return!1;let{$from:i,$to:u}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let s=Ll(e.state,t);if(s&&s instanceof re)return Mn(e,s)}if(!i.parent.inlineContent){let s=t<0?i:u,a=r instanceof Tt?ue.near(s,t):ue.findFrom(s,t);return a?Mn(e,a):!1}return!1}function Oh(e,t){if(!(e.state.selection instanceof ae))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let u=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(u&&!u.isText){let s=e.state.tr;return t<0?s.delete(n.pos-u.nodeSize,n.pos):s.delete(n.pos,n.pos+u.nodeSize),e.dispatch(s),!0}return!1}function Rh(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function WC(e){if(!Xe||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let r=t.firstChild;Rh(e,r,"true"),setTimeout(()=>Rh(e,r,"false"),20)}return!1}function KC(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function QC(e,t){let n=t.keyCode,r=KC(t);if(n==8||wt&&n==72&&r=="c")return Oh(e,-1)||Hr(e,-1);if(n==46&&!t.shiftKey||wt&&n==68&&r=="c")return Oh(e,1)||Hr(e,1);if(n==13||n==27)return!0;if(n==37||wt&&n==66&&r=="c"){let i=n==37?Dh(e,e.state.selection.from)=="ltr"?-1:1:-1;return Nh(e,i,r)||Hr(e,i)}else if(n==39||wt&&n==70&&r=="c"){let i=n==39?Dh(e,e.state.selection.from)=="ltr"?1:-1:1;return Nh(e,i,r)||Hr(e,i)}else{if(n==38||wt&&n==80&&r=="c")return _h(e,-1,r)||Hr(e,-1);if(n==40||wt&&n==78&&r=="c")return WC(e)||_h(e,1,r)||Hr(e,1);if(r==(wt?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function Bc(e,t){e.someProp("transformCopied",p=>{t=p(t,e)});let n=[],{content:r,openStart:i,openEnd:u}=t;for(;i>1&&u>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,u--;let p=r.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let s=e.someProp("clipboardSerializer")||Or.fromSchema(e.state.schema),a=yA(),o=a.createElement("div");o.appendChild(s.serializeFragment(r,{document:a}));let l=o.firstChild,c,d=0;for(;l&&l.nodeType==1&&(c=EA[l.nodeName.toLowerCase()]);){for(let p=c.length-1;p>=0;p--){let m=a.createElement(c[p]);for(;o.firstChild;)m.appendChild(o.firstChild);o.appendChild(m),d++}l=o.firstChild}l&&l.nodeType==1&&l.setAttribute("data-pm-slice",`${i} ${u}${d?` -${d}`:""} ${JSON.stringify(n)}`);let f=e.someProp("clipboardTextSerializer",p=>p(t,e))||t.content.textBetween(0,t.content.size,`
|
|
42
|
+
|
|
43
|
+
`);return{dom:o,text:f,slice:t}}function mA(e,t,n,r,i){let u=i.parent.type.spec.code,s,a;if(!n&&!t)return null;let o=!!t&&(r||u||!n);if(o){if(e.someProp("transformPastedText",f=>{t=f(t,u||r,e)}),u)return a=new z(H.from(e.state.schema.text(t.replace(/\r\n?/g,`
|
|
44
|
+
`))),0,0),e.someProp("transformPasted",f=>{a=f(a,e,!0)}),a;let d=e.someProp("clipboardTextParser",f=>f(t,i,r,e));if(d)a=d;else{let f=i.marks(),{schema:p}=e.state,m=Or.fromSchema(p);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(A=>{let E=s.appendChild(document.createElement("p"));A&&E.appendChild(m.serializeNode(p.text(A,f)))})}}else e.someProp("transformPastedHTML",d=>{n=d(n,e)}),s=VC(n),_u&&qC(s);let l=s&&s.querySelector("[data-pm-slice]"),c=l&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(l.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let f=s.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;s=f}if(a||(a=(e.someProp("clipboardParser")||e.someProp("domParser")||yc.fromSchema(e.state.schema)).parseSlice(s,{preserveWhitespace:!!(o||c),context:i,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!YC.test(f.parentNode.nodeName)?{ignore:!0}:null}})),c)a=JC(Mh(a,+c[1],+c[2]),c[4]);else if(a=z.maxOpen(zC(a.content,i),!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=Mh(a,d,f)}return e.someProp("transformPasted",d=>{a=d(a,e,o)}),a}const YC=/^(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 zC(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let i=t.node(n).contentMatchAt(t.index(n)),u,s=[];if(e.forEach(a=>{if(!s)return;let o=i.findWrapping(a.type),l;if(!o)return s=null;if(l=s.length&&u.length&&gA(o,u,a,s[s.length-1],0))s[s.length-1]=l;else{s.length&&(s[s.length-1]=bA(s[s.length-1],u.length));let c=AA(a,o);s.push(c),i=i.matchType(c.type),u=o}}),s)return H.from(s)}return e}function AA(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,H.from(e));return e}function gA(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let u=gA(e,t,n,r.lastChild,i+1);if(u)return r.copy(r.content.replaceChild(r.childCount-1,u));if(r.contentMatchAt(r.childCount).matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(H.from(AA(n,e,i+1))))}}function bA(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,bA(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(H.empty,!0);return e.copy(n.append(r))}function Pl(e,t,n,r,i,u){let s=t<0?e.firstChild:e.lastChild,a=s.content;return e.childCount>1&&(u=0),i<r-1&&(a=Pl(a,t,n,r,i+1,u)),i>=n&&(a=t<0?s.contentMatchAt(0).fillBefore(a,u<=i).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(H.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function Mh(e,t,n){return t<e.openStart&&(e=new z(Pl(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new z(Pl(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const EA={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let Bh=null;function yA(){return Bh||(Bh=document.implementation.createHTMLDocument("title"))}let fo=null;function GC(e){let t=window.trustedTypes;return t?(fo||(fo=t.defaultPolicy||t.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),fo.createHTML(e)):e}function VC(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=yA().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),i;if((i=r&&EA[r[1].toLowerCase()])&&(e=i.map(u=>"<"+u+">").join("")+e+i.map(u=>"</"+u+">").reverse().join("")),n.innerHTML=GC(e),i)for(let u=0;u<i.length;u++)n=n.querySelector(i[u])||n;return n}function qC(e){let t=e.querySelectorAll(Ve?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}function JC(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,r;try{r=JSON.parse(t)}catch{return e}let{content:i,openStart:u,openEnd:s}=e;for(let a=r.length-2;a>=0;a-=2){let o=n.nodes[r[a]];if(!o||o.hasRequiredAttrs())break;i=H.from(o.create(r[a+1],i)),u++,s++}return new z(i,u,s)}const it={},ut={},jC={touchstart:!0,touchmove:!0};class ZC{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 XC(e){for(let t in it){let n=it[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=r=>{ex(e,r)&&!Lc(e,r)&&(e.editable||!(r.type in ut))&&n(e,r)},jC[t]?{passive:!0}:void 0)}Xe&&e.dom.addEventListener("input",()=>null),Fl(e)}function Hn(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function $C(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function Fl(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=r=>Lc(e,r))})}function Lc(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function ex(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 tx(e,t){!Lc(e,t)&&it[t.type]&&(e.editable||!(t.type in ut))&&it[t.type](e,t)}ut.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!CA(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(En&&Ve&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),ri&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",i=>i(e,ar(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",r=>r(e,n))||QC(e,n)?n.preventDefault():Hn(e,"key")};ut.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};ut.keypress=(e,t)=>{let n=t;if(CA(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||wt&&n.metaKey)return;if(e.someProp("handleKeyPress",i=>i(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof ae)||!r.$from.sameParent(r.$to)){let i=String.fromCharCode(n.charCode),u=()=>e.state.tr.insertText(i).scrollIntoView();!/[\r\n]/.test(i)&&!e.someProp("handleTextInput",s=>s(e,r.$from.pos,r.$to.pos,i,u))&&e.dispatch(u()),n.preventDefault()}};function ka(e){return{left:e.clientX,top:e.clientY}}function nx(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function vc(e,t,n,r,i){if(r==-1)return!1;let u=e.state.doc.resolve(r);for(let s=u.depth+1;s>0;s--)if(e.someProp(t,a=>s>u.depth?a(e,n,u.nodeAfter,u.before(s),i,!0):a(e,n,u.node(s),u.before(s),i,!1)))return!0;return!1}function qr(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);r.setMeta("pointer",!0),e.dispatch(r)}function rx(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&re.isSelectable(r)?(qr(e,new re(n)),!0):!1}function ix(e,t){if(t==-1)return!1;let n=e.state.selection,r,i;n instanceof re&&(r=n.node);let u=e.state.doc.resolve(t);for(let s=u.depth+1;s>0;s--){let a=s>u.depth?u.nodeAfter:u.node(s);if(re.isSelectable(a)){r&&n.$from.depth>0&&s>=n.$from.depth&&u.before(n.$from.depth+1)==n.$from.pos?i=u.before(n.$from.depth):i=u.before(s);break}}return i!=null?(qr(e,re.create(e.state.doc,i)),!0):!1}function ux(e,t,n,r,i){return vc(e,"handleClickOn",t,n,r)||e.someProp("handleClick",u=>u(e,t,r))||(i?ix(e,n):rx(e,n))}function sx(e,t,n,r){return vc(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",i=>i(e,t,r))}function ax(e,t,n,r){return vc(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",i=>i(e,t,r))||ox(e,n,r)}function ox(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(qr(e,ae.create(r,0,r.content.size)),!0):!1;let i=r.resolve(t);for(let u=i.depth+1;u>0;u--){let s=u>i.depth?i.nodeAfter:i.node(u),a=i.before(u);if(s.inlineContent)qr(e,ae.create(r,a+1,a+1+s.content.size));else if(re.isSelectable(s))qr(e,re.create(r,a));else continue;return!0}}function Pc(e){return Fs(e)}const TA=wt?"metaKey":"ctrlKey";it.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=Pc(e),i=Date.now(),u="singleClick";i-e.input.lastClick.time<500&&nx(n,e.input.lastClick)&&!n[TA]&&e.input.lastClick.button==n.button&&(e.input.lastClick.type=="singleClick"?u="doubleClick":e.input.lastClick.type=="doubleClick"&&(u="tripleClick")),e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:u,button:n.button};let s=e.posAtCoords(ka(n));s&&(u=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new lx(e,s,n,!!r)):(u=="doubleClick"?sx:ax)(e,s.pos,s.inside,n)?n.preventDefault():Hn(e,"pointer"))};class lx{constructor(t,n,r,i){this.view=t,this.pos=n,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[TA],this.allowDefault=r.shiftKey;let u,s;if(n.inside>-1)u=t.state.doc.nodeAt(n.inside),s=n.inside;else{let c=t.state.doc.resolve(n.pos);u=c.parent,s=c.depth?c.before():0}const a=i?null:r.target,o=a?t.docView.nearestDesc(a,!0):null;this.target=o&&o.nodeDOM.nodeType==1?o.nodeDOM:null;let{selection:l}=t.state;r.button==0&&(u.type.spec.draggable&&u.type.spec.selectable!==!1||l instanceof re&&l.from<=s&&l.to>s)&&(this.mightDrag={node:u,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Ot&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),Hn(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Tn(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(ka(t))),this.updateAllowDefault(t),this.allowDefault||!n?Hn(this.view,"pointer"):ux(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||Xe&&this.mightDrag&&!this.mightDrag.node.isAtom||Ve&&!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)?(qr(this.view,ue.near(this.view.state.doc.resolve(n.pos))),t.preventDefault()):Hn(this.view,"pointer")}move(t){this.updateAllowDefault(t),Hn(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}it.touchstart=e=>{e.input.lastTouch=Date.now(),Pc(e),Hn(e,"pointer")};it.touchmove=e=>{e.input.lastTouch=Date.now(),Hn(e,"pointer")};it.contextmenu=e=>Pc(e);function CA(e,t){return e.composing?!0:Xe&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const cx=En?5e3:-1;ut.compositionstart=ut.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof ae&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||Ve&&$m&&dx(e)))e.markCursor=e.state.storedMarks||n.marks(),Fs(e,!0),e.markCursor=null;else if(Fs(e,!t.selection.empty),Ot&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=e.domSelectionRange();for(let i=r.focusNode,u=r.focusOffset;i&&i.nodeType==1&&u!=0;){let s=u<0?i.lastChild:i.childNodes[u-1];if(!s)break;if(s.nodeType==3){let a=e.domSelection();a&&a.collapse(s,s.nodeValue.length);break}else i=s,u=-1}}e.input.composing=!0}xA(e,cx)};function dx(e){let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(!t||t.nodeType!=1||n>=t.childNodes.length)return!1;let r=t.childNodes[n];return r.nodeType==1&&r.contentEditable=="false"}ut.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.badSafariComposition?e.domObserver.forceFlush():e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,xA(e,20))};function xA(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>Fs(e),t))}function kA(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=hx());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function fx(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=iC(t.focusNode,t.focusOffset),r=uC(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let i=r.pmViewDesc,u=e.domObserver.lastChangedTextNode;if(n==u||r==u)return u;if(!i||!i.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let s=n.pmViewDesc;if(!(!s||!s.isText(n.nodeValue)))return r}}return n||r}function hx(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function Fs(e,t=!1){if(!(En&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),kA(e),t||e.docView&&e.docView.dirty){let n=Rc(e),r=e.state.selection;return n&&!n.eq(r)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function px(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 r=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}const su=ft&&Yn<15||ri&&lC<604;it.copy=ut.cut=(e,t)=>{let n=t,r=e.state.selection,i=n.type=="cut";if(r.empty)return;let u=su?null:n.clipboardData,s=r.content(),{dom:a,text:o}=Bc(e,s);u?(n.preventDefault(),u.clearData(),u.setData("text/html",a.innerHTML),u.setData("text/plain",o)):px(e,a),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function mx(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function Ax(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let i=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?au(e,r.value,null,i,t):au(e,r.textContent,r.innerHTML,i,t)},50)}function au(e,t,n,r,i){let u=mA(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",o=>o(e,i,u||z.empty)))return!0;if(!u)return!1;let s=mx(u),a=s?e.state.tr.replaceSelectionWith(s,r):e.state.tr.replaceSelection(u);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function IA(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," "):""}ut.paste=(e,t)=>{let n=t;if(e.composing&&!En)return;let r=su?null:n.clipboardData,i=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&au(e,IA(r),r.getData("text/html"),i,n)?n.preventDefault():Ax(e,n)};class SA{constructor(t,n,r){this.slice=t,this.move=n,this.node=r}}const gx=wt?"altKey":"ctrlKey";function wA(e,t){let n;return e.someProp("dragCopies",r=>{n=n||r(t)}),n!=null?!n:!t[gx]}it.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=e.state.selection,u=i.empty?null:e.posAtCoords(ka(n)),s;if(!(u&&u.pos>=i.from&&u.pos<=(i instanceof re?i.to-1:i.to))){if(r&&r.mightDrag)s=re.create(e.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=e.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=e.docView&&(s=re.create(e.state.doc,d.posBefore))}}let a=(s||e.state.selection).content(),{dom:o,text:l,slice:c}=Bc(e,a);(!n.dataTransfer.files.length||!Ve||Xm>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(su?"Text":"text/html",o.innerHTML),n.dataTransfer.effectAllowed="copyMove",su||n.dataTransfer.setData("text/plain",l),e.dragging=new SA(c,wA(e,n),s)};it.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};ut.dragover=ut.dragenter=(e,t)=>t.preventDefault();ut.drop=(e,t)=>{try{bx(e,t,e.dragging)}finally{e.dragging=null}};function bx(e,t,n){if(!t.dataTransfer)return;let r=e.posAtCoords(ka(t));if(!r)return;let i=e.state.doc.resolve(r.pos),u=n&&n.slice;u?e.someProp("transformPasted",p=>{u=p(u,e,!1)}):u=mA(e,IA(t.dataTransfer),su?null:t.dataTransfer.getData("text/html"),!1,i);let s=!!(n&&wA(e,t));if(e.someProp("handleDrop",p=>p(e,t,u||z.empty,s))){t.preventDefault();return}if(!u)return;t.preventDefault();let a=u?eT(e.state.doc,i.pos,u):i.pos;a==null&&(a=i.pos);let o=e.state.tr;if(s){let{node:p}=n;p?p.replace(o):o.deleteSelection()}let l=o.mapping.map(a),c=u.openStart==0&&u.openEnd==0&&u.content.childCount==1,d=o.doc;if(c?o.replaceRangeWith(l,l,u.content.firstChild):o.replaceRange(l,l,u),o.doc.eq(d))return;let f=o.doc.resolve(l);if(c&&re.isSelectable(u.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(u.content.firstChild))o.setSelection(new re(f));else{let p=o.mapping.map(a);o.mapping.maps[o.mapping.maps.length-1].forEach((m,A,E,g)=>p=g),o.setSelection(Mc(e,f,o.doc.resolve(p)))}e.focus(),e.dispatch(o.setMeta("uiEvent","drop"))}it.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())&&Tn(e)},20))};it.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)};it.beforeinput=(e,t)=>{if(Ve&&En&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:r}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=r||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",u=>u(e,ar(8,"Backspace")))))return;let{$cursor:i}=e.state.selection;i&&i.pos>0&&e.dispatch(e.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let e in ut)it[e]=ut[e];function ou(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}class Hs{constructor(t,n){this.toDOM=t,this.spec=n||pr,this.side=this.spec.side||0}map(t,n,r,i){let{pos:u,deleted:s}=t.mapResult(n.from+i,this.side<0?-1:1);return s?null:new qe(u-r,u-r,this)}valid(){return!0}eq(t){return this==t||t instanceof Hs&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&ou(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class Gn{constructor(t,n){this.attrs=t,this.spec=n||pr}map(t,n,r,i){let u=t.map(n.from+i,this.spec.inclusiveStart?-1:1)-r,s=t.map(n.to+i,this.spec.inclusiveEnd?1:-1)-r;return u>=s?null:new qe(u,s,this)}valid(t,n){return n.from<n.to}eq(t){return this==t||t instanceof Gn&&ou(this.attrs,t.attrs)&&ou(this.spec,t.spec)}static is(t){return t.type instanceof Gn}destroy(){}}class Fc{constructor(t,n){this.attrs=t,this.spec=n||pr}map(t,n,r,i){let u=t.mapResult(n.from+i,1);if(u.deleted)return null;let s=t.mapResult(n.to+i,-1);return s.deleted||s.pos<=u.pos?null:new qe(u.pos-r,s.pos-r,this)}valid(t,n){let{index:r,offset:i}=t.content.findIndex(n.from),u;return i==n.from&&!(u=t.child(r)).isText&&i+u.nodeSize==n.to}eq(t){return this==t||t instanceof Fc&&ou(this.attrs,t.attrs)&&ou(this.spec,t.spec)}destroy(){}}class qe{constructor(t,n,r){this.from=t,this.to=n,this.type=r}copy(t,n){return new qe(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,r){return this.type.map(t,this,n,r)}static widget(t,n,r){return new qe(t,t,new Hs(n,r))}static inline(t,n,r,i){return new qe(t,n,new Gn(r,i))}static node(t,n,r,i){return new qe(t,n,new Fc(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof Gn}get widget(){return this.type instanceof Hs}}const Kr=[],pr={};class we{constructor(t,n){this.local=t.length?t:Kr,this.children=n.length?n:Kr}static create(t,n){return n.length?Us(n,t,0,pr):je}find(t,n,r){let i=[];return this.findInner(t??0,n??1e9,i,0,r),i}findInner(t,n,r,i,u){for(let s=0;s<this.local.length;s++){let a=this.local[s];a.from<=n&&a.to>=t&&(!u||u(a.spec))&&r.push(a.copy(a.from+i,a.to+i))}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,r,i+a,u)}}map(t,n,r){return this==je||t.maps.length==0?this:this.mapInner(t,n,0,0,r||pr)}mapInner(t,n,r,i,u){let s;for(let a=0;a<this.local.length;a++){let o=this.local[a].map(t,r,i);o&&o.type.valid(n,o)?(s||(s=[])).push(o):u.onRemove&&u.onRemove(this.local[a].spec)}return this.children.length?Ex(this.children,s||[],t,n,r,i,u):s?new we(s.sort(mr),Kr):je}add(t,n){return n.length?this==je?we.create(t,n):this.addInner(t,n,0):this}addInner(t,n,r){let i,u=0;t.forEach((a,o)=>{let l=o+r,c;if(c=DA(n,a,l)){for(i||(i=this.children.slice());u<i.length&&i[u]<o;)u+=3;i[u]==o?i[u+2]=i[u+2].addInner(a,c,l+1):i.splice(u,0,o,o+a.nodeSize,Us(c,a,l+1,pr)),u+=3}});let s=NA(u?_A(n):n,-r);for(let a=0;a<s.length;a++)s[a].type.valid(t,s[a])||s.splice(a--,1);return new we(s.length?this.local.concat(s).sort(mr):this.local,i||this.children)}remove(t){return t.length==0||this==je?this:this.removeInner(t,0)}removeInner(t,n){let r=this.children,i=this.local;for(let u=0;u<r.length;u+=3){let s,a=r[u]+n,o=r[u+1]+n;for(let c=0,d;c<t.length;c++)(d=t[c])&&d.from>a&&d.to<o&&(t[c]=null,(s||(s=[])).push(d));if(!s)continue;r==this.children&&(r=this.children.slice());let l=r[u+2].removeInner(s,a+1);l!=je?r[u+2]=l:(r.splice(u,3),u-=3)}if(i.length){for(let u=0,s;u<t.length;u++)if(s=t[u])for(let a=0;a<i.length;a++)i[a].eq(s,n)&&(i==this.local&&(i=this.local.slice()),i.splice(a--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new we(i,r):je}forChild(t,n){if(this==je)return this;if(n.isLeaf)return we.empty;let r,i;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=t){this.children[a]==t&&(r=this.children[a+2]);break}let u=t+1,s=u+n.content.size;for(let a=0;a<this.local.length;a++){let o=this.local[a];if(o.from<s&&o.to>u&&o.type instanceof Gn){let l=Math.max(u,o.from)-u,c=Math.min(s,o.to)-u;l<c&&(i||(i=[])).push(o.copy(l,c))}}if(i){let a=new we(i.sort(mr),Kr);return r?new vn([a,r]):a}return r||je}eq(t){if(this==t)return!0;if(!(t instanceof we)||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 Hc(this.localsInner(t))}localsInner(t){if(this==je)return Kr;if(t.inlineContent||!this.local.some(Gn.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Gn||n.push(this.local[r]);return n}forEachSet(t){t(this)}}we.empty=new we([],[]);we.removeOverlap=Hc;const je=we.empty;class vn{constructor(t){this.members=t}map(t,n){const r=this.members.map(i=>i.map(t,n,pr));return vn.from(r)}forChild(t,n){if(n.isLeaf)return we.empty;let r=[];for(let i=0;i<this.members.length;i++){let u=this.members[i].forChild(t,n);u!=je&&(u instanceof vn?r=r.concat(u.members):r.push(u))}return vn.from(r)}eq(t){if(!(t instanceof vn)||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,r=!0;for(let i=0;i<this.members.length;i++){let u=this.members[i].localsInner(t);if(u.length)if(!n)n=u;else{r&&(n=n.slice(),r=!1);for(let s=0;s<u.length;s++)n.push(u[s])}}return n?Hc(r?n:n.sort(mr)):Kr}static from(t){switch(t.length){case 0:return je;case 1:return t[0];default:return new vn(t.every(n=>n instanceof we)?t:t.reduce((n,r)=>n.concat(r instanceof we?r:r.members),[]))}}forEachSet(t){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(t)}}function Ex(e,t,n,r,i,u,s){let a=e.slice();for(let l=0,c=u;l<n.maps.length;l++){let d=0;n.maps[l].forEach((f,p,m,A)=>{let E=A-m-(p-f);for(let g=0;g<a.length;g+=3){let N=a[g+1];if(N<0||f>N+c-d)continue;let I=a[g]+c-d;p>=I?a[g+1]=f<=I?-2:-1:f>=c&&E&&(a[g]+=E,a[g+1]+=E)}d+=E}),c=n.maps[l].map(c,-1)}let o=!1;for(let l=0;l<a.length;l+=3)if(a[l+1]<0){if(a[l+1]==-2){o=!0,a[l+1]=-1;continue}let c=n.map(e[l]+u),d=c-i;if(d<0||d>=r.content.size){o=!0;continue}let f=n.map(e[l+1]+u,-1),p=f-i,{index:m,offset:A}=r.content.findIndex(d),E=r.maybeChild(m);if(E&&A==d&&A+E.nodeSize==p){let g=a[l+2].mapInner(n,E,c+1,e[l]+u+1,s);g!=je?(a[l]=d,a[l+1]=p,a[l+2]=g):(a[l+1]=-2,o=!0)}else o=!0}if(o){let l=yx(a,e,t,n,i,u,s),c=Us(l,r,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 we(t.sort(mr),a)}function NA(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let i=e[r];n.push(new qe(i.from+t,i.to+t,i.type))}return n}function yx(e,t,n,r,i,u,s){function a(o,l){for(let c=0;c<o.local.length;c++){let d=o.local[c].map(r,i,l);d?n.push(d):s.onRemove&&s.onRemove(o.local[c].spec)}for(let c=0;c<o.children.length;c+=3)a(o.children[c+2],o.children[c]+l+1)}for(let o=0;o<e.length;o+=3)e[o+1]==-1&&a(e[o+2],t[o]+u+1);return n}function DA(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,i=null;for(let u=0,s;u<e.length;u++)(s=e[u])&&s.from>n&&s.to<r&&((i||(i=[])).push(s),e[u]=null);return i}function _A(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function Us(e,t,n,r){let i=[],u=!1;t.forEach((a,o)=>{let l=DA(e,a,o+n);if(l){u=!0;let c=Us(l,a,n+o+1,r);c!=je&&i.push(o,o+a.nodeSize,c)}});let s=NA(u?_A(e):e,-n).sort(mr);for(let a=0;a<s.length;a++)s[a].type.valid(t,s[a])||(r.onRemove&&r.onRemove(s[a].spec),s.splice(a--,1));return s.length||i.length?new we(s,i):je}function mr(e,t){return e.from-t.from||e.to-t.to}function Hc(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let i=n+1;i<t.length;i++){let u=t[i];if(u.from==r.from){u.to!=r.to&&(t==e&&(t=e.slice()),t[i]=u.copy(u.from,r.to),Lh(t,i+1,u.copy(r.to,u.to)));continue}else{u.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,u.from),Lh(t,i,r.copy(u.from,r.to)));break}}}return t}function Lh(e,t,n){for(;t<e.length&&mr(n,e[t])>0;)t++;e.splice(t,0,n)}function ho(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=je&&t.push(r)}),e.cursorWrapper&&t.push(we.create(e.state.doc,[e.cursorWrapper.deco])),vn.from(t)}const Tx={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Cx=ft&&Yn<=11;class xx{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}}class kx{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new xx,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;i<r.length;i++)this.queue.push(r[i]);ft&&Yn<=11&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():Xe&&t.composing&&r.some(i=>i.type=="childList"&&i.target.nodeName=="TR")?(t.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),Cx&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.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,Tx)),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(wh(this.view)){if(this.suppressingSelectionUpdates)return Tn(this.view);if(ft&&Yn<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&Ir(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,r;for(let u=t.focusNode;u;u=ni(u))n.add(u);for(let u=t.anchorNode;u;u=ni(u))if(n.has(u)){r=u;break}let i=r&&this.view.docView.nearestDesc(r);if(i&&i.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))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 r=t.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&wh(t)&&!this.ignoreSelectionChange(r),u=-1,s=-1,a=!1,o=[];if(t.editable)for(let c=0;c<n.length;c++){let d=this.registerMutation(n[c],o);d&&(u=u<0?d.from:Math.min(d.from,u),s=s<0?d.to:Math.max(d.to,s),d.typeOver&&(a=!0))}if(o.some(c=>c.nodeName=="BR")&&(t.input.lastKeyCode==8||t.input.lastKeyCode==46)){for(let c of o)if(c.nodeName=="BR"&&c.parentNode){let d=c.nextSibling;for(;d&&d.nodeType==1;){if(d.contentEditable=="false"){c.parentNode.removeChild(c);break}d=d.firstChild}}}else if(Ot&&o.length){let c=o.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||wx(t,d)!=p)&&f.remove()}}}let l=null;u<0&&i&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)<Date.now()-300&&Ca(r)&&(l=Rc(t))&&l.eq(ue.near(t.state.doc.resolve(0),1))?(t.input.lastFocus=0,Tn(t),this.currentSelection.set(r),t.scrollToSelection()):(u>-1||i)&&(u>-1&&(t.docView.markDirty(u,s),Ix(t)),t.input.badSafariComposition&&(t.input.badSafariComposition=!1,Nx(t,o)),this.handleDOMChange(u,s,a,o),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||Tn(t),this.currentSelection.set(r))}registerMutation(t,n){if(n.indexOf(t.target)>-1)return null;let r=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(r==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!r||r.ignoreMutation(t))return null;if(t.type=="childList"){for(let c=0;c<t.addedNodes.length;c++){let d=t.addedNodes[c];n.push(d),d.nodeType==3&&(this.lastChangedTextNode=d)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(t.target))return{from:r.posBefore,to:r.posAfter};let i=t.previousSibling,u=t.nextSibling;if(ft&&Yn<=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)&&(i=d),(!f||Array.prototype.indexOf.call(t.addedNodes,f)<0)&&(u=f)}let s=i&&i.parentNode==t.target?Ge(i)+1:0,a=r.localPosFromDOM(t.target,s,-1),o=u&&u.parentNode==t.target?Ge(u):t.target.childNodes.length,l=r.localPosFromDOM(t.target,o,1);return{from:a,to:l}}else return t.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=t.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:t.target.nodeValue==t.oldValue})}}let vh=new WeakMap,Ph=!1;function Ix(e){if(!vh.has(e)&&(vh.set(e,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1)){if(e.requiresGeckoHackNode=Ot,Ph)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."),Ph=!0}}function Fh(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,u=t.endOffset,s=e.domAtPos(e.state.selection.anchor);return Ir(s.node,s.offset,i,u)&&([n,r,i,u]=[i,u,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:u}}function Sx(e,t){if(t.getComposedRanges){let i=t.getComposedRanges(e.root)[0];if(i)return Fh(e,i)}let n;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return e.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",r,!0),n?Fh(e,n):null}function wx(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let r=e.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function Nx(e,t){var n;let{focusNode:r,focusOffset:i}=e.domSelectionRange();for(let u of t)if(((n=u.parentNode)===null||n===void 0?void 0:n.nodeName)=="TR"){let s=u.nextSibling;for(;s&&s.nodeName!="TD"&&s.nodeName!="TH";)s=s.nextSibling;if(s){let a=s;for(;;){let o=a.firstChild;if(!o||o.nodeType!=1||o.contentEditable=="false"||/^(BR|IMG)$/.test(o.nodeName))break;a=o}a.insertBefore(u,a.firstChild),r==u&&e.domSelection().collapse(u,i)}else u.parentNode.removeChild(u)}}function Dx(e,t,n){let{node:r,fromOffset:i,toOffset:u,from:s,to:a}=e.docView.parseRange(t,n),o=e.domSelectionRange(),l,c=o.anchorNode;if(c&&e.dom.contains(c.nodeType==1?c:c.parentNode)&&(l=[{node:c,offset:o.anchorOffset}],Ca(o)||l.push({node:o.focusNode,offset:o.focusOffset})),Ve&&e.input.lastKeyCode===8)for(let E=u;E>i;E--){let g=r.childNodes[E-1],N=g.pmViewDesc;if(g.nodeName=="BR"&&!N){u=E;break}if(!N||N.size)break}let d=e.state.doc,f=e.someProp("domParser")||yc.fromSchema(e.state.schema),p=d.resolve(s),m=null,A=f.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:i,to:u,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:l,ruleFromNode:_x,context:p});if(l&&l[0].pos!=null){let E=l[0].pos,g=l[1]&&l[1].pos;g==null&&(g=E),m={anchor:E+s,head:g+s}}return{doc:A,sel:m,from:s,to:a}}function _x(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(Xe&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(e.parentNode.lastChild==e||Xe&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}const Ox=/^(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 Rx(e,t,n,r,i){let u=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let O=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,Q=Rc(e,O);if(Q&&!e.state.selection.eq(Q)){if(Ve&&En&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",x=>x(e,ar(13,"Enter"))))return;let _=e.state.tr.setSelection(Q);O=="pointer"?_.setMeta("pointer",!0):O=="key"&&_.scrollIntoView(),u&&_.setMeta("composition",u),e.dispatch(_)}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 o=e.state.selection,l=Dx(e,t,n),c=e.state.doc,d=c.slice(l.from,l.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 m=Lx(d.content,l.doc.content,l.from,f,p);if(m&&e.input.domChangeCount++,(ri&&e.input.lastIOSEnter>Date.now()-225||En)&&i.some(O=>O.nodeType==1&&!Ox.test(O.nodeName))&&(!m||m.endA>=m.endB)&&e.someProp("handleKeyDown",O=>O(e,ar(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!m)if(r&&o instanceof ae&&!o.empty&&o.$head.sameParent(o.$anchor)&&!e.composing&&!(l.sel&&l.sel.anchor!=l.sel.head))m={start:o.from,endA:o.to,endB:o.to};else{if(l.sel){let O=Hh(e,e.state.doc,l.sel);if(O&&!O.eq(e.state.selection)){let Q=e.state.tr.setSelection(O);u&&Q.setMeta("composition",u),e.dispatch(Q)}}return}e.state.selection.from<e.state.selection.to&&m.start==m.endB&&e.state.selection instanceof ae&&(m.start>e.state.selection.from&&m.start<=e.state.selection.from+2&&e.state.selection.from>=l.from?m.start=e.state.selection.from:m.endA<e.state.selection.to&&m.endA>=e.state.selection.to-2&&e.state.selection.to<=l.to&&(m.endB+=e.state.selection.to-m.endA,m.endA=e.state.selection.to)),ft&&Yn<=11&&m.endB==m.start+1&&m.endA==m.start&&m.start>l.from&&l.doc.textBetween(m.start-l.from-1,m.start-l.from+1)==" "&&(m.start--,m.endA--,m.endB--);let A=l.doc.resolveNoCache(m.start-l.from),E=l.doc.resolveNoCache(m.endB-l.from),g=c.resolve(m.start),N=A.sameParent(E)&&A.parent.inlineContent&&g.end()>=m.endA;if((ri&&e.input.lastIOSEnter>Date.now()-225&&(!N||i.some(O=>O.nodeName=="DIV"||O.nodeName=="P"))||!N&&A.pos<l.doc.content.size&&(!A.sameParent(E)||!A.parent.inlineContent)&&A.pos<E.pos&&!/\S/.test(l.doc.textBetween(A.pos,E.pos,"","")))&&e.someProp("handleKeyDown",O=>O(e,ar(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>m.start&&Bx(c,m.start,m.endA,A,E)&&e.someProp("handleKeyDown",O=>O(e,ar(8,"Backspace")))){En&&Ve&&e.domObserver.suppressSelectionUpdates();return}Ve&&m.endB==m.start&&(e.input.lastChromeDelete=Date.now()),En&&!N&&A.start()!=E.start()&&E.parentOffset==0&&A.depth==E.depth&&l.sel&&l.sel.anchor==l.sel.head&&l.sel.head==m.endA&&(m.endB-=2,E=l.doc.resolveNoCache(m.endB-l.from),setTimeout(()=>{e.someProp("handleKeyDown",function(O){return O(e,ar(13,"Enter"))})},20));let I=m.start,R=m.endA,w=O=>{let Q=O||e.state.tr.replace(I,R,l.doc.slice(m.start-l.from,m.endB-l.from));if(l.sel){let _=Hh(e,Q.doc,l.sel);_&&!(Ve&&e.composing&&_.empty&&(m.start!=m.endB||e.input.lastChromeDelete<Date.now()-100)&&(_.head==I||_.head==Q.mapping.map(R)-1)||ft&&_.empty&&_.head==I)&&Q.setSelection(_)}return u&&Q.setMeta("composition",u),Q.scrollIntoView()},k;if(N)if(A.pos==E.pos){ft&&Yn<=11&&A.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>Tn(e),20));let O=w(e.state.tr.delete(I,R)),Q=c.resolve(m.start).marksAcross(c.resolve(m.endA));Q&&O.ensureMarks(Q),e.dispatch(O)}else if(m.endA==m.endB&&(k=Mx(A.parent.content.cut(A.parentOffset,E.parentOffset),g.parent.content.cut(g.parentOffset,m.endA-g.start())))){let O=w(e.state.tr);k.type=="add"?O.addMark(I,R,k.mark):O.removeMark(I,R,k.mark),e.dispatch(O)}else if(A.parent.child(A.index()).isText&&A.index()==E.index()-(E.textOffset?0:1)){let O=A.parent.textBetween(A.parentOffset,E.parentOffset),Q=()=>w(e.state.tr.insertText(O,I,R));e.someProp("handleTextInput",_=>_(e,I,R,O,Q))||e.dispatch(Q())}else e.dispatch(w());else e.dispatch(w())}function Hh(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:Mc(e,t.resolve(n.anchor),t.resolve(n.head))}function Mx(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,i=n,u=r,s,a,o;for(let c=0;c<r.length;c++)i=r[c].removeFromSet(i);for(let c=0;c<n.length;c++)u=n[c].removeFromSet(u);if(i.length==1&&u.length==0)a=i[0],s="add",o=c=>c.mark(a.addToSet(c.marks));else if(i.length==0&&u.length==1)a=u[0],s="remove",o=c=>c.mark(a.removeFromSet(c.marks));else return null;let l=[];for(let c=0;c<t.childCount;c++)l.push(o(t.child(c)));if(H.from(l).eq(e))return{mark:a,type:s}}function Bx(e,t,n,r,i){if(n-t<=i.pos-r.pos||po(r,!0,!1)<i.pos)return!1;let u=e.resolve(t);if(!r.parent.isTextblock){let a=u.nodeAfter;return a!=null&&n==t+a.nodeSize}if(u.parentOffset<u.parent.content.size||!u.parent.isTextblock)return!1;let s=e.resolve(po(u,!0,!0));return!s.parent.isTextblock||s.pos>n||po(s,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(s.parent.content)}function po(e,t,n){let r=e.depth,i=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,i++,t=!1;if(n){let u=e.node(r).maybeChild(e.indexAfter(r));for(;u&&!u.isLeaf;)u=u.firstChild,i++}return i}function Lx(e,t,n,r,i){let u=e.findDiffStart(t,n);if(u==null)return null;let{a:s,b:a}=e.findDiffEnd(t,n+e.size,n+t.size);if(i=="end"){let o=Math.max(0,u-Math.min(s,a));r-=s+o-u}if(s<u&&e.size<t.size){let o=r<=u&&r>=s?u-r:0;u-=o,u&&u<t.size&&Uh(t.textBetween(u-1,u+1))&&(u+=o?1:-1),a=u+(a-s),s=u}else if(a<u){let o=r<=u&&r>=a?u-r:0;u-=o,u&&u<e.size&&Uh(e.textBetween(u-1,u+1))&&(u+=o?1:-1),s=u+(s-a),a=u}return{start:u,endA:s,endB:a}}function Uh(e){if(e.length!=2)return!1;let t=e.charCodeAt(0),n=e.charCodeAt(1);return t>=56320&&t<=57343&&n>=55296&&n<=56319}class OA{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 ZC,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(zh),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=Qh(this),Kh(this),this.nodeViews=Yh(this),this.docView=Th(this.state.doc,Wh(this),ho(this),this.dom,this),this.domObserver=new kx(this,(r,i,u,s)=>Rx(this,r,i,u,s)),this.domObserver.start(),XC(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&&Fl(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(zh),this.directPlugins=t.plugins),this.updateStateInner(t.state,n)}setProps(t){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in t)n[r]=t[r];this.update(n)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,n){var r;let i=this.state,u=!1,s=!1;t.storedMarks&&this.composing&&(kA(this),s=!0),this.state=t;let a=i.plugins!=t.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=Yh(this);Px(p,this.nodeViews)&&(this.nodeViews=p,u=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&Fl(this),this.editable=Qh(this),Kh(this);let o=ho(this),l=Wh(this),c=i.plugins!=t.plugins&&!i.doc.eq(t.doc)?"reset":t.scrollToSelection>i.scrollToSelection?"to selection":"preserve",d=u||!this.docView.matchesNode(t.doc,l,o);(d||!t.selection.eq(i.selection))&&(s=!0);let f=c=="preserve"&&s&&this.dom.style.overflowAnchor==null&&fC(this);if(s){this.domObserver.stop();let p=d&&(ft||Ve)&&!this.composing&&!i.selection.empty&&!t.selection.empty&&vx(i.selection,t.selection);if(d){let m=Ve?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=fx(this)),(u||!this.docView.update(t.doc,l,o,this))&&(this.docView.updateOuterDeco(l),this.docView.destroy(),this.docView=Th(t.doc,l,o,this.dom,this)),m&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&vC(this))?Tn(this,p):(fA(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((r=this.dragging)===null||r===void 0)&&r.node&&!i.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,i),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():f&&hC(f)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!(!t||!this.dom.contains(t.nodeType==1?t:t.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof re){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&mh(this,n.getBoundingClientRect(),t)}else mh(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 r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,t)}}updateDraggedNode(t,n){let r=t.node,i=-1;if(r.from<this.state.doc.content.size&&this.state.doc.nodeAt(r.from)==r.node)i=r.from;else{let u=r.from+(this.state.doc.content.size-n.doc.content.size);(u>0&&u<this.state.doc.content.size&&this.state.doc.nodeAt(u))==r.node&&(i=u)}this.dragging=new SA(t.slice,t.move,i<0?void 0:re.create(this.state.doc,i))}someProp(t,n){let r=this._props&&this._props[t],i;if(r!=null&&(i=n?n(r):r))return i;for(let s=0;s<this.directPlugins.length;s++){let a=this.directPlugins[s].props[t];if(a!=null&&(i=n?n(a):a))return i}let u=this.state.plugins;if(u)for(let s=0;s<u.length;s++){let a=u[s].props[t];if(a!=null&&(i=n?n(a):a))return i}}hasFocus(){if(ft){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&&pC(this.dom),Tn(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 EC(this,t)}coordsAtPos(t,n=1){return iA(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,r=-1){let i=this.docView.posFromDOM(t,n,r);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(t,n){return kC(this,n||this.state,t)}pasteHTML(t,n){return au(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return au(this,t,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(t){return Bc(this,t)}destroy(){this.docView&&($C(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],ho(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,nC())}get isDestroyed(){return this.docView==null}dispatchEvent(t){return tx(this,t)}domSelectionRange(){let t=this.domSelection();return t?Xe&&this.root.nodeType===11&&aC(this.dom.ownerDocument)==this.dom&&Sx(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 Wh(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 r in n)r=="class"?t.class+=" "+n[r]:r=="style"?t.style=(t.style?t.style+";":"")+n[r]:!t[r]&&r!="contenteditable"&&r!="nodeName"&&(t[r]=String(n[r]))}),t.translate||(t.translate="no"),[qe.node(0,e.state.doc.content.size,t)]}function Kh(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:qe.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function Qh(e){return!e.someProp("editable",t=>t(e.state)===!1)}function vx(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 Yh(e){let t=Object.create(null);function n(r){for(let i in r)Object.prototype.hasOwnProperty.call(t,i)||(t[i]=r[i])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function Px(e,t){let n=0,r=0;for(let i in e){if(e[i]!=t[i])return!0;n++}for(let i in t)r++;return n!=r}function zh(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")}function Sn(e,t){return e.meta={package:"@milkdown/core",group:"System",...t},e}var RA={text:(e,t,n,r)=>{const i=e.value;return/^[^*_\\]*\s+$/.test(i)?i:n.safe(i,{...r,encode:[]})},strong:(e,t,n,r)=>{const i=e.marker||n.options.strong||"*",u=n.enter("strong"),s=n.createTracker(r);let a=s.move(i+i);return a+=s.move(n.containerPhrasing(e,{before:a,after:i,...s.current()})),a+=s.move(i+i),u(),a},emphasis:(e,t,n,r)=>{const i=e.marker||n.options.emphasis||"*",u=n.enter("emphasis"),s=n.createTracker(r);let a=s.move(i);return a+=s.move(n.containerPhrasing(e,{before:a,after:i,...s.current()})),a+=s.move(i),u(),a}},Cn=fe({},"editorView"),vi=fe({},"editorState"),mo=fe([],"initTimer"),Gh=fe({},"editor"),lu=fe([],"inputRules"),wr=fe([],"prosePlugins"),cu=fe([],"remarkPlugins"),Hl=fe([],"nodeView"),Ul=fe([],"markView"),Ar=fe(El().use(fl).use(Al),"remark"),zi=fe({handlers:RA,encode:[]},"remarkStringifyOptions"),As=tn("ConfigReady");function Fx(e){const t=n=>(n.record(As),async()=>(await e(n),n.done(As),()=>{n.clearTimer(As)}));return Sn(t,{displayName:"Config"}),t}var Jr=tn("InitReady");function Hx(e){const t=n=>(n.inject(Gh,e).inject(wr,[]).inject(cu,[]).inject(lu,[]).inject(Hl,[]).inject(Ul,[]).inject(zi,{handlers:RA,encode:[]}).inject(Ar,El().use(fl).use(Al)).inject(mo,[As]).record(Jr),async()=>{await n.waitTimers(mo);const r=n.get(zi);return n.set(Ar,El().use(fl).use(Al,r)),n.done(Jr),()=>{n.remove(Gh).remove(wr).remove(cu).remove(lu).remove(Hl).remove(Ul).remove(zi).remove(Ar).remove(mo).clearTimer(Jr)}});return Sn(t,{displayName:"Init"}),t}var ht=tn("SchemaReady"),Ao=fe([],"schemaTimer"),xn=fe({},"schema"),Gi=fe([],"nodes"),Vi=fe([],"marks");function Vh(e){return{...e,parseDOM:e.parseDOM?.map(t=>({priority:e.priority,...t}))}}var MA=e=>(e.inject(xn,{}).inject(Gi,[]).inject(Vi,[]).inject(Ao,[Jr]).record(ht),async()=>{await e.waitTimers(Ao);const t=e.get(Ar),n=e.get(cu).reduce((i,u)=>i.use(u.plugin,u.options),t);e.set(Ar,n);const r=new D3({nodes:Object.fromEntries(e.get(Gi).map(([i,u])=>[i,Vh(u)])),marks:Object.fromEntries(e.get(Vi).map(([i,u])=>[i,Vh(u)]))});return e.set(xn,r),e.done(ht),()=>{e.remove(xn).remove(Gi).remove(Vi).remove(Ao).clearTimer(ht)}});Sn(MA,{displayName:"Schema"});var BA=class{constructor(){this.setCtx=e=>{this.#e=e},this.chain=()=>{if(this.#e==null)throw Ua();const e=this.#e,t=[],n=this.get.bind(this),r={run:()=>{const u=li(...t),s=e.get(Cn);return u(s.state,s.dispatch,s)},inline:u=>(t.push(u),r),pipe:i.bind(this)};function i(u,s){const a=n(u);return t.push(a(s)),r}return r}}#t=new wp;#e=null;get ctx(){return this.#e}create(e,t){const n=e.create(this.#t.sliceMap);return n.set(t),n}get(e){return this.#t.get(e).get()}remove(e){return this.#t.remove(e)}call(e,t){if(this.#e==null)throw Ua();const n=this.get(e)(t),r=this.#e.get(Cn);return n(r.state,r.dispatch,r)}inline(e){if(this.#e==null)throw Ua();const t=this.#e.get(Cn);return e(t.state,t.dispatch,t)}};function Ux(e="cmdKey"){return fe((()=>()=>!1),e)}var ye=fe(new BA,"commands"),go=fe([ht],"commandsTimer"),qi=tn("CommandsReady"),LA=e=>{const t=new BA;return t.setCtx(e),e.inject(ye,t).inject(go,[ht]).record(qi),async()=>(await e.waitTimers(go),e.done(qi),()=>{e.remove(ye).remove(go).clearTimer(qi)})};Sn(LA,{displayName:"Commands"});function Wx(e){return e.Backspace=li(DT,Ic,cT,Hm),e}var vA=class{constructor(){this.setCtx=e=>{this.#t=e},this.add=e=>(this.#e.push(e),()=>{this.#e=this.#e.filter(t=>t!==e)}),this.addObjectKeymap=e=>{const t=[];return Object.entries(e).forEach(([n,r])=>{if(typeof r=="function"){const i={key:n,onRun:()=>r};this.#e.push(i),t.push(()=>{this.#e=this.#e.filter(u=>u!==i)})}else this.#e.push(r),t.push(()=>{this.#e=this.#e.filter(i=>i!==r)})}),()=>{t.forEach(n=>n())}},this.addBaseKeymap=()=>{const e=Wx(wT);return this.addObjectKeymap(e)},this.build=()=>{const e={};return this.#e.forEach(t=>{e[t.key]=[...e[t.key]||[],t]}),Object.fromEntries(Object.entries(e).map(([t,n])=>{const r=n.sort((u,s)=>(s.priority??50)-(u.priority??50));return[t,(u,s,a)=>{const o=this.#t;if(o==null)throw da();return li(...r.map(l=>l.onRun(o)))(u,s,a)}]}))}}#t=null;#e=[];get ctx(){return this.#t}},Ws=fe(new vA,"keymap"),bo=fe([ht],"keymapTimer"),Ji=tn("KeymapReady"),Kx=e=>{const t=new vA;return t.setCtx(e),e.inject(Ws,t).inject(bo,[ht]).record(Ji),async()=>(await e.waitTimers(bo),e.done(Ji),()=>{e.remove(Ws).remove(bo).clearTimer(Ji)})},gs=tn("ParserReady"),PA=(()=>{throw da()}),bs=fe(PA,"parser"),Eo=fe([],"parserTimer"),FA=e=>(e.inject(bs,PA).inject(Eo,[ht]).record(gs),async()=>{await e.waitTimers(Eo);const t=e.get(Ar),n=e.get(xn);return e.set(bs,$T.create(n,t)),e.done(gs),()=>{e.remove(bs).remove(Eo).clearTimer(gs)}});Sn(FA,{displayName:"Parser"});var Es=tn("SerializerReady"),yo=fe([],"serializerTimer"),HA=(()=>{throw da()}),To=fe(HA,"serializer"),UA=e=>(e.inject(To,HA).inject(yo,[ht]).record(Es),async()=>{await e.waitTimers(yo);const t=e.get(Ar),n=e.get(xn);return e.set(To,tC.create(n,t)),e.done(Es),()=>{e.remove(To).remove(yo).clearTimer(Es)}});Sn(UA,{displayName:"Serializer"});var ys=fe("","defaultValue"),Co=fe(e=>e,"stateOptions"),xo=fe([],"editorStateTimer"),Ts=tn("EditorStateReady");function Qx(e,t,n){if(typeof e=="string")return t(e);if(e.type==="html")return yc.fromSchema(n).parse(e.dom);if(e.type==="json")return yn.fromJSON(n,e.value);throw Ib(e)}var Yx=new xt("MILKDOWN_STATE_TRACKER"),WA=e=>(e.inject(ys,"").inject(vi,{}).inject(Co,t=>t).inject(xo,[gs,Es,qi,Ji]).record(Ts),async()=>{await e.waitTimers(xo);const t=e.get(xn),n=e.get(bs),r=e.get(lu),i=e.get(Co),u=e.get(wr),s=Qx(e.get(ys),n,t),a=e.get(Ws),o=a.addBaseKeymap(),l=[...u,new Ct({key:Yx,state:{init:()=>{},apply:(f,p,m,A)=>{e.set(vi,A)}}}),PT({rules:r}),ZT(a.build())];e.set(wr,l);const c=i({schema:t,doc:s,plugins:l}),d=Gr.create(c);return e.set(vi,d),e.done(Ts),()=>{o(),e.remove(ys).remove(vi).remove(Co).remove(xo).clearTimer(Ts)}});Sn(WA,{displayName:"EditorState"});var du=fe([],"pasteRule"),ko=fe([ht],"pasteRuleTimer"),Cs=tn("PasteRuleReady"),KA=e=>(e.inject(du,[]).inject(ko,[ht]).record(Cs),async()=>(await e.waitTimers(ko),e.done(Cs),()=>{e.remove(du).remove(ko).clearTimer(Cs)}));Sn(KA,{displayName:"PasteRule"});var Io=tn("EditorViewReady"),So=fe([],"editorViewTimer"),wo=fe({},"editorViewOptions"),xs=fe(null,"root"),Wl=fe(null,"rootDOM"),Kl=fe({},"rootAttrs");function zx(e,t){const n=document.createElement("div");n.className="milkdown",e.appendChild(n),t.set(Wl,n);const r=t.get(Kl);return Object.entries(r).forEach(([i,u])=>n.setAttribute(i,u)),n}function Gx(e){e.classList.add("editor"),e.setAttribute("role","textbox")}var Vx=new xt("MILKDOWN_VIEW_CLEAR"),QA=e=>(e.inject(xs,document.body).inject(Cn,{}).inject(wo,{}).inject(Wl,null).inject(Kl,{}).inject(So,[Ts,Cs]).record(Io),async()=>{await e.wait(Jr);const t=e.get(xs)||document.body,n=typeof t=="string"?document.querySelector(t):t;e.update(wr,s=>[new Ct({key:Vx,view:a=>{const o=n?zx(n,e):void 0;return(()=>{if(o&&n){const c=a.dom;n.replaceChild(o,c),o.appendChild(c)}})(),{destroy:()=>{o?.parentNode&&o?.parentNode.replaceChild(a.dom,o),o?.remove()}}}}),...s]),await e.waitTimers(So);const r=e.get(vi),i=e.get(wo),u=new OA(n,{state:r,nodeViews:Object.fromEntries(e.get(Hl)),markViews:Object.fromEntries(e.get(Ul)),transformPasted:(s,a,o)=>(e.get(du).sort((l,c)=>(c.priority??50)-(l.priority??50)).map(l=>l.run).forEach(l=>{s=l(s,a,o)}),s),...i});return Gx(u.dom),e.set(Cn,u),e.done(Io),()=>{u?.destroy(),e.remove(xs).remove(Cn).remove(wo).remove(Wl).remove(Kl).remove(So).clearTimer(Io)}});Sn(QA,{displayName:"EditorView"});var St=(function(e){return e.Idle="Idle",e.OnCreate="OnCreate",e.Created="Created",e.OnDestroy="OnDestroy",e.Destroyed="Destroyed",e})({}),qx=class YA{constructor(){this.enableInspector=(t=!0)=>(this.#t=t,this),this.onStatusChange=t=>(this.#n=t,this),this.config=t=>(this.#r.push(t),this),this.removeConfig=t=>(this.#r=this.#r.filter(n=>n!==t),this),this.use=t=>{const n=[t].flat();return n.flat().forEach(r=>{this.#i.set(r,{ctx:void 0,handler:void 0,cleanup:void 0})}),this.#e===St.Created&&this.#c(n,this.#i),this},this.remove=async t=>this.#e===St.OnCreate?(console.warn("[Milkdown]: You are trying to remove plugins when the editor is creating, this is not recommended, please check your code."),new Promise(n=>{setTimeout(()=>{n(this.remove(t))},50)})):(await this.#d([t].flat(),!0),this),this.create=async()=>this.#e===St.OnCreate?this:(this.#e===St.Created&&await this.destroy(),this.#l(St.OnCreate),this.#h(),this.#c([...this.#i.keys()],this.#i),await Promise.all([this.#f(this.#s),this.#f(this.#i)].flat()),this.#l(St.Created),this),this.destroy=async(t=!1)=>this.#e===St.Destroyed||this.#e===St.OnDestroy?this:this.#e===St.OnCreate?new Promise(n=>{setTimeout(()=>{n(this.destroy(t))},50)}):(t&&(this.#r=[]),this.#l(St.OnDestroy),await this.#d([...this.#i.keys()],t),await this.#p(),this.#l(St.Destroyed),this),this.action=t=>t(this.#o),this.inspect=()=>this.#t?[...this.#s.values(),...this.#i.values()].map(({ctx:t})=>t?.inspector?.read()).filter(t=>!!t):(console.warn("[Milkdown]: You are trying to collect inspection when inspector is disabled, please enable inspector by `editor.enableInspector()` first."),[])}static make(){return new YA}#t=!1;#e=St.Idle;#r=[];#n=()=>{};#a=new wp;#u=new Pb;#i=new Map;#s=new Map;#o=new vb(this.#a,this.#u);#h=()=>{const t=Fx(async r=>{await Promise.all(this.#r.map(i=>Promise.resolve(i(r))))}),n=[MA,FA,UA,LA,Kx,KA,WA,QA,Hx(this),t];this.#c(n,this.#s)};#c=(t,n)=>{t.forEach(r=>{const i=this.#o.produce(this.#t?r.meta:void 0),u=r(i);n.set(r,{ctx:i,handler:u,cleanup:void 0})})};#d=(t,n=!1)=>Promise.all([t].flat().map(async r=>{const i=this.#i.get(r)?.cleanup;return n?this.#i.delete(r):this.#i.set(r,{ctx:void 0,handler:void 0,cleanup:void 0}),typeof i=="function"?i():i}));#p=async()=>{await Promise.all([...this.#s.entries()].map(async([t,{cleanup:n}])=>typeof n=="function"?n():n)),this.#s.clear()};#l=t=>{this.#e=t,this.#n(t)};#f=t=>[...t.entries()].map(async([n,r])=>{const{ctx:i,handler:u}=r;if(!u)return;const s=await u();t.set(n,{ctx:i,handler:u,cleanup:s})});get ctx(){return this.#o}get status(){return this.#e}};function ie(e,t){const n=Ux(e),r=i=>async()=>{r.key=n,await i.wait(qi);const u=t(i);return i.get(ye).create(n,u),r.run=s=>i.get(ye).call(e,s),()=>{i.get(ye).remove(n)}};return r}function mt(e){const t=n=>async()=>{await n.wait(ht);const r=e(n);return n.update(lu,i=>[...i,r]),t.inputRule=r,()=>{n.update(lu,i=>i.filter(u=>u!==r))}};return t}function Jx(e){const t=n=>async()=>{await n.wait(ht);const r=e(n);return n.update(du,i=>[...i,r]),t.pasteRule=r,()=>{n.update(du,i=>i.filter(u=>u!==r))}};return t}function jx(e,t){const n=r=>async()=>{const i=t(r);return r.update(Vi,u=>[...u.filter(s=>s[0]!==e),[e,i]]),n.id=e,n.schema=i,()=>{r.update(Vi,u=>u.filter(([s])=>s!==e))}};return n.type=r=>{const i=r.get(xn).marks[e];if(!i)throw Rb(e);return i},n}function Uc(e,t){const n=r=>async()=>{const i=t(r);return r.update(Gi,u=>[...u.filter(s=>s[0]!==e),[e,i]]),n.id=e,n.schema=i,()=>{r.update(Gi,u=>u.filter(([s])=>s!==e))}};return n.type=r=>{const i=r.get(xn).nodes[e];if(!i)throw Ob(e);return i},n}function wn(e){let t;const n=r=>async()=>(await r.wait(ht),t=e(r),r.update(wr,i=>[...i,t]),()=>{r.update(wr,i=>i.filter(u=>u!==t))});return n.plugin=()=>t,n.key=()=>t.spec.key,n}function Zx(e){const t=n=>async()=>{await n.wait(Ji);const r=n.get(Ws),i=e(n),u=r.addObjectKeymap(i);return t.keymap=i,()=>{u()}};return t}function $n(e,t){const n=fe(e,t),r=i=>(i.inject(n),()=>()=>{i.remove(n)});return r.key=n,r}function Fe(e,t){const n=$n(t,e),r=Uc(e,u=>u.get(n.key)(u)),i=[n,r];return i.id=r.id,i.node=r,i.type=u=>r.type(u),i.ctx=n,i.key=n.key,i.extendSchema=u=>Fe(e,u(t)),i}function ci(e,t){const n=$n(t,e),r=jx(e,u=>u.get(n.key)(u)),i=[n,r];return i.id=r.id,i.mark=r,i.type=u=>r.type(u),i.ctx=n,i.key=n.key,i.extendSchema=u=>ci(e,u(t)),i}function It(e,t){const n=$n(Object.fromEntries(Object.entries(t).map(([u,{shortcuts:s,priority:a}])=>[u,{shortcuts:s,priority:a}])),`${e}Keymap`),r=Zx(u=>{const s=u.get(n.key),a=Object.entries(t).flatMap(([o,{command:l}])=>{const c=s[o],d=[c.shortcuts].flat(),f=c.priority;return d.map(p=>[p,{key:p,onRun:l,priority:f}])});return Object.fromEntries(a)}),i=[n,r];return i.ctx=n,i.shortcuts=r,i.key=n.key,i.keymap=r.keymap,i}var Ut=(e,t=()=>({}))=>$n(t,`${e}Attr`),Ru=(e,t=()=>({}))=>$n(t,`${e}Attr`);function Rr(e,t,n){const r=$n({},e),i=s=>async()=>{await s.wait(Jr);const a={plugin:t(s),options:s.get(r.key)};return s.update(cu,o=>[...o,a]),()=>{s.update(cu,o=>o.filter(l=>l!==a))}},u=[r,i];return u.id=e,u.plugin=i,u.options=r,u}function Xx(){return e=>{const t=document.createElement("div"),n=e.get(xn),r=e.get(Cn),i=Or.fromSchema(n).serializeFragment(r.state.doc.content);return t.appendChild(i),t.innerHTML}}function $x(e,t){return function(n,r){let{$from:i,$to:u,node:s}=n.selection;if(s&&s.isBlock||i.depth<2||!i.sameParent(u))return!1;let a=i.node(-1);if(a.type!=e)return!1;if(i.parent.content.size==0&&i.node(-1).childCount==i.indexAfter(-1)){if(i.depth==3||i.node(-3).type!=e||i.index(-2)!=i.node(-2).childCount-1)return!1;if(r){let d=H.empty,f=i.index(-1)?1:i.index(-2)?2:3;for(let g=i.depth-f;g>=i.depth-3;g--)d=H.from(i.node(g).copy(d));let p=i.indexAfter(-1)<i.node(-2).childCount?1:i.indexAfter(-2)<i.node(-3).childCount?2:3;d=d.append(H.from(e.createAndFill()));let m=i.before(i.depth-(f-1)),A=n.tr.replace(m,i.after(-p),new z(d,4-f,0)),E=-1;A.doc.nodesBetween(m,A.doc.content.size,(g,N)=>{if(E>-1)return!1;g.isTextblock&&g.content.size==0&&(E=N+1)}),E>-1&&A.setSelection(ue.near(A.doc.resolve(E))),r(A.scrollIntoView())}return!0}let o=u.pos==i.end()?a.contentMatchAt(0).defaultType:null,l=n.tr.delete(i.pos,u.pos),c=o?[null,{type:o}]:void 0;return Ki(l.doc,i.pos,2,c)?(r&&r(l.split(i.pos,2,c).scrollIntoView()),!0):!1}}function e6(e){return function(t,n){let{$from:r,$to:i}=t.selection,u=r.blockRange(i,s=>s.childCount>0&&s.firstChild.type==e);return u?n?r.node(u.depth-1).type==e?t6(t,n,e,u):n6(t,n,u):!0:!1}}function t6(e,t,n,r){let i=e.tr,u=r.end,s=r.$to.end(r.depth);u<s&&(i.step(new Ze(u-1,s,u,s,new z(H.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new dm(i.doc.resolve(r.$from.pos),i.doc.resolve(s),r.depth));const a=ga(r);if(a==null)return!1;i.lift(r,a);let o=i.doc.resolve(i.mapping.map(u,-1)-1);return ba(i.doc,o.pos)&&o.nodeBefore.type==o.nodeAfter.type&&i.join(o.pos),t(i.scrollIntoView()),!0}function n6(e,t,n){let r=e.tr,i=n.parent;for(let p=n.end,m=n.endIndex-1,A=n.startIndex;m>A;m--)p-=i.child(m).nodeSize,r.delete(p-1,p+1);let u=r.doc.resolve(n.start),s=u.nodeAfter;if(r.mapping.map(n.end)!=n.start+u.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,o=n.endIndex==i.childCount,l=u.node(-1),c=u.index(-1);if(!l.canReplace(c+(a?0:1),c+1,s.content.append(o?H.empty:H.from(i))))return!1;let d=u.pos,f=d+s.nodeSize;return r.step(new Ze(d-(a?1:0),f+(o?1:0),d+1,f-1,new z((a?H.empty:H.from(i.copy(H.empty))).append(o?H.empty:H.from(i.copy(H.empty))),a?0:1,o?0:1),a?0:1)),t(r.scrollIntoView()),!0}function r6(e){return function(t,n){let{$from:r,$to:i}=t.selection,u=r.blockRange(i,l=>l.childCount>0&&l.firstChild.type==e);if(!u)return!1;let s=u.startIndex;if(s==0)return!1;let a=u.parent,o=a.child(s-1);if(o.type!=e)return!1;if(n){let l=o.lastChild&&o.lastChild.type==a.type,c=H.from(l?e.create():null),d=new z(H.from(e.create(null,H.from(a.type.create(null,c)))),l?3:1,0),f=u.start,p=u.end;n(t.tr.step(new Ze(f-(l?3:1),p,f,p,d,1,!0)).scrollIntoView())}return!0}}function i6(e){const t=new Map;if(!e||!e.type)throw new Error("mdast-util-definitions expected node");return oi(e,"definition",function(r){const i=qh(r.identifier);i&&!t.get(i)&&t.set(i,r)}),n;function n(r){const i=qh(r);return t.get(i)}}function qh(e){return String(e||"").toUpperCase()}function u6(){return function(e){const t=i6(e);oi(e,function(n,r,i){if(n.type==="definition"&&i!==void 0&&typeof r=="number")return i.children.splice(r,1),[ml,r];if(n.type==="imageReference"||n.type==="linkReference"){const u=t(n.identifier);if(u&&i&&typeof r=="number")return i.children[r]=n.type==="imageReference"?{type:"image",url:u.url,title:u.title,alt:n.alt}:{type:"link",url:u.url,title:u.title,children:n.children},[ml,r]}})}}function zA(e,t){if(!(t.childCount>=1&&t.lastChild?.type.name==="hardbreak")){e.next(t.content);return}const n=[];t.content.forEach((r,i,u)=>{u!==t.childCount-1&&n.push(r)}),e.next(H.fromArray(n))}function v(e,t){return Object.assign(e,{meta:{package:"@milkdown/preset-commonmark",...t}}),e}var Wc=Ru("emphasis");v(Wc,{displayName:"Attr<emphasis>",group:"Emphasis"});var di=ci("emphasis",e=>({attrs:{marker:{default:e.get(zi).emphasis||"*",validate:"string"}},parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style",getAttrs:t=>t==="italic"}],toDOM:t=>["em",e.get(Wc.key)(t)],parseMarkdown:{match:t=>t.type==="emphasis",runner:(t,n,r)=>{t.openMark(r,{marker:n.marker}),t.next(n.children),t.closeMark(r)}},toMarkdown:{match:t=>t.type.name==="emphasis",runner:(t,n)=>{t.withMark(n,"emphasis",void 0,{marker:n.attrs.marker})}}}));v(di.mark,{displayName:"MarkSchema<emphasis>",group:"Emphasis"});v(di.ctx,{displayName:"MarkSchemaCtx<emphasis>",group:"Emphasis"});var Kc=ie("ToggleEmphasis",e=>()=>Ta(di.type(e)));v(Kc,{displayName:"Command<toggleEmphasisCommand>",group:"Emphasis"});var GA=mt(e=>Nu(/(?:^|[^*])\*([^*]+)\*$/,di.type(e),{getAttr:()=>({marker:"*"}),updateCaptured:({fullMatch:t,start:n})=>t.startsWith("*")?{}:{fullMatch:t.slice(1),start:n+1}}));v(GA,{displayName:"InputRule<emphasis>|Star",group:"Emphasis"});var VA=mt(e=>Nu(/\b_(?![_\s])(.*?[^_\s])_\b/,di.type(e),{getAttr:()=>({marker:"_"}),updateCaptured:({fullMatch:t,start:n})=>t.startsWith("_")?{}:{fullMatch:t.slice(1),start:n+1}}));v(VA,{displayName:"InputRule<emphasis>|Underscore",group:"Emphasis"});var Qc=It("emphasisKeymap",{ToggleEmphasis:{shortcuts:"Mod-i",command:e=>{const t=e.get(ye);return()=>t.call(Kc.key)}}});v(Qc.ctx,{displayName:"KeymapCtx<emphasis>",group:"Emphasis"});v(Qc.shortcuts,{displayName:"Keymap<emphasis>",group:"Emphasis"});var Yc=Ru("strong");v(Yc,{displayName:"Attr<strong>",group:"Strong"});var Mu=ci("strong",e=>({attrs:{marker:{default:e.get(zi).strong||"*",validate:"string"}},parseDOM:[{tag:"b",getAttrs:t=>t.style.fontWeight!="normal"&&null},{tag:"strong"},{style:"font-style",getAttrs:t=>t==="bold"},{style:"font-weight=400",clearMark:t=>t.type.name=="strong"},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}],toDOM:t=>["strong",e.get(Yc.key)(t)],parseMarkdown:{match:t=>t.type==="strong",runner:(t,n,r)=>{t.openMark(r,{marker:n.marker}),t.next(n.children),t.closeMark(r)}},toMarkdown:{match:t=>t.type.name==="strong",runner:(t,n)=>{t.withMark(n,"strong",void 0,{marker:n.attrs.marker})}}}));v(Mu.mark,{displayName:"MarkSchema<strong>",group:"Strong"});v(Mu.ctx,{displayName:"MarkSchemaCtx<strong>",group:"Strong"});var zc=ie("ToggleStrong",e=>()=>Ta(Mu.type(e)));v(zc,{displayName:"Command<toggleStrongCommand>",group:"Strong"});var qA=mt(e=>Nu(new RegExp("(?<![\\w:/])(?:\\*\\*|__)([^*_]+?)(?:\\*\\*|__)(?![\\w/])$"),Mu.type(e),{getAttr:t=>({marker:t[0].startsWith("*")?"*":"_"})}));v(qA,{displayName:"InputRule<strong>",group:"Strong"});var Gc=It("strongKeymap",{ToggleBold:{shortcuts:["Mod-b"],command:e=>{const t=e.get(ye);return()=>t.call(zc.key)}}});v(Gc.ctx,{displayName:"KeymapCtx<strong>",group:"Strong"});v(Gc.shortcuts,{displayName:"Keymap<strong>",group:"Strong"});var Vc=Ru("inlineCode");v(Vc,{displayName:"Attr<inlineCode>",group:"InlineCode"});var Un=ci("inlineCode",e=>({priority:100,code:!0,parseDOM:[{tag:"code"}],toDOM:t=>["code",e.get(Vc.key)(t)],parseMarkdown:{match:t=>t.type==="inlineCode",runner:(t,n,r)=>{t.openMark(r),t.addText(n.value),t.closeMark(r)}},toMarkdown:{match:t=>t.type.name==="inlineCode",runner:(t,n,r)=>(t.withMark(n,"inlineCode",r.text||""),!0)}}));v(Un.mark,{displayName:"MarkSchema<inlineCode>",group:"InlineCode"});v(Un.ctx,{displayName:"MarkSchemaCtx<inlineCode>",group:"InlineCode"});var qc=ie("ToggleInlineCode",e=>()=>(t,n)=>{const{selection:r,tr:i}=t;if(r.empty)return!1;const{from:u,to:s}=r;return t.doc.rangeHasMark(u,s,Un.type(e))?(n?.(i.removeMark(u,s,Un.type(e))),!0):(Object.keys(t.schema.marks).filter(a=>a!==Un.type.name).map(a=>t.schema.marks[a]).forEach(a=>{i.removeMark(u,s,a)}),n?.(i.addMark(u,s,Un.type(e).create())),!0)});v(qc,{displayName:"Command<toggleInlineCodeCommand>",group:"InlineCode"});var JA=mt(e=>Nu(/(?:`)([^`]+)(?:`)$/,Un.type(e)));v(JA,{displayName:"InputRule<inlineCodeInputRule>",group:"InlineCode"});var Jc=It("inlineCodeKeymap",{ToggleInlineCode:{shortcuts:"Mod-e",command:e=>{const t=e.get(ye);return()=>t.call(qc.key)}}});v(Jc.ctx,{displayName:"KeymapCtx<inlineCode>",group:"InlineCode"});v(Jc.shortcuts,{displayName:"Keymap<inlineCode>",group:"InlineCode"});var jc=Ru("link");v(jc,{displayName:"Attr<link>",group:"Link"});var jr=ci("link",e=>({attrs:{href:{validate:"string"},title:{default:null,validate:"string|null"}},parseDOM:[{tag:"a[href]",getAttrs:t=>{if(!(t instanceof HTMLElement))throw en(t);return{href:t.getAttribute("href"),title:t.getAttribute("title")}}}],toDOM:t=>["a",{...e.get(jc.key)(t),...t.attrs}],parseMarkdown:{match:t=>t.type==="link",runner:(t,n,r)=>{const i=n.url,u=n.title;t.openMark(r,{href:i,title:u}),t.next(n.children),t.closeMark(r)}},toMarkdown:{match:t=>t.type.name==="link",runner:(t,n)=>{t.withMark(n,"link",void 0,{title:n.attrs.title,url:n.attrs.href})}}}));v(jr.mark,{displayName:"MarkSchema<link>",group:"Link"});var jA=ie("ToggleLink",e=>(t={})=>Ta(jr.type(e),t));v(jA,{displayName:"Command<toggleLinkCommand>",group:"Link"});var ZA=ie("UpdateLink",e=>(t={})=>(n,r)=>{if(!r)return!1;let i,u=-1;const{selection:s}=n,{from:a,to:o}=s;if(n.doc.nodesBetween(a,a===o?o+1:o,(m,A)=>{if(jr.type(e).isInSet(m.marks))return i=m,u=A,!1}),!i)return!1;const l=i.marks.find(({type:m})=>m===jr.type(e));if(!l)return!1;const c=u,d=u+i.nodeSize,{tr:f}=n,p=jr.type(e).create({...l.attrs,...t});return p?(r(f.removeMark(c,d,l).addMark(c,d,p).setSelection(new ae(f.selection.$anchor)).scrollIntoView()),!0):!1});v(ZA,{displayName:"Command<updateLinkCommand>",group:"Link"});var XA=Uc("doc",()=>({content:"block+",parseMarkdown:{match:({type:e})=>e==="root",runner:(e,t,n)=>{e.injectRoot(t,n)}},toMarkdown:{match:e=>e.type.name==="doc",runner:(e,t)=>{e.openNode("root"),e.next(t.content)}}}));v(XA,{displayName:"NodeSchema<doc>",group:"Doc"});function s6(e){return mc(e,t=>t.type==="html"&&["<br />","<br>","<br >","<br/>"].includes(t.value?.trim()),(t,n)=>{if(!n.length)return;const r=n[n.length-1];if(!r)return;const i=r.children.indexOf(t);i!==-1&&r.children.splice(i,1)},!0)}var Ia=Rr("remark-preserve-empty-line",()=>()=>s6);v(Ia.plugin,{displayName:"Remark<remarkPreserveEmptyLine>",group:"Remark"});v(Ia.options,{displayName:"RemarkConfig<remarkPreserveEmptyLine>",group:"Remark"});var Zc=Ut("paragraph");v(Zc,{displayName:"Attr<paragraph>",group:"Paragraph"});var $t=Fe("paragraph",e=>({content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM:t=>["p",e.get(Zc.key)(t),0],parseMarkdown:{match:t=>t.type==="paragraph",runner:(t,n,r)=>{t.openNode(r),n.children?t.next(n.children):t.addText(n.value||""),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="paragraph",runner:(t,n)=>{const r=e.get(Cn).state?.doc.lastChild;t.openNode("paragraph"),(!n.content||n.content.size===0)&&n!==r&&a6(e)?t.addNode("html",void 0,"<br />"):zA(t,n),t.closeNode()}}}));function a6(e){let t=!1;try{e.get(Ia.id),t=!0}catch{t=!1}return t}v($t.node,{displayName:"NodeSchema<paragraph>",group:"Paragraph"});v($t.ctx,{displayName:"NodeSchemaCtx<paragraph>",group:"Paragraph"});var Xc=ie("TurnIntoText",e=>()=>uu($t.type(e)));v(Xc,{displayName:"Command<turnIntoTextCommand>",group:"Paragraph"});var $c=It("paragraphKeymap",{TurnIntoText:{shortcuts:"Mod-Alt-0",command:e=>{const t=e.get(ye);return()=>t.call(Xc.key)}}});v($c.ctx,{displayName:"KeymapCtx<paragraph>",group:"Paragraph"});v($c.shortcuts,{displayName:"Keymap<paragraph>",group:"Paragraph"});var o6=Array(6).fill(0).map((e,t)=>t+1);function l6(e){return e.textContent.toLowerCase().trim().replace(/\s+/g,"-")}var Sa=$n(l6,"headingIdGenerator");v(Sa,{displayName:"Ctx<HeadingIdGenerator>",group:"Heading"});var ed=Ut("heading");v(ed,{displayName:"Attr<heading>",group:"Heading"});var Mr=Fe("heading",e=>{const t=e.get(Sa.key);return{content:"inline*",group:"block",defining:!0,attrs:{id:{default:"",validate:"string"},level:{default:1,validate:"number"}},parseDOM:o6.map(n=>({tag:`h${n}`,getAttrs:r=>{if(!(r instanceof HTMLElement))throw en(r);return{level:n,id:r.id}}})),toDOM:n=>[`h${n.attrs.level}`,{...e.get(ed.key)(n),id:n.attrs.id||t(n)},0],parseMarkdown:{match:({type:n})=>n==="heading",runner:(n,r,i)=>{const u=r.depth;n.openNode(i,{level:u}),n.next(r.children),n.closeNode()}},toMarkdown:{match:n=>n.type.name==="heading",runner:(n,r)=>{n.openNode("heading",void 0,{depth:r.attrs.level}),zA(n,r),n.closeNode()}}}});v(Mr.node,{displayName:"NodeSchema<heading>",group:"Heading"});v(Mr.ctx,{displayName:"NodeSchemaCtx<heading>",group:"Heading"});var $A=mt(e=>Ym(/^(?<hashes>#+)\s$/,Mr.type(e),t=>{const n=t.groups?.hashes?.length||0,{$from:r}=e.get(Cn).state.selection,i=r.node();if(i.type.name==="heading"){let u=Number(i.attrs.level)+Number(n);return u>6&&(u=6),{level:u}}return{level:n}}));v($A,{displayName:"InputRule<wrapInHeadingInputRule>",group:"Heading"});var Bn=ie("WrapInHeading",e=>t=>(t??=1,t<1?uu($t.type(e)):uu(Mr.type(e),{level:t})));v(Bn,{displayName:"Command<wrapInHeadingCommand>",group:"Heading"});var td=ie("DowngradeHeading",e=>()=>(t,n,r)=>{const{$from:i}=t.selection,u=i.node();if(u.type!==Mr.type(e)||!t.selection.empty||i.parentOffset!==0)return!1;const s=u.attrs.level-1;return s?(n?.(t.tr.setNodeMarkup(t.selection.$from.before(),void 0,{...u.attrs,level:s})),!0):uu($t.type(e))(t,n,r)});v(td,{displayName:"Command<downgradeHeadingCommand>",group:"Heading"});var nd=It("headingKeymap",{TurnIntoH1:{shortcuts:"Mod-Alt-1",command:e=>{const t=e.get(ye);return()=>t.call(Bn.key,1)}},TurnIntoH2:{shortcuts:"Mod-Alt-2",command:e=>{const t=e.get(ye);return()=>t.call(Bn.key,2)}},TurnIntoH3:{shortcuts:"Mod-Alt-3",command:e=>{const t=e.get(ye);return()=>t.call(Bn.key,3)}},TurnIntoH4:{shortcuts:"Mod-Alt-4",command:e=>{const t=e.get(ye);return()=>t.call(Bn.key,4)}},TurnIntoH5:{shortcuts:"Mod-Alt-5",command:e=>{const t=e.get(ye);return()=>t.call(Bn.key,5)}},TurnIntoH6:{shortcuts:"Mod-Alt-6",command:e=>{const t=e.get(ye);return()=>t.call(Bn.key,6)}},DowngradeHeading:{shortcuts:["Delete","Backspace"],command:e=>{const t=e.get(ye);return()=>t.call(td.key)}}});v(nd.ctx,{displayName:"KeymapCtx<heading>",group:"Heading"});v(nd.shortcuts,{displayName:"Keymap<heading>",group:"Heading"});var rd=Ut("blockquote");v(rd,{displayName:"Attr<blockquote>",group:"Blockquote"});var Bu=Fe("blockquote",e=>({content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:t=>["blockquote",e.get(rd.key)(t),0],parseMarkdown:{match:({type:t})=>t==="blockquote",runner:(t,n,r)=>{t.openNode(r).next(n.children).closeNode()}},toMarkdown:{match:t=>t.type.name==="blockquote",runner:(t,n)=>{t.openNode("blockquote").next(n.content).closeNode()}}}));v(Bu.node,{displayName:"NodeSchema<blockquote>",group:"Blockquote"});v(Bu.ctx,{displayName:"NodeSchemaCtx<blockquote>",group:"Blockquote"});var e1=mt(e=>Dc(/^\s*>\s$/,Bu.type(e)));v(e1,{displayName:"InputRule<wrapInBlockquoteInputRule>",group:"Blockquote"});var id=ie("WrapInBlockquote",e=>()=>Nc(Bu.type(e)));v(id,{displayName:"Command<wrapInBlockquoteCommand>",group:"Blockquote"});var ud=It("blockquoteKeymap",{WrapInBlockquote:{shortcuts:"Mod-Shift-b",command:e=>{const t=e.get(ye);return()=>t.call(id.key)}}});v(ud.ctx,{displayName:"KeymapCtx<blockquote>",group:"Blockquote"});v(ud.shortcuts,{displayName:"Keymap<blockquote>",group:"Blockquote"});var sd=Ut("codeBlock",()=>({pre:{},code:{}}));v(sd,{displayName:"Attr<codeBlock>",group:"CodeBlock"});var Lu=Fe("code_block",e=>({content:"text*",group:"block",marks:"",defining:!0,code:!0,attrs:{language:{default:"",validate:"string"}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:t=>{if(!(t instanceof HTMLElement))throw en(t);return{language:t.dataset.language}}}],toDOM:t=>{const n=e.get(sd.key)(t),r=t.attrs.language,i=r&&r.length>0?{"data-language":r}:void 0;return["pre",{...n.pre,...i},["code",n.code,0]]},parseMarkdown:{match:({type:t})=>t==="code",runner:(t,n,r)=>{const i=n.lang??"",u=n.value;t.openNode(r,{language:i}),u&&t.addText(u),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="code_block",runner:(t,n)=>{t.addNode("code",void 0,n.content.firstChild?.text||"",{lang:n.attrs.language})}}}));v(Lu.node,{displayName:"NodeSchema<codeBlock>",group:"CodeBlock"});v(Lu.ctx,{displayName:"NodeSchemaCtx<codeBlock>",group:"CodeBlock"});var t1=mt(e=>Ym(/^```(?<language>[a-z]*)?[\s\n]$/,Lu.type(e),t=>({language:t.groups?.language??""})));v(t1,{displayName:"InputRule<createCodeBlockInputRule>",group:"CodeBlock"});var ad=ie("CreateCodeBlock",e=>(t="")=>uu(Lu.type(e),{language:t}));v(ad,{displayName:"Command<createCodeBlockCommand>",group:"CodeBlock"});var c6=ie("UpdateCodeBlockLanguage",()=>({pos:e,language:t}={pos:-1,language:""})=>(n,r)=>e>=0?(r?.(n.tr.setNodeAttribute(e,"language",t)),!0):!1);v(c6,{displayName:"Command<updateCodeBlockLanguageCommand>",group:"CodeBlock"});var od=It("codeBlockKeymap",{CreateCodeBlock:{shortcuts:"Mod-Alt-c",command:e=>{const t=e.get(ye);return()=>t.call(ad.key)}}});v(od.ctx,{displayName:"KeymapCtx<codeBlock>",group:"CodeBlock"});v(od.shortcuts,{displayName:"Keymap<codeBlock>",group:"CodeBlock"});var ld=Ut("image");v(ld,{displayName:"Attr<image>",group:"Image"});var fi=Fe("image",e=>({inline:!0,group:"inline",selectable:!0,draggable:!0,marks:"",atom:!0,defining:!0,isolating:!0,attrs:{src:{default:"",validate:"string"},alt:{default:"",validate:"string"},title:{default:"",validate:"string"}},parseDOM:[{tag:"img[src]",getAttrs:t=>{if(!(t instanceof HTMLElement))throw en(t);return{src:t.getAttribute("src")||"",alt:t.getAttribute("alt")||"",title:t.getAttribute("title")||t.getAttribute("alt")||""}}}],toDOM:t=>["img",{...e.get(ld.key)(t),...t.attrs}],parseMarkdown:{match:({type:t})=>t==="image",runner:(t,n,r)=>{const i=n.url,u=n.alt,s=n.title;t.addNode(r,{src:i,alt:u,title:s})}},toMarkdown:{match:t=>t.type.name==="image",runner:(t,n)=>{t.addNode("image",void 0,void 0,{title:n.attrs.title,url:n.attrs.src,alt:n.attrs.alt})}}}));v(fi.node,{displayName:"NodeSchema<image>",group:"Image"});v(fi.ctx,{displayName:"NodeSchemaCtx<image>",group:"Image"});var n1=ie("InsertImage",e=>(t={})=>(n,r)=>{if(!r)return!0;const{src:i="",alt:u="",title:s=""}=t,a=fi.type(e).create({src:i,alt:u,title:s});return a&&r(n.tr.replaceSelectionWith(a).scrollIntoView()),!0});v(n1,{displayName:"Command<insertImageCommand>",group:"Image"});var r1=ie("UpdateImage",e=>(t={})=>(n,r)=>{const i=KT(n.selection,fi.type(e));if(!i)return!1;const{node:u,pos:s}=i,a={...u.attrs},{src:o,alt:l,title:c}=t;return o!==void 0&&(a.src=o),l!==void 0&&(a.alt=l),c!==void 0&&(a.title=c),r?.(n.tr.setNodeMarkup(s,void 0,a).scrollIntoView()),!0});v(r1,{displayName:"Command<updateImageCommand>",group:"Image"});var d6=mt(e=>new kt(/!\[(?<alt>.*?)]\((?<filename>.*?)\s*(?="|\))"?(?<title>[^"]+)?"?\)/,(t,n,r,i)=>{const[u,s,a="",o]=n;return u?t.tr.replaceWith(r,i,fi.type(e).create({src:a,alt:s,title:o})):null}));v(d6,{displayName:"InputRule<insertImageInputRule>",group:"Image"});var Ks=Ut("hardbreak",e=>({"data-type":"hardbreak","data-is-inline":e.attrs.isInline}));v(Ks,{displayName:"Attr<hardbreak>",group:"Hardbreak"});var gr=Fe("hardbreak",e=>({inline:!0,group:"inline",attrs:{isInline:{default:!1,validate:"boolean"}},selectable:!1,parseDOM:[{tag:"br"},{tag:'span[data-type="hardbreak"]',getAttrs:()=>({isInline:!0})}],toDOM:t=>t.attrs.isInline?["span",e.get(Ks.key)(t)," "]:["br",e.get(Ks.key)(t)],parseMarkdown:{match:({type:t})=>t==="break",runner:(t,n,r)=>{t.addNode(r,{isInline:!!n.data?.isInline})}},leafText:()=>`
|
|
44
45
|
`,toMarkdown:{match:t=>t.type.name==="hardbreak",runner:(t,n)=>{n.attrs.isInline?t.addNode("text",void 0,`
|
|
45
|
-
`):t.addNode("break")}}}));H(xr.node,{displayName:"NodeSchema<hardbreak>",group:"Hardbreak"});H(xr.ctx,{displayName:"NodeSchemaCtx<hardbreak>",group:"Hardbreak"});var Ed=le("InsertHardbreak",e=>()=>(t,n)=>{const{selection:r,tr:i}=t;if(!(r instanceof de))return!1;if(r.empty){const u=r.$from.node();if(u.childCount>0&&u.lastChild?.type.name==="hardbreak")return n?.(i.replaceRangeWith(r.to-1,r.to,t.schema.node("paragraph")).setSelection(ce.near(i.doc.resolve(r.to))).scrollIntoView()),!0}return n?.(i.setMeta("hardbreak",!0).replaceSelectionWith(xr.type(e).create()).scrollIntoView()),!0});H(Ed,{displayName:"Command<insertHardbreakCommand>",group:"Hardbreak"});var yd=_t("hardbreakKeymap",{InsertHardbreak:{shortcuts:"Shift-Enter",command:e=>{const t=e.get(ke);return()=>t.call(Ed.key)}}});H(yd.ctx,{displayName:"KeymapCtx<hardbreak>",group:"Hardbreak"});H(yd.shortcuts,{displayName:"Keymap<hardbreak>",group:"Hardbreak"});var Td=Yt("hr");H(Td,{displayName:"Attr<hr>",group:"Hr"});var Qu=Qe("hr",e=>({group:"block",parseDOM:[{tag:"hr"}],toDOM:t=>["hr",e.get(Td.key)(t)],parseMarkdown:{match:({type:t})=>t==="thematicBreak",runner:(t,n,r)=>{t.addNode(r)}},toMarkdown:{match:t=>t.type.name==="hr",runner:t=>{t.addNode("thematicBreak")}}}));H(Qu.node,{displayName:"NodeSchema<hr>",group:"Hr"});H(Qu.ctx,{displayName:"NodeSchemaCtx<hr>",group:"Hr"});var g1=yt(e=>new Dt(/^(?:---|___\s|\*\*\*\s)$/,(t,n,r,i)=>{const{tr:u}=t;return n[0]&&u.replaceWith(r-1,i,Qu.type(e).create()),u}));H(g1,{displayName:"InputRule<insertHrInputRule>",group:"Hr"});var b1=le("InsertHr",e=>()=>(t,n)=>{if(!n)return!0;const r=un.node.type(e).create(),{tr:i,selection:u}=t,{from:s}=u,a=Qu.type(e).create();if(!a)return!0;const o=i.replaceSelectionWith(a).insert(s,r),l=ce.findFrom(o.doc.resolve(s),1,!0);return l&&n(o.setSelection(l).scrollIntoView()),!0});H(b1,{displayName:"Command<insertHrCommand>",group:"Hr"});var Cd=Yt("bulletList");H(Cd,{displayName:"Attr<bulletList>",group:"BulletList"});var Ei=Qe("bullet_list",e=>({content:"listItem+",group:"block",attrs:{spread:{default:!1,validate:"boolean"}},parseDOM:[{tag:"ul",getAttrs:t=>{if(!(t instanceof HTMLElement))throw sn(t);return{spread:t.dataset.spread==="true"}}}],toDOM:t=>["ul",{...e.get(Cd.key)(t),"data-spread":t.attrs.spread},0],parseMarkdown:{match:({type:t,ordered:n})=>t==="list"&&!n,runner:(t,n,r)=>{const i=n.spread!=null?`${n.spread}`:"false";t.openNode(r,{spread:i}).next(n.children).closeNode()}},toMarkdown:{match:t=>t.type.name==="bullet_list",runner:(t,n)=>{t.openNode("list",void 0,{ordered:!1,spread:n.attrs.spread}).next(n.content).closeNode()}}}));H(Ei.node,{displayName:"NodeSchema<bulletList>",group:"BulletList"});H(Ei.ctx,{displayName:"NodeSchemaCtx<bulletList>",group:"BulletList"});var E1=yt(e=>Pc(/^\s*([-+*])\s$/,Ei.type(e)));H(E1,{displayName:"InputRule<wrapInBulletListInputRule>",group:"BulletList"});var xd=le("WrapInBulletList",e=>()=>Fc(Ei.type(e)));H(xd,{displayName:"Command<wrapInBulletListCommand>",group:"BulletList"});var kd=_t("bulletListKeymap",{WrapInBulletList:{shortcuts:"Mod-Alt-8",command:e=>{const t=e.get(ke);return()=>t.call(xd.key)}}});H(kd.ctx,{displayName:"KeymapCtx<bulletListKeymap>",group:"BulletList"});H(kd.shortcuts,{displayName:"Keymap<bulletListKeymap>",group:"BulletList"});var Sd=Yt("orderedList");H(Sd,{displayName:"Attr<orderedList>",group:"OrderedList"});var yi=Qe("ordered_list",e=>({content:"listItem+",group:"block",attrs:{order:{default:1,validate:"number"},spread:{default:!1,validate:"boolean"}},parseDOM:[{tag:"ol",getAttrs:t=>{if(!(t instanceof HTMLElement))throw sn(t);return{spread:t.dataset.spread,order:t.hasAttribute("start")?Number(t.getAttribute("start")):1}}}],toDOM:t=>["ol",{...e.get(Sd.key)(t),...t.attrs.order===1?{}:{start:t.attrs.order},"data-spread":t.attrs.spread},0],parseMarkdown:{match:({type:t,ordered:n})=>t==="list"&&!!n,runner:(t,n,r)=>{const i=n.spread!=null?`${n.spread}`:"true";t.openNode(r,{spread:i,order:n.start??1}).next(n.children).closeNode()}},toMarkdown:{match:t=>t.type.name==="ordered_list",runner:(t,n)=>{t.openNode("list",void 0,{ordered:!0,start:n.attrs.order??1,spread:n.attrs.spread==="true"}),t.next(n.content),t.closeNode()}}}));H(yi.node,{displayName:"NodeSchema<orderedList>",group:"OrderedList"});H(yi.ctx,{displayName:"NodeSchemaCtx<orderedList>",group:"OrderedList"});var y1=yt(e=>Pc(/^\s*(\d+)\.\s$/,yi.type(e),t=>({order:Number(t[1])}),(t,n)=>n.childCount+n.attrs.order===Number(t[1])));H(y1,{displayName:"InputRule<wrapInOrderedListInputRule>",group:"OrderedList"});var Id=le("WrapInOrderedList",e=>()=>Fc(yi.type(e)));H(Id,{displayName:"Command<wrapInOrderedListCommand>",group:"OrderedList"});var wd=_t("orderedListKeymap",{WrapInOrderedList:{shortcuts:"Mod-Alt-7",command:e=>{const t=e.get(ke);return()=>t.call(Id.key)}}});H(wd.ctx,{displayName:"KeymapCtx<orderedList>",group:"OrderedList"});H(wd.shortcuts,{displayName:"Keymap<orderedList>",group:"OrderedList"});var Nd=Yt("listItem");H(Nd,{displayName:"Attr<listItem>",group:"ListItem"});var Rn=Qe("list_item",e=>({group:"listItem",content:"paragraph block*",attrs:{label:{default:"•",validate:"string"},listType:{default:"bullet",validate:"string"},spread:{default:!0,validate:"boolean"}},defining:!0,parseDOM:[{tag:"li",getAttrs:t=>{if(!(t instanceof HTMLElement))throw sn(t);return{label:t.dataset.label,listType:t.dataset.listType,spread:t.dataset.spread==="true"}}}],toDOM:t=>["li",{...e.get(Nd.key)(t),"data-label":t.attrs.label,"data-list-type":t.attrs.listType,"data-spread":t.attrs.spread},0],parseMarkdown:{match:({type:t})=>t==="listItem",runner:(t,n,r)=>{const i=n.label!=null?`${n.label}.`:"•",u=n.label!=null?"ordered":"bullet",s=n.spread!=null?`${n.spread}`:"true";t.openNode(r,{label:i,listType:u,spread:s}),t.next(n.children),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="list_item",runner:(t,n)=>{t.openNode("listItem",void 0,{spread:n.attrs.spread}),t.next(n.content),t.closeNode()}}}));H(Rn.node,{displayName:"NodeSchema<listItem>",group:"ListItem"});H(Rn.ctx,{displayName:"NodeSchemaCtx<listItem>",group:"ListItem"});var Dd=le("SinkListItem",e=>()=>xk(Rn.type(e)));H(Dd,{displayName:"Command<sinkListItemCommand>",group:"ListItem"});var _d=le("LiftListItem",e=>()=>yk(Rn.type(e)));H(_d,{displayName:"Command<liftListItemCommand>",group:"ListItem"});var Od=le("SplitListItem",e=>()=>Ek(Rn.type(e)));H(Od,{displayName:"Command<splitListItemCommand>",group:"ListItem"});function Rk(e){return(t,n,r)=>{const{selection:i}=t;if(!(i instanceof de))return!1;const{empty:u,$from:s}=i;return!u||s.parentOffset!==0||s.node(-1).type!==Rn.type(e)?!1:Zm(t,n,r)}}var Rd=le("LiftFirstListItem",e=>()=>Rk(e));H(Rd,{displayName:"Command<liftFirstListItemCommand>",group:"ListItem"});var Md=_t("listItemKeymap",{NextListItem:{shortcuts:"Enter",command:e=>{const t=e.get(ke);return()=>t.call(Od.key)}},SinkListItem:{shortcuts:["Tab","Mod-]"],command:e=>{const t=e.get(ke);return()=>t.call(Dd.key)}},LiftListItem:{shortcuts:["Shift-Tab","Mod-["],command:e=>{const t=e.get(ke);return()=>t.call(_d.key)}},LiftFirstListItem:{shortcuts:["Backspace","Delete"],command:e=>{const t=e.get(ke);return()=>t.call(Rd.key)}}});H(Md.ctx,{displayName:"KeymapCtx<listItem>",group:"ListItem"});H(Md.shortcuts,{displayName:"Keymap<listItem>",group:"ListItem"});var T1=Jc("text",()=>({group:"inline",parseMarkdown:{match:({type:e})=>e==="text",runner:(e,t)=>{e.addText(t.value)}},toMarkdown:{match:e=>e.type.name==="text",runner:(e,t)=>{e.addNode("text",void 0,t.text)}}}));H(T1,{displayName:"NodeSchema<text>",group:"Text"});var Bd=Yt("html");H(Bd,{displayName:"Attr<html>",group:"Html"});var Ld=Qe("html",e=>({atom:!0,group:"inline",inline:!0,attrs:{value:{default:"",validate:"string"}},toDOM:t=>{const n=document.createElement("span"),r={...e.get(Bd.key)(t),"data-value":t.attrs.value,"data-type":"html"};return n.textContent=t.attrs.value,["span",r,t.attrs.value]},parseDOM:[{tag:'span[data-type="html"]',getAttrs:t=>({value:t.dataset.value??""})}],parseMarkdown:{match:({type:t})=>t==="html",runner:(t,n,r)=>{t.addNode(r,{value:n.value})}},toMarkdown:{match:t=>t.type.name==="html",runner:(t,n)=>{t.addNode("html",void 0,n.attrs.value)}}}));H(Ld.node,{displayName:"NodeSchema<html>",group:"Html"});H(Ld.ctx,{displayName:"NodeSchemaCtx<html>",group:"Html"});var Mk=[d1,sd,un,Ba,ld,Hr,Js,xr,fd,Uu,md,Wu,Td,Qu,bd,bi,Cd,Ei,Sd,yi,Nd,Rn,jc,gi,$c,Hu,nd,qn,ud,ni,Bd,Ld,T1].flat(),Bk=[h1,E1,y1,p1,g1,f1].flat(),Lk=[u1,s1,o1,a1],vk=le("IsMarkSelected",()=>e=>t=>{if(!e)return!1;const{doc:n,selection:r}=t;return n.rangeHasMark(r.from,r.to,e)}),Fk=le("IsNoteSelected",()=>e=>t=>e?lC(t,e).hasNode:!1),Pk=le("ClearTextInCurrentBlock",()=>()=>(e,t)=>{let n=e.tr;const{$from:r,$to:i}=n.selection,{pos:u}=r,{pos:s}=i,a=u-r.node().content.size;return a<0?!1:(n=n.deleteRange(a,s),t?.(n),!0)}),Hk=le("SetBlockType",()=>e=>(t,n)=>{const{nodeType:r,attrs:i=null}=e??{};if(!r)return!1;const u=t.tr,{from:s,to:a}=u.selection;try{u.setBlockType(s,a,r,i)}catch{return!1}return n?.(u),!0}),Uk=le("WrapInBlockType",()=>e=>(t,n)=>{const{nodeType:r,attrs:i=null}=e??{};if(!r)return!1;let u=t.tr;try{const{$from:s,$to:a}=u.selection,o=s.blockRange(a),l=o&&Rc(o,r,i);if(!l)return!1;u=u.wrap(o,l)}catch{return!1}return n?.(u),!0}),Wk=le("AddBlockType",()=>e=>(t,n)=>{const{nodeType:r,attrs:i=null}=e??{};if(!r)return!1;const u=t.tr;try{const s=r instanceof kn?r:r.createAndFill(i);if(!s)return!1;u.replaceSelectionWith(s)}catch{return!1}return n?.(u),!0}),Qk=le("SelectTextNearPos",()=>e=>(t,n)=>{const{pos:r}=e??{};if(r==null)return!1;const i=(s,a,o)=>Math.min(Math.max(s,a),o),u=t.tr;try{const s=t.doc.resolve(i(r,0,t.doc.content.size));u.setSelection(de.near(s))}catch{return!1}return n?.(u.scrollIntoView()),!0}),zk=[ad,hd,Hn,cd,Ad,Ed,b1,m1,A1,Id,xd,Dd,Od,_d,Rd,Zc,rd,ed,l1,c1,vk,Fk,Pk,Hk,Uk,Wk,Qk],Kk=[pd,gd,yd,dd,Md,wd,kd,od,Xc,id,td].flat(),vd=Pr("remarkAddOrderInList",()=>()=>e=>{pi(e,"list",t=>{if(t.ordered){const n=t.start??1;t.children.forEach((r,i)=>{r.label=i+n})}})});H(vd.plugin,{displayName:"Remark<remarkAddOrderInListPlugin>",group:"Remark"});H(vd.options,{displayName:"RemarkConfig<remarkAddOrderInListPlugin>",group:"Remark"});var Fd=Pr("remarkLineBreak",()=>()=>e=>{const t=/[\t ]*(?:\r?\n|\r)/g;pi(e,"text",(n,r,i)=>{if(!n.value||typeof n.value!="string")return;const u=[];let s=0;t.lastIndex=0;let a=t.exec(n.value);for(;a;){const o=a.index;s!==o&&u.push({type:"text",value:n.value.slice(s,o)}),u.push({type:"break",data:{isInline:!0}}),s=o+a[0].length,a=t.exec(n.value)}if(u.length>0&&i&&typeof r=="number")return s<n.value.length&&u.push({type:"text",value:n.value.slice(s)}),i.children.splice(r,1,...u),r+u.length})});H(Fd.plugin,{displayName:"Remark<remarkLineBreak>",group:"Remark"});H(Fd.options,{displayName:"RemarkConfig<remarkLineBreak>",group:"Remark"});var Pd=Pr("remarkInlineLink",()=>Sk);H(Pd.plugin,{displayName:"Remark<remarkInlineLinkPlugin>",group:"Remark"});H(Pd.options,{displayName:"RemarkConfig<remarkInlineLinkPlugin>",group:"Remark"});var qk=e=>!!e.children,Yk=e=>e.type==="html";function Gk(e,t){return n(e,0,null)[0];function n(r,i,u){if(qk(r)){const s=[];for(let a=0,o=r.children.length;a<o;a++){const l=r.children[a];if(l){const c=n(l,a,r);if(c)for(let d=0,f=c.length;d<f;d++){const h=c[d];h&&s.push(h)}}}r.children=s}return t(r,i,u)}}var Vk=["root","blockquote","listItem"],Hd=Pr("remarkHTMLTransformer",()=>()=>e=>{Gk(e,(t,n,r)=>Yk(t)?(r&&Vk.includes(r.type)&&(t.children=[{...t}],delete t.value,t.type="paragraph"),[t]):[t])});H(Hd.plugin,{displayName:"Remark<remarkHtmlTransformer>",group:"Remark"});H(Hd.options,{displayName:"RemarkConfig<remarkHtmlTransformer>",group:"Remark"});var Ud=Pr("remarkMarker",()=>()=>(e,t)=>{const n=r=>t.value.charAt(r.position.start.offset);pi(e,r=>["strong","emphasis"].includes(r.type),r=>{r.marker=n(r)})});H(Ud.plugin,{displayName:"Remark<remarkMarker>",group:"Remark"});H(Ud.options,{displayName:"RemarkConfig<remarkMarker>",group:"Remark"});var C1=On(()=>{let e=!1;const t=new wt({key:new Nt("MILKDOWN_INLINE_NODES_CURSOR"),state:{init(){return!1},apply(n){if(!n.selection.empty)return!1;const r=n.selection.$from,i=r.nodeBefore,u=r.nodeAfter;return!!(i&&u&&i.isInline&&!i.isText&&u.isInline&&!u.isText)}},props:{handleDOMEvents:{compositionend:(n,r)=>e?(e=!1,requestAnimationFrame(()=>{if(t.getState(n.state)){const i=n.state.selection.from;r.preventDefault(),n.dispatch(n.state.tr.insertText(r.data||"",i))}}),!0):!1,compositionstart:n=>(t.getState(n.state)&&(e=!0),!1),beforeinput:(n,r)=>{if(t.getState(n.state)&&r instanceof InputEvent&&r.data&&!e){const i=n.state.selection.from;return r.preventDefault(),n.dispatch(n.state.tr.insertText(r.data||"",i)),!0}return!1}},decorations(n){if(t.getState(n)){const r=n.selection.$from.pos,i=document.createElement("span"),u=$e.widget(r,i,{side:-1}),s=document.createElement("span"),a=$e.widget(r,s);return setTimeout(()=>{i.contentEditable="true",s.contentEditable="true"}),Oe.create(n.doc,[u,a])}return Oe.empty}}});return t});H(C1,{displayName:"Prose<inlineNodesCursorPlugin>",group:"Prose"});var x1=On(e=>new wt({key:new Nt("MILKDOWN_HARDBREAK_MARKS"),appendTransaction:(t,n,r)=>{if(!t.length)return;const[i]=t;if(!i)return;const[u]=i.steps;if(i.getMeta("hardbreak")){if(!(u instanceof Pe))return;const{from:s}=u;return r.tr.setNodeMarkup(s,xr.type(e),void 0,[])}if(u instanceof Cn){let s=r.tr;const{from:a,to:o}=u;return r.doc.nodesBetween(a,o,(l,c)=>{l.type===xr.type(e)&&(s=s.setNodeMarkup(c,xr.type(e),void 0,[]))}),s}}}));H(x1,{displayName:"Prose<hardbreakClearMarkPlugin>",group:"Prose"});var Wd=ir(["table","code_block"],"hardbreakFilterNodes");H(Wd,{displayName:"Ctx<hardbreakFilterNodes>",group:"Prose"});var k1=On(e=>{const t=e.get(Wd.key);return new wt({key:new Nt("MILKDOWN_HARDBREAK_FILTER"),filterTransaction:(n,r)=>{const i=n.getMeta("hardbreak"),[u]=n.steps;if(i&&u){const{from:s}=u,a=r.doc.resolve(s);let o=a.depth,l=!0;for(;o>0;)t.includes(a.node(o).type.name)&&(l=!1),o--;return l}return!0}})});H(k1,{displayName:"Prose<hardbreakFilterPlugin>",group:"Prose"});var S1=On(e=>{const t=new Nt("MILKDOWN_HEADING_ID"),n=r=>{if(r.composing)return;const i=e.get(Ba.key),u=r.state.tr.setMeta("addToHistory",!1);let s=!1;const a={};r.state.doc.descendants((o,l)=>{if(o.type===Hr.type(e)){if(o.textContent.trim().length===0)return;const c=o.attrs;let d=i(o);a[d]?(a[d]+=1,d+=`-#${a[d]}`):a[d]=1,c.id!==d&&(s=!0,u.setMeta(t,!0).setNodeMarkup(l,void 0,{...c,id:d}))}}),s&&r.dispatch(u)};return new wt({key:t,view:r=>(n(r),{update:(i,u)=>{i.state.doc.eq(u.doc)||n(i)}})})});H(S1,{displayName:"Prose<syncHeadingIdPlugin>",group:"Prose"});var I1=On(e=>{const t=(n,r,i)=>{if(!i.selection||n.some(d=>d.getMeta("addToHistory")===!1||!d.isGeneric))return null;const u=yi.type(e),s=Ei.type(e),a=Rn.type(e),o=(d,f,h=1)=>{let m=!1;const b=`${f+h}.`;return d.label!==b&&(d.label=b,m=!0),m};let l=i.tr,c=!1;return i.doc.descendants((d,f,h,m)=>{if(d.type===s){const b=d.maybeChild(0);b?.type===a&&b.attrs.listType==="ordered"&&(c=!0,l.setNodeMarkup(f,u,{spread:"true"}),d.descendants((T,E,O,w)=>{if(T.type===a){const L={...T.attrs};o(L,w)&&(l=l.setNodeMarkup(E,void 0,L))}return!1}))}else if(d.type===a&&h?.type===u){const b={...d.attrs};let T=!1;b.listType!=="ordered"&&(b.listType="ordered",T=!0),h?.maybeChild(0)&&(T=o(b,m,h?.attrs.order??1)),T&&(l=l.setNodeMarkup(f,void 0,b),c=!0)}}),c?l.setMeta("addToHistory",!1):null};return new wt({key:new Nt("MILKDOWN_KEEP_LIST_ORDER"),appendTransaction:t})});H(I1,{displayName:"Prose<syncListOrderPlugin>",group:"Prose"});var Jk=[x1,Wd,k1,C1,vd,Pd,Fd,Hd,Ud,Ma,S1,I1].flat(),jk=[Mk,Bk,Lk,zk,Kk,Jk].flat();let $l,ec;if(typeof WeakMap<"u"){let e=new WeakMap;$l=t=>e.get(t),ec=(t,n)=>(e.set(t,n),n)}else{const e=[];let n=0;$l=r=>{for(let i=0;i<e.length;i+=2)if(e[i]==r)return e[i+1]},ec=(r,i)=>(n==10&&(n=0),e[n++]=r,e[n++]=i)}var xe=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t<this.map.length;t++){const n=this.map[t];if(n!=e)continue;const r=t%this.width,i=t/this.width|0;let u=r+1,s=i+1;for(let a=1;u<this.width&&this.map[t+a]==n;a++)u++;for(let a=1;s<this.height&&this.map[t+this.width*a]==n;a++)s++;return{left:r,top:i,right:u,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){const{left:r,right:i,top:u,bottom:s}=this.findCell(e);return t=="horiz"?(n<0?r==0:i==this.width)?null:this.map[u*this.width+(n<0?r-1:i)]:(n<0?u==0:s==this.height)?null:this.map[r+this.width*(n<0?u-1:s)]}rectBetween(e,t){const{left:n,right:r,top:i,bottom:u}=this.findCell(e),{left:s,right:a,top:o,bottom:l}=this.findCell(t);return{left:Math.min(n,s),top:Math.min(i,o),right:Math.max(r,a),bottom:Math.max(u,l)}}cellsInRect(e){const t=[],n={};for(let r=e.top;r<e.bottom;r++)for(let i=e.left;i<e.right;i++){const u=r*this.width+i,s=this.map[u];n[s]||(n[s]=!0,!(i==e.left&&i&&this.map[u-1]==s||r==e.top&&r&&this.map[u-this.width]==s)&&t.push(s))}return t}positionAt(e,t,n){for(let r=0,i=0;;r++){const u=i+n.child(r).nodeSize;if(r==e){let s=t+e*this.width;const a=(e+1)*this.width;for(;s<a&&this.map[s]<i;)s++;return s==a?u-1:this.map[s]}i=u}}static get(e){return $l(e)||ec(e,Zk(e))}};function Zk(e){if(e.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+e.type.name);const t=Xk(e),n=e.childCount,r=[];let i=0,u=null;const s=[];for(let l=0,c=t*n;l<c;l++)r[l]=0;for(let l=0,c=0;l<n;l++){const d=e.child(l);c++;for(let m=0;;m++){for(;i<r.length&&r[i]!=0;)i++;if(m==d.childCount)break;const b=d.child(m),{colspan:T,rowspan:E,colwidth:O}=b.attrs;for(let w=0;w<E;w++){if(w+l>=n){(u||(u=[])).push({type:"overlong_rowspan",pos:c,n:E-w});break}const L=i+w*t;for(let _=0;_<T;_++){r[L+_]==0?r[L+_]=c:(u||(u=[])).push({type:"collision",row:l,pos:c,n:T-_});const I=O&&O[_];if(I){const B=(L+_)%t*2,G=s[B];G==null||G!=I&&s[B+1]==1?(s[B]=I,s[B+1]=1):G==I&&s[B+1]++}}}i+=T,c+=b.nodeSize}const f=(l+1)*t;let h=0;for(;i<f;)r[i++]==0&&h++;h&&(u||(u=[])).push({type:"missing",row:l,n:h}),c++}(t===0||n===0)&&(u||(u=[])).push({type:"zero_sized"});const a=new xe(t,n,r,u);let o=!1;for(let l=0;!o&&l<s.length;l+=2)s[l]!=null&&s[l+1]<n&&(o=!0);return o&&$k(a,s,e),a}function Xk(e){let t=-1,n=!1;for(let r=0;r<e.childCount;r++){const i=e.child(r);let u=0;if(n)for(let s=0;s<r;s++){const a=e.child(s);for(let o=0;o<a.childCount;o++){const l=a.child(o);s+l.attrs.rowspan>r&&(u+=l.attrs.colspan)}}for(let s=0;s<i.childCount;s++){const a=i.child(s);u+=a.attrs.colspan,a.attrs.rowspan>1&&(n=!0)}t==-1?t=u:t!=u&&(t=Math.max(t,u))}return t}function $k(e,t,n){e.problems||(e.problems=[]);const r={};for(let i=0;i<e.map.length;i++){const u=e.map[i];if(r[u])continue;r[u]=!0;const s=n.nodeAt(u);if(!s)throw new RangeError(`No cell with offset ${u} found`);let a=null;const o=s.attrs;for(let l=0;l<o.colspan;l++){const c=t[(i+l)%e.width*2];c!=null&&(!o.colwidth||o.colwidth[l]!=c)&&((a||(a=eS(o)))[l]=c)}a&&e.problems.unshift({type:"colwidth mismatch",pos:u,colwidth:a})}}function eS(e){if(e.colwidth)return e.colwidth.slice();const t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function a0(e,t){if(typeof e=="string")return{};const n=e.getAttribute("data-colwidth"),r=n&&/^\d+(,\d+)*$/.test(n)?n.split(",").map(s=>Number(s)):null,i=Number(e.getAttribute("colspan")||1),u={colspan:i,rowspan:Number(e.getAttribute("rowspan")||1),colwidth:r&&r.length==i?r:null};for(const s in t){const a=t[s].getFromDOM,o=a&&a(e);o!=null&&(u[s]=o)}return u}function o0(e,t){const n={};e.attrs.colspan!=1&&(n.colspan=e.attrs.colspan),e.attrs.rowspan!=1&&(n.rowspan=e.attrs.rowspan),e.attrs.colwidth&&(n["data-colwidth"]=e.attrs.colwidth.join(","));for(const r in t){const i=t[r].setDOMAttr;i&&i(e.attrs[r],n)}return n}function tS(e){if(e!==null){if(!Array.isArray(e))throw new TypeError("colwidth must be null or an array");for(const t of e)if(typeof t!="number")throw new TypeError("colwidth must be null or an array of numbers")}}function nS(e){const t=e.cellAttributes||{},n={colspan:{default:1,validate:"number"},rowspan:{default:1,validate:"number"},colwidth:{default:null,validate:tS}};for(const r in t)n[r]={default:t[r].default,validate:t[r].validate};return{table:{content:"table_row+",tableRole:"table",isolating:!0,group:e.tableGroup,parseDOM:[{tag:"table"}],toDOM(){return["table",["tbody",0]]}},table_row:{content:"(table_cell | table_header)*",tableRole:"row",parseDOM:[{tag:"tr"}],toDOM(){return["tr",0]}},table_cell:{content:e.cellContent,attrs:n,tableRole:"cell",isolating:!0,parseDOM:[{tag:"td",getAttrs:r=>a0(r,t)}],toDOM(r){return["td",o0(r,t),0]}},table_header:{content:e.cellContent,attrs:n,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:r=>a0(r,t)}],toDOM(r){return["th",o0(r,t),0]}}}}function Ht(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(const n in e.nodes){const r=e.nodes[n],i=r.spec.tableRole;i&&(t[i]=r)}}return t}const Qn=new Nt("selectingCells");function ci(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 Qt(e){const 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 La(e){const 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;const n=ci(t.$head)||rS(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function rS(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){const r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){const r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n-t.nodeSize)}}function tc(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function iS(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function Qd(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function w1(e,t,n){const r=e.node(-1),i=xe.get(r),u=e.start(-1),s=i.nextCell(e.pos-u,t,n);return s==null?null:e.node(0).resolve(u+s)}function Br(e,t,n=1){const r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some(i=>i>0)||(r.colwidth=null)),r}function uS(e,t,n=1){const r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let i=0;i<n;i++)r.colwidth.splice(t,0,0)}return r}function sS(e,t,n){const r=Ht(t.type.schema).header_cell;for(let i=0;i<e.height;i++)if(t.nodeAt(e.map[n+i*e.width]).type!=r)return!1;return!0}var De=class pn extends ce{constructor(t,n=t){const r=t.node(-1),i=xe.get(r),u=t.start(-1),s=i.rectBetween(t.pos-u,n.pos-u),a=t.node(0),o=i.cellsInRect(s).filter(c=>c!=n.pos-u);o.unshift(n.pos-u);const l=o.map(c=>{const d=r.nodeAt(c);if(!d)throw new RangeError(`No cell with offset ${c} found`);const f=u+c+1;return new Gm(a.resolve(f),a.resolve(f+d.content.size))});super(l[0].$from,l[0].$to,l),this.$anchorCell=t,this.$headCell=n}map(t,n){const r=t.resolve(n.map(this.$anchorCell.pos)),i=t.resolve(n.map(this.$headCell.pos));if(tc(r)&&tc(i)&&Qd(r,i)){const u=this.$anchorCell.node(-1)!=r.node(-1);return u&&this.isRowSelection()?pn.rowSelection(r,i):u&&this.isColSelection()?pn.colSelection(r,i):new pn(r,i)}return de.between(r,i)}content(){const t=this.$anchorCell.node(-1),n=xe.get(t),r=this.$anchorCell.start(-1),i=n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),u={},s=[];for(let o=i.top;o<i.bottom;o++){const l=[];for(let c=o*n.width+i.left,d=i.left;d<i.right;d++,c++){const f=n.map[c];if(u[f])continue;u[f]=!0;const h=n.findCell(f);let m=t.nodeAt(f);if(!m)throw new RangeError(`No cell with offset ${f} found`);const b=i.left-h.left,T=h.right-i.right;if(b>0||T>0){let E=m.attrs;if(b>0&&(E=Br(E,0,b)),T>0&&(E=Br(E,E.colspan-T,T)),h.left<i.left){if(m=m.type.createAndFill(E),!m)throw new RangeError(`Could not create cell with attrs ${JSON.stringify(E)}`)}else m=m.type.create(E,m.content)}if(h.top<i.top||h.bottom>i.bottom){const E={...m.attrs,rowspan:Math.min(h.bottom,i.bottom)-Math.max(h.top,i.top)};h.top<i.top?m=m.type.createAndFill(E):m=m.type.create(E,m.content)}l.push(m)}s.push(t.child(o).copy(Q.from(l)))}const a=this.isColSelection()&&this.isRowSelection()?t:s;return new Z(Q.from(a),1,1)}replace(t,n=Z.empty){const r=t.steps.length,i=this.ranges;for(let s=0;s<i.length;s++){const{$from:a,$to:o}=i[s],l=t.mapping.slice(r);t.replace(l.map(a.pos),l.map(o.pos),s?Z.empty:n)}const u=ce.findFrom(t.doc.resolve(t.mapping.slice(r).map(this.to)),-1);u&&t.setSelection(u)}replaceWith(t,n){this.replace(t,new Z(Q.from(n),0,0))}forEachCell(t){const n=this.$anchorCell.node(-1),r=xe.get(n),i=this.$anchorCell.start(-1),u=r.cellsInRect(r.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i));for(let s=0;s<u.length;s++)t(n.nodeAt(u[s]),i+u[s])}isColSelection(){const t=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(t,n)>0)return!1;const r=t+this.$anchorCell.nodeAfter.attrs.rowspan,i=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,i)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){const r=t.node(-1),i=xe.get(r),u=t.start(-1),s=i.findCell(t.pos-u),a=i.findCell(n.pos-u),o=t.node(0);return s.top<=a.top?(s.top>0&&(t=o.resolve(u+i.map[s.left])),a.bottom<i.height&&(n=o.resolve(u+i.map[i.width*(i.height-1)+a.right-1]))):(a.top>0&&(n=o.resolve(u+i.map[a.left])),s.bottom<i.height&&(t=o.resolve(u+i.map[i.width*(i.height-1)+s.right-1]))),new pn(t,n)}isRowSelection(){const t=this.$anchorCell.node(-1),n=xe.get(t),r=this.$anchorCell.start(-1),i=n.colCount(this.$anchorCell.pos-r),u=n.colCount(this.$headCell.pos-r);if(Math.min(i,u)>0)return!1;const s=i+this.$anchorCell.nodeAfter.attrs.colspan,a=u+this.$headCell.nodeAfter.attrs.colspan;return Math.max(s,a)==n.width}eq(t){return t instanceof pn&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){const r=t.node(-1),i=xe.get(r),u=t.start(-1),s=i.findCell(t.pos-u),a=i.findCell(n.pos-u),o=t.node(0);return s.left<=a.left?(s.left>0&&(t=o.resolve(u+i.map[s.top*i.width])),a.right<i.width&&(n=o.resolve(u+i.map[i.width*(a.top+1)-1]))):(a.left>0&&(n=o.resolve(u+i.map[a.top*i.width])),s.right<i.width&&(t=o.resolve(u+i.map[i.width*(s.top+1)-1]))),new pn(t,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new pn(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){return new pn(t.resolve(n),t.resolve(r))}getBookmark(){return new aS(this.$anchorCell.pos,this.$headCell.pos)}};De.prototype.visible=!1;ce.jsonID("cell",De);var aS=class N1{constructor(t,n){this.anchor=t,this.head=n}map(t){return new N1(t.map(this.anchor),t.map(this.head))}resolve(t){const n=t.resolve(this.anchor),r=t.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&r.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&r.index()<r.parent.childCount&&Qd(n,r)?new De(n,r):ce.near(r,1)}};function oS(e){if(!(e.selection instanceof De))return null;const t=[];return e.selection.forEachCell((n,r)=>{t.push($e.node(r,r+n.nodeSize,{class:"selectedCell"}))}),Oe.create(e.doc,t)}function lS({$from:e,$to:t}){if(e.pos==t.pos||e.pos<t.pos-6)return!1;let n=e.pos,r=t.pos,i=e.depth;for(;i>=0&&!(e.after(i+1)<e.end(i));i--,n++);for(let u=t.depth;u>=0&&!(t.before(u+1)>t.start(u));u--,r--);return n==r&&/row|table/.test(e.node(i).type.spec.tableRole)}function cS({$from:e,$to:t}){let n,r;for(let i=e.depth;i>0;i--){const u=e.node(i);if(u.type.spec.tableRole==="cell"||u.type.spec.tableRole==="header_cell"){n=u;break}}for(let i=t.depth;i>0;i--){const u=t.node(i);if(u.type.spec.tableRole==="cell"||u.type.spec.tableRole==="header_cell"){r=u;break}}return n!==r&&t.parentOffset===0}function dS(e,t,n){const r=(t||e).selection,i=(t||e).doc;let u,s;if(r instanceof oe&&(s=r.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")u=De.create(i,r.from);else if(s=="row"){const a=i.resolve(r.from+1);u=De.rowSelection(a,a)}else if(!n){const a=xe.get(r.node),o=r.from+1,l=o+a.map[a.width*a.height-1];u=De.create(i,o+1,l)}}else r instanceof de&&lS(r)?u=de.create(i,r.from):r instanceof de&&cS(r)&&(u=de.create(i,r.$from.start(),r.$from.end()));return u&&(t||(t=e.tr)).setSelection(u),t}const fS=new Nt("fix-tables");function D1(e,t,n,r){const i=e.childCount,u=t.childCount;e:for(let s=0,a=0;s<u;s++){const o=t.child(s);for(let l=a,c=Math.min(i,s+3);l<c;l++)if(e.child(l)==o){a=l+1,n+=o.nodeSize;continue e}r(o,n),a<i&&e.child(a).sameMarkup(o)?D1(e.child(a),o,n+1,r):o.nodesBetween(0,o.content.size,r,n+1),n+=o.nodeSize}}function hS(e,t){let n;const r=(i,u)=>{i.type.spec.tableRole=="table"&&(n=pS(e,i,u,n))};return t?t.doc!=e.doc&&D1(t.doc,e.doc,0,r):e.doc.descendants(r),n}function pS(e,t,n,r){const i=xe.get(t);if(!i.problems)return r;r||(r=e.tr);const u=[];for(let o=0;o<i.height;o++)u.push(0);for(let o=0;o<i.problems.length;o++){const l=i.problems[o];if(l.type=="collision"){const c=t.nodeAt(l.pos);if(!c)continue;const d=c.attrs;for(let f=0;f<d.rowspan;f++)u[l.row+f]+=l.n;r.setNodeMarkup(r.mapping.map(n+1+l.pos),null,Br(d,d.colspan-l.n,l.n))}else if(l.type=="missing")u[l.row]+=l.n;else if(l.type=="overlong_rowspan"){const c=t.nodeAt(l.pos);if(!c)continue;r.setNodeMarkup(r.mapping.map(n+1+l.pos),null,{...c.attrs,rowspan:c.attrs.rowspan-l.n})}else if(l.type=="colwidth mismatch"){const c=t.nodeAt(l.pos);if(!c)continue;r.setNodeMarkup(r.mapping.map(n+1+l.pos),null,{...c.attrs,colwidth:l.colwidth})}else if(l.type=="zero_sized"){const c=r.mapping.map(n);r.delete(c,c+t.nodeSize)}}let s,a;for(let o=0;o<u.length;o++)u[o]&&(s==null&&(s=o),a=o);for(let o=0,l=n+1;o<i.height;o++){const c=t.child(o),d=l+c.nodeSize,f=u[o];if(f>0){let h="cell";c.firstChild&&(h=c.firstChild.type.spec.tableRole);const m=[];for(let T=0;T<f;T++){const E=Ht(e.schema)[h].createAndFill();E&&m.push(E)}const b=(o==0||s==o-1)&&a==o?l+1:d-1;r.insert(r.mapping.map(b),m)}l=d}return r.setMeta(fS,{fixTables:!0})}function _1(e){const t=xe.get(e),n=[],r=t.height,i=t.width;for(let u=0;u<r;u++){const s=[];for(let a=0;a<i;a++){const o=u*i+a,l=t.map[o];if(u>0){const c=o-i;if(l===t.map[c]){s.push(null);continue}}if(a>0){const c=o-1;if(l===t.map[c]){s.push(null);continue}}s.push(e.nodeAt(l))}n.push(s)}return n}function O1(e,t){const n=[],r=xe.get(e),i=r.height,u=r.width;for(let s=0;s<i;s++){const a=e.child(s),o=[];for(let c=0;c<u;c++){const d=t[s][c];if(!d)continue;const f=r.map[s*r.width+c],h=e.nodeAt(f);if(!h)continue;const m=h.type.createChecked(d.attrs,d.content,d.marks);o.push(m)}const l=a.type.createChecked(a.attrs,o,a.marks);n.push(l)}return e.type.createChecked(e.attrs,n,e.marks)}function R1(e,t,n,r){const i=t[0]>n[0]?-1:1,u=e.splice(t[0],t.length),s=u.length%2===0?1:0;let a;return a=i===-1?n[0]:n[n.length-1]-s,e.splice(a,0,...u),e}function zu(e){return mS(t=>t.type.spec.tableRole==="table",e)}function mS(e,t){for(let n=t.depth;n>=0;n-=1){const r=t.node(n);if(e(r))return{node:r,pos:n===0?0:t.before(n),start:t.start(n),depth:n}}return null}function Jr(e,t){const n=zu(t.$from);if(!n)return;const r=xe.get(n.node);if(!(e<0||e>r.width-1))return r.cellsInRect({left:e,right:e+1,top:0,bottom:r.height}).map(i=>{const u=n.node.nodeAt(i),s=i+n.start;return{pos:s,start:s+1,node:u,depth:n.depth+2}})}function jr(e,t){const n=zu(t.$from);if(!n)return;const r=xe.get(n.node);if(!(e<0||e>r.height-1))return r.cellsInRect({left:0,right:r.width,top:e,bottom:e+1}).map(i=>{const u=n.node.nodeAt(i),s=i+n.start;return{pos:s,start:s+1,node:u,depth:n.depth+2}})}function l0(e,t,n=t){let r=t,i=n;for(let c=t;c>=0;c--){const d=Jr(c,e.selection);d&&d.forEach(f=>{const h=f.node.attrs.colspan+c-1;h>=r&&(r=c),h>i&&(i=h)})}for(let c=t;c<=i;c++){const d=Jr(c,e.selection);d&&d.forEach(f=>{const h=f.node.attrs.colspan+c-1;f.node.attrs.colspan>1&&h>i&&(i=h)})}const u=[];for(let c=r;c<=i;c++){const d=Jr(c,e.selection);d&&d.length>0&&u.push(c)}r=u[0],i=u[u.length-1];const s=Jr(r,e.selection),a=jr(0,e.selection);if(!s||!a)return;const o=e.doc.resolve(s[s.length-1].pos);let l;for(let c=i;c>=r;c--){const d=Jr(c,e.selection);if(d&&d.length>0){for(let f=a.length-1;f>=0;f--)if(a[f].pos===d[0].pos){l=d[0];break}if(l)break}}if(l)return{$anchor:o,$head:e.doc.resolve(l.pos),indexes:u}}function c0(e,t,n=t){let r=t,i=n;for(let c=t;c>=0;c--){const d=jr(c,e.selection);d&&d.forEach(f=>{const h=f.node.attrs.rowspan+c-1;h>=r&&(r=c),h>i&&(i=h)})}for(let c=t;c<=i;c++){const d=jr(c,e.selection);d&&d.forEach(f=>{const h=f.node.attrs.rowspan+c-1;f.node.attrs.rowspan>1&&h>i&&(i=h)})}const u=[];for(let c=r;c<=i;c++){const d=jr(c,e.selection);d&&d.length>0&&u.push(c)}r=u[0],i=u[u.length-1];const s=jr(r,e.selection),a=Jr(0,e.selection);if(!s||!a)return;const o=e.doc.resolve(s[s.length-1].pos);let l;for(let c=i;c>=r;c--){const d=jr(c,e.selection);if(d&&d.length>0){for(let f=a.length-1;f>=0;f--)if(a[f].pos===d[0].pos){l=d[0];break}if(l)break}}if(l)return{$anchor:o,$head:e.doc.resolve(l.pos),indexes:u}}function d0(e){return e[0].map((t,n)=>e.map(r=>r[n]))}function AS(e){var t,n;const{tr:r,originIndex:i,targetIndex:u,select:s,pos:a}=e,o=zu(r.doc.resolve(a));if(!o)return!1;const l=(t=l0(r,i))===null||t===void 0?void 0:t.indexes,c=(n=l0(r,u))===null||n===void 0?void 0:n.indexes;if(!l||!c||l.includes(u))return!1;const d=gS(o.node,l,c);if(r.replaceWith(o.pos,o.pos+o.node.nodeSize,d),!s)return!0;const f=xe.get(d),h=o.start,m=u,b=f.positionAt(f.height-1,m,d),T=r.doc.resolve(h+b),E=f.positionAt(0,m,d),O=r.doc.resolve(h+E);return r.setSelection(De.colSelection(T,O)),!0}function gS(e,t,n,r){let i=d0(_1(e));return i=R1(i,t,n),i=d0(i),O1(e,i)}function bS(e){var t,n;const{tr:r,originIndex:i,targetIndex:u,select:s,pos:a}=e,o=zu(r.doc.resolve(a));if(!o)return!1;const l=(t=c0(r,i))===null||t===void 0?void 0:t.indexes,c=(n=c0(r,u))===null||n===void 0?void 0:n.indexes;if(!l||!c||l.includes(u))return!1;const d=ES(o.node,l,c);if(r.replaceWith(o.pos,o.pos+o.node.nodeSize,d),!s)return!0;const f=xe.get(d),h=o.start,m=u,b=f.positionAt(m,f.width-1,d),T=r.doc.resolve(h+b),E=f.positionAt(m,0,d),O=r.doc.resolve(h+E);return r.setSelection(De.rowSelection(T,O)),!0}function ES(e,t,n,r){let i=_1(e);return i=R1(i,t,n),O1(e,i)}function ur(e){const t=e.selection,n=La(e),r=n.node(-1),i=n.start(-1),u=xe.get(r);return{...t instanceof De?u.rectBetween(t.$anchorCell.pos-i,t.$headCell.pos-i):u.findCell(n.pos-i),tableStart:i,map:u,table:r}}function M1(e,{map:t,tableStart:n,table:r},i){let u=i>0?-1:0;sS(t,r,i+u)&&(u=i==0||i==t.width?null:0);for(let s=0;s<t.height;s++){const a=s*t.width+i;if(i>0&&i<t.width&&t.map[a-1]==t.map[a]){const o=t.map[a],l=r.nodeAt(o);e.setNodeMarkup(e.mapping.map(n+o),null,uS(l.attrs,i-t.colCount(o))),s+=l.attrs.rowspan-1}else{const o=u==null?Ht(r.type.schema).cell:r.nodeAt(t.map[a+u]).type,l=t.positionAt(s,i,r);e.insert(e.mapping.map(n+l),o.createAndFill())}}return e}function yS(e,t){if(!Qt(e))return!1;if(t){const n=ur(e);t(M1(e.tr,n,n.left))}return!0}function TS(e,t){if(!Qt(e))return!1;if(t){const n=ur(e);t(M1(e.tr,n,n.right))}return!0}function CS(e,{map:t,table:n,tableStart:r},i){const u=e.mapping.maps.length;for(let s=0;s<t.height;){const a=s*t.width+i,o=t.map[a],l=n.nodeAt(o),c=l.attrs;if(i>0&&t.map[a-1]==o||i<t.width-1&&t.map[a+1]==o)e.setNodeMarkup(e.mapping.slice(u).map(r+o),null,Br(c,i-t.colCount(o)));else{const d=e.mapping.slice(u).map(r+o);e.delete(d,d+l.nodeSize)}s+=c.rowspan}}function xS(e,t){if(!Qt(e))return!1;if(t){const n=ur(e),r=e.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let i=n.right-1;CS(r,n,i),i!=n.left;i--){const u=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!u)throw new RangeError("No table found");n.table=u,n.map=xe.get(u)}t(r)}return!0}function kS(e,{map:t,table:n,tableStart:r},i){let u=0;for(let l=0;l<i;l++)u+=n.child(l).nodeSize;const s=u+n.child(i).nodeSize,a=e.mapping.maps.length;e.delete(u+r,s+r);const o=new Set;for(let l=0,c=i*t.width;l<t.width;l++,c++){const d=t.map[c];if(!o.has(d)){if(o.add(d),i>0&&d==t.map[c-t.width]){const f=n.nodeAt(d).attrs;e.setNodeMarkup(e.mapping.slice(a).map(d+r),null,{...f,rowspan:f.rowspan-1}),l+=f.colspan-1}else if(i<t.height&&d==t.map[c+t.width]){const f=n.nodeAt(d),h=f.attrs,m=f.type.create({...h,rowspan:f.attrs.rowspan-1},f.content),b=t.positionAt(i+1,l,n);e.insert(e.mapping.slice(a).map(r+b),m),l+=h.colspan-1}}}}function SS(e,t){if(!Qt(e))return!1;if(t){const n=ur(e),r=e.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let i=n.bottom-1;kS(r,n,i),i!=n.top;i--){const u=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!u)throw new RangeError("No table found");n.table=u,n.map=xe.get(n.table)}t(r)}return!0}function IS(e,t){return function(n,r){if(!Qt(n))return!1;const i=La(n);if(i.nodeAfter.attrs[e]===t)return!1;if(r){const u=n.tr;n.selection instanceof De?n.selection.forEachCell((s,a)=>{s.attrs[e]!==t&&u.setNodeMarkup(a,null,{...s.attrs,[e]:t})}):u.setNodeMarkup(i.pos,null,{...i.nodeAfter.attrs,[e]:t}),r(u)}return!0}}function wS(e){return function(t,n){if(!Qt(t))return!1;if(n){const r=Ht(t.schema),i=ur(t),u=t.tr,s=i.map.cellsInRect(e=="column"?{left:i.left,top:0,right:i.right,bottom:i.map.height}:e=="row"?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),a=s.map(o=>i.table.nodeAt(o));for(let o=0;o<s.length;o++)a[o].type==r.header_cell&&u.setNodeMarkup(i.tableStart+s[o],r.cell,a[o].attrs);if(u.steps.length===0)for(let o=0;o<s.length;o++)u.setNodeMarkup(i.tableStart+s[o],r.header_cell,a[o].attrs);n(u)}return!0}}function f0(e,t,n){const r=t.map.cellsInRect({left:0,top:0,right:e=="row"?t.map.width:1,bottom:e=="column"?t.map.height:1});for(let i=0;i<r.length;i++){const u=t.table.nodeAt(r[i]);if(u&&u.type!==n.header_cell)return!1}return!0}function zd(e,t){return t=t||{useDeprecatedLogic:!1},t.useDeprecatedLogic?wS(e):function(n,r){if(!Qt(n))return!1;if(r){const i=Ht(n.schema),u=ur(n),s=n.tr,a=f0("row",u,i),o=f0("column",u,i),l=(e==="column"?a:e==="row"&&o)?1:0,c=e=="column"?{left:0,top:l,right:1,bottom:u.map.height}:e=="row"?{left:l,top:0,right:u.map.width,bottom:1}:u,d=e=="column"?o?i.cell:i.header_cell:e=="row"?a?i.cell:i.header_cell:i.cell;u.map.cellsInRect(c).forEach(f=>{const h=f+u.tableStart,m=s.doc.nodeAt(h);m&&s.setNodeMarkup(h,d,m.attrs)}),r(s)}return!0}}zd("row",{useDeprecatedLogic:!0});zd("column",{useDeprecatedLogic:!0});zd("cell",{useDeprecatedLogic:!0});function NS(e,t){if(t<0){const n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(let r=e.index(-1)-1,i=e.before();r>=0;r--){const u=e.node(-1).child(r),s=u.lastChild;if(s)return i-1-s.nodeSize;i-=u.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;const n=e.node(-1);for(let r=e.indexAfter(-1),i=e.after();r<n.childCount;r++){const u=n.child(r);if(u.childCount)return i+1;i+=u.nodeSize}}return null}function B1(e){return function(t,n){if(!Qt(t))return!1;const r=NS(La(t),e);if(r==null)return!1;if(n){const i=t.doc.resolve(r);n(t.tr.setSelection(de.between(i,iS(i))).scrollIntoView())}return!0}}function DS(e,t){const n=e.selection.$anchor;for(let r=n.depth;r>0;r--)if(n.node(r).type.spec.tableRole=="table")return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function ls(e,t){const n=e.selection;if(!(n instanceof De))return!1;if(t){const r=e.tr,i=Ht(e.schema).cell.createAndFill().content;n.forEachCell((u,s)=>{u.content.eq(i)||r.replace(r.mapping.map(s+1),r.mapping.map(s+u.nodeSize-1),new Z(i,0,0))}),r.docChanged&&t(r)}return!0}function _S(e){return(t,n)=>{const{from:r,to:i,select:u=!0,pos:s=t.selection.from}=e,a=t.tr;return bS({tr:a,originIndex:r,targetIndex:i,select:u,pos:s})?(n?.(a),!0):!1}}function OS(e){return(t,n)=>{const{from:r,to:i,select:u=!0,pos:s=t.selection.from}=e,a=t.tr;return AS({tr:a,originIndex:r,targetIndex:i,select:u,pos:s})?(n?.(a),!0):!1}}function RS(e){if(e.size===0)return null;let{content:t,openStart:n,openEnd:r}=e;for(;t.childCount==1&&(n>0&&r>0||t.child(0).type.spec.tableRole=="table");)n--,r--,t=t.child(0).content;const i=t.child(0),u=i.type.spec.tableRole,s=i.type.schema,a=[];if(u=="row")for(let o=0;o<t.childCount;o++){let l=t.child(o).content;const c=o?0:Math.max(0,n-1),d=o<t.childCount-1?0:Math.max(0,r-1);(c||d)&&(l=nc(Ht(s).row,new Z(l,c,d)).content),a.push(l)}else if(u=="cell"||u=="header_cell")a.push(n||r?nc(Ht(s).row,new Z(t,n,r)).content:t);else return null;return MS(s,a)}function MS(e,t){const n=[];for(let i=0;i<t.length;i++){const u=t[i];for(let s=u.childCount-1;s>=0;s--){const{rowspan:a,colspan:o}=u.child(s).attrs;for(let l=i;l<i+a;l++)n[l]=(n[l]||0)+o}}let r=0;for(let i=0;i<n.length;i++)r=Math.max(r,n[i]);for(let i=0;i<n.length;i++)if(i>=t.length&&t.push(Q.empty),n[i]<r){const u=Ht(e).cell.createAndFill(),s=[];for(let a=n[i];a<r;a++)s.push(u);t[i]=t[i].append(Q.from(s))}return{height:t.length,width:r,rows:t}}function nc(e,t){const n=e.createAndFill();return new Ym(n).replace(0,n.content.size,t).doc}function BS({width:e,height:t,rows:n},r,i){if(e!=r){const u=[],s=[];for(let a=0;a<n.length;a++){const o=n[a],l=[];for(let c=u[a]||0,d=0;c<r;d++){let f=o.child(d%o.childCount);c+f.attrs.colspan>r&&(f=f.type.createChecked(Br(f.attrs,f.attrs.colspan,c+f.attrs.colspan-r),f.content)),l.push(f),c+=f.attrs.colspan;for(let h=1;h<f.attrs.rowspan;h++)u[a+h]=(u[a+h]||0)+f.attrs.colspan}s.push(Q.from(l))}n=s,e=r}if(t!=i){const u=[];for(let s=0,a=0;s<i;s++,a++){const o=[],l=n[a%t];for(let c=0;c<l.childCount;c++){let d=l.child(c);s+d.attrs.rowspan>i&&(d=d.type.create({...d.attrs,rowspan:Math.max(1,i-d.attrs.rowspan)},d.content)),o.push(d)}u.push(Q.from(o))}n=u,t=i}return{width:e,height:t,rows:n}}function LS(e,t,n,r,i,u,s){const a=e.doc.type.schema,o=Ht(a);let l,c;if(i>t.width)for(let d=0,f=0;d<t.height;d++){const h=n.child(d);f+=h.nodeSize;const m=[];let b;h.lastChild==null||h.lastChild.type==o.cell?b=l||(l=o.cell.createAndFill()):b=c||(c=o.header_cell.createAndFill());for(let T=t.width;T<i;T++)m.push(b);e.insert(e.mapping.slice(s).map(f-1+r),m)}if(u>t.height){const d=[];for(let m=0,b=(t.height-1)*t.width;m<Math.max(t.width,i);m++){const T=m>=t.width?!1:n.nodeAt(t.map[b+m]).type==o.header_cell;d.push(T?c||(c=o.header_cell.createAndFill()):l||(l=o.cell.createAndFill()))}const f=o.row.create(null,Q.from(d)),h=[];for(let m=t.height;m<u;m++)h.push(f);e.insert(e.mapping.slice(s).map(r+n.nodeSize-2),h)}return!!(l||c)}function h0(e,t,n,r,i,u,s,a){if(s==0||s==t.height)return!1;let o=!1;for(let l=i;l<u;l++){const c=s*t.width+l,d=t.map[c];if(t.map[c-t.width]==d){o=!0;const f=n.nodeAt(d),{top:h,left:m}=t.findCell(d);e.setNodeMarkup(e.mapping.slice(a).map(d+r),null,{...f.attrs,rowspan:s-h}),e.insert(e.mapping.slice(a).map(t.positionAt(s,m,n)),f.type.createAndFill({...f.attrs,rowspan:h+f.attrs.rowspan-s})),l+=f.attrs.colspan-1}}return o}function p0(e,t,n,r,i,u,s,a){if(s==0||s==t.width)return!1;let o=!1;for(let l=i;l<u;l++){const c=l*t.width+s,d=t.map[c];if(t.map[c-1]==d){o=!0;const f=n.nodeAt(d),h=t.colCount(d),m=e.mapping.slice(a).map(d+r);e.setNodeMarkup(m,null,Br(f.attrs,s-h,f.attrs.colspan-(s-h))),e.insert(m+f.nodeSize,f.type.createAndFill(Br(f.attrs,0,s-h))),l+=f.attrs.rowspan-1}}return o}function m0(e,t,n,r,i){let u=n?e.doc.nodeAt(n-1):e.doc;if(!u)throw new Error("No table found");let s=xe.get(u);const{top:a,left:o}=r,l=o+i.width,c=a+i.height,d=e.tr;let f=0;function h(){if(u=n?d.doc.nodeAt(n-1):d.doc,!u)throw new Error("No table found");s=xe.get(u),f=d.mapping.maps.length}LS(d,s,u,n,l,c,f)&&h(),h0(d,s,u,n,o,l,a,f)&&h(),h0(d,s,u,n,o,l,c,f)&&h(),p0(d,s,u,n,a,c,o,f)&&h(),p0(d,s,u,n,a,c,l,f)&&h();for(let m=a;m<c;m++){const b=s.positionAt(m,o,u),T=s.positionAt(m,l,u);d.replace(d.mapping.slice(f).map(b+n),d.mapping.slice(f).map(T+n),new Z(i.rows[m-a],0,0))}h(),d.setSelection(new De(d.doc.resolve(n+s.positionAt(a,o,u)),d.doc.resolve(n+s.positionAt(c-1,l-1,u)))),t(d)}const vS=sA({ArrowLeft:cs("horiz",-1),ArrowRight:cs("horiz",1),ArrowUp:cs("vert",-1),ArrowDown:cs("vert",1),"Shift-ArrowLeft":ds("horiz",-1),"Shift-ArrowRight":ds("horiz",1),"Shift-ArrowUp":ds("vert",-1),"Shift-ArrowDown":ds("vert",1),Backspace:ls,"Mod-Backspace":ls,Delete:ls,"Mod-Delete":ls});function Os(e,t,n){return n.eq(e.selection)?!1:(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function cs(e,t){return(n,r,i)=>{if(!i)return!1;const u=n.selection;if(u instanceof De)return Os(n,r,ce.near(u.$headCell,t));if(e!="horiz"&&!u.empty)return!1;const s=L1(i,e,t);if(s==null)return!1;if(e=="horiz")return Os(n,r,ce.near(n.doc.resolve(u.head+t),t));{const a=n.doc.resolve(s),o=w1(a,e,t);let l;return o?l=ce.near(o,1):t<0?l=ce.near(n.doc.resolve(a.before(-1)),-1):l=ce.near(n.doc.resolve(a.after(-1)),1),Os(n,r,l)}}}function ds(e,t){return(n,r,i)=>{if(!i)return!1;const u=n.selection;let s;if(u instanceof De)s=u;else{const o=L1(i,e,t);if(o==null)return!1;s=new De(n.doc.resolve(o))}const a=w1(s.$headCell,e,t);return a?Os(n,r,new De(s.$anchorCell,a)):!1}}function FS(e,t){const n=e.state.doc,r=ci(n.resolve(t));return r?(e.dispatch(e.state.tr.setSelection(new De(r))),!0):!1}function PS(e,t,n){if(!Qt(e.state))return!1;let r=RS(n);const i=e.state.selection;if(i instanceof De){r||(r={width:1,height:1,rows:[Q.from(nc(Ht(e.state.schema).cell,n))]});const u=i.$anchorCell.node(-1),s=i.$anchorCell.start(-1),a=xe.get(u).rectBetween(i.$anchorCell.pos-s,i.$headCell.pos-s);return r=BS(r,a.right-a.left,a.bottom-a.top),m0(e.state,e.dispatch,s,a,r),!0}else if(r){const u=La(e.state),s=u.start(-1);return m0(e.state,e.dispatch,s,xe.get(u.node(-1)).findCell(u.pos-s),r),!0}else return!1}function HS(e,t){var n;if(t.button!=0||t.ctrlKey||t.metaKey)return;const r=A0(e,t.target);let i;if(t.shiftKey&&e.state.selection instanceof De)u(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&(i=ci(e.state.selection.$anchor))!=null&&((n=Po(e,t))===null||n===void 0?void 0:n.pos)!=i.pos)u(i,t),t.preventDefault();else if(!r)return;function u(o,l){let c=Po(e,l);const d=Qn.getState(e.state)==null;if(!c||!Qd(o,c))if(d)c=o;else return;const f=new De(o,c);if(d||!e.state.selection.eq(f)){const h=e.state.tr.setSelection(f);d&&h.setMeta(Qn,o.pos),e.dispatch(h)}}function s(){e.root.removeEventListener("mouseup",s),e.root.removeEventListener("dragstart",s),e.root.removeEventListener("mousemove",a),Qn.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta(Qn,-1))}function a(o){const l=o,c=Qn.getState(e.state);let d;if(c!=null)d=e.state.doc.resolve(c);else if(A0(e,l.target)!=r&&(d=Po(e,t),!d))return s();d&&u(d,l)}e.root.addEventListener("mouseup",s),e.root.addEventListener("dragstart",s),e.root.addEventListener("mousemove",a)}function L1(e,t,n){if(!(e.state.selection instanceof de))return null;const{$head:r}=e.state.selection;for(let i=r.depth-1;i>=0;i--){const u=r.node(i);if((n<0?r.index(i):r.indexAfter(i))!=(n<0?0:u.childCount))return null;if(u.type.spec.tableRole=="cell"||u.type.spec.tableRole=="header_cell"){const s=r.before(i),a=t=="vert"?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(a)?s:null}}return null}function A0(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t;return null}function Po(e,t){const n=e.posAtCoords({left:t.clientX,top:t.clientY});if(!n)return null;let{inside:r,pos:i}=n;return r>=0&&ci(e.state.doc.resolve(r))||ci(e.state.doc.resolve(i))}var US=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")),rc(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,rc(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function rc(e,t,n,r,i,u){let s=0,a=!0,o=t.firstChild;const l=e.firstChild;if(l){for(let d=0,f=0;d<l.childCount;d++){const{colspan:h,colwidth:m}=l.child(d).attrs;for(let b=0;b<h;b++,f++){const T=i==f?u:m&&m[b],E=T?T+"px":"";if(s+=T||r,T||(a=!1),o)o.style.width!=E&&(o.style.width=E),o=o.nextSibling;else{const O=document.createElement("col");O.style.width=E,t.appendChild(O)}}}for(;o;){var c;const d=o.nextSibling;(c=o.parentNode)===null||c===void 0||c.removeChild(o),o=d}a?(n.style.width=s+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=s+"px")}}const kt=new Nt("tableColumnResizing");function WS({handleWidth:e=5,cellMinWidth:t=25,defaultCellMinWidth:n=100,View:r=US,lastColumnResizable:i=!0}={}){const u=new wt({key:kt,state:{init(s,a){var o;const l=(o=u.spec)===null||o===void 0||(o=o.props)===null||o===void 0?void 0:o.nodeViews,c=Ht(a.schema).table.name;return r&&l&&(l[c]=(d,f)=>new r(d,n,f)),new QS(-1,!1)},apply(s,a){return a.apply(s)}},props:{attributes:s=>{const a=kt.getState(s);return a&&a.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,a)=>{zS(s,a,e,i)},mouseleave:s=>{KS(s)},mousedown:(s,a)=>{qS(s,a,t,n)}},decorations:s=>{const a=kt.getState(s);if(a&&a.activeHandle>-1)return jS(s,a.activeHandle)},nodeViews:{}}});return u}var QS=class Rs{constructor(t,n){this.activeHandle=t,this.dragging=n}apply(t){const n=this,r=t.getMeta(kt);if(r&&r.setHandle!=null)return new Rs(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new Rs(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&t.docChanged){let i=t.mapping.map(n.activeHandle,-1);return tc(t.doc.resolve(i))||(i=-1),new Rs(i,n.dragging)}return n}};function zS(e,t,n,r){if(!e.editable)return;const i=kt.getState(e.state);if(i&&!i.dragging){const u=GS(t.target);let s=-1;if(u){const{left:a,right:o}=u.getBoundingClientRect();t.clientX-a<=n?s=g0(e,t,"left",n):o-t.clientX<=n&&(s=g0(e,t,"right",n))}if(s!=i.activeHandle){if(!r&&s!==-1){const a=e.state.doc.resolve(s),o=a.node(-1),l=xe.get(o),c=a.start(-1);if(l.colCount(a.pos-c)+a.nodeAfter.attrs.colspan-1==l.width-1)return}v1(e,s)}}}function KS(e){if(!e.editable)return;const t=kt.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&v1(e,-1)}function qS(e,t,n,r){var i;if(!e.editable)return!1;const u=(i=e.dom.ownerDocument.defaultView)!==null&&i!==void 0?i:window,s=kt.getState(e.state);if(!s||s.activeHandle==-1||s.dragging)return!1;const a=e.state.doc.nodeAt(s.activeHandle),o=YS(e,s.activeHandle,a.attrs);e.dispatch(e.state.tr.setMeta(kt,{setDragging:{startX:t.clientX,startWidth:o}}));function l(d){u.removeEventListener("mouseup",l),u.removeEventListener("mousemove",c);const f=kt.getState(e.state);f?.dragging&&(VS(e,f.activeHandle,b0(f.dragging,d,n)),e.dispatch(e.state.tr.setMeta(kt,{setDragging:null})))}function c(d){if(!d.which)return l(d);const f=kt.getState(e.state);if(f&&f.dragging){const h=b0(f.dragging,d,n);E0(e,f.activeHandle,h,r)}}return E0(e,s.activeHandle,o,r),u.addEventListener("mouseup",l),u.addEventListener("mousemove",c),t.preventDefault(),!0}function YS(e,t,{colspan:n,colwidth:r}){const i=r&&r[r.length-1];if(i)return i;const u=e.domAtPos(t);let s=u.node.childNodes[u.offset].offsetWidth,a=n;if(r)for(let o=0;o<n;o++)r[o]&&(s-=r[o],a--);return s/a}function GS(e){for(;e&&e.nodeName!="TD"&&e.nodeName!="TH";)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}function g0(e,t,n,r){const i=n=="right"?-r:r,u=e.posAtCoords({left:t.clientX+i,top:t.clientY});if(!u)return-1;const{pos:s}=u,a=ci(e.state.doc.resolve(s));if(!a)return-1;if(n=="right")return a.pos;const o=xe.get(a.node(-1)),l=a.start(-1),c=o.map.indexOf(a.pos-l);return c%o.width==0?-1:l+o.map[c-1]}function b0(e,t,n){const r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function v1(e,t){e.dispatch(e.state.tr.setMeta(kt,{setHandle:t}))}function VS(e,t,n){const r=e.state.doc.resolve(t),i=r.node(-1),u=xe.get(i),s=r.start(-1),a=u.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1,o=e.state.tr;for(let l=0;l<u.height;l++){const c=l*u.width+a;if(l&&u.map[c]==u.map[c-u.width])continue;const d=u.map[c],f=i.nodeAt(d).attrs,h=f.colspan==1?0:a-u.colCount(d);if(f.colwidth&&f.colwidth[h]==n)continue;const m=f.colwidth?f.colwidth.slice():JS(f.colspan);m[h]=n,o.setNodeMarkup(s+d,null,{...f,colwidth:m})}o.docChanged&&e.dispatch(o)}function E0(e,t,n,r){const i=e.state.doc.resolve(t),u=i.node(-1),s=i.start(-1),a=xe.get(u).colCount(i.pos-s)+i.nodeAfter.attrs.colspan-1;let o=e.domAtPos(i.start(-1)).node;for(;o&&o.nodeName!="TABLE";)o=o.parentNode;o&&rc(u,o.firstChild,o,r,a,n)}function JS(e){return Array(e).fill(0)}function jS(e,t){const n=[],r=e.doc.resolve(t),i=r.node(-1);if(!i)return Oe.empty;const u=xe.get(i),s=r.start(-1),a=u.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1;for(let l=0;l<u.height;l++){const c=a+l*u.width;if((a==u.width-1||u.map[c]!=u.map[c+1])&&(l==0||u.map[c]!=u.map[c-u.width])){var o;const d=u.map[c],f=s+d+i.nodeAt(d).nodeSize-1,h=document.createElement("div");h.className="column-resize-handle",!((o=kt.getState(e))===null||o===void 0)&&o.dragging&&n.push($e.node(s+d,s+d+i.nodeAt(d).nodeSize,{class:"column-resize-dragging"})),n.push($e.widget(f,h))}}return Oe.create(e.doc,n)}function ZS({allowTableNodeSelection:e=!1}={}){return new wt({key:Qn,state:{init(){return null},apply(t,n){const r=t.getMeta(Qn);if(r!=null)return r==-1?null:r;if(n==null||!t.docChanged)return n;const{deleted:i,pos:u}=t.mapping.mapResult(n);return i?null:u}},props:{decorations:oS,handleDOMEvents:{mousedown:HS},createSelectionBetween(t){return Qn.getState(t.state)!=null?t.state.selection:null},handleTripleClick:FS,handleKeyDown:vS,handlePaste:PS},appendTransaction(t,n,r){return dS(r,hS(r,n),e)}})}var js=typeof navigator<"u"?navigator:null,Kd=js&&js.userAgent||"",XS=/Edge\/(\d+)/.exec(Kd),$S=/MSIE \d/.exec(Kd),e6=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Kd),t6=!!($S||e6||XS),n6=!t6&&!!js&&/Apple Computer/.test(js.vendor),F1=new Nt("safari-ime-span"),ic=!1,r6={key:F1,props:{decorations:i6,handleDOMEvents:{compositionstart:()=>{ic=!0},compositionend:()=>{ic=!1}}}};function i6(e){const{$from:t,$to:n,to:r}=e.selection;if(ic&&t.sameParent(n)){const i=$e.widget(r,u6,{ignoreSelection:!0,key:"safari-ime-span"});return Oe.create(e.doc,[i])}}function u6(e){const t=e.dom.ownerDocument.createElement("span");return t.className="ProseMirror-safari-ime-span",t}var s6=new wt(n6?r6:{key:F1});function y0(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function a6(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function o6(e,t,n){const i=Ca((n||{}).ignore||[]),u=l6(t);let s=-1;for(;++s<u.length;)Sc(e,"text",a);function a(l,c){let d=-1,f;for(;++d<c.length;){const h=c[d],m=f?f.children:void 0;if(i(h,m?m.indexOf(h):void 0,f))return;f=h}if(f)return o(l,c)}function o(l,c){const d=c[c.length-1],f=u[s][0],h=u[s][1];let m=0;const T=d.children.indexOf(l);let E=!1,O=[];f.lastIndex=0;let w=f.exec(l.value);for(;w;){const L=w.index,_={index:w.index,input:w.input,stack:[...c,l]};let I=h(...w,_);if(typeof I=="string"&&(I=I.length>0?{type:"text",value:I}:void 0),I===!1?f.lastIndex=L+1:(m!==L&&O.push({type:"text",value:l.value.slice(m,L)}),Array.isArray(I)?O.push(...I):I&&O.push(I),m=L+w[0].length,E=!0),!f.global)break;w=f.exec(l.value)}return E?(m<l.value.length&&O.push({type:"text",value:l.value.slice(m)}),d.children.splice(T,1,...O)):O=[l],T+O.length}}function l6(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([c6(i[0]),d6(i[1])])}return t}function c6(e){return typeof e=="string"?new RegExp(a6(e),"g"):e}function d6(e){return typeof e=="function"?e:function(){return e}}const Ho="phrasing",Uo=["autolink","link","image","label"];function f6(){return{transforms:[E6],enter:{literalAutolink:p6,literalAutolinkEmail:Wo,literalAutolinkHttp:Wo,literalAutolinkWww:Wo},exit:{literalAutolink:b6,literalAutolinkEmail:g6,literalAutolinkHttp:m6,literalAutolinkWww:A6}}}function h6(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ho,notInConstruct:Uo},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ho,notInConstruct:Uo},{character:":",before:"[ps]",after:"\\/",inConstruct:Ho,notInConstruct:Uo}]}}function p6(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Wo(e){this.config.enter.autolinkProtocol.call(this,e)}function m6(e){this.config.exit.autolinkProtocol.call(this,e)}function A6(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];D(t.type==="link"),t.url="http://"+this.sliceSerialize(e)}function g6(e){this.config.exit.autolinkEmail.call(this,e)}function b6(e){this.exit(e)}function E6(e){o6(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,y6],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),T6]],{ignore:["link","linkReference"]})}function y6(e,t,n,r,i){let u="";if(!P1(i)||(/^w/i.test(t)&&(n=t+n,t="",u="http://"),!C6(n)))return!1;const s=x6(n+r);if(!s[0])return!1;const a={type:"link",title:null,url:u+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[a,{type:"text",value:s[1]}]:a}function T6(e,t,n,r){return!P1(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function C6(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function x6(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=y0(e,"(");let u=y0(e,")");for(;r!==-1&&i>u;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),u++;return[e,n]}function P1(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Nr(n)||Ea(n))&&(!t||n!==47)}H1.peek=R6;function k6(){this.buffer()}function S6(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function I6(){this.buffer()}function w6(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function N6(e){const t=this.resume(),n=this.stack[this.stack.length-1];D(n.type==="footnoteReference"),n.identifier=qt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function D6(e){this.exit(e)}function _6(e){const t=this.resume(),n=this.stack[this.stack.length-1];D(n.type==="footnoteDefinition"),n.identifier=qt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function O6(e){this.exit(e)}function R6(){return"["}function H1(e,t,n,r){const i=n.createTracker(r);let u=i.move("[^");const s=n.enter("footnoteReference"),a=n.enter("reference");return u+=i.move(n.safe(n.associationId(e),{after:"]",before:u})),a(),s(),u+=i.move("]"),u}function M6(){return{enter:{gfmFootnoteCallString:k6,gfmFootnoteCall:S6,gfmFootnoteDefinitionLabelString:I6,gfmFootnoteDefinition:w6},exit:{gfmFootnoteCallString:N6,gfmFootnoteCall:D6,gfmFootnoteDefinitionLabelString:_6,gfmFootnoteDefinition:O6}}}function B6(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:H1},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,u,s){const a=u.createTracker(s);let o=a.move("[^");const l=u.enter("footnoteDefinition"),c=u.enter("label");return o+=a.move(u.safe(u.associationId(r),{before:o,after:"]"})),c(),o+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
46
|
-
`:" ")+u.indentLines(u.containerFlow(r,a.current()),t?
|
|
47
|
-
`)}function
|
|
48
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:s,tableCell:o,tableRow:a}};function s(
|
|
49
|
-
`))}function o(h,m,b,T){const E=b.enter("tableCell"),O=b.enter("phrasing"),w=b.containerPhrasing(h,{...T,before:u,after:u});return O(),E(),w}function l(h,m){return z6(h,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function c(h,m,b){const T=h.children;let E=-1;const O=[],w=m.enter("table");for(;++E<T.length;)O[E]=d(T[E],m,b);return w(),O}function d(h,m,b){const T=h.children;let E=-1;const O=[],w=m.enter("tableRow");for(;++E<T.length;)O[E]=o(T[E],h,m,b);return w(),O}function f(h,m,b){let T=wc.inlineCode(h,m,b);return b.stack.includes("tableCell")&&(T=T.replace(/\|/g,"\\$&")),T}}function X6(){return{exit:{taskListCheckValueChecked:x0,taskListCheckValueUnchecked:x0,paragraph:eI}}}function $6(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:tI}}}function x0(e){const t=this.stack[this.stack.length-2];D(t.type==="listItem"),t.checked=e.type==="taskListCheckValueChecked"}function eI(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];D(n.type==="paragraph");const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let u=-1,s;for(;++u<i.length;){const a=i[u];if(a.type==="paragraph"){s=a;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function tI(e,t,n,r){const i=e.children[0],u=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);u&&a.move(s);let o=wc.listItem(e,t,n,{...r,...a.current()});return u&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),o;function l(c){return c+s}}function nI(){return[f6(),M6(),F6(),q6(),X6()]}function rI(e){return{extensions:[h6(),B6(e),P6(),Z6(e),$6()]}}const iI={tokenize:cI,partial:!0},Q1={tokenize:dI,partial:!0},z1={tokenize:fI,partial:!0},K1={tokenize:hI,partial:!0},uI={tokenize:pI,partial:!0},q1={name:"wwwAutolink",tokenize:oI,previous:G1},Y1={name:"protocolAutolink",tokenize:lI,previous:V1},Mn={name:"emailAutolink",tokenize:aI,previous:J1},on={};function sI(){return{text:on}}let dr=A.digit0;for(;dr<A.leftCurlyBrace;)on[dr]=Mn,dr++,dr===A.colon?dr=A.uppercaseA:dr===A.leftSquareBracket&&(dr=A.lowercaseA);on[A.plusSign]=Mn;on[A.dash]=Mn;on[A.dot]=Mn;on[A.underscore]=Mn;on[A.uppercaseH]=[Mn,Y1];on[A.lowercaseH]=[Mn,Y1];on[A.uppercaseW]=[Mn,q1];on[A.lowercaseW]=[Mn,q1];function aI(e,t,n){const r=this;let i,u;return s;function s(d){return!uc(d)||!J1.call(r,r.previous)||qd(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(d))}function a(d){return uc(d)?(e.consume(d),a):d===A.atSign?(e.consume(d),o):n(d)}function o(d){return d===A.dot?e.check(uI,c,l)(d):d===A.dash||d===A.underscore||At(d)?(u=!0,e.consume(d),o):c(d)}function l(d){return e.consume(d),i=!0,o}function c(d){return u&&i&&at(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function oI(e,t,n){const r=this;return i;function i(s){return s!==A.uppercaseW&&s!==A.lowercaseW||!G1.call(r,r.previous)||qd(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(iI,e.attempt(Q1,e.attempt(z1,u),n),n)(s))}function u(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function lI(e,t,n){const r=this;let i="",u=!1;return s;function s(d){return(d===A.uppercaseH||d===A.lowercaseH)&&V1.call(r,r.previous)&&!qd(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),a):n(d)}function a(d){if(at(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),a;if(d===A.colon){const f=i.toLowerCase();if(f==="http"||f==="https")return e.consume(d),o}return n(d)}function o(d){return d===A.slash?(e.consume(d),u?l:(u=!0,o)):n(d)}function l(d){return d===A.eof||Ls(d)||Ne(d)||Nr(d)||Ea(d)?n(d):e.attempt(Q1,e.attempt(z1,c),n)(d)}function c(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function cI(e,t,n){let r=0;return i;function i(s){return(s===A.uppercaseW||s===A.lowercaseW)&&r<3?(r++,e.consume(s),i):s===A.dot&&r===3?(e.consume(s),u):n(s)}function u(s){return s===A.eof?n(s):t(s)}}function dI(e,t,n){let r,i,u;return s;function s(l){return l===A.dot||l===A.underscore?e.check(K1,o,a)(l):l===A.eof||Ne(l)||Nr(l)||l!==A.dash&&Ea(l)?o(l):(u=!0,e.consume(l),s)}function a(l){return l===A.underscore?r=!0:(i=r,r=void 0),e.consume(l),s}function o(l){return i||r||!u?n(l):t(l)}}function fI(e,t){let n=0,r=0;return i;function i(s){return s===A.leftParenthesis?(n++,e.consume(s),i):s===A.rightParenthesis&&r<n?u(s):s===A.exclamationMark||s===A.quotationMark||s===A.ampersand||s===A.apostrophe||s===A.rightParenthesis||s===A.asterisk||s===A.comma||s===A.dot||s===A.colon||s===A.semicolon||s===A.lessThan||s===A.questionMark||s===A.rightSquareBracket||s===A.underscore||s===A.tilde?e.check(K1,t,u)(s):s===A.eof||Ne(s)||Nr(s)?t(s):(e.consume(s),i)}function u(s){return s===A.rightParenthesis&&r++,e.consume(s),i}}function hI(e,t,n){return r;function r(a){return a===A.exclamationMark||a===A.quotationMark||a===A.apostrophe||a===A.rightParenthesis||a===A.asterisk||a===A.comma||a===A.dot||a===A.colon||a===A.semicolon||a===A.questionMark||a===A.underscore||a===A.tilde?(e.consume(a),r):a===A.ampersand?(e.consume(a),u):a===A.rightSquareBracket?(e.consume(a),i):a===A.lessThan||a===A.eof||Ne(a)||Nr(a)?t(a):n(a)}function i(a){return a===A.eof||a===A.leftParenthesis||a===A.leftSquareBracket||Ne(a)||Nr(a)?t(a):r(a)}function u(a){return at(a)?s(a):n(a)}function s(a){return a===A.semicolon?(e.consume(a),r):at(a)?(e.consume(a),s):n(a)}}function pI(e,t,n){return r;function r(u){return e.consume(u),i}function i(u){return At(u)?n(u):t(u)}}function G1(e){return e===A.eof||e===A.leftParenthesis||e===A.asterisk||e===A.underscore||e===A.leftSquareBracket||e===A.rightSquareBracket||e===A.tilde||Ne(e)}function V1(e){return!at(e)}function J1(e){return!(e===A.slash||uc(e))}function uc(e){return e===A.plusSign||e===A.dash||e===A.dot||e===A.underscore||At(e)}function qd(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const mI={tokenize:xI,partial:!0};function AI(){return{document:{[A.leftSquareBracket]:{name:"gfmFootnoteDefinition",tokenize:yI,continuation:{tokenize:TI},exit:CI}},text:{[A.leftSquareBracket]:{name:"gfmFootnoteCall",tokenize:EI},[A.rightSquareBracket]:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:gI,resolveTo:bI}}}}function gI(e,t,n){const r=this;let i=r.events.length;const u=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const o=r.events[i][1];if(o.type===g.labelImage){s=o;break}if(o.type==="gfmFootnoteCall"||o.type===g.labelLink||o.type===g.label||o.type===g.image||o.type===g.link)break}return a;function a(o){if(D(o===A.rightSquareBracket,"expected `]`"),!s||!s._balanced)return n(o);const l=qt(r.sliceSerialize({start:s.end,end:r.now()}));return l.codePointAt(0)!==A.caret||!u.includes(l.slice(1))?n(o):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o))}}function bI(e,t){let n=e.length,r;for(;n--;)if(e[n][1].type===g.labelImage&&e[n][0]==="enter"){r=e[n][1];break}D(r,"expected `labelStart` to resolve"),e[n+1][1].type=g.data,e[n+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},u={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};u.end.column++,u.end.offset++,u.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},u.end),end:Object.assign({},e[e.length-1][1].start)},a={type:g.chunkString,contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},o=[e[n+1],e[n+2],["enter",i,t],e[n+3],e[n+4],["enter",u,t],["exit",u,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(n,e.length-n+1,...o),e}function EI(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u=0,s;return a;function a(d){return D(d===A.leftSquareBracket,"expected `[`"),e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),o}function o(d){return d!==A.caret?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(d){if(u>J.linkReferenceSizeMax||d===A.rightSquareBracket&&!s||d===A.eof||d===A.leftSquareBracket||Ne(d))return n(d);if(d===A.rightSquareBracket){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return i.includes(qt(r.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return Ne(d)||(s=!0),u++,e.consume(d),d===A.backslash?c:l}function c(d){return d===A.leftSquareBracket||d===A.backslash||d===A.rightSquareBracket?(e.consume(d),u++,l):l(d)}}function yI(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u,s=0,a;return o;function o(m){return D(m===A.leftSquareBracket,"expected `[`"),e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(m){return m===A.caret?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(m)}function c(m){if(s>J.linkReferenceSizeMax||m===A.rightSquareBracket&&!a||m===A.eof||m===A.leftSquareBracket||Ne(m))return n(m);if(m===A.rightSquareBracket){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return u=qt(r.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return Ne(m)||(a=!0),s++,e.consume(m),m===A.backslash?d:c}function d(m){return m===A.leftSquareBracket||m===A.backslash||m===A.rightSquareBracket?(e.consume(m),s++,c):c(m)}function f(m){return m===A.colon?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(u)||i.push(u),Ee(e,h,"gfmFootnoteDefinitionWhitespace")):n(m)}function h(m){return t(m)}}function TI(e,t,n){return e.check(Ru,t,e.attempt(mI,t,n))}function CI(e){e.exit("gfmFootnoteDefinition")}function xI(e,t,n){const r=this;return Ee(e,i,"gfmFootnoteDefinitionIndent",J.tabSize+1);function i(u){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===J.tabSize?t(u):n(u)}}function kI(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:u,resolveAll:i};return n==null&&(n=!0),{text:{[A.tilde]:r},insideSpan:{null:[r]},attentionMarkers:{null:[A.tilde]}};function i(s,a){let o=-1;for(;++o<s.length;)if(s[o][0]==="enter"&&s[o][1].type==="strikethroughSequenceTemporary"&&s[o][1]._close){let l=o;for(;l--;)if(s[l][0]==="exit"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._open&&s[o][1].end.offset-s[o][1].start.offset===s[l][1].end.offset-s[l][1].start.offset){s[o][1].type="strikethroughSequence",s[l][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},s[l][1].start),end:Object.assign({},s[o][1].end)},d={type:"strikethroughText",start:Object.assign({},s[l][1].end),end:Object.assign({},s[o][1].start)},f=[["enter",c,a],["enter",s[l][1],a],["exit",s[l][1],a],["enter",d,a]],h=a.parser.constructs.insideSpan.null;h&&St(f,f.length,0,ya(h,s.slice(l+1,o),a)),St(f,f.length,0,[["exit",d,a],["enter",s[o][1],a],["exit",s[o][1],a],["exit",c,a]]),St(s,l-1,o-l+3,f),o=l+f.length-2;break}}for(o=-1;++o<s.length;)s[o][1].type==="strikethroughSequenceTemporary"&&(s[o][1].type=g.data);return s}function u(s,a,o){const l=this.previous,c=this.events;let d=0;return f;function f(m){return D(m===A.tilde,"expected `~`"),l===A.tilde&&c[c.length-1][1].type!==g.characterEscape?o(m):(s.enter("strikethroughSequenceTemporary"),h(m))}function h(m){const b=ui(l);if(m===A.tilde)return d>1?o(m):(s.consume(m),d++,h);if(d<2&&!n)return o(m);const T=s.exit("strikethroughSequenceTemporary"),E=ui(m);return T._open=!E||E===J.attentionSideAfter&&!!b,T._close=!b||b===J.attentionSideAfter&&!!E,a(m)}}}class SI{constructor(){this.map=[]}add(t,n,r){II(this,t,n,r)}consume(t){if(this.map.sort(function(u,s){return u[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const u of i)t.push(u);i=r.pop()}this.map.length=0}}function II(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function wI(e,t){D(e[t][1].type==="table","expected table");let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const u=r.length-1;r[u]=r[u]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function NI(){return{flow:{null:{name:"table",tokenize:DI,resolveAll:_I}}}}function DI(e,t,n){const r=this;let i=0,u=0,s;return a;function a(S){let V=r.events.length-1;for(;V>-1;){const j=r.events[V][1].type;if(j===g.lineEnding||j===g.linePrefix)V--;else break}const Y=V>-1?r.events[V][1].type:null,U=Y==="tableHead"||Y==="tableRow"?I:o;return U===I&&r.parser.lazy[r.now().line]?n(S):U(S)}function o(S){return e.enter("tableHead"),e.enter("tableRow"),l(S)}function l(S){return S===A.verticalBar||(s=!0,u+=1),c(S)}function c(S){return S===A.eof?n(S):$(S)?u>1?(u=0,r.interrupt=!0,e.exit("tableRow"),e.enter(g.lineEnding),e.consume(S),e.exit(g.lineEnding),h):n(S):me(S)?Ee(e,c,g.whitespace)(S):(u+=1,s&&(s=!1,i+=1),S===A.verticalBar?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),s=!0,c):(e.enter(g.data),d(S)))}function d(S){return S===A.eof||S===A.verticalBar||Ne(S)?(e.exit(g.data),c(S)):(e.consume(S),S===A.backslash?f:d)}function f(S){return S===A.backslash||S===A.verticalBar?(e.consume(S),d):d(S)}function h(S){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(S):(e.enter("tableDelimiterRow"),s=!1,me(S)?(D(r.parser.constructs.disable.null,"expected `disabled.null`"),Ee(e,m,g.linePrefix,r.parser.constructs.disable.null.includes("codeIndented")?void 0:J.tabSize)(S)):m(S))}function m(S){return S===A.dash||S===A.colon?T(S):S===A.verticalBar?(s=!0,e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),b):_(S)}function b(S){return me(S)?Ee(e,T,g.whitespace)(S):T(S)}function T(S){return S===A.colon?(u+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),E):S===A.dash?(u+=1,E(S)):S===A.eof||$(S)?L(S):_(S)}function E(S){return S===A.dash?(e.enter("tableDelimiterFiller"),O(S)):_(S)}function O(S){return S===A.dash?(e.consume(S),O):S===A.colon?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(S))}function w(S){return me(S)?Ee(e,L,g.whitespace)(S):L(S)}function L(S){return S===A.verticalBar?m(S):S===A.eof||$(S)?!s||i!==u?_(S):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(S)):_(S)}function _(S){return n(S)}function I(S){return e.enter("tableRow"),B(S)}function B(S){return S===A.verticalBar?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),B):S===A.eof||$(S)?(e.exit("tableRow"),t(S)):me(S)?Ee(e,B,g.whitespace)(S):(e.enter(g.data),G(S))}function G(S){return S===A.eof||S===A.verticalBar||Ne(S)?(e.exit(g.data),B(S)):(e.consume(S),S===A.backslash?M:G)}function M(S){return S===A.backslash||S===A.verticalBar?(e.consume(S),G):G(S)}}function _I(e,t){let n=-1,r=!0,i=0,u=[0,0,0,0],s=[0,0,0,0],a=!1,o=0,l,c,d;const f=new SI;for(;++n<e.length;){const h=e[n],m=h[1];h[0]==="enter"?m.type==="tableHead"?(a=!1,o!==0&&(D(l,"there should be a table opening"),k0(f,t,o,l,c),c=void 0,o=0),l={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[["enter",l,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,d=void 0,u=[0,0,0,0],s=[0,n+1,0,0],a&&(a=!1,c={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[["enter",c,t]])),i=m.type==="tableDelimiterRow"?2:c?3:1):i&&(m.type===g.data||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(u[1]!==0&&(s[0]=s[1],d=fs(f,t,u,i,void 0,d),u=[0,0,0,0]),s[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(u[1]!==0&&(s[0]=s[1],d=fs(f,t,u,i,void 0,d)),u=s,s=[u[1],n,0,0])):m.type==="tableHead"?(a=!0,o=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(o=n,u[1]!==0?(s[0]=s[1],d=fs(f,t,u,i,n,d)):s[1]!==0&&(d=fs(f,t,s,i,n,d)),i=0):i&&(m.type===g.data||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(s[3]=n)}for(o!==0&&(D(l,"expected table opening"),k0(f,t,o,l,c)),f.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=wI(t.events,n))}return e}function fs(e,t,n,r,i,u){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(D(u,"expected previous cell enter"),u.end=Object.assign({},Zr(t.events,n[0])),e.add(n[0],0,[["exit",u,t]]));const o=Zr(t.events,n[1]);if(u={type:s,start:Object.assign({},o),end:Object.assign({},o)},e.add(n[1],0,[["enter",u,t]]),n[2]!==0){const l=Zr(t.events,n[2]),c=Zr(t.events,n[3]),d={type:a,start:Object.assign({},l),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",d,t]]),D(n[3]!==0),r!==2){const f=t.events[n[2]],h=t.events[n[3]];if(f[1].end=Object.assign({},h[1].end),f[1].type=g.chunkText,f[1].contentType=J.contentTypeText,n[3]>n[2]+1){const m=n[2]+1,b=n[3]-n[2]-1;e.add(m,b,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(u.end=Object.assign({},Zr(t.events,i)),e.add(i,0,[["exit",u,t]]),u=void 0),u}function k0(e,t,n,r,i){const u=[],s=Zr(t.events,n);i&&(i.end=Object.assign({},s),u.push(["exit",i,t])),r.end=Object.assign({},s),u.push(["exit",r,t]),e.add(n+1,0,u)}function Zr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const OI={name:"tasklistCheck",tokenize:MI};function RI(){return{text:{[A.leftSquareBracket]:OI}}}function MI(e,t,n){const r=this;return i;function i(o){return D(o===A.leftSquareBracket,"expected `[`"),r.previous!==A.eof||!r._gfmTasklistFirstContentOfListItem?n(o):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),u)}function u(o){return Ne(o)?(e.enter("taskListCheckValueUnchecked"),e.consume(o),e.exit("taskListCheckValueUnchecked"),s):o===A.uppercaseX||o===A.lowercaseX?(e.enter("taskListCheckValueChecked"),e.consume(o),e.exit("taskListCheckValueChecked"),s):n(o)}function s(o){return o===A.rightSquareBracket?(e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(o)}function a(o){return $(o)?t(o):me(o)?e.check({tokenize:BI},t,n)(o):n(o)}}function BI(e,t,n){return Ee(e,r,g.whitespace);function r(i){return i===A.eof?n(i):t(i)}}function LI(e){return Qp([sI(),AI(),kI(e),NI(),RI()])}const vI={};function FI(e){const t=this,n=e||vI,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),u=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(LI(n)),u.push(nI()),s.push(rI(n))}function ue(e,t){return Object.assign(e,{meta:{package:"@milkdown/preset-gfm",...t}}),e}var Yd=Pu("strike_through");ue(Yd,{displayName:"Attr<strikethrough>",group:"Strikethrough"});var Ku=Ai("strike_through",e=>({parseDOM:[{tag:"del"},{style:"text-decoration",getAttrs:t=>t==="line-through"}],toDOM:t=>["del",e.get(Yd.key)(t)],parseMarkdown:{match:t=>t.type==="delete",runner:(t,n,r)=>{t.openMark(r),t.next(n.children),t.closeMark(r)}},toMarkdown:{match:t=>t.type.name==="strike_through",runner:(t,n)=>{t.withMark(n,"delete")}}}));ue(Ku.mark,{displayName:"MarkSchema<strikethrough>",group:"Strikethrough"});ue(Ku.ctx,{displayName:"MarkSchemaCtx<strikethrough>",group:"Strikethrough"});var Gd=le("ToggleStrikeThrough",e=>()=>Da(Ku.type(e)));ue(Gd,{displayName:"Command<ToggleStrikethrough>",group:"Strikethrough"});var j1=yt(e=>Bu(new RegExp("(?<![\\w:/])(~{1,2})(.+?)\\1(?!\\w|\\/)"),Ku.type(e)));ue(j1,{displayName:"InputRule<strikethrough>",group:"Strikethrough"});var Vd=_t("strikeThroughKeymap",{ToggleStrikethrough:{shortcuts:"Mod-Alt-x",command:e=>{const t=e.get(ke);return()=>t.call(Gd.key)}}});ue(Vd.ctx,{displayName:"KeymapCtx<strikethrough>",group:"Strikethrough"});ue(Vd.shortcuts,{displayName:"Keymap<strikethrough>",group:"Strikethrough"});var qu=nS({tableGroup:"block",cellContent:"paragraph",cellAttributes:{alignment:{default:"left",getFromDOM:e=>e.style.textAlign||"left",setDOMAttr:(e,t)=>{t.style=`text-align: ${e||"left"}`}}}}),Nn=Qe("table",()=>({...qu.table,content:"table_header_row table_row+",disableDropCursor:!0,parseMarkdown:{match:e=>e.type==="table",runner:(e,t,n)=>{const r=t.align,i=t.children.map((u,s)=>({...u,align:r,isHeader:s===0}));e.openNode(n),e.next(i),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="table",runner:(e,t)=>{const n=t.content.firstChild?.content;if(!n)return;const r=[];n.forEach(i=>{r.push(i.attrs.alignment)}),e.openNode("table",void 0,{align:r}),e.next(t.content),e.closeNode()}}}));ue(Nn.node,{displayName:"NodeSchema<table>",group:"Table"});ue(Nn.ctx,{displayName:"NodeSchemaCtx<table>",group:"Table"});var Yu=Qe("table_header_row",()=>({...qu.table_row,disableDropCursor:!0,content:"(table_header)*",parseDOM:[{tag:"tr[data-is-header]"},{tag:"tr",getAttrs:e=>e instanceof HTMLElement&&e.querySelector("th")?{}:!1}],toDOM(){return["tr",{"data-is-header":!0},0]},parseMarkdown:{match:e=>!!(e.type==="tableRow"&&e.isHeader),runner:(e,t,n)=>{const r=t.align,i=t.children.map((u,s)=>({...u,align:r[s],isHeader:t.isHeader}));e.openNode(n),e.next(i),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="table_header_row",runner:(e,t)=>{t.content.size!==0&&(e.openNode("tableRow",void 0,{isHeader:!0}),e.next(t.content),e.closeNode())}}}));ue(Yu.node,{displayName:"NodeSchema<tableHeaderRow>",group:"Table"});ue(Yu.ctx,{displayName:"NodeSchemaCtx<tableHeaderRow>",group:"Table"});var Ti=Qe("table_row",()=>({...qu.table_row,disableDropCursor:!0,content:"(table_cell)*",parseMarkdown:{match:e=>e.type==="tableRow",runner:(e,t,n)=>{const r=t.align,i=t.children.map((u,s)=>({...u,align:r[s]}));e.openNode(n),e.next(i),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="table_row",runner:(e,t)=>{t.content.size!==0&&(e.openNode("tableRow"),e.next(t.content),e.closeNode())}}}));ue(Ti.node,{displayName:"NodeSchema<tableRow>",group:"Table"});ue(Ti.ctx,{displayName:"NodeSchemaCtx<tableRow>",group:"Table"});var Gu=Qe("table_cell",()=>({...qu.table_cell,disableDropCursor:!0,parseMarkdown:{match:e=>e.type==="tableCell"&&!e.isHeader,runner:(e,t,n)=>{const r=t.align;e.openNode(n,{alignment:r}).openNode(e.schema.nodes.paragraph).next(t.children).closeNode().closeNode()}},toMarkdown:{match:e=>e.type.name==="table_cell",runner:(e,t)=>{e.openNode("tableCell").next(t.content).closeNode()}}}));ue(Gu.node,{displayName:"NodeSchema<tableCell>",group:"Table"});ue(Gu.ctx,{displayName:"NodeSchemaCtx<tableCell>",group:"Table"});var di=Qe("table_header",()=>({...qu.table_header,disableDropCursor:!0,parseMarkdown:{match:e=>e.type==="tableCell"&&!!e.isHeader,runner:(e,t,n)=>{const r=t.align;e.openNode(n,{alignment:r}),e.openNode(e.schema.nodes.paragraph),e.next(t.children),e.closeNode(),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="table_header",runner:(e,t)=>{e.openNode("tableCell"),e.next(t.content),e.closeNode()}}}));ue(di.node,{displayName:"NodeSchema<tableHeader>",group:"Table"});ue(di.ctx,{displayName:"NodeSchemaCtx<tableHeader>",group:"Table"});function Z1(e,t=3,n=3){const r=Array(n).fill(0).map(()=>Gu.type(e).createAndFill()),i=Array(n).fill(0).map(()=>di.type(e).createAndFill()),u=Array(t).fill(0).map((s,a)=>a===0?Yu.type(e).create(null,i):Ti.type(e).create(null,r));return Nn.type(e).create(null,u)}function X1(e){return(t,n)=>r=>{n=n??r.selection.from;const i=r.doc.resolve(n),u=aC(o=>o.type.name==="table")(i),s=u?{node:u.node,from:u.start}:void 0,a=e==="row";if(s){const o=xe.get(s.node);if(t>=0&&t<(a?o.height:o.width)){const l=o.positionAt(a?t:o.height-1,a?o.width-1:t,s.node),c=r.doc.resolve(s.from+l),d=a?De.rowSelection:De.colSelection,f=o.positionAt(a?t:0,a?0:t,s.node),h=r.doc.resolve(s.from+f);return uA(r.setSelection(d(c,h)))}}return r}}var PI=X1("row"),HI=X1("col");function $1(e,t,{map:n,tableStart:r,table:i},u){const s=Array(u).fill(0).reduce((o,l,c)=>o+i.child(c).nodeSize,r),a=Array(n.width).fill(0).map((o,l)=>{const c=i.nodeAt(n.map[l]);return Gu.type(e).createAndFill({alignment:c?.attrs.alignment})});return t.insert(s,Ti.type(e).create(null,a)),t}function UI(e){const t=zu(e.$from);if(!t)return;const n=xe.get(t.node);return n.cellsInRect({left:0,right:n.width,top:0,bottom:n.height}).map(r=>{const i=t.node.nodeAt(r),u=r+t.start;return{pos:u,start:u+1,node:i}})}function WI(e){const t=UI(e.selection);if(t&&t[0]){const n=e.doc.resolve(t[0].pos),r=t[t.length-1];if(r){const i=e.doc.resolve(r.pos);return uA(e.setSelection(new De(i,n)))}}return e}var Jd=le("GoToPrevTableCell",()=>()=>B1(-1));ue(Jd,{displayName:"Command<goToPrevTableCellCommand>",group:"Table"});var jd=le("GoToNextTableCell",()=>()=>B1(1));ue(jd,{displayName:"Command<goToNextTableCellCommand>",group:"Table"});var Zd=le("ExitTable",e=>()=>(t,n)=>{if(!Qt(t))return!1;const{$head:r}=t.selection,i=sC(r,Nn.type(e));if(!i)return!1;const{to:u}=i,s=t.tr.replaceWith(u,u,un.type(e).createAndFill());return s.setSelection(ce.near(s.doc.resolve(u),1)).scrollIntoView(),n?.(s),!0});ue(Zd,{displayName:"Command<breakTableCommand>",group:"Table"});var eg=le("InsertTable",e=>({row:t,col:n}={})=>(r,i)=>{const{selection:u,tr:s}=r,{from:a}=u,o=Z1(e,t,n),l=s.replaceSelectionWith(o),c=ce.findFrom(l.doc.resolve(a),1,!0);return c&&l.setSelection(c),i?.(l),!0});ue(eg,{displayName:"Command<insertTableCommand>",group:"Table"});var tg=le("MoveRow",()=>({from:e,to:t,pos:n}={})=>_S({from:e??0,to:t??0,pos:n}));ue(tg,{displayName:"Command<moveRowCommand>",group:"Table"});var ng=le("MoveCol",()=>({from:e,to:t,pos:n}={})=>OS({from:e??0,to:t??0,pos:n}));ue(ng,{displayName:"Command<moveColCommand>",group:"Table"});var rg=le("SelectRow",()=>(e={index:0})=>(t,n)=>{const{tr:r}=t;return!!n?.(PI(e.index,e.pos)(r))});ue(rg,{displayName:"Command<selectRowCommand>",group:"Table"});var ig=le("SelectCol",()=>(e={index:0})=>(t,n)=>{const{tr:r}=t;return!!n?.(HI(e.index,e.pos)(r))});ue(ig,{displayName:"Command<selectColCommand>",group:"Table"});var ug=le("SelectTable",()=>()=>(e,t)=>{const{tr:n}=e;return!!t?.(WI(n))});ue(ug,{displayName:"Command<selectTableCommand>",group:"Table"});var sg=le("DeleteSelectedCells",()=>()=>(e,t)=>{const{selection:n}=e;if(!(n instanceof De))return!1;const r=n.isRowSelection(),i=n.isColSelection();return r&&i?DS(e,t):i?xS(e,t):SS(e,t)});ue(sg,{displayName:"Command<deleteSelectedCellsCommand>",group:"Table"});var ag=le("AddColBefore",()=>()=>yS);ue(ag,{displayName:"Command<addColBeforeCommand>",group:"Table"});var og=le("AddColAfter",()=>()=>TS);ue(og,{displayName:"Command<addColAfterCommand>",group:"Table"});var lg=le("AddRowBefore",e=>()=>(t,n)=>{if(!Qt(t))return!1;if(n){const r=ur(t);n($1(e,t.tr,r,r.top))}return!0});ue(lg,{displayName:"Command<addRowBeforeCommand>",group:"Table"});var cg=le("AddRowAfter",e=>()=>(t,n)=>{if(!Qt(t))return!1;if(n){const r=ur(t);n($1(e,t.tr,r,r.bottom))}return!0});ue(cg,{displayName:"Command<addRowAfterCommand>",group:"Table"});var dg=le("SetAlign",()=>(e="left")=>IS("alignment",e));ue(dg,{displayName:"Command<setAlignCommand>",group:"Table"});var fg=yt(e=>new Dt(/^\|(?<col>\d+)[xX](?<row>\d+)\|\s$/,(t,n,r,i)=>{const u=t.doc.resolve(r);if(!u.node(-1).canReplaceWith(u.index(-1),u.indexAfter(-1),Nn.type(e)))return null;const s=Z1(e,Math.max(Number(n.groups?.row??0),2),Number(n.groups?.col)),a=t.tr.replaceRangeWith(r,i,s);return a.setSelection(de.create(a.doc,r+3)).scrollIntoView()}));ue(fg,{displayName:"InputRule<insertTableInputRule>",group:"Table"});var hg=mk(e=>({run:(t,n,r)=>{if(r)return t;function i(l){const c=l.childCount,d=l.lastChild?.childCount??0;if(c===0||d===0)return un.type(e).create();const f=l.firstChild;if(!(d>0&&f&&f.childCount===0))return l;if(c>=3){const T=l.child(1),E=[];for(let L=0;L<T.childCount;L++){const _=T.child(L);E.push(di.type(e).create(_.attrs,_.content,_.marks))}const O=f.type.create(f.attrs,E),w=[];for(let L=2;L<c;L++)w.push(l.child(L));return l.type.create(l.attrs,[O,...w])}const h=Array(d).fill(0).map(()=>di.type(e).createAndFill()),m=new Z(Q.from(h),0,0),b=f.replace(0,0,m);return l.replace(0,f.nodeSize,new Z(Q.from(b),0,0))}function u(l){const c=Ti.type(e),d=[];let f=[],h=!1;function m(){if(f.length===0)return;const b=Yu.type(e).createAndFill(),T=Nn.type(e).create(null,[b,...f]);d.push(i(T)),f=[]}return l.forEach(b=>{b.type===c?(h=!0,f.push(b)):(m(),d.push(b))}),m(),h?Q.from(d):l}function s(l){let c=u(l),d=c!==l;const f=[];return c.forEach(h=>{if(h.type===Nn.type(e)){const m=i(h);m!==h&&(d=!0),f.push(m)}else if(h.childCount>0){const m=s(h.content);m!==h.content?(d=!0,f.push(h.copy(m))):f.push(h)}else f.push(h)}),d?Q.from(f):l}function a(l){const c=[],d=[];l.forEach(f=>d.push(f));for(let f=0;f<d.length;f++){const h=d[f],m=d[f+1];h.type===un.type(e)&&h.content.size===0&&m&&m.type===Nn.type(e)||c.push(h)}return c.length<d.length?Q.from(c):l}let o=s(t.content);return o=a(o),new Z(Q.from(o),t.openStart,t.openEnd)}}));ue(hg,{displayName:"PasteRule<table>",group:"Table"});var Xd=_t("tableKeymap",{NextCell:{priority:100,shortcuts:["Mod-]","Tab"],command:e=>{const t=e.get(ke);return()=>t.call(jd.key)}},PrevCell:{shortcuts:["Mod-[","Shift-Tab"],command:e=>{const t=e.get(ke);return()=>t.call(Jd.key)}},ExitTable:{shortcuts:["Mod-Enter","Enter"],command:e=>{const t=e.get(ke);return()=>t.call(Zd.key)}}});ue(Xd.ctx,{displayName:"KeymapCtx<table>",group:"Table"});ue(Xd.shortcuts,{displayName:"Keymap<table>",group:"Table"});var zo="footnote_definition",S0="footnoteDefinition",$d=Qe("footnote_definition",()=>({group:"block",content:"block+",defining:!0,attrs:{label:{default:"",validate:"string"}},parseDOM:[{tag:`dl[data-type="${zo}"]`,getAttrs:e=>{if(!(e instanceof HTMLElement))throw sn(e);return{label:e.dataset.label}},contentElement:"dd"}],toDOM:e=>{const t=e.attrs.label;return["dl",{"data-label":t,"data-type":zo},["dt",t],["dd",0]]},parseMarkdown:{match:({type:e})=>e===S0,runner:(e,t,n)=>{e.openNode(n,{label:t.label}).next(t.children).closeNode()}},toMarkdown:{match:e=>e.type.name===zo,runner:(e,t)=>{e.openNode(S0,void 0,{label:t.attrs.label,identifier:t.attrs.label}).next(t.content).closeNode()}}}));ue($d.ctx,{displayName:"NodeSchemaCtx<footnodeDef>",group:"footnote"});ue($d.node,{displayName:"NodeSchema<footnodeDef>",group:"footnote"});var Ko="footnote_reference",ef=Qe("footnote_reference",()=>({group:"inline",inline:!0,atom:!0,attrs:{label:{default:"",validate:"string"}},parseDOM:[{tag:`sup[data-type="${Ko}"]`,getAttrs:e=>{if(!(e instanceof HTMLElement))throw sn(e);return{label:e.dataset.label}}}],toDOM:e=>{const t=e.attrs.label;return["sup",{"data-label":t,"data-type":Ko},t]},parseMarkdown:{match:({type:e})=>e==="footnoteReference",runner:(e,t,n)=>{e.addNode(n,{label:t.label})}},toMarkdown:{match:e=>e.type.name===Ko,runner:(e,t)=>{e.addNode("footnoteReference",void 0,void 0,{label:t.attrs.label,identifier:t.attrs.label})}}}));ue(ef.ctx,{displayName:"NodeSchemaCtx<footnodeRef>",group:"footnote"});ue(ef.node,{displayName:"NodeSchema<footnodeRef>",group:"footnote"});var tf=Rn.extendSchema(e=>t=>{const n=e(t);return{...n,attrs:{...n.attrs,checked:{default:null,validate:"boolean|null"}},parseDOM:[{tag:'li[data-item-type="task"]',getAttrs:r=>{if(!(r instanceof HTMLElement))throw sn(r);return{label:r.dataset.label,listType:r.dataset.listType,spread:r.dataset.spread,checked:r.dataset.checked?r.dataset.checked==="true":null}}},...n?.parseDOM||[]],toDOM:r=>n.toDOM&&r.attrs.checked==null?n.toDOM(r):["li",{"data-item-type":"task","data-label":r.attrs.label,"data-list-type":r.attrs.listType,"data-spread":r.attrs.spread,"data-checked":r.attrs.checked},0],parseMarkdown:{match:({type:r})=>r==="listItem",runner:(r,i,u)=>{if(i.checked==null){n.parseMarkdown.runner(r,i,u);return}const s=i.label!=null?`${i.label}.`:"•",a=i.checked!=null?!!i.checked:null,o=i.label!=null?"ordered":"bullet",l=i.spread!=null?`${i.spread}`:"true";r.openNode(u,{label:s,listType:o,spread:l,checked:a}),r.next(i.children),r.closeNode()}},toMarkdown:{match:r=>r.type.name==="list_item",runner:(r,i)=>{if(i.attrs.checked==null){n.toMarkdown.runner(r,i);return}const u=i.attrs.label,s=i.attrs.listType,a=i.attrs.spread==="true",o=i.attrs.checked;r.openNode("listItem",void 0,{label:u,listType:s,spread:a,checked:o}),r.next(i.content),r.closeNode()}}}});ue(tf.node,{displayName:"NodeSchema<taskListItem>",group:"ListItem"});ue(tf.ctx,{displayName:"NodeSchemaCtx<taskListItem>",group:"ListItem"});var pg=yt(()=>new Dt(/^\[(?<checked>\s|x)\]\s$/,(e,t,n,r)=>{const i=e.doc.resolve(n);let u=0,s=i.node(u);for(;s&&s.type.name!=="list_item";)u--,s=i.node(u);if(!s||s.attrs.checked!=null)return null;const a=t.groups?.checked==="x",o=i.before(u),l=e.tr;return l.deleteRange(n,r).setNodeMarkup(o,void 0,{...s.attrs,checked:a}),l}));ue(pg,{displayName:"InputRule<wrapInTaskListInputRule>",group:"ListItem"});var QI=[Vd,Xd].flat(),zI=[fg,pg],KI=[j1],qI=[hg],mg=On(()=>s6);ue(mg,{displayName:"Prose<autoInsertSpanPlugin>",group:"Prose"});var YI=On(()=>WS({}));ue(YI,{displayName:"Prose<columnResizingPlugin>",group:"Prose"});var Ag=On(()=>ZS({allowTableNodeSelection:!0}));ue(Ag,{displayName:"Prose<tableEditingPlugin>",group:"Prose"});var nf=Pr("remarkGFM",()=>FI);ue(nf.plugin,{displayName:"Remark<remarkGFMPlugin>",group:"Remark"});ue(nf.options,{displayName:"RemarkConfig<remarkGFMPlugin>",group:"Remark"});var GI=new Nt("MILKDOWN_KEEP_TABLE_ALIGN_PLUGIN");function VI(e,t){let n=0;return t.forEach((r,i,u)=>{r===e&&(n=u)}),n}var gg=On(()=>new wt({key:GI,appendTransaction:(e,t,n)=>{let r;const i=(u,s)=>{if(r||(r=n.tr),u.type.name!=="table_cell")return;const a=n.doc.resolve(s),o=a.node(a.depth),l=a.node(a.depth-1).firstChild;if(!l)return;const c=VI(u,o),d=l.maybeChild(c);if(!d)return;const f=d.attrs.alignment;f!==u.attrs.alignment&&r.setNodeMarkup(s,void 0,{...u.attrs,alignment:f})};return t.doc!==n.doc&&n.doc.descendants(i),r}}));ue(gg,{displayName:"Prose<keepTableAlignPlugin>",group:"Prose"});var JI=[gg,mg,nf,Ag].flat(),jI=[tf,Nn,Yu,Ti,di,Gu,$d,ef,Yd,Ku].flat(),ZI=[jd,Jd,Zd,eg,tg,ng,rg,ig,ug,sg,lg,cg,ag,og,dg,Gd],XI=[jI,zI,qI,KI,QI,ZI,JI].flat();const $I=`/*
|
|
46
|
+
`):t.addNode("break")}}}));v(gr.node,{displayName:"NodeSchema<hardbreak>",group:"Hardbreak"});v(gr.ctx,{displayName:"NodeSchemaCtx<hardbreak>",group:"Hardbreak"});var cd=ie("InsertHardbreak",e=>()=>(t,n)=>{const{selection:r,tr:i}=t;if(!(r instanceof ae))return!1;if(r.empty){const u=r.$from.node();if(u.childCount>0&&u.lastChild?.type.name==="hardbreak")return n?.(i.replaceRangeWith(r.to-1,r.to,t.schema.node("paragraph")).setSelection(ue.near(i.doc.resolve(r.to))).scrollIntoView()),!0}return n?.(i.setMeta("hardbreak",!0).replaceSelectionWith(gr.type(e).create()).scrollIntoView()),!0});v(cd,{displayName:"Command<insertHardbreakCommand>",group:"Hardbreak"});var dd=It("hardbreakKeymap",{InsertHardbreak:{shortcuts:"Shift-Enter",command:e=>{const t=e.get(ye);return()=>t.call(cd.key)}}});v(dd.ctx,{displayName:"KeymapCtx<hardbreak>",group:"Hardbreak"});v(dd.shortcuts,{displayName:"Keymap<hardbreak>",group:"Hardbreak"});var fd=Ut("hr");v(fd,{displayName:"Attr<hr>",group:"Hr"});var vu=Fe("hr",e=>({group:"block",parseDOM:[{tag:"hr"}],toDOM:t=>["hr",e.get(fd.key)(t)],parseMarkdown:{match:({type:t})=>t==="thematicBreak",runner:(t,n,r)=>{t.addNode(r)}},toMarkdown:{match:t=>t.type.name==="hr",runner:t=>{t.addNode("thematicBreak")}}}));v(vu.node,{displayName:"NodeSchema<hr>",group:"Hr"});v(vu.ctx,{displayName:"NodeSchemaCtx<hr>",group:"Hr"});var i1=mt(e=>new kt(/^(?:---|___\s|\*\*\*\s)$/,(t,n,r,i)=>{const{tr:u}=t;return n[0]&&u.replaceWith(r-1,i,vu.type(e).create()),u}));v(i1,{displayName:"InputRule<insertHrInputRule>",group:"Hr"});var u1=ie("InsertHr",e=>()=>(t,n)=>{if(!n)return!0;const r=$t.node.type(e).create(),{tr:i,selection:u}=t,{from:s}=u,a=vu.type(e).create();if(!a)return!0;const o=i.replaceSelectionWith(a).insert(s,r),l=ue.findFrom(o.doc.resolve(s),1,!0);return l&&n(o.setSelection(l).scrollIntoView()),!0});v(u1,{displayName:"Command<insertHrCommand>",group:"Hr"});var hd=Ut("bulletList");v(hd,{displayName:"Attr<bulletList>",group:"BulletList"});var hi=Fe("bullet_list",e=>({content:"listItem+",group:"block",attrs:{spread:{default:!1,validate:"boolean"}},parseDOM:[{tag:"ul",getAttrs:t=>{if(!(t instanceof HTMLElement))throw en(t);return{spread:t.dataset.spread==="true"}}}],toDOM:t=>["ul",{...e.get(hd.key)(t),"data-spread":t.attrs.spread},0],parseMarkdown:{match:({type:t,ordered:n})=>t==="list"&&!n,runner:(t,n,r)=>{const i=n.spread!=null?`${n.spread}`:"false";t.openNode(r,{spread:i}).next(n.children).closeNode()}},toMarkdown:{match:t=>t.type.name==="bullet_list",runner:(t,n)=>{t.openNode("list",void 0,{ordered:!1,spread:n.attrs.spread}).next(n.content).closeNode()}}}));v(hi.node,{displayName:"NodeSchema<bulletList>",group:"BulletList"});v(hi.ctx,{displayName:"NodeSchemaCtx<bulletList>",group:"BulletList"});var s1=mt(e=>Dc(/^\s*([-+*])\s$/,hi.type(e)));v(s1,{displayName:"InputRule<wrapInBulletListInputRule>",group:"BulletList"});var pd=ie("WrapInBulletList",e=>()=>Nc(hi.type(e)));v(pd,{displayName:"Command<wrapInBulletListCommand>",group:"BulletList"});var md=It("bulletListKeymap",{WrapInBulletList:{shortcuts:"Mod-Alt-8",command:e=>{const t=e.get(ye);return()=>t.call(pd.key)}}});v(md.ctx,{displayName:"KeymapCtx<bulletListKeymap>",group:"BulletList"});v(md.shortcuts,{displayName:"Keymap<bulletListKeymap>",group:"BulletList"});var Ad=Ut("orderedList");v(Ad,{displayName:"Attr<orderedList>",group:"OrderedList"});var pi=Fe("ordered_list",e=>({content:"listItem+",group:"block",attrs:{order:{default:1,validate:"number"},spread:{default:!1,validate:"boolean"}},parseDOM:[{tag:"ol",getAttrs:t=>{if(!(t instanceof HTMLElement))throw en(t);return{spread:t.dataset.spread,order:t.hasAttribute("start")?Number(t.getAttribute("start")):1}}}],toDOM:t=>["ol",{...e.get(Ad.key)(t),...t.attrs.order===1?{}:{start:t.attrs.order},"data-spread":t.attrs.spread},0],parseMarkdown:{match:({type:t,ordered:n})=>t==="list"&&!!n,runner:(t,n,r)=>{const i=n.spread!=null?`${n.spread}`:"true";t.openNode(r,{spread:i,order:n.start??1}).next(n.children).closeNode()}},toMarkdown:{match:t=>t.type.name==="ordered_list",runner:(t,n)=>{t.openNode("list",void 0,{ordered:!0,start:n.attrs.order??1,spread:n.attrs.spread==="true"}),t.next(n.content),t.closeNode()}}}));v(pi.node,{displayName:"NodeSchema<orderedList>",group:"OrderedList"});v(pi.ctx,{displayName:"NodeSchemaCtx<orderedList>",group:"OrderedList"});var a1=mt(e=>Dc(/^\s*(\d+)\.\s$/,pi.type(e),t=>({order:Number(t[1])}),(t,n)=>n.childCount+n.attrs.order===Number(t[1])));v(a1,{displayName:"InputRule<wrapInOrderedListInputRule>",group:"OrderedList"});var gd=ie("WrapInOrderedList",e=>()=>Nc(pi.type(e)));v(gd,{displayName:"Command<wrapInOrderedListCommand>",group:"OrderedList"});var bd=It("orderedListKeymap",{WrapInOrderedList:{shortcuts:"Mod-Alt-7",command:e=>{const t=e.get(ye);return()=>t.call(gd.key)}}});v(bd.ctx,{displayName:"KeymapCtx<orderedList>",group:"OrderedList"});v(bd.shortcuts,{displayName:"Keymap<orderedList>",group:"OrderedList"});var Ed=Ut("listItem");v(Ed,{displayName:"Attr<listItem>",group:"ListItem"});var Nn=Fe("list_item",e=>({group:"listItem",content:"paragraph block*",attrs:{label:{default:"•",validate:"string"},listType:{default:"bullet",validate:"string"},spread:{default:!0,validate:"boolean"}},defining:!0,parseDOM:[{tag:"li",getAttrs:t=>{if(!(t instanceof HTMLElement))throw en(t);return{label:t.dataset.label,listType:t.dataset.listType,spread:t.dataset.spread==="true"}}}],toDOM:t=>["li",{...e.get(Ed.key)(t),"data-label":t.attrs.label,"data-list-type":t.attrs.listType,"data-spread":t.attrs.spread},0],parseMarkdown:{match:({type:t})=>t==="listItem",runner:(t,n,r)=>{const i=n.label!=null?`${n.label}.`:"•",u=n.label!=null?"ordered":"bullet",s=n.spread!=null?`${n.spread}`:"true";t.openNode(r,{label:i,listType:u,spread:s}),t.next(n.children),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="list_item",runner:(t,n)=>{t.openNode("listItem",void 0,{spread:n.attrs.spread}),t.next(n.content),t.closeNode()}}}));v(Nn.node,{displayName:"NodeSchema<listItem>",group:"ListItem"});v(Nn.ctx,{displayName:"NodeSchemaCtx<listItem>",group:"ListItem"});var yd=ie("SinkListItem",e=>()=>r6(Nn.type(e)));v(yd,{displayName:"Command<sinkListItemCommand>",group:"ListItem"});var Td=ie("LiftListItem",e=>()=>e6(Nn.type(e)));v(Td,{displayName:"Command<liftListItemCommand>",group:"ListItem"});var Cd=ie("SplitListItem",e=>()=>$x(Nn.type(e)));v(Cd,{displayName:"Command<splitListItemCommand>",group:"ListItem"});function f6(e){return(t,n,r)=>{const{selection:i}=t;if(!(i instanceof ae))return!1;const{empty:u,$from:s}=i;return!u||s.parentOffset!==0||s.node(-1).type!==Nn.type(e)?!1:Fm(t,n,r)}}var xd=ie("LiftFirstListItem",e=>()=>f6(e));v(xd,{displayName:"Command<liftFirstListItemCommand>",group:"ListItem"});var kd=It("listItemKeymap",{NextListItem:{shortcuts:"Enter",command:e=>{const t=e.get(ye);return()=>t.call(Cd.key)}},SinkListItem:{shortcuts:["Tab","Mod-]"],command:e=>{const t=e.get(ye);return()=>t.call(yd.key)}},LiftListItem:{shortcuts:["Shift-Tab","Mod-["],command:e=>{const t=e.get(ye);return()=>t.call(Td.key)}},LiftFirstListItem:{shortcuts:["Backspace","Delete"],command:e=>{const t=e.get(ye);return()=>t.call(xd.key)}}});v(kd.ctx,{displayName:"KeymapCtx<listItem>",group:"ListItem"});v(kd.shortcuts,{displayName:"Keymap<listItem>",group:"ListItem"});var o1=Uc("text",()=>({group:"inline",parseMarkdown:{match:({type:e})=>e==="text",runner:(e,t)=>{e.addText(t.value)}},toMarkdown:{match:e=>e.type.name==="text",runner:(e,t)=>{e.addNode("text",void 0,t.text)}}}));v(o1,{displayName:"NodeSchema<text>",group:"Text"});var Id=Ut("html");v(Id,{displayName:"Attr<html>",group:"Html"});var Sd=Fe("html",e=>({atom:!0,group:"inline",inline:!0,attrs:{value:{default:"",validate:"string"}},toDOM:t=>{const n=document.createElement("span"),r={...e.get(Id.key)(t),"data-value":t.attrs.value,"data-type":"html"};return n.textContent=t.attrs.value,["span",r,t.attrs.value]},parseDOM:[{tag:'span[data-type="html"]',getAttrs:t=>({value:t.dataset.value??""})}],parseMarkdown:{match:({type:t})=>t==="html",runner:(t,n,r)=>{t.addNode(r,{value:n.value})}},toMarkdown:{match:t=>t.type.name==="html",runner:(t,n)=>{t.addNode("html",void 0,n.attrs.value)}}}));v(Sd.node,{displayName:"NodeSchema<html>",group:"Html"});v(Sd.ctx,{displayName:"NodeSchemaCtx<html>",group:"Html"});var h6=[XA,Zc,$t,Sa,ed,Mr,Ks,gr,rd,Bu,sd,Lu,fd,vu,ld,fi,hd,hi,Ad,pi,Ed,Nn,Wc,di,Yc,Mu,Vc,Un,jc,jr,Id,Sd,o1].flat(),p6=[e1,s1,a1,t1,i1,$A].flat(),m6=[GA,VA,JA,qA],A6=ie("IsMarkSelected",()=>e=>t=>{if(!e)return!1;const{doc:n,selection:r}=t;return n.rangeHasMark(r.from,r.to,e)}),g6=ie("IsNoteSelected",()=>e=>t=>e?QT(t,e).hasNode:!1),b6=ie("ClearTextInCurrentBlock",()=>()=>(e,t)=>{let n=e.tr;const{$from:r,$to:i}=n.selection,{pos:u}=r,{pos:s}=i,a=u-r.node().content.size;return a<0?!1:(n=n.deleteRange(a,s),t?.(n),!0)}),E6=ie("SetBlockType",()=>e=>(t,n)=>{const{nodeType:r,attrs:i=null}=e??{};if(!r)return!1;const u=t.tr,{from:s,to:a}=u.selection;try{u.setBlockType(s,a,r,i)}catch{return!1}return n?.(u),!0}),y6=ie("WrapInBlockType",()=>e=>(t,n)=>{const{nodeType:r,attrs:i=null}=e??{};if(!r)return!1;let u=t.tr;try{const{$from:s,$to:a}=u.selection,o=s.blockRange(a),l=o&&xc(o,r,i);if(!l)return!1;u=u.wrap(o,l)}catch{return!1}return n?.(u),!0}),T6=ie("AddBlockType",()=>e=>(t,n)=>{const{nodeType:r,attrs:i=null}=e??{};if(!r)return!1;const u=t.tr;try{const s=r instanceof yn?r:r.createAndFill(i);if(!s)return!1;u.replaceSelectionWith(s)}catch{return!1}return n?.(u),!0}),C6=ie("SelectTextNearPos",()=>e=>(t,n)=>{const{pos:r}=e??{};if(r==null)return!1;const i=(s,a,o)=>Math.min(Math.max(s,a),o),u=t.tr;try{const s=t.doc.resolve(i(r,0,t.doc.content.size));u.setSelection(ae.near(s))}catch{return!1}return n?.(u.scrollIntoView()),!0}),x6=[Xc,id,Bn,td,ad,cd,u1,n1,r1,gd,pd,yd,Cd,Td,xd,Kc,qc,zc,jA,ZA,A6,g6,b6,E6,y6,T6,C6],k6=[ud,od,dd,nd,kd,bd,md,$c,Qc,Jc,Gc].flat(),wd=Rr("remarkAddOrderInList",()=>()=>e=>{oi(e,"list",t=>{if(t.ordered){const n=t.start??1;t.children.forEach((r,i)=>{r.label=i+n})}})});v(wd.plugin,{displayName:"Remark<remarkAddOrderInListPlugin>",group:"Remark"});v(wd.options,{displayName:"RemarkConfig<remarkAddOrderInListPlugin>",group:"Remark"});var Nd=Rr("remarkLineBreak",()=>()=>e=>{const t=/[\t ]*(?:\r?\n|\r)/g;oi(e,"text",(n,r,i)=>{if(!n.value||typeof n.value!="string")return;const u=[];let s=0;t.lastIndex=0;let a=t.exec(n.value);for(;a;){const o=a.index;s!==o&&u.push({type:"text",value:n.value.slice(s,o)}),u.push({type:"break",data:{isInline:!0}}),s=o+a[0].length,a=t.exec(n.value)}if(u.length>0&&i&&typeof r=="number")return s<n.value.length&&u.push({type:"text",value:n.value.slice(s)}),i.children.splice(r,1,...u),r+u.length})});v(Nd.plugin,{displayName:"Remark<remarkLineBreak>",group:"Remark"});v(Nd.options,{displayName:"RemarkConfig<remarkLineBreak>",group:"Remark"});var Dd=Rr("remarkInlineLink",()=>u6);v(Dd.plugin,{displayName:"Remark<remarkInlineLinkPlugin>",group:"Remark"});v(Dd.options,{displayName:"RemarkConfig<remarkInlineLinkPlugin>",group:"Remark"});var I6=e=>!!e.children,S6=e=>e.type==="html";function w6(e,t){return n(e,0,null)[0];function n(r,i,u){if(I6(r)){const s=[];for(let a=0,o=r.children.length;a<o;a++){const l=r.children[a];if(l){const c=n(l,a,r);if(c)for(let d=0,f=c.length;d<f;d++){const p=c[d];p&&s.push(p)}}}r.children=s}return t(r,i,u)}}var N6=["root","blockquote","listItem"],_d=Rr("remarkHTMLTransformer",()=>()=>e=>{w6(e,(t,n,r)=>S6(t)?(r&&N6.includes(r.type)&&(t.children=[{...t}],delete t.value,t.type="paragraph"),[t]):[t])});v(_d.plugin,{displayName:"Remark<remarkHtmlTransformer>",group:"Remark"});v(_d.options,{displayName:"RemarkConfig<remarkHtmlTransformer>",group:"Remark"});var Od=Rr("remarkMarker",()=>()=>(e,t)=>{const n=r=>t.value.charAt(r.position.start.offset);oi(e,r=>["strong","emphasis"].includes(r.type),r=>{r.marker=n(r)})});v(Od.plugin,{displayName:"Remark<remarkMarker>",group:"Remark"});v(Od.options,{displayName:"RemarkConfig<remarkMarker>",group:"Remark"});var l1=wn(()=>{let e=!1;const t=new Ct({key:new xt("MILKDOWN_INLINE_NODES_CURSOR"),state:{init(){return!1},apply(n){if(!n.selection.empty)return!1;const r=n.selection.$from,i=r.nodeBefore,u=r.nodeAfter;return!!(i&&u&&i.isInline&&!i.isText&&u.isInline&&!u.isText)}},props:{handleDOMEvents:{compositionend:(n,r)=>e?(e=!1,requestAnimationFrame(()=>{if(t.getState(n.state)){const i=n.state.selection.from;r.preventDefault(),n.dispatch(n.state.tr.insertText(r.data||"",i))}}),!0):!1,compositionstart:n=>(t.getState(n.state)&&(e=!0),!1),beforeinput:(n,r)=>{if(t.getState(n.state)&&r instanceof InputEvent&&r.data&&!e){const i=n.state.selection.from;return r.preventDefault(),n.dispatch(n.state.tr.insertText(r.data||"",i)),!0}return!1}},decorations(n){if(t.getState(n)){const r=n.selection.$from.pos,i=document.createElement("span"),u=qe.widget(r,i,{side:-1}),s=document.createElement("span"),a=qe.widget(r,s);return setTimeout(()=>{i.contentEditable="true",s.contentEditable="true"}),we.create(n.doc,[u,a])}return we.empty}}});return t});v(l1,{displayName:"Prose<inlineNodesCursorPlugin>",group:"Prose"});var c1=wn(e=>new Ct({key:new xt("MILKDOWN_HARDBREAK_MARKS"),appendTransaction:(t,n,r)=>{if(!t.length)return;const[i]=t;if(!i)return;const[u]=i.steps;if(i.getMeta("hardbreak")){if(!(u instanceof Me))return;const{from:s}=u;return r.tr.setNodeMarkup(s,gr.type(e),void 0,[])}if(u instanceof bn){let s=r.tr;const{from:a,to:o}=u;return r.doc.nodesBetween(a,o,(l,c)=>{l.type===gr.type(e)&&(s=s.setNodeMarkup(c,gr.type(e),void 0,[]))}),s}}}));v(c1,{displayName:"Prose<hardbreakClearMarkPlugin>",group:"Prose"});var Rd=$n(["table","code_block"],"hardbreakFilterNodes");v(Rd,{displayName:"Ctx<hardbreakFilterNodes>",group:"Prose"});var d1=wn(e=>{const t=e.get(Rd.key);return new Ct({key:new xt("MILKDOWN_HARDBREAK_FILTER"),filterTransaction:(n,r)=>{const i=n.getMeta("hardbreak"),[u]=n.steps;if(i&&u){const{from:s}=u,a=r.doc.resolve(s);let o=a.depth,l=!0;for(;o>0;)t.includes(a.node(o).type.name)&&(l=!1),o--;return l}return!0}})});v(d1,{displayName:"Prose<hardbreakFilterPlugin>",group:"Prose"});var f1=wn(e=>{const t=new xt("MILKDOWN_HEADING_ID"),n=r=>{if(r.composing)return;const i=e.get(Sa.key),u=r.state.tr.setMeta("addToHistory",!1);let s=!1;const a={};r.state.doc.descendants((o,l)=>{if(o.type===Mr.type(e)){if(o.textContent.trim().length===0)return;const c=o.attrs;let d=i(o);a[d]?(a[d]+=1,d+=`-#${a[d]}`):a[d]=1,c.id!==d&&(s=!0,u.setMeta(t,!0).setNodeMarkup(l,void 0,{...c,id:d}))}}),s&&r.dispatch(u)};return new Ct({key:t,view:r=>(n(r),{update:(i,u)=>{i.state.doc.eq(u.doc)||n(i)}})})});v(f1,{displayName:"Prose<syncHeadingIdPlugin>",group:"Prose"});var h1=wn(e=>{const t=(n,r,i)=>{if(!i.selection||n.some(d=>d.getMeta("addToHistory")===!1||!d.isGeneric))return null;const u=pi.type(e),s=hi.type(e),a=Nn.type(e),o=(d,f,p=1)=>{let m=!1;const A=`${f+p}.`;return d.label!==A&&(d.label=A,m=!0),m};let l=i.tr,c=!1;return i.doc.descendants((d,f,p,m)=>{if(d.type===s){const A=d.maybeChild(0);A?.type===a&&A.attrs.listType==="ordered"&&(c=!0,l.setNodeMarkup(f,u,{spread:"true"}),d.descendants((E,g,N,I)=>{if(E.type===a){const R={...E.attrs};o(R,I)&&(l=l.setNodeMarkup(g,void 0,R))}return!1}))}else if(d.type===a&&p?.type===u){const A={...d.attrs};let E=!1;A.listType!=="ordered"&&(A.listType="ordered",E=!0),p?.maybeChild(0)&&(E=o(A,m,p?.attrs.order??1)),E&&(l=l.setNodeMarkup(f,void 0,A),c=!0)}}),c?l.setMeta("addToHistory",!1):null};return new Ct({key:new xt("MILKDOWN_KEEP_LIST_ORDER"),appendTransaction:t})});v(h1,{displayName:"Prose<syncListOrderPlugin>",group:"Prose"});var D6=[c1,Rd,d1,l1,wd,Dd,Nd,_d,Od,Ia,f1,h1].flat(),_6=[h6,p6,m6,x6,k6,D6].flat();let Ql,Yl;if(typeof WeakMap<"u"){let e=new WeakMap;Ql=t=>e.get(t),Yl=(t,n)=>(e.set(t,n),n)}else{const e=[];let n=0;Ql=r=>{for(let i=0;i<e.length;i+=2)if(e[i]==r)return e[i+1]},Yl=(r,i)=>(n==10&&(n=0),e[n++]=r,e[n++]=i)}var Ee=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t<this.map.length;t++){const n=this.map[t];if(n!=e)continue;const r=t%this.width,i=t/this.width|0;let u=r+1,s=i+1;for(let a=1;u<this.width&&this.map[t+a]==n;a++)u++;for(let a=1;s<this.height&&this.map[t+this.width*a]==n;a++)s++;return{left:r,top:i,right:u,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){const{left:r,right:i,top:u,bottom:s}=this.findCell(e);return t=="horiz"?(n<0?r==0:i==this.width)?null:this.map[u*this.width+(n<0?r-1:i)]:(n<0?u==0:s==this.height)?null:this.map[r+this.width*(n<0?u-1:s)]}rectBetween(e,t){const{left:n,right:r,top:i,bottom:u}=this.findCell(e),{left:s,right:a,top:o,bottom:l}=this.findCell(t);return{left:Math.min(n,s),top:Math.min(i,o),right:Math.max(r,a),bottom:Math.max(u,l)}}cellsInRect(e){const t=[],n={};for(let r=e.top;r<e.bottom;r++)for(let i=e.left;i<e.right;i++){const u=r*this.width+i,s=this.map[u];n[s]||(n[s]=!0,!(i==e.left&&i&&this.map[u-1]==s||r==e.top&&r&&this.map[u-this.width]==s)&&t.push(s))}return t}positionAt(e,t,n){for(let r=0,i=0;;r++){const u=i+n.child(r).nodeSize;if(r==e){let s=t+e*this.width;const a=(e+1)*this.width;for(;s<a&&this.map[s]<i;)s++;return s==a?u-1:this.map[s]}i=u}}static get(e){return Ql(e)||Yl(e,O6(e))}};function O6(e){if(e.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+e.type.name);const t=R6(e),n=e.childCount,r=[];let i=0,u=null;const s=[];for(let l=0,c=t*n;l<c;l++)r[l]=0;for(let l=0,c=0;l<n;l++){const d=e.child(l);c++;for(let m=0;;m++){for(;i<r.length&&r[i]!=0;)i++;if(m==d.childCount)break;const A=d.child(m),{colspan:E,rowspan:g,colwidth:N}=A.attrs;for(let I=0;I<g;I++){if(I+l>=n){(u||(u=[])).push({type:"overlong_rowspan",pos:c,n:g-I});break}const R=i+I*t;for(let w=0;w<E;w++){r[R+w]==0?r[R+w]=c:(u||(u=[])).push({type:"collision",row:l,pos:c,n:E-w});const k=N&&N[w];if(k){const O=(R+w)%t*2,Q=s[O];Q==null||Q!=k&&s[O+1]==1?(s[O]=k,s[O+1]=1):Q==k&&s[O+1]++}}}i+=E,c+=A.nodeSize}const f=(l+1)*t;let p=0;for(;i<f;)r[i++]==0&&p++;p&&(u||(u=[])).push({type:"missing",row:l,n:p}),c++}(t===0||n===0)&&(u||(u=[])).push({type:"zero_sized"});const a=new Ee(t,n,r,u);let o=!1;for(let l=0;!o&&l<s.length;l+=2)s[l]!=null&&s[l+1]<n&&(o=!0);return o&&M6(a,s,e),a}function R6(e){let t=-1,n=!1;for(let r=0;r<e.childCount;r++){const i=e.child(r);let u=0;if(n)for(let s=0;s<r;s++){const a=e.child(s);for(let o=0;o<a.childCount;o++){const l=a.child(o);s+l.attrs.rowspan>r&&(u+=l.attrs.colspan)}}for(let s=0;s<i.childCount;s++){const a=i.child(s);u+=a.attrs.colspan,a.attrs.rowspan>1&&(n=!0)}t==-1?t=u:t!=u&&(t=Math.max(t,u))}return t}function M6(e,t,n){e.problems||(e.problems=[]);const r={};for(let i=0;i<e.map.length;i++){const u=e.map[i];if(r[u])continue;r[u]=!0;const s=n.nodeAt(u);if(!s)throw new RangeError(`No cell with offset ${u} found`);let a=null;const o=s.attrs;for(let l=0;l<o.colspan;l++){const c=t[(i+l)%e.width*2];c!=null&&(!o.colwidth||o.colwidth[l]!=c)&&((a||(a=B6(o)))[l]=c)}a&&e.problems.unshift({type:"colwidth mismatch",pos:u,colwidth:a})}}function B6(e){if(e.colwidth)return e.colwidth.slice();const t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function Jh(e,t){if(typeof e=="string")return{};const n=e.getAttribute("data-colwidth"),r=n&&/^\d+(,\d+)*$/.test(n)?n.split(",").map(s=>Number(s)):null,i=Number(e.getAttribute("colspan")||1),u={colspan:i,rowspan:Number(e.getAttribute("rowspan")||1),colwidth:r&&r.length==i?r:null};for(const s in t){const a=t[s].getFromDOM,o=a&&a(e);o!=null&&(u[s]=o)}return u}function jh(e,t){const n={};e.attrs.colspan!=1&&(n.colspan=e.attrs.colspan),e.attrs.rowspan!=1&&(n.rowspan=e.attrs.rowspan),e.attrs.colwidth&&(n["data-colwidth"]=e.attrs.colwidth.join(","));for(const r in t){const i=t[r].setDOMAttr;i&&i(e.attrs[r],n)}return n}function L6(e){if(e!==null){if(!Array.isArray(e))throw new TypeError("colwidth must be null or an array");for(const t of e)if(typeof t!="number")throw new TypeError("colwidth must be null or an array of numbers")}}function v6(e){const t=e.cellAttributes||{},n={colspan:{default:1,validate:"number"},rowspan:{default:1,validate:"number"},colwidth:{default:null,validate:L6}};for(const r in t)n[r]={default:t[r].default,validate:t[r].validate};return{table:{content:"table_row+",tableRole:"table",isolating:!0,group:e.tableGroup,parseDOM:[{tag:"table"}],toDOM(){return["table",["tbody",0]]}},table_row:{content:"(table_cell | table_header)*",tableRole:"row",parseDOM:[{tag:"tr"}],toDOM(){return["tr",0]}},table_cell:{content:e.cellContent,attrs:n,tableRole:"cell",isolating:!0,parseDOM:[{tag:"td",getAttrs:r=>Jh(r,t)}],toDOM(r){return["td",jh(r,t),0]}},table_header:{content:e.cellContent,attrs:n,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:r=>Jh(r,t)}],toDOM(r){return["th",jh(r,t),0]}}}}function Mt(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(const n in e.nodes){const r=e.nodes[n],i=r.spec.tableRole;i&&(t[i]=r)}}return t}const Pn=new xt("selectingCells");function ii(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 vt(e){const 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 wa(e){const 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;const n=ii(t.$head)||P6(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function P6(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){const r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){const r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n-t.nodeSize)}}function zl(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function F6(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function Md(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function p1(e,t,n){const r=e.node(-1),i=Ee.get(r),u=e.start(-1),s=i.nextCell(e.pos-u,t,n);return s==null?null:e.node(0).resolve(u+s)}function Nr(e,t,n=1){const r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some(i=>i>0)||(r.colwidth=null)),r}function H6(e,t,n=1){const r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let i=0;i<n;i++)r.colwidth.splice(t,0,0)}return r}function U6(e,t,n){const r=Mt(t.type.schema).header_cell;for(let i=0;i<e.height;i++)if(t.nodeAt(e.map[n+i*e.width]).type!=r)return!1;return!0}var Ie=class dn extends ue{constructor(t,n=t){const r=t.node(-1),i=Ee.get(r),u=t.start(-1),s=i.rectBetween(t.pos-u,n.pos-u),a=t.node(0),o=i.cellsInRect(s).filter(c=>c!=n.pos-u);o.unshift(n.pos-u);const l=o.map(c=>{const d=r.nodeAt(c);if(!d)throw new RangeError(`No cell with offset ${c} found`);const f=u+c+1;return new Bm(a.resolve(f),a.resolve(f+d.content.size))});super(l[0].$from,l[0].$to,l),this.$anchorCell=t,this.$headCell=n}map(t,n){const r=t.resolve(n.map(this.$anchorCell.pos)),i=t.resolve(n.map(this.$headCell.pos));if(zl(r)&&zl(i)&&Md(r,i)){const u=this.$anchorCell.node(-1)!=r.node(-1);return u&&this.isRowSelection()?dn.rowSelection(r,i):u&&this.isColSelection()?dn.colSelection(r,i):new dn(r,i)}return ae.between(r,i)}content(){const t=this.$anchorCell.node(-1),n=Ee.get(t),r=this.$anchorCell.start(-1),i=n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),u={},s=[];for(let o=i.top;o<i.bottom;o++){const l=[];for(let c=o*n.width+i.left,d=i.left;d<i.right;d++,c++){const f=n.map[c];if(u[f])continue;u[f]=!0;const p=n.findCell(f);let m=t.nodeAt(f);if(!m)throw new RangeError(`No cell with offset ${f} found`);const A=i.left-p.left,E=p.right-i.right;if(A>0||E>0){let g=m.attrs;if(A>0&&(g=Nr(g,0,A)),E>0&&(g=Nr(g,g.colspan-E,E)),p.left<i.left){if(m=m.type.createAndFill(g),!m)throw new RangeError(`Could not create cell with attrs ${JSON.stringify(g)}`)}else m=m.type.create(g,m.content)}if(p.top<i.top||p.bottom>i.bottom){const g={...m.attrs,rowspan:Math.min(p.bottom,i.bottom)-Math.max(p.top,i.top)};p.top<i.top?m=m.type.createAndFill(g):m=m.type.create(g,m.content)}l.push(m)}s.push(t.child(o).copy(H.from(l)))}const a=this.isColSelection()&&this.isRowSelection()?t:s;return new z(H.from(a),1,1)}replace(t,n=z.empty){const r=t.steps.length,i=this.ranges;for(let s=0;s<i.length;s++){const{$from:a,$to:o}=i[s],l=t.mapping.slice(r);t.replace(l.map(a.pos),l.map(o.pos),s?z.empty:n)}const u=ue.findFrom(t.doc.resolve(t.mapping.slice(r).map(this.to)),-1);u&&t.setSelection(u)}replaceWith(t,n){this.replace(t,new z(H.from(n),0,0))}forEachCell(t){const n=this.$anchorCell.node(-1),r=Ee.get(n),i=this.$anchorCell.start(-1),u=r.cellsInRect(r.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i));for(let s=0;s<u.length;s++)t(n.nodeAt(u[s]),i+u[s])}isColSelection(){const t=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(t,n)>0)return!1;const r=t+this.$anchorCell.nodeAfter.attrs.rowspan,i=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,i)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){const r=t.node(-1),i=Ee.get(r),u=t.start(-1),s=i.findCell(t.pos-u),a=i.findCell(n.pos-u),o=t.node(0);return s.top<=a.top?(s.top>0&&(t=o.resolve(u+i.map[s.left])),a.bottom<i.height&&(n=o.resolve(u+i.map[i.width*(i.height-1)+a.right-1]))):(a.top>0&&(n=o.resolve(u+i.map[a.left])),s.bottom<i.height&&(t=o.resolve(u+i.map[i.width*(i.height-1)+s.right-1]))),new dn(t,n)}isRowSelection(){const t=this.$anchorCell.node(-1),n=Ee.get(t),r=this.$anchorCell.start(-1),i=n.colCount(this.$anchorCell.pos-r),u=n.colCount(this.$headCell.pos-r);if(Math.min(i,u)>0)return!1;const s=i+this.$anchorCell.nodeAfter.attrs.colspan,a=u+this.$headCell.nodeAfter.attrs.colspan;return Math.max(s,a)==n.width}eq(t){return t instanceof dn&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){const r=t.node(-1),i=Ee.get(r),u=t.start(-1),s=i.findCell(t.pos-u),a=i.findCell(n.pos-u),o=t.node(0);return s.left<=a.left?(s.left>0&&(t=o.resolve(u+i.map[s.top*i.width])),a.right<i.width&&(n=o.resolve(u+i.map[i.width*(a.top+1)-1]))):(a.left>0&&(n=o.resolve(u+i.map[a.top*i.width])),s.right<i.width&&(t=o.resolve(u+i.map[i.width*(s.top+1)-1]))),new dn(t,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new dn(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){return new dn(t.resolve(n),t.resolve(r))}getBookmark(){return new W6(this.$anchorCell.pos,this.$headCell.pos)}};Ie.prototype.visible=!1;ue.jsonID("cell",Ie);var W6=class m1{constructor(t,n){this.anchor=t,this.head=n}map(t){return new m1(t.map(this.anchor),t.map(this.head))}resolve(t){const n=t.resolve(this.anchor),r=t.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&r.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&r.index()<r.parent.childCount&&Md(n,r)?new Ie(n,r):ue.near(r,1)}};function K6(e){if(!(e.selection instanceof Ie))return null;const t=[];return e.selection.forEachCell((n,r)=>{t.push(qe.node(r,r+n.nodeSize,{class:"selectedCell"}))}),we.create(e.doc,t)}function Q6({$from:e,$to:t}){if(e.pos==t.pos||e.pos<t.pos-6)return!1;let n=e.pos,r=t.pos,i=e.depth;for(;i>=0&&!(e.after(i+1)<e.end(i));i--,n++);for(let u=t.depth;u>=0&&!(t.before(u+1)>t.start(u));u--,r--);return n==r&&/row|table/.test(e.node(i).type.spec.tableRole)}function Y6({$from:e,$to:t}){let n,r;for(let i=e.depth;i>0;i--){const u=e.node(i);if(u.type.spec.tableRole==="cell"||u.type.spec.tableRole==="header_cell"){n=u;break}}for(let i=t.depth;i>0;i--){const u=t.node(i);if(u.type.spec.tableRole==="cell"||u.type.spec.tableRole==="header_cell"){r=u;break}}return n!==r&&t.parentOffset===0}function z6(e,t,n){const r=(t||e).selection,i=(t||e).doc;let u,s;if(r instanceof re&&(s=r.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")u=Ie.create(i,r.from);else if(s=="row"){const a=i.resolve(r.from+1);u=Ie.rowSelection(a,a)}else if(!n){const a=Ee.get(r.node),o=r.from+1,l=o+a.map[a.width*a.height-1];u=Ie.create(i,o+1,l)}}else r instanceof ae&&Q6(r)?u=ae.create(i,r.from):r instanceof ae&&Y6(r)&&(u=ae.create(i,r.$from.start(),r.$from.end()));return u&&(t||(t=e.tr)).setSelection(u),t}const G6=new xt("fix-tables");function A1(e,t,n,r){const i=e.childCount,u=t.childCount;e:for(let s=0,a=0;s<u;s++){const o=t.child(s);for(let l=a,c=Math.min(i,s+3);l<c;l++)if(e.child(l)==o){a=l+1,n+=o.nodeSize;continue e}r(o,n),a<i&&e.child(a).sameMarkup(o)?A1(e.child(a),o,n+1,r):o.nodesBetween(0,o.content.size,r,n+1),n+=o.nodeSize}}function V6(e,t){let n;const r=(i,u)=>{i.type.spec.tableRole=="table"&&(n=q6(e,i,u,n))};return t?t.doc!=e.doc&&A1(t.doc,e.doc,0,r):e.doc.descendants(r),n}function q6(e,t,n,r){const i=Ee.get(t);if(!i.problems)return r;r||(r=e.tr);const u=[];for(let o=0;o<i.height;o++)u.push(0);for(let o=0;o<i.problems.length;o++){const l=i.problems[o];if(l.type=="collision"){const c=t.nodeAt(l.pos);if(!c)continue;const d=c.attrs;for(let f=0;f<d.rowspan;f++)u[l.row+f]+=l.n;r.setNodeMarkup(r.mapping.map(n+1+l.pos),null,Nr(d,d.colspan-l.n,l.n))}else if(l.type=="missing")u[l.row]+=l.n;else if(l.type=="overlong_rowspan"){const c=t.nodeAt(l.pos);if(!c)continue;r.setNodeMarkup(r.mapping.map(n+1+l.pos),null,{...c.attrs,rowspan:c.attrs.rowspan-l.n})}else if(l.type=="colwidth mismatch"){const c=t.nodeAt(l.pos);if(!c)continue;r.setNodeMarkup(r.mapping.map(n+1+l.pos),null,{...c.attrs,colwidth:l.colwidth})}else if(l.type=="zero_sized"){const c=r.mapping.map(n);r.delete(c,c+t.nodeSize)}}let s,a;for(let o=0;o<u.length;o++)u[o]&&(s==null&&(s=o),a=o);for(let o=0,l=n+1;o<i.height;o++){const c=t.child(o),d=l+c.nodeSize,f=u[o];if(f>0){let p="cell";c.firstChild&&(p=c.firstChild.type.spec.tableRole);const m=[];for(let E=0;E<f;E++){const g=Mt(e.schema)[p].createAndFill();g&&m.push(g)}const A=(o==0||s==o-1)&&a==o?l+1:d-1;r.insert(r.mapping.map(A),m)}l=d}return r.setMeta(G6,{fixTables:!0})}function g1(e){const t=Ee.get(e),n=[],r=t.height,i=t.width;for(let u=0;u<r;u++){const s=[];for(let a=0;a<i;a++){const o=u*i+a,l=t.map[o];if(u>0){const c=o-i;if(l===t.map[c]){s.push(null);continue}}if(a>0){const c=o-1;if(l===t.map[c]){s.push(null);continue}}s.push(e.nodeAt(l))}n.push(s)}return n}function b1(e,t){const n=[],r=Ee.get(e),i=r.height,u=r.width;for(let s=0;s<i;s++){const a=e.child(s),o=[];for(let c=0;c<u;c++){const d=t[s][c];if(!d)continue;const f=r.map[s*r.width+c],p=e.nodeAt(f);if(!p)continue;const m=p.type.createChecked(d.attrs,d.content,d.marks);o.push(m)}const l=a.type.createChecked(a.attrs,o,a.marks);n.push(l)}return e.type.createChecked(e.attrs,n,e.marks)}function E1(e,t,n,r){const i=t[0]>n[0]?-1:1,u=e.splice(t[0],t.length),s=u.length%2===0?1:0;let a;return a=i===-1?n[0]:n[n.length-1]-s,e.splice(a,0,...u),e}function Pu(e){return J6(t=>t.type.spec.tableRole==="table",e)}function J6(e,t){for(let n=t.depth;n>=0;n-=1){const r=t.node(n);if(e(r))return{node:r,pos:n===0?0:t.before(n),start:t.start(n),depth:n}}return null}function Qr(e,t){const n=Pu(t.$from);if(!n)return;const r=Ee.get(n.node);if(!(e<0||e>r.width-1))return r.cellsInRect({left:e,right:e+1,top:0,bottom:r.height}).map(i=>{const u=n.node.nodeAt(i),s=i+n.start;return{pos:s,start:s+1,node:u,depth:n.depth+2}})}function Yr(e,t){const n=Pu(t.$from);if(!n)return;const r=Ee.get(n.node);if(!(e<0||e>r.height-1))return r.cellsInRect({left:0,right:r.width,top:e,bottom:e+1}).map(i=>{const u=n.node.nodeAt(i),s=i+n.start;return{pos:s,start:s+1,node:u,depth:n.depth+2}})}function Zh(e,t,n=t){let r=t,i=n;for(let c=t;c>=0;c--){const d=Qr(c,e.selection);d&&d.forEach(f=>{const p=f.node.attrs.colspan+c-1;p>=r&&(r=c),p>i&&(i=p)})}for(let c=t;c<=i;c++){const d=Qr(c,e.selection);d&&d.forEach(f=>{const p=f.node.attrs.colspan+c-1;f.node.attrs.colspan>1&&p>i&&(i=p)})}const u=[];for(let c=r;c<=i;c++){const d=Qr(c,e.selection);d&&d.length>0&&u.push(c)}r=u[0],i=u[u.length-1];const s=Qr(r,e.selection),a=Yr(0,e.selection);if(!s||!a)return;const o=e.doc.resolve(s[s.length-1].pos);let l;for(let c=i;c>=r;c--){const d=Qr(c,e.selection);if(d&&d.length>0){for(let f=a.length-1;f>=0;f--)if(a[f].pos===d[0].pos){l=d[0];break}if(l)break}}if(l)return{$anchor:o,$head:e.doc.resolve(l.pos),indexes:u}}function Xh(e,t,n=t){let r=t,i=n;for(let c=t;c>=0;c--){const d=Yr(c,e.selection);d&&d.forEach(f=>{const p=f.node.attrs.rowspan+c-1;p>=r&&(r=c),p>i&&(i=p)})}for(let c=t;c<=i;c++){const d=Yr(c,e.selection);d&&d.forEach(f=>{const p=f.node.attrs.rowspan+c-1;f.node.attrs.rowspan>1&&p>i&&(i=p)})}const u=[];for(let c=r;c<=i;c++){const d=Yr(c,e.selection);d&&d.length>0&&u.push(c)}r=u[0],i=u[u.length-1];const s=Yr(r,e.selection),a=Qr(0,e.selection);if(!s||!a)return;const o=e.doc.resolve(s[s.length-1].pos);let l;for(let c=i;c>=r;c--){const d=Yr(c,e.selection);if(d&&d.length>0){for(let f=a.length-1;f>=0;f--)if(a[f].pos===d[0].pos){l=d[0];break}if(l)break}}if(l)return{$anchor:o,$head:e.doc.resolve(l.pos),indexes:u}}function $h(e){return e[0].map((t,n)=>e.map(r=>r[n]))}function j6(e){var t,n;const{tr:r,originIndex:i,targetIndex:u,select:s,pos:a}=e,o=Pu(r.doc.resolve(a));if(!o)return!1;const l=(t=Zh(r,i))===null||t===void 0?void 0:t.indexes,c=(n=Zh(r,u))===null||n===void 0?void 0:n.indexes;if(!l||!c||l.includes(u))return!1;const d=Z6(o.node,l,c);if(r.replaceWith(o.pos,o.pos+o.node.nodeSize,d),!s)return!0;const f=Ee.get(d),p=o.start,m=u,A=f.positionAt(f.height-1,m,d),E=r.doc.resolve(p+A),g=f.positionAt(0,m,d),N=r.doc.resolve(p+g);return r.setSelection(Ie.colSelection(E,N)),!0}function Z6(e,t,n,r){let i=$h(g1(e));return i=E1(i,t,n),i=$h(i),b1(e,i)}function X6(e){var t,n;const{tr:r,originIndex:i,targetIndex:u,select:s,pos:a}=e,o=Pu(r.doc.resolve(a));if(!o)return!1;const l=(t=Xh(r,i))===null||t===void 0?void 0:t.indexes,c=(n=Xh(r,u))===null||n===void 0?void 0:n.indexes;if(!l||!c||l.includes(u))return!1;const d=$6(o.node,l,c);if(r.replaceWith(o.pos,o.pos+o.node.nodeSize,d),!s)return!0;const f=Ee.get(d),p=o.start,m=u,A=f.positionAt(m,f.width-1,d),E=r.doc.resolve(p+A),g=f.positionAt(m,0,d),N=r.doc.resolve(p+g);return r.setSelection(Ie.rowSelection(E,N)),!0}function $6(e,t,n,r){let i=g1(e);return i=E1(i,t,n),b1(e,i)}function er(e){const t=e.selection,n=wa(e),r=n.node(-1),i=n.start(-1),u=Ee.get(r);return{...t instanceof Ie?u.rectBetween(t.$anchorCell.pos-i,t.$headCell.pos-i):u.findCell(n.pos-i),tableStart:i,map:u,table:r}}function y1(e,{map:t,tableStart:n,table:r},i){let u=i>0?-1:0;U6(t,r,i+u)&&(u=i==0||i==t.width?null:0);for(let s=0;s<t.height;s++){const a=s*t.width+i;if(i>0&&i<t.width&&t.map[a-1]==t.map[a]){const o=t.map[a],l=r.nodeAt(o);e.setNodeMarkup(e.mapping.map(n+o),null,H6(l.attrs,i-t.colCount(o))),s+=l.attrs.rowspan-1}else{const o=u==null?Mt(r.type.schema).cell:r.nodeAt(t.map[a+u]).type,l=t.positionAt(s,i,r);e.insert(e.mapping.map(n+l),o.createAndFill())}}return e}function ek(e,t){if(!vt(e))return!1;if(t){const n=er(e);t(y1(e.tr,n,n.left))}return!0}function tk(e,t){if(!vt(e))return!1;if(t){const n=er(e);t(y1(e.tr,n,n.right))}return!0}function nk(e,{map:t,table:n,tableStart:r},i){const u=e.mapping.maps.length;for(let s=0;s<t.height;){const a=s*t.width+i,o=t.map[a],l=n.nodeAt(o),c=l.attrs;if(i>0&&t.map[a-1]==o||i<t.width-1&&t.map[a+1]==o)e.setNodeMarkup(e.mapping.slice(u).map(r+o),null,Nr(c,i-t.colCount(o)));else{const d=e.mapping.slice(u).map(r+o);e.delete(d,d+l.nodeSize)}s+=c.rowspan}}function rk(e,t){if(!vt(e))return!1;if(t){const n=er(e),r=e.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let i=n.right-1;nk(r,n,i),i!=n.left;i--){const u=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!u)throw new RangeError("No table found");n.table=u,n.map=Ee.get(u)}t(r)}return!0}function ik(e,{map:t,table:n,tableStart:r},i){let u=0;for(let l=0;l<i;l++)u+=n.child(l).nodeSize;const s=u+n.child(i).nodeSize,a=e.mapping.maps.length;e.delete(u+r,s+r);const o=new Set;for(let l=0,c=i*t.width;l<t.width;l++,c++){const d=t.map[c];if(!o.has(d)){if(o.add(d),i>0&&d==t.map[c-t.width]){const f=n.nodeAt(d).attrs;e.setNodeMarkup(e.mapping.slice(a).map(d+r),null,{...f,rowspan:f.rowspan-1}),l+=f.colspan-1}else if(i<t.height&&d==t.map[c+t.width]){const f=n.nodeAt(d),p=f.attrs,m=f.type.create({...p,rowspan:f.attrs.rowspan-1},f.content),A=t.positionAt(i+1,l,n);e.insert(e.mapping.slice(a).map(r+A),m),l+=p.colspan-1}}}}function uk(e,t){if(!vt(e))return!1;if(t){const n=er(e),r=e.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let i=n.bottom-1;ik(r,n,i),i!=n.top;i--){const u=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!u)throw new RangeError("No table found");n.table=u,n.map=Ee.get(n.table)}t(r)}return!0}function sk(e,t){return function(n,r){if(!vt(n))return!1;const i=wa(n);if(i.nodeAfter.attrs[e]===t)return!1;if(r){const u=n.tr;n.selection instanceof Ie?n.selection.forEachCell((s,a)=>{s.attrs[e]!==t&&u.setNodeMarkup(a,null,{...s.attrs,[e]:t})}):u.setNodeMarkup(i.pos,null,{...i.nodeAfter.attrs,[e]:t}),r(u)}return!0}}function ak(e){return function(t,n){if(!vt(t))return!1;if(n){const r=Mt(t.schema),i=er(t),u=t.tr,s=i.map.cellsInRect(e=="column"?{left:i.left,top:0,right:i.right,bottom:i.map.height}:e=="row"?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),a=s.map(o=>i.table.nodeAt(o));for(let o=0;o<s.length;o++)a[o].type==r.header_cell&&u.setNodeMarkup(i.tableStart+s[o],r.cell,a[o].attrs);if(u.steps.length===0)for(let o=0;o<s.length;o++)u.setNodeMarkup(i.tableStart+s[o],r.header_cell,a[o].attrs);n(u)}return!0}}function e0(e,t,n){const r=t.map.cellsInRect({left:0,top:0,right:e=="row"?t.map.width:1,bottom:e=="column"?t.map.height:1});for(let i=0;i<r.length;i++){const u=t.table.nodeAt(r[i]);if(u&&u.type!==n.header_cell)return!1}return!0}function Bd(e,t){return t=t||{useDeprecatedLogic:!1},t.useDeprecatedLogic?ak(e):function(n,r){if(!vt(n))return!1;if(r){const i=Mt(n.schema),u=er(n),s=n.tr,a=e0("row",u,i),o=e0("column",u,i),l=(e==="column"?a:e==="row"&&o)?1:0,c=e=="column"?{left:0,top:l,right:1,bottom:u.map.height}:e=="row"?{left:l,top:0,right:u.map.width,bottom:1}:u,d=e=="column"?o?i.cell:i.header_cell:e=="row"?a?i.cell:i.header_cell:i.cell;u.map.cellsInRect(c).forEach(f=>{const p=f+u.tableStart,m=s.doc.nodeAt(p);m&&s.setNodeMarkup(p,d,m.attrs)}),r(s)}return!0}}Bd("row",{useDeprecatedLogic:!0});Bd("column",{useDeprecatedLogic:!0});Bd("cell",{useDeprecatedLogic:!0});function ok(e,t){if(t<0){const n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(let r=e.index(-1)-1,i=e.before();r>=0;r--){const u=e.node(-1).child(r),s=u.lastChild;if(s)return i-1-s.nodeSize;i-=u.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;const n=e.node(-1);for(let r=e.indexAfter(-1),i=e.after();r<n.childCount;r++){const u=n.child(r);if(u.childCount)return i+1;i+=u.nodeSize}}return null}function T1(e){return function(t,n){if(!vt(t))return!1;const r=ok(wa(t),e);if(r==null)return!1;if(n){const i=t.doc.resolve(r);n(t.tr.setSelection(ae.between(i,F6(i))).scrollIntoView())}return!0}}function lk(e,t){const n=e.selection.$anchor;for(let r=n.depth;r>0;r--)if(n.node(r).type.spec.tableRole=="table")return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function ts(e,t){const n=e.selection;if(!(n instanceof Ie))return!1;if(t){const r=e.tr,i=Mt(e.schema).cell.createAndFill().content;n.forEachCell((u,s)=>{u.content.eq(i)||r.replace(r.mapping.map(s+1),r.mapping.map(s+u.nodeSize-1),new z(i,0,0))}),r.docChanged&&t(r)}return!0}function ck(e){return(t,n)=>{const{from:r,to:i,select:u=!0,pos:s=t.selection.from}=e,a=t.tr;return X6({tr:a,originIndex:r,targetIndex:i,select:u,pos:s})?(n?.(a),!0):!1}}function dk(e){return(t,n)=>{const{from:r,to:i,select:u=!0,pos:s=t.selection.from}=e,a=t.tr;return j6({tr:a,originIndex:r,targetIndex:i,select:u,pos:s})?(n?.(a),!0):!1}}function fk(e){if(e.size===0)return null;let{content:t,openStart:n,openEnd:r}=e;for(;t.childCount==1&&(n>0&&r>0||t.child(0).type.spec.tableRole=="table");)n--,r--,t=t.child(0).content;const i=t.child(0),u=i.type.spec.tableRole,s=i.type.schema,a=[];if(u=="row")for(let o=0;o<t.childCount;o++){let l=t.child(o).content;const c=o?0:Math.max(0,n-1),d=o<t.childCount-1?0:Math.max(0,r-1);(c||d)&&(l=Gl(Mt(s).row,new z(l,c,d)).content),a.push(l)}else if(u=="cell"||u=="header_cell")a.push(n||r?Gl(Mt(s).row,new z(t,n,r)).content:t);else return null;return hk(s,a)}function hk(e,t){const n=[];for(let i=0;i<t.length;i++){const u=t[i];for(let s=u.childCount-1;s>=0;s--){const{rowspan:a,colspan:o}=u.child(s).attrs;for(let l=i;l<i+a;l++)n[l]=(n[l]||0)+o}}let r=0;for(let i=0;i<n.length;i++)r=Math.max(r,n[i]);for(let i=0;i<n.length;i++)if(i>=t.length&&t.push(H.empty),n[i]<r){const u=Mt(e).cell.createAndFill(),s=[];for(let a=n[i];a<r;a++)s.push(u);t[i]=t[i].append(H.from(s))}return{height:t.length,width:r,rows:t}}function Gl(e,t){const n=e.createAndFill();return new Mm(n).replace(0,n.content.size,t).doc}function pk({width:e,height:t,rows:n},r,i){if(e!=r){const u=[],s=[];for(let a=0;a<n.length;a++){const o=n[a],l=[];for(let c=u[a]||0,d=0;c<r;d++){let f=o.child(d%o.childCount);c+f.attrs.colspan>r&&(f=f.type.createChecked(Nr(f.attrs,f.attrs.colspan,c+f.attrs.colspan-r),f.content)),l.push(f),c+=f.attrs.colspan;for(let p=1;p<f.attrs.rowspan;p++)u[a+p]=(u[a+p]||0)+f.attrs.colspan}s.push(H.from(l))}n=s,e=r}if(t!=i){const u=[];for(let s=0,a=0;s<i;s++,a++){const o=[],l=n[a%t];for(let c=0;c<l.childCount;c++){let d=l.child(c);s+d.attrs.rowspan>i&&(d=d.type.create({...d.attrs,rowspan:Math.max(1,i-d.attrs.rowspan)},d.content)),o.push(d)}u.push(H.from(o))}n=u,t=i}return{width:e,height:t,rows:n}}function mk(e,t,n,r,i,u,s){const a=e.doc.type.schema,o=Mt(a);let l,c;if(i>t.width)for(let d=0,f=0;d<t.height;d++){const p=n.child(d);f+=p.nodeSize;const m=[];let A;p.lastChild==null||p.lastChild.type==o.cell?A=l||(l=o.cell.createAndFill()):A=c||(c=o.header_cell.createAndFill());for(let E=t.width;E<i;E++)m.push(A);e.insert(e.mapping.slice(s).map(f-1+r),m)}if(u>t.height){const d=[];for(let m=0,A=(t.height-1)*t.width;m<Math.max(t.width,i);m++){const E=m>=t.width?!1:n.nodeAt(t.map[A+m]).type==o.header_cell;d.push(E?c||(c=o.header_cell.createAndFill()):l||(l=o.cell.createAndFill()))}const f=o.row.create(null,H.from(d)),p=[];for(let m=t.height;m<u;m++)p.push(f);e.insert(e.mapping.slice(s).map(r+n.nodeSize-2),p)}return!!(l||c)}function t0(e,t,n,r,i,u,s,a){if(s==0||s==t.height)return!1;let o=!1;for(let l=i;l<u;l++){const c=s*t.width+l,d=t.map[c];if(t.map[c-t.width]==d){o=!0;const f=n.nodeAt(d),{top:p,left:m}=t.findCell(d);e.setNodeMarkup(e.mapping.slice(a).map(d+r),null,{...f.attrs,rowspan:s-p}),e.insert(e.mapping.slice(a).map(t.positionAt(s,m,n)),f.type.createAndFill({...f.attrs,rowspan:p+f.attrs.rowspan-s})),l+=f.attrs.colspan-1}}return o}function n0(e,t,n,r,i,u,s,a){if(s==0||s==t.width)return!1;let o=!1;for(let l=i;l<u;l++){const c=l*t.width+s,d=t.map[c];if(t.map[c-1]==d){o=!0;const f=n.nodeAt(d),p=t.colCount(d),m=e.mapping.slice(a).map(d+r);e.setNodeMarkup(m,null,Nr(f.attrs,s-p,f.attrs.colspan-(s-p))),e.insert(m+f.nodeSize,f.type.createAndFill(Nr(f.attrs,0,s-p))),l+=f.attrs.rowspan-1}}return o}function r0(e,t,n,r,i){let u=n?e.doc.nodeAt(n-1):e.doc;if(!u)throw new Error("No table found");let s=Ee.get(u);const{top:a,left:o}=r,l=o+i.width,c=a+i.height,d=e.tr;let f=0;function p(){if(u=n?d.doc.nodeAt(n-1):d.doc,!u)throw new Error("No table found");s=Ee.get(u),f=d.mapping.maps.length}mk(d,s,u,n,l,c,f)&&p(),t0(d,s,u,n,o,l,a,f)&&p(),t0(d,s,u,n,o,l,c,f)&&p(),n0(d,s,u,n,a,c,o,f)&&p(),n0(d,s,u,n,a,c,l,f)&&p();for(let m=a;m<c;m++){const A=s.positionAt(m,o,u),E=s.positionAt(m,l,u);d.replace(d.mapping.slice(f).map(A+n),d.mapping.slice(f).map(E+n),new z(i.rows[m-a],0,0))}p(),d.setSelection(new Ie(d.doc.resolve(n+s.positionAt(a,o,u)),d.doc.resolve(n+s.positionAt(c-1,l-1,u)))),t(d)}const Ak=Vm({ArrowLeft:ns("horiz",-1),ArrowRight:ns("horiz",1),ArrowUp:ns("vert",-1),ArrowDown:ns("vert",1),"Shift-ArrowLeft":rs("horiz",-1),"Shift-ArrowRight":rs("horiz",1),"Shift-ArrowUp":rs("vert",-1),"Shift-ArrowDown":rs("vert",1),Backspace:ts,"Mod-Backspace":ts,Delete:ts,"Mod-Delete":ts});function ks(e,t,n){return n.eq(e.selection)?!1:(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function ns(e,t){return(n,r,i)=>{if(!i)return!1;const u=n.selection;if(u instanceof Ie)return ks(n,r,ue.near(u.$headCell,t));if(e!="horiz"&&!u.empty)return!1;const s=C1(i,e,t);if(s==null)return!1;if(e=="horiz")return ks(n,r,ue.near(n.doc.resolve(u.head+t),t));{const a=n.doc.resolve(s),o=p1(a,e,t);let l;return o?l=ue.near(o,1):t<0?l=ue.near(n.doc.resolve(a.before(-1)),-1):l=ue.near(n.doc.resolve(a.after(-1)),1),ks(n,r,l)}}}function rs(e,t){return(n,r,i)=>{if(!i)return!1;const u=n.selection;let s;if(u instanceof Ie)s=u;else{const o=C1(i,e,t);if(o==null)return!1;s=new Ie(n.doc.resolve(o))}const a=p1(s.$headCell,e,t);return a?ks(n,r,new Ie(s.$anchorCell,a)):!1}}function gk(e,t){const n=e.state.doc,r=ii(n.resolve(t));return r?(e.dispatch(e.state.tr.setSelection(new Ie(r))),!0):!1}function bk(e,t,n){if(!vt(e.state))return!1;let r=fk(n);const i=e.state.selection;if(i instanceof Ie){r||(r={width:1,height:1,rows:[H.from(Gl(Mt(e.state.schema).cell,n))]});const u=i.$anchorCell.node(-1),s=i.$anchorCell.start(-1),a=Ee.get(u).rectBetween(i.$anchorCell.pos-s,i.$headCell.pos-s);return r=pk(r,a.right-a.left,a.bottom-a.top),r0(e.state,e.dispatch,s,a,r),!0}else if(r){const u=wa(e.state),s=u.start(-1);return r0(e.state,e.dispatch,s,Ee.get(u.node(-1)).findCell(u.pos-s),r),!0}else return!1}function Ek(e,t){var n;if(t.button!=0||t.ctrlKey||t.metaKey)return;const r=i0(e,t.target);let i;if(t.shiftKey&&e.state.selection instanceof Ie)u(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&(i=ii(e.state.selection.$anchor))!=null&&((n=No(e,t))===null||n===void 0?void 0:n.pos)!=i.pos)u(i,t),t.preventDefault();else if(!r)return;function u(o,l){let c=No(e,l);const d=Pn.getState(e.state)==null;if(!c||!Md(o,c))if(d)c=o;else return;const f=new Ie(o,c);if(d||!e.state.selection.eq(f)){const p=e.state.tr.setSelection(f);d&&p.setMeta(Pn,o.pos),e.dispatch(p)}}function s(){e.root.removeEventListener("mouseup",s),e.root.removeEventListener("dragstart",s),e.root.removeEventListener("mousemove",a),Pn.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta(Pn,-1))}function a(o){const l=o,c=Pn.getState(e.state);let d;if(c!=null)d=e.state.doc.resolve(c);else if(i0(e,l.target)!=r&&(d=No(e,t),!d))return s();d&&u(d,l)}e.root.addEventListener("mouseup",s),e.root.addEventListener("dragstart",s),e.root.addEventListener("mousemove",a)}function C1(e,t,n){if(!(e.state.selection instanceof ae))return null;const{$head:r}=e.state.selection;for(let i=r.depth-1;i>=0;i--){const u=r.node(i);if((n<0?r.index(i):r.indexAfter(i))!=(n<0?0:u.childCount))return null;if(u.type.spec.tableRole=="cell"||u.type.spec.tableRole=="header_cell"){const s=r.before(i),a=t=="vert"?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(a)?s:null}}return null}function i0(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t;return null}function No(e,t){const n=e.posAtCoords({left:t.clientX,top:t.clientY});if(!n)return null;let{inside:r,pos:i}=n;return r>=0&&ii(e.state.doc.resolve(r))||ii(e.state.doc.resolve(i))}var yk=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")),Vl(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,Vl(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function Vl(e,t,n,r,i,u){let s=0,a=!0,o=t.firstChild;const l=e.firstChild;if(l){for(let d=0,f=0;d<l.childCount;d++){const{colspan:p,colwidth:m}=l.child(d).attrs;for(let A=0;A<p;A++,f++){const E=i==f?u:m&&m[A],g=E?E+"px":"";if(s+=E||r,E||(a=!1),o)o.style.width!=g&&(o.style.width=g),o=o.nextSibling;else{const N=document.createElement("col");N.style.width=g,t.appendChild(N)}}}for(;o;){var c;const d=o.nextSibling;(c=o.parentNode)===null||c===void 0||c.removeChild(o),o=d}a?(n.style.width=s+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=s+"px")}}const Et=new xt("tableColumnResizing");function Tk({handleWidth:e=5,cellMinWidth:t=25,defaultCellMinWidth:n=100,View:r=yk,lastColumnResizable:i=!0}={}){const u=new Ct({key:Et,state:{init(s,a){var o;const l=(o=u.spec)===null||o===void 0||(o=o.props)===null||o===void 0?void 0:o.nodeViews,c=Mt(a.schema).table.name;return r&&l&&(l[c]=(d,f)=>new r(d,n,f)),new Ck(-1,!1)},apply(s,a){return a.apply(s)}},props:{attributes:s=>{const a=Et.getState(s);return a&&a.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,a)=>{xk(s,a,e,i)},mouseleave:s=>{kk(s)},mousedown:(s,a)=>{Ik(s,a,t,n)}},decorations:s=>{const a=Et.getState(s);if(a&&a.activeHandle>-1)return _k(s,a.activeHandle)},nodeViews:{}}});return u}var Ck=class Is{constructor(t,n){this.activeHandle=t,this.dragging=n}apply(t){const n=this,r=t.getMeta(Et);if(r&&r.setHandle!=null)return new Is(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new Is(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&t.docChanged){let i=t.mapping.map(n.activeHandle,-1);return zl(t.doc.resolve(i))||(i=-1),new Is(i,n.dragging)}return n}};function xk(e,t,n,r){if(!e.editable)return;const i=Et.getState(e.state);if(i&&!i.dragging){const u=wk(t.target);let s=-1;if(u){const{left:a,right:o}=u.getBoundingClientRect();t.clientX-a<=n?s=u0(e,t,"left",n):o-t.clientX<=n&&(s=u0(e,t,"right",n))}if(s!=i.activeHandle){if(!r&&s!==-1){const a=e.state.doc.resolve(s),o=a.node(-1),l=Ee.get(o),c=a.start(-1);if(l.colCount(a.pos-c)+a.nodeAfter.attrs.colspan-1==l.width-1)return}x1(e,s)}}}function kk(e){if(!e.editable)return;const t=Et.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&x1(e,-1)}function Ik(e,t,n,r){var i;if(!e.editable)return!1;const u=(i=e.dom.ownerDocument.defaultView)!==null&&i!==void 0?i:window,s=Et.getState(e.state);if(!s||s.activeHandle==-1||s.dragging)return!1;const a=e.state.doc.nodeAt(s.activeHandle),o=Sk(e,s.activeHandle,a.attrs);e.dispatch(e.state.tr.setMeta(Et,{setDragging:{startX:t.clientX,startWidth:o}}));function l(d){u.removeEventListener("mouseup",l),u.removeEventListener("mousemove",c);const f=Et.getState(e.state);f?.dragging&&(Nk(e,f.activeHandle,s0(f.dragging,d,n)),e.dispatch(e.state.tr.setMeta(Et,{setDragging:null})))}function c(d){if(!d.which)return l(d);const f=Et.getState(e.state);if(f&&f.dragging){const p=s0(f.dragging,d,n);a0(e,f.activeHandle,p,r)}}return a0(e,s.activeHandle,o,r),u.addEventListener("mouseup",l),u.addEventListener("mousemove",c),t.preventDefault(),!0}function Sk(e,t,{colspan:n,colwidth:r}){const i=r&&r[r.length-1];if(i)return i;const u=e.domAtPos(t);let s=u.node.childNodes[u.offset].offsetWidth,a=n;if(r)for(let o=0;o<n;o++)r[o]&&(s-=r[o],a--);return s/a}function wk(e){for(;e&&e.nodeName!="TD"&&e.nodeName!="TH";)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}function u0(e,t,n,r){const i=n=="right"?-r:r,u=e.posAtCoords({left:t.clientX+i,top:t.clientY});if(!u)return-1;const{pos:s}=u,a=ii(e.state.doc.resolve(s));if(!a)return-1;if(n=="right")return a.pos;const o=Ee.get(a.node(-1)),l=a.start(-1),c=o.map.indexOf(a.pos-l);return c%o.width==0?-1:l+o.map[c-1]}function s0(e,t,n){const r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function x1(e,t){e.dispatch(e.state.tr.setMeta(Et,{setHandle:t}))}function Nk(e,t,n){const r=e.state.doc.resolve(t),i=r.node(-1),u=Ee.get(i),s=r.start(-1),a=u.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1,o=e.state.tr;for(let l=0;l<u.height;l++){const c=l*u.width+a;if(l&&u.map[c]==u.map[c-u.width])continue;const d=u.map[c],f=i.nodeAt(d).attrs,p=f.colspan==1?0:a-u.colCount(d);if(f.colwidth&&f.colwidth[p]==n)continue;const m=f.colwidth?f.colwidth.slice():Dk(f.colspan);m[p]=n,o.setNodeMarkup(s+d,null,{...f,colwidth:m})}o.docChanged&&e.dispatch(o)}function a0(e,t,n,r){const i=e.state.doc.resolve(t),u=i.node(-1),s=i.start(-1),a=Ee.get(u).colCount(i.pos-s)+i.nodeAfter.attrs.colspan-1;let o=e.domAtPos(i.start(-1)).node;for(;o&&o.nodeName!="TABLE";)o=o.parentNode;o&&Vl(u,o.firstChild,o,r,a,n)}function Dk(e){return Array(e).fill(0)}function _k(e,t){const n=[],r=e.doc.resolve(t),i=r.node(-1);if(!i)return we.empty;const u=Ee.get(i),s=r.start(-1),a=u.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1;for(let l=0;l<u.height;l++){const c=a+l*u.width;if((a==u.width-1||u.map[c]!=u.map[c+1])&&(l==0||u.map[c]!=u.map[c-u.width])){var o;const d=u.map[c],f=s+d+i.nodeAt(d).nodeSize-1,p=document.createElement("div");p.className="column-resize-handle",!((o=Et.getState(e))===null||o===void 0)&&o.dragging&&n.push(qe.node(s+d,s+d+i.nodeAt(d).nodeSize,{class:"column-resize-dragging"})),n.push(qe.widget(f,p))}}return we.create(e.doc,n)}function Ok({allowTableNodeSelection:e=!1}={}){return new Ct({key:Pn,state:{init(){return null},apply(t,n){const r=t.getMeta(Pn);if(r!=null)return r==-1?null:r;if(n==null||!t.docChanged)return n;const{deleted:i,pos:u}=t.mapping.mapResult(n);return i?null:u}},props:{decorations:K6,handleDOMEvents:{mousedown:Ek},createSelectionBetween(t){return Pn.getState(t.state)!=null?t.state.selection:null},handleTripleClick:gk,handleKeyDown:Ak,handlePaste:bk},appendTransaction(t,n,r){return z6(r,V6(r,n),e)}})}var Qs=typeof navigator<"u"?navigator:null,Ld=Qs&&Qs.userAgent||"",Rk=/Edge\/(\d+)/.exec(Ld),Mk=/MSIE \d/.exec(Ld),Bk=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ld),Lk=!!(Mk||Bk||Rk),vk=!Lk&&!!Qs&&/Apple Computer/.test(Qs.vendor),k1=new xt("safari-ime-span"),ql=!1,Pk={key:k1,props:{decorations:Fk,handleDOMEvents:{compositionstart:()=>{ql=!0},compositionend:()=>{ql=!1}}}};function Fk(e){const{$from:t,$to:n,to:r}=e.selection;if(ql&&t.sameParent(n)){const i=qe.widget(r,Hk,{ignoreSelection:!0,key:"safari-ime-span"});return we.create(e.doc,[i])}}function Hk(e){const t=e.dom.ownerDocument.createElement("span");return t.className="ProseMirror-safari-ime-span",t}var Uk=new Ct(vk?Pk:{key:k1});function o0(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Wk(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Kk(e,t,n){const i=pa((n||{}).ignore||[]),u=Qk(t);let s=-1;for(;++s<u.length;)mc(e,"text",a);function a(l,c){let d=-1,f;for(;++d<c.length;){const p=c[d],m=f?f.children:void 0;if(i(p,m?m.indexOf(p):void 0,f))return;f=p}if(f)return o(l,c)}function o(l,c){const d=c[c.length-1],f=u[s][0],p=u[s][1];let m=0;const E=d.children.indexOf(l);let g=!1,N=[];f.lastIndex=0;let I=f.exec(l.value);for(;I;){const R=I.index,w={index:I.index,input:I.input,stack:[...c,l]};let k=p(...I,w);if(typeof k=="string"&&(k=k.length>0?{type:"text",value:k}:void 0),k===!1?f.lastIndex=R+1:(m!==R&&N.push({type:"text",value:l.value.slice(m,R)}),Array.isArray(k)?N.push(...k):k&&N.push(k),m=R+I[0].length,g=!0),!f.global)break;I=f.exec(l.value)}return g?(m<l.value.length&&N.push({type:"text",value:l.value.slice(m)}),d.children.splice(E,1,...N)):N=[l],E+N.length}}function Qk(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([Yk(i[0]),zk(i[1])])}return t}function Yk(e){return typeof e=="string"?new RegExp(Wk(e),"g"):e}function zk(e){return typeof e=="function"?e:function(){return e}}const Do="phrasing",_o=["autolink","link","image","label"];function Gk(){return{transforms:[$k],enter:{literalAutolink:qk,literalAutolinkEmail:Oo,literalAutolinkHttp:Oo,literalAutolinkWww:Oo},exit:{literalAutolink:Xk,literalAutolinkEmail:Zk,literalAutolinkHttp:Jk,literalAutolinkWww:jk}}}function Vk(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Do,notInConstruct:_o},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Do,notInConstruct:_o},{character:":",before:"[ps]",after:"\\/",inConstruct:Do,notInConstruct:_o}]}}function qk(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Oo(e){this.config.enter.autolinkProtocol.call(this,e)}function Jk(e){this.config.exit.autolinkProtocol.call(this,e)}function jk(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Zk(e){this.config.exit.autolinkEmail.call(this,e)}function Xk(e){this.exit(e)}function $k(e){Kk(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,eI],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),tI]],{ignore:["link","linkReference"]})}function eI(e,t,n,r,i){let u="";if(!I1(i)||(/^w/i.test(t)&&(n=t+n,t="",u="http://"),!nI(n)))return!1;const s=rI(n+r);if(!s[0])return!1;const a={type:"link",title:null,url:u+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[a,{type:"text",value:s[1]}]:a}function tI(e,t,n,r){return!I1(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function nI(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function rI(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=o0(e,"(");let u=o0(e,")");for(;r!==-1&&i>u;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),u++;return[e,n]}function I1(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Cr(n)||fa(n))&&(!t||n!==47)}S1.peek=fI;function iI(){this.buffer()}function uI(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function sI(){this.buffer()}function aI(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function oI(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ht(this.sliceSerialize(e)).toLowerCase(),n.label=t}function lI(e){this.exit(e)}function cI(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ht(this.sliceSerialize(e)).toLowerCase(),n.label=t}function dI(e){this.exit(e)}function fI(){return"["}function S1(e,t,n,r){const i=n.createTracker(r);let u=i.move("[^");const s=n.enter("footnoteReference"),a=n.enter("reference");return u+=i.move(n.safe(n.associationId(e),{after:"]",before:u})),a(),s(),u+=i.move("]"),u}function hI(){return{enter:{gfmFootnoteCallString:iI,gfmFootnoteCall:uI,gfmFootnoteDefinitionLabelString:sI,gfmFootnoteDefinition:aI},exit:{gfmFootnoteCallString:oI,gfmFootnoteCall:lI,gfmFootnoteDefinitionLabelString:cI,gfmFootnoteDefinition:dI}}}function pI(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:S1},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,u,s){const a=u.createTracker(s);let o=a.move("[^");const l=u.enter("footnoteDefinition"),c=u.enter("label");return o+=a.move(u.safe(u.associationId(r),{before:o,after:"]"})),c(),o+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
47
|
+
`:" ")+u.indentLines(u.containerFlow(r,a.current()),t?w1:mI))),l(),o}}function mI(e,t,n){return t===0?e:w1(e,t,n)}function w1(e,t,n){return(n?"":" ")+e}const AI=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];N1.peek=TI;function gI(){return{canContainEols:["delete"],enter:{strikethrough:EI},exit:{strikethrough:yI}}}function bI(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:AI}],handlers:{delete:N1}}}function EI(e){this.enter({type:"delete",children:[]},e)}function yI(e){this.exit(e)}function N1(e,t,n,r){const i=n.createTracker(r),u=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),u(),s}function TI(){return"~"}function CI(e){return e.length}function xI(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||CI,u=[],s=[],a=[],o=[];let l=0,c=-1;for(;++c<e.length;){const A=[],E=[];let g=-1;for(e[c].length>l&&(l=e[c].length);++g<e[c].length;){const N=kI(e[c][g]);if(n.alignDelimiters!==!1){const I=i(N);E[g]=I,(o[g]===void 0||I>o[g])&&(o[g]=I)}A.push(N)}s[c]=A,a[c]=E}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<l;)u[d]=l0(r[d]);else{const A=l0(r);for(;++d<l;)u[d]=A}d=-1;const f=[],p=[];for(;++d<l;){const A=u[d];let E="",g="";A===99?(E=":",g=":"):A===108?E=":":A===114&&(g=":");let N=n.alignDelimiters===!1?1:Math.max(1,o[d]-E.length-g.length);const I=E+"-".repeat(N)+g;n.alignDelimiters!==!1&&(N=E.length+N+g.length,N>o[d]&&(o[d]=N),p[d]=N),f[d]=I}s.splice(1,0,f),a.splice(1,0,p),c=-1;const m=[];for(;++c<s.length;){const A=s[c],E=a[c];d=-1;const g=[];for(;++d<l;){const N=A[d]||"";let I="",R="";if(n.alignDelimiters!==!1){const w=o[d]-(E[d]||0),k=u[d];k===114?I=" ".repeat(w):k===99?w%2?(I=" ".repeat(w/2+.5),R=" ".repeat(w/2-.5)):(I=" ".repeat(w/2),R=I):R=" ".repeat(w)}n.delimiterStart!==!1&&!d&&g.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&N==="")&&(n.delimiterStart!==!1||d)&&g.push(" "),n.alignDelimiters!==!1&&g.push(I),g.push(N),n.alignDelimiters!==!1&&g.push(R),n.padding!==!1&&g.push(" "),(n.delimiterEnd!==!1||d!==l-1)&&g.push("|")}m.push(n.delimiterEnd===!1?g.join("").replace(/ +$/,""):g.join(""))}return m.join(`
|
|
48
|
+
`)}function kI(e){return e==null?"":String(e)}function l0(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function II(){return{enter:{table:SI,tableData:c0,tableHeader:c0,tableRow:NI},exit:{codeText:DI,table:wI,tableData:Ro,tableHeader:Ro,tableRow:Ro}}}function SI(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function wI(e){this.exit(e),this.data.inTable=void 0}function NI(e){this.enter({type:"tableRow",children:[]},e)}function Ro(e){this.exit(e)}function c0(e){this.enter({type:"tableCell",children:[]},e)}function DI(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,_I));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function _I(e,t){return t==="|"?t:e}function OI(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,u=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
49
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:s,tableCell:o,tableRow:a}};function s(p,m,A,E){return l(c(p,A,E),p.align)}function a(p,m,A,E){const g=d(p,A,E),N=l([g]);return N.slice(0,N.indexOf(`
|
|
50
|
+
`))}function o(p,m,A,E){const g=A.enter("tableCell"),N=A.enter("phrasing"),I=A.containerPhrasing(p,{...E,before:u,after:u});return N(),g(),I}function l(p,m){return xI(p,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function c(p,m,A){const E=p.children;let g=-1;const N=[],I=m.enter("table");for(;++g<E.length;)N[g]=d(E[g],m,A);return I(),N}function d(p,m,A){const E=p.children;let g=-1;const N=[],I=m.enter("tableRow");for(;++g<E.length;)N[g]=o(E[g],p,m,A);return I(),N}function f(p,m,A){let E=gc.inlineCode(p,m,A);return A.stack.includes("tableCell")&&(E=E.replace(/\|/g,"\\$&")),E}}function RI(){return{exit:{taskListCheckValueChecked:d0,taskListCheckValueUnchecked:d0,paragraph:BI}}}function MI(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:LI}}}function d0(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function BI(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let u=-1,s;for(;++u<i.length;){const a=i[u];if(a.type==="paragraph"){s=a;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function LI(e,t,n,r){const i=e.children[0],u=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);u&&a.move(s);let o=gc.listItem(e,t,n,{...r,...a.current()});return u&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),o;function l(c){return c+s}}function vI(){return[Gk(),hI(),gI(),II(),RI()]}function PI(e){return{extensions:[Vk(),pI(e),bI(),OI(e),MI()]}}const FI={tokenize:YI,partial:!0},D1={tokenize:zI,partial:!0},_1={tokenize:GI,partial:!0},O1={tokenize:VI,partial:!0},HI={tokenize:qI,partial:!0},R1={name:"wwwAutolink",tokenize:KI,previous:B1},M1={name:"protocolAutolink",tokenize:QI,previous:L1},Dn={name:"emailAutolink",tokenize:WI,previous:v1},nn={};function UI(){return{text:nn}}let ur=48;for(;ur<123;)nn[ur]=Dn,ur++,ur===58?ur=65:ur===91&&(ur=97);nn[43]=Dn;nn[45]=Dn;nn[46]=Dn;nn[95]=Dn;nn[72]=[Dn,M1];nn[104]=[Dn,M1];nn[87]=[Dn,R1];nn[119]=[Dn,R1];function WI(e,t,n){const r=this;let i,u;return s;function s(d){return!Jl(d)||!v1.call(r,r.previous)||vd(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(d))}function a(d){return Jl(d)?(e.consume(d),a):d===64?(e.consume(d),o):n(d)}function o(d){return d===46?e.check(HI,c,l)(d):d===45||d===95||dt(d)?(u=!0,e.consume(d),o):c(d)}function l(d){return e.consume(d),i=!0,o}function c(d){return u&&i&&rt(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function KI(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!B1.call(r,r.previous)||vd(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(FI,e.attempt(D1,e.attempt(_1,u),n),n)(s))}function u(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function QI(e,t,n){const r=this;let i="",u=!1;return s;function s(d){return(d===72||d===104)&&L1.call(r,r.previous)&&!vd(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),a):n(d)}function a(d){if(rt(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),a;if(d===58){const f=i.toLowerCase();if(f==="http"||f==="https")return e.consume(d),o}return n(d)}function o(d){return d===47?(e.consume(d),u?l:(u=!0,o)):n(d)}function l(d){return d===null||Ns(d)||xe(d)||Cr(d)||fa(d)?n(d):e.attempt(D1,e.attempt(_1,c),n)(d)}function c(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function YI(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),u):n(s)}function u(s){return s===null?n(s):t(s)}}function zI(e,t,n){let r,i,u;return s;function s(l){return l===46||l===95?e.check(O1,o,a)(l):l===null||xe(l)||Cr(l)||l!==45&&fa(l)?o(l):(u=!0,e.consume(l),s)}function a(l){return l===95?r=!0:(i=r,r=void 0),e.consume(l),s}function o(l){return i||r||!u?n(l):t(l)}}function GI(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?u(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(O1,t,u)(s):s===null||xe(s)||Cr(s)?t(s):(e.consume(s),i)}function u(s){return s===41&&r++,e.consume(s),i}}function VI(e,t,n){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),u):a===93?(e.consume(a),i):a===60||a===null||xe(a)||Cr(a)?t(a):n(a)}function i(a){return a===null||a===40||a===91||xe(a)||Cr(a)?t(a):r(a)}function u(a){return rt(a)?s(a):n(a)}function s(a){return a===59?(e.consume(a),r):rt(a)?(e.consume(a),s):n(a)}}function qI(e,t,n){return r;function r(u){return e.consume(u),i}function i(u){return dt(u)?n(u):t(u)}}function B1(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||xe(e)}function L1(e){return!rt(e)}function v1(e){return!(e===47||Jl(e))}function Jl(e){return e===43||e===45||e===46||e===95||dt(e)}function vd(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const JI={tokenize:rS,partial:!0};function jI(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:eS,continuation:{tokenize:tS},exit:nS}},text:{91:{name:"gfmFootnoteCall",tokenize:$I},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:ZI,resolveTo:XI}}}}function ZI(e,t,n){const r=this;let i=r.events.length;const u=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const o=r.events[i][1];if(o.type==="labelImage"){s=o;break}if(o.type==="gfmFootnoteCall"||o.type==="labelLink"||o.type==="label"||o.type==="image"||o.type==="link")break}return a;function a(o){if(!s||!s._balanced)return n(o);const l=Ht(r.sliceSerialize({start:s.end,end:r.now()}));return l.codePointAt(0)!==94||!u.includes(l.slice(1))?n(o):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o))}}function XI(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",u,t],["enter",s,t],["exit",s,t],["exit",u,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function $I(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u=0,s;return a;function a(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),o}function o(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(d){if(u>999||d===93&&!s||d===null||d===91||xe(d))return n(d);if(d===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return i.includes(Ht(r.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return xe(d)||(s=!0),u++,e.consume(d),d===92?c:l}function c(d){return d===91||d===92||d===93?(e.consume(d),u++,l):l(d)}}function eS(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u,s=0,a;return o;function o(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(m)}function c(m){if(s>999||m===93&&!a||m===null||m===91||xe(m))return n(m);if(m===93){e.exit("chunkString");const A=e.exit("gfmFootnoteDefinitionLabelString");return u=Ht(r.sliceSerialize(A)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return xe(m)||(a=!0),s++,e.consume(m),m===92?d:c}function d(m){return m===91||m===92||m===93?(e.consume(m),s++,c):c(m)}function f(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(u)||i.push(u),he(e,p,"gfmFootnoteDefinitionWhitespace")):n(m)}function p(m){return t(m)}}function tS(e,t,n){return e.check(Su,t,e.attempt(JI,t,n))}function nS(e){e.exit("gfmFootnoteDefinition")}function rS(e,t,n){const r=this;return he(e,i,"gfmFootnoteDefinitionIndent",5);function i(u){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(u):n(u)}}function iS(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:u,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,a){let o=-1;for(;++o<s.length;)if(s[o][0]==="enter"&&s[o][1].type==="strikethroughSequenceTemporary"&&s[o][1]._close){let l=o;for(;l--;)if(s[l][0]==="exit"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._open&&s[o][1].end.offset-s[o][1].start.offset===s[l][1].end.offset-s[l][1].start.offset){s[o][1].type="strikethroughSequence",s[l][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},s[l][1].start),end:Object.assign({},s[o][1].end)},d={type:"strikethroughText",start:Object.assign({},s[l][1].end),end:Object.assign({},s[o][1].start)},f=[["enter",c,a],["enter",s[l][1],a],["exit",s[l][1],a],["enter",d,a]],p=a.parser.constructs.insideSpan.null;p&&yt(f,f.length,0,ha(p,s.slice(l+1,o),a)),yt(f,f.length,0,[["exit",d,a],["enter",s[o][1],a],["exit",s[o][1],a],["exit",c,a]]),yt(s,l-1,o-l+3,f),o=l+f.length-2;break}}for(o=-1;++o<s.length;)s[o][1].type==="strikethroughSequenceTemporary"&&(s[o][1].type="data");return s}function u(s,a,o){const l=this.previous,c=this.events;let d=0;return f;function f(m){return l===126&&c[c.length-1][1].type!=="characterEscape"?o(m):(s.enter("strikethroughSequenceTemporary"),p(m))}function p(m){const A=$r(l);if(m===126)return d>1?o(m):(s.consume(m),d++,p);if(d<2&&!n)return o(m);const E=s.exit("strikethroughSequenceTemporary"),g=$r(m);return E._open=!g||g===2&&!!A,E._close=!A||A===2&&!!g,a(m)}}}class uS{constructor(){this.map=[]}add(t,n,r){sS(this,t,n,r)}consume(t){if(this.map.sort(function(u,s){return u[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const u of i)t.push(u);i=r.pop()}this.map.length=0}}function sS(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function aS(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const u=r.length-1;r[u]=r[u]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function oS(){return{flow:{null:{name:"table",tokenize:lS,resolveAll:cS}}}}function lS(e,t,n){const r=this;let i=0,u=0,s;return a;function a(x){let B=r.events.length-1;for(;B>-1;){const J=r.events[B][1].type;if(J==="lineEnding"||J==="linePrefix")B--;else break}const P=B>-1?r.events[B][1].type:null,G=P==="tableHead"||P==="tableRow"?k:o;return G===k&&r.parser.lazy[r.now().line]?n(x):G(x)}function o(x){return e.enter("tableHead"),e.enter("tableRow"),l(x)}function l(x){return x===124||(s=!0,u+=1),c(x)}function c(x){return x===null?n(x):X(x)?u>1?(u=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),p):n(x):de(x)?he(e,c,"whitespace")(x):(u+=1,s&&(s=!1,i+=1),x===124?(e.enter("tableCellDivider"),e.consume(x),e.exit("tableCellDivider"),s=!0,c):(e.enter("data"),d(x)))}function d(x){return x===null||x===124||xe(x)?(e.exit("data"),c(x)):(e.consume(x),x===92?f:d)}function f(x){return x===92||x===124?(e.consume(x),d):d(x)}function p(x){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(x):(e.enter("tableDelimiterRow"),s=!1,de(x)?he(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):m(x))}function m(x){return x===45||x===58?E(x):x===124?(s=!0,e.enter("tableCellDivider"),e.consume(x),e.exit("tableCellDivider"),A):w(x)}function A(x){return de(x)?he(e,E,"whitespace")(x):E(x)}function E(x){return x===58?(u+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(x),e.exit("tableDelimiterMarker"),g):x===45?(u+=1,g(x)):x===null||X(x)?R(x):w(x)}function g(x){return x===45?(e.enter("tableDelimiterFiller"),N(x)):w(x)}function N(x){return x===45?(e.consume(x),N):x===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(x),e.exit("tableDelimiterMarker"),I):(e.exit("tableDelimiterFiller"),I(x))}function I(x){return de(x)?he(e,R,"whitespace")(x):R(x)}function R(x){return x===124?m(x):x===null||X(x)?!s||i!==u?w(x):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(x)):w(x)}function w(x){return n(x)}function k(x){return e.enter("tableRow"),O(x)}function O(x){return x===124?(e.enter("tableCellDivider"),e.consume(x),e.exit("tableCellDivider"),O):x===null||X(x)?(e.exit("tableRow"),t(x)):de(x)?he(e,O,"whitespace")(x):(e.enter("data"),Q(x))}function Q(x){return x===null||x===124||xe(x)?(e.exit("data"),O(x)):(e.consume(x),x===92?_:Q)}function _(x){return x===92||x===124?(e.consume(x),Q):Q(x)}}function cS(e,t){let n=-1,r=!0,i=0,u=[0,0,0,0],s=[0,0,0,0],a=!1,o=0,l,c,d;const f=new uS;for(;++n<e.length;){const p=e[n],m=p[1];p[0]==="enter"?m.type==="tableHead"?(a=!1,o!==0&&(f0(f,t,o,l,c),c=void 0,o=0),l={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[["enter",l,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,d=void 0,u=[0,0,0,0],s=[0,n+1,0,0],a&&(a=!1,c={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[["enter",c,t]])),i=m.type==="tableDelimiterRow"?2:c?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(u[1]!==0&&(s[0]=s[1],d=is(f,t,u,i,void 0,d),u=[0,0,0,0]),s[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(u[1]!==0&&(s[0]=s[1],d=is(f,t,u,i,void 0,d)),u=s,s=[u[1],n,0,0])):m.type==="tableHead"?(a=!0,o=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(o=n,u[1]!==0?(s[0]=s[1],d=is(f,t,u,i,n,d)):s[1]!==0&&(d=is(f,t,s,i,n,d)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(s[3]=n)}for(o!==0&&f0(f,t,o,l,c),f.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=aS(t.events,n))}return e}function is(e,t,n,r,i,u){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(u.end=Object.assign({},zr(t.events,n[0])),e.add(n[0],0,[["exit",u,t]]));const o=zr(t.events,n[1]);if(u={type:s,start:Object.assign({},o),end:Object.assign({},o)},e.add(n[1],0,[["enter",u,t]]),n[2]!==0){const l=zr(t.events,n[2]),c=zr(t.events,n[3]),d={type:a,start:Object.assign({},l),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const f=t.events[n[2]],p=t.events[n[3]];if(f[1].end=Object.assign({},p[1].end),f[1].type="chunkText",f[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,A=n[3]-n[2]-1;e.add(m,A,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(u.end=Object.assign({},zr(t.events,i)),e.add(i,0,[["exit",u,t]]),u=void 0),u}function f0(e,t,n,r,i){const u=[],s=zr(t.events,n);i&&(i.end=Object.assign({},s),u.push(["exit",i,t])),r.end=Object.assign({},s),u.push(["exit",r,t]),e.add(n+1,0,u)}function zr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const dS={name:"tasklistCheck",tokenize:hS};function fS(){return{text:{91:dS}}}function hS(e,t,n){const r=this;return i;function i(o){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(o):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),u)}function u(o){return xe(o)?(e.enter("taskListCheckValueUnchecked"),e.consume(o),e.exit("taskListCheckValueUnchecked"),s):o===88||o===120?(e.enter("taskListCheckValueChecked"),e.consume(o),e.exit("taskListCheckValueChecked"),s):n(o)}function s(o){return o===93?(e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(o)}function a(o){return X(o)?t(o):de(o)?e.check({tokenize:pS},t,n)(o):n(o)}}function pS(e,t,n){return he(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function mS(e){return _p([UI(),jI(),iS(e),oS(),fS()])}const AS={};function gS(e){const t=this,n=e||AS,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),u=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(mS(n)),u.push(vI()),s.push(PI(n))}function ee(e,t){return Object.assign(e,{meta:{package:"@milkdown/preset-gfm",...t}}),e}var Pd=Ru("strike_through");ee(Pd,{displayName:"Attr<strikethrough>",group:"Strikethrough"});var Fu=ci("strike_through",e=>({parseDOM:[{tag:"del"},{style:"text-decoration",getAttrs:t=>t==="line-through"}],toDOM:t=>["del",e.get(Pd.key)(t)],parseMarkdown:{match:t=>t.type==="delete",runner:(t,n,r)=>{t.openMark(r),t.next(n.children),t.closeMark(r)}},toMarkdown:{match:t=>t.type.name==="strike_through",runner:(t,n)=>{t.withMark(n,"delete")}}}));ee(Fu.mark,{displayName:"MarkSchema<strikethrough>",group:"Strikethrough"});ee(Fu.ctx,{displayName:"MarkSchemaCtx<strikethrough>",group:"Strikethrough"});var Fd=ie("ToggleStrikeThrough",e=>()=>Ta(Fu.type(e)));ee(Fd,{displayName:"Command<ToggleStrikethrough>",group:"Strikethrough"});var P1=mt(e=>Nu(new RegExp("(?<![\\w:/])(~{1,2})(.+?)\\1(?!\\w|\\/)"),Fu.type(e)));ee(P1,{displayName:"InputRule<strikethrough>",group:"Strikethrough"});var Hd=It("strikeThroughKeymap",{ToggleStrikethrough:{shortcuts:"Mod-Alt-x",command:e=>{const t=e.get(ye);return()=>t.call(Fd.key)}}});ee(Hd.ctx,{displayName:"KeymapCtx<strikethrough>",group:"Strikethrough"});ee(Hd.shortcuts,{displayName:"Keymap<strikethrough>",group:"Strikethrough"});var Hu=v6({tableGroup:"block",cellContent:"paragraph",cellAttributes:{alignment:{default:"left",getFromDOM:e=>e.style.textAlign||"left",setDOMAttr:(e,t)=>{t.style=`text-align: ${e||"left"}`}}}}),kn=Fe("table",()=>({...Hu.table,content:"table_header_row table_row+",disableDropCursor:!0,parseMarkdown:{match:e=>e.type==="table",runner:(e,t,n)=>{const r=t.align,i=t.children.map((u,s)=>({...u,align:r,isHeader:s===0}));e.openNode(n),e.next(i),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="table",runner:(e,t)=>{const n=t.content.firstChild?.content;if(!n)return;const r=[];n.forEach(i=>{r.push(i.attrs.alignment)}),e.openNode("table",void 0,{align:r}),e.next(t.content),e.closeNode()}}}));ee(kn.node,{displayName:"NodeSchema<table>",group:"Table"});ee(kn.ctx,{displayName:"NodeSchemaCtx<table>",group:"Table"});var Uu=Fe("table_header_row",()=>({...Hu.table_row,disableDropCursor:!0,content:"(table_header)*",parseDOM:[{tag:"tr[data-is-header]"},{tag:"tr",getAttrs:e=>e instanceof HTMLElement&&e.querySelector("th")?{}:!1}],toDOM(){return["tr",{"data-is-header":!0},0]},parseMarkdown:{match:e=>!!(e.type==="tableRow"&&e.isHeader),runner:(e,t,n)=>{const r=t.align,i=t.children.map((u,s)=>({...u,align:r[s],isHeader:t.isHeader}));e.openNode(n),e.next(i),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="table_header_row",runner:(e,t)=>{t.content.size!==0&&(e.openNode("tableRow",void 0,{isHeader:!0}),e.next(t.content),e.closeNode())}}}));ee(Uu.node,{displayName:"NodeSchema<tableHeaderRow>",group:"Table"});ee(Uu.ctx,{displayName:"NodeSchemaCtx<tableHeaderRow>",group:"Table"});var mi=Fe("table_row",()=>({...Hu.table_row,disableDropCursor:!0,content:"(table_cell)*",parseMarkdown:{match:e=>e.type==="tableRow",runner:(e,t,n)=>{const r=t.align,i=t.children.map((u,s)=>({...u,align:r[s]}));e.openNode(n),e.next(i),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="table_row",runner:(e,t)=>{t.content.size!==0&&(e.openNode("tableRow"),e.next(t.content),e.closeNode())}}}));ee(mi.node,{displayName:"NodeSchema<tableRow>",group:"Table"});ee(mi.ctx,{displayName:"NodeSchemaCtx<tableRow>",group:"Table"});var Wu=Fe("table_cell",()=>({...Hu.table_cell,disableDropCursor:!0,parseMarkdown:{match:e=>e.type==="tableCell"&&!e.isHeader,runner:(e,t,n)=>{const r=t.align;e.openNode(n,{alignment:r}).openNode(e.schema.nodes.paragraph).next(t.children).closeNode().closeNode()}},toMarkdown:{match:e=>e.type.name==="table_cell",runner:(e,t)=>{e.openNode("tableCell").next(t.content).closeNode()}}}));ee(Wu.node,{displayName:"NodeSchema<tableCell>",group:"Table"});ee(Wu.ctx,{displayName:"NodeSchemaCtx<tableCell>",group:"Table"});var ui=Fe("table_header",()=>({...Hu.table_header,disableDropCursor:!0,parseMarkdown:{match:e=>e.type==="tableCell"&&!!e.isHeader,runner:(e,t,n)=>{const r=t.align;e.openNode(n,{alignment:r}),e.openNode(e.schema.nodes.paragraph),e.next(t.children),e.closeNode(),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="table_header",runner:(e,t)=>{e.openNode("tableCell"),e.next(t.content),e.closeNode()}}}));ee(ui.node,{displayName:"NodeSchema<tableHeader>",group:"Table"});ee(ui.ctx,{displayName:"NodeSchemaCtx<tableHeader>",group:"Table"});function F1(e,t=3,n=3){const r=Array(n).fill(0).map(()=>Wu.type(e).createAndFill()),i=Array(n).fill(0).map(()=>ui.type(e).createAndFill()),u=Array(t).fill(0).map((s,a)=>a===0?Uu.type(e).create(null,i):mi.type(e).create(null,r));return kn.type(e).create(null,u)}function H1(e){return(t,n)=>r=>{n=n??r.selection.from;const i=r.doc.resolve(n),u=WT(o=>o.type.name==="table")(i),s=u?{node:u.node,from:u.start}:void 0,a=e==="row";if(s){const o=Ee.get(s.node);if(t>=0&&t<(a?o.height:o.width)){const l=o.positionAt(a?t:o.height-1,a?o.width-1:t,s.node),c=r.doc.resolve(s.from+l),d=a?Ie.rowSelection:Ie.colSelection,f=o.positionAt(a?t:0,a?0:t,s.node),p=r.doc.resolve(s.from+f);return Gm(r.setSelection(d(c,p)))}}return r}}var bS=H1("row"),ES=H1("col");function U1(e,t,{map:n,tableStart:r,table:i},u){const s=Array(u).fill(0).reduce((o,l,c)=>o+i.child(c).nodeSize,r),a=Array(n.width).fill(0).map((o,l)=>{const c=i.nodeAt(n.map[l]);return Wu.type(e).createAndFill({alignment:c?.attrs.alignment})});return t.insert(s,mi.type(e).create(null,a)),t}function yS(e){const t=Pu(e.$from);if(!t)return;const n=Ee.get(t.node);return n.cellsInRect({left:0,right:n.width,top:0,bottom:n.height}).map(r=>{const i=t.node.nodeAt(r),u=r+t.start;return{pos:u,start:u+1,node:i}})}function TS(e){const t=yS(e.selection);if(t&&t[0]){const n=e.doc.resolve(t[0].pos),r=t[t.length-1];if(r){const i=e.doc.resolve(r.pos);return Gm(e.setSelection(new Ie(i,n)))}}return e}var Ud=ie("GoToPrevTableCell",()=>()=>T1(-1));ee(Ud,{displayName:"Command<goToPrevTableCellCommand>",group:"Table"});var Wd=ie("GoToNextTableCell",()=>()=>T1(1));ee(Wd,{displayName:"Command<goToNextTableCellCommand>",group:"Table"});var Kd=ie("ExitTable",e=>()=>(t,n)=>{if(!vt(t))return!1;const{$head:r}=t.selection,i=UT(r,kn.type(e));if(!i)return!1;const{to:u}=i,s=t.tr.replaceWith(u,u,$t.type(e).createAndFill());return s.setSelection(ue.near(s.doc.resolve(u),1)).scrollIntoView(),n?.(s),!0});ee(Kd,{displayName:"Command<breakTableCommand>",group:"Table"});var W1=ie("InsertTable",e=>({row:t,col:n}={})=>(r,i)=>{const{selection:u,tr:s}=r,{from:a}=u,o=F1(e,t,n),l=s.replaceSelectionWith(o),c=ue.findFrom(l.doc.resolve(a),1,!0);return c&&l.setSelection(c),i?.(l),!0});ee(W1,{displayName:"Command<insertTableCommand>",group:"Table"});var K1=ie("MoveRow",()=>({from:e,to:t,pos:n}={})=>ck({from:e??0,to:t??0,pos:n}));ee(K1,{displayName:"Command<moveRowCommand>",group:"Table"});var Q1=ie("MoveCol",()=>({from:e,to:t,pos:n}={})=>dk({from:e??0,to:t??0,pos:n}));ee(Q1,{displayName:"Command<moveColCommand>",group:"Table"});var Y1=ie("SelectRow",()=>(e={index:0})=>(t,n)=>{const{tr:r}=t;return!!n?.(bS(e.index,e.pos)(r))});ee(Y1,{displayName:"Command<selectRowCommand>",group:"Table"});var z1=ie("SelectCol",()=>(e={index:0})=>(t,n)=>{const{tr:r}=t;return!!n?.(ES(e.index,e.pos)(r))});ee(z1,{displayName:"Command<selectColCommand>",group:"Table"});var G1=ie("SelectTable",()=>()=>(e,t)=>{const{tr:n}=e;return!!t?.(TS(n))});ee(G1,{displayName:"Command<selectTableCommand>",group:"Table"});var V1=ie("DeleteSelectedCells",()=>()=>(e,t)=>{const{selection:n}=e;if(!(n instanceof Ie))return!1;const r=n.isRowSelection(),i=n.isColSelection();return r&&i?lk(e,t):i?rk(e,t):uk(e,t)});ee(V1,{displayName:"Command<deleteSelectedCellsCommand>",group:"Table"});var q1=ie("AddColBefore",()=>()=>ek);ee(q1,{displayName:"Command<addColBeforeCommand>",group:"Table"});var J1=ie("AddColAfter",()=>()=>tk);ee(J1,{displayName:"Command<addColAfterCommand>",group:"Table"});var j1=ie("AddRowBefore",e=>()=>(t,n)=>{if(!vt(t))return!1;if(n){const r=er(t);n(U1(e,t.tr,r,r.top))}return!0});ee(j1,{displayName:"Command<addRowBeforeCommand>",group:"Table"});var Z1=ie("AddRowAfter",e=>()=>(t,n)=>{if(!vt(t))return!1;if(n){const r=er(t);n(U1(e,t.tr,r,r.bottom))}return!0});ee(Z1,{displayName:"Command<addRowAfterCommand>",group:"Table"});var X1=ie("SetAlign",()=>(e="left")=>sk("alignment",e));ee(X1,{displayName:"Command<setAlignCommand>",group:"Table"});var $1=mt(e=>new kt(/^\|(?<col>\d+)[xX](?<row>\d+)\|\s$/,(t,n,r,i)=>{const u=t.doc.resolve(r);if(!u.node(-1).canReplaceWith(u.index(-1),u.indexAfter(-1),kn.type(e)))return null;const s=F1(e,Math.max(Number(n.groups?.row??0),2),Number(n.groups?.col)),a=t.tr.replaceRangeWith(r,i,s);return a.setSelection(ae.create(a.doc,r+3)).scrollIntoView()}));ee($1,{displayName:"InputRule<insertTableInputRule>",group:"Table"});var eg=Jx(e=>({run:(t,n,r)=>{if(r)return t;function i(l){const c=l.childCount,d=l.lastChild?.childCount??0;if(c===0||d===0)return $t.type(e).create();const f=l.firstChild;if(!(d>0&&f&&f.childCount===0))return l;if(c>=3){const E=l.child(1),g=[];for(let R=0;R<E.childCount;R++){const w=E.child(R);g.push(ui.type(e).create(w.attrs,w.content,w.marks))}const N=f.type.create(f.attrs,g),I=[];for(let R=2;R<c;R++)I.push(l.child(R));return l.type.create(l.attrs,[N,...I])}const p=Array(d).fill(0).map(()=>ui.type(e).createAndFill()),m=new z(H.from(p),0,0),A=f.replace(0,0,m);return l.replace(0,f.nodeSize,new z(H.from(A),0,0))}function u(l){const c=mi.type(e),d=[];let f=[],p=!1;function m(){if(f.length===0)return;const A=Uu.type(e).createAndFill(),E=kn.type(e).create(null,[A,...f]);d.push(i(E)),f=[]}return l.forEach(A=>{A.type===c?(p=!0,f.push(A)):(m(),d.push(A))}),m(),p?H.from(d):l}function s(l){let c=u(l),d=c!==l;const f=[];return c.forEach(p=>{if(p.type===kn.type(e)){const m=i(p);m!==p&&(d=!0),f.push(m)}else if(p.childCount>0){const m=s(p.content);m!==p.content?(d=!0,f.push(p.copy(m))):f.push(p)}else f.push(p)}),d?H.from(f):l}function a(l){const c=[],d=[];l.forEach(f=>d.push(f));for(let f=0;f<d.length;f++){const p=d[f],m=d[f+1];p.type===$t.type(e)&&p.content.size===0&&m&&m.type===kn.type(e)||c.push(p)}return c.length<d.length?H.from(c):l}let o=s(t.content);return o=a(o),new z(H.from(o),t.openStart,t.openEnd)}}));ee(eg,{displayName:"PasteRule<table>",group:"Table"});var Qd=It("tableKeymap",{NextCell:{priority:100,shortcuts:["Mod-]","Tab"],command:e=>{const t=e.get(ye);return()=>t.call(Wd.key)}},PrevCell:{shortcuts:["Mod-[","Shift-Tab"],command:e=>{const t=e.get(ye);return()=>t.call(Ud.key)}},ExitTable:{shortcuts:["Mod-Enter","Enter"],command:e=>{const t=e.get(ye);return()=>t.call(Kd.key)}}});ee(Qd.ctx,{displayName:"KeymapCtx<table>",group:"Table"});ee(Qd.shortcuts,{displayName:"Keymap<table>",group:"Table"});var Mo="footnote_definition",h0="footnoteDefinition",Yd=Fe("footnote_definition",()=>({group:"block",content:"block+",defining:!0,attrs:{label:{default:"",validate:"string"}},parseDOM:[{tag:`dl[data-type="${Mo}"]`,getAttrs:e=>{if(!(e instanceof HTMLElement))throw en(e);return{label:e.dataset.label}},contentElement:"dd"}],toDOM:e=>{const t=e.attrs.label;return["dl",{"data-label":t,"data-type":Mo},["dt",t],["dd",0]]},parseMarkdown:{match:({type:e})=>e===h0,runner:(e,t,n)=>{e.openNode(n,{label:t.label}).next(t.children).closeNode()}},toMarkdown:{match:e=>e.type.name===Mo,runner:(e,t)=>{e.openNode(h0,void 0,{label:t.attrs.label,identifier:t.attrs.label}).next(t.content).closeNode()}}}));ee(Yd.ctx,{displayName:"NodeSchemaCtx<footnodeDef>",group:"footnote"});ee(Yd.node,{displayName:"NodeSchema<footnodeDef>",group:"footnote"});var Bo="footnote_reference",zd=Fe("footnote_reference",()=>({group:"inline",inline:!0,atom:!0,attrs:{label:{default:"",validate:"string"}},parseDOM:[{tag:`sup[data-type="${Bo}"]`,getAttrs:e=>{if(!(e instanceof HTMLElement))throw en(e);return{label:e.dataset.label}}}],toDOM:e=>{const t=e.attrs.label;return["sup",{"data-label":t,"data-type":Bo},t]},parseMarkdown:{match:({type:e})=>e==="footnoteReference",runner:(e,t,n)=>{e.addNode(n,{label:t.label})}},toMarkdown:{match:e=>e.type.name===Bo,runner:(e,t)=>{e.addNode("footnoteReference",void 0,void 0,{label:t.attrs.label,identifier:t.attrs.label})}}}));ee(zd.ctx,{displayName:"NodeSchemaCtx<footnodeRef>",group:"footnote"});ee(zd.node,{displayName:"NodeSchema<footnodeRef>",group:"footnote"});var Gd=Nn.extendSchema(e=>t=>{const n=e(t);return{...n,attrs:{...n.attrs,checked:{default:null,validate:"boolean|null"}},parseDOM:[{tag:'li[data-item-type="task"]',getAttrs:r=>{if(!(r instanceof HTMLElement))throw en(r);return{label:r.dataset.label,listType:r.dataset.listType,spread:r.dataset.spread,checked:r.dataset.checked?r.dataset.checked==="true":null}}},...n?.parseDOM||[]],toDOM:r=>n.toDOM&&r.attrs.checked==null?n.toDOM(r):["li",{"data-item-type":"task","data-label":r.attrs.label,"data-list-type":r.attrs.listType,"data-spread":r.attrs.spread,"data-checked":r.attrs.checked},0],parseMarkdown:{match:({type:r})=>r==="listItem",runner:(r,i,u)=>{if(i.checked==null){n.parseMarkdown.runner(r,i,u);return}const s=i.label!=null?`${i.label}.`:"•",a=i.checked!=null?!!i.checked:null,o=i.label!=null?"ordered":"bullet",l=i.spread!=null?`${i.spread}`:"true";r.openNode(u,{label:s,listType:o,spread:l,checked:a}),r.next(i.children),r.closeNode()}},toMarkdown:{match:r=>r.type.name==="list_item",runner:(r,i)=>{if(i.attrs.checked==null){n.toMarkdown.runner(r,i);return}const u=i.attrs.label,s=i.attrs.listType,a=i.attrs.spread==="true",o=i.attrs.checked;r.openNode("listItem",void 0,{label:u,listType:s,spread:a,checked:o}),r.next(i.content),r.closeNode()}}}});ee(Gd.node,{displayName:"NodeSchema<taskListItem>",group:"ListItem"});ee(Gd.ctx,{displayName:"NodeSchemaCtx<taskListItem>",group:"ListItem"});var tg=mt(()=>new kt(/^\[(?<checked>\s|x)\]\s$/,(e,t,n,r)=>{const i=e.doc.resolve(n);let u=0,s=i.node(u);for(;s&&s.type.name!=="list_item";)u--,s=i.node(u);if(!s||s.attrs.checked!=null)return null;const a=t.groups?.checked==="x",o=i.before(u),l=e.tr;return l.deleteRange(n,r).setNodeMarkup(o,void 0,{...s.attrs,checked:a}),l}));ee(tg,{displayName:"InputRule<wrapInTaskListInputRule>",group:"ListItem"});var CS=[Hd,Qd].flat(),xS=[$1,tg],kS=[P1],IS=[eg],ng=wn(()=>Uk);ee(ng,{displayName:"Prose<autoInsertSpanPlugin>",group:"Prose"});var SS=wn(()=>Tk({}));ee(SS,{displayName:"Prose<columnResizingPlugin>",group:"Prose"});var rg=wn(()=>Ok({allowTableNodeSelection:!0}));ee(rg,{displayName:"Prose<tableEditingPlugin>",group:"Prose"});var Vd=Rr("remarkGFM",()=>gS);ee(Vd.plugin,{displayName:"Remark<remarkGFMPlugin>",group:"Remark"});ee(Vd.options,{displayName:"RemarkConfig<remarkGFMPlugin>",group:"Remark"});var wS=new xt("MILKDOWN_KEEP_TABLE_ALIGN_PLUGIN");function NS(e,t){let n=0;return t.forEach((r,i,u)=>{r===e&&(n=u)}),n}var ig=wn(()=>new Ct({key:wS,appendTransaction:(e,t,n)=>{let r;const i=(u,s)=>{if(r||(r=n.tr),u.type.name!=="table_cell")return;const a=n.doc.resolve(s),o=a.node(a.depth),l=a.node(a.depth-1).firstChild;if(!l)return;const c=NS(u,o),d=l.maybeChild(c);if(!d)return;const f=d.attrs.alignment;f!==u.attrs.alignment&&r.setNodeMarkup(s,void 0,{...u.attrs,alignment:f})};return t.doc!==n.doc&&n.doc.descendants(i),r}}));ee(ig,{displayName:"Prose<keepTableAlignPlugin>",group:"Prose"});var DS=[ig,ng,Vd,rg].flat(),_S=[Gd,kn,Uu,mi,ui,Wu,Yd,zd,Pd,Fu].flat(),OS=[Wd,Ud,Kd,W1,K1,Q1,Y1,z1,G1,V1,j1,Z1,q1,J1,X1,Fd],RS=[_S,xS,IS,kS,CS,OS,DS].flat();const MS=`/*
|
|
50
51
|
* @zzclub/milkdown-article-style — article typography
|
|
51
52
|
*
|
|
52
53
|
* Consumers:
|
|
@@ -473,39 +474,39 @@ var Df=e=>{throw TypeError(e)};var _f=(e,t,n)=>t.has(e)||Df("Cannot "+n);var he=
|
|
|
473
474
|
letter-spacing: 0.08em;
|
|
474
475
|
text-align: center;
|
|
475
476
|
}
|
|
476
|
-
`;var
|
|
477
|
-
`:Ms(e.children):va(e)?Ms(e.children):tn(e)?e.data:""}function fi(e){return Array.isArray(e)?e.map(fi).join(""):ve(e)&&!Fa(e)?fi(e.children):tn(e)?e.data:""}function Zs(e){return Array.isArray(e)?e.map(Zs).join(""):ve(e)&&(e.type===Ce.Tag||va(e))?Zs(e.children):tn(e)?e.data:""}function Ha(e){return ve(e)?e.children:[]}function xg(e){return e.parent||null}function kg(e){const t=xg(e);if(t!=null)return Ha(t);const n=[e];let{prev:r,next:i}=e;for(;r!=null;)n.unshift(r),{prev:r}=r;for(;i!=null;)n.push(i),{next:i}=i;return n}function Dw(e,t){var n;return(n=e.attribs)===null||n===void 0?void 0:n[t]}function _w(e,t){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&e.attribs[t]!=null}function Ow(e){return e.name}function lf(e){let{next:t}=e;for(;t!==null&&!ae(t);)({next:t}=t);return t}function cf(e){let{prev:t}=e;for(;t!==null&&!ae(t);)({prev:t}=t);return t}function Ur(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){const t=e.parent.children,n=t.lastIndexOf(e);n>=0&&t.splice(n,1)}e.next=null,e.prev=null,e.parent=null}function Rw(e,t){const n=t.prev=e.prev;n&&(n.next=t);const r=t.next=e.next;r&&(r.prev=t);const i=t.parent=e.parent;if(i){const u=i.children;u[u.lastIndexOf(e)]=t,e.parent=null}}function Mw(e,t){if(Ur(t),t.next=null,t.parent=e,e.children.push(t)>1){const n=e.children[e.children.length-2];n.next=t,t.prev=n}else t.prev=null}function Bw(e,t){Ur(t);const{parent:n}=e,r=e.next;if(t.next=r,t.prev=e,e.next=t,t.parent=n,r){if(r.prev=t,n){const i=n.children;i.splice(i.lastIndexOf(r),0,t)}}else n&&n.children.push(t)}function Lw(e,t){if(Ur(t),t.parent=e,t.prev=null,e.children.unshift(t)!==1){const n=e.children[1];n.prev=t,t.next=n}else t.next=null}function vw(e,t){Ur(t);const{parent:n}=e;if(n){const r=n.children;r.splice(r.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=n,t.prev=e.prev,t.next=e,e.prev=t}function Vu(e,t,n=!0,r=1/0){return df(e,Array.isArray(t)?t:[t],n,r)}function df(e,t,n,r){const i=[],u=[Array.isArray(t)?t:[t]],s=[0];for(;;){if(s[0]>=u[0].length){if(s.length===1)return i;u.shift(),s.shift();continue}const a=u[0][s[0]++];if(e(a)&&(i.push(a),--r<=0))return i;n&&ve(a)&&a.children.length>0&&(s.unshift(0),u.unshift(a.children))}}function Fw(e,t){return t.find(e)}function ff(e,t,n=!0){const r=Array.isArray(t)?t:[t];for(let i=0;i<r.length;i++){const u=r[i];if(ae(u)&&e(u))return u;if(n&&ve(u)&&u.children.length>0){const s=ff(e,u.children,!0);if(s)return s}}return null}function Sg(e,t){return(Array.isArray(t)?t:[t]).some(n=>ae(n)&&e(n)||ve(n)&&Sg(e,n.children))}function Pw(e,t){const n=[],r=[Array.isArray(t)?t:[t]],i=[0];for(;;){if(i[0]>=r[0].length){if(r.length===1)return n;r.shift(),i.shift();continue}const u=r[0][i[0]++];ae(u)&&e(u)&&n.push(u),ve(u)&&u.children.length>0&&(i.unshift(0),r.unshift(u.children))}}const Xs={tag_name(e){return typeof e=="function"?t=>ae(t)&&e(t.name):e==="*"?ae:t=>ae(t)&&t.name===e},tag_type(e){return typeof e=="function"?t=>e(t.type):t=>t.type===e},tag_contains(e){return typeof e=="function"?t=>tn(t)&&e(t.data):t=>tn(t)&&t.data===e}};function hf(e,t){return typeof t=="function"?n=>ae(n)&&t(n.attribs[e]):n=>ae(n)&&n.attribs[e]===t}function Hw(e,t){return n=>e(n)||t(n)}function Ig(e){const t=Object.keys(e).map(n=>{const r=e[n];return Object.prototype.hasOwnProperty.call(Xs,n)?Xs[n](r):hf(n,r)});return t.length===0?null:t.reduce(Hw)}function Uw(e,t){const n=Ig(e);return n?n(t):!0}function Ww(e,t,n,r=1/0){const i=Ig(e);return i?Vu(i,t,n,r):[]}function Qw(e,t,n=!0){return Array.isArray(t)||(t=[t]),ff(hf("id",e),t,n)}function Ci(e,t,n=!0,r=1/0){return Vu(Xs.tag_name(e),t,n,r)}function zw(e,t,n=!0,r=1/0){return Vu(hf("class",e),t,n,r)}function Kw(e,t,n=!0,r=1/0){return Vu(Xs.tag_type(e),t,n,r)}function qw(e){let t=e.length;for(;--t>=0;){const n=e[t];if(t>0&&e.lastIndexOf(n,t-1)>=0){e.splice(t,1);continue}for(let r=n.parent;r;r=r.parent)if(e.includes(r)){e.splice(t,1);break}}return e}var Bt;(function(e){e[e.DISCONNECTED=1]="DISCONNECTED",e[e.PRECEDING=2]="PRECEDING",e[e.FOLLOWING=4]="FOLLOWING",e[e.CONTAINS=8]="CONTAINS",e[e.CONTAINED_BY=16]="CONTAINED_BY"})(Bt||(Bt={}));function wg(e,t){const n=[],r=[];if(e===t)return 0;let i=ve(e)?e:e.parent;for(;i;)n.unshift(i),i=i.parent;for(i=ve(t)?t:t.parent;i;)r.unshift(i),i=i.parent;const u=Math.min(n.length,r.length);let s=0;for(;s<u&&n[s]===r[s];)s++;if(s===0)return Bt.DISCONNECTED;const a=n[s-1],o=a.children,l=n[s],c=r[s];return o.indexOf(l)>o.indexOf(c)?a===t?Bt.FOLLOWING|Bt.CONTAINED_BY:Bt.FOLLOWING:a===e?Bt.PRECEDING|Bt.CONTAINS:Bt.PRECEDING}function xi(e){return e=e.filter((t,n,r)=>!r.includes(t,n+1)),e.sort((t,n)=>{const r=wg(t,n);return r&Bt.PRECEDING?-1:r&Bt.FOLLOWING?1:0}),e}function Yw(e){const t=$s(Zw,e);return t?t.name==="feed"?Gw(t):Vw(t):null}function Gw(e){var t;const n=e.children,r={type:"atom",items:Ci("entry",n).map(s=>{var a;const{children:o}=s,l={media:Ng(o)};pt(l,"id","id",o),pt(l,"title","title",o);const c=(a=$s("link",o))===null||a===void 0?void 0:a.attribs.href;c&&(l.link=c);const d=Yn("summary",o)||Yn("content",o);d&&(l.description=d);const f=Yn("updated",o);return f&&(l.pubDate=new Date(f)),l})};pt(r,"id","id",n),pt(r,"title","title",n);const i=(t=$s("link",n))===null||t===void 0?void 0:t.attribs.href;i&&(r.link=i),pt(r,"description","subtitle",n);const u=Yn("updated",n);return u&&(r.updated=new Date(u)),pt(r,"author","email",n,!0),r}function Vw(e){var t,n;const r=(n=(t=$s("channel",e.children))===null||t===void 0?void 0:t.children)!==null&&n!==void 0?n:[],i={type:e.name.substr(0,3),id:"",items:Ci("item",e.children).map(s=>{const{children:a}=s,o={media:Ng(a)};pt(o,"id","guid",a),pt(o,"title","title",a),pt(o,"link","link",a),pt(o,"description","description",a);const l=Yn("pubDate",a)||Yn("dc:date",a);return l&&(o.pubDate=new Date(l)),o})};pt(i,"title","title",r),pt(i,"link","link",r),pt(i,"description","description",r);const u=Yn("lastBuildDate",r);return u&&(i.updated=new Date(u)),pt(i,"author","managingEditor",r,!0),i}const Jw=["url","type","lang"],jw=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function Ng(e){return Ci("media:content",e).map(t=>{const{attribs:n}=t,r={medium:n.medium,isDefault:!!n.isDefault};for(const i of Jw)n[i]&&(r[i]=n[i]);for(const i of jw)n[i]&&(r[i]=parseInt(n[i],10));return n.expression&&(r.expression=n.expression),r})}function $s(e,t){return Ci(e,t,!0,1)[0]}function Yn(e,t,n=!1){return fi(Ci(e,t,n,1)).trim()}function pt(e,t,n,r,i=!1){const u=Yn(n,r,i);u&&(e[t]=u)}function Zw(e){return e==="rss"||e==="feed"||e==="rdf:RDF"}const Ua=Object.freeze(Object.defineProperty({__proto__:null,get DocumentPosition(){return Bt},append:Bw,appendChild:Mw,compareDocumentPosition:wg,existsOne:Sg,filter:Vu,find:df,findAll:Pw,findOne:ff,findOneChild:Fw,getAttributeValue:Dw,getChildren:Ha,getElementById:Qw,getElements:Ww,getElementsByClassName:zw,getElementsByTagName:Ci,getElementsByTagType:Kw,getFeed:Yw,getInnerHTML:Nw,getName:Ow,getOuterHTML:Cg,getParent:xg,getSiblings:kg,getText:Ms,hasAttrib:_w,hasChildren:ve,innerText:Zs,isCDATA:va,isComment:Fa,isDocument:sr,isTag:ae,isText:tn,nextElementSibling:lf,prepend:vw,prependChild:Lw,prevElementSibling:cf,removeElement:Ur,removeSubsets:qw,replaceElement:Rw,testElement:Uw,textContent:fi,uniqueSort:xi},Symbol.toStringTag,{value:"Module"})),Xw={_useHtmlParser2:!1};function ac(e,t){if(!e)return t??Xw;const n={_useHtmlParser2:!!e.xmlMode,...t,...e};return e.xml?(n._useHtmlParser2=!0,n.xmlMode=!0,e.xml!==!0&&Object.assign(n,e.xml)):e.xmlMode&&(n._useHtmlParser2=!0),n}function Dg(e,t,n){return e?e(t??e._root.children,null,void 0,n).toString():""}function $w(e,t){return typeof e=="object"&&e!=null&&!("length"in e)&&!("type"in e)}function eN(e,t){const n=$w(e)?(t=e,void 0):e,r={...this===null||this===void 0?void 0:this._options,...ac(t)};return Dg(this,n,r)}function tN(e){const t={...this._options,xmlMode:!0};return Dg(this,e,t)}function yu(e){const t=e??(this?this.root():[]);let n="";for(let r=0;r<t.length;r++)n+=fi(t[r]);return n}function nN(e,t,n=typeof t=="boolean"?t:!1){if(!e||typeof e!="string")return null;typeof t=="boolean"&&(n=t);const r=this.load(e,this._options,!1);return n||r("script").remove(),[...r.root()[0].children]}function rN(){return this(this._root)}function pf(e,t){if(t===e)return!1;let n=t;for(;n&&n!==n.parent;)if(n=n.parent,n===e)return!0;return!1}function iN(e){return this.root().extract(e)}function _g(e,t){if(!D0(e)||!D0(t))return;let n=e.length;const r=+t.length;for(let i=0;i<r;i++)e[n++]=t[i];return e.length=n,e}function D0(e){if(Array.isArray(e))return!0;if(typeof e!="object"||e===null||!("length"in e)||typeof e.length!="number"||e.length<0)return!1;for(let t=0;t<e.length;t++)if(!(t in e))return!1;return!0}const uN=Object.freeze(Object.defineProperty({__proto__:null,contains:pf,extract:iN,html:eN,merge:_g,parseHTML:nN,root:rN,text:yu,xml:tN},Symbol.toStringTag,{value:"Module"}));function Dn(e){return e.cheerio!=null}function sN(e){return e.replace(/[._-](\w|$)/g,(t,n)=>n.toUpperCase())}function aN(e){return e.replace(/[A-Z]/g,"-$&").toLowerCase()}function Me(e,t){const n=e.length;for(let r=0;r<n;r++)t(e[r],r);return e}var pr;(function(e){e[e.LowerA=97]="LowerA",e[e.LowerZ=122]="LowerZ",e[e.UpperA=65]="UpperA",e[e.UpperZ=90]="UpperZ",e[e.Exclamation=33]="Exclamation"})(pr||(pr={}));function oc(e){const t=e.indexOf("<");if(t<0||t>e.length-3)return!1;const n=e.charCodeAt(t+1);return(n>=pr.LowerA&&n<=pr.LowerZ||n>=pr.UpperA&&n<=pr.UpperZ||n===pr.Exclamation)&&e.includes(">",t+2)}const Tu=Object.prototype.hasOwnProperty,Cu=/\s+/,lc="data-",mf=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,oN=/^{[^]*}$|^\[[^]*]$/;function ea(e,t,n){var r;if(!(!e||!ae(e))){if((r=e.attribs)!==null&&r!==void 0||(e.attribs={}),!t)return e.attribs;if(Tu.call(e.attribs,t))return!n&&mf.test(t)?t:e.attribs[t];if(e.name==="option"&&t==="value")return yu(e.children);if(e.name==="input"&&(e.attribs.type==="radio"||e.attribs.type==="checkbox")&&t==="value")return"on"}}function ri(e,t,n){n===null?Rg(e,t):e.attribs[t]=`${n}`}function lN(e,t){if(typeof e=="object"||t!==void 0){if(typeof t=="function"){if(typeof e!="string")throw new Error("Bad combination of arguments.");return Me(this,(n,r)=>{ae(n)&&ri(n,e,t.call(n,r,n.attribs[e]))})}return Me(this,n=>{if(ae(n))if(typeof e=="object")for(const r of Object.keys(e)){const i=e[r];ri(n,r,i)}else ri(n,e,t)})}return arguments.length>1?this:ea(this[0],e,this.options.xmlMode)}function _0(e,t,n){return t in e?e[t]:!n&&mf.test(t)?ea(e,t,!1)!==void 0:ea(e,t,n)}function Go(e,t,n,r){t in e?e[t]=n:ri(e,t,!r&&mf.test(t)?n?"":null:`${n}`)}function cN(e,t){var n;if(typeof e=="string"&&t===void 0){const r=this[0];if(!r||!ae(r))return;switch(e){case"style":{const i=this.css(),u=Object.keys(i);for(let s=0;s<u.length;s++)i[s]=u[s];return i.length=u.length,i}case"tagName":case"nodeName":return r.name.toUpperCase();case"href":case"src":{const i=(n=r.attribs)===null||n===void 0?void 0:n[e];return typeof URL<"u"&&(e==="href"&&(r.tagName==="a"||r.tagName==="link")||e==="src"&&(r.tagName==="img"||r.tagName==="iframe"||r.tagName==="audio"||r.tagName==="video"||r.tagName==="source"))&&i!==void 0&&this.options.baseURI?new URL(i,this.options.baseURI).href:i}case"innerText":return Zs(r);case"textContent":return fi(r);case"outerHTML":return this.clone().wrap("<container />").parent().html();case"innerHTML":return this.html();default:return _0(r,e,this.options.xmlMode)}}if(typeof e=="object"||t!==void 0){if(typeof t=="function"){if(typeof e=="object")throw new TypeError("Bad combination of arguments.");return Me(this,(r,i)=>{ae(r)&&Go(r,e,t.call(r,i,_0(r,e,this.options.xmlMode)),this.options.xmlMode)})}return Me(this,r=>{if(ae(r))if(typeof e=="object")for(const i of Object.keys(e)){const u=e[i];Go(r,i,u,this.options.xmlMode)}else Go(r,e,t,this.options.xmlMode)})}}function O0(e,t,n){var r;(r=e.data)!==null&&r!==void 0||(e.data={}),typeof t=="object"?Object.assign(e.data,t):typeof t=="string"&&n!==void 0&&(e.data[t]=n)}function dN(e){for(const t of Object.keys(e.attribs)){if(!t.startsWith(lc))continue;const n=sN(t.slice(lc.length));Tu.call(e.data,n)||(e.data[n]=Og(e.attribs[t]))}return e.data}function fN(e,t){const n=lc+aN(t),r=e.data;if(Tu.call(r,t))return r[t];if(Tu.call(e.attribs,n))return r[t]=Og(e.attribs[n])}function Og(e){if(e==="null")return null;if(e==="true")return!0;if(e==="false")return!1;const t=Number(e);if(e===String(t))return t;if(oN.test(e))try{return JSON.parse(e)}catch{}return e}function hN(e,t){var n;const r=this[0];if(!r||!ae(r))return;const i=r;return(n=i.data)!==null&&n!==void 0||(i.data={}),e==null?dN(i):typeof e=="object"||t!==void 0?(Me(this,u=>{ae(u)&&(typeof e=="object"?O0(u,e):O0(u,e,t))}),this):fN(i,e)}function pN(e){const t=arguments.length===0,n=this[0];if(!n||!ae(n))return t?void 0:this;switch(n.name){case"textarea":return this.text(e);case"select":{const r=this.find("option:selected");if(!t){if(this.attr("multiple")==null&&typeof e=="object")return this;this.find("option").removeAttr("selected");const i=typeof e=="object"?e:[e];for(const u of i)this.find(`option[value="${u}"]`).attr("selected","");return this}return this.attr("multiple")?r.toArray().map(i=>yu(i.children)):r.attr("value")}case"input":case"option":return t?this.attr("value"):this.attr("value",e)}}function Rg(e,t){!e.attribs||!Tu.call(e.attribs,t)||delete e.attribs[t]}function ta(e){return e?e.trim().split(Cu):[]}function mN(e){const t=ta(e);for(const n of t)Me(this,r=>{ae(r)&&Rg(r,n)});return this}function AN(e){return this.toArray().some(t=>{const n=ae(t)&&t.attribs.class;let r=-1;if(n&&e.length>0)for(;(r=n.indexOf(e,r+1))>-1;){const i=r+e.length;if((r===0||Cu.test(n[r-1]))&&(i===n.length||Cu.test(n[i])))return!0}return!1})}function Mg(e){if(typeof e=="function")return Me(this,(r,i)=>{if(ae(r)){const u=r.attribs.class||"";Mg.call([r],e.call(r,i,u))}});if(!e||typeof e!="string")return this;const t=e.split(Cu),n=this.length;for(let r=0;r<n;r++){const i=this[r];if(!ae(i))continue;const u=ea(i,"class",!1);if(u){let s=` ${u} `;for(const a of t){const o=`${a} `;s.includes(` ${o}`)||(s+=o)}ri(i,"class",s.trim())}else ri(i,"class",t.join(" ").trim())}return this}function Bg(e){if(typeof e=="function")return Me(this,(i,u)=>{ae(i)&&Bg.call([i],e.call(i,u,i.attribs.class||""))});const t=ta(e),n=t.length,r=arguments.length===0;return Me(this,i=>{if(ae(i))if(r)i.attribs.class="";else{const u=ta(i.attribs.class);let s=!1;for(let a=0;a<n;a++){const o=u.indexOf(t[a]);o>=0&&(u.splice(o,1),s=!0,a--)}s&&(i.attribs.class=u.join(" "))}})}function Lg(e,t){if(typeof e=="function")return Me(this,(s,a)=>{ae(s)&&Lg.call([s],e.call(s,a,s.attribs.class||"",t),t)});if(!e||typeof e!="string")return this;const n=e.split(Cu),r=n.length,i=typeof t=="boolean"?t?1:-1:0,u=this.length;for(let s=0;s<u;s++){const a=this[s];if(!ae(a))continue;const o=ta(a.attribs.class);for(let l=0;l<r;l++){const c=o.indexOf(n[l]);i>=0&&c<0?o.push(n[l]):i<=0&&c>=0&&o.splice(c,1)}a.attribs.class=o.join(" ")}return this}const gN=Object.freeze(Object.defineProperty({__proto__:null,addClass:Mg,attr:lN,data:hN,hasClass:AN,prop:cN,removeAttr:mN,removeClass:Bg,toggleClass:Lg,val:pN},Symbol.toStringTag,{value:"Module"}));var ne;(function(e){e.Attribute="attribute",e.Pseudo="pseudo",e.PseudoElement="pseudo-element",e.Tag="tag",e.Universal="universal",e.Adjacent="adjacent",e.Child="child",e.Descendant="descendant",e.Parent="parent",e.Sibling="sibling",e.ColumnCombinator="column-combinator"})(ne||(ne={}));var We;(function(e){e.Any="any",e.Element="element",e.End="end",e.Equals="equals",e.Exists="exists",e.Hyphen="hyphen",e.Not="not",e.Start="start"})(We||(We={}));const R0=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,bN=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,EN=new Map([[126,We.Element],[94,We.Start],[36,We.End],[42,We.Any],[33,We.Not],[124,We.Hyphen]]),yN=new Set(["has","not","matches","is","where","host","host-context"]);function nu(e){switch(e.type){case ne.Adjacent:case ne.Child:case ne.Descendant:case ne.Parent:case ne.Sibling:case ne.ColumnCombinator:return!0;default:return!1}}const TN=new Set(["contains","icontains"]);function CN(e,t,n){const r=parseInt(t,16)-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,r&1023|56320)}function Oi(e){return e.replace(bN,CN)}function Vo(e){return e===39||e===34}function M0(e){return e===32||e===9||e===10||e===12||e===13}function Wa(e){const t=[],n=vg(t,`${e}`,0);if(n<e.length)throw new Error(`Unmatched selector: ${e.slice(n)}`);return t}function vg(e,t,n){let r=[];function i(f){const h=t.slice(n+f).match(R0);if(!h)throw new Error(`Expected name, found ${t.slice(n)}`);const[m]=h;return n+=f+m.length,Oi(m)}function u(f){for(n+=f;n<t.length&&M0(t.charCodeAt(n));)n++}function s(){n+=1;const f=n;let h=1;for(;h>0&&n<t.length;n++)t.charCodeAt(n)===40&&!a(n)?h++:t.charCodeAt(n)===41&&!a(n)&&h--;if(h)throw new Error("Parenthesis not matched");return Oi(t.slice(f,n-1))}function a(f){let h=0;for(;t.charCodeAt(--f)===92;)h++;return(h&1)===1}function o(){if(r.length>0&&nu(r[r.length-1]))throw new Error("Did not expect successive traversals.")}function l(f){if(r.length>0&&r[r.length-1].type===ne.Descendant){r[r.length-1].type=f;return}o(),r.push({type:f})}function c(f,h){r.push({type:ne.Attribute,name:f,action:h,value:i(1),namespace:null,ignoreCase:"quirks"})}function d(){if(r.length&&r[r.length-1].type===ne.Descendant&&r.pop(),r.length===0)throw new Error("Empty sub-selector");e.push(r)}if(u(0),t.length===n)return n;e:for(;n<t.length;){const f=t.charCodeAt(n);switch(f){case 32:case 9:case 10:case 12:case 13:{(r.length===0||r[0].type!==ne.Descendant)&&(o(),r.push({type:ne.Descendant})),u(1);break}case 62:{l(ne.Child),u(1);break}case 60:{l(ne.Parent),u(1);break}case 126:{l(ne.Sibling),u(1);break}case 43:{l(ne.Adjacent),u(1);break}case 46:{c("class",We.Element);break}case 35:{c("id",We.Equals);break}case 91:{u(1);let h,m=null;t.charCodeAt(n)===124?h=i(1):t.startsWith("*|",n)?(m="*",h=i(2)):(h=i(0),t.charCodeAt(n)===124&&t.charCodeAt(n+1)!==61&&(m=h,h=i(1))),u(0);let b=We.Exists;const T=EN.get(t.charCodeAt(n));if(T){if(b=T,t.charCodeAt(n+1)!==61)throw new Error("Expected `=`");u(2)}else t.charCodeAt(n)===61&&(b=We.Equals,u(1));let E="",O=null;if(b!=="exists"){if(Vo(t.charCodeAt(n))){const _=t.charCodeAt(n);let I=n+1;for(;I<t.length&&(t.charCodeAt(I)!==_||a(I));)I+=1;if(t.charCodeAt(I)!==_)throw new Error("Attribute value didn't end");E=Oi(t.slice(n+1,I)),n=I+1}else{const _=n;for(;n<t.length&&(!M0(t.charCodeAt(n))&&t.charCodeAt(n)!==93||a(n));)n+=1;E=Oi(t.slice(_,n))}u(0);const L=t.charCodeAt(n)|32;L===115?(O=!1,u(1)):L===105&&(O=!0,u(1))}if(t.charCodeAt(n)!==93)throw new Error("Attribute selector didn't terminate");n+=1;const w={type:ne.Attribute,name:h,action:b,value:E,namespace:m,ignoreCase:O};r.push(w);break}case 58:{if(t.charCodeAt(n+1)===58){r.push({type:ne.PseudoElement,name:i(2).toLowerCase(),data:t.charCodeAt(n)===40?s():null});continue}const h=i(1).toLowerCase();let m=null;if(t.charCodeAt(n)===40)if(yN.has(h)){if(Vo(t.charCodeAt(n+1)))throw new Error(`Pseudo-selector ${h} cannot be quoted`);if(m=[],n=vg(m,t,n+1),t.charCodeAt(n)!==41)throw new Error(`Missing closing parenthesis in :${h} (${t})`);n+=1}else{if(m=s(),TN.has(h)){const b=m.charCodeAt(0);b===m.charCodeAt(m.length-1)&&Vo(b)&&(m=m.slice(1,-1))}m=Oi(m)}r.push({type:ne.Pseudo,name:h,data:m});break}case 44:{d(),r=[],u(1);break}default:{if(t.startsWith("/*",n)){const b=t.indexOf("*/",n+2);if(b<0)throw new Error("Comment was not terminated");n=b+2,r.length===0&&u(0);break}let h=null,m;if(f===42)n+=1,m="*";else if(f===124){if(m="",t.charCodeAt(n+1)===124){l(ne.ColumnCombinator),u(2);break}}else if(R0.test(t.slice(n)))m=i(0);else break e;t.charCodeAt(n)===124&&t.charCodeAt(n+1)!==124&&(h=m,t.charCodeAt(n+1)===42?(m="*",n+=2):m=i(1)),r.push(m==="*"?{type:ne.Universal,namespace:h}:{type:ne.Tag,name:m,namespace:h})}}}return d(),n}var Jo,B0;function xN(){return B0||(B0=1,Jo={trueFunc:function(){return!0},falseFunc:function(){return!1}}),Jo}var na=xN();const pe=Ta(na),Fg=new Map([[ne.Universal,50],[ne.Tag,30],[ne.Attribute,1],[ne.Pseudo,0]]);function Af(e){return!Fg.has(e.type)}const kN=new Map([[We.Exists,10],[We.Equals,8],[We.Not,7],[We.Start,6],[We.End,6],[We.Any,5]]);function SN(e){const t=e.map(Pg);for(let n=1;n<e.length;n++){const r=t[n];if(!(r<0))for(let i=n-1;i>=0&&r<t[i];i--){const u=e[i+1];e[i+1]=e[i],e[i]=u,t[i+1]=t[i],t[i]=r}}}function Pg(e){var t,n;let r=(t=Fg.get(e.type))!==null&&t!==void 0?t:-1;return e.type===ne.Attribute?(r=(n=kN.get(e.action))!==null&&n!==void 0?n:4,e.action===We.Equals&&e.name==="id"&&(r=9),e.ignoreCase&&(r>>=1)):e.type===ne.Pseudo&&(e.data?e.name==="has"||e.name==="contains"?r=0:Array.isArray(e.data)?(r=Math.min(...e.data.map(i=>Math.min(...i.map(Pg)))),r<0&&(r=0)):r=2:r=3),r}const IN=/[-[\]{}()*+?.,\\^$|#\s]/g;function L0(e){return e.replace(IN,"\\$&")}const wN=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function fr(e,t){return typeof e.ignoreCase=="boolean"?e.ignoreCase:e.ignoreCase==="quirks"?!!t.quirksMode:!t.xmlMode&&wN.has(e.name)}const NN={equals(e,t,n){const{adapter:r}=n,{name:i}=t;let{value:u}=t;return fr(t,n)?(u=u.toLowerCase(),s=>{const a=r.getAttributeValue(s,i);return a!=null&&a.length===u.length&&a.toLowerCase()===u&&e(s)}):s=>r.getAttributeValue(s,i)===u&&e(s)},hyphen(e,t,n){const{adapter:r}=n,{name:i}=t;let{value:u}=t;const s=u.length;return fr(t,n)?(u=u.toLowerCase(),function(o){const l=r.getAttributeValue(o,i);return l!=null&&(l.length===s||l.charAt(s)==="-")&&l.substr(0,s).toLowerCase()===u&&e(o)}):function(o){const l=r.getAttributeValue(o,i);return l!=null&&(l.length===s||l.charAt(s)==="-")&&l.substr(0,s)===u&&e(o)}},element(e,t,n){const{adapter:r}=n,{name:i,value:u}=t;if(/\s/.test(u))return pe.falseFunc;const s=new RegExp(`(?:^|\\s)${L0(u)}(?:$|\\s)`,fr(t,n)?"i":"");return function(o){const l=r.getAttributeValue(o,i);return l!=null&&l.length>=u.length&&s.test(l)&&e(o)}},exists(e,{name:t},{adapter:n}){return r=>n.hasAttrib(r,t)&&e(r)},start(e,t,n){const{adapter:r}=n,{name:i}=t;let{value:u}=t;const s=u.length;return s===0?pe.falseFunc:fr(t,n)?(u=u.toLowerCase(),a=>{const o=r.getAttributeValue(a,i);return o!=null&&o.length>=s&&o.substr(0,s).toLowerCase()===u&&e(a)}):a=>{var o;return!!(!((o=r.getAttributeValue(a,i))===null||o===void 0)&&o.startsWith(u))&&e(a)}},end(e,t,n){const{adapter:r}=n,{name:i}=t;let{value:u}=t;const s=-u.length;return s===0?pe.falseFunc:fr(t,n)?(u=u.toLowerCase(),a=>{var o;return((o=r.getAttributeValue(a,i))===null||o===void 0?void 0:o.substr(s).toLowerCase())===u&&e(a)}):a=>{var o;return!!(!((o=r.getAttributeValue(a,i))===null||o===void 0)&&o.endsWith(u))&&e(a)}},any(e,t,n){const{adapter:r}=n,{name:i,value:u}=t;if(u==="")return pe.falseFunc;if(fr(t,n)){const s=new RegExp(L0(u),"i");return function(o){const l=r.getAttributeValue(o,i);return l!=null&&l.length>=u.length&&s.test(l)&&e(o)}}return s=>{var a;return!!(!((a=r.getAttributeValue(s,i))===null||a===void 0)&&a.includes(u))&&e(s)}},not(e,t,n){const{adapter:r}=n,{name:i}=t;let{value:u}=t;return u===""?s=>!!r.getAttributeValue(s,i)&&e(s):fr(t,n)?(u=u.toLowerCase(),s=>{const a=r.getAttributeValue(s,i);return(a==null||a.length!==u.length||a.toLowerCase()!==u)&&e(s)}):s=>r.getAttributeValue(s,i)!==u&&e(s)}},DN=new Set([9,10,12,13,32]),v0=48,_N=57;function ON(e){if(e=e.trim().toLowerCase(),e==="even")return[2,0];if(e==="odd")return[2,1];let t=0,n=0,r=u(),i=s();if(t<e.length&&e.charAt(t)==="n"&&(t++,n=r*(i??1),a(),t<e.length?(r=u(),a(),i=s()):r=i=0),i===null||t<e.length)throw new Error(`n-th rule couldn't be parsed ('${e}')`);return[n,r*i];function u(){return e.charAt(t)==="-"?(t++,-1):(e.charAt(t)==="+"&&t++,1)}function s(){const o=t;let l=0;for(;t<e.length&&e.charCodeAt(t)>=v0&&e.charCodeAt(t)<=_N;)l=l*10+(e.charCodeAt(t)-v0),t++;return t===o?null:l}function a(){for(;t<e.length&&DN.has(e.charCodeAt(t));)t++}}function RN(e){const t=e[0],n=e[1]-1;if(n<0&&t<=0)return pe.falseFunc;if(t===-1)return u=>u<=n;if(t===0)return u=>u===n;if(t===1)return n<0?pe.trueFunc:u=>u>=n;const r=Math.abs(t),i=(n%r+r)%r;return t>1?u=>u>=n&&u%r===i:u=>u<=n&&u%r===i}function hs(e){return RN(ON(e))}function ps(e,t){return n=>{const r=t.getParent(n);return r!=null&&t.isTag(r)&&e(n)}}const cc={contains(e,t,{adapter:n}){return function(i){return e(i)&&n.getText(i).includes(t)}},icontains(e,t,{adapter:n}){const r=t.toLowerCase();return function(u){return e(u)&&n.getText(u).toLowerCase().includes(r)}},"nth-child"(e,t,{adapter:n,equals:r}){const i=hs(t);return i===pe.falseFunc?pe.falseFunc:i===pe.trueFunc?ps(e,n):function(s){const a=n.getSiblings(s);let o=0;for(let l=0;l<a.length&&!r(s,a[l]);l++)n.isTag(a[l])&&o++;return i(o)&&e(s)}},"nth-last-child"(e,t,{adapter:n,equals:r}){const i=hs(t);return i===pe.falseFunc?pe.falseFunc:i===pe.trueFunc?ps(e,n):function(s){const a=n.getSiblings(s);let o=0;for(let l=a.length-1;l>=0&&!r(s,a[l]);l--)n.isTag(a[l])&&o++;return i(o)&&e(s)}},"nth-of-type"(e,t,{adapter:n,equals:r}){const i=hs(t);return i===pe.falseFunc?pe.falseFunc:i===pe.trueFunc?ps(e,n):function(s){const a=n.getSiblings(s);let o=0;for(let l=0;l<a.length;l++){const c=a[l];if(r(s,c))break;n.isTag(c)&&n.getName(c)===n.getName(s)&&o++}return i(o)&&e(s)}},"nth-last-of-type"(e,t,{adapter:n,equals:r}){const i=hs(t);return i===pe.falseFunc?pe.falseFunc:i===pe.trueFunc?ps(e,n):function(s){const a=n.getSiblings(s);let o=0;for(let l=a.length-1;l>=0;l--){const c=a[l];if(r(s,c))break;n.isTag(c)&&n.getName(c)===n.getName(s)&&o++}return i(o)&&e(s)}},root(e,t,{adapter:n}){return r=>{const i=n.getParent(r);return(i==null||!n.isTag(i))&&e(r)}},scope(e,t,n,r){const{equals:i}=n;return!r||r.length===0?cc.root(e,t,n):r.length===1?u=>i(r[0],u)&&e(u):u=>r.includes(u)&&e(u)},hover:jo("isHovered"),visited:jo("isVisited"),active:jo("isActive")};function jo(e){return function(n,r,{adapter:i}){const u=i[e];return typeof u!="function"?pe.falseFunc:function(a){return u(a)&&n(a)}}}const F0={empty(e,{adapter:t}){return!t.getChildren(e).some(n=>t.isTag(n)||t.getText(n)!=="")},"first-child"(e,{adapter:t,equals:n}){if(t.prevElementSibling)return t.prevElementSibling(e)==null;const r=t.getSiblings(e).find(i=>t.isTag(i));return r!=null&&n(e,r)},"last-child"(e,{adapter:t,equals:n}){const r=t.getSiblings(e);for(let i=r.length-1;i>=0;i--){if(n(e,r[i]))return!0;if(t.isTag(r[i]))break}return!1},"first-of-type"(e,{adapter:t,equals:n}){const r=t.getSiblings(e),i=t.getName(e);for(let u=0;u<r.length;u++){const s=r[u];if(n(e,s))return!0;if(t.isTag(s)&&t.getName(s)===i)break}return!1},"last-of-type"(e,{adapter:t,equals:n}){const r=t.getSiblings(e),i=t.getName(e);for(let u=r.length-1;u>=0;u--){const s=r[u];if(n(e,s))return!0;if(t.isTag(s)&&t.getName(s)===i)break}return!1},"only-of-type"(e,{adapter:t,equals:n}){const r=t.getName(e);return t.getSiblings(e).every(i=>n(e,i)||!t.isTag(i)||t.getName(i)!==r)},"only-child"(e,{adapter:t,equals:n}){return t.getSiblings(e).every(r=>n(e,r)||!t.isTag(r))}};function P0(e,t,n,r){if(n===null){if(e.length>r)throw new Error(`Pseudo-class :${t} requires an argument`)}else if(e.length===r)throw new Error(`Pseudo-class :${t} doesn't have any arguments`)}const MN={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:`:is(
|
|
477
|
+
`;var Lo={exports:{}},be;(function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"})(be||(be={}));function BS(e){return e.type===be.Tag||e.type===be.Script||e.type===be.Style}const LS=be.Root,vS=be.Text,PS=be.Directive,FS=be.Comment,HS=be.Script,US=be.Style,WS=be.Tag,KS=be.CDATA,QS=be.Doctype;class ug{constructor(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}get parentNode(){return this.parent}set parentNode(t){this.parent=t}get previousSibling(){return this.prev}set previousSibling(t){this.prev=t}get nextSibling(){return this.next}set nextSibling(t){this.next=t}cloneNode(t=!1){return hu(this,t)}}class qd extends ug{constructor(t){super(),this.data=t}get nodeValue(){return this.data}set nodeValue(t){this.data=t}}class fu extends qd{constructor(){super(...arguments),this.type=be.Text}get nodeType(){return 3}}class Jd extends qd{constructor(){super(...arguments),this.type=be.Comment}get nodeType(){return 8}}class jd extends qd{constructor(t,n){super(n),this.name=t,this.type=be.Directive}get nodeType(){return 1}}class Zd extends ug{constructor(t){super(),this.children=t}get firstChild(){var t;return(t=this.children[0])!==null&&t!==void 0?t:null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(t){this.children=t}}class sg extends Zd{constructor(){super(...arguments),this.type=be.CDATA}get nodeType(){return 4}}class Dr extends Zd{constructor(){super(...arguments),this.type=be.Root}get nodeType(){return 9}}class Xd extends Zd{constructor(t,n,r=[],i=t==="script"?be.Script:t==="style"?be.Style:be.Tag){super(r),this.name=t,this.attribs=n,this.type=i}get nodeType(){return 1}get tagName(){return this.name}set tagName(t){this.name=t}get attributes(){return Object.keys(this.attribs).map(t=>{var n,r;return{name:t,value:this.attribs[t],namespace:(n=this["x-attribsNamespace"])===null||n===void 0?void 0:n[t],prefix:(r=this["x-attribsPrefix"])===null||r===void 0?void 0:r[t]}})}}function ne(e){return BS(e)}function Na(e){return e.type===be.CDATA}function jt(e){return e.type===be.Text}function Da(e){return e.type===be.Comment}function jl(e){return e.type===be.Directive}function tr(e){return e.type===be.Root}function Oe(e){return Object.prototype.hasOwnProperty.call(e,"children")}function hu(e,t=!1){let n;if(jt(e))n=new fu(e.data);else if(Da(e))n=new Jd(e.data);else if(ne(e)){const r=t?vo(e.children):[],i=new Xd(e.name,{...e.attribs},r);r.forEach(u=>u.parent=i),e.namespace!=null&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]={...e["x-attribsNamespace"]}),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]={...e["x-attribsPrefix"]}),n=i}else if(Na(e)){const r=t?vo(e.children):[],i=new sg(r);r.forEach(u=>u.parent=i),n=i}else if(tr(e)){const r=t?vo(e.children):[],i=new Dr(r);r.forEach(u=>u.parent=i),e["x-mode"]&&(i["x-mode"]=e["x-mode"]),n=i}else if(jl(e)){const r=new jd(e.name,e.data);e["x-name"]!=null&&(r["x-name"]=e["x-name"],r["x-publicId"]=e["x-publicId"],r["x-systemId"]=e["x-systemId"]),n=r}else throw new Error(`Not implemented yet: ${e.type}`);return n.startIndex=e.startIndex,n.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function vo(e){const t=e.map(n=>hu(n,!0));for(let n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}const p0={withStartIndices:!1,withEndIndices:!1,xmlMode:!1};class YS{constructor(t,n,r){this.dom=[],this.root=new Dr(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof n=="function"&&(r=n,n=p0),typeof t=="object"&&(n=t,t=void 0),this.callback=t??null,this.options=n??p0,this.elementCB=r??null}onparserinit(t){this.parser=t}onreset(){this.dom=[],this.root=new Dr(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null}onend(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))}onerror(t){this.handleCallback(t)}onclosetag(){this.lastNode=null;const t=this.tagStack.pop();this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(t)}onopentag(t,n){const r=this.options.xmlMode?be.Tag:void 0,i=new Xd(t,n,void 0,r);this.addNode(i),this.tagStack.push(i)}ontext(t){const{lastNode:n}=this;if(n&&n.type===be.Text)n.data+=t,this.options.withEndIndices&&(n.endIndex=this.parser.endIndex);else{const r=new fu(t);this.addNode(r),this.lastNode=r}}oncomment(t){if(this.lastNode&&this.lastNode.type===be.Comment){this.lastNode.data+=t;return}const n=new Jd(t);this.addNode(n),this.lastNode=n}oncommentend(){this.lastNode=null}oncdatastart(){const t=new fu(""),n=new sg([t]);this.addNode(n),t.parent=n,this.lastNode=t}oncdataend(){this.lastNode=null}onprocessinginstruction(t,n){const r=new jd(t,n);this.addNode(r)}handleCallback(t){if(typeof this.callback=="function")this.callback(t,this.dom);else if(t)throw t}addNode(t){const n=this.tagStack[this.tagStack.length-1],r=n.children[n.children.length-1];this.options.withStartIndices&&(t.startIndex=this.parser.startIndex),this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),n.children.push(t),r&&(t.prev=r,r.next=t),t.parent=n,this.lastNode=null}}const m0=/["&'<>$\x80-\uFFFF]/g,zS=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]),GS=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 ag(e){let t="",n=0,r;for(;(r=m0.exec(e))!==null;){const i=r.index,u=e.charCodeAt(i),s=zS.get(u);s!==void 0?(t+=e.substring(n,i)+s,n=i+1):(t+=`${e.substring(n,i)}&#x${GS(e,i).toString(16)};`,n=m0.lastIndex+=+((u&64512)===55296))}return t+e.substr(n)}function og(e,t){return function(r){let i,u=0,s="";for(;i=e.exec(r);)u!==i.index&&(s+=r.substring(u,i.index)),s+=t.get(i[0].charCodeAt(0)),u=i.index+1;return s+r.substring(u)}}const VS=og(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),qS=og(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]])),JS=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),jS=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),ZS=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function XS(e){return e.replace(/"/g,""")}function $S(e,t){var n;if(!e)return;const r=((n=t.encodeEntities)!==null&&n!==void 0?n:t.decodeEntities)===!1?XS:t.xmlMode||t.encodeEntities!=="utf8"?ag:VS;return Object.keys(e).map(i=>{var u,s;const a=(u=e[i])!==null&&u!==void 0?u:"";return t.xmlMode==="foreign"&&(i=(s=jS.get(i))!==null&&s!==void 0?s:i),!t.emptyAttrs&&!t.xmlMode&&a===""?i:`${i}="${r(a)}"`}).join(" ")}const A0=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function _a(e,t={}){const n="length"in e?e:[e];let r="";for(let i=0;i<n.length;i++)r+=ew(n[i],t);return r}function ew(e,t){switch(e.type){case LS:return _a(e.children,t);case QS:case PS:return iw(e);case FS:return aw(e);case KS:return sw(e);case HS:case US:case WS:return rw(e,t);case vS:return uw(e,t)}}const tw=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),nw=new Set(["svg","math"]);function rw(e,t){var n;t.xmlMode==="foreign"&&(e.name=(n=JS.get(e.name))!==null&&n!==void 0?n:e.name,e.parent&&tw.has(e.parent.name)&&(t={...t,xmlMode:!1})),!t.xmlMode&&nw.has(e.name)&&(t={...t,xmlMode:"foreign"});let r=`<${e.name}`;const i=$S(e.attribs,t);return i&&(r+=` ${i}`),e.children.length===0&&(t.xmlMode?t.selfClosingTags!==!1:t.selfClosingTags&&A0.has(e.name))?(t.xmlMode||(r+=" "),r+="/>"):(r+=">",e.children.length>0&&(r+=_a(e.children,t)),(t.xmlMode||!A0.has(e.name))&&(r+=`</${e.name}>`)),r}function iw(e){return`<${e.data}>`}function uw(e,t){var n;let r=e.data||"";return((n=t.encodeEntities)!==null&&n!==void 0?n:t.decodeEntities)!==!1&&!(!t.xmlMode&&e.parent&&ZS.has(e.parent.name))&&(r=t.xmlMode||t.encodeEntities!=="utf8"?ag(r):qS(r)),r}function sw(e){return`<![CDATA[${e.children[0].data}]]>`}function aw(e){return`<!--${e.data}-->`}function lg(e,t){return _a(e,t)}function ow(e,t){return Oe(e)?e.children.map(n=>lg(n,t)).join(""):""}function Ss(e){return Array.isArray(e)?e.map(Ss).join(""):ne(e)?e.name==="br"?`
|
|
478
|
+
`:Ss(e.children):Na(e)?Ss(e.children):jt(e)?e.data:""}function si(e){return Array.isArray(e)?e.map(si).join(""):Oe(e)&&!Da(e)?si(e.children):jt(e)?e.data:""}function Ys(e){return Array.isArray(e)?e.map(Ys).join(""):Oe(e)&&(e.type===be.Tag||Na(e))?Ys(e.children):jt(e)?e.data:""}function Oa(e){return Oe(e)?e.children:[]}function cg(e){return e.parent||null}function dg(e){const t=cg(e);if(t!=null)return Oa(t);const n=[e];let{prev:r,next:i}=e;for(;r!=null;)n.unshift(r),{prev:r}=r;for(;i!=null;)n.push(i),{next:i}=i;return n}function lw(e,t){var n;return(n=e.attribs)===null||n===void 0?void 0:n[t]}function cw(e,t){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&e.attribs[t]!=null}function dw(e){return e.name}function $d(e){let{next:t}=e;for(;t!==null&&!ne(t);)({next:t}=t);return t}function ef(e){let{prev:t}=e;for(;t!==null&&!ne(t);)({prev:t}=t);return t}function Br(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){const t=e.parent.children,n=t.lastIndexOf(e);n>=0&&t.splice(n,1)}e.next=null,e.prev=null,e.parent=null}function fw(e,t){const n=t.prev=e.prev;n&&(n.next=t);const r=t.next=e.next;r&&(r.prev=t);const i=t.parent=e.parent;if(i){const u=i.children;u[u.lastIndexOf(e)]=t,e.parent=null}}function hw(e,t){if(Br(t),t.next=null,t.parent=e,e.children.push(t)>1){const n=e.children[e.children.length-2];n.next=t,t.prev=n}else t.prev=null}function pw(e,t){Br(t);const{parent:n}=e,r=e.next;if(t.next=r,t.prev=e,e.next=t,t.parent=n,r){if(r.prev=t,n){const i=n.children;i.splice(i.lastIndexOf(r),0,t)}}else n&&n.children.push(t)}function mw(e,t){if(Br(t),t.parent=e,t.prev=null,e.children.unshift(t)!==1){const n=e.children[1];n.prev=t,t.next=n}else t.next=null}function Aw(e,t){Br(t);const{parent:n}=e;if(n){const r=n.children;r.splice(r.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=n,t.prev=e.prev,t.next=e,e.prev=t}function Ku(e,t,n=!0,r=1/0){return tf(e,Array.isArray(t)?t:[t],n,r)}function tf(e,t,n,r){const i=[],u=[Array.isArray(t)?t:[t]],s=[0];for(;;){if(s[0]>=u[0].length){if(s.length===1)return i;u.shift(),s.shift();continue}const a=u[0][s[0]++];if(e(a)&&(i.push(a),--r<=0))return i;n&&Oe(a)&&a.children.length>0&&(s.unshift(0),u.unshift(a.children))}}function gw(e,t){return t.find(e)}function nf(e,t,n=!0){const r=Array.isArray(t)?t:[t];for(let i=0;i<r.length;i++){const u=r[i];if(ne(u)&&e(u))return u;if(n&&Oe(u)&&u.children.length>0){const s=nf(e,u.children,!0);if(s)return s}}return null}function fg(e,t){return(Array.isArray(t)?t:[t]).some(n=>ne(n)&&e(n)||Oe(n)&&fg(e,n.children))}function bw(e,t){const n=[],r=[Array.isArray(t)?t:[t]],i=[0];for(;;){if(i[0]>=r[0].length){if(r.length===1)return n;r.shift(),i.shift();continue}const u=r[0][i[0]++];ne(u)&&e(u)&&n.push(u),Oe(u)&&u.children.length>0&&(i.unshift(0),r.unshift(u.children))}}const zs={tag_name(e){return typeof e=="function"?t=>ne(t)&&e(t.name):e==="*"?ne:t=>ne(t)&&t.name===e},tag_type(e){return typeof e=="function"?t=>e(t.type):t=>t.type===e},tag_contains(e){return typeof e=="function"?t=>jt(t)&&e(t.data):t=>jt(t)&&t.data===e}};function rf(e,t){return typeof t=="function"?n=>ne(n)&&t(n.attribs[e]):n=>ne(n)&&n.attribs[e]===t}function Ew(e,t){return n=>e(n)||t(n)}function hg(e){const t=Object.keys(e).map(n=>{const r=e[n];return Object.prototype.hasOwnProperty.call(zs,n)?zs[n](r):rf(n,r)});return t.length===0?null:t.reduce(Ew)}function yw(e,t){const n=hg(e);return n?n(t):!0}function Tw(e,t,n,r=1/0){const i=hg(e);return i?Ku(i,t,n,r):[]}function Cw(e,t,n=!0){return Array.isArray(t)||(t=[t]),nf(rf("id",e),t,n)}function Ai(e,t,n=!0,r=1/0){return Ku(zs.tag_name(e),t,n,r)}function xw(e,t,n=!0,r=1/0){return Ku(rf("class",e),t,n,r)}function kw(e,t,n=!0,r=1/0){return Ku(zs.tag_type(e),t,n,r)}function Iw(e){let t=e.length;for(;--t>=0;){const n=e[t];if(t>0&&e.lastIndexOf(n,t-1)>=0){e.splice(t,1);continue}for(let r=n.parent;r;r=r.parent)if(e.includes(r)){e.splice(t,1);break}}return e}var Nt;(function(e){e[e.DISCONNECTED=1]="DISCONNECTED",e[e.PRECEDING=2]="PRECEDING",e[e.FOLLOWING=4]="FOLLOWING",e[e.CONTAINS=8]="CONTAINS",e[e.CONTAINED_BY=16]="CONTAINED_BY"})(Nt||(Nt={}));function pg(e,t){const n=[],r=[];if(e===t)return 0;let i=Oe(e)?e:e.parent;for(;i;)n.unshift(i),i=i.parent;for(i=Oe(t)?t:t.parent;i;)r.unshift(i),i=i.parent;const u=Math.min(n.length,r.length);let s=0;for(;s<u&&n[s]===r[s];)s++;if(s===0)return Nt.DISCONNECTED;const a=n[s-1],o=a.children,l=n[s],c=r[s];return o.indexOf(l)>o.indexOf(c)?a===t?Nt.FOLLOWING|Nt.CONTAINED_BY:Nt.FOLLOWING:a===e?Nt.PRECEDING|Nt.CONTAINS:Nt.PRECEDING}function gi(e){return e=e.filter((t,n,r)=>!r.includes(t,n+1)),e.sort((t,n)=>{const r=pg(t,n);return r&Nt.PRECEDING?-1:r&Nt.FOLLOWING?1:0}),e}function Sw(e){const t=Gs(Ow,e);return t?t.name==="feed"?ww(t):Nw(t):null}function ww(e){var t;const n=e.children,r={type:"atom",items:Ai("entry",n).map(s=>{var a;const{children:o}=s,l={media:mg(o)};lt(l,"id","id",o),lt(l,"title","title",o);const c=(a=Gs("link",o))===null||a===void 0?void 0:a.attribs.href;c&&(l.link=c);const d=Wn("summary",o)||Wn("content",o);d&&(l.description=d);const f=Wn("updated",o);return f&&(l.pubDate=new Date(f)),l})};lt(r,"id","id",n),lt(r,"title","title",n);const i=(t=Gs("link",n))===null||t===void 0?void 0:t.attribs.href;i&&(r.link=i),lt(r,"description","subtitle",n);const u=Wn("updated",n);return u&&(r.updated=new Date(u)),lt(r,"author","email",n,!0),r}function Nw(e){var t,n;const r=(n=(t=Gs("channel",e.children))===null||t===void 0?void 0:t.children)!==null&&n!==void 0?n:[],i={type:e.name.substr(0,3),id:"",items:Ai("item",e.children).map(s=>{const{children:a}=s,o={media:mg(a)};lt(o,"id","guid",a),lt(o,"title","title",a),lt(o,"link","link",a),lt(o,"description","description",a);const l=Wn("pubDate",a)||Wn("dc:date",a);return l&&(o.pubDate=new Date(l)),o})};lt(i,"title","title",r),lt(i,"link","link",r),lt(i,"description","description",r);const u=Wn("lastBuildDate",r);return u&&(i.updated=new Date(u)),lt(i,"author","managingEditor",r,!0),i}const Dw=["url","type","lang"],_w=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function mg(e){return Ai("media:content",e).map(t=>{const{attribs:n}=t,r={medium:n.medium,isDefault:!!n.isDefault};for(const i of Dw)n[i]&&(r[i]=n[i]);for(const i of _w)n[i]&&(r[i]=parseInt(n[i],10));return n.expression&&(r.expression=n.expression),r})}function Gs(e,t){return Ai(e,t,!0,1)[0]}function Wn(e,t,n=!1){return si(Ai(e,t,n,1)).trim()}function lt(e,t,n,r,i=!1){const u=Wn(n,r,i);u&&(e[t]=u)}function Ow(e){return e==="rss"||e==="feed"||e==="rdf:RDF"}const Ra=Object.freeze(Object.defineProperty({__proto__:null,get DocumentPosition(){return Nt},append:pw,appendChild:hw,compareDocumentPosition:pg,existsOne:fg,filter:Ku,find:tf,findAll:bw,findOne:nf,findOneChild:gw,getAttributeValue:lw,getChildren:Oa,getElementById:Cw,getElements:Tw,getElementsByClassName:xw,getElementsByTagName:Ai,getElementsByTagType:kw,getFeed:Sw,getInnerHTML:ow,getName:dw,getOuterHTML:lg,getParent:cg,getSiblings:dg,getText:Ss,hasAttrib:cw,hasChildren:Oe,innerText:Ys,isCDATA:Na,isComment:Da,isDocument:tr,isTag:ne,isText:jt,nextElementSibling:$d,prepend:Aw,prependChild:mw,prevElementSibling:ef,removeElement:Br,removeSubsets:Iw,replaceElement:fw,testElement:yw,textContent:si,uniqueSort:gi},Symbol.toStringTag,{value:"Module"})),Rw={_useHtmlParser2:!1};function Zl(e,t){if(!e)return t??Rw;const n={_useHtmlParser2:!!e.xmlMode,...t,...e};return e.xml?(n._useHtmlParser2=!0,n.xmlMode=!0,e.xml!==!0&&Object.assign(n,e.xml)):e.xmlMode&&(n._useHtmlParser2=!0),n}function Ag(e,t,n){return e?e(t??e._root.children,null,void 0,n).toString():""}function Mw(e,t){return typeof e=="object"&&e!=null&&!("length"in e)&&!("type"in e)}function Bw(e,t){const n=Mw(e)?(t=e,void 0):e,r={...this===null||this===void 0?void 0:this._options,...Zl(t)};return Ag(this,n,r)}function Lw(e){const t={...this._options,xmlMode:!0};return Ag(this,e,t)}function pu(e){const t=e??(this?this.root():[]);let n="";for(let r=0;r<t.length;r++)n+=si(t[r]);return n}function vw(e,t,n=typeof t=="boolean"?t:!1){if(!e||typeof e!="string")return null;typeof t=="boolean"&&(n=t);const r=this.load(e,this._options,!1);return n||r("script").remove(),[...r.root()[0].children]}function Pw(){return this(this._root)}function uf(e,t){if(t===e)return!1;let n=t;for(;n&&n!==n.parent;)if(n=n.parent,n===e)return!0;return!1}function Fw(e){return this.root().extract(e)}function gg(e,t){if(!g0(e)||!g0(t))return;let n=e.length;const r=+t.length;for(let i=0;i<r;i++)e[n++]=t[i];return e.length=n,e}function g0(e){if(Array.isArray(e))return!0;if(typeof e!="object"||e===null||!("length"in e)||typeof e.length!="number"||e.length<0)return!1;for(let t=0;t<e.length;t++)if(!(t in e))return!1;return!0}const Hw=Object.freeze(Object.defineProperty({__proto__:null,contains:uf,extract:Fw,html:Bw,merge:gg,parseHTML:vw,root:Pw,text:pu,xml:Lw},Symbol.toStringTag,{value:"Module"}));function In(e){return e.cheerio!=null}function Uw(e){return e.replace(/[._-](\w|$)/g,(t,n)=>n.toUpperCase())}function Ww(e){return e.replace(/[A-Z]/g,"-$&").toLowerCase()}function De(e,t){const n=e.length;for(let r=0;r<n;r++)t(e[r],r);return e}var or;(function(e){e[e.LowerA=97]="LowerA",e[e.LowerZ=122]="LowerZ",e[e.UpperA=65]="UpperA",e[e.UpperZ=90]="UpperZ",e[e.Exclamation=33]="Exclamation"})(or||(or={}));function Xl(e){const t=e.indexOf("<");if(t<0||t>e.length-3)return!1;const n=e.charCodeAt(t+1);return(n>=or.LowerA&&n<=or.LowerZ||n>=or.UpperA&&n<=or.UpperZ||n===or.Exclamation)&&e.includes(">",t+2)}const mu=Object.prototype.hasOwnProperty,Au=/\s+/,$l="data-",sf=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,Kw=/^{[^]*}$|^\[[^]*]$/;function Vs(e,t,n){var r;if(!(!e||!ne(e))){if((r=e.attribs)!==null&&r!==void 0||(e.attribs={}),!t)return e.attribs;if(mu.call(e.attribs,t))return!n&&sf.test(t)?t:e.attribs[t];if(e.name==="option"&&t==="value")return pu(e.children);if(e.name==="input"&&(e.attribs.type==="radio"||e.attribs.type==="checkbox")&&t==="value")return"on"}}function Zr(e,t,n){n===null?Eg(e,t):e.attribs[t]=`${n}`}function Qw(e,t){if(typeof e=="object"||t!==void 0){if(typeof t=="function"){if(typeof e!="string")throw new Error("Bad combination of arguments.");return De(this,(n,r)=>{ne(n)&&Zr(n,e,t.call(n,r,n.attribs[e]))})}return De(this,n=>{if(ne(n))if(typeof e=="object")for(const r of Object.keys(e)){const i=e[r];Zr(n,r,i)}else Zr(n,e,t)})}return arguments.length>1?this:Vs(this[0],e,this.options.xmlMode)}function b0(e,t,n){return t in e?e[t]:!n&&sf.test(t)?Vs(e,t,!1)!==void 0:Vs(e,t,n)}function Po(e,t,n,r){t in e?e[t]=n:Zr(e,t,!r&&sf.test(t)?n?"":null:`${n}`)}function Yw(e,t){var n;if(typeof e=="string"&&t===void 0){const r=this[0];if(!r||!ne(r))return;switch(e){case"style":{const i=this.css(),u=Object.keys(i);for(let s=0;s<u.length;s++)i[s]=u[s];return i.length=u.length,i}case"tagName":case"nodeName":return r.name.toUpperCase();case"href":case"src":{const i=(n=r.attribs)===null||n===void 0?void 0:n[e];return typeof URL<"u"&&(e==="href"&&(r.tagName==="a"||r.tagName==="link")||e==="src"&&(r.tagName==="img"||r.tagName==="iframe"||r.tagName==="audio"||r.tagName==="video"||r.tagName==="source"))&&i!==void 0&&this.options.baseURI?new URL(i,this.options.baseURI).href:i}case"innerText":return Ys(r);case"textContent":return si(r);case"outerHTML":return this.clone().wrap("<container />").parent().html();case"innerHTML":return this.html();default:return b0(r,e,this.options.xmlMode)}}if(typeof e=="object"||t!==void 0){if(typeof t=="function"){if(typeof e=="object")throw new TypeError("Bad combination of arguments.");return De(this,(r,i)=>{ne(r)&&Po(r,e,t.call(r,i,b0(r,e,this.options.xmlMode)),this.options.xmlMode)})}return De(this,r=>{if(ne(r))if(typeof e=="object")for(const i of Object.keys(e)){const u=e[i];Po(r,i,u,this.options.xmlMode)}else Po(r,e,t,this.options.xmlMode)})}}function E0(e,t,n){var r;(r=e.data)!==null&&r!==void 0||(e.data={}),typeof t=="object"?Object.assign(e.data,t):typeof t=="string"&&n!==void 0&&(e.data[t]=n)}function zw(e){for(const t of Object.keys(e.attribs)){if(!t.startsWith($l))continue;const n=Uw(t.slice($l.length));mu.call(e.data,n)||(e.data[n]=bg(e.attribs[t]))}return e.data}function Gw(e,t){const n=$l+Ww(t),r=e.data;if(mu.call(r,t))return r[t];if(mu.call(e.attribs,n))return r[t]=bg(e.attribs[n])}function bg(e){if(e==="null")return null;if(e==="true")return!0;if(e==="false")return!1;const t=Number(e);if(e===String(t))return t;if(Kw.test(e))try{return JSON.parse(e)}catch{}return e}function Vw(e,t){var n;const r=this[0];if(!r||!ne(r))return;const i=r;return(n=i.data)!==null&&n!==void 0||(i.data={}),e==null?zw(i):typeof e=="object"||t!==void 0?(De(this,u=>{ne(u)&&(typeof e=="object"?E0(u,e):E0(u,e,t))}),this):Gw(i,e)}function qw(e){const t=arguments.length===0,n=this[0];if(!n||!ne(n))return t?void 0:this;switch(n.name){case"textarea":return this.text(e);case"select":{const r=this.find("option:selected");if(!t){if(this.attr("multiple")==null&&typeof e=="object")return this;this.find("option").removeAttr("selected");const i=typeof e=="object"?e:[e];for(const u of i)this.find(`option[value="${u}"]`).attr("selected","");return this}return this.attr("multiple")?r.toArray().map(i=>pu(i.children)):r.attr("value")}case"input":case"option":return t?this.attr("value"):this.attr("value",e)}}function Eg(e,t){!e.attribs||!mu.call(e.attribs,t)||delete e.attribs[t]}function qs(e){return e?e.trim().split(Au):[]}function Jw(e){const t=qs(e);for(const n of t)De(this,r=>{ne(r)&&Eg(r,n)});return this}function jw(e){return this.toArray().some(t=>{const n=ne(t)&&t.attribs.class;let r=-1;if(n&&e.length>0)for(;(r=n.indexOf(e,r+1))>-1;){const i=r+e.length;if((r===0||Au.test(n[r-1]))&&(i===n.length||Au.test(n[i])))return!0}return!1})}function yg(e){if(typeof e=="function")return De(this,(r,i)=>{if(ne(r)){const u=r.attribs.class||"";yg.call([r],e.call(r,i,u))}});if(!e||typeof e!="string")return this;const t=e.split(Au),n=this.length;for(let r=0;r<n;r++){const i=this[r];if(!ne(i))continue;const u=Vs(i,"class",!1);if(u){let s=` ${u} `;for(const a of t){const o=`${a} `;s.includes(` ${o}`)||(s+=o)}Zr(i,"class",s.trim())}else Zr(i,"class",t.join(" ").trim())}return this}function Tg(e){if(typeof e=="function")return De(this,(i,u)=>{ne(i)&&Tg.call([i],e.call(i,u,i.attribs.class||""))});const t=qs(e),n=t.length,r=arguments.length===0;return De(this,i=>{if(ne(i))if(r)i.attribs.class="";else{const u=qs(i.attribs.class);let s=!1;for(let a=0;a<n;a++){const o=u.indexOf(t[a]);o>=0&&(u.splice(o,1),s=!0,a--)}s&&(i.attribs.class=u.join(" "))}})}function Cg(e,t){if(typeof e=="function")return De(this,(s,a)=>{ne(s)&&Cg.call([s],e.call(s,a,s.attribs.class||"",t),t)});if(!e||typeof e!="string")return this;const n=e.split(Au),r=n.length,i=typeof t=="boolean"?t?1:-1:0,u=this.length;for(let s=0;s<u;s++){const a=this[s];if(!ne(a))continue;const o=qs(a.attribs.class);for(let l=0;l<r;l++){const c=o.indexOf(n[l]);i>=0&&c<0?o.push(n[l]):i<=0&&c>=0&&o.splice(c,1)}a.attribs.class=o.join(" ")}return this}const Zw=Object.freeze(Object.defineProperty({__proto__:null,addClass:yg,attr:Qw,data:Vw,hasClass:jw,prop:Yw,removeAttr:Jw,removeClass:Tg,toggleClass:Cg,val:qw},Symbol.toStringTag,{value:"Module"}));var Z;(function(e){e.Attribute="attribute",e.Pseudo="pseudo",e.PseudoElement="pseudo-element",e.Tag="tag",e.Universal="universal",e.Adjacent="adjacent",e.Child="child",e.Descendant="descendant",e.Parent="parent",e.Sibling="sibling",e.ColumnCombinator="column-combinator"})(Z||(Z={}));var Pe;(function(e){e.Any="any",e.Element="element",e.End="end",e.Equals="equals",e.Exists="exists",e.Hyphen="hyphen",e.Not="not",e.Start="start"})(Pe||(Pe={}));const y0=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,Xw=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,$w=new Map([[126,Pe.Element],[94,Pe.Start],[36,Pe.End],[42,Pe.Any],[33,Pe.Not],[124,Pe.Hyphen]]),eN=new Set(["has","not","matches","is","where","host","host-context"]);function ji(e){switch(e.type){case Z.Adjacent:case Z.Child:case Z.Descendant:case Z.Parent:case Z.Sibling:case Z.ColumnCombinator:return!0;default:return!1}}const tN=new Set(["contains","icontains"]);function nN(e,t,n){const r=parseInt(t,16)-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,r&1023|56320)}function Ii(e){return e.replace(Xw,nN)}function Fo(e){return e===39||e===34}function T0(e){return e===32||e===9||e===10||e===12||e===13}function Ma(e){const t=[],n=xg(t,`${e}`,0);if(n<e.length)throw new Error(`Unmatched selector: ${e.slice(n)}`);return t}function xg(e,t,n){let r=[];function i(f){const p=t.slice(n+f).match(y0);if(!p)throw new Error(`Expected name, found ${t.slice(n)}`);const[m]=p;return n+=f+m.length,Ii(m)}function u(f){for(n+=f;n<t.length&&T0(t.charCodeAt(n));)n++}function s(){n+=1;const f=n;let p=1;for(;p>0&&n<t.length;n++)t.charCodeAt(n)===40&&!a(n)?p++:t.charCodeAt(n)===41&&!a(n)&&p--;if(p)throw new Error("Parenthesis not matched");return Ii(t.slice(f,n-1))}function a(f){let p=0;for(;t.charCodeAt(--f)===92;)p++;return(p&1)===1}function o(){if(r.length>0&&ji(r[r.length-1]))throw new Error("Did not expect successive traversals.")}function l(f){if(r.length>0&&r[r.length-1].type===Z.Descendant){r[r.length-1].type=f;return}o(),r.push({type:f})}function c(f,p){r.push({type:Z.Attribute,name:f,action:p,value:i(1),namespace:null,ignoreCase:"quirks"})}function d(){if(r.length&&r[r.length-1].type===Z.Descendant&&r.pop(),r.length===0)throw new Error("Empty sub-selector");e.push(r)}if(u(0),t.length===n)return n;e:for(;n<t.length;){const f=t.charCodeAt(n);switch(f){case 32:case 9:case 10:case 12:case 13:{(r.length===0||r[0].type!==Z.Descendant)&&(o(),r.push({type:Z.Descendant})),u(1);break}case 62:{l(Z.Child),u(1);break}case 60:{l(Z.Parent),u(1);break}case 126:{l(Z.Sibling),u(1);break}case 43:{l(Z.Adjacent),u(1);break}case 46:{c("class",Pe.Element);break}case 35:{c("id",Pe.Equals);break}case 91:{u(1);let p,m=null;t.charCodeAt(n)===124?p=i(1):t.startsWith("*|",n)?(m="*",p=i(2)):(p=i(0),t.charCodeAt(n)===124&&t.charCodeAt(n+1)!==61&&(m=p,p=i(1))),u(0);let A=Pe.Exists;const E=$w.get(t.charCodeAt(n));if(E){if(A=E,t.charCodeAt(n+1)!==61)throw new Error("Expected `=`");u(2)}else t.charCodeAt(n)===61&&(A=Pe.Equals,u(1));let g="",N=null;if(A!=="exists"){if(Fo(t.charCodeAt(n))){const w=t.charCodeAt(n);let k=n+1;for(;k<t.length&&(t.charCodeAt(k)!==w||a(k));)k+=1;if(t.charCodeAt(k)!==w)throw new Error("Attribute value didn't end");g=Ii(t.slice(n+1,k)),n=k+1}else{const w=n;for(;n<t.length&&(!T0(t.charCodeAt(n))&&t.charCodeAt(n)!==93||a(n));)n+=1;g=Ii(t.slice(w,n))}u(0);const R=t.charCodeAt(n)|32;R===115?(N=!1,u(1)):R===105&&(N=!0,u(1))}if(t.charCodeAt(n)!==93)throw new Error("Attribute selector didn't terminate");n+=1;const I={type:Z.Attribute,name:p,action:A,value:g,namespace:m,ignoreCase:N};r.push(I);break}case 58:{if(t.charCodeAt(n+1)===58){r.push({type:Z.PseudoElement,name:i(2).toLowerCase(),data:t.charCodeAt(n)===40?s():null});continue}const p=i(1).toLowerCase();let m=null;if(t.charCodeAt(n)===40)if(eN.has(p)){if(Fo(t.charCodeAt(n+1)))throw new Error(`Pseudo-selector ${p} cannot be quoted`);if(m=[],n=xg(m,t,n+1),t.charCodeAt(n)!==41)throw new Error(`Missing closing parenthesis in :${p} (${t})`);n+=1}else{if(m=s(),tN.has(p)){const A=m.charCodeAt(0);A===m.charCodeAt(m.length-1)&&Fo(A)&&(m=m.slice(1,-1))}m=Ii(m)}r.push({type:Z.Pseudo,name:p,data:m});break}case 44:{d(),r=[],u(1);break}default:{if(t.startsWith("/*",n)){const A=t.indexOf("*/",n+2);if(A<0)throw new Error("Comment was not terminated");n=A+2,r.length===0&&u(0);break}let p=null,m;if(f===42)n+=1,m="*";else if(f===124){if(m="",t.charCodeAt(n+1)===124){l(Z.ColumnCombinator),u(2);break}}else if(y0.test(t.slice(n)))m=i(0);else break e;t.charCodeAt(n)===124&&t.charCodeAt(n+1)!==124&&(p=m,t.charCodeAt(n+1)===42?(m="*",n+=2):m=i(1)),r.push(m==="*"?{type:Z.Universal,namespace:p}:{type:Z.Tag,name:m,namespace:p})}}}return d(),n}var Ho,C0;function rN(){return C0||(C0=1,Ho={trueFunc:function(){return!0},falseFunc:function(){return!1}}),Ho}var Js=rN();const ce=bc(Js),kg=new Map([[Z.Universal,50],[Z.Tag,30],[Z.Attribute,1],[Z.Pseudo,0]]);function af(e){return!kg.has(e.type)}const iN=new Map([[Pe.Exists,10],[Pe.Equals,8],[Pe.Not,7],[Pe.Start,6],[Pe.End,6],[Pe.Any,5]]);function uN(e){const t=e.map(Ig);for(let n=1;n<e.length;n++){const r=t[n];if(!(r<0))for(let i=n-1;i>=0&&r<t[i];i--){const u=e[i+1];e[i+1]=e[i],e[i]=u,t[i+1]=t[i],t[i]=r}}}function Ig(e){var t,n;let r=(t=kg.get(e.type))!==null&&t!==void 0?t:-1;return e.type===Z.Attribute?(r=(n=iN.get(e.action))!==null&&n!==void 0?n:4,e.action===Pe.Equals&&e.name==="id"&&(r=9),e.ignoreCase&&(r>>=1)):e.type===Z.Pseudo&&(e.data?e.name==="has"||e.name==="contains"?r=0:Array.isArray(e.data)?(r=Math.min(...e.data.map(i=>Math.min(...i.map(Ig)))),r<0&&(r=0)):r=2:r=3),r}const sN=/[-[\]{}()*+?.,\\^$|#\s]/g;function x0(e){return e.replace(sN,"\\$&")}const aN=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function sr(e,t){return typeof e.ignoreCase=="boolean"?e.ignoreCase:e.ignoreCase==="quirks"?!!t.quirksMode:!t.xmlMode&&aN.has(e.name)}const oN={equals(e,t,n){const{adapter:r}=n,{name:i}=t;let{value:u}=t;return sr(t,n)?(u=u.toLowerCase(),s=>{const a=r.getAttributeValue(s,i);return a!=null&&a.length===u.length&&a.toLowerCase()===u&&e(s)}):s=>r.getAttributeValue(s,i)===u&&e(s)},hyphen(e,t,n){const{adapter:r}=n,{name:i}=t;let{value:u}=t;const s=u.length;return sr(t,n)?(u=u.toLowerCase(),function(o){const l=r.getAttributeValue(o,i);return l!=null&&(l.length===s||l.charAt(s)==="-")&&l.substr(0,s).toLowerCase()===u&&e(o)}):function(o){const l=r.getAttributeValue(o,i);return l!=null&&(l.length===s||l.charAt(s)==="-")&&l.substr(0,s)===u&&e(o)}},element(e,t,n){const{adapter:r}=n,{name:i,value:u}=t;if(/\s/.test(u))return ce.falseFunc;const s=new RegExp(`(?:^|\\s)${x0(u)}(?:$|\\s)`,sr(t,n)?"i":"");return function(o){const l=r.getAttributeValue(o,i);return l!=null&&l.length>=u.length&&s.test(l)&&e(o)}},exists(e,{name:t},{adapter:n}){return r=>n.hasAttrib(r,t)&&e(r)},start(e,t,n){const{adapter:r}=n,{name:i}=t;let{value:u}=t;const s=u.length;return s===0?ce.falseFunc:sr(t,n)?(u=u.toLowerCase(),a=>{const o=r.getAttributeValue(a,i);return o!=null&&o.length>=s&&o.substr(0,s).toLowerCase()===u&&e(a)}):a=>{var o;return!!(!((o=r.getAttributeValue(a,i))===null||o===void 0)&&o.startsWith(u))&&e(a)}},end(e,t,n){const{adapter:r}=n,{name:i}=t;let{value:u}=t;const s=-u.length;return s===0?ce.falseFunc:sr(t,n)?(u=u.toLowerCase(),a=>{var o;return((o=r.getAttributeValue(a,i))===null||o===void 0?void 0:o.substr(s).toLowerCase())===u&&e(a)}):a=>{var o;return!!(!((o=r.getAttributeValue(a,i))===null||o===void 0)&&o.endsWith(u))&&e(a)}},any(e,t,n){const{adapter:r}=n,{name:i,value:u}=t;if(u==="")return ce.falseFunc;if(sr(t,n)){const s=new RegExp(x0(u),"i");return function(o){const l=r.getAttributeValue(o,i);return l!=null&&l.length>=u.length&&s.test(l)&&e(o)}}return s=>{var a;return!!(!((a=r.getAttributeValue(s,i))===null||a===void 0)&&a.includes(u))&&e(s)}},not(e,t,n){const{adapter:r}=n,{name:i}=t;let{value:u}=t;return u===""?s=>!!r.getAttributeValue(s,i)&&e(s):sr(t,n)?(u=u.toLowerCase(),s=>{const a=r.getAttributeValue(s,i);return(a==null||a.length!==u.length||a.toLowerCase()!==u)&&e(s)}):s=>r.getAttributeValue(s,i)!==u&&e(s)}},lN=new Set([9,10,12,13,32]),k0=48,cN=57;function dN(e){if(e=e.trim().toLowerCase(),e==="even")return[2,0];if(e==="odd")return[2,1];let t=0,n=0,r=u(),i=s();if(t<e.length&&e.charAt(t)==="n"&&(t++,n=r*(i??1),a(),t<e.length?(r=u(),a(),i=s()):r=i=0),i===null||t<e.length)throw new Error(`n-th rule couldn't be parsed ('${e}')`);return[n,r*i];function u(){return e.charAt(t)==="-"?(t++,-1):(e.charAt(t)==="+"&&t++,1)}function s(){const o=t;let l=0;for(;t<e.length&&e.charCodeAt(t)>=k0&&e.charCodeAt(t)<=cN;)l=l*10+(e.charCodeAt(t)-k0),t++;return t===o?null:l}function a(){for(;t<e.length&&lN.has(e.charCodeAt(t));)t++}}function fN(e){const t=e[0],n=e[1]-1;if(n<0&&t<=0)return ce.falseFunc;if(t===-1)return u=>u<=n;if(t===0)return u=>u===n;if(t===1)return n<0?ce.trueFunc:u=>u>=n;const r=Math.abs(t),i=(n%r+r)%r;return t>1?u=>u>=n&&u%r===i:u=>u<=n&&u%r===i}function us(e){return fN(dN(e))}function ss(e,t){return n=>{const r=t.getParent(n);return r!=null&&t.isTag(r)&&e(n)}}const ec={contains(e,t,{adapter:n}){return function(i){return e(i)&&n.getText(i).includes(t)}},icontains(e,t,{adapter:n}){const r=t.toLowerCase();return function(u){return e(u)&&n.getText(u).toLowerCase().includes(r)}},"nth-child"(e,t,{adapter:n,equals:r}){const i=us(t);return i===ce.falseFunc?ce.falseFunc:i===ce.trueFunc?ss(e,n):function(s){const a=n.getSiblings(s);let o=0;for(let l=0;l<a.length&&!r(s,a[l]);l++)n.isTag(a[l])&&o++;return i(o)&&e(s)}},"nth-last-child"(e,t,{adapter:n,equals:r}){const i=us(t);return i===ce.falseFunc?ce.falseFunc:i===ce.trueFunc?ss(e,n):function(s){const a=n.getSiblings(s);let o=0;for(let l=a.length-1;l>=0&&!r(s,a[l]);l--)n.isTag(a[l])&&o++;return i(o)&&e(s)}},"nth-of-type"(e,t,{adapter:n,equals:r}){const i=us(t);return i===ce.falseFunc?ce.falseFunc:i===ce.trueFunc?ss(e,n):function(s){const a=n.getSiblings(s);let o=0;for(let l=0;l<a.length;l++){const c=a[l];if(r(s,c))break;n.isTag(c)&&n.getName(c)===n.getName(s)&&o++}return i(o)&&e(s)}},"nth-last-of-type"(e,t,{adapter:n,equals:r}){const i=us(t);return i===ce.falseFunc?ce.falseFunc:i===ce.trueFunc?ss(e,n):function(s){const a=n.getSiblings(s);let o=0;for(let l=a.length-1;l>=0;l--){const c=a[l];if(r(s,c))break;n.isTag(c)&&n.getName(c)===n.getName(s)&&o++}return i(o)&&e(s)}},root(e,t,{adapter:n}){return r=>{const i=n.getParent(r);return(i==null||!n.isTag(i))&&e(r)}},scope(e,t,n,r){const{equals:i}=n;return!r||r.length===0?ec.root(e,t,n):r.length===1?u=>i(r[0],u)&&e(u):u=>r.includes(u)&&e(u)},hover:Uo("isHovered"),visited:Uo("isVisited"),active:Uo("isActive")};function Uo(e){return function(n,r,{adapter:i}){const u=i[e];return typeof u!="function"?ce.falseFunc:function(a){return u(a)&&n(a)}}}const I0={empty(e,{adapter:t}){return!t.getChildren(e).some(n=>t.isTag(n)||t.getText(n)!=="")},"first-child"(e,{adapter:t,equals:n}){if(t.prevElementSibling)return t.prevElementSibling(e)==null;const r=t.getSiblings(e).find(i=>t.isTag(i));return r!=null&&n(e,r)},"last-child"(e,{adapter:t,equals:n}){const r=t.getSiblings(e);for(let i=r.length-1;i>=0;i--){if(n(e,r[i]))return!0;if(t.isTag(r[i]))break}return!1},"first-of-type"(e,{adapter:t,equals:n}){const r=t.getSiblings(e),i=t.getName(e);for(let u=0;u<r.length;u++){const s=r[u];if(n(e,s))return!0;if(t.isTag(s)&&t.getName(s)===i)break}return!1},"last-of-type"(e,{adapter:t,equals:n}){const r=t.getSiblings(e),i=t.getName(e);for(let u=r.length-1;u>=0;u--){const s=r[u];if(n(e,s))return!0;if(t.isTag(s)&&t.getName(s)===i)break}return!1},"only-of-type"(e,{adapter:t,equals:n}){const r=t.getName(e);return t.getSiblings(e).every(i=>n(e,i)||!t.isTag(i)||t.getName(i)!==r)},"only-child"(e,{adapter:t,equals:n}){return t.getSiblings(e).every(r=>n(e,r)||!t.isTag(r))}};function S0(e,t,n,r){if(n===null){if(e.length>r)throw new Error(`Pseudo-class :${t} requires an argument`)}else if(e.length===r)throw new Error(`Pseudo-class :${t} doesn't have any arguments`)}const hN={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:`:is(
|
|
478
479
|
:is(button, input, select, textarea, optgroup, option)[disabled],
|
|
479
480
|
optgroup[disabled] > option,
|
|
480
481
|
fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)
|
|
481
|
-
)`,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"},Hg={};function BN(e,t){return e===pe.falseFunc?pe.falseFunc:n=>t.isTag(n)&&e(n)}function Ug(e,t){const n=t.getSiblings(e);if(n.length<=1)return[];const r=n.indexOf(e);return r<0||r===n.length-1?[]:n.slice(r+1).filter(t.isTag)}function dc(e){return{xmlMode:!!e.xmlMode,lowerCaseAttributeNames:!!e.lowerCaseAttributeNames,lowerCaseTags:!!e.lowerCaseTags,quirksMode:!!e.quirksMode,cacheResults:!!e.cacheResults,pseudos:e.pseudos,adapter:e.adapter,equals:e.equals}}const Zo=(e,t,n,r,i)=>{const u=i(t,dc(n),r);return u===pe.trueFunc?e:u===pe.falseFunc?pe.falseFunc:s=>u(s)&&e(s)},Xo={is:Zo,matches:Zo,where:Zo,not(e,t,n,r,i){const u=i(t,dc(n),r);return u===pe.falseFunc?e:u===pe.trueFunc?pe.falseFunc:s=>!u(s)&&e(s)},has(e,t,n,r,i){const{adapter:u}=n,s=dc(n);s.relativeSelector=!0;const a=t.some(c=>c.some(Af))?[Hg]:void 0,o=i(t,s,a);if(o===pe.falseFunc)return pe.falseFunc;const l=BN(o,u);if(a&&o!==pe.trueFunc){const{shouldTestNextSiblings:c=!1}=o;return d=>{if(!e(d))return!1;a[0]=d;const f=u.getChildren(d),h=c?[...f,...Ug(d,u)]:f;return u.existsOne(l,h)}}return c=>e(c)&&u.existsOne(l,u.getChildren(c))}};function LN(e,t,n,r,i){var u;const{name:s,data:a}=t;if(Array.isArray(a)){if(!(s in Xo))throw new Error(`Unknown pseudo-class :${s}(${a})`);return Xo[s](e,a,n,r,i)}const o=(u=n.pseudos)===null||u===void 0?void 0:u[s],l=typeof o=="string"?o:MN[s];if(typeof l=="string"){if(a!=null)throw new Error(`Pseudo ${s} doesn't have any arguments`);const c=Wa(l);return Xo.is(e,c,n,r,i)}if(typeof o=="function")return P0(o,s,a,1),c=>o(c,a)&&e(c);if(s in cc)return cc[s](e,a,n,r);if(s in F0){const c=F0[s];return P0(c,s,a,2),d=>c(d,n,a)&&e(d)}throw new Error(`Unknown pseudo-class :${s}`)}function $o(e,t){const n=t.getParent(e);return n&&t.isTag(n)?n:null}function vN(e,t,n,r,i){const{adapter:u,equals:s}=n;switch(t.type){case ne.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case ne.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case ne.Attribute:{if(t.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return(!n.xmlMode||n.lowerCaseAttributeNames)&&(t.name=t.name.toLowerCase()),NN[t.action](e,t,n)}case ne.Pseudo:return LN(e,t,n,r,i);case ne.Tag:{if(t.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:a}=t;return(!n.xmlMode||n.lowerCaseTags)&&(a=a.toLowerCase()),function(l){return u.getName(l)===a&&e(l)}}case ne.Descendant:{if(n.cacheResults===!1||typeof WeakSet>"u")return function(l){let c=l;for(;c=$o(c,u);)if(e(c))return!0;return!1};const a=new WeakSet;return function(l){let c=l;for(;c=$o(c,u);)if(!a.has(c)){if(u.isTag(c)&&e(c))return!0;a.add(c)}return!1}}case"_flexibleDescendant":return function(o){let l=o;do if(e(l))return!0;while(l=$o(l,u));return!1};case ne.Parent:return function(o){return u.getChildren(o).some(l=>u.isTag(l)&&e(l))};case ne.Child:return function(o){const l=u.getParent(o);return l!=null&&u.isTag(l)&&e(l)};case ne.Sibling:return function(o){const l=u.getSiblings(o);for(let c=0;c<l.length;c++){const d=l[c];if(s(o,d))break;if(u.isTag(d)&&e(d))return!0}return!1};case ne.Adjacent:return u.prevElementSibling?function(o){const l=u.prevElementSibling(o);return l!=null&&e(l)}:function(o){const l=u.getSiblings(o);let c;for(let d=0;d<l.length;d++){const f=l[d];if(s(o,f))break;u.isTag(f)&&(c=f)}return!!c&&e(c)};case ne.Universal:{if(t.namespace!=null&&t.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return e}}}function Wg(e){return e.type===ne.Pseudo&&(e.name==="scope"||Array.isArray(e.data)&&e.data.some(t=>t.some(Wg)))}const FN={type:ne.Descendant},PN={type:"_flexibleDescendant"},HN={type:ne.Pseudo,name:"scope",data:null};function UN(e,{adapter:t},n){const r=!!n?.every(i=>{const u=t.isTag(i)&&t.getParent(i);return i===Hg||u&&t.isTag(u)});for(const i of e){if(!(i.length>0&&Af(i[0])&&i[0].type!==ne.Descendant))if(r&&!i.some(Wg))i.unshift(FN);else continue;i.unshift(HN)}}function Qg(e,t,n){var r;e.forEach(SN),n=(r=t.context)!==null&&r!==void 0?r:n;const i=Array.isArray(n),u=n&&(Array.isArray(n)?n:[n]);if(t.relativeSelector!==!1)UN(e,t,u);else if(e.some(o=>o.length>0&&Af(o[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let s=!1;const a=e.map(o=>{if(o.length>=2){const[l,c]=o;l.type!==ne.Pseudo||l.name!=="scope"||(i&&c.type===ne.Descendant?o[1]=PN:(c.type===ne.Adjacent||c.type===ne.Sibling)&&(s=!0))}return WN(o,t,u)}).reduce(QN,pe.falseFunc);return a.shouldTestNextSiblings=s,a}function WN(e,t,n){var r;return e.reduce((i,u)=>i===pe.falseFunc?pe.falseFunc:vN(i,u,t,n,Qg),(r=t.rootFunc)!==null&&r!==void 0?r:pe.trueFunc)}function QN(e,t){return t===pe.falseFunc||e===pe.trueFunc?e:e===pe.falseFunc||t===pe.trueFunc?t:function(r){return e(r)||t(r)}}const zg=(e,t)=>e===t,zN={adapter:Ua,equals:zg};function KN(e){var t,n,r,i;const u=e??zN;return(t=u.adapter)!==null&&t!==void 0||(u.adapter=Ua),(n=u.equals)!==null&&n!==void 0||(u.equals=(i=(r=u.adapter)===null||r===void 0?void 0:r.equals)!==null&&i!==void 0?i:zg),u}function qN(e){return function(n,r,i){const u=KN(r);return e(n,u,i)}}const gf=qN(Qg);function Kg(e,t,n=!1){return n&&(e=YN(e,t)),Array.isArray(e)?t.removeSubsets(e):t.getChildren(e)}function YN(e,t){const n=Array.isArray(e)?e.slice(0):[e],r=n.length;for(let i=0;i<r;i++){const u=Ug(n[i],t);n.push(...u)}return n}const GN=new Set(["first","last","eq","gt","nth","lt","even","odd"]);function ra(e){return e.type!=="pseudo"?!1:GN.has(e.name)?!0:e.name==="not"&&Array.isArray(e.data)?e.data.some(t=>t.some(ra)):!1}function VN(e,t,n){const r=t!=null?parseInt(t,10):NaN;switch(e){case"first":return 1;case"nth":case"eq":return isFinite(r)?r>=0?r+1:1/0:0;case"lt":return isFinite(r)?r>=0?Math.min(r,n):1/0:0;case"gt":return isFinite(r)?1/0:0;case"odd":return 2*n;case"even":return 2*n-1;case"last":case"not":return 1/0}}function JN(e){for(;e.parent;)e=e.parent;return e}function bf(e){const t=[],n=[];for(const r of e)r.some(ra)?t.push(r):n.push(r);return[n,t]}const jN={type:ne.Universal,namespace:null},ZN={type:ne.Pseudo,name:"scope",data:null};function qg(e,t,n={}){return Yg([e],t,n)}function Yg(e,t,n={}){if(typeof t=="function")return e.some(t);const[r,i]=bf(Wa(t));return r.length>0&&e.some(gf(r,n))||i.some(u=>Jg(u,e,n).length>0)}function XN(e,t,n,r){const i=typeof n=="string"?parseInt(n,10):NaN;switch(e){case"first":case"lt":return t;case"last":return t.length>0?[t[t.length-1]]:t;case"nth":case"eq":return isFinite(i)&&Math.abs(i)<t.length?[i<0?t[t.length+i]:t[i]]:[];case"gt":return isFinite(i)?t.slice(i+1):[];case"even":return t.filter((u,s)=>s%2===0);case"odd":return t.filter((u,s)=>s%2===1);case"not":{const u=new Set(Vg(n,t,r));return t.filter(s=>!u.has(s))}}}function Gg(e,t,n={}){return Vg(Wa(e),t,n)}function Vg(e,t,n){if(t.length===0)return[];const[r,i]=bf(e);let u;if(r.length){const s=hc(t,r,n);if(i.length===0)return s;s.length&&(u=new Set(s))}for(let s=0;s<i.length&&u?.size!==t.length;s++){const a=i[s];if((u?t.filter(c=>ae(c)&&!u.has(c)):t).length===0)break;const l=Jg(a,t,n);if(l.length)if(u)l.forEach(c=>u.add(c));else{if(s===i.length-1)return l;u=new Set(l)}}return typeof u<"u"?u.size===t.length?t:t.filter(s=>u.has(s)):[]}function Jg(e,t,n){var r;if(e.some(nu)){const i=(r=n.root)!==null&&r!==void 0?r:JN(t[0]),u={...n,context:t,relativeSelector:!1};return e.push(ZN),ia(i,e,u,!0,t.length)}return ia(t,e,n,!1,t.length)}function $N(e,t,n={},r=1/0){if(typeof e=="function")return jg(t,e);const[i,u]=bf(Wa(e)),s=u.map(a=>ia(t,a,n,!0,r));return i.length&&s.push(fc(t,i,n,r)),s.length===0?[]:s.length===1?s[0]:xi(s.reduce((a,o)=>[...a,...o]))}function ia(e,t,n,r,i){const u=t.findIndex(ra),s=t.slice(0,u),a=t[u],o=t.length-1===u?i:1/0,l=VN(a.name,a.data,o);if(l===0)return[];const d=(s.length===0&&!Array.isArray(e)?Ha(e).filter(ae):s.length===0?(Array.isArray(e)?e:[e]).filter(ae):r||s.some(nu)?fc(e,[s],n,l):hc(e,[s],n)).slice(0,l);let f=XN(a.name,d,a.data,n);if(f.length===0||t.length===u+1)return f;const h=t.slice(u+1),m=h.some(nu);if(m){if(nu(h[0])){const{type:b}=h[0];(b===ne.Sibling||b===ne.Adjacent)&&(f=Kg(f,Ua,!0)),h.unshift(jN)}n={...n,relativeSelector:!1,rootFunc:b=>f.includes(b)}}else n.rootFunc&&n.rootFunc!==na.trueFunc&&(n={...n,rootFunc:na.trueFunc});return h.some(ra)?ia(f,h,n,!1,i):m?fc(f,[h],n,i):hc(f,[h],n)}function fc(e,t,n,r){const i=gf(t,n,e);return jg(e,i,r)}function jg(e,t,n=1/0){const r=Kg(e,Ua,t.shouldTestNextSiblings);return df(i=>ae(i)&&t(i),r,!0,n)}function hc(e,t,n){const r=(Array.isArray(e)?e:[e]).filter(ae);if(r.length===0)return r;const i=gf(t,n);return i===na.trueFunc?r:r.filter(i)}const e4=/^\s*[+~]/;function t4(e){if(!e)return this._make([]);if(typeof e!="string"){const t=Dn(e)?e.toArray():[e],n=this.toArray();return this._make(t.filter(r=>n.some(i=>pf(i,r))))}return this._findBySelector(e,Number.POSITIVE_INFINITY)}function n4(e,t){var n;const r=this.toArray(),i=e4.test(e)?r:this.children().toArray(),u={context:r,root:(n=this._root)===null||n===void 0?void 0:n[0],xmlMode:this.options.xmlMode,lowerCaseTags:this.options.lowerCaseTags,lowerCaseAttributeNames:this.options.lowerCaseAttributeNames,pseudos:this.options.pseudos,quirksMode:this.options.quirksMode};return this._make($N(e,i,u,t))}function Ef(e){return function(t,...n){return function(r){var i;let u=e(t,this);return r&&(u=Cf(u,r,this.options.xmlMode,(i=this._root)===null||i===void 0?void 0:i[0])),this._make(this.length>1&&u.length>1?n.reduce((s,a)=>a(s),u):u)}}}const Ju=Ef((e,t)=>{let n=[];for(let r=0;r<t.length;r++){const i=e(t[r]);i.length>0&&(n=n.concat(i))}return n}),yf=Ef((e,t)=>{const n=[];for(let r=0;r<t.length;r++){const i=e(t[r]);i!==null&&n.push(i)}return n});function Tf(e,...t){let n=null;const r=Ef((i,u)=>{const s=[];return Me(u,a=>{for(let o;(o=i(a))&&!n?.(o,s.length);a=o)s.push(o)}),s})(e,...t);return function(i,u){n=typeof i=="string"?a=>qg(a,i,this.options):i?ju(i):null;const s=r.call(this,u);return n=null,s}}function ki(e){return e.length>1?Array.from(new Set(e)):e}const r4=yf(({parent:e})=>e&&!sr(e)?e:null,ki),i4=Ju(e=>{const t=[];for(;e.parent&&!sr(e.parent);)t.push(e.parent),e=e.parent;return t},xi,e=>e.reverse()),u4=Tf(({parent:e})=>e&&!sr(e)?e:null,xi,e=>e.reverse());function s4(e){var t;const n=[];if(!e)return this._make(n);const r={xmlMode:this.options.xmlMode,root:(t=this._root)===null||t===void 0?void 0:t[0]},i=typeof e=="string"?u=>qg(u,e,r):ju(e);return Me(this,u=>{for(u&&!sr(u)&&!ae(u)&&(u=u.parent);u&&ae(u);){if(i(u,0)){n.includes(u)||n.push(u);break}u=u.parent}}),this._make(n)}const a4=yf(e=>lf(e)),o4=Ju(e=>{const t=[];for(;e.next;)e=e.next,ae(e)&&t.push(e);return t},ki),l4=Tf(e=>lf(e),ki),c4=yf(e=>cf(e)),d4=Ju(e=>{const t=[];for(;e.prev;)e=e.prev,ae(e)&&t.push(e);return t},ki),f4=Tf(e=>cf(e),ki),h4=Ju(e=>kg(e).filter(t=>ae(t)&&t!==e),xi),p4=Ju(e=>Ha(e).filter(ae),ki);function m4(){const e=this.toArray().reduce((t,n)=>ve(n)?t.concat(n.children):t,[]);return this._make(e)}function A4(e){let t=0;const n=this.length;for(;t<n&&e.call(this[t],t,this[t])!==!1;)++t;return this}function g4(e){let t=[];for(let n=0;n<this.length;n++){const r=this[n],i=e.call(r,n,r);i!=null&&(t=t.concat(i))}return this._make(t)}function ju(e){return typeof e=="function"?(t,n)=>e.call(t,n,t):Dn(e)?t=>Array.prototype.includes.call(e,t):function(t){return e===t}}function b4(e){var t;return this._make(Cf(this.toArray(),e,this.options.xmlMode,(t=this._root)===null||t===void 0?void 0:t[0]))}function Cf(e,t,n,r){return typeof t=="string"?Gg(t,e,{xmlMode:n,root:r}):e.filter(ju(t))}function E4(e){const t=this.toArray();return typeof e=="string"?Yg(t.filter(ae),e,this.options):e?t.some(ju(e)):!1}function y4(e){let t=this.toArray();if(typeof e=="string"){const n=new Set(Gg(e,t,this.options));t=t.filter(r=>!n.has(r))}else{const n=ju(e);t=t.filter((r,i)=>!n(r,i))}return this._make(t)}function T4(e){return this.filter(typeof e=="string"?`:has(${e})`:(t,n)=>this._make(n).find(e).length>0)}function C4(){return this.length>1?this._make(this[0]):this}function x4(){return this.length>0?this._make(this[this.length-1]):this}function k4(e){var t;return e=+e,e===0&&this.length<=1?this:(e<0&&(e=this.length+e),this._make((t=this[e])!==null&&t!==void 0?t:[]))}function S4(e){return e==null?this.toArray():this[e<0?this.length+e:e]}function I4(){return Array.prototype.slice.call(this)}function w4(e){let t,n;return e==null?(t=this.parent().children(),n=this[0]):typeof e=="string"?(t=this._make(e),n=this[0]):(t=this,n=Dn(e)?e[0]:e),Array.prototype.indexOf.call(t,n)}function N4(e,t){return this._make(Array.prototype.slice.call(this,e,t))}function D4(){var e;return(e=this.prevObject)!==null&&e!==void 0?e:this._make([])}function _4(e,t){const n=this._make(e,t),r=xi([...this.get(),...n.get()]);return this._make(r)}function O4(e){return this.prevObject?this.add(e?this.prevObject.filter(e):this.prevObject):this}const R4=Object.freeze(Object.defineProperty({__proto__:null,_findBySelector:n4,add:_4,addBack:O4,children:p4,closest:s4,contents:m4,each:A4,end:D4,eq:k4,filter:b4,filterArray:Cf,find:t4,first:C4,get:S4,has:T4,index:w4,is:E4,last:x4,map:g4,next:a4,nextAll:o4,nextUntil:l4,not:y4,parent:r4,parents:i4,parentsUntil:u4,prev:c4,prevAll:d4,prevUntil:f4,siblings:h4,slice:N4,toArray:I4},Symbol.toStringTag,{value:"Module"}));function M4(e){return function(n,r,i,u){if(typeof Buffer<"u"&&Buffer.isBuffer(n)&&(n=n.toString()),typeof n=="string")return e(n,r,i,u);const s=n;if(!Array.isArray(s)&&sr(s))return s;const a=new Lr([]);return vr(s,a),a}}function vr(e,t){const n=Array.isArray(e)?e:[e];t?t.children=n:t=null;for(let r=0;r<n.length;r++){const i=n[r];i.parent&&i.parent.children!==n&&Ur(i),t?(i.prev=n[r-1]||null,i.next=n[r+1]||null):i.prev=i.next=null,i.parent=t}return t}function B4(e,t){if(e==null)return[];if(typeof e=="string")return this._parse(e,this.options,!1,null).children.slice(0);if("length"in e){if(e.length===1)return this._makeDomArray(e[0],t);const n=[];for(let r=0;r<e.length;r++){const i=e[r];if(typeof i=="object"){if(i==null)continue;if(!("length"in i)){n.push(t?Eu(i,!0):i);continue}}n.push(...this._makeDomArray(i,t))}return n}return[t?Eu(e,!0):e]}function Zg(e){return function(...t){const n=this.length-1;return Me(this,(r,i)=>{if(!ve(r))return;const u=typeof t[0]=="function"?t[0].call(r,i,this._render(r.children)):t,s=this._makeDomArray(u,i<n);e(s,r.children,r)})}}function ar(e,t,n,r,i){var u,s;const a=[t,n,...r],o=t===0?null:e[t-1],l=t+n>=e.length?null:e[t+n];for(let c=0;c<r.length;++c){const d=r[c],f=d.parent;if(f){const m=f.children.indexOf(d);m>-1&&(f.children.splice(m,1),i===f&&t>m&&a[0]--)}d.parent=i,d.prev&&(d.prev.next=(u=d.next)!==null&&u!==void 0?u:null),d.next&&(d.next.prev=(s=d.prev)!==null&&s!==void 0?s:null),d.prev=c===0?o:r[c-1],d.next=c===r.length-1?l:r[c+1]}return o&&(o.next=r[0]),l&&(l.prev=r[r.length-1]),e.splice(...a)}function L4(e){return(Dn(e)?e:this._make(e)).append(this),this}function v4(e){return(Dn(e)?e:this._make(e)).prepend(this),this}const F4=Zg((e,t,n)=>{ar(t,t.length,0,e,n)}),P4=Zg((e,t,n)=>{ar(t,0,0,e,n)});function Xg(e){return function(t){const n=this.length-1,r=this.parents().last();for(let i=0;i<this.length;i++){const u=this[i],s=typeof t=="function"?t.call(u,i,u):typeof t=="string"&&!oc(t)?r.find(t).clone():t,[a]=this._makeDomArray(s,i<n);if(!a||!ve(a))continue;let o=a,l=0;for(;l<o.children.length;){const c=o.children[l];ae(c)?(o=c,l=0):l++}e(u,o,[a])}return this}}const H4=Xg((e,t,n)=>{const{parent:r}=e;if(!r)return;const i=r.children,u=i.indexOf(e);vr([e],t),ar(i,u,0,n,r)}),U4=Xg((e,t,n)=>{ve(e)&&(vr(e.children,t),vr(n,e))});function W4(e){return this.parent(e).not("body").each((t,n)=>{this._make(n).replaceWith(n.children)}),this}function Q4(e){const t=this[0];if(t){const n=this._make(typeof e=="function"?e.call(t,0,t):e).insertBefore(t);let r;for(let u=0;u<n.length;u++)n[u].type==="tag"&&(r=n[u]);let i=0;for(;r&&i<r.children.length;){const u=r.children[i];u.type==="tag"?(r=u,i=0):i++}r&&this._make(r).append(this)}return this}function z4(...e){const t=this.length-1;return Me(this,(n,r)=>{if(!ve(n)||!n.parent)return;const i=n.parent.children,u=i.indexOf(n);if(u<0)return;const s=typeof e[0]=="function"?e[0].call(n,r,this._render(n.children)):e,a=this._makeDomArray(s,r<t);ar(i,u+1,0,a,n.parent)})}function K4(e){typeof e=="string"&&(e=this._make(e)),this.remove();const t=[];for(const n of this._makeDomArray(e)){const r=this.clone().toArray(),{parent:i}=n;if(!i)continue;const u=i.children,s=u.indexOf(n);s<0||(ar(u,s+1,0,r,i),t.push(...r))}return this._make(t)}function q4(...e){const t=this.length-1;return Me(this,(n,r)=>{if(!ve(n)||!n.parent)return;const i=n.parent.children,u=i.indexOf(n);if(u<0)return;const s=typeof e[0]=="function"?e[0].call(n,r,this._render(n.children)):e,a=this._makeDomArray(s,r<t);ar(i,u,0,a,n.parent)})}function Y4(e){const t=this._make(e);this.remove();const n=[];return Me(t,r=>{const i=this.clone().toArray(),{parent:u}=r;if(!u)return;const s=u.children,a=s.indexOf(r);a<0||(ar(s,a,0,i,u),n.push(...i))}),this._make(n)}function G4(e){const t=e?this.filter(e):this;return Me(t,n=>{Ur(n),n.prev=n.next=n.parent=null}),this}function V4(e){return Me(this,(t,n)=>{const{parent:r}=t;if(!r)return;const i=r.children,u=typeof e=="function"?e.call(t,n,t):e,s=this._makeDomArray(u);vr(s,null);const a=i.indexOf(t);ar(i,a,1,s,r),s.includes(t)||(t.parent=t.prev=t.next=null)})}function J4(){return Me(this,e=>{if(ve(e)){for(const t of e.children)t.next=t.prev=t.parent=null;e.children.length=0}})}function j4(e){if(e===void 0){const t=this[0];return!t||!ve(t)?null:this._render(t.children)}return Me(this,t=>{if(!ve(t))return;for(const r of t.children)r.next=r.prev=r.parent=null;const n=Dn(e)?e.toArray():this._parse(`${e}`,this.options,!1,t).children;vr(n,t)})}function Z4(){return this._render(this)}function X4(e){return e===void 0?yu(this):typeof e=="function"?Me(this,(t,n)=>this._make(t).text(e.call(t,n,yu([t])))):Me(this,t=>{if(!ve(t))return;for(const r of t.children)r.next=r.prev=r.parent=null;const n=new bu(`${e}`);vr(n,t)})}function $4(){const e=Array.prototype.map.call(this.get(),n=>Eu(n,!0)),t=new Lr(e);for(const n of e)n.parent=t;return this._make(e)}const e8=Object.freeze(Object.defineProperty({__proto__:null,_makeDomArray:B4,after:z4,append:F4,appendTo:L4,before:q4,clone:$4,empty:J4,html:j4,insertAfter:K4,insertBefore:Y4,prepend:P4,prependTo:v4,remove:G4,replaceWith:V4,text:X4,toString:Z4,unwrap:W4,wrap:H4,wrapAll:Q4,wrapInner:U4},Symbol.toStringTag,{value:"Module"}));function t8(e,t){if(e!=null&&t!=null||typeof e=="object"&&!Array.isArray(e))return Me(this,(n,r)=>{ae(n)&&$g(n,e,t,r)});if(this.length!==0)return eb(this[0],e)}function $g(e,t,n,r){if(typeof t=="string"){const i=eb(e),u=typeof n=="function"?n.call(e,r,i[t]):n;u===""?delete i[t]:u!=null&&(i[t]=u),e.attribs.style=n8(i)}else if(typeof t=="object"){const i=Object.keys(t);for(let u=0;u<i.length;u++){const s=i[u];$g(e,s,t[s],u)}}}function eb(e,t){if(!e||!ae(e))return;const n=r8(e.attribs.style);if(typeof t=="string")return n[t];if(Array.isArray(t)){const r={};for(const i of t)n[i]!=null&&(r[i]=n[i]);return r}return n}function n8(e){return Object.keys(e).reduce((t,n)=>`${t}${t?" ":""}${n}: ${e[n]};`,"")}function r8(e){if(e=(e||"").trim(),!e)return{};const t={};let n;for(const r of e.split(";")){const i=r.indexOf(":");if(i<1||i===r.length-1){const u=r.trimEnd();u.length>0&&n!==void 0&&(t[n]+=`;${u}`)}else n=r.slice(0,i).trim(),t[n]=r.slice(i+1).trim()}return t}const i8=Object.freeze(Object.defineProperty({__proto__:null,css:t8},Symbol.toStringTag,{value:"Module"})),H0="input,select,textarea,keygen",u8=/%20/g,U0=/\r?\n/g;function s8(){return this.serializeArray().map(n=>`${encodeURIComponent(n.name)}=${encodeURIComponent(n.value)}`).join("&").replace(u8,"+")}function a8(){return this.map((e,t)=>{const n=this._make(t);return ae(t)&&t.name==="form"?n.find(H0).toArray():n.filter(H0).toArray()}).filter('[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))').map((e,t)=>{var n;const r=this._make(t),i=r.attr("name"),u=(n=r.val())!==null&&n!==void 0?n:"";return Array.isArray(u)?u.map(s=>({name:i,value:s.replace(U0,`\r
|
|
482
|
-
`)})):{name:i,value:u.replace(
|
|
483
|
-
`)}}).toArray()}const o8=Object.freeze(Object.defineProperty({__proto__:null,serialize:s8,serializeArray:a8},Symbol.toStringTag,{value:"Module"}));function l8(e){var t;return typeof e=="string"?{selector:e,value:"textContent"}:{selector:e.selector,value:(t=e.value)!==null&&t!==void 0?t:"textContent"}}function c8(e){const t={};for(const n in e){const r=e[n],i=Array.isArray(r),{selector:u,value:s}=l8(i?r[0]:r),a=typeof s=="function"?s:typeof s=="string"?o=>this._make(o).prop(s):o=>this._make(o).extract(s);if(i)t[n]=this._findBySelector(u,Number.POSITIVE_INFINITY).map((o,l)=>a(l,n,t)).get();else{const o=this._findBySelector(u,1);t[n]=o.length>0?a(o[0],n,t):void 0}}return t}const d8=Object.freeze(Object.defineProperty({__proto__:null,extract:c8},Symbol.toStringTag,{value:"Module"}));class Zu{constructor(t,n,r){if(this.length=0,this.options=r,this._root=n,t){for(let i=0;i<t.length;i++)this[i]=t[i];this.length=t.length}}}Zu.prototype.cheerio="[cheerio object]";Zu.prototype.splice=Array.prototype.splice;Zu.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator];Object.assign(Zu.prototype,gN,R4,e8,i8,o8,d8);function f8(e,t){return function n(r,i,u=!0){if(r==null)throw new Error("cheerio.load() expects a string");const s=ac(i),a=e(r,s,u,null);class o extends Zu{_make(d,f){const h=l(d,f);return h.prevObject=this,h}_parse(d,f,h,m){return e(d,f,h,m)}_render(d){return t(d,this.options)}}function l(c,d,f=a,h){if(c&&Dn(c))return c;const m=ac(h,s),b=typeof f=="string"?[e(f,m,!1,null)]:"length"in f?f:[f],T=Dn(b)?b:new o(b,null,m);if(T._root=T,!c)return new o(void 0,T,m);const E=typeof c=="string"&&oc(c)?e(c,m,!1,null).children:h8(c)?[c]:Array.isArray(c)?c:void 0,O=new o(E,T,m);if(E)return O;if(typeof c!="string")throw new TypeError("Unexpected type of selector");let w=c;const L=d?typeof d=="string"?oc(d)?new o([e(d,m,!1,null)],T,m):(w=`${d} ${w}`,T):Dn(d)?d:new o(Array.isArray(d)?d:[d],T,m):T;return L?L.find(w):O}return Object.assign(l,uN,{load:n,_root:a,_options:s,fn:o.prototype,prototype:o.prototype}),l}}function h8(e){return!!e.name||e.type==="root"||e.type==="text"||e.type==="comment"}const p8=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),_e="�";var y;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(y||(y={}));const ft={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function tb(e){return e>=55296&&e<=57343}function m8(e){return e>=56320&&e<=57343}function A8(e,t){return(e-55296)*1024+9216+t}function nb(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function rb(e){return e>=64976&&e<=65007||p8.has(e)}var v;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(v||(v={}));const g8=65536;class b8{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=g8,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:i,offset:u}=this,s=i+n,a=u+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:a,endOffset:a}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(m8(n))return this.pos++,this._addGap(),A8(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,y.EOF;return this._err(v.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,y.EOF;const r=this.html.charCodeAt(n);return r===y.CARRIAGE_RETURN?y.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,y.EOF;let t=this.html.charCodeAt(this.pos);return t===y.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,y.LINE_FEED):t===y.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,tb(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===y.LINE_FEED||t===y.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){nb(t)?this._err(v.controlCharacterInInputStream):rb(t)&&this._err(v.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Te;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(Te||(Te={}));function ib(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const E8=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),y8=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]]);function T8(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=y8.get(e))!==null&&t!==void 0?t:e}var qe;(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"})(qe||(qe={}));const C8=32;var Gn;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Gn||(Gn={}));function pc(e){return e>=qe.ZERO&&e<=qe.NINE}function x8(e){return e>=qe.UPPER_A&&e<=qe.UPPER_F||e>=qe.LOWER_A&&e<=qe.LOWER_F}function k8(e){return e>=qe.UPPER_A&&e<=qe.UPPER_Z||e>=qe.LOWER_A&&e<=qe.LOWER_Z||pc(e)}function S8(e){return e===qe.EQUALS||k8(e)}var ze;(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"})(ze||(ze={}));var Tn;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Tn||(Tn={}));let I8=class{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=ze.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Tn.Strict}startEntity(t){this.decodeMode=t,this.state=ze.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case ze.EntityStart:return t.charCodeAt(n)===qe.NUM?(this.state=ze.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=ze.NamedEntity,this.stateNamedEntity(t,n));case ze.NumericStart:return this.stateNumericStart(t,n);case ze.NumericDecimal:return this.stateNumericDecimal(t,n);case ze.NumericHex:return this.stateNumericHex(t,n);case ze.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|C8)===qe.LOWER_X?(this.state=ze.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=ze.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const u=r-n;this.result=this.result*Math.pow(i,u)+Number.parseInt(t.substr(n,u),i),this.consumed+=u}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(pc(i)||x8(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(pc(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===qe.SEMI)this.consumed+=1;else if(this.decodeMode===Tn.Strict)return 0;return this.emitCodePoint(T8(this.result),this.consumed),this.errors&&(t!==qe.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],u=(i&Gn.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=w8(r,i,this.treeIndex+Math.max(1,u),s),this.treeIndex<0)return this.result===0||this.decodeMode===Tn.Attribute&&(u===0||S8(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],u=(i&Gn.VALUE_LENGTH)>>14,u!==0){if(s===qe.SEMI)return this.emitNamedEntityData(this.treeIndex,u,this.consumed+this.excess);this.decodeMode!==Tn.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&Gn.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~Gn.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case ze.NamedEntity:return this.result!==0&&(this.decodeMode!==Tn.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case ze.NumericDecimal:return this.emitNumericEntity(0,2);case ze.NumericHex:return this.emitNumericEntity(0,3);case ze.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case ze.EntityStart:return 0}}};function w8(e,t,n,r){const i=(t&Gn.BRANCH_LENGTH)>>7,u=t&Gn.JUMP_TABLE;if(i===0)return u!==0&&r===u?n:-1;if(u){const o=r-u;return o<0||o>=i?-1:e[n+o]-1}let s=n,a=s+i-1;for(;s<=a;){const o=s+a>>>1,l=e[o];if(l<r)s=o+1;else if(l>r)a=o-1;else return e[o+i]}return-1}var W;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(W||(W={}));var kr;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(kr||(kr={}));var Ct;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Ct||(Ct={}));var R;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(R||(R={}));var p;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(p||(p={}));const N8=new Map([[R.A,p.A],[R.ADDRESS,p.ADDRESS],[R.ANNOTATION_XML,p.ANNOTATION_XML],[R.APPLET,p.APPLET],[R.AREA,p.AREA],[R.ARTICLE,p.ARTICLE],[R.ASIDE,p.ASIDE],[R.B,p.B],[R.BASE,p.BASE],[R.BASEFONT,p.BASEFONT],[R.BGSOUND,p.BGSOUND],[R.BIG,p.BIG],[R.BLOCKQUOTE,p.BLOCKQUOTE],[R.BODY,p.BODY],[R.BR,p.BR],[R.BUTTON,p.BUTTON],[R.CAPTION,p.CAPTION],[R.CENTER,p.CENTER],[R.CODE,p.CODE],[R.COL,p.COL],[R.COLGROUP,p.COLGROUP],[R.DD,p.DD],[R.DESC,p.DESC],[R.DETAILS,p.DETAILS],[R.DIALOG,p.DIALOG],[R.DIR,p.DIR],[R.DIV,p.DIV],[R.DL,p.DL],[R.DT,p.DT],[R.EM,p.EM],[R.EMBED,p.EMBED],[R.FIELDSET,p.FIELDSET],[R.FIGCAPTION,p.FIGCAPTION],[R.FIGURE,p.FIGURE],[R.FONT,p.FONT],[R.FOOTER,p.FOOTER],[R.FOREIGN_OBJECT,p.FOREIGN_OBJECT],[R.FORM,p.FORM],[R.FRAME,p.FRAME],[R.FRAMESET,p.FRAMESET],[R.H1,p.H1],[R.H2,p.H2],[R.H3,p.H3],[R.H4,p.H4],[R.H5,p.H5],[R.H6,p.H6],[R.HEAD,p.HEAD],[R.HEADER,p.HEADER],[R.HGROUP,p.HGROUP],[R.HR,p.HR],[R.HTML,p.HTML],[R.I,p.I],[R.IMG,p.IMG],[R.IMAGE,p.IMAGE],[R.INPUT,p.INPUT],[R.IFRAME,p.IFRAME],[R.KEYGEN,p.KEYGEN],[R.LABEL,p.LABEL],[R.LI,p.LI],[R.LINK,p.LINK],[R.LISTING,p.LISTING],[R.MAIN,p.MAIN],[R.MALIGNMARK,p.MALIGNMARK],[R.MARQUEE,p.MARQUEE],[R.MATH,p.MATH],[R.MENU,p.MENU],[R.META,p.META],[R.MGLYPH,p.MGLYPH],[R.MI,p.MI],[R.MO,p.MO],[R.MN,p.MN],[R.MS,p.MS],[R.MTEXT,p.MTEXT],[R.NAV,p.NAV],[R.NOBR,p.NOBR],[R.NOFRAMES,p.NOFRAMES],[R.NOEMBED,p.NOEMBED],[R.NOSCRIPT,p.NOSCRIPT],[R.OBJECT,p.OBJECT],[R.OL,p.OL],[R.OPTGROUP,p.OPTGROUP],[R.OPTION,p.OPTION],[R.P,p.P],[R.PARAM,p.PARAM],[R.PLAINTEXT,p.PLAINTEXT],[R.PRE,p.PRE],[R.RB,p.RB],[R.RP,p.RP],[R.RT,p.RT],[R.RTC,p.RTC],[R.RUBY,p.RUBY],[R.S,p.S],[R.SCRIPT,p.SCRIPT],[R.SEARCH,p.SEARCH],[R.SECTION,p.SECTION],[R.SELECT,p.SELECT],[R.SOURCE,p.SOURCE],[R.SMALL,p.SMALL],[R.SPAN,p.SPAN],[R.STRIKE,p.STRIKE],[R.STRONG,p.STRONG],[R.STYLE,p.STYLE],[R.SUB,p.SUB],[R.SUMMARY,p.SUMMARY],[R.SUP,p.SUP],[R.TABLE,p.TABLE],[R.TBODY,p.TBODY],[R.TEMPLATE,p.TEMPLATE],[R.TEXTAREA,p.TEXTAREA],[R.TFOOT,p.TFOOT],[R.TD,p.TD],[R.TH,p.TH],[R.THEAD,p.THEAD],[R.TITLE,p.TITLE],[R.TR,p.TR],[R.TRACK,p.TRACK],[R.TT,p.TT],[R.U,p.U],[R.UL,p.UL],[R.SVG,p.SVG],[R.VAR,p.VAR],[R.WBR,p.WBR],[R.XMP,p.XMP]]);function Qa(e){var t;return(t=N8.get(e))!==null&&t!==void 0?t:p.UNKNOWN}const q=p,D8={[W.HTML]:new Set([q.ADDRESS,q.APPLET,q.AREA,q.ARTICLE,q.ASIDE,q.BASE,q.BASEFONT,q.BGSOUND,q.BLOCKQUOTE,q.BODY,q.BR,q.BUTTON,q.CAPTION,q.CENTER,q.COL,q.COLGROUP,q.DD,q.DETAILS,q.DIR,q.DIV,q.DL,q.DT,q.EMBED,q.FIELDSET,q.FIGCAPTION,q.FIGURE,q.FOOTER,q.FORM,q.FRAME,q.FRAMESET,q.H1,q.H2,q.H3,q.H4,q.H5,q.H6,q.HEAD,q.HEADER,q.HGROUP,q.HR,q.HTML,q.IFRAME,q.IMG,q.INPUT,q.LI,q.LINK,q.LISTING,q.MAIN,q.MARQUEE,q.MENU,q.META,q.NAV,q.NOEMBED,q.NOFRAMES,q.NOSCRIPT,q.OBJECT,q.OL,q.P,q.PARAM,q.PLAINTEXT,q.PRE,q.SCRIPT,q.SECTION,q.SELECT,q.SOURCE,q.STYLE,q.SUMMARY,q.TABLE,q.TBODY,q.TD,q.TEMPLATE,q.TEXTAREA,q.TFOOT,q.TH,q.THEAD,q.TITLE,q.TR,q.TRACK,q.UL,q.WBR,q.XMP]),[W.MATHML]:new Set([q.MI,q.MO,q.MN,q.MS,q.MTEXT,q.ANNOTATION_XML]),[W.SVG]:new Set([q.TITLE,q.FOREIGN_OBJECT,q.DESC]),[W.XLINK]:new Set,[W.XML]:new Set,[W.XMLNS]:new Set},mc=new Set([q.H1,q.H2,q.H3,q.H4,q.H5,q.H6]),_8=new Set([R.STYLE,R.SCRIPT,R.XMP,R.IFRAME,R.NOEMBED,R.NOFRAMES,R.PLAINTEXT]);function O8(e,t){return _8.has(e)||t&&e===R.NOSCRIPT}var C;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(C||(C={}));const mt={DATA:C.DATA,RCDATA:C.RCDATA,RAWTEXT:C.RAWTEXT,SCRIPT_DATA:C.SCRIPT_DATA,PLAINTEXT:C.PLAINTEXT,CDATA_SECTION:C.CDATA_SECTION};function R8(e){return e>=y.DIGIT_0&&e<=y.DIGIT_9}function zi(e){return e>=y.LATIN_CAPITAL_A&&e<=y.LATIN_CAPITAL_Z}function M8(e){return e>=y.LATIN_SMALL_A&&e<=y.LATIN_SMALL_Z}function Fn(e){return M8(e)||zi(e)}function W0(e){return Fn(e)||R8(e)}function ms(e){return e+32}function ub(e){return e===y.SPACE||e===y.LINE_FEED||e===y.TABULATION||e===y.FORM_FEED}function Q0(e){return ub(e)||e===y.SOLIDUS||e===y.GREATER_THAN_SIGN}function B8(e){return e===y.NULL?v.nullCharacterReference:e>1114111?v.characterReferenceOutsideUnicodeRange:tb(e)?v.surrogateCharacterReference:rb(e)?v.noncharacterCharacterReference:nb(e)||e===y.CARRIAGE_RETURN?v.controlCharacterReference:null}let L8=class{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=C.DATA,this.returnState=C.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new b8(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new I8(E8,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(v.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(v.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=B8(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Te.START_TAG,tagName:"",tagID:p.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Te.END_TAG,tagName:"",tagID:p.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Te.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Te.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(ib(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(v.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Qa(t.tagName),t.type===Te.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(v.endTagWithAttributes),t.selfClosing&&this._err(v.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Te.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Te.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Te.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Te.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=ub(t)?Te.WHITESPACE_CHARACTER:t===y.NULL?Te.NULL_CHARACTER:Te.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Te.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=C.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Tn.Attribute:Tn.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===C.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===C.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===C.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case C.DATA:{this._stateData(t);break}case C.RCDATA:{this._stateRcdata(t);break}case C.RAWTEXT:{this._stateRawtext(t);break}case C.SCRIPT_DATA:{this._stateScriptData(t);break}case C.PLAINTEXT:{this._statePlaintext(t);break}case C.TAG_OPEN:{this._stateTagOpen(t);break}case C.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case C.TAG_NAME:{this._stateTagName(t);break}case C.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case C.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case C.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case C.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case C.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case C.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case C.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case C.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case C.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case C.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case C.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case C.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case C.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case C.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case C.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case C.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case C.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case C.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case C.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case C.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case C.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case C.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case C.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case C.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case C.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case C.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case C.BOGUS_COMMENT:{this._stateBogusComment(t);break}case C.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case C.COMMENT_START:{this._stateCommentStart(t);break}case C.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case C.COMMENT:{this._stateComment(t);break}case C.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case C.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case C.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case C.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case C.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case C.COMMENT_END:{this._stateCommentEnd(t);break}case C.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case C.DOCTYPE:{this._stateDoctype(t);break}case C.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case C.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case C.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case C.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case C.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case C.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case C.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case C.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case C.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case C.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case C.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case C.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case C.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case C.CDATA_SECTION:{this._stateCdataSection(t);break}case C.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case C.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case C.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case C.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case y.LESS_THAN_SIGN:{this.state=C.TAG_OPEN;break}case y.AMPERSAND:{this._startCharacterReference();break}case y.NULL:{this._err(v.unexpectedNullCharacter),this._emitCodePoint(t);break}case y.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case y.AMPERSAND:{this._startCharacterReference();break}case y.LESS_THAN_SIGN:{this.state=C.RCDATA_LESS_THAN_SIGN;break}case y.NULL:{this._err(v.unexpectedNullCharacter),this._emitChars(_e);break}case y.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case y.LESS_THAN_SIGN:{this.state=C.RAWTEXT_LESS_THAN_SIGN;break}case y.NULL:{this._err(v.unexpectedNullCharacter),this._emitChars(_e);break}case y.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case y.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_LESS_THAN_SIGN;break}case y.NULL:{this._err(v.unexpectedNullCharacter),this._emitChars(_e);break}case y.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case y.NULL:{this._err(v.unexpectedNullCharacter),this._emitChars(_e);break}case y.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Fn(t))this._createStartTagToken(),this.state=C.TAG_NAME,this._stateTagName(t);else switch(t){case y.EXCLAMATION_MARK:{this.state=C.MARKUP_DECLARATION_OPEN;break}case y.SOLIDUS:{this.state=C.END_TAG_OPEN;break}case y.QUESTION_MARK:{this._err(v.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=C.BOGUS_COMMENT,this._stateBogusComment(t);break}case y.EOF:{this._err(v.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(v.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=C.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Fn(t))this._createEndTagToken(),this.state=C.TAG_NAME,this._stateTagName(t);else switch(t){case y.GREATER_THAN_SIGN:{this._err(v.missingEndTagName),this.state=C.DATA;break}case y.EOF:{this._err(v.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(v.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=C.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:{this.state=C.BEFORE_ATTRIBUTE_NAME;break}case y.SOLIDUS:{this.state=C.SELF_CLOSING_START_TAG;break}case y.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentTagToken();break}case y.NULL:{this._err(v.unexpectedNullCharacter),n.tagName+=_e;break}case y.EOF:{this._err(v.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(zi(t)?ms(t):t)}}_stateRcdataLessThanSign(t){t===y.SOLIDUS?this.state=C.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=C.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Fn(t)?(this.state=C.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=C.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=C.BEFORE_ATTRIBUTE_NAME,!1;case y.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=C.SELF_CLOSING_START_TAG,!1;case y.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=C.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=C.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===y.SOLIDUS?this.state=C.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=C.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Fn(t)?(this.state=C.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=C.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=C.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case y.SOLIDUS:{this.state=C.SCRIPT_DATA_END_TAG_OPEN;break}case y.EXCLAMATION_MARK:{this.state=C.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=C.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Fn(t)?(this.state=C.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=C.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=C.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===y.HYPHEN_MINUS?(this.state=C.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=C.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===y.HYPHEN_MINUS?(this.state=C.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=C.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case y.HYPHEN_MINUS:{this.state=C.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case y.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case y.NULL:{this._err(v.unexpectedNullCharacter),this._emitChars(_e);break}case y.EOF:{this._err(v.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case y.HYPHEN_MINUS:{this.state=C.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case y.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case y.NULL:{this._err(v.unexpectedNullCharacter),this.state=C.SCRIPT_DATA_ESCAPED,this._emitChars(_e);break}case y.EOF:{this._err(v.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=C.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case y.HYPHEN_MINUS:{this._emitChars("-");break}case y.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case y.GREATER_THAN_SIGN:{this.state=C.SCRIPT_DATA,this._emitChars(">");break}case y.NULL:{this._err(v.unexpectedNullCharacter),this.state=C.SCRIPT_DATA_ESCAPED,this._emitChars(_e);break}case y.EOF:{this._err(v.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=C.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===y.SOLIDUS?this.state=C.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Fn(t)?(this._emitChars("<"),this.state=C.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=C.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Fn(t)?(this.state=C.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=C.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=C.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(ft.SCRIPT,!1)&&Q0(this.preprocessor.peek(ft.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<ft.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=C.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case y.HYPHEN_MINUS:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case y.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case y.NULL:{this._err(v.unexpectedNullCharacter),this._emitChars(_e);break}case y.EOF:{this._err(v.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case y.HYPHEN_MINUS:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case y.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case y.NULL:{this._err(v.unexpectedNullCharacter),this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(_e);break}case y.EOF:{this._err(v.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case y.HYPHEN_MINUS:{this._emitChars("-");break}case y.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case y.GREATER_THAN_SIGN:{this.state=C.SCRIPT_DATA,this._emitChars(">");break}case y.NULL:{this._err(v.unexpectedNullCharacter),this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(_e);break}case y.EOF:{this._err(v.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===y.SOLIDUS?(this.state=C.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(ft.SCRIPT,!1)&&Q0(this.preprocessor.peek(ft.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<ft.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=C.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:break;case y.SOLIDUS:case y.GREATER_THAN_SIGN:case y.EOF:{this.state=C.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case y.EQUALS_SIGN:{this._err(v.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=C.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=C.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:case y.SOLIDUS:case y.GREATER_THAN_SIGN:case y.EOF:{this._leaveAttrName(),this.state=C.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case y.EQUALS_SIGN:{this._leaveAttrName(),this.state=C.BEFORE_ATTRIBUTE_VALUE;break}case y.QUOTATION_MARK:case y.APOSTROPHE:case y.LESS_THAN_SIGN:{this._err(v.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case y.NULL:{this._err(v.unexpectedNullCharacter),this.currentAttr.name+=_e;break}default:this.currentAttr.name+=String.fromCodePoint(zi(t)?ms(t):t)}}_stateAfterAttributeName(t){switch(t){case y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:break;case y.SOLIDUS:{this.state=C.SELF_CLOSING_START_TAG;break}case y.EQUALS_SIGN:{this.state=C.BEFORE_ATTRIBUTE_VALUE;break}case y.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentTagToken();break}case y.EOF:{this._err(v.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=C.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:break;case y.QUOTATION_MARK:{this.state=C.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case y.APOSTROPHE:{this.state=C.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case y.GREATER_THAN_SIGN:{this._err(v.missingAttributeValue),this.state=C.DATA,this.emitCurrentTagToken();break}default:this.state=C.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case y.QUOTATION_MARK:{this.state=C.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case y.AMPERSAND:{this._startCharacterReference();break}case y.NULL:{this._err(v.unexpectedNullCharacter),this.currentAttr.value+=_e;break}case y.EOF:{this._err(v.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case y.APOSTROPHE:{this.state=C.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case y.AMPERSAND:{this._startCharacterReference();break}case y.NULL:{this._err(v.unexpectedNullCharacter),this.currentAttr.value+=_e;break}case y.EOF:{this._err(v.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:{this._leaveAttrValue(),this.state=C.BEFORE_ATTRIBUTE_NAME;break}case y.AMPERSAND:{this._startCharacterReference();break}case y.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=C.DATA,this.emitCurrentTagToken();break}case y.NULL:{this._err(v.unexpectedNullCharacter),this.currentAttr.value+=_e;break}case y.QUOTATION_MARK:case y.APOSTROPHE:case y.LESS_THAN_SIGN:case y.EQUALS_SIGN:case y.GRAVE_ACCENT:{this._err(v.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case y.EOF:{this._err(v.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:{this._leaveAttrValue(),this.state=C.BEFORE_ATTRIBUTE_NAME;break}case y.SOLIDUS:{this._leaveAttrValue(),this.state=C.SELF_CLOSING_START_TAG;break}case y.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=C.DATA,this.emitCurrentTagToken();break}case y.EOF:{this._err(v.eofInTag),this._emitEOFToken();break}default:this._err(v.missingWhitespaceBetweenAttributes),this.state=C.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case y.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=C.DATA,this.emitCurrentTagToken();break}case y.EOF:{this._err(v.eofInTag),this._emitEOFToken();break}default:this._err(v.unexpectedSolidusInTag),this.state=C.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case y.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentComment(n);break}case y.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case y.NULL:{this._err(v.unexpectedNullCharacter),n.data+=_e;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(ft.DASH_DASH,!0)?(this._createCommentToken(ft.DASH_DASH.length+1),this.state=C.COMMENT_START):this._consumeSequenceIfMatch(ft.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(ft.DOCTYPE.length+1),this.state=C.DOCTYPE):this._consumeSequenceIfMatch(ft.CDATA_START,!0)?this.inForeignNode?this.state=C.CDATA_SECTION:(this._err(v.cdataInHtmlContent),this._createCommentToken(ft.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=C.BOGUS_COMMENT):this._ensureHibernation()||(this._err(v.incorrectlyOpenedComment),this._createCommentToken(2),this.state=C.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case y.HYPHEN_MINUS:{this.state=C.COMMENT_START_DASH;break}case y.GREATER_THAN_SIGN:{this._err(v.abruptClosingOfEmptyComment),this.state=C.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=C.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case y.HYPHEN_MINUS:{this.state=C.COMMENT_END;break}case y.GREATER_THAN_SIGN:{this._err(v.abruptClosingOfEmptyComment),this.state=C.DATA,this.emitCurrentComment(n);break}case y.EOF:{this._err(v.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=C.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case y.HYPHEN_MINUS:{this.state=C.COMMENT_END_DASH;break}case y.LESS_THAN_SIGN:{n.data+="<",this.state=C.COMMENT_LESS_THAN_SIGN;break}case y.NULL:{this._err(v.unexpectedNullCharacter),n.data+=_e;break}case y.EOF:{this._err(v.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case y.EXCLAMATION_MARK:{n.data+="!",this.state=C.COMMENT_LESS_THAN_SIGN_BANG;break}case y.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=C.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===y.HYPHEN_MINUS?this.state=C.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=C.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===y.HYPHEN_MINUS?this.state=C.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=C.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==y.GREATER_THAN_SIGN&&t!==y.EOF&&this._err(v.nestedComment),this.state=C.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case y.HYPHEN_MINUS:{this.state=C.COMMENT_END;break}case y.EOF:{this._err(v.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=C.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case y.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentComment(n);break}case y.EXCLAMATION_MARK:{this.state=C.COMMENT_END_BANG;break}case y.HYPHEN_MINUS:{n.data+="-";break}case y.EOF:{this._err(v.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=C.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case y.HYPHEN_MINUS:{n.data+="--!",this.state=C.COMMENT_END_DASH;break}case y.GREATER_THAN_SIGN:{this._err(v.incorrectlyClosedComment),this.state=C.DATA,this.emitCurrentComment(n);break}case y.EOF:{this._err(v.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=C.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:{this.state=C.BEFORE_DOCTYPE_NAME;break}case y.GREATER_THAN_SIGN:{this.state=C.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case y.EOF:{this._err(v.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(v.missingWhitespaceBeforeDoctypeName),this.state=C.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(zi(t))this._createDoctypeToken(String.fromCharCode(ms(t))),this.state=C.DOCTYPE_NAME;else switch(t){case y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:break;case y.NULL:{this._err(v.unexpectedNullCharacter),this._createDoctypeToken(_e),this.state=C.DOCTYPE_NAME;break}case y.GREATER_THAN_SIGN:{this._err(v.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case y.EOF:{this._err(v.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=C.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:{this.state=C.AFTER_DOCTYPE_NAME;break}case y.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentDoctype(n);break}case y.NULL:{this._err(v.unexpectedNullCharacter),n.name+=_e;break}case y.EOF:{this._err(v.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(zi(t)?ms(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:break;case y.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentDoctype(n);break}case y.EOF:{this._err(v.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(ft.PUBLIC,!1)?this.state=C.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(ft.SYSTEM,!1)?this.state=C.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(v.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:{this.state=C.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case y.QUOTATION_MARK:{this._err(v.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=C.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case y.APOSTROPHE:{this._err(v.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=C.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case y.GREATER_THAN_SIGN:{this._err(v.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=C.DATA,this.emitCurrentDoctype(n);break}case y.EOF:{this._err(v.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(v.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:break;case y.QUOTATION_MARK:{n.publicId="",this.state=C.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case y.APOSTROPHE:{n.publicId="",this.state=C.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case y.GREATER_THAN_SIGN:{this._err(v.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=C.DATA,this.emitCurrentDoctype(n);break}case y.EOF:{this._err(v.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(v.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case y.QUOTATION_MARK:{this.state=C.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case y.NULL:{this._err(v.unexpectedNullCharacter),n.publicId+=_e;break}case y.GREATER_THAN_SIGN:{this._err(v.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case y.EOF:{this._err(v.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case y.APOSTROPHE:{this.state=C.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case y.NULL:{this._err(v.unexpectedNullCharacter),n.publicId+=_e;break}case y.GREATER_THAN_SIGN:{this._err(v.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case y.EOF:{this._err(v.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:{this.state=C.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case y.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentDoctype(n);break}case y.QUOTATION_MARK:{this._err(v.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case y.APOSTROPHE:{this._err(v.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case y.EOF:{this._err(v.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(v.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:break;case y.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=C.DATA;break}case y.QUOTATION_MARK:{n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case y.APOSTROPHE:{n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case y.EOF:{this._err(v.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(v.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:{this.state=C.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case y.QUOTATION_MARK:{this._err(v.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case y.APOSTROPHE:{this._err(v.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case y.GREATER_THAN_SIGN:{this._err(v.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.DATA,this.emitCurrentDoctype(n);break}case y.EOF:{this._err(v.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(v.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:break;case y.QUOTATION_MARK:{n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case y.APOSTROPHE:{n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case y.GREATER_THAN_SIGN:{this._err(v.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.DATA,this.emitCurrentDoctype(n);break}case y.EOF:{this._err(v.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(v.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case y.QUOTATION_MARK:{this.state=C.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case y.NULL:{this._err(v.unexpectedNullCharacter),n.systemId+=_e;break}case y.GREATER_THAN_SIGN:{this._err(v.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case y.EOF:{this._err(v.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case y.APOSTROPHE:{this.state=C.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case y.NULL:{this._err(v.unexpectedNullCharacter),n.systemId+=_e;break}case y.GREATER_THAN_SIGN:{this._err(v.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case y.EOF:{this._err(v.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:break;case y.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=C.DATA;break}case y.EOF:{this._err(v.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(v.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case y.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=C.DATA;break}case y.NULL:{this._err(v.unexpectedNullCharacter);break}case y.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case y.RIGHT_SQUARE_BRACKET:{this.state=C.CDATA_SECTION_BRACKET;break}case y.EOF:{this._err(v.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===y.RIGHT_SQUARE_BRACKET?this.state=C.CDATA_SECTION_END:(this._emitChars("]"),this.state=C.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case y.GREATER_THAN_SIGN:{this.state=C.DATA;break}case y.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=C.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(y.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&W0(this.preprocessor.peek(1))?C.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){W0(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===y.SEMICOLON&&this._err(v.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}};const sb=new Set([p.DD,p.DT,p.LI,p.OPTGROUP,p.OPTION,p.P,p.RB,p.RP,p.RT,p.RTC]),z0=new Set([...sb,p.CAPTION,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]),ua=new Set([p.APPLET,p.CAPTION,p.HTML,p.MARQUEE,p.OBJECT,p.TABLE,p.TD,p.TEMPLATE,p.TH]),v8=new Set([...ua,p.OL,p.UL]),F8=new Set([...ua,p.BUTTON]),K0=new Set([p.ANNOTATION_XML,p.MI,p.MN,p.MO,p.MS,p.MTEXT]),q0=new Set([p.DESC,p.FOREIGN_OBJECT,p.TITLE]),P8=new Set([p.TR,p.TEMPLATE,p.HTML]),H8=new Set([p.TBODY,p.TFOOT,p.THEAD,p.TEMPLATE,p.HTML]),U8=new Set([p.TABLE,p.TEMPLATE,p.HTML]),W8=new Set([p.TD,p.TH]);class Q8{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=p.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===p.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===W.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==W.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(mc,W.HTML)}popUntilTableCellPopped(){this.popUntilPopped(W8,W.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(U8,W.HTML)}clearBackToTableBodyContext(){this.clearBackTo(H8,W.HTML)}clearBackToTableRowContext(){this.clearBackTo(P8,W.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===p.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===p.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case W.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case W.SVG:{if(q0.has(i))return!1;break}case W.MATHML:{if(K0.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,ua)}hasInListItemScope(t){return this.hasInDynamicScope(t,v8)}hasInButtonScope(t){return this.hasInDynamicScope(t,F8)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case W.HTML:{if(mc.has(n))return!0;if(ua.has(n))return!1;break}case W.SVG:{if(q0.has(n))return!1;break}case W.MATHML:{if(K0.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===W.HTML)switch(this.tagIDs[n]){case t:return!0;case p.TABLE:case p.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===W.HTML)switch(this.tagIDs[t]){case p.TBODY:case p.THEAD:case p.TFOOT:return!0;case p.TABLE:case p.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===W.HTML)switch(this.tagIDs[n]){case t:return!0;case p.OPTION:case p.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&sb.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&z0.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&z0.has(this.currentTagId);)this.pop()}}const el=3;var Zt;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Zt||(Zt={}));const Y0={type:Zt.Marker};class z8{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,u=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let a=0;a<this.entries.length;a++){const o=this.entries[a];if(o.type===Zt.Marker)break;const{element:l}=o;if(this.treeAdapter.getTagName(l)===u&&this.treeAdapter.getNamespaceURI(l)===s){const c=this.treeAdapter.getAttrList(l);c.length===i&&r.push({idx:a,attrs:c})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<el)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<el)return;const i=new Map(n.map(s=>[s.name,s.value]));let u=0;for(let s=0;s<r.length;s++){const a=r[s];a.attrs.every(o=>i.get(o.name)===o.value)&&(u+=1,u>=el&&this.entries.splice(a.idx,1))}}insertMarker(){this.entries.unshift(Y0)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Zt.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Zt.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(Y0);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Zt.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Zt.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Zt.Element&&n.element===t)}}const bn={createDocument(){return{nodeName:"#document",mode:Ct.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(u=>u.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const u={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};bn.appendChild(e,u)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(bn.isTextNode(n)){n.value+=t;return}}bn.appendChild(e,bn.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&bn.isTextNode(r)?r.value+=t:bn.insertBefore(e,bn.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},ab="html",K8="about:legacy-compat",q8="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",ob=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],Y8=[...ob,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],G8=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),lb=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],V8=[...lb,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function G0(e,t){return t.some(n=>e.startsWith(n))}function J8(e){return e.name===ab&&e.publicId===null&&(e.systemId===null||e.systemId===K8)}function j8(e){if(e.name!==ab)return Ct.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===q8)return Ct.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),G8.has(n))return Ct.QUIRKS;let r=t===null?Y8:ob;if(G0(n,r))return Ct.QUIRKS;if(r=t===null?lb:V8,G0(n,r))return Ct.LIMITED_QUIRKS}return Ct.NO_QUIRKS}const V0={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Z8="definitionurl",X8="definitionURL",$8=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),eD=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:W.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:W.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:W.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:W.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:W.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:W.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:W.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:W.XML}],["xml:space",{prefix:"xml",name:"space",namespace:W.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:W.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:W.XMLNS}]]),tD=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),nD=new Set([p.B,p.BIG,p.BLOCKQUOTE,p.BODY,p.BR,p.CENTER,p.CODE,p.DD,p.DIV,p.DL,p.DT,p.EM,p.EMBED,p.H1,p.H2,p.H3,p.H4,p.H5,p.H6,p.HEAD,p.HR,p.I,p.IMG,p.LI,p.LISTING,p.MENU,p.META,p.NOBR,p.OL,p.P,p.PRE,p.RUBY,p.S,p.SMALL,p.SPAN,p.STRONG,p.STRIKE,p.SUB,p.SUP,p.TABLE,p.TT,p.U,p.UL,p.VAR]);function rD(e){const t=e.tagID;return t===p.FONT&&e.attrs.some(({name:r})=>r===kr.COLOR||r===kr.SIZE||r===kr.FACE)||nD.has(t)}function cb(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Z8){e.attrs[t].name=X8;break}}function db(e){for(let t=0;t<e.attrs.length;t++){const n=$8.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function xf(e){for(let t=0;t<e.attrs.length;t++){const n=eD.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function iD(e){const t=tD.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Qa(e.tagName))}function uD(e,t){return t===W.MATHML&&(e===p.MI||e===p.MO||e===p.MN||e===p.MS||e===p.MTEXT)}function sD(e,t,n){if(t===W.MATHML&&e===p.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===kr.ENCODING){const i=n[r].value.toLowerCase();return i===V0.TEXT_HTML||i===V0.APPLICATION_XML}}return t===W.SVG&&(e===p.FOREIGN_OBJECT||e===p.DESC||e===p.TITLE)}function aD(e,t,n,r){return(!r||r===W.HTML)&&sD(e,t,n)||(!r||r===W.MATHML)&&uD(e,t)}const oD="hidden",lD=8,cD=3;var x;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(x||(x={}));const dD={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},fb=new Set([p.TABLE,p.TBODY,p.TFOOT,p.THEAD,p.TR]),J0={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:bn,onParseError:null};let hb=class{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=x.INITIAL,this.originalInsertionMode=x.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...J0,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new L8(this.options,this),this.activeFormattingElements=new z8(this.treeAdapter),this.fragmentContextID=r?Qa(this.treeAdapter.getTagName(r)):p.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new Q8(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...J0,...n};t??(t=r.treeAdapter.createElement(R.TEMPLATE,W.HTML,[]));const i=r.treeAdapter.createElement("documentmock",W.HTML,[]),u=new this(r,i,t);return u.fragmentContextID===p.TEMPLATE&&u.tmplInsertionModeStack.unshift(x.IN_TEMPLATE),u._initTokenizerForFragmentParsing(),u._insertFakeRootElement(),u._resetInsertionMode(),u._findFormInFragmentContext(),u}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const u=(i=t.location)!==null&&i!==void 0?i:dD,s={code:n,startLine:u.startLine,startCol:u.startCol,startOffset:u.startOffset,endLine:r?u.startLine:u.endLine,endCol:r?u.startCol:u.endCol,endOffset:r?u.startOffset:u.endOffset};this.onParseError(s)}onItemPush(t,n,r){var i,u;(u=(i=this.treeAdapter).onItemPush)===null||u===void 0||u.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let u,s;this.openElements.stackTop===0&&this.fragmentContext?(u=this.fragmentContext,s=this.fragmentContextID):{current:u,currentTagId:s}=this.openElements,this._setContextModes(u,s)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===W.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,W.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=x.TEXT}switchToPlaintextParsing(){this.insertionMode=x.TEXT,this.originalInsertionMode=x.IN_BODY,this.tokenizer.state=mt.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===R.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==W.HTML))switch(this.fragmentContextID){case p.TITLE:case p.TEXTAREA:{this.tokenizer.state=mt.RCDATA;break}case p.STYLE:case p.XMP:case p.IFRAME:case p.NOEMBED:case p.NOFRAMES:case p.NOSCRIPT:{this.tokenizer.state=mt.RAWTEXT;break}case p.SCRIPT:{this.tokenizer.state=mt.SCRIPT_DATA;break}case p.PLAINTEXT:{this.tokenizer.state=mt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const s=this.treeAdapter.getChildNodes(this.document).find(a=>this.treeAdapter.isDocumentTypeNode(a));s&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,W.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,W.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(R.HTML,W.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,p.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(n),u=r?i.lastIndexOf(r):i.length,s=i[u-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:o,endCol:l,endOffset:c}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:o,endCol:l,endOffset:c})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,i=this.treeAdapter.getTagName(t),u=n.type===Te.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,u)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===p.SVG&&this.treeAdapter.getTagName(n)===R.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===W.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===p.MGLYPH||t.tagID===p.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,W.HTML)}_processToken(t){switch(t.type){case Te.CHARACTER:{this.onCharacter(t);break}case Te.NULL_CHARACTER:{this.onNullCharacter(t);break}case Te.COMMENT:{this.onComment(t);break}case Te.DOCTYPE:{this.onDoctype(t);break}case Te.START_TAG:{this._processStartTag(t);break}case Te.END_TAG:{this.onEndTag(t);break}case Te.EOF:{this.onEof(t);break}case Te.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),u=this.treeAdapter.getAttrList(n);return aD(t,i,u,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===Zt.Marker||this.openElements.contains(i.element)),r=n===-1?t-1:n-1;for(let i=r;i>=0;i--){const u=this.activeFormattingElements.entries[i];this._insertElement(u.token,this.treeAdapter.getNamespaceURI(u.element)),u.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=x.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(p.P),this.openElements.popUntilTagNamePopped(p.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case p.TR:{this.insertionMode=x.IN_ROW;return}case p.TBODY:case p.THEAD:case p.TFOOT:{this.insertionMode=x.IN_TABLE_BODY;return}case p.CAPTION:{this.insertionMode=x.IN_CAPTION;return}case p.COLGROUP:{this.insertionMode=x.IN_COLUMN_GROUP;return}case p.TABLE:{this.insertionMode=x.IN_TABLE;return}case p.BODY:{this.insertionMode=x.IN_BODY;return}case p.FRAMESET:{this.insertionMode=x.IN_FRAMESET;return}case p.SELECT:{this._resetInsertionModeForSelect(t);return}case p.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case p.HTML:{this.insertionMode=this.headElement?x.AFTER_HEAD:x.BEFORE_HEAD;return}case p.TD:case p.TH:{if(t>0){this.insertionMode=x.IN_CELL;return}break}case p.HEAD:{if(t>0){this.insertionMode=x.IN_HEAD;return}break}}this.insertionMode=x.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===p.TEMPLATE)break;if(r===p.TABLE){this.insertionMode=x.IN_SELECT_IN_TABLE;return}}this.insertionMode=x.IN_SELECT}_isElementCausesFosterParenting(t){return fb.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case p.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===W.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case p.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return D8[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){W_(this,t);return}switch(this.insertionMode){case x.INITIAL:{Ri(this,t);break}case x.BEFORE_HTML:{ru(this,t);break}case x.BEFORE_HEAD:{iu(this,t);break}case x.IN_HEAD:{uu(this,t);break}case x.IN_HEAD_NO_SCRIPT:{su(this,t);break}case x.AFTER_HEAD:{au(this,t);break}case x.IN_BODY:case x.IN_CAPTION:case x.IN_CELL:case x.IN_TEMPLATE:{mb(this,t);break}case x.TEXT:case x.IN_SELECT:case x.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case x.IN_TABLE:case x.IN_TABLE_BODY:case x.IN_ROW:{tl(this,t);break}case x.IN_TABLE_TEXT:{Tb(this,t);break}case x.IN_COLUMN_GROUP:{sa(this,t);break}case x.AFTER_BODY:{aa(this,t);break}case x.AFTER_AFTER_BODY:{Bs(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){U_(this,t);return}switch(this.insertionMode){case x.INITIAL:{Ri(this,t);break}case x.BEFORE_HTML:{ru(this,t);break}case x.BEFORE_HEAD:{iu(this,t);break}case x.IN_HEAD:{uu(this,t);break}case x.IN_HEAD_NO_SCRIPT:{su(this,t);break}case x.AFTER_HEAD:{au(this,t);break}case x.TEXT:{this._insertCharacters(t);break}case x.IN_TABLE:case x.IN_TABLE_BODY:case x.IN_ROW:{tl(this,t);break}case x.IN_COLUMN_GROUP:{sa(this,t);break}case x.AFTER_BODY:{aa(this,t);break}case x.AFTER_AFTER_BODY:{Bs(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Ac(this,t);return}switch(this.insertionMode){case x.INITIAL:case x.BEFORE_HTML:case x.BEFORE_HEAD:case x.IN_HEAD:case x.IN_HEAD_NO_SCRIPT:case x.AFTER_HEAD:case x.IN_BODY:case x.IN_TABLE:case x.IN_CAPTION:case x.IN_COLUMN_GROUP:case x.IN_TABLE_BODY:case x.IN_ROW:case x.IN_CELL:case x.IN_SELECT:case x.IN_SELECT_IN_TABLE:case x.IN_TEMPLATE:case x.IN_FRAMESET:case x.AFTER_FRAMESET:{Ac(this,t);break}case x.IN_TABLE_TEXT:{Mi(this,t);break}case x.AFTER_BODY:{bD(this,t);break}case x.AFTER_AFTER_BODY:case x.AFTER_AFTER_FRAMESET:{ED(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case x.INITIAL:{yD(this,t);break}case x.BEFORE_HEAD:case x.IN_HEAD:case x.IN_HEAD_NO_SCRIPT:case x.AFTER_HEAD:{this._err(t,v.misplacedDoctype);break}case x.IN_TABLE_TEXT:{Mi(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,v.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?Q_(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case x.INITIAL:{Ri(this,t);break}case x.BEFORE_HTML:{TD(this,t);break}case x.BEFORE_HEAD:{xD(this,t);break}case x.IN_HEAD:{Gt(this,t);break}case x.IN_HEAD_NO_SCRIPT:{ID(this,t);break}case x.AFTER_HEAD:{ND(this,t);break}case x.IN_BODY:{ut(this,t);break}case x.IN_TABLE:{hi(this,t);break}case x.IN_TABLE_TEXT:{Mi(this,t);break}case x.IN_CAPTION:{k_(this,t);break}case x.IN_COLUMN_GROUP:{If(this,t);break}case x.IN_TABLE_BODY:{qa(this,t);break}case x.IN_ROW:{Ya(this,t);break}case x.IN_CELL:{w_(this,t);break}case x.IN_SELECT:{kb(this,t);break}case x.IN_SELECT_IN_TABLE:{D_(this,t);break}case x.IN_TEMPLATE:{O_(this,t);break}case x.AFTER_BODY:{M_(this,t);break}case x.IN_FRAMESET:{B_(this,t);break}case x.AFTER_FRAMESET:{v_(this,t);break}case x.AFTER_AFTER_BODY:{P_(this,t);break}case x.AFTER_AFTER_FRAMESET:{H_(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?z_(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case x.INITIAL:{Ri(this,t);break}case x.BEFORE_HTML:{CD(this,t);break}case x.BEFORE_HEAD:{kD(this,t);break}case x.IN_HEAD:{SD(this,t);break}case x.IN_HEAD_NO_SCRIPT:{wD(this,t);break}case x.AFTER_HEAD:{DD(this,t);break}case x.IN_BODY:{Ka(this,t);break}case x.TEXT:{p_(this,t);break}case x.IN_TABLE:{xu(this,t);break}case x.IN_TABLE_TEXT:{Mi(this,t);break}case x.IN_CAPTION:{S_(this,t);break}case x.IN_COLUMN_GROUP:{I_(this,t);break}case x.IN_TABLE_BODY:{gc(this,t);break}case x.IN_ROW:{xb(this,t);break}case x.IN_CELL:{N_(this,t);break}case x.IN_SELECT:{Sb(this,t);break}case x.IN_SELECT_IN_TABLE:{__(this,t);break}case x.IN_TEMPLATE:{R_(this,t);break}case x.AFTER_BODY:{wb(this,t);break}case x.IN_FRAMESET:{L_(this,t);break}case x.AFTER_FRAMESET:{F_(this,t);break}case x.AFTER_AFTER_BODY:{Bs(this,t);break}}}onEof(t){switch(this.insertionMode){case x.INITIAL:{Ri(this,t);break}case x.BEFORE_HTML:{ru(this,t);break}case x.BEFORE_HEAD:{iu(this,t);break}case x.IN_HEAD:{uu(this,t);break}case x.IN_HEAD_NO_SCRIPT:{su(this,t);break}case x.AFTER_HEAD:{au(this,t);break}case x.IN_BODY:case x.IN_TABLE:case x.IN_CAPTION:case x.IN_COLUMN_GROUP:case x.IN_TABLE_BODY:case x.IN_ROW:case x.IN_CELL:case x.IN_SELECT:case x.IN_SELECT_IN_TABLE:{Eb(this,t);break}case x.TEXT:{m_(this,t);break}case x.IN_TABLE_TEXT:{Mi(this,t);break}case x.IN_TEMPLATE:{Ib(this,t);break}case x.AFTER_BODY:case x.IN_FRAMESET:case x.AFTER_FRAMESET:case x.AFTER_AFTER_BODY:case x.AFTER_AFTER_FRAMESET:{Sf(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===y.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case x.IN_HEAD:case x.IN_HEAD_NO_SCRIPT:case x.AFTER_HEAD:case x.TEXT:case x.IN_COLUMN_GROUP:case x.IN_SELECT:case x.IN_SELECT_IN_TABLE:case x.IN_FRAMESET:case x.AFTER_FRAMESET:{this._insertCharacters(t);break}case x.IN_BODY:case x.IN_CAPTION:case x.IN_CELL:case x.IN_TEMPLATE:case x.AFTER_BODY:case x.AFTER_AFTER_BODY:case x.AFTER_AFTER_FRAMESET:{pb(this,t);break}case x.IN_TABLE:case x.IN_TABLE_BODY:case x.IN_ROW:{tl(this,t);break}case x.IN_TABLE_TEXT:{yb(this,t);break}}}};function fD(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):bb(e,t),n}function hD(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function pD(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let u=0,s=i;s!==n;u++,s=i){i=e.openElements.getCommonAncestor(s);const a=e.activeFormattingElements.getElementEntry(s),o=a&&u>=cD;!a||o?(o&&e.activeFormattingElements.removeEntry(a),e.openElements.remove(s)):(s=mD(e,a),r===t&&(e.activeFormattingElements.bookmark=a),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function mD(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function AD(e,t,n){const r=e.treeAdapter.getTagName(t),i=Qa(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const u=e.treeAdapter.getNamespaceURI(t);i===p.TEMPLATE&&u===W.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function gD(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,u=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,u),e.treeAdapter.appendChild(t,u),e.activeFormattingElements.insertElementAfterBookmark(u,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,u,i.tagID)}function kf(e,t){for(let n=0;n<lD;n++){const r=fD(e,t);if(!r)break;const i=hD(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const u=pD(e,i,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(u),s&&AD(e,s,u),gD(e,i,r)}}function Ac(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function bD(e,t){e._appendCommentNode(t,e.openElements.items[0])}function ED(e,t){e._appendCommentNode(t,e.document)}function Sf(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const u=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(u);s&&!s.endTag&&e._setEndLocation(u,t)}}}}function yD(e,t){e._setDocumentType(t);const n=t.forceQuirks?Ct.QUIRKS:j8(t);J8(t)||e._err(t,v.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=x.BEFORE_HTML}function Ri(e,t){e._err(t,v.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Ct.QUIRKS),e.insertionMode=x.BEFORE_HTML,e._processToken(t)}function TD(e,t){t.tagID===p.HTML?(e._insertElement(t,W.HTML),e.insertionMode=x.BEFORE_HEAD):ru(e,t)}function CD(e,t){const n=t.tagID;(n===p.HTML||n===p.HEAD||n===p.BODY||n===p.BR)&&ru(e,t)}function ru(e,t){e._insertFakeRootElement(),e.insertionMode=x.BEFORE_HEAD,e._processToken(t)}function xD(e,t){switch(t.tagID){case p.HTML:{ut(e,t);break}case p.HEAD:{e._insertElement(t,W.HTML),e.headElement=e.openElements.current,e.insertionMode=x.IN_HEAD;break}default:iu(e,t)}}function kD(e,t){const n=t.tagID;n===p.HEAD||n===p.BODY||n===p.HTML||n===p.BR?iu(e,t):e._err(t,v.endTagWithoutMatchingOpenElement)}function iu(e,t){e._insertFakeElement(R.HEAD,p.HEAD),e.headElement=e.openElements.current,e.insertionMode=x.IN_HEAD,e._processToken(t)}function Gt(e,t){switch(t.tagID){case p.HTML:{ut(e,t);break}case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:{e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break}case p.TITLE:{e._switchToTextParsing(t,mt.RCDATA);break}case p.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,mt.RAWTEXT):(e._insertElement(t,W.HTML),e.insertionMode=x.IN_HEAD_NO_SCRIPT);break}case p.NOFRAMES:case p.STYLE:{e._switchToTextParsing(t,mt.RAWTEXT);break}case p.SCRIPT:{e._switchToTextParsing(t,mt.SCRIPT_DATA);break}case p.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=x.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(x.IN_TEMPLATE);break}case p.HEAD:{e._err(t,v.misplacedStartTagForHeadElement);break}default:uu(e,t)}}function SD(e,t){switch(t.tagID){case p.HEAD:{e.openElements.pop(),e.insertionMode=x.AFTER_HEAD;break}case p.BODY:case p.BR:case p.HTML:{uu(e,t);break}case p.TEMPLATE:{Wr(e,t);break}default:e._err(t,v.endTagWithoutMatchingOpenElement)}}function Wr(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==p.TEMPLATE&&e._err(t,v.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,v.endTagWithoutMatchingOpenElement)}function uu(e,t){e.openElements.pop(),e.insertionMode=x.AFTER_HEAD,e._processToken(t)}function ID(e,t){switch(t.tagID){case p.HTML:{ut(e,t);break}case p.BASEFONT:case p.BGSOUND:case p.HEAD:case p.LINK:case p.META:case p.NOFRAMES:case p.STYLE:{Gt(e,t);break}case p.NOSCRIPT:{e._err(t,v.nestedNoscriptInHead);break}default:su(e,t)}}function wD(e,t){switch(t.tagID){case p.NOSCRIPT:{e.openElements.pop(),e.insertionMode=x.IN_HEAD;break}case p.BR:{su(e,t);break}default:e._err(t,v.endTagWithoutMatchingOpenElement)}}function su(e,t){const n=t.type===Te.EOF?v.openElementsLeftAfterEof:v.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=x.IN_HEAD,e._processToken(t)}function ND(e,t){switch(t.tagID){case p.HTML:{ut(e,t);break}case p.BODY:{e._insertElement(t,W.HTML),e.framesetOk=!1,e.insertionMode=x.IN_BODY;break}case p.FRAMESET:{e._insertElement(t,W.HTML),e.insertionMode=x.IN_FRAMESET;break}case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:case p.NOFRAMES:case p.SCRIPT:case p.STYLE:case p.TEMPLATE:case p.TITLE:{e._err(t,v.abandonedHeadElementChild),e.openElements.push(e.headElement,p.HEAD),Gt(e,t),e.openElements.remove(e.headElement);break}case p.HEAD:{e._err(t,v.misplacedStartTagForHeadElement);break}default:au(e,t)}}function DD(e,t){switch(t.tagID){case p.BODY:case p.HTML:case p.BR:{au(e,t);break}case p.TEMPLATE:{Wr(e,t);break}default:e._err(t,v.endTagWithoutMatchingOpenElement)}}function au(e,t){e._insertFakeElement(R.BODY,p.BODY),e.insertionMode=x.IN_BODY,za(e,t)}function za(e,t){switch(t.type){case Te.CHARACTER:{mb(e,t);break}case Te.WHITESPACE_CHARACTER:{pb(e,t);break}case Te.COMMENT:{Ac(e,t);break}case Te.START_TAG:{ut(e,t);break}case Te.END_TAG:{Ka(e,t);break}case Te.EOF:{Eb(e,t);break}}}function pb(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function mb(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function _D(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function OD(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function RD(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,W.HTML),e.insertionMode=x.IN_FRAMESET)}function MD(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,W.HTML)}function BD(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&mc.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,W.HTML)}function LD(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,W.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function vD(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,W.HTML),n||(e.formElement=e.openElements.current))}function FD(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===p.LI&&i===p.LI||(n===p.DD||n===p.DT)&&(i===p.DD||i===p.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==p.ADDRESS&&i!==p.DIV&&i!==p.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,W.HTML)}function PD(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,W.HTML),e.tokenizer.state=mt.PLAINTEXT}function HD(e,t){e.openElements.hasInScope(p.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.framesetOk=!1}function UD(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(R.A);n&&(kf(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function WD(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function QD(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(p.NOBR)&&(kf(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,W.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function zD(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function KD(e,t){e.treeAdapter.getDocumentMode(e.document)!==Ct.QUIRKS&&e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,W.HTML),e.framesetOk=!1,e.insertionMode=x.IN_TABLE}function Ab(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,W.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function gb(e){const t=ib(e,kr.TYPE);return t!=null&&t.toLowerCase()===oD}function qD(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,W.HTML),gb(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function YD(e,t){e._appendElement(t,W.HTML),t.ackSelfClosing=!0}function GD(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._appendElement(t,W.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function VD(e,t){t.tagName=R.IMG,t.tagID=p.IMG,Ab(e,t)}function JD(e,t){e._insertElement(t,W.HTML),e.skipNextNewLine=!0,e.tokenizer.state=mt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=x.TEXT}function jD(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,mt.RAWTEXT)}function ZD(e,t){e.framesetOk=!1,e._switchToTextParsing(t,mt.RAWTEXT)}function j0(e,t){e._switchToTextParsing(t,mt.RAWTEXT)}function XD(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===x.IN_TABLE||e.insertionMode===x.IN_CAPTION||e.insertionMode===x.IN_TABLE_BODY||e.insertionMode===x.IN_ROW||e.insertionMode===x.IN_CELL?x.IN_SELECT_IN_TABLE:x.IN_SELECT}function $D(e,t){e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML)}function e_(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,W.HTML)}function t_(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(p.RTC),e._insertElement(t,W.HTML)}function n_(e,t){e._reconstructActiveFormattingElements(),cb(t),xf(t),t.selfClosing?e._appendElement(t,W.MATHML):e._insertElement(t,W.MATHML),t.ackSelfClosing=!0}function r_(e,t){e._reconstructActiveFormattingElements(),db(t),xf(t),t.selfClosing?e._appendElement(t,W.SVG):e._insertElement(t,W.SVG),t.ackSelfClosing=!0}function Z0(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML)}function ut(e,t){switch(t.tagID){case p.I:case p.S:case p.B:case p.U:case p.EM:case p.TT:case p.BIG:case p.CODE:case p.FONT:case p.SMALL:case p.STRIKE:case p.STRONG:{WD(e,t);break}case p.A:{UD(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{BD(e,t);break}case p.P:case p.DL:case p.OL:case p.UL:case p.DIV:case p.DIR:case p.NAV:case p.MAIN:case p.MENU:case p.ASIDE:case p.CENTER:case p.FIGURE:case p.FOOTER:case p.HEADER:case p.HGROUP:case p.DIALOG:case p.DETAILS:case p.ADDRESS:case p.ARTICLE:case p.SEARCH:case p.SECTION:case p.SUMMARY:case p.FIELDSET:case p.BLOCKQUOTE:case p.FIGCAPTION:{MD(e,t);break}case p.LI:case p.DD:case p.DT:{FD(e,t);break}case p.BR:case p.IMG:case p.WBR:case p.AREA:case p.EMBED:case p.KEYGEN:{Ab(e,t);break}case p.HR:{GD(e,t);break}case p.RB:case p.RTC:{e_(e,t);break}case p.RT:case p.RP:{t_(e,t);break}case p.PRE:case p.LISTING:{LD(e,t);break}case p.XMP:{jD(e,t);break}case p.SVG:{r_(e,t);break}case p.HTML:{_D(e,t);break}case p.BASE:case p.LINK:case p.META:case p.STYLE:case p.TITLE:case p.SCRIPT:case p.BGSOUND:case p.BASEFONT:case p.TEMPLATE:{Gt(e,t);break}case p.BODY:{OD(e,t);break}case p.FORM:{vD(e,t);break}case p.NOBR:{QD(e,t);break}case p.MATH:{n_(e,t);break}case p.TABLE:{KD(e,t);break}case p.INPUT:{qD(e,t);break}case p.PARAM:case p.TRACK:case p.SOURCE:{YD(e,t);break}case p.IMAGE:{VD(e,t);break}case p.BUTTON:{HD(e,t);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{zD(e,t);break}case p.IFRAME:{ZD(e,t);break}case p.SELECT:{XD(e,t);break}case p.OPTION:case p.OPTGROUP:{$D(e,t);break}case p.NOEMBED:case p.NOFRAMES:{j0(e,t);break}case p.FRAMESET:{RD(e,t);break}case p.TEXTAREA:{JD(e,t);break}case p.NOSCRIPT:{e.options.scriptingEnabled?j0(e,t):Z0(e,t);break}case p.PLAINTEXT:{PD(e,t);break}case p.COL:case p.TH:case p.TD:case p.TR:case p.HEAD:case p.FRAME:case p.TBODY:case p.TFOOT:case p.THEAD:case p.CAPTION:case p.COLGROUP:break;default:Z0(e,t)}}function i_(e,t){if(e.openElements.hasInScope(p.BODY)&&(e.insertionMode=x.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function u_(e,t){e.openElements.hasInScope(p.BODY)&&(e.insertionMode=x.AFTER_BODY,wb(e,t))}function s_(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function a_(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(p.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(p.FORM):n&&e.openElements.remove(n))}function o_(e){e.openElements.hasInButtonScope(p.P)||e._insertFakeElement(R.P,p.P),e._closePElement()}function l_(e){e.openElements.hasInListItemScope(p.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(p.LI),e.openElements.popUntilTagNamePopped(p.LI))}function c_(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function d_(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function f_(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function h_(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(R.BR,p.BR),e.openElements.pop(),e.framesetOk=!1}function bb(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const u=e.openElements.items[i],s=e.openElements.tagIDs[i];if(r===s&&(r!==p.UNKNOWN||e.treeAdapter.getTagName(u)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(u,s))break}}function Ka(e,t){switch(t.tagID){case p.A:case p.B:case p.I:case p.S:case p.U:case p.EM:case p.TT:case p.BIG:case p.CODE:case p.FONT:case p.NOBR:case p.SMALL:case p.STRIKE:case p.STRONG:{kf(e,t);break}case p.P:{o_(e);break}case p.DL:case p.UL:case p.OL:case p.DIR:case p.DIV:case p.NAV:case p.PRE:case p.MAIN:case p.MENU:case p.ASIDE:case p.BUTTON:case p.CENTER:case p.FIGURE:case p.FOOTER:case p.HEADER:case p.HGROUP:case p.DIALOG:case p.ADDRESS:case p.ARTICLE:case p.DETAILS:case p.SEARCH:case p.SECTION:case p.SUMMARY:case p.LISTING:case p.FIELDSET:case p.BLOCKQUOTE:case p.FIGCAPTION:{s_(e,t);break}case p.LI:{l_(e);break}case p.DD:case p.DT:{c_(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{d_(e);break}case p.BR:{h_(e);break}case p.BODY:{i_(e,t);break}case p.HTML:{u_(e,t);break}case p.FORM:{a_(e);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{f_(e,t);break}case p.TEMPLATE:{Wr(e,t);break}default:bb(e,t)}}function Eb(e,t){e.tmplInsertionModeStack.length>0?Ib(e,t):Sf(e,t)}function p_(e,t){var n;t.tagID===p.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function m_(e,t){e._err(t,v.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function tl(e,t){if(e.openElements.currentTagId!==void 0&&fb.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=x.IN_TABLE_TEXT,t.type){case Te.CHARACTER:{Tb(e,t);break}case Te.WHITESPACE_CHARACTER:{yb(e,t);break}}else Xu(e,t)}function A_(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,W.HTML),e.insertionMode=x.IN_CAPTION}function g_(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,W.HTML),e.insertionMode=x.IN_COLUMN_GROUP}function b_(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(R.COLGROUP,p.COLGROUP),e.insertionMode=x.IN_COLUMN_GROUP,If(e,t)}function E_(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,W.HTML),e.insertionMode=x.IN_TABLE_BODY}function y_(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(R.TBODY,p.TBODY),e.insertionMode=x.IN_TABLE_BODY,qa(e,t)}function T_(e,t){e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function C_(e,t){gb(t)?e._appendElement(t,W.HTML):Xu(e,t),t.ackSelfClosing=!0}function x_(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,W.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function hi(e,t){switch(t.tagID){case p.TD:case p.TH:case p.TR:{y_(e,t);break}case p.STYLE:case p.SCRIPT:case p.TEMPLATE:{Gt(e,t);break}case p.COL:{b_(e,t);break}case p.FORM:{x_(e,t);break}case p.TABLE:{T_(e,t);break}case p.TBODY:case p.TFOOT:case p.THEAD:{E_(e,t);break}case p.INPUT:{C_(e,t);break}case p.CAPTION:{A_(e,t);break}case p.COLGROUP:{g_(e,t);break}default:Xu(e,t)}}function xu(e,t){switch(t.tagID){case p.TABLE:{e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode());break}case p.TEMPLATE:{Wr(e,t);break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TBODY:case p.TD:case p.TFOOT:case p.TH:case p.THEAD:case p.TR:break;default:Xu(e,t)}}function Xu(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,za(e,t),e.fosterParentingEnabled=n}function yb(e,t){e.pendingCharacterTokens.push(t)}function Tb(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Mi(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Xu(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Cb=new Set([p.CAPTION,p.COL,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]);function k_(e,t){const n=t.tagID;Cb.has(n)?e.openElements.hasInTableScope(p.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=x.IN_TABLE,hi(e,t)):ut(e,t)}function S_(e,t){const n=t.tagID;switch(n){case p.CAPTION:case p.TABLE:{e.openElements.hasInTableScope(p.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=x.IN_TABLE,n===p.TABLE&&xu(e,t));break}case p.BODY:case p.COL:case p.COLGROUP:case p.HTML:case p.TBODY:case p.TD:case p.TFOOT:case p.TH:case p.THEAD:case p.TR:break;default:Ka(e,t)}}function If(e,t){switch(t.tagID){case p.HTML:{ut(e,t);break}case p.COL:{e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break}case p.TEMPLATE:{Gt(e,t);break}default:sa(e,t)}}function I_(e,t){switch(t.tagID){case p.COLGROUP:{e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=x.IN_TABLE);break}case p.TEMPLATE:{Wr(e,t);break}case p.COL:break;default:sa(e,t)}}function sa(e,t){e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=x.IN_TABLE,e._processToken(t))}function qa(e,t){switch(t.tagID){case p.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,W.HTML),e.insertionMode=x.IN_ROW;break}case p.TH:case p.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(R.TR,p.TR),e.insertionMode=x.IN_ROW,Ya(e,t);break}case p.CAPTION:case p.COL:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=x.IN_TABLE,hi(e,t));break}default:hi(e,t)}}function gc(e,t){const n=t.tagID;switch(t.tagID){case p.TBODY:case p.TFOOT:case p.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=x.IN_TABLE);break}case p.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=x.IN_TABLE,xu(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TD:case p.TH:case p.TR:break;default:xu(e,t)}}function Ya(e,t){switch(t.tagID){case p.TH:case p.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,W.HTML),e.insertionMode=x.IN_CELL,e.activeFormattingElements.insertMarker();break}case p.CAPTION:case p.COL:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:case p.TR:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=x.IN_TABLE_BODY,qa(e,t));break}default:hi(e,t)}}function xb(e,t){switch(t.tagID){case p.TR:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=x.IN_TABLE_BODY);break}case p.TABLE:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=x.IN_TABLE_BODY,gc(e,t));break}case p.TBODY:case p.TFOOT:case p.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(p.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=x.IN_TABLE_BODY,gc(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TD:case p.TH:break;default:xu(e,t)}}function w_(e,t){const n=t.tagID;Cb.has(n)?(e.openElements.hasInTableScope(p.TD)||e.openElements.hasInTableScope(p.TH))&&(e._closeTableCell(),Ya(e,t)):ut(e,t)}function N_(e,t){const n=t.tagID;switch(n){case p.TD:case p.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=x.IN_ROW);break}case p.TABLE:case p.TBODY:case p.TFOOT:case p.THEAD:case p.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),xb(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:break;default:Ka(e,t)}}function kb(e,t){switch(t.tagID){case p.HTML:{ut(e,t);break}case p.OPTION:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._insertElement(t,W.HTML);break}case p.OPTGROUP:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop(),e._insertElement(t,W.HTML);break}case p.HR:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop(),e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break}case p.INPUT:case p.KEYGEN:case p.TEXTAREA:case p.SELECT:{e.openElements.hasInSelectScope(p.SELECT)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),t.tagID!==p.SELECT&&e._processStartTag(t));break}case p.SCRIPT:case p.TEMPLATE:{Gt(e,t);break}}}function Sb(e,t){switch(t.tagID){case p.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===p.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===p.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop();break}case p.OPTION:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop();break}case p.SELECT:{e.openElements.hasInSelectScope(p.SELECT)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode());break}case p.TEMPLATE:{Wr(e,t);break}}}function D_(e,t){const n=t.tagID;n===p.CAPTION||n===p.TABLE||n===p.TBODY||n===p.TFOOT||n===p.THEAD||n===p.TR||n===p.TD||n===p.TH?(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),e._processStartTag(t)):kb(e,t)}function __(e,t){const n=t.tagID;n===p.CAPTION||n===p.TABLE||n===p.TBODY||n===p.TFOOT||n===p.THEAD||n===p.TR||n===p.TD||n===p.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Sb(e,t)}function O_(e,t){switch(t.tagID){case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:case p.NOFRAMES:case p.SCRIPT:case p.STYLE:case p.TEMPLATE:case p.TITLE:{Gt(e,t);break}case p.CAPTION:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:{e.tmplInsertionModeStack[0]=x.IN_TABLE,e.insertionMode=x.IN_TABLE,hi(e,t);break}case p.COL:{e.tmplInsertionModeStack[0]=x.IN_COLUMN_GROUP,e.insertionMode=x.IN_COLUMN_GROUP,If(e,t);break}case p.TR:{e.tmplInsertionModeStack[0]=x.IN_TABLE_BODY,e.insertionMode=x.IN_TABLE_BODY,qa(e,t);break}case p.TD:case p.TH:{e.tmplInsertionModeStack[0]=x.IN_ROW,e.insertionMode=x.IN_ROW,Ya(e,t);break}default:e.tmplInsertionModeStack[0]=x.IN_BODY,e.insertionMode=x.IN_BODY,ut(e,t)}}function R_(e,t){t.tagID===p.TEMPLATE&&Wr(e,t)}function Ib(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Sf(e,t)}function M_(e,t){t.tagID===p.HTML?ut(e,t):aa(e,t)}function wb(e,t){var n;if(t.tagID===p.HTML){if(e.fragmentContext||(e.insertionMode=x.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===p.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else aa(e,t)}function aa(e,t){e.insertionMode=x.IN_BODY,za(e,t)}function B_(e,t){switch(t.tagID){case p.HTML:{ut(e,t);break}case p.FRAMESET:{e._insertElement(t,W.HTML);break}case p.FRAME:{e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break}case p.NOFRAMES:{Gt(e,t);break}}}function L_(e,t){t.tagID===p.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==p.FRAMESET&&(e.insertionMode=x.AFTER_FRAMESET))}function v_(e,t){switch(t.tagID){case p.HTML:{ut(e,t);break}case p.NOFRAMES:{Gt(e,t);break}}}function F_(e,t){t.tagID===p.HTML&&(e.insertionMode=x.AFTER_AFTER_FRAMESET)}function P_(e,t){t.tagID===p.HTML?ut(e,t):Bs(e,t)}function Bs(e,t){e.insertionMode=x.IN_BODY,za(e,t)}function H_(e,t){switch(t.tagID){case p.HTML:{ut(e,t);break}case p.NOFRAMES:{Gt(e,t);break}}}function U_(e,t){t.chars=_e,e._insertCharacters(t)}function W_(e,t){e._insertCharacters(t),e.framesetOk=!1}function Nb(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==W.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Q_(e,t){if(rD(t))Nb(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===W.MATHML?cb(t):r===W.SVG&&(iD(t),db(t)),xf(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function z_(e,t){if(t.tagID===p.P||t.tagID===p.BR){Nb(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===W.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}function Db(e,t){return function(r){let i,u=0,s="";for(;i=e.exec(r);)u!==i.index&&(s+=r.substring(u,i.index)),s+=t.get(i[0].charCodeAt(0)),u=i.index+1;return s+r.substring(u)}}const K_=Db(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),q_=Db(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]])),Y_=new Set([R.AREA,R.BASE,R.BASEFONT,R.BGSOUND,R.BR,R.COL,R.EMBED,R.FRAME,R.HR,R.IMG,R.INPUT,R.KEYGEN,R.LINK,R.META,R.PARAM,R.SOURCE,R.TRACK,R.WBR]);function G_(e,t){return t.treeAdapter.isElementNode(e)&&t.treeAdapter.getNamespaceURI(e)===W.HTML&&Y_.has(t.treeAdapter.getTagName(e))}const V_={treeAdapter:bn,scriptingEnabled:!0};function J_(e,t){const n={...V_,...t};return _b(e,n)}function j_(e,t){let n="";const r=t.treeAdapter.isElementNode(e)&&t.treeAdapter.getTagName(e)===R.TEMPLATE&&t.treeAdapter.getNamespaceURI(e)===W.HTML?t.treeAdapter.getTemplateContent(e):e,i=t.treeAdapter.getChildNodes(r);if(i)for(const u of i)n+=_b(u,t);return n}function _b(e,t){return t.treeAdapter.isElementNode(e)?Z_(e,t):t.treeAdapter.isTextNode(e)?$_(e,t):t.treeAdapter.isCommentNode(e)?eO(e,t):t.treeAdapter.isDocumentTypeNode(e)?tO(e,t):""}function Z_(e,t){const n=t.treeAdapter.getTagName(e);return`<${n}${X_(e,t)}>${G_(e,t)?"":`${j_(e,t)}</${n}>`}`}function X_(e,{treeAdapter:t}){let n="";for(const r of t.getAttrList(e)){if(n+=" ",r.namespace)switch(r.namespace){case W.XML:{n+=`xml:${r.name}`;break}case W.XMLNS:{r.name!=="xmlns"&&(n+="xmlns:"),n+=r.name;break}case W.XLINK:{n+=`xlink:${r.name}`;break}default:n+=`${r.prefix}:${r.name}`}else n+=r.name;n+=`="${K_(r.value)}"`}return n}function $_(e,t){const{treeAdapter:n}=t,r=n.getTextNodeContent(e),i=n.getParentNode(e),u=i&&n.isElementNode(i)&&n.getTagName(i);return u&&n.getNamespaceURI(i)===W.HTML&&O8(u,t.scriptingEnabled)?r:q_(r)}function eO(e,{treeAdapter:t}){return`<!--${t.getCommentNodeContent(e)}-->`}function tO(e,{treeAdapter:t}){return`<!DOCTYPE ${t.getDocumentTypeNodeName(e)}>`}function nO(e,t){return hb.parse(e,t)}function rO(e,t,n){typeof e=="string"&&(n=t,t=e,e=null);const r=hb.getFragmentParser(e,n);return r.tokenizer.write(t,!0),r.getFragment()}function X0(e){const t=e.includes('"')?"'":'"';return t+e+t}function iO(e,t,n){let r="!DOCTYPE ";return e&&(r+=e),t?r+=` PUBLIC ${X0(t)}`:n&&(r+=" SYSTEM"),n&&(r+=` ${X0(n)}`),r}const Un={isCommentNode:Fa,isElementNode:ae,isTextNode:tn,createDocument(){const e=new Lr([]);return e["x-mode"]=Ct.NO_QUIRKS,e},createDocumentFragment(){return new Lr([])},createElement(e,t,n){const r=Object.create(null),i=Object.create(null),u=Object.create(null);for(let a=0;a<n.length;a++){const o=n[a].name;r[o]=n[a].value,i[o]=n[a].namespace,u[o]=n[a].prefix}const s=new of(e,r,[]);return s.namespace=t,s["x-attribsNamespace"]=i,s["x-attribsPrefix"]=u,s},createCommentNode(e){return new uf(e)},createTextNode(e){return new bu(e)},appendChild(e,t){const n=e.children[e.children.length-1];n&&(n.next=t,t.prev=n),e.children.push(t),t.parent=e},insertBefore(e,t,n){const r=e.children.indexOf(n),{prev:i}=n;i&&(i.next=t,t.prev=i),n.prev=t,t.next=n,e.children.splice(r,0,t),t.parent=e},setTemplateContent(e,t){Un.appendChild(e,t)},getTemplateContent(e){return e.children[0]},setDocumentType(e,t,n,r){const i=iO(t,n,r);let u=e.children.find(s=>sc(s)&&s.name==="!doctype");u?u.data=i??null:(u=new sf("!doctype",i),Un.appendChild(e,u)),u["x-name"]=t,u["x-publicId"]=n,u["x-systemId"]=r},setDocumentMode(e,t){e["x-mode"]=t},getDocumentMode(e){return e["x-mode"]},detachNode(e){if(e.parent){const t=e.parent.children.indexOf(e),{prev:n,next:r}=e;e.prev=null,e.next=null,n&&(n.next=r),r&&(r.prev=n),e.parent.children.splice(t,1),e.parent=null}},insertText(e,t){const n=e.children[e.children.length-1];n&&tn(n)?n.data+=t:Un.appendChild(e,Un.createTextNode(t))},insertTextBefore(e,t,n){const r=e.children[e.children.indexOf(n)-1];r&&tn(r)?r.data+=t:Un.insertBefore(e,Un.createTextNode(t),n)},adoptAttributes(e,t){for(let n=0;n<t.length;n++){const r=t[n].name;e.attribs[r]===void 0&&(e.attribs[r]=t[n].value,e["x-attribsNamespace"][r]=t[n].namespace,e["x-attribsPrefix"][r]=t[n].prefix)}},getFirstChild(e){return e.children[0]},getChildNodes(e){return e.children},getParentNode(e){return e.parent},getAttrList(e){return e.attributes},getTagName(e){return e.name},getNamespaceURI(e){return e.namespace},getTextNodeContent(e){return e.data},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){var t;return(t=e["x-name"])!==null&&t!==void 0?t:""},getDocumentTypeNodePublicId(e){var t;return(t=e["x-publicId"])!==null&&t!==void 0?t:""},getDocumentTypeNodeSystemId(e){var t;return(t=e["x-systemId"])!==null&&t!==void 0?t:""},isDocumentTypeNode(e){return sc(e)&&e.name==="!doctype"},setNodeSourceCodeLocation(e,t){t&&(e.startIndex=t.startOffset,e.endIndex=t.endOffset),e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){t.endOffset!=null&&(e.endIndex=t.endOffset),e.sourceCodeLocation={...e.sourceCodeLocation,...t}}};function uO(e,t,n,r){var i;return(i=t.treeAdapter)!==null&&i!==void 0||(t.treeAdapter=Un),t.scriptingEnabled!==!1&&(t.scriptingEnabled=!0),n?nO(e,t):rO(r,e,t)}const sO={treeAdapter:Un};function aO(e){const t="length"in e?e:[e];for(let r=0;r<t.length;r+=1){const i=t[r];sr(i)&&Array.prototype.splice.call(t,r,1,...i.children)}let n="";for(let r=0;r<t.length;r+=1){const i=t[r];n+=J_(i,sO)}return n}const Ob=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),Rb=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var nl;const oO=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]]),bc=(nl=String.fromCodePoint)!==null&&nl!==void 0?nl: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 lO(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=oO.get(e))!==null&&t!==void 0?t:e}var Ye;(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"})(Ye||(Ye={}));const cO=32;var Vn;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Vn||(Vn={}));function Ec(e){return e>=Ye.ZERO&&e<=Ye.NINE}function dO(e){return e>=Ye.UPPER_A&&e<=Ye.UPPER_F||e>=Ye.LOWER_A&&e<=Ye.LOWER_F}function fO(e){return e>=Ye.UPPER_A&&e<=Ye.UPPER_Z||e>=Ye.LOWER_A&&e<=Ye.LOWER_Z||Ec(e)}function hO(e){return e===Ye.EQUALS||fO(e)}var Ke;(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"})(Ke||(Ke={}));var Xt;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Xt||(Xt={}));class Mb{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Ke.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Xt.Strict}startEntity(t){this.decodeMode=t,this.state=Ke.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Ke.EntityStart:return t.charCodeAt(n)===Ye.NUM?(this.state=Ke.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Ke.NamedEntity,this.stateNamedEntity(t,n));case Ke.NumericStart:return this.stateNumericStart(t,n);case Ke.NumericDecimal:return this.stateNumericDecimal(t,n);case Ke.NumericHex:return this.stateNumericHex(t,n);case Ke.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|cO)===Ye.LOWER_X?(this.state=Ke.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Ke.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const u=r-n;this.result=this.result*Math.pow(i,u)+parseInt(t.substr(n,u),i),this.consumed+=u}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(Ec(i)||dO(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(Ec(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Ye.SEMI)this.consumed+=1;else if(this.decodeMode===Xt.Strict)return 0;return this.emitCodePoint(lO(this.result),this.consumed),this.errors&&(t!==Ye.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],u=(i&Vn.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=pO(r,i,this.treeIndex+Math.max(1,u),s),this.treeIndex<0)return this.result===0||this.decodeMode===Xt.Attribute&&(u===0||hO(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],u=(i&Vn.VALUE_LENGTH)>>14,u!==0){if(s===Ye.SEMI)return this.emitNamedEntityData(this.treeIndex,u,this.consumed+this.excess);this.decodeMode!==Xt.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&Vn.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~Vn.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case Ke.NamedEntity:return this.result!==0&&(this.decodeMode!==Xt.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ke.NumericDecimal:return this.emitNumericEntity(0,2);case Ke.NumericHex:return this.emitNumericEntity(0,3);case Ke.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ke.EntityStart:return 0}}}function Bb(e){let t="";const n=new Mb(e,r=>t+=bc(r));return function(i,u){let s=0,a=0;for(;(a=i.indexOf("&",a))>=0;){t+=i.slice(s,a),n.startEntity(u);const l=n.write(i,a+1);if(l<0){s=a+n.end();break}s=a+l,a=l===0?s+1:s}const o=t+i.slice(s);return t="",o}}function pO(e,t,n,r){const i=(t&Vn.BRANCH_LENGTH)>>7,u=t&Vn.JUMP_TABLE;if(i===0)return u!==0&&r===u?n:-1;if(u){const o=r-u;return o<0||o>=i?-1:e[n+o]-1}let s=n,a=s+i-1;for(;s<=a;){const o=s+a>>>1,l=e[o];if(l<r)s=o+1;else if(l>r)a=o-1;else return e[o+i]}return-1}Bb(Ob);Bb(Rb);var re;(function(e){e[e.Tab=9]="Tab",e[e.NewLine=10]="NewLine",e[e.FormFeed=12]="FormFeed",e[e.CarriageReturn=13]="CarriageReturn",e[e.Space=32]="Space",e[e.ExclamationMark=33]="ExclamationMark",e[e.Number=35]="Number",e[e.Amp=38]="Amp",e[e.SingleQuote=39]="SingleQuote",e[e.DoubleQuote=34]="DoubleQuote",e[e.Dash=45]="Dash",e[e.Slash=47]="Slash",e[e.Zero=48]="Zero",e[e.Nine=57]="Nine",e[e.Semi=59]="Semi",e[e.Lt=60]="Lt",e[e.Eq=61]="Eq",e[e.Gt=62]="Gt",e[e.Questionmark=63]="Questionmark",e[e.UpperA=65]="UpperA",e[e.LowerA=97]="LowerA",e[e.UpperF=70]="UpperF",e[e.LowerF=102]="LowerF",e[e.UpperZ=90]="UpperZ",e[e.LowerZ=122]="LowerZ",e[e.LowerX=120]="LowerX",e[e.OpeningSquareBracket=91]="OpeningSquareBracket"})(re||(re={}));var K;(function(e){e[e.Text=1]="Text",e[e.BeforeTagName=2]="BeforeTagName",e[e.InTagName=3]="InTagName",e[e.InSelfClosingTag=4]="InSelfClosingTag",e[e.BeforeClosingTagName=5]="BeforeClosingTagName",e[e.InClosingTagName=6]="InClosingTagName",e[e.AfterClosingTagName=7]="AfterClosingTagName",e[e.BeforeAttributeName=8]="BeforeAttributeName",e[e.InAttributeName=9]="InAttributeName",e[e.AfterAttributeName=10]="AfterAttributeName",e[e.BeforeAttributeValue=11]="BeforeAttributeValue",e[e.InAttributeValueDq=12]="InAttributeValueDq",e[e.InAttributeValueSq=13]="InAttributeValueSq",e[e.InAttributeValueNq=14]="InAttributeValueNq",e[e.BeforeDeclaration=15]="BeforeDeclaration",e[e.InDeclaration=16]="InDeclaration",e[e.InProcessingInstruction=17]="InProcessingInstruction",e[e.BeforeComment=18]="BeforeComment",e[e.CDATASequence=19]="CDATASequence",e[e.InSpecialComment=20]="InSpecialComment",e[e.InCommentLike=21]="InCommentLike",e[e.BeforeSpecialS=22]="BeforeSpecialS",e[e.BeforeSpecialT=23]="BeforeSpecialT",e[e.SpecialStartSequence=24]="SpecialStartSequence",e[e.InSpecialTag=25]="InSpecialTag",e[e.InEntity=26]="InEntity"})(K||(K={}));function mn(e){return e===re.Space||e===re.NewLine||e===re.Tab||e===re.FormFeed||e===re.CarriageReturn}function As(e){return e===re.Slash||e===re.Gt||mn(e)}function mO(e){return e>=re.LowerA&&e<=re.LowerZ||e>=re.UpperA&&e<=re.UpperZ}var $t;(function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"})($t||($t={}));const Ve={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};class AO{constructor({xmlMode:t=!1,decodeEntities:n=!0},r){this.cbs=r,this.state=K.Text,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=K.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.xmlMode=t,this.decodeEntities=n,this.entityDecoder=new Mb(t?Rb:Ob,(i,u)=>this.emitCodePoint(i,u))}reset(){this.state=K.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=K.Text,this.currentSequence=void 0,this.running=!0,this.offset=0}write(t){this.offset+=this.buffer.length,this.buffer=t,this.parse()}end(){this.running&&this.finish()}pause(){this.running=!1}resume(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()}stateText(t){t===re.Lt||!this.decodeEntities&&this.fastForwardTo(re.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=K.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&t===re.Amp&&this.startEntity()}stateSpecialStartSequence(t){const n=this.sequenceIndex===this.currentSequence.length;if(!(n?As(t):(t|32)===this.currentSequence[this.sequenceIndex]))this.isSpecial=!1;else if(!n){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=K.InTagName,this.stateInTagName(t)}stateInSpecialTag(t){if(this.sequenceIndex===this.currentSequence.length){if(t===re.Gt||mn(t)){const n=this.index-this.currentSequence.length;if(this.sectionStart<n){const r=this.index;this.index=n,this.cbs.ontext(this.sectionStart,n),this.index=r}this.isSpecial=!1,this.sectionStart=n+2,this.stateInClosingTagName(t);return}this.sequenceIndex=0}(t|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===Ve.TitleEnd?this.decodeEntities&&t===re.Amp&&this.startEntity():this.fastForwardTo(re.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=+(t===re.Lt)}stateCDATASequence(t){t===Ve.Cdata[this.sequenceIndex]?++this.sequenceIndex===Ve.Cdata.length&&(this.state=K.InCommentLike,this.currentSequence=Ve.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=K.InDeclaration,this.stateInDeclaration(t))}fastForwardTo(t){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===t)return!0;return this.index=this.buffer.length+this.offset-1,!1}stateInCommentLike(t){t===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===Ve.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index,2):this.cbs.oncomment(this.sectionStart,this.index,2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=K.Text):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):t!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}isTagStartChar(t){return this.xmlMode?!As(t):mO(t)}startSpecial(t,n){this.isSpecial=!0,this.currentSequence=t,this.sequenceIndex=n,this.state=K.SpecialStartSequence}stateBeforeTagName(t){if(t===re.ExclamationMark)this.state=K.BeforeDeclaration,this.sectionStart=this.index+1;else if(t===re.Questionmark)this.state=K.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(t)){const n=t|32;this.sectionStart=this.index,this.xmlMode?this.state=K.InTagName:n===Ve.ScriptEnd[2]?this.state=K.BeforeSpecialS:n===Ve.TitleEnd[2]?this.state=K.BeforeSpecialT:this.state=K.InTagName}else t===re.Slash?this.state=K.BeforeClosingTagName:(this.state=K.Text,this.stateText(t))}stateInTagName(t){As(t)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=K.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateBeforeClosingTagName(t){mn(t)||(t===re.Gt?this.state=K.Text:(this.state=this.isTagStartChar(t)?K.InClosingTagName:K.InSpecialComment,this.sectionStart=this.index))}stateInClosingTagName(t){(t===re.Gt||mn(t))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=K.AfterClosingTagName,this.stateAfterClosingTagName(t))}stateAfterClosingTagName(t){(t===re.Gt||this.fastForwardTo(re.Gt))&&(this.state=K.Text,this.sectionStart=this.index+1)}stateBeforeAttributeName(t){t===re.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=K.InSpecialTag,this.sequenceIndex=0):this.state=K.Text,this.sectionStart=this.index+1):t===re.Slash?this.state=K.InSelfClosingTag:mn(t)||(this.state=K.InAttributeName,this.sectionStart=this.index)}stateInSelfClosingTag(t){t===re.Gt?(this.cbs.onselfclosingtag(this.index),this.state=K.Text,this.sectionStart=this.index+1,this.isSpecial=!1):mn(t)||(this.state=K.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateInAttributeName(t){(t===re.Eq||As(t))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=this.index,this.state=K.AfterAttributeName,this.stateAfterAttributeName(t))}stateAfterAttributeName(t){t===re.Eq?this.state=K.BeforeAttributeValue:t===re.Slash||t===re.Gt?(this.cbs.onattribend($t.NoValue,this.sectionStart),this.sectionStart=-1,this.state=K.BeforeAttributeName,this.stateBeforeAttributeName(t)):mn(t)||(this.cbs.onattribend($t.NoValue,this.sectionStart),this.state=K.InAttributeName,this.sectionStart=this.index)}stateBeforeAttributeValue(t){t===re.DoubleQuote?(this.state=K.InAttributeValueDq,this.sectionStart=this.index+1):t===re.SingleQuote?(this.state=K.InAttributeValueSq,this.sectionStart=this.index+1):mn(t)||(this.sectionStart=this.index,this.state=K.InAttributeValueNq,this.stateInAttributeValueNoQuotes(t))}handleInAttributeValue(t,n){t===n||!this.decodeEntities&&this.fastForwardTo(n)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(n===re.DoubleQuote?$t.Double:$t.Single,this.index+1),this.state=K.BeforeAttributeName):this.decodeEntities&&t===re.Amp&&this.startEntity()}stateInAttributeValueDoubleQuotes(t){this.handleInAttributeValue(t,re.DoubleQuote)}stateInAttributeValueSingleQuotes(t){this.handleInAttributeValue(t,re.SingleQuote)}stateInAttributeValueNoQuotes(t){mn(t)||t===re.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend($t.Unquoted,this.index),this.state=K.BeforeAttributeName,this.stateBeforeAttributeName(t)):this.decodeEntities&&t===re.Amp&&this.startEntity()}stateBeforeDeclaration(t){t===re.OpeningSquareBracket?(this.state=K.CDATASequence,this.sequenceIndex=0):this.state=t===re.Dash?K.BeforeComment:K.InDeclaration}stateInDeclaration(t){(t===re.Gt||this.fastForwardTo(re.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=K.Text,this.sectionStart=this.index+1)}stateInProcessingInstruction(t){(t===re.Gt||this.fastForwardTo(re.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=K.Text,this.sectionStart=this.index+1)}stateBeforeComment(t){t===re.Dash?(this.state=K.InCommentLike,this.currentSequence=Ve.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=K.InDeclaration}stateInSpecialComment(t){(t===re.Gt||this.fastForwardTo(re.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=K.Text,this.sectionStart=this.index+1)}stateBeforeSpecialS(t){const n=t|32;n===Ve.ScriptEnd[3]?this.startSpecial(Ve.ScriptEnd,4):n===Ve.StyleEnd[3]?this.startSpecial(Ve.StyleEnd,4):(this.state=K.InTagName,this.stateInTagName(t))}stateBeforeSpecialT(t){const n=t|32;n===Ve.TitleEnd[3]?this.startSpecial(Ve.TitleEnd,4):n===Ve.TextareaEnd[3]?this.startSpecial(Ve.TextareaEnd,4):(this.state=K.InTagName,this.stateInTagName(t))}startEntity(){this.baseState=this.state,this.state=K.InEntity,this.entityStart=this.index,this.entityDecoder.startEntity(this.xmlMode?Xt.Strict:this.baseState===K.Text||this.baseState===K.InSpecialTag?Xt.Legacy:Xt.Attribute)}stateInEntity(){const t=this.entityDecoder.write(this.buffer,this.index-this.offset);t>=0?(this.state=this.baseState,t===0&&(this.index=this.entityStart)):this.index=this.offset+this.buffer.length-1}cleanup(){this.running&&this.sectionStart!==this.index&&(this.state===K.Text||this.state===K.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===K.InAttributeValueDq||this.state===K.InAttributeValueSq||this.state===K.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}shouldContinue(){return this.index<this.buffer.length+this.offset&&this.running}parse(){for(;this.shouldContinue();){const t=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case K.Text:{this.stateText(t);break}case K.SpecialStartSequence:{this.stateSpecialStartSequence(t);break}case K.InSpecialTag:{this.stateInSpecialTag(t);break}case K.CDATASequence:{this.stateCDATASequence(t);break}case K.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(t);break}case K.InAttributeName:{this.stateInAttributeName(t);break}case K.InCommentLike:{this.stateInCommentLike(t);break}case K.InSpecialComment:{this.stateInSpecialComment(t);break}case K.BeforeAttributeName:{this.stateBeforeAttributeName(t);break}case K.InTagName:{this.stateInTagName(t);break}case K.InClosingTagName:{this.stateInClosingTagName(t);break}case K.BeforeTagName:{this.stateBeforeTagName(t);break}case K.AfterAttributeName:{this.stateAfterAttributeName(t);break}case K.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(t);break}case K.BeforeAttributeValue:{this.stateBeforeAttributeValue(t);break}case K.BeforeClosingTagName:{this.stateBeforeClosingTagName(t);break}case K.AfterClosingTagName:{this.stateAfterClosingTagName(t);break}case K.BeforeSpecialS:{this.stateBeforeSpecialS(t);break}case K.BeforeSpecialT:{this.stateBeforeSpecialT(t);break}case K.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(t);break}case K.InSelfClosingTag:{this.stateInSelfClosingTag(t);break}case K.InDeclaration:{this.stateInDeclaration(t);break}case K.BeforeDeclaration:{this.stateBeforeDeclaration(t);break}case K.BeforeComment:{this.stateBeforeComment(t);break}case K.InProcessingInstruction:{this.stateInProcessingInstruction(t);break}case K.InEntity:{this.stateInEntity();break}}this.index++}this.cleanup()}finish(){this.state===K.InEntity&&(this.entityDecoder.end(),this.state=this.baseState),this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const t=this.buffer.length+this.offset;this.sectionStart>=t||(this.state===K.InCommentLike?this.currentSequence===Ve.CdataEnd?this.cbs.oncdata(this.sectionStart,t,0):this.cbs.oncomment(this.sectionStart,t,0):this.state===K.InTagName||this.state===K.BeforeAttributeName||this.state===K.BeforeAttributeValue||this.state===K.AfterAttributeName||this.state===K.InAttributeName||this.state===K.InAttributeValueSq||this.state===K.InAttributeValueDq||this.state===K.InAttributeValueNq||this.state===K.InClosingTagName||this.cbs.ontext(this.sectionStart,t))}emitCodePoint(t,n){this.baseState!==K.Text&&this.baseState!==K.InSpecialTag?(this.sectionStart<this.entityStart&&this.cbs.onattribdata(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+n,this.index=this.sectionStart-1,this.cbs.onattribentity(t)):(this.sectionStart<this.entityStart&&this.cbs.ontext(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+n,this.index=this.sectionStart-1,this.cbs.ontextentity(t,this.sectionStart))}}const Yr=new Set(["input","option","optgroup","select","button","datalist","textarea"]),Ie=new Set(["p"]),$0=new Set(["thead","tbody"]),ep=new Set(["dd","dt"]),tp=new Set(["rt","rp"]),gO=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",Ie],["h1",Ie],["h2",Ie],["h3",Ie],["h4",Ie],["h5",Ie],["h6",Ie],["select",Yr],["input",Yr],["output",Yr],["button",Yr],["datalist",Yr],["textarea",Yr],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",ep],["dt",ep],["address",Ie],["article",Ie],["aside",Ie],["blockquote",Ie],["details",Ie],["div",Ie],["dl",Ie],["fieldset",Ie],["figcaption",Ie],["figure",Ie],["footer",Ie],["form",Ie],["header",Ie],["hr",Ie],["main",Ie],["nav",Ie],["ol",Ie],["pre",Ie],["section",Ie],["table",Ie],["ul",Ie],["rt",tp],["rp",tp],["tbody",$0],["tfoot",$0]]),bO=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),np=new Set(["math","svg"]),rp=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),EO=/\s|\//;class yO{constructor(t,n={}){var r,i,u,s,a,o;this.options=n,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=t??{},this.htmlMode=!this.options.xmlMode,this.lowerCaseTagNames=(r=n.lowerCaseTags)!==null&&r!==void 0?r:this.htmlMode,this.lowerCaseAttributeNames=(i=n.lowerCaseAttributeNames)!==null&&i!==void 0?i:this.htmlMode,this.recognizeSelfClosing=(u=n.recognizeSelfClosing)!==null&&u!==void 0?u:!this.htmlMode,this.tokenizer=new((s=n.Tokenizer)!==null&&s!==void 0?s:AO)(this.options,this),this.foreignContext=[!this.htmlMode],(o=(a=this.cbs).onparserinit)===null||o===void 0||o.call(a,this)}ontext(t,n){var r,i;const u=this.getSlice(t,n);this.endIndex=n-1,(i=(r=this.cbs).ontext)===null||i===void 0||i.call(r,u),this.startIndex=n}ontextentity(t,n){var r,i;this.endIndex=n-1,(i=(r=this.cbs).ontext)===null||i===void 0||i.call(r,bc(t)),this.startIndex=n}isVoidElement(t){return this.htmlMode&&bO.has(t)}onopentagname(t,n){this.endIndex=n;let r=this.getSlice(t,n);this.lowerCaseTagNames&&(r=r.toLowerCase()),this.emitOpenTag(r)}emitOpenTag(t){var n,r,i,u;this.openTagStart=this.startIndex,this.tagname=t;const s=this.htmlMode&&gO.get(t);if(s)for(;this.stack.length>0&&s.has(this.stack[0]);){const a=this.stack.shift();(r=(n=this.cbs).onclosetag)===null||r===void 0||r.call(n,a,!0)}this.isVoidElement(t)||(this.stack.unshift(t),this.htmlMode&&(np.has(t)?this.foreignContext.unshift(!0):rp.has(t)&&this.foreignContext.unshift(!1))),(u=(i=this.cbs).onopentagname)===null||u===void 0||u.call(i,t),this.cbs.onopentag&&(this.attribs={})}endOpenTag(t){var n,r;this.startIndex=this.openTagStart,this.attribs&&((r=(n=this.cbs).onopentag)===null||r===void 0||r.call(n,this.tagname,this.attribs,t),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""}onopentagend(t){this.endIndex=t,this.endOpenTag(!1),this.startIndex=t+1}onclosetag(t,n){var r,i,u,s,a,o,l,c;this.endIndex=n;let d=this.getSlice(t,n);if(this.lowerCaseTagNames&&(d=d.toLowerCase()),this.htmlMode&&(np.has(d)||rp.has(d))&&this.foreignContext.shift(),this.isVoidElement(d))this.htmlMode&&d==="br"&&((s=(u=this.cbs).onopentagname)===null||s===void 0||s.call(u,"br"),(o=(a=this.cbs).onopentag)===null||o===void 0||o.call(a,"br",{},!0),(c=(l=this.cbs).onclosetag)===null||c===void 0||c.call(l,"br",!1));else{const f=this.stack.indexOf(d);if(f!==-1)for(let h=0;h<=f;h++){const m=this.stack.shift();(i=(r=this.cbs).onclosetag)===null||i===void 0||i.call(r,m,h!==f)}else this.htmlMode&&d==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=n+1}onselfclosingtag(t){this.endIndex=t,this.recognizeSelfClosing||this.foreignContext[0]?(this.closeCurrentTag(!1),this.startIndex=t+1):this.onopentagend(t)}closeCurrentTag(t){var n,r;const i=this.tagname;this.endOpenTag(t),this.stack[0]===i&&((r=(n=this.cbs).onclosetag)===null||r===void 0||r.call(n,i,!t),this.stack.shift())}onattribname(t,n){this.startIndex=t;const r=this.getSlice(t,n);this.attribname=this.lowerCaseAttributeNames?r.toLowerCase():r}onattribdata(t,n){this.attribvalue+=this.getSlice(t,n)}onattribentity(t){this.attribvalue+=bc(t)}onattribend(t,n){var r,i;this.endIndex=n,(i=(r=this.cbs).onattribute)===null||i===void 0||i.call(r,this.attribname,this.attribvalue,t===$t.Double?'"':t===$t.Single?"'":t===$t.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""}getInstructionName(t){const n=t.search(EO);let r=n<0?t:t.substr(0,n);return this.lowerCaseTagNames&&(r=r.toLowerCase()),r}ondeclaration(t,n){this.endIndex=n;const r=this.getSlice(t,n);if(this.cbs.onprocessinginstruction){const i=this.getInstructionName(r);this.cbs.onprocessinginstruction(`!${i}`,`!${r}`)}this.startIndex=n+1}onprocessinginstruction(t,n){this.endIndex=n;const r=this.getSlice(t,n);if(this.cbs.onprocessinginstruction){const i=this.getInstructionName(r);this.cbs.onprocessinginstruction(`?${i}`,`?${r}`)}this.startIndex=n+1}oncomment(t,n,r){var i,u,s,a;this.endIndex=n,(u=(i=this.cbs).oncomment)===null||u===void 0||u.call(i,this.getSlice(t,n-r)),(a=(s=this.cbs).oncommentend)===null||a===void 0||a.call(s),this.startIndex=n+1}oncdata(t,n,r){var i,u,s,a,o,l,c,d,f,h;this.endIndex=n;const m=this.getSlice(t,n-r);!this.htmlMode||this.options.recognizeCDATA?((u=(i=this.cbs).oncdatastart)===null||u===void 0||u.call(i),(a=(s=this.cbs).ontext)===null||a===void 0||a.call(s,m),(l=(o=this.cbs).oncdataend)===null||l===void 0||l.call(o)):((d=(c=this.cbs).oncomment)===null||d===void 0||d.call(c,`[CDATA[${m}]]`),(h=(f=this.cbs).oncommentend)===null||h===void 0||h.call(f)),this.startIndex=n+1}onend(){var t,n;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let r=0;r<this.stack.length;r++)this.cbs.onclosetag(this.stack[r],!0)}(n=(t=this.cbs).onend)===null||n===void 0||n.call(t)}reset(){var t,n,r,i;(n=(t=this.cbs).onreset)===null||n===void 0||n.call(t),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(i=(r=this.cbs).onparserinit)===null||i===void 0||i.call(r,this),this.buffers.length=0,this.foreignContext.length=0,this.foreignContext.unshift(!this.htmlMode),this.bufferOffset=0,this.writeIndex=0,this.ended=!1}parseComplete(t){this.reset(),this.end(t)}getSlice(t,n){for(;t-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();let r=this.buffers[0].slice(t-this.bufferOffset,n-this.bufferOffset);for(;n-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),r+=this.buffers[0].slice(0,n-this.bufferOffset);return r}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(t){var n,r;if(this.ended){(r=(n=this.cbs).onerror)===null||r===void 0||r.call(n,new Error(".write() after done!"));return}this.buffers.push(t),this.tokenizer.running&&(this.tokenizer.write(t),this.writeIndex++)}end(t){var n,r;if(this.ended){(r=(n=this.cbs).onerror)===null||r===void 0||r.call(n,new Error(".end() after done!"));return}t&&this.write(t),this.ended=!0,this.tokenizer.end()}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex<this.buffers.length;)this.tokenizer.write(this.buffers[this.writeIndex++]);this.ended&&this.tokenizer.end()}parseChunk(t){this.write(t)}done(t){this.end(t)}}function TO(e,t){const n=new cw(void 0,t);return new yO(n,t).end(e),n.root}const CO=M4((e,t,n,r)=>t._useHtmlParser2?TO(e,t):uO(e,t,n,r)),xO=f8(CO,(e,t)=>t._useHtmlParser2?Pa(e,t):aO(e)),kO=Object.freeze(Object.defineProperty({__proto__:null,contains:pf,load:xO,merge:_g},Symbol.toStringTag,{value:"Module"})),SO=KE(kO);var rl={},il={exports:{}},ul={exports:{}},ip;function wf(){return ip||(ip=1,(function(e,t){e.exports=n;function n(i){return r.bind(null,i)}function r(i){var u=[].slice.call(arguments,1);u.unshift("["+i+"]"),process.stderr.write(u.join(" ")+`
|
|
484
|
-
`)}})(
|
|
485
|
-
`?(l++,s=1):s++,a++;else{var
|
|
486
|
-
`);
|
|
487
|
-
`:case" ":case"\r":case"\f":switch(
|
|
488
|
-
`&&(f.value=i.trim(),
|
|
489
|
-
`,a=" ");var
|
|
490
|
-
`).trim();return
|
|
491
|
-
`&&d!==" ")&&(o+=d))}return o.length&&a.push(o),a},e.parseCSS=function(i){var u=t.parse(i,{position:!0,comments:!0}),s=typeof u.stylesheet<"u"&&u.stylesheet.rules?u.stylesheet.rules:[],a=[],o=!1,l=!1;if(s.length>0&&s[0].type==="comment"&&s[0].text){var c=s[0].text.trim();c==="juice ignore"&&(l=!0)}if(l)return a;for(var d=0,f=s.length;d<f;d++){if(s[d].type==="comment"){if(!s[d].text)continue;var
|
|
482
|
+
)`,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"},Sg={};function pN(e,t){return e===ce.falseFunc?ce.falseFunc:n=>t.isTag(n)&&e(n)}function wg(e,t){const n=t.getSiblings(e);if(n.length<=1)return[];const r=n.indexOf(e);return r<0||r===n.length-1?[]:n.slice(r+1).filter(t.isTag)}function tc(e){return{xmlMode:!!e.xmlMode,lowerCaseAttributeNames:!!e.lowerCaseAttributeNames,lowerCaseTags:!!e.lowerCaseTags,quirksMode:!!e.quirksMode,cacheResults:!!e.cacheResults,pseudos:e.pseudos,adapter:e.adapter,equals:e.equals}}const Wo=(e,t,n,r,i)=>{const u=i(t,tc(n),r);return u===ce.trueFunc?e:u===ce.falseFunc?ce.falseFunc:s=>u(s)&&e(s)},Ko={is:Wo,matches:Wo,where:Wo,not(e,t,n,r,i){const u=i(t,tc(n),r);return u===ce.falseFunc?e:u===ce.trueFunc?ce.falseFunc:s=>!u(s)&&e(s)},has(e,t,n,r,i){const{adapter:u}=n,s=tc(n);s.relativeSelector=!0;const a=t.some(c=>c.some(af))?[Sg]:void 0,o=i(t,s,a);if(o===ce.falseFunc)return ce.falseFunc;const l=pN(o,u);if(a&&o!==ce.trueFunc){const{shouldTestNextSiblings:c=!1}=o;return d=>{if(!e(d))return!1;a[0]=d;const f=u.getChildren(d),p=c?[...f,...wg(d,u)]:f;return u.existsOne(l,p)}}return c=>e(c)&&u.existsOne(l,u.getChildren(c))}};function mN(e,t,n,r,i){var u;const{name:s,data:a}=t;if(Array.isArray(a)){if(!(s in Ko))throw new Error(`Unknown pseudo-class :${s}(${a})`);return Ko[s](e,a,n,r,i)}const o=(u=n.pseudos)===null||u===void 0?void 0:u[s],l=typeof o=="string"?o:hN[s];if(typeof l=="string"){if(a!=null)throw new Error(`Pseudo ${s} doesn't have any arguments`);const c=Ma(l);return Ko.is(e,c,n,r,i)}if(typeof o=="function")return S0(o,s,a,1),c=>o(c,a)&&e(c);if(s in ec)return ec[s](e,a,n,r);if(s in I0){const c=I0[s];return S0(c,s,a,2),d=>c(d,n,a)&&e(d)}throw new Error(`Unknown pseudo-class :${s}`)}function Qo(e,t){const n=t.getParent(e);return n&&t.isTag(n)?n:null}function AN(e,t,n,r,i){const{adapter:u,equals:s}=n;switch(t.type){case Z.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case Z.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case Z.Attribute:{if(t.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return(!n.xmlMode||n.lowerCaseAttributeNames)&&(t.name=t.name.toLowerCase()),oN[t.action](e,t,n)}case Z.Pseudo:return mN(e,t,n,r,i);case Z.Tag:{if(t.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:a}=t;return(!n.xmlMode||n.lowerCaseTags)&&(a=a.toLowerCase()),function(l){return u.getName(l)===a&&e(l)}}case Z.Descendant:{if(n.cacheResults===!1||typeof WeakSet>"u")return function(l){let c=l;for(;c=Qo(c,u);)if(e(c))return!0;return!1};const a=new WeakSet;return function(l){let c=l;for(;c=Qo(c,u);)if(!a.has(c)){if(u.isTag(c)&&e(c))return!0;a.add(c)}return!1}}case"_flexibleDescendant":return function(o){let l=o;do if(e(l))return!0;while(l=Qo(l,u));return!1};case Z.Parent:return function(o){return u.getChildren(o).some(l=>u.isTag(l)&&e(l))};case Z.Child:return function(o){const l=u.getParent(o);return l!=null&&u.isTag(l)&&e(l)};case Z.Sibling:return function(o){const l=u.getSiblings(o);for(let c=0;c<l.length;c++){const d=l[c];if(s(o,d))break;if(u.isTag(d)&&e(d))return!0}return!1};case Z.Adjacent:return u.prevElementSibling?function(o){const l=u.prevElementSibling(o);return l!=null&&e(l)}:function(o){const l=u.getSiblings(o);let c;for(let d=0;d<l.length;d++){const f=l[d];if(s(o,f))break;u.isTag(f)&&(c=f)}return!!c&&e(c)};case Z.Universal:{if(t.namespace!=null&&t.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return e}}}function Ng(e){return e.type===Z.Pseudo&&(e.name==="scope"||Array.isArray(e.data)&&e.data.some(t=>t.some(Ng)))}const gN={type:Z.Descendant},bN={type:"_flexibleDescendant"},EN={type:Z.Pseudo,name:"scope",data:null};function yN(e,{adapter:t},n){const r=!!n?.every(i=>{const u=t.isTag(i)&&t.getParent(i);return i===Sg||u&&t.isTag(u)});for(const i of e){if(!(i.length>0&&af(i[0])&&i[0].type!==Z.Descendant))if(r&&!i.some(Ng))i.unshift(gN);else continue;i.unshift(EN)}}function Dg(e,t,n){var r;e.forEach(uN),n=(r=t.context)!==null&&r!==void 0?r:n;const i=Array.isArray(n),u=n&&(Array.isArray(n)?n:[n]);if(t.relativeSelector!==!1)yN(e,t,u);else if(e.some(o=>o.length>0&&af(o[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let s=!1;const a=e.map(o=>{if(o.length>=2){const[l,c]=o;l.type!==Z.Pseudo||l.name!=="scope"||(i&&c.type===Z.Descendant?o[1]=bN:(c.type===Z.Adjacent||c.type===Z.Sibling)&&(s=!0))}return TN(o,t,u)}).reduce(CN,ce.falseFunc);return a.shouldTestNextSiblings=s,a}function TN(e,t,n){var r;return e.reduce((i,u)=>i===ce.falseFunc?ce.falseFunc:AN(i,u,t,n,Dg),(r=t.rootFunc)!==null&&r!==void 0?r:ce.trueFunc)}function CN(e,t){return t===ce.falseFunc||e===ce.trueFunc?e:e===ce.falseFunc||t===ce.trueFunc?t:function(r){return e(r)||t(r)}}const _g=(e,t)=>e===t,xN={adapter:Ra,equals:_g};function kN(e){var t,n,r,i;const u=e??xN;return(t=u.adapter)!==null&&t!==void 0||(u.adapter=Ra),(n=u.equals)!==null&&n!==void 0||(u.equals=(i=(r=u.adapter)===null||r===void 0?void 0:r.equals)!==null&&i!==void 0?i:_g),u}function IN(e){return function(n,r,i){const u=kN(r);return e(n,u,i)}}const of=IN(Dg);function Og(e,t,n=!1){return n&&(e=SN(e,t)),Array.isArray(e)?t.removeSubsets(e):t.getChildren(e)}function SN(e,t){const n=Array.isArray(e)?e.slice(0):[e],r=n.length;for(let i=0;i<r;i++){const u=wg(n[i],t);n.push(...u)}return n}const wN=new Set(["first","last","eq","gt","nth","lt","even","odd"]);function js(e){return e.type!=="pseudo"?!1:wN.has(e.name)?!0:e.name==="not"&&Array.isArray(e.data)?e.data.some(t=>t.some(js)):!1}function NN(e,t,n){const r=t!=null?parseInt(t,10):NaN;switch(e){case"first":return 1;case"nth":case"eq":return isFinite(r)?r>=0?r+1:1/0:0;case"lt":return isFinite(r)?r>=0?Math.min(r,n):1/0:0;case"gt":return isFinite(r)?1/0:0;case"odd":return 2*n;case"even":return 2*n-1;case"last":case"not":return 1/0}}function DN(e){for(;e.parent;)e=e.parent;return e}function lf(e){const t=[],n=[];for(const r of e)r.some(js)?t.push(r):n.push(r);return[n,t]}const _N={type:Z.Universal,namespace:null},ON={type:Z.Pseudo,name:"scope",data:null};function Rg(e,t,n={}){return Mg([e],t,n)}function Mg(e,t,n={}){if(typeof t=="function")return e.some(t);const[r,i]=lf(Ma(t));return r.length>0&&e.some(of(r,n))||i.some(u=>vg(u,e,n).length>0)}function RN(e,t,n,r){const i=typeof n=="string"?parseInt(n,10):NaN;switch(e){case"first":case"lt":return t;case"last":return t.length>0?[t[t.length-1]]:t;case"nth":case"eq":return isFinite(i)&&Math.abs(i)<t.length?[i<0?t[t.length+i]:t[i]]:[];case"gt":return isFinite(i)?t.slice(i+1):[];case"even":return t.filter((u,s)=>s%2===0);case"odd":return t.filter((u,s)=>s%2===1);case"not":{const u=new Set(Lg(n,t,r));return t.filter(s=>!u.has(s))}}}function Bg(e,t,n={}){return Lg(Ma(e),t,n)}function Lg(e,t,n){if(t.length===0)return[];const[r,i]=lf(e);let u;if(r.length){const s=rc(t,r,n);if(i.length===0)return s;s.length&&(u=new Set(s))}for(let s=0;s<i.length&&u?.size!==t.length;s++){const a=i[s];if((u?t.filter(c=>ne(c)&&!u.has(c)):t).length===0)break;const l=vg(a,t,n);if(l.length)if(u)l.forEach(c=>u.add(c));else{if(s===i.length-1)return l;u=new Set(l)}}return typeof u<"u"?u.size===t.length?t:t.filter(s=>u.has(s)):[]}function vg(e,t,n){var r;if(e.some(ji)){const i=(r=n.root)!==null&&r!==void 0?r:DN(t[0]),u={...n,context:t,relativeSelector:!1};return e.push(ON),Zs(i,e,u,!0,t.length)}return Zs(t,e,n,!1,t.length)}function MN(e,t,n={},r=1/0){if(typeof e=="function")return Pg(t,e);const[i,u]=lf(Ma(e)),s=u.map(a=>Zs(t,a,n,!0,r));return i.length&&s.push(nc(t,i,n,r)),s.length===0?[]:s.length===1?s[0]:gi(s.reduce((a,o)=>[...a,...o]))}function Zs(e,t,n,r,i){const u=t.findIndex(js),s=t.slice(0,u),a=t[u],o=t.length-1===u?i:1/0,l=NN(a.name,a.data,o);if(l===0)return[];const d=(s.length===0&&!Array.isArray(e)?Oa(e).filter(ne):s.length===0?(Array.isArray(e)?e:[e]).filter(ne):r||s.some(ji)?nc(e,[s],n,l):rc(e,[s],n)).slice(0,l);let f=RN(a.name,d,a.data,n);if(f.length===0||t.length===u+1)return f;const p=t.slice(u+1),m=p.some(ji);if(m){if(ji(p[0])){const{type:A}=p[0];(A===Z.Sibling||A===Z.Adjacent)&&(f=Og(f,Ra,!0)),p.unshift(_N)}n={...n,relativeSelector:!1,rootFunc:A=>f.includes(A)}}else n.rootFunc&&n.rootFunc!==Js.trueFunc&&(n={...n,rootFunc:Js.trueFunc});return p.some(js)?Zs(f,p,n,!1,i):m?nc(f,[p],n,i):rc(f,[p],n)}function nc(e,t,n,r){const i=of(t,n,e);return Pg(e,i,r)}function Pg(e,t,n=1/0){const r=Og(e,Ra,t.shouldTestNextSiblings);return tf(i=>ne(i)&&t(i),r,!0,n)}function rc(e,t,n){const r=(Array.isArray(e)?e:[e]).filter(ne);if(r.length===0)return r;const i=of(t,n);return i===Js.trueFunc?r:r.filter(i)}const BN=/^\s*[+~]/;function LN(e){if(!e)return this._make([]);if(typeof e!="string"){const t=In(e)?e.toArray():[e],n=this.toArray();return this._make(t.filter(r=>n.some(i=>uf(i,r))))}return this._findBySelector(e,Number.POSITIVE_INFINITY)}function vN(e,t){var n;const r=this.toArray(),i=BN.test(e)?r:this.children().toArray(),u={context:r,root:(n=this._root)===null||n===void 0?void 0:n[0],xmlMode:this.options.xmlMode,lowerCaseTags:this.options.lowerCaseTags,lowerCaseAttributeNames:this.options.lowerCaseAttributeNames,pseudos:this.options.pseudos,quirksMode:this.options.quirksMode};return this._make(MN(e,i,u,t))}function cf(e){return function(t,...n){return function(r){var i;let u=e(t,this);return r&&(u=hf(u,r,this.options.xmlMode,(i=this._root)===null||i===void 0?void 0:i[0])),this._make(this.length>1&&u.length>1?n.reduce((s,a)=>a(s),u):u)}}}const Qu=cf((e,t)=>{let n=[];for(let r=0;r<t.length;r++){const i=e(t[r]);i.length>0&&(n=n.concat(i))}return n}),df=cf((e,t)=>{const n=[];for(let r=0;r<t.length;r++){const i=e(t[r]);i!==null&&n.push(i)}return n});function ff(e,...t){let n=null;const r=cf((i,u)=>{const s=[];return De(u,a=>{for(let o;(o=i(a))&&!n?.(o,s.length);a=o)s.push(o)}),s})(e,...t);return function(i,u){n=typeof i=="string"?a=>Rg(a,i,this.options):i?Yu(i):null;const s=r.call(this,u);return n=null,s}}function bi(e){return e.length>1?Array.from(new Set(e)):e}const PN=df(({parent:e})=>e&&!tr(e)?e:null,bi),FN=Qu(e=>{const t=[];for(;e.parent&&!tr(e.parent);)t.push(e.parent),e=e.parent;return t},gi,e=>e.reverse()),HN=ff(({parent:e})=>e&&!tr(e)?e:null,gi,e=>e.reverse());function UN(e){var t;const n=[];if(!e)return this._make(n);const r={xmlMode:this.options.xmlMode,root:(t=this._root)===null||t===void 0?void 0:t[0]},i=typeof e=="string"?u=>Rg(u,e,r):Yu(e);return De(this,u=>{for(u&&!tr(u)&&!ne(u)&&(u=u.parent);u&&ne(u);){if(i(u,0)){n.includes(u)||n.push(u);break}u=u.parent}}),this._make(n)}const WN=df(e=>$d(e)),KN=Qu(e=>{const t=[];for(;e.next;)e=e.next,ne(e)&&t.push(e);return t},bi),QN=ff(e=>$d(e),bi),YN=df(e=>ef(e)),zN=Qu(e=>{const t=[];for(;e.prev;)e=e.prev,ne(e)&&t.push(e);return t},bi),GN=ff(e=>ef(e),bi),VN=Qu(e=>dg(e).filter(t=>ne(t)&&t!==e),gi),qN=Qu(e=>Oa(e).filter(ne),bi);function JN(){const e=this.toArray().reduce((t,n)=>Oe(n)?t.concat(n.children):t,[]);return this._make(e)}function jN(e){let t=0;const n=this.length;for(;t<n&&e.call(this[t],t,this[t])!==!1;)++t;return this}function ZN(e){let t=[];for(let n=0;n<this.length;n++){const r=this[n],i=e.call(r,n,r);i!=null&&(t=t.concat(i))}return this._make(t)}function Yu(e){return typeof e=="function"?(t,n)=>e.call(t,n,t):In(e)?t=>Array.prototype.includes.call(e,t):function(t){return e===t}}function XN(e){var t;return this._make(hf(this.toArray(),e,this.options.xmlMode,(t=this._root)===null||t===void 0?void 0:t[0]))}function hf(e,t,n,r){return typeof t=="string"?Bg(t,e,{xmlMode:n,root:r}):e.filter(Yu(t))}function $N(e){const t=this.toArray();return typeof e=="string"?Mg(t.filter(ne),e,this.options):e?t.some(Yu(e)):!1}function e4(e){let t=this.toArray();if(typeof e=="string"){const n=new Set(Bg(e,t,this.options));t=t.filter(r=>!n.has(r))}else{const n=Yu(e);t=t.filter((r,i)=>!n(r,i))}return this._make(t)}function t4(e){return this.filter(typeof e=="string"?`:has(${e})`:(t,n)=>this._make(n).find(e).length>0)}function n4(){return this.length>1?this._make(this[0]):this}function r4(){return this.length>0?this._make(this[this.length-1]):this}function i4(e){var t;return e=+e,e===0&&this.length<=1?this:(e<0&&(e=this.length+e),this._make((t=this[e])!==null&&t!==void 0?t:[]))}function u4(e){return e==null?this.toArray():this[e<0?this.length+e:e]}function s4(){return Array.prototype.slice.call(this)}function a4(e){let t,n;return e==null?(t=this.parent().children(),n=this[0]):typeof e=="string"?(t=this._make(e),n=this[0]):(t=this,n=In(e)?e[0]:e),Array.prototype.indexOf.call(t,n)}function o4(e,t){return this._make(Array.prototype.slice.call(this,e,t))}function l4(){var e;return(e=this.prevObject)!==null&&e!==void 0?e:this._make([])}function c4(e,t){const n=this._make(e,t),r=gi([...this.get(),...n.get()]);return this._make(r)}function d4(e){return this.prevObject?this.add(e?this.prevObject.filter(e):this.prevObject):this}const f4=Object.freeze(Object.defineProperty({__proto__:null,_findBySelector:vN,add:c4,addBack:d4,children:qN,closest:UN,contents:JN,each:jN,end:l4,eq:i4,filter:XN,filterArray:hf,find:LN,first:n4,get:u4,has:t4,index:a4,is:$N,last:r4,map:ZN,next:WN,nextAll:KN,nextUntil:QN,not:e4,parent:PN,parents:FN,parentsUntil:HN,prev:YN,prevAll:zN,prevUntil:GN,siblings:VN,slice:o4,toArray:s4},Symbol.toStringTag,{value:"Module"}));function h4(e){return function(n,r,i,u){if(typeof Buffer<"u"&&Buffer.isBuffer(n)&&(n=n.toString()),typeof n=="string")return e(n,r,i,u);const s=n;if(!Array.isArray(s)&&tr(s))return s;const a=new Dr([]);return _r(s,a),a}}function _r(e,t){const n=Array.isArray(e)?e:[e];t?t.children=n:t=null;for(let r=0;r<n.length;r++){const i=n[r];i.parent&&i.parent.children!==n&&Br(i),t?(i.prev=n[r-1]||null,i.next=n[r+1]||null):i.prev=i.next=null,i.parent=t}return t}function p4(e,t){if(e==null)return[];if(typeof e=="string")return this._parse(e,this.options,!1,null).children.slice(0);if("length"in e){if(e.length===1)return this._makeDomArray(e[0],t);const n=[];for(let r=0;r<e.length;r++){const i=e[r];if(typeof i=="object"){if(i==null)continue;if(!("length"in i)){n.push(t?hu(i,!0):i);continue}}n.push(...this._makeDomArray(i,t))}return n}return[t?hu(e,!0):e]}function Fg(e){return function(...t){const n=this.length-1;return De(this,(r,i)=>{if(!Oe(r))return;const u=typeof t[0]=="function"?t[0].call(r,i,this._render(r.children)):t,s=this._makeDomArray(u,i<n);e(s,r.children,r)})}}function nr(e,t,n,r,i){var u,s;const a=[t,n,...r],o=t===0?null:e[t-1],l=t+n>=e.length?null:e[t+n];for(let c=0;c<r.length;++c){const d=r[c],f=d.parent;if(f){const m=f.children.indexOf(d);m>-1&&(f.children.splice(m,1),i===f&&t>m&&a[0]--)}d.parent=i,d.prev&&(d.prev.next=(u=d.next)!==null&&u!==void 0?u:null),d.next&&(d.next.prev=(s=d.prev)!==null&&s!==void 0?s:null),d.prev=c===0?o:r[c-1],d.next=c===r.length-1?l:r[c+1]}return o&&(o.next=r[0]),l&&(l.prev=r[r.length-1]),e.splice(...a)}function m4(e){return(In(e)?e:this._make(e)).append(this),this}function A4(e){return(In(e)?e:this._make(e)).prepend(this),this}const g4=Fg((e,t,n)=>{nr(t,t.length,0,e,n)}),b4=Fg((e,t,n)=>{nr(t,0,0,e,n)});function Hg(e){return function(t){const n=this.length-1,r=this.parents().last();for(let i=0;i<this.length;i++){const u=this[i],s=typeof t=="function"?t.call(u,i,u):typeof t=="string"&&!Xl(t)?r.find(t).clone():t,[a]=this._makeDomArray(s,i<n);if(!a||!Oe(a))continue;let o=a,l=0;for(;l<o.children.length;){const c=o.children[l];ne(c)?(o=c,l=0):l++}e(u,o,[a])}return this}}const E4=Hg((e,t,n)=>{const{parent:r}=e;if(!r)return;const i=r.children,u=i.indexOf(e);_r([e],t),nr(i,u,0,n,r)}),y4=Hg((e,t,n)=>{Oe(e)&&(_r(e.children,t),_r(n,e))});function T4(e){return this.parent(e).not("body").each((t,n)=>{this._make(n).replaceWith(n.children)}),this}function C4(e){const t=this[0];if(t){const n=this._make(typeof e=="function"?e.call(t,0,t):e).insertBefore(t);let r;for(let u=0;u<n.length;u++)n[u].type==="tag"&&(r=n[u]);let i=0;for(;r&&i<r.children.length;){const u=r.children[i];u.type==="tag"?(r=u,i=0):i++}r&&this._make(r).append(this)}return this}function x4(...e){const t=this.length-1;return De(this,(n,r)=>{if(!Oe(n)||!n.parent)return;const i=n.parent.children,u=i.indexOf(n);if(u<0)return;const s=typeof e[0]=="function"?e[0].call(n,r,this._render(n.children)):e,a=this._makeDomArray(s,r<t);nr(i,u+1,0,a,n.parent)})}function k4(e){typeof e=="string"&&(e=this._make(e)),this.remove();const t=[];for(const n of this._makeDomArray(e)){const r=this.clone().toArray(),{parent:i}=n;if(!i)continue;const u=i.children,s=u.indexOf(n);s<0||(nr(u,s+1,0,r,i),t.push(...r))}return this._make(t)}function I4(...e){const t=this.length-1;return De(this,(n,r)=>{if(!Oe(n)||!n.parent)return;const i=n.parent.children,u=i.indexOf(n);if(u<0)return;const s=typeof e[0]=="function"?e[0].call(n,r,this._render(n.children)):e,a=this._makeDomArray(s,r<t);nr(i,u,0,a,n.parent)})}function S4(e){const t=this._make(e);this.remove();const n=[];return De(t,r=>{const i=this.clone().toArray(),{parent:u}=r;if(!u)return;const s=u.children,a=s.indexOf(r);a<0||(nr(s,a,0,i,u),n.push(...i))}),this._make(n)}function w4(e){const t=e?this.filter(e):this;return De(t,n=>{Br(n),n.prev=n.next=n.parent=null}),this}function N4(e){return De(this,(t,n)=>{const{parent:r}=t;if(!r)return;const i=r.children,u=typeof e=="function"?e.call(t,n,t):e,s=this._makeDomArray(u);_r(s,null);const a=i.indexOf(t);nr(i,a,1,s,r),s.includes(t)||(t.parent=t.prev=t.next=null)})}function D4(){return De(this,e=>{if(Oe(e)){for(const t of e.children)t.next=t.prev=t.parent=null;e.children.length=0}})}function _4(e){if(e===void 0){const t=this[0];return!t||!Oe(t)?null:this._render(t.children)}return De(this,t=>{if(!Oe(t))return;for(const r of t.children)r.next=r.prev=r.parent=null;const n=In(e)?e.toArray():this._parse(`${e}`,this.options,!1,t).children;_r(n,t)})}function O4(){return this._render(this)}function R4(e){return e===void 0?pu(this):typeof e=="function"?De(this,(t,n)=>this._make(t).text(e.call(t,n,pu([t])))):De(this,t=>{if(!Oe(t))return;for(const r of t.children)r.next=r.prev=r.parent=null;const n=new fu(`${e}`);_r(n,t)})}function M4(){const e=Array.prototype.map.call(this.get(),n=>hu(n,!0)),t=new Dr(e);for(const n of e)n.parent=t;return this._make(e)}const B4=Object.freeze(Object.defineProperty({__proto__:null,_makeDomArray:p4,after:x4,append:g4,appendTo:m4,before:I4,clone:M4,empty:D4,html:_4,insertAfter:k4,insertBefore:S4,prepend:b4,prependTo:A4,remove:w4,replaceWith:N4,text:R4,toString:O4,unwrap:T4,wrap:E4,wrapAll:C4,wrapInner:y4},Symbol.toStringTag,{value:"Module"}));function L4(e,t){if(e!=null&&t!=null||typeof e=="object"&&!Array.isArray(e))return De(this,(n,r)=>{ne(n)&&Ug(n,e,t,r)});if(this.length!==0)return Wg(this[0],e)}function Ug(e,t,n,r){if(typeof t=="string"){const i=Wg(e),u=typeof n=="function"?n.call(e,r,i[t]):n;u===""?delete i[t]:u!=null&&(i[t]=u),e.attribs.style=v4(i)}else if(typeof t=="object"){const i=Object.keys(t);for(let u=0;u<i.length;u++){const s=i[u];Ug(e,s,t[s],u)}}}function Wg(e,t){if(!e||!ne(e))return;const n=P4(e.attribs.style);if(typeof t=="string")return n[t];if(Array.isArray(t)){const r={};for(const i of t)n[i]!=null&&(r[i]=n[i]);return r}return n}function v4(e){return Object.keys(e).reduce((t,n)=>`${t}${t?" ":""}${n}: ${e[n]};`,"")}function P4(e){if(e=(e||"").trim(),!e)return{};const t={};let n;for(const r of e.split(";")){const i=r.indexOf(":");if(i<1||i===r.length-1){const u=r.trimEnd();u.length>0&&n!==void 0&&(t[n]+=`;${u}`)}else n=r.slice(0,i).trim(),t[n]=r.slice(i+1).trim()}return t}const F4=Object.freeze(Object.defineProperty({__proto__:null,css:L4},Symbol.toStringTag,{value:"Module"})),w0="input,select,textarea,keygen",H4=/%20/g,N0=/\r?\n/g;function U4(){return this.serializeArray().map(n=>`${encodeURIComponent(n.name)}=${encodeURIComponent(n.value)}`).join("&").replace(H4,"+")}function W4(){return this.map((e,t)=>{const n=this._make(t);return ne(t)&&t.name==="form"?n.find(w0).toArray():n.filter(w0).toArray()}).filter('[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))').map((e,t)=>{var n;const r=this._make(t),i=r.attr("name"),u=(n=r.val())!==null&&n!==void 0?n:"";return Array.isArray(u)?u.map(s=>({name:i,value:s.replace(N0,`\r
|
|
483
|
+
`)})):{name:i,value:u.replace(N0,`\r
|
|
484
|
+
`)}}).toArray()}const K4=Object.freeze(Object.defineProperty({__proto__:null,serialize:U4,serializeArray:W4},Symbol.toStringTag,{value:"Module"}));function Q4(e){var t;return typeof e=="string"?{selector:e,value:"textContent"}:{selector:e.selector,value:(t=e.value)!==null&&t!==void 0?t:"textContent"}}function Y4(e){const t={};for(const n in e){const r=e[n],i=Array.isArray(r),{selector:u,value:s}=Q4(i?r[0]:r),a=typeof s=="function"?s:typeof s=="string"?o=>this._make(o).prop(s):o=>this._make(o).extract(s);if(i)t[n]=this._findBySelector(u,Number.POSITIVE_INFINITY).map((o,l)=>a(l,n,t)).get();else{const o=this._findBySelector(u,1);t[n]=o.length>0?a(o[0],n,t):void 0}}return t}const z4=Object.freeze(Object.defineProperty({__proto__:null,extract:Y4},Symbol.toStringTag,{value:"Module"}));class zu{constructor(t,n,r){if(this.length=0,this.options=r,this._root=n,t){for(let i=0;i<t.length;i++)this[i]=t[i];this.length=t.length}}}zu.prototype.cheerio="[cheerio object]";zu.prototype.splice=Array.prototype.splice;zu.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator];Object.assign(zu.prototype,Zw,f4,B4,F4,K4,z4);function G4(e,t){return function n(r,i,u=!0){if(r==null)throw new Error("cheerio.load() expects a string");const s=Zl(i),a=e(r,s,u,null);class o extends zu{_make(d,f){const p=l(d,f);return p.prevObject=this,p}_parse(d,f,p,m){return e(d,f,p,m)}_render(d){return t(d,this.options)}}function l(c,d,f=a,p){if(c&&In(c))return c;const m=Zl(p,s),A=typeof f=="string"?[e(f,m,!1,null)]:"length"in f?f:[f],E=In(A)?A:new o(A,null,m);if(E._root=E,!c)return new o(void 0,E,m);const g=typeof c=="string"&&Xl(c)?e(c,m,!1,null).children:V4(c)?[c]:Array.isArray(c)?c:void 0,N=new o(g,E,m);if(g)return N;if(typeof c!="string")throw new TypeError("Unexpected type of selector");let I=c;const R=d?typeof d=="string"?Xl(d)?new o([e(d,m,!1,null)],E,m):(I=`${d} ${I}`,E):In(d)?d:new o(Array.isArray(d)?d:[d],E,m):E;return R?R.find(I):N}return Object.assign(l,Hw,{load:n,_root:a,_options:s,fn:o.prototype,prototype:o.prototype}),l}}function V4(e){return!!e.name||e.type==="root"||e.type==="text"||e.type==="comment"}const q4=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Se="�";var b;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(b||(b={}));const at={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Kg(e){return e>=55296&&e<=57343}function J4(e){return e>=56320&&e<=57343}function j4(e,t){return(e-55296)*1024+9216+t}function Qg(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Yg(e){return e>=64976&&e<=65007||q4.has(e)}var M;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(M||(M={}));const Z4=65536;class X4{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=Z4,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:i,offset:u}=this,s=i+n,a=u+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:a,endOffset:a}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(J4(n))return this.pos++,this._addGap(),j4(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,b.EOF;return this._err(M.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,b.EOF;const r=this.html.charCodeAt(n);return r===b.CARRIAGE_RETURN?b.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,b.EOF;let t=this.html.charCodeAt(this.pos);return t===b.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,b.LINE_FEED):t===b.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Kg(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===b.LINE_FEED||t===b.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Qg(t)?this._err(M.controlCharacterInInputStream):Yg(t)&&this._err(M.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var me;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(me||(me={}));function zg(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const $4=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),e8=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]]);function t8(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=e8.get(e))!==null&&t!==void 0?t:e}var We;(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"})(We||(We={}));const n8=32;var Kn;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Kn||(Kn={}));function ic(e){return e>=We.ZERO&&e<=We.NINE}function r8(e){return e>=We.UPPER_A&&e<=We.UPPER_F||e>=We.LOWER_A&&e<=We.LOWER_F}function i8(e){return e>=We.UPPER_A&&e<=We.UPPER_Z||e>=We.LOWER_A&&e<=We.LOWER_Z||ic(e)}function u8(e){return e===We.EQUALS||i8(e)}var He;(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"})(He||(He={}));var gn;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(gn||(gn={}));let s8=class{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=He.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=gn.Strict}startEntity(t){this.decodeMode=t,this.state=He.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case He.EntityStart:return t.charCodeAt(n)===We.NUM?(this.state=He.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=He.NamedEntity,this.stateNamedEntity(t,n));case He.NumericStart:return this.stateNumericStart(t,n);case He.NumericDecimal:return this.stateNumericDecimal(t,n);case He.NumericHex:return this.stateNumericHex(t,n);case He.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|n8)===We.LOWER_X?(this.state=He.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=He.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const u=r-n;this.result=this.result*Math.pow(i,u)+Number.parseInt(t.substr(n,u),i),this.consumed+=u}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(ic(i)||r8(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(ic(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===We.SEMI)this.consumed+=1;else if(this.decodeMode===gn.Strict)return 0;return this.emitCodePoint(t8(this.result),this.consumed),this.errors&&(t!==We.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],u=(i&Kn.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=a8(r,i,this.treeIndex+Math.max(1,u),s),this.treeIndex<0)return this.result===0||this.decodeMode===gn.Attribute&&(u===0||u8(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],u=(i&Kn.VALUE_LENGTH)>>14,u!==0){if(s===We.SEMI)return this.emitNamedEntityData(this.treeIndex,u,this.consumed+this.excess);this.decodeMode!==gn.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&Kn.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~Kn.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case He.NamedEntity:return this.result!==0&&(this.decodeMode!==gn.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case He.NumericDecimal:return this.emitNumericEntity(0,2);case He.NumericHex:return this.emitNumericEntity(0,3);case He.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case He.EntityStart:return 0}}};function a8(e,t,n,r){const i=(t&Kn.BRANCH_LENGTH)>>7,u=t&Kn.JUMP_TABLE;if(i===0)return u!==0&&r===u?n:-1;if(u){const o=r-u;return o<0||o>=i?-1:e[n+o]-1}let s=n,a=s+i-1;for(;s<=a;){const o=s+a>>>1,l=e[o];if(l<r)s=o+1;else if(l>r)a=o-1;else return e[o+i]}return-1}var F;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(F||(F={}));var br;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(br||(br={}));var gt;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(gt||(gt={}));var D;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(D||(D={}));var h;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(h||(h={}));const o8=new Map([[D.A,h.A],[D.ADDRESS,h.ADDRESS],[D.ANNOTATION_XML,h.ANNOTATION_XML],[D.APPLET,h.APPLET],[D.AREA,h.AREA],[D.ARTICLE,h.ARTICLE],[D.ASIDE,h.ASIDE],[D.B,h.B],[D.BASE,h.BASE],[D.BASEFONT,h.BASEFONT],[D.BGSOUND,h.BGSOUND],[D.BIG,h.BIG],[D.BLOCKQUOTE,h.BLOCKQUOTE],[D.BODY,h.BODY],[D.BR,h.BR],[D.BUTTON,h.BUTTON],[D.CAPTION,h.CAPTION],[D.CENTER,h.CENTER],[D.CODE,h.CODE],[D.COL,h.COL],[D.COLGROUP,h.COLGROUP],[D.DD,h.DD],[D.DESC,h.DESC],[D.DETAILS,h.DETAILS],[D.DIALOG,h.DIALOG],[D.DIR,h.DIR],[D.DIV,h.DIV],[D.DL,h.DL],[D.DT,h.DT],[D.EM,h.EM],[D.EMBED,h.EMBED],[D.FIELDSET,h.FIELDSET],[D.FIGCAPTION,h.FIGCAPTION],[D.FIGURE,h.FIGURE],[D.FONT,h.FONT],[D.FOOTER,h.FOOTER],[D.FOREIGN_OBJECT,h.FOREIGN_OBJECT],[D.FORM,h.FORM],[D.FRAME,h.FRAME],[D.FRAMESET,h.FRAMESET],[D.H1,h.H1],[D.H2,h.H2],[D.H3,h.H3],[D.H4,h.H4],[D.H5,h.H5],[D.H6,h.H6],[D.HEAD,h.HEAD],[D.HEADER,h.HEADER],[D.HGROUP,h.HGROUP],[D.HR,h.HR],[D.HTML,h.HTML],[D.I,h.I],[D.IMG,h.IMG],[D.IMAGE,h.IMAGE],[D.INPUT,h.INPUT],[D.IFRAME,h.IFRAME],[D.KEYGEN,h.KEYGEN],[D.LABEL,h.LABEL],[D.LI,h.LI],[D.LINK,h.LINK],[D.LISTING,h.LISTING],[D.MAIN,h.MAIN],[D.MALIGNMARK,h.MALIGNMARK],[D.MARQUEE,h.MARQUEE],[D.MATH,h.MATH],[D.MENU,h.MENU],[D.META,h.META],[D.MGLYPH,h.MGLYPH],[D.MI,h.MI],[D.MO,h.MO],[D.MN,h.MN],[D.MS,h.MS],[D.MTEXT,h.MTEXT],[D.NAV,h.NAV],[D.NOBR,h.NOBR],[D.NOFRAMES,h.NOFRAMES],[D.NOEMBED,h.NOEMBED],[D.NOSCRIPT,h.NOSCRIPT],[D.OBJECT,h.OBJECT],[D.OL,h.OL],[D.OPTGROUP,h.OPTGROUP],[D.OPTION,h.OPTION],[D.P,h.P],[D.PARAM,h.PARAM],[D.PLAINTEXT,h.PLAINTEXT],[D.PRE,h.PRE],[D.RB,h.RB],[D.RP,h.RP],[D.RT,h.RT],[D.RTC,h.RTC],[D.RUBY,h.RUBY],[D.S,h.S],[D.SCRIPT,h.SCRIPT],[D.SEARCH,h.SEARCH],[D.SECTION,h.SECTION],[D.SELECT,h.SELECT],[D.SOURCE,h.SOURCE],[D.SMALL,h.SMALL],[D.SPAN,h.SPAN],[D.STRIKE,h.STRIKE],[D.STRONG,h.STRONG],[D.STYLE,h.STYLE],[D.SUB,h.SUB],[D.SUMMARY,h.SUMMARY],[D.SUP,h.SUP],[D.TABLE,h.TABLE],[D.TBODY,h.TBODY],[D.TEMPLATE,h.TEMPLATE],[D.TEXTAREA,h.TEXTAREA],[D.TFOOT,h.TFOOT],[D.TD,h.TD],[D.TH,h.TH],[D.THEAD,h.THEAD],[D.TITLE,h.TITLE],[D.TR,h.TR],[D.TRACK,h.TRACK],[D.TT,h.TT],[D.U,h.U],[D.UL,h.UL],[D.SVG,h.SVG],[D.VAR,h.VAR],[D.WBR,h.WBR],[D.XMP,h.XMP]]);function Ba(e){var t;return(t=o8.get(e))!==null&&t!==void 0?t:h.UNKNOWN}const K=h,l8={[F.HTML]:new Set([K.ADDRESS,K.APPLET,K.AREA,K.ARTICLE,K.ASIDE,K.BASE,K.BASEFONT,K.BGSOUND,K.BLOCKQUOTE,K.BODY,K.BR,K.BUTTON,K.CAPTION,K.CENTER,K.COL,K.COLGROUP,K.DD,K.DETAILS,K.DIR,K.DIV,K.DL,K.DT,K.EMBED,K.FIELDSET,K.FIGCAPTION,K.FIGURE,K.FOOTER,K.FORM,K.FRAME,K.FRAMESET,K.H1,K.H2,K.H3,K.H4,K.H5,K.H6,K.HEAD,K.HEADER,K.HGROUP,K.HR,K.HTML,K.IFRAME,K.IMG,K.INPUT,K.LI,K.LINK,K.LISTING,K.MAIN,K.MARQUEE,K.MENU,K.META,K.NAV,K.NOEMBED,K.NOFRAMES,K.NOSCRIPT,K.OBJECT,K.OL,K.P,K.PARAM,K.PLAINTEXT,K.PRE,K.SCRIPT,K.SECTION,K.SELECT,K.SOURCE,K.STYLE,K.SUMMARY,K.TABLE,K.TBODY,K.TD,K.TEMPLATE,K.TEXTAREA,K.TFOOT,K.TH,K.THEAD,K.TITLE,K.TR,K.TRACK,K.UL,K.WBR,K.XMP]),[F.MATHML]:new Set([K.MI,K.MO,K.MN,K.MS,K.MTEXT,K.ANNOTATION_XML]),[F.SVG]:new Set([K.TITLE,K.FOREIGN_OBJECT,K.DESC]),[F.XLINK]:new Set,[F.XML]:new Set,[F.XMLNS]:new Set},uc=new Set([K.H1,K.H2,K.H3,K.H4,K.H5,K.H6]),c8=new Set([D.STYLE,D.SCRIPT,D.XMP,D.IFRAME,D.NOEMBED,D.NOFRAMES,D.PLAINTEXT]);function d8(e,t){return c8.has(e)||t&&e===D.NOSCRIPT}var y;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(y||(y={}));const ct={DATA:y.DATA,RCDATA:y.RCDATA,RAWTEXT:y.RAWTEXT,SCRIPT_DATA:y.SCRIPT_DATA,PLAINTEXT:y.PLAINTEXT,CDATA_SECTION:y.CDATA_SECTION};function f8(e){return e>=b.DIGIT_0&&e<=b.DIGIT_9}function Pi(e){return e>=b.LATIN_CAPITAL_A&&e<=b.LATIN_CAPITAL_Z}function h8(e){return e>=b.LATIN_SMALL_A&&e<=b.LATIN_SMALL_Z}function Rn(e){return h8(e)||Pi(e)}function D0(e){return Rn(e)||f8(e)}function as(e){return e+32}function Gg(e){return e===b.SPACE||e===b.LINE_FEED||e===b.TABULATION||e===b.FORM_FEED}function _0(e){return Gg(e)||e===b.SOLIDUS||e===b.GREATER_THAN_SIGN}function p8(e){return e===b.NULL?M.nullCharacterReference:e>1114111?M.characterReferenceOutsideUnicodeRange:Kg(e)?M.surrogateCharacterReference:Yg(e)?M.noncharacterCharacterReference:Qg(e)||e===b.CARRIAGE_RETURN?M.controlCharacterReference:null}let m8=class{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=y.DATA,this.returnState=y.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new X4(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new s8($4,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(M.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(M.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=p8(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:me.START_TAG,tagName:"",tagID:h.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:me.END_TAG,tagName:"",tagID:h.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:me.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:me.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(zg(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(M.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Ba(t.tagName),t.type===me.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(M.endTagWithAttributes),t.selfClosing&&this._err(M.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case me.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case me.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case me.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:me.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=Gg(t)?me.WHITESPACE_CHARACTER:t===b.NULL?me.NULL_CHARACTER:me.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(me.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=y.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?gn.Attribute:gn.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===y.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===y.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===y.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case y.DATA:{this._stateData(t);break}case y.RCDATA:{this._stateRcdata(t);break}case y.RAWTEXT:{this._stateRawtext(t);break}case y.SCRIPT_DATA:{this._stateScriptData(t);break}case y.PLAINTEXT:{this._statePlaintext(t);break}case y.TAG_OPEN:{this._stateTagOpen(t);break}case y.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case y.TAG_NAME:{this._stateTagName(t);break}case y.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case y.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case y.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case y.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case y.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case y.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case y.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case y.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case y.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case y.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case y.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case y.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case y.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case y.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case y.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case y.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case y.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case y.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case y.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case y.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case y.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case y.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case y.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case y.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case y.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case y.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case y.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case y.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case y.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case y.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case y.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case y.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case y.BOGUS_COMMENT:{this._stateBogusComment(t);break}case y.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case y.COMMENT_START:{this._stateCommentStart(t);break}case y.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case y.COMMENT:{this._stateComment(t);break}case y.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case y.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case y.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case y.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case y.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case y.COMMENT_END:{this._stateCommentEnd(t);break}case y.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case y.DOCTYPE:{this._stateDoctype(t);break}case y.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case y.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case y.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case y.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case y.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case y.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case y.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case y.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case y.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case y.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case y.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case y.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case y.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case y.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case y.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case y.CDATA_SECTION:{this._stateCdataSection(t);break}case y.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case y.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case y.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case y.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case b.LESS_THAN_SIGN:{this.state=y.TAG_OPEN;break}case b.AMPERSAND:{this._startCharacterReference();break}case b.NULL:{this._err(M.unexpectedNullCharacter),this._emitCodePoint(t);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case b.AMPERSAND:{this._startCharacterReference();break}case b.LESS_THAN_SIGN:{this.state=y.RCDATA_LESS_THAN_SIGN;break}case b.NULL:{this._err(M.unexpectedNullCharacter),this._emitChars(Se);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case b.LESS_THAN_SIGN:{this.state=y.RAWTEXT_LESS_THAN_SIGN;break}case b.NULL:{this._err(M.unexpectedNullCharacter),this._emitChars(Se);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case b.LESS_THAN_SIGN:{this.state=y.SCRIPT_DATA_LESS_THAN_SIGN;break}case b.NULL:{this._err(M.unexpectedNullCharacter),this._emitChars(Se);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case b.NULL:{this._err(M.unexpectedNullCharacter),this._emitChars(Se);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Rn(t))this._createStartTagToken(),this.state=y.TAG_NAME,this._stateTagName(t);else switch(t){case b.EXCLAMATION_MARK:{this.state=y.MARKUP_DECLARATION_OPEN;break}case b.SOLIDUS:{this.state=y.END_TAG_OPEN;break}case b.QUESTION_MARK:{this._err(M.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=y.BOGUS_COMMENT,this._stateBogusComment(t);break}case b.EOF:{this._err(M.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(M.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=y.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Rn(t))this._createEndTagToken(),this.state=y.TAG_NAME,this._stateTagName(t);else switch(t){case b.GREATER_THAN_SIGN:{this._err(M.missingEndTagName),this.state=y.DATA;break}case b.EOF:{this._err(M.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(M.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=y.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=y.BEFORE_ATTRIBUTE_NAME;break}case b.SOLIDUS:{this.state=y.SELF_CLOSING_START_TAG;break}case b.GREATER_THAN_SIGN:{this.state=y.DATA,this.emitCurrentTagToken();break}case b.NULL:{this._err(M.unexpectedNullCharacter),n.tagName+=Se;break}case b.EOF:{this._err(M.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Pi(t)?as(t):t)}}_stateRcdataLessThanSign(t){t===b.SOLIDUS?this.state=y.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=y.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Rn(t)?(this.state=y.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=y.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=y.BEFORE_ATTRIBUTE_NAME,!1;case b.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=y.SELF_CLOSING_START_TAG,!1;case b.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=y.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=y.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===b.SOLIDUS?this.state=y.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=y.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Rn(t)?(this.state=y.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=y.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=y.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case b.SOLIDUS:{this.state=y.SCRIPT_DATA_END_TAG_OPEN;break}case b.EXCLAMATION_MARK:{this.state=y.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=y.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Rn(t)?(this.state=y.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=y.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=y.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===b.HYPHEN_MINUS?(this.state=y.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=y.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===b.HYPHEN_MINUS?(this.state=y.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=y.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case b.HYPHEN_MINUS:{this.state=y.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=y.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case b.NULL:{this._err(M.unexpectedNullCharacter),this._emitChars(Se);break}case b.EOF:{this._err(M.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case b.HYPHEN_MINUS:{this.state=y.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=y.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case b.NULL:{this._err(M.unexpectedNullCharacter),this.state=y.SCRIPT_DATA_ESCAPED,this._emitChars(Se);break}case b.EOF:{this._err(M.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=y.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case b.HYPHEN_MINUS:{this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=y.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case b.GREATER_THAN_SIGN:{this.state=y.SCRIPT_DATA,this._emitChars(">");break}case b.NULL:{this._err(M.unexpectedNullCharacter),this.state=y.SCRIPT_DATA_ESCAPED,this._emitChars(Se);break}case b.EOF:{this._err(M.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=y.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===b.SOLIDUS?this.state=y.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Rn(t)?(this._emitChars("<"),this.state=y.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=y.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Rn(t)?(this.state=y.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=y.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=y.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(at.SCRIPT,!1)&&_0(this.preprocessor.peek(at.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<at.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=y.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case b.HYPHEN_MINUS:{this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case b.NULL:{this._err(M.unexpectedNullCharacter),this._emitChars(Se);break}case b.EOF:{this._err(M.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case b.HYPHEN_MINUS:{this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case b.NULL:{this._err(M.unexpectedNullCharacter),this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Se);break}case b.EOF:{this._err(M.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case b.HYPHEN_MINUS:{this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case b.GREATER_THAN_SIGN:{this.state=y.SCRIPT_DATA,this._emitChars(">");break}case b.NULL:{this._err(M.unexpectedNullCharacter),this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Se);break}case b.EOF:{this._err(M.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===b.SOLIDUS?(this.state=y.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(at.SCRIPT,!1)&&_0(this.preprocessor.peek(at.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<at.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=y.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=y.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.SOLIDUS:case b.GREATER_THAN_SIGN:case b.EOF:{this.state=y.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case b.EQUALS_SIGN:{this._err(M.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=y.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=y.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:case b.SOLIDUS:case b.GREATER_THAN_SIGN:case b.EOF:{this._leaveAttrName(),this.state=y.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case b.EQUALS_SIGN:{this._leaveAttrName(),this.state=y.BEFORE_ATTRIBUTE_VALUE;break}case b.QUOTATION_MARK:case b.APOSTROPHE:case b.LESS_THAN_SIGN:{this._err(M.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case b.NULL:{this._err(M.unexpectedNullCharacter),this.currentAttr.name+=Se;break}default:this.currentAttr.name+=String.fromCodePoint(Pi(t)?as(t):t)}}_stateAfterAttributeName(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.SOLIDUS:{this.state=y.SELF_CLOSING_START_TAG;break}case b.EQUALS_SIGN:{this.state=y.BEFORE_ATTRIBUTE_VALUE;break}case b.GREATER_THAN_SIGN:{this.state=y.DATA,this.emitCurrentTagToken();break}case b.EOF:{this._err(M.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=y.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.QUOTATION_MARK:{this.state=y.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case b.APOSTROPHE:{this.state=y.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(M.missingAttributeValue),this.state=y.DATA,this.emitCurrentTagToken();break}default:this.state=y.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case b.QUOTATION_MARK:{this.state=y.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case b.AMPERSAND:{this._startCharacterReference();break}case b.NULL:{this._err(M.unexpectedNullCharacter),this.currentAttr.value+=Se;break}case b.EOF:{this._err(M.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case b.APOSTROPHE:{this.state=y.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case b.AMPERSAND:{this._startCharacterReference();break}case b.NULL:{this._err(M.unexpectedNullCharacter),this.currentAttr.value+=Se;break}case b.EOF:{this._err(M.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this._leaveAttrValue(),this.state=y.BEFORE_ATTRIBUTE_NAME;break}case b.AMPERSAND:{this._startCharacterReference();break}case b.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=y.DATA,this.emitCurrentTagToken();break}case b.NULL:{this._err(M.unexpectedNullCharacter),this.currentAttr.value+=Se;break}case b.QUOTATION_MARK:case b.APOSTROPHE:case b.LESS_THAN_SIGN:case b.EQUALS_SIGN:case b.GRAVE_ACCENT:{this._err(M.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case b.EOF:{this._err(M.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this._leaveAttrValue(),this.state=y.BEFORE_ATTRIBUTE_NAME;break}case b.SOLIDUS:{this._leaveAttrValue(),this.state=y.SELF_CLOSING_START_TAG;break}case b.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=y.DATA,this.emitCurrentTagToken();break}case b.EOF:{this._err(M.eofInTag),this._emitEOFToken();break}default:this._err(M.missingWhitespaceBetweenAttributes),this.state=y.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case b.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=y.DATA,this.emitCurrentTagToken();break}case b.EOF:{this._err(M.eofInTag),this._emitEOFToken();break}default:this._err(M.unexpectedSolidusInTag),this.state=y.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case b.GREATER_THAN_SIGN:{this.state=y.DATA,this.emitCurrentComment(n);break}case b.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case b.NULL:{this._err(M.unexpectedNullCharacter),n.data+=Se;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(at.DASH_DASH,!0)?(this._createCommentToken(at.DASH_DASH.length+1),this.state=y.COMMENT_START):this._consumeSequenceIfMatch(at.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(at.DOCTYPE.length+1),this.state=y.DOCTYPE):this._consumeSequenceIfMatch(at.CDATA_START,!0)?this.inForeignNode?this.state=y.CDATA_SECTION:(this._err(M.cdataInHtmlContent),this._createCommentToken(at.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=y.BOGUS_COMMENT):this._ensureHibernation()||(this._err(M.incorrectlyOpenedComment),this._createCommentToken(2),this.state=y.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case b.HYPHEN_MINUS:{this.state=y.COMMENT_START_DASH;break}case b.GREATER_THAN_SIGN:{this._err(M.abruptClosingOfEmptyComment),this.state=y.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=y.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case b.HYPHEN_MINUS:{this.state=y.COMMENT_END;break}case b.GREATER_THAN_SIGN:{this._err(M.abruptClosingOfEmptyComment),this.state=y.DATA,this.emitCurrentComment(n);break}case b.EOF:{this._err(M.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=y.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case b.HYPHEN_MINUS:{this.state=y.COMMENT_END_DASH;break}case b.LESS_THAN_SIGN:{n.data+="<",this.state=y.COMMENT_LESS_THAN_SIGN;break}case b.NULL:{this._err(M.unexpectedNullCharacter),n.data+=Se;break}case b.EOF:{this._err(M.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case b.EXCLAMATION_MARK:{n.data+="!",this.state=y.COMMENT_LESS_THAN_SIGN_BANG;break}case b.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=y.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===b.HYPHEN_MINUS?this.state=y.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=y.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===b.HYPHEN_MINUS?this.state=y.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=y.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==b.GREATER_THAN_SIGN&&t!==b.EOF&&this._err(M.nestedComment),this.state=y.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case b.HYPHEN_MINUS:{this.state=y.COMMENT_END;break}case b.EOF:{this._err(M.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=y.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case b.GREATER_THAN_SIGN:{this.state=y.DATA,this.emitCurrentComment(n);break}case b.EXCLAMATION_MARK:{this.state=y.COMMENT_END_BANG;break}case b.HYPHEN_MINUS:{n.data+="-";break}case b.EOF:{this._err(M.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=y.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case b.HYPHEN_MINUS:{n.data+="--!",this.state=y.COMMENT_END_DASH;break}case b.GREATER_THAN_SIGN:{this._err(M.incorrectlyClosedComment),this.state=y.DATA,this.emitCurrentComment(n);break}case b.EOF:{this._err(M.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=y.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=y.BEFORE_DOCTYPE_NAME;break}case b.GREATER_THAN_SIGN:{this.state=y.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case b.EOF:{this._err(M.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(M.missingWhitespaceBeforeDoctypeName),this.state=y.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Pi(t))this._createDoctypeToken(String.fromCharCode(as(t))),this.state=y.DOCTYPE_NAME;else switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.NULL:{this._err(M.unexpectedNullCharacter),this._createDoctypeToken(Se),this.state=y.DOCTYPE_NAME;break}case b.GREATER_THAN_SIGN:{this._err(M.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=y.DATA;break}case b.EOF:{this._err(M.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=y.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=y.AFTER_DOCTYPE_NAME;break}case b.GREATER_THAN_SIGN:{this.state=y.DATA,this.emitCurrentDoctype(n);break}case b.NULL:{this._err(M.unexpectedNullCharacter),n.name+=Se;break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Pi(t)?as(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.GREATER_THAN_SIGN:{this.state=y.DATA,this.emitCurrentDoctype(n);break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(at.PUBLIC,!1)?this.state=y.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(at.SYSTEM,!1)?this.state=y.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(M.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=y.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=y.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case b.QUOTATION_MARK:{this._err(M.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=y.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{this._err(M.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=y.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(M.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=y.DATA,this.emitCurrentDoctype(n);break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(M.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=y.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.QUOTATION_MARK:{n.publicId="",this.state=y.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{n.publicId="",this.state=y.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(M.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=y.DATA,this.emitCurrentDoctype(n);break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(M.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=y.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case b.QUOTATION_MARK:{this.state=y.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case b.NULL:{this._err(M.unexpectedNullCharacter),n.publicId+=Se;break}case b.GREATER_THAN_SIGN:{this._err(M.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=y.DATA;break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case b.APOSTROPHE:{this.state=y.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case b.NULL:{this._err(M.unexpectedNullCharacter),n.publicId+=Se;break}case b.GREATER_THAN_SIGN:{this._err(M.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=y.DATA;break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=y.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case b.GREATER_THAN_SIGN:{this.state=y.DATA,this.emitCurrentDoctype(n);break}case b.QUOTATION_MARK:{this._err(M.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=y.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{this._err(M.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=y.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(M.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=y.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=y.DATA;break}case b.QUOTATION_MARK:{n.systemId="",this.state=y.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{n.systemId="",this.state=y.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(M.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=y.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=y.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case b.QUOTATION_MARK:{this._err(M.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=y.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{this._err(M.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=y.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(M.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=y.DATA,this.emitCurrentDoctype(n);break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(M.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=y.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.QUOTATION_MARK:{n.systemId="",this.state=y.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{n.systemId="",this.state=y.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(M.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=y.DATA,this.emitCurrentDoctype(n);break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(M.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=y.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case b.QUOTATION_MARK:{this.state=y.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case b.NULL:{this._err(M.unexpectedNullCharacter),n.systemId+=Se;break}case b.GREATER_THAN_SIGN:{this._err(M.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=y.DATA;break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case b.APOSTROPHE:{this.state=y.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case b.NULL:{this._err(M.unexpectedNullCharacter),n.systemId+=Se;break}case b.GREATER_THAN_SIGN:{this._err(M.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=y.DATA;break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=y.DATA;break}case b.EOF:{this._err(M.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(M.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=y.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case b.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=y.DATA;break}case b.NULL:{this._err(M.unexpectedNullCharacter);break}case b.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case b.RIGHT_SQUARE_BRACKET:{this.state=y.CDATA_SECTION_BRACKET;break}case b.EOF:{this._err(M.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===b.RIGHT_SQUARE_BRACKET?this.state=y.CDATA_SECTION_END:(this._emitChars("]"),this.state=y.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case b.GREATER_THAN_SIGN:{this.state=y.DATA;break}case b.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=y.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(b.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&D0(this.preprocessor.peek(1))?y.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){D0(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===b.SEMICOLON&&this._err(M.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}};const Vg=new Set([h.DD,h.DT,h.LI,h.OPTGROUP,h.OPTION,h.P,h.RB,h.RP,h.RT,h.RTC]),O0=new Set([...Vg,h.CAPTION,h.COLGROUP,h.TBODY,h.TD,h.TFOOT,h.TH,h.THEAD,h.TR]),Xs=new Set([h.APPLET,h.CAPTION,h.HTML,h.MARQUEE,h.OBJECT,h.TABLE,h.TD,h.TEMPLATE,h.TH]),A8=new Set([...Xs,h.OL,h.UL]),g8=new Set([...Xs,h.BUTTON]),R0=new Set([h.ANNOTATION_XML,h.MI,h.MN,h.MO,h.MS,h.MTEXT]),M0=new Set([h.DESC,h.FOREIGN_OBJECT,h.TITLE]),b8=new Set([h.TR,h.TEMPLATE,h.HTML]),E8=new Set([h.TBODY,h.TFOOT,h.THEAD,h.TEMPLATE,h.HTML]),y8=new Set([h.TABLE,h.TEMPLATE,h.HTML]),T8=new Set([h.TD,h.TH]);class C8{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=h.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===h.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===F.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==F.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(uc,F.HTML)}popUntilTableCellPopped(){this.popUntilPopped(T8,F.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(y8,F.HTML)}clearBackToTableBodyContext(){this.clearBackTo(E8,F.HTML)}clearBackToTableRowContext(){this.clearBackTo(b8,F.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===h.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===h.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case F.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case F.SVG:{if(M0.has(i))return!1;break}case F.MATHML:{if(R0.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Xs)}hasInListItemScope(t){return this.hasInDynamicScope(t,A8)}hasInButtonScope(t){return this.hasInDynamicScope(t,g8)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case F.HTML:{if(uc.has(n))return!0;if(Xs.has(n))return!1;break}case F.SVG:{if(M0.has(n))return!1;break}case F.MATHML:{if(R0.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===F.HTML)switch(this.tagIDs[n]){case t:return!0;case h.TABLE:case h.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===F.HTML)switch(this.tagIDs[t]){case h.TBODY:case h.THEAD:case h.TFOOT:return!0;case h.TABLE:case h.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===F.HTML)switch(this.tagIDs[n]){case t:return!0;case h.OPTION:case h.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Vg.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&O0.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&O0.has(this.currentTagId);)this.pop()}}const Yo=3;var Gt;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Gt||(Gt={}));const B0={type:Gt.Marker};class x8{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,u=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let a=0;a<this.entries.length;a++){const o=this.entries[a];if(o.type===Gt.Marker)break;const{element:l}=o;if(this.treeAdapter.getTagName(l)===u&&this.treeAdapter.getNamespaceURI(l)===s){const c=this.treeAdapter.getAttrList(l);c.length===i&&r.push({idx:a,attrs:c})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Yo)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Yo)return;const i=new Map(n.map(s=>[s.name,s.value]));let u=0;for(let s=0;s<r.length;s++){const a=r[s];a.attrs.every(o=>i.get(o.name)===o.value)&&(u+=1,u>=Yo&&this.entries.splice(a.idx,1))}}insertMarker(){this.entries.unshift(B0)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Gt.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Gt.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(B0);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Gt.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Gt.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Gt.Element&&n.element===t)}}const pn={createDocument(){return{nodeName:"#document",mode:gt.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(u=>u.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const u={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};pn.appendChild(e,u)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(pn.isTextNode(n)){n.value+=t;return}}pn.appendChild(e,pn.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&pn.isTextNode(r)?r.value+=t:pn.insertBefore(e,pn.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},qg="html",k8="about:legacy-compat",I8="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Jg=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],S8=[...Jg,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],w8=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),jg=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],N8=[...jg,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function L0(e,t){return t.some(n=>e.startsWith(n))}function D8(e){return e.name===qg&&e.publicId===null&&(e.systemId===null||e.systemId===k8)}function _8(e){if(e.name!==qg)return gt.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===I8)return gt.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),w8.has(n))return gt.QUIRKS;let r=t===null?S8:Jg;if(L0(n,r))return gt.QUIRKS;if(r=t===null?jg:N8,L0(n,r))return gt.LIMITED_QUIRKS}return gt.NO_QUIRKS}const v0={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},O8="definitionurl",R8="definitionURL",M8=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),B8=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:F.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:F.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:F.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:F.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:F.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:F.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:F.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:F.XML}],["xml:space",{prefix:"xml",name:"space",namespace:F.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:F.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:F.XMLNS}]]),L8=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),v8=new Set([h.B,h.BIG,h.BLOCKQUOTE,h.BODY,h.BR,h.CENTER,h.CODE,h.DD,h.DIV,h.DL,h.DT,h.EM,h.EMBED,h.H1,h.H2,h.H3,h.H4,h.H5,h.H6,h.HEAD,h.HR,h.I,h.IMG,h.LI,h.LISTING,h.MENU,h.META,h.NOBR,h.OL,h.P,h.PRE,h.RUBY,h.S,h.SMALL,h.SPAN,h.STRONG,h.STRIKE,h.SUB,h.SUP,h.TABLE,h.TT,h.U,h.UL,h.VAR]);function P8(e){const t=e.tagID;return t===h.FONT&&e.attrs.some(({name:r})=>r===br.COLOR||r===br.SIZE||r===br.FACE)||v8.has(t)}function Zg(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===O8){e.attrs[t].name=R8;break}}function Xg(e){for(let t=0;t<e.attrs.length;t++){const n=M8.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function pf(e){for(let t=0;t<e.attrs.length;t++){const n=B8.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function F8(e){const t=L8.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Ba(e.tagName))}function H8(e,t){return t===F.MATHML&&(e===h.MI||e===h.MO||e===h.MN||e===h.MS||e===h.MTEXT)}function U8(e,t,n){if(t===F.MATHML&&e===h.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===br.ENCODING){const i=n[r].value.toLowerCase();return i===v0.TEXT_HTML||i===v0.APPLICATION_XML}}return t===F.SVG&&(e===h.FOREIGN_OBJECT||e===h.DESC||e===h.TITLE)}function W8(e,t,n,r){return(!r||r===F.HTML)&&U8(e,t,n)||(!r||r===F.MATHML)&&H8(e,t)}const K8="hidden",Q8=8,Y8=3;var T;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(T||(T={}));const z8={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},$g=new Set([h.TABLE,h.TBODY,h.TFOOT,h.THEAD,h.TR]),P0={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:pn,onParseError:null};let eb=class{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=T.INITIAL,this.originalInsertionMode=T.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...P0,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new m8(this.options,this),this.activeFormattingElements=new x8(this.treeAdapter),this.fragmentContextID=r?Ba(this.treeAdapter.getTagName(r)):h.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new C8(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...P0,...n};t??(t=r.treeAdapter.createElement(D.TEMPLATE,F.HTML,[]));const i=r.treeAdapter.createElement("documentmock",F.HTML,[]),u=new this(r,i,t);return u.fragmentContextID===h.TEMPLATE&&u.tmplInsertionModeStack.unshift(T.IN_TEMPLATE),u._initTokenizerForFragmentParsing(),u._insertFakeRootElement(),u._resetInsertionMode(),u._findFormInFragmentContext(),u}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const u=(i=t.location)!==null&&i!==void 0?i:z8,s={code:n,startLine:u.startLine,startCol:u.startCol,startOffset:u.startOffset,endLine:r?u.startLine:u.endLine,endCol:r?u.startCol:u.endCol,endOffset:r?u.startOffset:u.endOffset};this.onParseError(s)}onItemPush(t,n,r){var i,u;(u=(i=this.treeAdapter).onItemPush)===null||u===void 0||u.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let u,s;this.openElements.stackTop===0&&this.fragmentContext?(u=this.fragmentContext,s=this.fragmentContextID):{current:u,currentTagId:s}=this.openElements,this._setContextModes(u,s)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===F.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,F.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=T.TEXT}switchToPlaintextParsing(){this.insertionMode=T.TEXT,this.originalInsertionMode=T.IN_BODY,this.tokenizer.state=ct.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===D.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==F.HTML))switch(this.fragmentContextID){case h.TITLE:case h.TEXTAREA:{this.tokenizer.state=ct.RCDATA;break}case h.STYLE:case h.XMP:case h.IFRAME:case h.NOEMBED:case h.NOFRAMES:case h.NOSCRIPT:{this.tokenizer.state=ct.RAWTEXT;break}case h.SCRIPT:{this.tokenizer.state=ct.SCRIPT_DATA;break}case h.PLAINTEXT:{this.tokenizer.state=ct.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const s=this.treeAdapter.getChildNodes(this.document).find(a=>this.treeAdapter.isDocumentTypeNode(a));s&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,F.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,F.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(D.HTML,F.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,h.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(n),u=r?i.lastIndexOf(r):i.length,s=i[u-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:o,endCol:l,endOffset:c}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:o,endCol:l,endOffset:c})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,i=this.treeAdapter.getTagName(t),u=n.type===me.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,u)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===h.SVG&&this.treeAdapter.getTagName(n)===D.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===F.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===h.MGLYPH||t.tagID===h.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,F.HTML)}_processToken(t){switch(t.type){case me.CHARACTER:{this.onCharacter(t);break}case me.NULL_CHARACTER:{this.onNullCharacter(t);break}case me.COMMENT:{this.onComment(t);break}case me.DOCTYPE:{this.onDoctype(t);break}case me.START_TAG:{this._processStartTag(t);break}case me.END_TAG:{this.onEndTag(t);break}case me.EOF:{this.onEof(t);break}case me.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),u=this.treeAdapter.getAttrList(n);return W8(t,i,u,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===Gt.Marker||this.openElements.contains(i.element)),r=n===-1?t-1:n-1;for(let i=r;i>=0;i--){const u=this.activeFormattingElements.entries[i];this._insertElement(u.token,this.treeAdapter.getNamespaceURI(u.element)),u.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=T.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(h.P),this.openElements.popUntilTagNamePopped(h.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case h.TR:{this.insertionMode=T.IN_ROW;return}case h.TBODY:case h.THEAD:case h.TFOOT:{this.insertionMode=T.IN_TABLE_BODY;return}case h.CAPTION:{this.insertionMode=T.IN_CAPTION;return}case h.COLGROUP:{this.insertionMode=T.IN_COLUMN_GROUP;return}case h.TABLE:{this.insertionMode=T.IN_TABLE;return}case h.BODY:{this.insertionMode=T.IN_BODY;return}case h.FRAMESET:{this.insertionMode=T.IN_FRAMESET;return}case h.SELECT:{this._resetInsertionModeForSelect(t);return}case h.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case h.HTML:{this.insertionMode=this.headElement?T.AFTER_HEAD:T.BEFORE_HEAD;return}case h.TD:case h.TH:{if(t>0){this.insertionMode=T.IN_CELL;return}break}case h.HEAD:{if(t>0){this.insertionMode=T.IN_HEAD;return}break}}this.insertionMode=T.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===h.TEMPLATE)break;if(r===h.TABLE){this.insertionMode=T.IN_SELECT_IN_TABLE;return}}this.insertionMode=T.IN_SELECT}_isElementCausesFosterParenting(t){return $g.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case h.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===F.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case h.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return l8[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){T_(this,t);return}switch(this.insertionMode){case T.INITIAL:{Si(this,t);break}case T.BEFORE_HTML:{Zi(this,t);break}case T.BEFORE_HEAD:{Xi(this,t);break}case T.IN_HEAD:{$i(this,t);break}case T.IN_HEAD_NO_SCRIPT:{eu(this,t);break}case T.AFTER_HEAD:{tu(this,t);break}case T.IN_BODY:case T.IN_CAPTION:case T.IN_CELL:case T.IN_TEMPLATE:{nb(this,t);break}case T.TEXT:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{zo(this,t);break}case T.IN_TABLE_TEXT:{ob(this,t);break}case T.IN_COLUMN_GROUP:{$s(this,t);break}case T.AFTER_BODY:{ea(this,t);break}case T.AFTER_AFTER_BODY:{ws(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){y_(this,t);return}switch(this.insertionMode){case T.INITIAL:{Si(this,t);break}case T.BEFORE_HTML:{Zi(this,t);break}case T.BEFORE_HEAD:{Xi(this,t);break}case T.IN_HEAD:{$i(this,t);break}case T.IN_HEAD_NO_SCRIPT:{eu(this,t);break}case T.AFTER_HEAD:{tu(this,t);break}case T.TEXT:{this._insertCharacters(t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{zo(this,t);break}case T.IN_COLUMN_GROUP:{$s(this,t);break}case T.AFTER_BODY:{ea(this,t);break}case T.AFTER_AFTER_BODY:{ws(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){sc(this,t);return}switch(this.insertionMode){case T.INITIAL:case T.BEFORE_HTML:case T.BEFORE_HEAD:case T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:case T.IN_BODY:case T.IN_TABLE:case T.IN_CAPTION:case T.IN_COLUMN_GROUP:case T.IN_TABLE_BODY:case T.IN_ROW:case T.IN_CELL:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:case T.IN_TEMPLATE:case T.IN_FRAMESET:case T.AFTER_FRAMESET:{sc(this,t);break}case T.IN_TABLE_TEXT:{wi(this,t);break}case T.AFTER_BODY:{X8(this,t);break}case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{$8(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case T.INITIAL:{eD(this,t);break}case T.BEFORE_HEAD:case T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:{this._err(t,M.misplacedDoctype);break}case T.IN_TABLE_TEXT:{wi(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,M.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?C_(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case T.INITIAL:{Si(this,t);break}case T.BEFORE_HTML:{tD(this,t);break}case T.BEFORE_HEAD:{rD(this,t);break}case T.IN_HEAD:{Wt(this,t);break}case T.IN_HEAD_NO_SCRIPT:{sD(this,t);break}case T.AFTER_HEAD:{oD(this,t);break}case T.IN_BODY:{et(this,t);break}case T.IN_TABLE:{ai(this,t);break}case T.IN_TABLE_TEXT:{wi(this,t);break}case T.IN_CAPTION:{i_(this,t);break}case T.IN_COLUMN_GROUP:{gf(this,t);break}case T.IN_TABLE_BODY:{Pa(this,t);break}case T.IN_ROW:{Fa(this,t);break}case T.IN_CELL:{a_(this,t);break}case T.IN_SELECT:{db(this,t);break}case T.IN_SELECT_IN_TABLE:{l_(this,t);break}case T.IN_TEMPLATE:{d_(this,t);break}case T.AFTER_BODY:{h_(this,t);break}case T.IN_FRAMESET:{p_(this,t);break}case T.AFTER_FRAMESET:{A_(this,t);break}case T.AFTER_AFTER_BODY:{b_(this,t);break}case T.AFTER_AFTER_FRAMESET:{E_(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?x_(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case T.INITIAL:{Si(this,t);break}case T.BEFORE_HTML:{nD(this,t);break}case T.BEFORE_HEAD:{iD(this,t);break}case T.IN_HEAD:{uD(this,t);break}case T.IN_HEAD_NO_SCRIPT:{aD(this,t);break}case T.AFTER_HEAD:{lD(this,t);break}case T.IN_BODY:{va(this,t);break}case T.TEXT:{qD(this,t);break}case T.IN_TABLE:{gu(this,t);break}case T.IN_TABLE_TEXT:{wi(this,t);break}case T.IN_CAPTION:{u_(this,t);break}case T.IN_COLUMN_GROUP:{s_(this,t);break}case T.IN_TABLE_BODY:{ac(this,t);break}case T.IN_ROW:{cb(this,t);break}case T.IN_CELL:{o_(this,t);break}case T.IN_SELECT:{fb(this,t);break}case T.IN_SELECT_IN_TABLE:{c_(this,t);break}case T.IN_TEMPLATE:{f_(this,t);break}case T.AFTER_BODY:{pb(this,t);break}case T.IN_FRAMESET:{m_(this,t);break}case T.AFTER_FRAMESET:{g_(this,t);break}case T.AFTER_AFTER_BODY:{ws(this,t);break}}}onEof(t){switch(this.insertionMode){case T.INITIAL:{Si(this,t);break}case T.BEFORE_HTML:{Zi(this,t);break}case T.BEFORE_HEAD:{Xi(this,t);break}case T.IN_HEAD:{$i(this,t);break}case T.IN_HEAD_NO_SCRIPT:{eu(this,t);break}case T.AFTER_HEAD:{tu(this,t);break}case T.IN_BODY:case T.IN_TABLE:case T.IN_CAPTION:case T.IN_COLUMN_GROUP:case T.IN_TABLE_BODY:case T.IN_ROW:case T.IN_CELL:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:{sb(this,t);break}case T.TEXT:{JD(this,t);break}case T.IN_TABLE_TEXT:{wi(this,t);break}case T.IN_TEMPLATE:{hb(this,t);break}case T.AFTER_BODY:case T.IN_FRAMESET:case T.AFTER_FRAMESET:case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{Af(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===b.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:case T.TEXT:case T.IN_COLUMN_GROUP:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:case T.IN_FRAMESET:case T.AFTER_FRAMESET:{this._insertCharacters(t);break}case T.IN_BODY:case T.IN_CAPTION:case T.IN_CELL:case T.IN_TEMPLATE:case T.AFTER_BODY:case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{tb(this,t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{zo(this,t);break}case T.IN_TABLE_TEXT:{ab(this,t);break}}}};function G8(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):ub(e,t),n}function V8(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function q8(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let u=0,s=i;s!==n;u++,s=i){i=e.openElements.getCommonAncestor(s);const a=e.activeFormattingElements.getElementEntry(s),o=a&&u>=Y8;!a||o?(o&&e.activeFormattingElements.removeEntry(a),e.openElements.remove(s)):(s=J8(e,a),r===t&&(e.activeFormattingElements.bookmark=a),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function J8(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function j8(e,t,n){const r=e.treeAdapter.getTagName(t),i=Ba(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const u=e.treeAdapter.getNamespaceURI(t);i===h.TEMPLATE&&u===F.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Z8(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,u=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,u),e.treeAdapter.appendChild(t,u),e.activeFormattingElements.insertElementAfterBookmark(u,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,u,i.tagID)}function mf(e,t){for(let n=0;n<Q8;n++){const r=G8(e,t);if(!r)break;const i=V8(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const u=q8(e,i,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(u),s&&j8(e,s,u),Z8(e,i,r)}}function sc(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function X8(e,t){e._appendCommentNode(t,e.openElements.items[0])}function $8(e,t){e._appendCommentNode(t,e.document)}function Af(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const u=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(u);s&&!s.endTag&&e._setEndLocation(u,t)}}}}function eD(e,t){e._setDocumentType(t);const n=t.forceQuirks?gt.QUIRKS:_8(t);D8(t)||e._err(t,M.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=T.BEFORE_HTML}function Si(e,t){e._err(t,M.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,gt.QUIRKS),e.insertionMode=T.BEFORE_HTML,e._processToken(t)}function tD(e,t){t.tagID===h.HTML?(e._insertElement(t,F.HTML),e.insertionMode=T.BEFORE_HEAD):Zi(e,t)}function nD(e,t){const n=t.tagID;(n===h.HTML||n===h.HEAD||n===h.BODY||n===h.BR)&&Zi(e,t)}function Zi(e,t){e._insertFakeRootElement(),e.insertionMode=T.BEFORE_HEAD,e._processToken(t)}function rD(e,t){switch(t.tagID){case h.HTML:{et(e,t);break}case h.HEAD:{e._insertElement(t,F.HTML),e.headElement=e.openElements.current,e.insertionMode=T.IN_HEAD;break}default:Xi(e,t)}}function iD(e,t){const n=t.tagID;n===h.HEAD||n===h.BODY||n===h.HTML||n===h.BR?Xi(e,t):e._err(t,M.endTagWithoutMatchingOpenElement)}function Xi(e,t){e._insertFakeElement(D.HEAD,h.HEAD),e.headElement=e.openElements.current,e.insertionMode=T.IN_HEAD,e._processToken(t)}function Wt(e,t){switch(t.tagID){case h.HTML:{et(e,t);break}case h.BASE:case h.BASEFONT:case h.BGSOUND:case h.LINK:case h.META:{e._appendElement(t,F.HTML),t.ackSelfClosing=!0;break}case h.TITLE:{e._switchToTextParsing(t,ct.RCDATA);break}case h.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,ct.RAWTEXT):(e._insertElement(t,F.HTML),e.insertionMode=T.IN_HEAD_NO_SCRIPT);break}case h.NOFRAMES:case h.STYLE:{e._switchToTextParsing(t,ct.RAWTEXT);break}case h.SCRIPT:{e._switchToTextParsing(t,ct.SCRIPT_DATA);break}case h.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=T.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(T.IN_TEMPLATE);break}case h.HEAD:{e._err(t,M.misplacedStartTagForHeadElement);break}default:$i(e,t)}}function uD(e,t){switch(t.tagID){case h.HEAD:{e.openElements.pop(),e.insertionMode=T.AFTER_HEAD;break}case h.BODY:case h.BR:case h.HTML:{$i(e,t);break}case h.TEMPLATE:{Lr(e,t);break}default:e._err(t,M.endTagWithoutMatchingOpenElement)}}function Lr(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==h.TEMPLATE&&e._err(t,M.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(h.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,M.endTagWithoutMatchingOpenElement)}function $i(e,t){e.openElements.pop(),e.insertionMode=T.AFTER_HEAD,e._processToken(t)}function sD(e,t){switch(t.tagID){case h.HTML:{et(e,t);break}case h.BASEFONT:case h.BGSOUND:case h.HEAD:case h.LINK:case h.META:case h.NOFRAMES:case h.STYLE:{Wt(e,t);break}case h.NOSCRIPT:{e._err(t,M.nestedNoscriptInHead);break}default:eu(e,t)}}function aD(e,t){switch(t.tagID){case h.NOSCRIPT:{e.openElements.pop(),e.insertionMode=T.IN_HEAD;break}case h.BR:{eu(e,t);break}default:e._err(t,M.endTagWithoutMatchingOpenElement)}}function eu(e,t){const n=t.type===me.EOF?M.openElementsLeftAfterEof:M.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=T.IN_HEAD,e._processToken(t)}function oD(e,t){switch(t.tagID){case h.HTML:{et(e,t);break}case h.BODY:{e._insertElement(t,F.HTML),e.framesetOk=!1,e.insertionMode=T.IN_BODY;break}case h.FRAMESET:{e._insertElement(t,F.HTML),e.insertionMode=T.IN_FRAMESET;break}case h.BASE:case h.BASEFONT:case h.BGSOUND:case h.LINK:case h.META:case h.NOFRAMES:case h.SCRIPT:case h.STYLE:case h.TEMPLATE:case h.TITLE:{e._err(t,M.abandonedHeadElementChild),e.openElements.push(e.headElement,h.HEAD),Wt(e,t),e.openElements.remove(e.headElement);break}case h.HEAD:{e._err(t,M.misplacedStartTagForHeadElement);break}default:tu(e,t)}}function lD(e,t){switch(t.tagID){case h.BODY:case h.HTML:case h.BR:{tu(e,t);break}case h.TEMPLATE:{Lr(e,t);break}default:e._err(t,M.endTagWithoutMatchingOpenElement)}}function tu(e,t){e._insertFakeElement(D.BODY,h.BODY),e.insertionMode=T.IN_BODY,La(e,t)}function La(e,t){switch(t.type){case me.CHARACTER:{nb(e,t);break}case me.WHITESPACE_CHARACTER:{tb(e,t);break}case me.COMMENT:{sc(e,t);break}case me.START_TAG:{et(e,t);break}case me.END_TAG:{va(e,t);break}case me.EOF:{sb(e,t);break}}}function tb(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function nb(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function cD(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function dD(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function fD(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,F.HTML),e.insertionMode=T.IN_FRAMESET)}function hD(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,F.HTML)}function pD(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&uc.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,F.HTML)}function mD(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,F.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function AD(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,F.HTML),n||(e.formElement=e.openElements.current))}function gD(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===h.LI&&i===h.LI||(n===h.DD||n===h.DT)&&(i===h.DD||i===h.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==h.ADDRESS&&i!==h.DIV&&i!==h.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,F.HTML)}function bD(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,F.HTML),e.tokenizer.state=ct.PLAINTEXT}function ED(e,t){e.openElements.hasInScope(h.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(h.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,F.HTML),e.framesetOk=!1}function yD(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(D.A);n&&(mf(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,F.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function TD(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,F.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function CD(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(h.NOBR)&&(mf(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,F.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function xD(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,F.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function kD(e,t){e.treeAdapter.getDocumentMode(e.document)!==gt.QUIRKS&&e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,F.HTML),e.framesetOk=!1,e.insertionMode=T.IN_TABLE}function rb(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,F.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function ib(e){const t=zg(e,br.TYPE);return t!=null&&t.toLowerCase()===K8}function ID(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,F.HTML),ib(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function SD(e,t){e._appendElement(t,F.HTML),t.ackSelfClosing=!0}function wD(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._appendElement(t,F.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function ND(e,t){t.tagName=D.IMG,t.tagID=h.IMG,rb(e,t)}function DD(e,t){e._insertElement(t,F.HTML),e.skipNextNewLine=!0,e.tokenizer.state=ct.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=T.TEXT}function _D(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,ct.RAWTEXT)}function OD(e,t){e.framesetOk=!1,e._switchToTextParsing(t,ct.RAWTEXT)}function F0(e,t){e._switchToTextParsing(t,ct.RAWTEXT)}function RD(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,F.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===T.IN_TABLE||e.insertionMode===T.IN_CAPTION||e.insertionMode===T.IN_TABLE_BODY||e.insertionMode===T.IN_ROW||e.insertionMode===T.IN_CELL?T.IN_SELECT_IN_TABLE:T.IN_SELECT}function MD(e,t){e.openElements.currentTagId===h.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,F.HTML)}function BD(e,t){e.openElements.hasInScope(h.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,F.HTML)}function LD(e,t){e.openElements.hasInScope(h.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(h.RTC),e._insertElement(t,F.HTML)}function vD(e,t){e._reconstructActiveFormattingElements(),Zg(t),pf(t),t.selfClosing?e._appendElement(t,F.MATHML):e._insertElement(t,F.MATHML),t.ackSelfClosing=!0}function PD(e,t){e._reconstructActiveFormattingElements(),Xg(t),pf(t),t.selfClosing?e._appendElement(t,F.SVG):e._insertElement(t,F.SVG),t.ackSelfClosing=!0}function H0(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,F.HTML)}function et(e,t){switch(t.tagID){case h.I:case h.S:case h.B:case h.U:case h.EM:case h.TT:case h.BIG:case h.CODE:case h.FONT:case h.SMALL:case h.STRIKE:case h.STRONG:{TD(e,t);break}case h.A:{yD(e,t);break}case h.H1:case h.H2:case h.H3:case h.H4:case h.H5:case h.H6:{pD(e,t);break}case h.P:case h.DL:case h.OL:case h.UL:case h.DIV:case h.DIR:case h.NAV:case h.MAIN:case h.MENU:case h.ASIDE:case h.CENTER:case h.FIGURE:case h.FOOTER:case h.HEADER:case h.HGROUP:case h.DIALOG:case h.DETAILS:case h.ADDRESS:case h.ARTICLE:case h.SEARCH:case h.SECTION:case h.SUMMARY:case h.FIELDSET:case h.BLOCKQUOTE:case h.FIGCAPTION:{hD(e,t);break}case h.LI:case h.DD:case h.DT:{gD(e,t);break}case h.BR:case h.IMG:case h.WBR:case h.AREA:case h.EMBED:case h.KEYGEN:{rb(e,t);break}case h.HR:{wD(e,t);break}case h.RB:case h.RTC:{BD(e,t);break}case h.RT:case h.RP:{LD(e,t);break}case h.PRE:case h.LISTING:{mD(e,t);break}case h.XMP:{_D(e,t);break}case h.SVG:{PD(e,t);break}case h.HTML:{cD(e,t);break}case h.BASE:case h.LINK:case h.META:case h.STYLE:case h.TITLE:case h.SCRIPT:case h.BGSOUND:case h.BASEFONT:case h.TEMPLATE:{Wt(e,t);break}case h.BODY:{dD(e,t);break}case h.FORM:{AD(e,t);break}case h.NOBR:{CD(e,t);break}case h.MATH:{vD(e,t);break}case h.TABLE:{kD(e,t);break}case h.INPUT:{ID(e,t);break}case h.PARAM:case h.TRACK:case h.SOURCE:{SD(e,t);break}case h.IMAGE:{ND(e,t);break}case h.BUTTON:{ED(e,t);break}case h.APPLET:case h.OBJECT:case h.MARQUEE:{xD(e,t);break}case h.IFRAME:{OD(e,t);break}case h.SELECT:{RD(e,t);break}case h.OPTION:case h.OPTGROUP:{MD(e,t);break}case h.NOEMBED:case h.NOFRAMES:{F0(e,t);break}case h.FRAMESET:{fD(e,t);break}case h.TEXTAREA:{DD(e,t);break}case h.NOSCRIPT:{e.options.scriptingEnabled?F0(e,t):H0(e,t);break}case h.PLAINTEXT:{bD(e,t);break}case h.COL:case h.TH:case h.TD:case h.TR:case h.HEAD:case h.FRAME:case h.TBODY:case h.TFOOT:case h.THEAD:case h.CAPTION:case h.COLGROUP:break;default:H0(e,t)}}function FD(e,t){if(e.openElements.hasInScope(h.BODY)&&(e.insertionMode=T.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function HD(e,t){e.openElements.hasInScope(h.BODY)&&(e.insertionMode=T.AFTER_BODY,pb(e,t))}function UD(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function WD(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(h.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(h.FORM):n&&e.openElements.remove(n))}function KD(e){e.openElements.hasInButtonScope(h.P)||e._insertFakeElement(D.P,h.P),e._closePElement()}function QD(e){e.openElements.hasInListItemScope(h.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(h.LI),e.openElements.popUntilTagNamePopped(h.LI))}function YD(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function zD(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function GD(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function VD(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(D.BR,h.BR),e.openElements.pop(),e.framesetOk=!1}function ub(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const u=e.openElements.items[i],s=e.openElements.tagIDs[i];if(r===s&&(r!==h.UNKNOWN||e.treeAdapter.getTagName(u)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(u,s))break}}function va(e,t){switch(t.tagID){case h.A:case h.B:case h.I:case h.S:case h.U:case h.EM:case h.TT:case h.BIG:case h.CODE:case h.FONT:case h.NOBR:case h.SMALL:case h.STRIKE:case h.STRONG:{mf(e,t);break}case h.P:{KD(e);break}case h.DL:case h.UL:case h.OL:case h.DIR:case h.DIV:case h.NAV:case h.PRE:case h.MAIN:case h.MENU:case h.ASIDE:case h.BUTTON:case h.CENTER:case h.FIGURE:case h.FOOTER:case h.HEADER:case h.HGROUP:case h.DIALOG:case h.ADDRESS:case h.ARTICLE:case h.DETAILS:case h.SEARCH:case h.SECTION:case h.SUMMARY:case h.LISTING:case h.FIELDSET:case h.BLOCKQUOTE:case h.FIGCAPTION:{UD(e,t);break}case h.LI:{QD(e);break}case h.DD:case h.DT:{YD(e,t);break}case h.H1:case h.H2:case h.H3:case h.H4:case h.H5:case h.H6:{zD(e);break}case h.BR:{VD(e);break}case h.BODY:{FD(e,t);break}case h.HTML:{HD(e,t);break}case h.FORM:{WD(e);break}case h.APPLET:case h.OBJECT:case h.MARQUEE:{GD(e,t);break}case h.TEMPLATE:{Lr(e,t);break}default:ub(e,t)}}function sb(e,t){e.tmplInsertionModeStack.length>0?hb(e,t):Af(e,t)}function qD(e,t){var n;t.tagID===h.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function JD(e,t){e._err(t,M.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function zo(e,t){if(e.openElements.currentTagId!==void 0&&$g.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=T.IN_TABLE_TEXT,t.type){case me.CHARACTER:{ob(e,t);break}case me.WHITESPACE_CHARACTER:{ab(e,t);break}}else Gu(e,t)}function jD(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,F.HTML),e.insertionMode=T.IN_CAPTION}function ZD(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,F.HTML),e.insertionMode=T.IN_COLUMN_GROUP}function XD(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(D.COLGROUP,h.COLGROUP),e.insertionMode=T.IN_COLUMN_GROUP,gf(e,t)}function $D(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,F.HTML),e.insertionMode=T.IN_TABLE_BODY}function e_(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(D.TBODY,h.TBODY),e.insertionMode=T.IN_TABLE_BODY,Pa(e,t)}function t_(e,t){e.openElements.hasInTableScope(h.TABLE)&&(e.openElements.popUntilTagNamePopped(h.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function n_(e,t){ib(t)?e._appendElement(t,F.HTML):Gu(e,t),t.ackSelfClosing=!0}function r_(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,F.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function ai(e,t){switch(t.tagID){case h.TD:case h.TH:case h.TR:{e_(e,t);break}case h.STYLE:case h.SCRIPT:case h.TEMPLATE:{Wt(e,t);break}case h.COL:{XD(e,t);break}case h.FORM:{r_(e,t);break}case h.TABLE:{t_(e,t);break}case h.TBODY:case h.TFOOT:case h.THEAD:{$D(e,t);break}case h.INPUT:{n_(e,t);break}case h.CAPTION:{jD(e,t);break}case h.COLGROUP:{ZD(e,t);break}default:Gu(e,t)}}function gu(e,t){switch(t.tagID){case h.TABLE:{e.openElements.hasInTableScope(h.TABLE)&&(e.openElements.popUntilTagNamePopped(h.TABLE),e._resetInsertionMode());break}case h.TEMPLATE:{Lr(e,t);break}case h.BODY:case h.CAPTION:case h.COL:case h.COLGROUP:case h.HTML:case h.TBODY:case h.TD:case h.TFOOT:case h.TH:case h.THEAD:case h.TR:break;default:Gu(e,t)}}function Gu(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,La(e,t),e.fosterParentingEnabled=n}function ab(e,t){e.pendingCharacterTokens.push(t)}function ob(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function wi(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Gu(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const lb=new Set([h.CAPTION,h.COL,h.COLGROUP,h.TBODY,h.TD,h.TFOOT,h.TH,h.THEAD,h.TR]);function i_(e,t){const n=t.tagID;lb.has(n)?e.openElements.hasInTableScope(h.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(h.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_TABLE,ai(e,t)):et(e,t)}function u_(e,t){const n=t.tagID;switch(n){case h.CAPTION:case h.TABLE:{e.openElements.hasInTableScope(h.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(h.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_TABLE,n===h.TABLE&&gu(e,t));break}case h.BODY:case h.COL:case h.COLGROUP:case h.HTML:case h.TBODY:case h.TD:case h.TFOOT:case h.TH:case h.THEAD:case h.TR:break;default:va(e,t)}}function gf(e,t){switch(t.tagID){case h.HTML:{et(e,t);break}case h.COL:{e._appendElement(t,F.HTML),t.ackSelfClosing=!0;break}case h.TEMPLATE:{Wt(e,t);break}default:$s(e,t)}}function s_(e,t){switch(t.tagID){case h.COLGROUP:{e.openElements.currentTagId===h.COLGROUP&&(e.openElements.pop(),e.insertionMode=T.IN_TABLE);break}case h.TEMPLATE:{Lr(e,t);break}case h.COL:break;default:$s(e,t)}}function $s(e,t){e.openElements.currentTagId===h.COLGROUP&&(e.openElements.pop(),e.insertionMode=T.IN_TABLE,e._processToken(t))}function Pa(e,t){switch(t.tagID){case h.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,F.HTML),e.insertionMode=T.IN_ROW;break}case h.TH:case h.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(D.TR,h.TR),e.insertionMode=T.IN_ROW,Fa(e,t);break}case h.CAPTION:case h.COL:case h.COLGROUP:case h.TBODY:case h.TFOOT:case h.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE,ai(e,t));break}default:ai(e,t)}}function ac(e,t){const n=t.tagID;switch(t.tagID){case h.TBODY:case h.TFOOT:case h.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE);break}case h.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE,gu(e,t));break}case h.BODY:case h.CAPTION:case h.COL:case h.COLGROUP:case h.HTML:case h.TD:case h.TH:case h.TR:break;default:gu(e,t)}}function Fa(e,t){switch(t.tagID){case h.TH:case h.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,F.HTML),e.insertionMode=T.IN_CELL,e.activeFormattingElements.insertMarker();break}case h.CAPTION:case h.COL:case h.COLGROUP:case h.TBODY:case h.TFOOT:case h.THEAD:case h.TR:{e.openElements.hasInTableScope(h.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY,Pa(e,t));break}default:ai(e,t)}}function cb(e,t){switch(t.tagID){case h.TR:{e.openElements.hasInTableScope(h.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY);break}case h.TABLE:{e.openElements.hasInTableScope(h.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY,ac(e,t));break}case h.TBODY:case h.TFOOT:case h.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(h.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY,ac(e,t));break}case h.BODY:case h.CAPTION:case h.COL:case h.COLGROUP:case h.HTML:case h.TD:case h.TH:break;default:gu(e,t)}}function a_(e,t){const n=t.tagID;lb.has(n)?(e.openElements.hasInTableScope(h.TD)||e.openElements.hasInTableScope(h.TH))&&(e._closeTableCell(),Fa(e,t)):et(e,t)}function o_(e,t){const n=t.tagID;switch(n){case h.TD:case h.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_ROW);break}case h.TABLE:case h.TBODY:case h.TFOOT:case h.THEAD:case h.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),cb(e,t));break}case h.BODY:case h.CAPTION:case h.COL:case h.COLGROUP:case h.HTML:break;default:va(e,t)}}function db(e,t){switch(t.tagID){case h.HTML:{et(e,t);break}case h.OPTION:{e.openElements.currentTagId===h.OPTION&&e.openElements.pop(),e._insertElement(t,F.HTML);break}case h.OPTGROUP:{e.openElements.currentTagId===h.OPTION&&e.openElements.pop(),e.openElements.currentTagId===h.OPTGROUP&&e.openElements.pop(),e._insertElement(t,F.HTML);break}case h.HR:{e.openElements.currentTagId===h.OPTION&&e.openElements.pop(),e.openElements.currentTagId===h.OPTGROUP&&e.openElements.pop(),e._appendElement(t,F.HTML),t.ackSelfClosing=!0;break}case h.INPUT:case h.KEYGEN:case h.TEXTAREA:case h.SELECT:{e.openElements.hasInSelectScope(h.SELECT)&&(e.openElements.popUntilTagNamePopped(h.SELECT),e._resetInsertionMode(),t.tagID!==h.SELECT&&e._processStartTag(t));break}case h.SCRIPT:case h.TEMPLATE:{Wt(e,t);break}}}function fb(e,t){switch(t.tagID){case h.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===h.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===h.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===h.OPTGROUP&&e.openElements.pop();break}case h.OPTION:{e.openElements.currentTagId===h.OPTION&&e.openElements.pop();break}case h.SELECT:{e.openElements.hasInSelectScope(h.SELECT)&&(e.openElements.popUntilTagNamePopped(h.SELECT),e._resetInsertionMode());break}case h.TEMPLATE:{Lr(e,t);break}}}function l_(e,t){const n=t.tagID;n===h.CAPTION||n===h.TABLE||n===h.TBODY||n===h.TFOOT||n===h.THEAD||n===h.TR||n===h.TD||n===h.TH?(e.openElements.popUntilTagNamePopped(h.SELECT),e._resetInsertionMode(),e._processStartTag(t)):db(e,t)}function c_(e,t){const n=t.tagID;n===h.CAPTION||n===h.TABLE||n===h.TBODY||n===h.TFOOT||n===h.THEAD||n===h.TR||n===h.TD||n===h.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(h.SELECT),e._resetInsertionMode(),e.onEndTag(t)):fb(e,t)}function d_(e,t){switch(t.tagID){case h.BASE:case h.BASEFONT:case h.BGSOUND:case h.LINK:case h.META:case h.NOFRAMES:case h.SCRIPT:case h.STYLE:case h.TEMPLATE:case h.TITLE:{Wt(e,t);break}case h.CAPTION:case h.COLGROUP:case h.TBODY:case h.TFOOT:case h.THEAD:{e.tmplInsertionModeStack[0]=T.IN_TABLE,e.insertionMode=T.IN_TABLE,ai(e,t);break}case h.COL:{e.tmplInsertionModeStack[0]=T.IN_COLUMN_GROUP,e.insertionMode=T.IN_COLUMN_GROUP,gf(e,t);break}case h.TR:{e.tmplInsertionModeStack[0]=T.IN_TABLE_BODY,e.insertionMode=T.IN_TABLE_BODY,Pa(e,t);break}case h.TD:case h.TH:{e.tmplInsertionModeStack[0]=T.IN_ROW,e.insertionMode=T.IN_ROW,Fa(e,t);break}default:e.tmplInsertionModeStack[0]=T.IN_BODY,e.insertionMode=T.IN_BODY,et(e,t)}}function f_(e,t){t.tagID===h.TEMPLATE&&Lr(e,t)}function hb(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(h.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Af(e,t)}function h_(e,t){t.tagID===h.HTML?et(e,t):ea(e,t)}function pb(e,t){var n;if(t.tagID===h.HTML){if(e.fragmentContext||(e.insertionMode=T.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===h.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else ea(e,t)}function ea(e,t){e.insertionMode=T.IN_BODY,La(e,t)}function p_(e,t){switch(t.tagID){case h.HTML:{et(e,t);break}case h.FRAMESET:{e._insertElement(t,F.HTML);break}case h.FRAME:{e._appendElement(t,F.HTML),t.ackSelfClosing=!0;break}case h.NOFRAMES:{Wt(e,t);break}}}function m_(e,t){t.tagID===h.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==h.FRAMESET&&(e.insertionMode=T.AFTER_FRAMESET))}function A_(e,t){switch(t.tagID){case h.HTML:{et(e,t);break}case h.NOFRAMES:{Wt(e,t);break}}}function g_(e,t){t.tagID===h.HTML&&(e.insertionMode=T.AFTER_AFTER_FRAMESET)}function b_(e,t){t.tagID===h.HTML?et(e,t):ws(e,t)}function ws(e,t){e.insertionMode=T.IN_BODY,La(e,t)}function E_(e,t){switch(t.tagID){case h.HTML:{et(e,t);break}case h.NOFRAMES:{Wt(e,t);break}}}function y_(e,t){t.chars=Se,e._insertCharacters(t)}function T_(e,t){e._insertCharacters(t),e.framesetOk=!1}function mb(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==F.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function C_(e,t){if(P8(t))mb(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===F.MATHML?Zg(t):r===F.SVG&&(F8(t),Xg(t)),pf(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function x_(e,t){if(t.tagID===h.P||t.tagID===h.BR){mb(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===F.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}function Ab(e,t){return function(r){let i,u=0,s="";for(;i=e.exec(r);)u!==i.index&&(s+=r.substring(u,i.index)),s+=t.get(i[0].charCodeAt(0)),u=i.index+1;return s+r.substring(u)}}const k_=Ab(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),I_=Ab(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]])),S_=new Set([D.AREA,D.BASE,D.BASEFONT,D.BGSOUND,D.BR,D.COL,D.EMBED,D.FRAME,D.HR,D.IMG,D.INPUT,D.KEYGEN,D.LINK,D.META,D.PARAM,D.SOURCE,D.TRACK,D.WBR]);function w_(e,t){return t.treeAdapter.isElementNode(e)&&t.treeAdapter.getNamespaceURI(e)===F.HTML&&S_.has(t.treeAdapter.getTagName(e))}const N_={treeAdapter:pn,scriptingEnabled:!0};function D_(e,t){const n={...N_,...t};return gb(e,n)}function __(e,t){let n="";const r=t.treeAdapter.isElementNode(e)&&t.treeAdapter.getTagName(e)===D.TEMPLATE&&t.treeAdapter.getNamespaceURI(e)===F.HTML?t.treeAdapter.getTemplateContent(e):e,i=t.treeAdapter.getChildNodes(r);if(i)for(const u of i)n+=gb(u,t);return n}function gb(e,t){return t.treeAdapter.isElementNode(e)?O_(e,t):t.treeAdapter.isTextNode(e)?M_(e,t):t.treeAdapter.isCommentNode(e)?B_(e,t):t.treeAdapter.isDocumentTypeNode(e)?L_(e,t):""}function O_(e,t){const n=t.treeAdapter.getTagName(e);return`<${n}${R_(e,t)}>${w_(e,t)?"":`${__(e,t)}</${n}>`}`}function R_(e,{treeAdapter:t}){let n="";for(const r of t.getAttrList(e)){if(n+=" ",r.namespace)switch(r.namespace){case F.XML:{n+=`xml:${r.name}`;break}case F.XMLNS:{r.name!=="xmlns"&&(n+="xmlns:"),n+=r.name;break}case F.XLINK:{n+=`xlink:${r.name}`;break}default:n+=`${r.prefix}:${r.name}`}else n+=r.name;n+=`="${k_(r.value)}"`}return n}function M_(e,t){const{treeAdapter:n}=t,r=n.getTextNodeContent(e),i=n.getParentNode(e),u=i&&n.isElementNode(i)&&n.getTagName(i);return u&&n.getNamespaceURI(i)===F.HTML&&d8(u,t.scriptingEnabled)?r:I_(r)}function B_(e,{treeAdapter:t}){return`<!--${t.getCommentNodeContent(e)}-->`}function L_(e,{treeAdapter:t}){return`<!DOCTYPE ${t.getDocumentTypeNodeName(e)}>`}function v_(e,t){return eb.parse(e,t)}function P_(e,t,n){typeof e=="string"&&(n=t,t=e,e=null);const r=eb.getFragmentParser(e,n);return r.tokenizer.write(t,!0),r.getFragment()}function U0(e){const t=e.includes('"')?"'":'"';return t+e+t}function F_(e,t,n){let r="!DOCTYPE ";return e&&(r+=e),t?r+=` PUBLIC ${U0(t)}`:n&&(r+=" SYSTEM"),n&&(r+=` ${U0(n)}`),r}const Ln={isCommentNode:Da,isElementNode:ne,isTextNode:jt,createDocument(){const e=new Dr([]);return e["x-mode"]=gt.NO_QUIRKS,e},createDocumentFragment(){return new Dr([])},createElement(e,t,n){const r=Object.create(null),i=Object.create(null),u=Object.create(null);for(let a=0;a<n.length;a++){const o=n[a].name;r[o]=n[a].value,i[o]=n[a].namespace,u[o]=n[a].prefix}const s=new Xd(e,r,[]);return s.namespace=t,s["x-attribsNamespace"]=i,s["x-attribsPrefix"]=u,s},createCommentNode(e){return new Jd(e)},createTextNode(e){return new fu(e)},appendChild(e,t){const n=e.children[e.children.length-1];n&&(n.next=t,t.prev=n),e.children.push(t),t.parent=e},insertBefore(e,t,n){const r=e.children.indexOf(n),{prev:i}=n;i&&(i.next=t,t.prev=i),n.prev=t,t.next=n,e.children.splice(r,0,t),t.parent=e},setTemplateContent(e,t){Ln.appendChild(e,t)},getTemplateContent(e){return e.children[0]},setDocumentType(e,t,n,r){const i=F_(t,n,r);let u=e.children.find(s=>jl(s)&&s.name==="!doctype");u?u.data=i??null:(u=new jd("!doctype",i),Ln.appendChild(e,u)),u["x-name"]=t,u["x-publicId"]=n,u["x-systemId"]=r},setDocumentMode(e,t){e["x-mode"]=t},getDocumentMode(e){return e["x-mode"]},detachNode(e){if(e.parent){const t=e.parent.children.indexOf(e),{prev:n,next:r}=e;e.prev=null,e.next=null,n&&(n.next=r),r&&(r.prev=n),e.parent.children.splice(t,1),e.parent=null}},insertText(e,t){const n=e.children[e.children.length-1];n&&jt(n)?n.data+=t:Ln.appendChild(e,Ln.createTextNode(t))},insertTextBefore(e,t,n){const r=e.children[e.children.indexOf(n)-1];r&&jt(r)?r.data+=t:Ln.insertBefore(e,Ln.createTextNode(t),n)},adoptAttributes(e,t){for(let n=0;n<t.length;n++){const r=t[n].name;e.attribs[r]===void 0&&(e.attribs[r]=t[n].value,e["x-attribsNamespace"][r]=t[n].namespace,e["x-attribsPrefix"][r]=t[n].prefix)}},getFirstChild(e){return e.children[0]},getChildNodes(e){return e.children},getParentNode(e){return e.parent},getAttrList(e){return e.attributes},getTagName(e){return e.name},getNamespaceURI(e){return e.namespace},getTextNodeContent(e){return e.data},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){var t;return(t=e["x-name"])!==null&&t!==void 0?t:""},getDocumentTypeNodePublicId(e){var t;return(t=e["x-publicId"])!==null&&t!==void 0?t:""},getDocumentTypeNodeSystemId(e){var t;return(t=e["x-systemId"])!==null&&t!==void 0?t:""},isDocumentTypeNode(e){return jl(e)&&e.name==="!doctype"},setNodeSourceCodeLocation(e,t){t&&(e.startIndex=t.startOffset,e.endIndex=t.endOffset),e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){t.endOffset!=null&&(e.endIndex=t.endOffset),e.sourceCodeLocation={...e.sourceCodeLocation,...t}}};function H_(e,t,n,r){var i;return(i=t.treeAdapter)!==null&&i!==void 0||(t.treeAdapter=Ln),t.scriptingEnabled!==!1&&(t.scriptingEnabled=!0),n?v_(e,t):P_(r,e,t)}const U_={treeAdapter:Ln};function W_(e){const t="length"in e?e:[e];for(let r=0;r<t.length;r+=1){const i=t[r];tr(i)&&Array.prototype.splice.call(t,r,1,...i.children)}let n="";for(let r=0;r<t.length;r+=1){const i=t[r];n+=D_(i,U_)}return n}const bb=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),Eb=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var Go;const K_=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]]),oc=(Go=String.fromCodePoint)!==null&&Go!==void 0?Go: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 Q_(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=K_.get(e))!==null&&t!==void 0?t:e}var Ke;(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"})(Ke||(Ke={}));const Y_=32;var Qn;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Qn||(Qn={}));function lc(e){return e>=Ke.ZERO&&e<=Ke.NINE}function z_(e){return e>=Ke.UPPER_A&&e<=Ke.UPPER_F||e>=Ke.LOWER_A&&e<=Ke.LOWER_F}function G_(e){return e>=Ke.UPPER_A&&e<=Ke.UPPER_Z||e>=Ke.LOWER_A&&e<=Ke.LOWER_Z||lc(e)}function V_(e){return e===Ke.EQUALS||G_(e)}var Ue;(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"})(Ue||(Ue={}));var Vt;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Vt||(Vt={}));class yb{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Ue.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Vt.Strict}startEntity(t){this.decodeMode=t,this.state=Ue.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Ue.EntityStart:return t.charCodeAt(n)===Ke.NUM?(this.state=Ue.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Ue.NamedEntity,this.stateNamedEntity(t,n));case Ue.NumericStart:return this.stateNumericStart(t,n);case Ue.NumericDecimal:return this.stateNumericDecimal(t,n);case Ue.NumericHex:return this.stateNumericHex(t,n);case Ue.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|Y_)===Ke.LOWER_X?(this.state=Ue.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Ue.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const u=r-n;this.result=this.result*Math.pow(i,u)+parseInt(t.substr(n,u),i),this.consumed+=u}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(lc(i)||z_(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(lc(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Ke.SEMI)this.consumed+=1;else if(this.decodeMode===Vt.Strict)return 0;return this.emitCodePoint(Q_(this.result),this.consumed),this.errors&&(t!==Ke.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],u=(i&Qn.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=q_(r,i,this.treeIndex+Math.max(1,u),s),this.treeIndex<0)return this.result===0||this.decodeMode===Vt.Attribute&&(u===0||V_(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],u=(i&Qn.VALUE_LENGTH)>>14,u!==0){if(s===Ke.SEMI)return this.emitNamedEntityData(this.treeIndex,u,this.consumed+this.excess);this.decodeMode!==Vt.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&Qn.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~Qn.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case Ue.NamedEntity:return this.result!==0&&(this.decodeMode!==Vt.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ue.NumericDecimal:return this.emitNumericEntity(0,2);case Ue.NumericHex:return this.emitNumericEntity(0,3);case Ue.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ue.EntityStart:return 0}}}function Tb(e){let t="";const n=new yb(e,r=>t+=oc(r));return function(i,u){let s=0,a=0;for(;(a=i.indexOf("&",a))>=0;){t+=i.slice(s,a),n.startEntity(u);const l=n.write(i,a+1);if(l<0){s=a+n.end();break}s=a+l,a=l===0?s+1:s}const o=t+i.slice(s);return t="",o}}function q_(e,t,n,r){const i=(t&Qn.BRANCH_LENGTH)>>7,u=t&Qn.JUMP_TABLE;if(i===0)return u!==0&&r===u?n:-1;if(u){const o=r-u;return o<0||o>=i?-1:e[n+o]-1}let s=n,a=s+i-1;for(;s<=a;){const o=s+a>>>1,l=e[o];if(l<r)s=o+1;else if(l>r)a=o-1;else return e[o+i]}return-1}Tb(bb);Tb(Eb);var $;(function(e){e[e.Tab=9]="Tab",e[e.NewLine=10]="NewLine",e[e.FormFeed=12]="FormFeed",e[e.CarriageReturn=13]="CarriageReturn",e[e.Space=32]="Space",e[e.ExclamationMark=33]="ExclamationMark",e[e.Number=35]="Number",e[e.Amp=38]="Amp",e[e.SingleQuote=39]="SingleQuote",e[e.DoubleQuote=34]="DoubleQuote",e[e.Dash=45]="Dash",e[e.Slash=47]="Slash",e[e.Zero=48]="Zero",e[e.Nine=57]="Nine",e[e.Semi=59]="Semi",e[e.Lt=60]="Lt",e[e.Eq=61]="Eq",e[e.Gt=62]="Gt",e[e.Questionmark=63]="Questionmark",e[e.UpperA=65]="UpperA",e[e.LowerA=97]="LowerA",e[e.UpperF=70]="UpperF",e[e.LowerF=102]="LowerF",e[e.UpperZ=90]="UpperZ",e[e.LowerZ=122]="LowerZ",e[e.LowerX=120]="LowerX",e[e.OpeningSquareBracket=91]="OpeningSquareBracket"})($||($={}));var U;(function(e){e[e.Text=1]="Text",e[e.BeforeTagName=2]="BeforeTagName",e[e.InTagName=3]="InTagName",e[e.InSelfClosingTag=4]="InSelfClosingTag",e[e.BeforeClosingTagName=5]="BeforeClosingTagName",e[e.InClosingTagName=6]="InClosingTagName",e[e.AfterClosingTagName=7]="AfterClosingTagName",e[e.BeforeAttributeName=8]="BeforeAttributeName",e[e.InAttributeName=9]="InAttributeName",e[e.AfterAttributeName=10]="AfterAttributeName",e[e.BeforeAttributeValue=11]="BeforeAttributeValue",e[e.InAttributeValueDq=12]="InAttributeValueDq",e[e.InAttributeValueSq=13]="InAttributeValueSq",e[e.InAttributeValueNq=14]="InAttributeValueNq",e[e.BeforeDeclaration=15]="BeforeDeclaration",e[e.InDeclaration=16]="InDeclaration",e[e.InProcessingInstruction=17]="InProcessingInstruction",e[e.BeforeComment=18]="BeforeComment",e[e.CDATASequence=19]="CDATASequence",e[e.InSpecialComment=20]="InSpecialComment",e[e.InCommentLike=21]="InCommentLike",e[e.BeforeSpecialS=22]="BeforeSpecialS",e[e.BeforeSpecialT=23]="BeforeSpecialT",e[e.SpecialStartSequence=24]="SpecialStartSequence",e[e.InSpecialTag=25]="InSpecialTag",e[e.InEntity=26]="InEntity"})(U||(U={}));function fn(e){return e===$.Space||e===$.NewLine||e===$.Tab||e===$.FormFeed||e===$.CarriageReturn}function ls(e){return e===$.Slash||e===$.Gt||fn(e)}function J_(e){return e>=$.LowerA&&e<=$.LowerZ||e>=$.UpperA&&e<=$.UpperZ}var qt;(function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"})(qt||(qt={}));const Qe={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};class j_{constructor({xmlMode:t=!1,decodeEntities:n=!0},r){this.cbs=r,this.state=U.Text,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=U.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.xmlMode=t,this.decodeEntities=n,this.entityDecoder=new yb(t?Eb:bb,(i,u)=>this.emitCodePoint(i,u))}reset(){this.state=U.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=U.Text,this.currentSequence=void 0,this.running=!0,this.offset=0}write(t){this.offset+=this.buffer.length,this.buffer=t,this.parse()}end(){this.running&&this.finish()}pause(){this.running=!1}resume(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()}stateText(t){t===$.Lt||!this.decodeEntities&&this.fastForwardTo($.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=U.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&t===$.Amp&&this.startEntity()}stateSpecialStartSequence(t){const n=this.sequenceIndex===this.currentSequence.length;if(!(n?ls(t):(t|32)===this.currentSequence[this.sequenceIndex]))this.isSpecial=!1;else if(!n){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=U.InTagName,this.stateInTagName(t)}stateInSpecialTag(t){if(this.sequenceIndex===this.currentSequence.length){if(t===$.Gt||fn(t)){const n=this.index-this.currentSequence.length;if(this.sectionStart<n){const r=this.index;this.index=n,this.cbs.ontext(this.sectionStart,n),this.index=r}this.isSpecial=!1,this.sectionStart=n+2,this.stateInClosingTagName(t);return}this.sequenceIndex=0}(t|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===Qe.TitleEnd?this.decodeEntities&&t===$.Amp&&this.startEntity():this.fastForwardTo($.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=+(t===$.Lt)}stateCDATASequence(t){t===Qe.Cdata[this.sequenceIndex]?++this.sequenceIndex===Qe.Cdata.length&&(this.state=U.InCommentLike,this.currentSequence=Qe.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=U.InDeclaration,this.stateInDeclaration(t))}fastForwardTo(t){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===t)return!0;return this.index=this.buffer.length+this.offset-1,!1}stateInCommentLike(t){t===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===Qe.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index,2):this.cbs.oncomment(this.sectionStart,this.index,2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=U.Text):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):t!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}isTagStartChar(t){return this.xmlMode?!ls(t):J_(t)}startSpecial(t,n){this.isSpecial=!0,this.currentSequence=t,this.sequenceIndex=n,this.state=U.SpecialStartSequence}stateBeforeTagName(t){if(t===$.ExclamationMark)this.state=U.BeforeDeclaration,this.sectionStart=this.index+1;else if(t===$.Questionmark)this.state=U.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(t)){const n=t|32;this.sectionStart=this.index,this.xmlMode?this.state=U.InTagName:n===Qe.ScriptEnd[2]?this.state=U.BeforeSpecialS:n===Qe.TitleEnd[2]?this.state=U.BeforeSpecialT:this.state=U.InTagName}else t===$.Slash?this.state=U.BeforeClosingTagName:(this.state=U.Text,this.stateText(t))}stateInTagName(t){ls(t)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=U.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateBeforeClosingTagName(t){fn(t)||(t===$.Gt?this.state=U.Text:(this.state=this.isTagStartChar(t)?U.InClosingTagName:U.InSpecialComment,this.sectionStart=this.index))}stateInClosingTagName(t){(t===$.Gt||fn(t))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=U.AfterClosingTagName,this.stateAfterClosingTagName(t))}stateAfterClosingTagName(t){(t===$.Gt||this.fastForwardTo($.Gt))&&(this.state=U.Text,this.sectionStart=this.index+1)}stateBeforeAttributeName(t){t===$.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=U.InSpecialTag,this.sequenceIndex=0):this.state=U.Text,this.sectionStart=this.index+1):t===$.Slash?this.state=U.InSelfClosingTag:fn(t)||(this.state=U.InAttributeName,this.sectionStart=this.index)}stateInSelfClosingTag(t){t===$.Gt?(this.cbs.onselfclosingtag(this.index),this.state=U.Text,this.sectionStart=this.index+1,this.isSpecial=!1):fn(t)||(this.state=U.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateInAttributeName(t){(t===$.Eq||ls(t))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=this.index,this.state=U.AfterAttributeName,this.stateAfterAttributeName(t))}stateAfterAttributeName(t){t===$.Eq?this.state=U.BeforeAttributeValue:t===$.Slash||t===$.Gt?(this.cbs.onattribend(qt.NoValue,this.sectionStart),this.sectionStart=-1,this.state=U.BeforeAttributeName,this.stateBeforeAttributeName(t)):fn(t)||(this.cbs.onattribend(qt.NoValue,this.sectionStart),this.state=U.InAttributeName,this.sectionStart=this.index)}stateBeforeAttributeValue(t){t===$.DoubleQuote?(this.state=U.InAttributeValueDq,this.sectionStart=this.index+1):t===$.SingleQuote?(this.state=U.InAttributeValueSq,this.sectionStart=this.index+1):fn(t)||(this.sectionStart=this.index,this.state=U.InAttributeValueNq,this.stateInAttributeValueNoQuotes(t))}handleInAttributeValue(t,n){t===n||!this.decodeEntities&&this.fastForwardTo(n)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(n===$.DoubleQuote?qt.Double:qt.Single,this.index+1),this.state=U.BeforeAttributeName):this.decodeEntities&&t===$.Amp&&this.startEntity()}stateInAttributeValueDoubleQuotes(t){this.handleInAttributeValue(t,$.DoubleQuote)}stateInAttributeValueSingleQuotes(t){this.handleInAttributeValue(t,$.SingleQuote)}stateInAttributeValueNoQuotes(t){fn(t)||t===$.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(qt.Unquoted,this.index),this.state=U.BeforeAttributeName,this.stateBeforeAttributeName(t)):this.decodeEntities&&t===$.Amp&&this.startEntity()}stateBeforeDeclaration(t){t===$.OpeningSquareBracket?(this.state=U.CDATASequence,this.sequenceIndex=0):this.state=t===$.Dash?U.BeforeComment:U.InDeclaration}stateInDeclaration(t){(t===$.Gt||this.fastForwardTo($.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=U.Text,this.sectionStart=this.index+1)}stateInProcessingInstruction(t){(t===$.Gt||this.fastForwardTo($.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=U.Text,this.sectionStart=this.index+1)}stateBeforeComment(t){t===$.Dash?(this.state=U.InCommentLike,this.currentSequence=Qe.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=U.InDeclaration}stateInSpecialComment(t){(t===$.Gt||this.fastForwardTo($.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=U.Text,this.sectionStart=this.index+1)}stateBeforeSpecialS(t){const n=t|32;n===Qe.ScriptEnd[3]?this.startSpecial(Qe.ScriptEnd,4):n===Qe.StyleEnd[3]?this.startSpecial(Qe.StyleEnd,4):(this.state=U.InTagName,this.stateInTagName(t))}stateBeforeSpecialT(t){const n=t|32;n===Qe.TitleEnd[3]?this.startSpecial(Qe.TitleEnd,4):n===Qe.TextareaEnd[3]?this.startSpecial(Qe.TextareaEnd,4):(this.state=U.InTagName,this.stateInTagName(t))}startEntity(){this.baseState=this.state,this.state=U.InEntity,this.entityStart=this.index,this.entityDecoder.startEntity(this.xmlMode?Vt.Strict:this.baseState===U.Text||this.baseState===U.InSpecialTag?Vt.Legacy:Vt.Attribute)}stateInEntity(){const t=this.entityDecoder.write(this.buffer,this.index-this.offset);t>=0?(this.state=this.baseState,t===0&&(this.index=this.entityStart)):this.index=this.offset+this.buffer.length-1}cleanup(){this.running&&this.sectionStart!==this.index&&(this.state===U.Text||this.state===U.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===U.InAttributeValueDq||this.state===U.InAttributeValueSq||this.state===U.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}shouldContinue(){return this.index<this.buffer.length+this.offset&&this.running}parse(){for(;this.shouldContinue();){const t=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case U.Text:{this.stateText(t);break}case U.SpecialStartSequence:{this.stateSpecialStartSequence(t);break}case U.InSpecialTag:{this.stateInSpecialTag(t);break}case U.CDATASequence:{this.stateCDATASequence(t);break}case U.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(t);break}case U.InAttributeName:{this.stateInAttributeName(t);break}case U.InCommentLike:{this.stateInCommentLike(t);break}case U.InSpecialComment:{this.stateInSpecialComment(t);break}case U.BeforeAttributeName:{this.stateBeforeAttributeName(t);break}case U.InTagName:{this.stateInTagName(t);break}case U.InClosingTagName:{this.stateInClosingTagName(t);break}case U.BeforeTagName:{this.stateBeforeTagName(t);break}case U.AfterAttributeName:{this.stateAfterAttributeName(t);break}case U.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(t);break}case U.BeforeAttributeValue:{this.stateBeforeAttributeValue(t);break}case U.BeforeClosingTagName:{this.stateBeforeClosingTagName(t);break}case U.AfterClosingTagName:{this.stateAfterClosingTagName(t);break}case U.BeforeSpecialS:{this.stateBeforeSpecialS(t);break}case U.BeforeSpecialT:{this.stateBeforeSpecialT(t);break}case U.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(t);break}case U.InSelfClosingTag:{this.stateInSelfClosingTag(t);break}case U.InDeclaration:{this.stateInDeclaration(t);break}case U.BeforeDeclaration:{this.stateBeforeDeclaration(t);break}case U.BeforeComment:{this.stateBeforeComment(t);break}case U.InProcessingInstruction:{this.stateInProcessingInstruction(t);break}case U.InEntity:{this.stateInEntity();break}}this.index++}this.cleanup()}finish(){this.state===U.InEntity&&(this.entityDecoder.end(),this.state=this.baseState),this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const t=this.buffer.length+this.offset;this.sectionStart>=t||(this.state===U.InCommentLike?this.currentSequence===Qe.CdataEnd?this.cbs.oncdata(this.sectionStart,t,0):this.cbs.oncomment(this.sectionStart,t,0):this.state===U.InTagName||this.state===U.BeforeAttributeName||this.state===U.BeforeAttributeValue||this.state===U.AfterAttributeName||this.state===U.InAttributeName||this.state===U.InAttributeValueSq||this.state===U.InAttributeValueDq||this.state===U.InAttributeValueNq||this.state===U.InClosingTagName||this.cbs.ontext(this.sectionStart,t))}emitCodePoint(t,n){this.baseState!==U.Text&&this.baseState!==U.InSpecialTag?(this.sectionStart<this.entityStart&&this.cbs.onattribdata(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+n,this.index=this.sectionStart-1,this.cbs.onattribentity(t)):(this.sectionStart<this.entityStart&&this.cbs.ontext(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+n,this.index=this.sectionStart-1,this.cbs.ontextentity(t,this.sectionStart))}}const Ur=new Set(["input","option","optgroup","select","button","datalist","textarea"]),Ce=new Set(["p"]),W0=new Set(["thead","tbody"]),K0=new Set(["dd","dt"]),Q0=new Set(["rt","rp"]),Z_=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",Ce],["h1",Ce],["h2",Ce],["h3",Ce],["h4",Ce],["h5",Ce],["h6",Ce],["select",Ur],["input",Ur],["output",Ur],["button",Ur],["datalist",Ur],["textarea",Ur],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",K0],["dt",K0],["address",Ce],["article",Ce],["aside",Ce],["blockquote",Ce],["details",Ce],["div",Ce],["dl",Ce],["fieldset",Ce],["figcaption",Ce],["figure",Ce],["footer",Ce],["form",Ce],["header",Ce],["hr",Ce],["main",Ce],["nav",Ce],["ol",Ce],["pre",Ce],["section",Ce],["table",Ce],["ul",Ce],["rt",Q0],["rp",Q0],["tbody",W0],["tfoot",W0]]),X_=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),Y0=new Set(["math","svg"]),z0=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),$_=/\s|\//;class e5{constructor(t,n={}){var r,i,u,s,a,o;this.options=n,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=t??{},this.htmlMode=!this.options.xmlMode,this.lowerCaseTagNames=(r=n.lowerCaseTags)!==null&&r!==void 0?r:this.htmlMode,this.lowerCaseAttributeNames=(i=n.lowerCaseAttributeNames)!==null&&i!==void 0?i:this.htmlMode,this.recognizeSelfClosing=(u=n.recognizeSelfClosing)!==null&&u!==void 0?u:!this.htmlMode,this.tokenizer=new((s=n.Tokenizer)!==null&&s!==void 0?s:j_)(this.options,this),this.foreignContext=[!this.htmlMode],(o=(a=this.cbs).onparserinit)===null||o===void 0||o.call(a,this)}ontext(t,n){var r,i;const u=this.getSlice(t,n);this.endIndex=n-1,(i=(r=this.cbs).ontext)===null||i===void 0||i.call(r,u),this.startIndex=n}ontextentity(t,n){var r,i;this.endIndex=n-1,(i=(r=this.cbs).ontext)===null||i===void 0||i.call(r,oc(t)),this.startIndex=n}isVoidElement(t){return this.htmlMode&&X_.has(t)}onopentagname(t,n){this.endIndex=n;let r=this.getSlice(t,n);this.lowerCaseTagNames&&(r=r.toLowerCase()),this.emitOpenTag(r)}emitOpenTag(t){var n,r,i,u;this.openTagStart=this.startIndex,this.tagname=t;const s=this.htmlMode&&Z_.get(t);if(s)for(;this.stack.length>0&&s.has(this.stack[0]);){const a=this.stack.shift();(r=(n=this.cbs).onclosetag)===null||r===void 0||r.call(n,a,!0)}this.isVoidElement(t)||(this.stack.unshift(t),this.htmlMode&&(Y0.has(t)?this.foreignContext.unshift(!0):z0.has(t)&&this.foreignContext.unshift(!1))),(u=(i=this.cbs).onopentagname)===null||u===void 0||u.call(i,t),this.cbs.onopentag&&(this.attribs={})}endOpenTag(t){var n,r;this.startIndex=this.openTagStart,this.attribs&&((r=(n=this.cbs).onopentag)===null||r===void 0||r.call(n,this.tagname,this.attribs,t),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""}onopentagend(t){this.endIndex=t,this.endOpenTag(!1),this.startIndex=t+1}onclosetag(t,n){var r,i,u,s,a,o,l,c;this.endIndex=n;let d=this.getSlice(t,n);if(this.lowerCaseTagNames&&(d=d.toLowerCase()),this.htmlMode&&(Y0.has(d)||z0.has(d))&&this.foreignContext.shift(),this.isVoidElement(d))this.htmlMode&&d==="br"&&((s=(u=this.cbs).onopentagname)===null||s===void 0||s.call(u,"br"),(o=(a=this.cbs).onopentag)===null||o===void 0||o.call(a,"br",{},!0),(c=(l=this.cbs).onclosetag)===null||c===void 0||c.call(l,"br",!1));else{const f=this.stack.indexOf(d);if(f!==-1)for(let p=0;p<=f;p++){const m=this.stack.shift();(i=(r=this.cbs).onclosetag)===null||i===void 0||i.call(r,m,p!==f)}else this.htmlMode&&d==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=n+1}onselfclosingtag(t){this.endIndex=t,this.recognizeSelfClosing||this.foreignContext[0]?(this.closeCurrentTag(!1),this.startIndex=t+1):this.onopentagend(t)}closeCurrentTag(t){var n,r;const i=this.tagname;this.endOpenTag(t),this.stack[0]===i&&((r=(n=this.cbs).onclosetag)===null||r===void 0||r.call(n,i,!t),this.stack.shift())}onattribname(t,n){this.startIndex=t;const r=this.getSlice(t,n);this.attribname=this.lowerCaseAttributeNames?r.toLowerCase():r}onattribdata(t,n){this.attribvalue+=this.getSlice(t,n)}onattribentity(t){this.attribvalue+=oc(t)}onattribend(t,n){var r,i;this.endIndex=n,(i=(r=this.cbs).onattribute)===null||i===void 0||i.call(r,this.attribname,this.attribvalue,t===qt.Double?'"':t===qt.Single?"'":t===qt.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""}getInstructionName(t){const n=t.search($_);let r=n<0?t:t.substr(0,n);return this.lowerCaseTagNames&&(r=r.toLowerCase()),r}ondeclaration(t,n){this.endIndex=n;const r=this.getSlice(t,n);if(this.cbs.onprocessinginstruction){const i=this.getInstructionName(r);this.cbs.onprocessinginstruction(`!${i}`,`!${r}`)}this.startIndex=n+1}onprocessinginstruction(t,n){this.endIndex=n;const r=this.getSlice(t,n);if(this.cbs.onprocessinginstruction){const i=this.getInstructionName(r);this.cbs.onprocessinginstruction(`?${i}`,`?${r}`)}this.startIndex=n+1}oncomment(t,n,r){var i,u,s,a;this.endIndex=n,(u=(i=this.cbs).oncomment)===null||u===void 0||u.call(i,this.getSlice(t,n-r)),(a=(s=this.cbs).oncommentend)===null||a===void 0||a.call(s),this.startIndex=n+1}oncdata(t,n,r){var i,u,s,a,o,l,c,d,f,p;this.endIndex=n;const m=this.getSlice(t,n-r);!this.htmlMode||this.options.recognizeCDATA?((u=(i=this.cbs).oncdatastart)===null||u===void 0||u.call(i),(a=(s=this.cbs).ontext)===null||a===void 0||a.call(s,m),(l=(o=this.cbs).oncdataend)===null||l===void 0||l.call(o)):((d=(c=this.cbs).oncomment)===null||d===void 0||d.call(c,`[CDATA[${m}]]`),(p=(f=this.cbs).oncommentend)===null||p===void 0||p.call(f)),this.startIndex=n+1}onend(){var t,n;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let r=0;r<this.stack.length;r++)this.cbs.onclosetag(this.stack[r],!0)}(n=(t=this.cbs).onend)===null||n===void 0||n.call(t)}reset(){var t,n,r,i;(n=(t=this.cbs).onreset)===null||n===void 0||n.call(t),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(i=(r=this.cbs).onparserinit)===null||i===void 0||i.call(r,this),this.buffers.length=0,this.foreignContext.length=0,this.foreignContext.unshift(!this.htmlMode),this.bufferOffset=0,this.writeIndex=0,this.ended=!1}parseComplete(t){this.reset(),this.end(t)}getSlice(t,n){for(;t-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();let r=this.buffers[0].slice(t-this.bufferOffset,n-this.bufferOffset);for(;n-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),r+=this.buffers[0].slice(0,n-this.bufferOffset);return r}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(t){var n,r;if(this.ended){(r=(n=this.cbs).onerror)===null||r===void 0||r.call(n,new Error(".write() after done!"));return}this.buffers.push(t),this.tokenizer.running&&(this.tokenizer.write(t),this.writeIndex++)}end(t){var n,r;if(this.ended){(r=(n=this.cbs).onerror)===null||r===void 0||r.call(n,new Error(".end() after done!"));return}t&&this.write(t),this.ended=!0,this.tokenizer.end()}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex<this.buffers.length;)this.tokenizer.write(this.buffers[this.writeIndex++]);this.ended&&this.tokenizer.end()}parseChunk(t){this.write(t)}done(t){this.end(t)}}function t5(e,t){const n=new YS(void 0,t);return new e5(n,t).end(e),n.root}const n5=h4((e,t,n,r)=>t._useHtmlParser2?t5(e,t):H_(e,t,n,r)),r5=G4(n5,(e,t)=>t._useHtmlParser2?_a(e,t):W_(e)),i5=Object.freeze(Object.defineProperty({__proto__:null,contains:uf,load:r5,merge:gg},Symbol.toStringTag,{value:"Module"})),u5=zy(i5);var Vo={},qo={exports:{}},Jo={exports:{}},G0;function bf(){return G0||(G0=1,(function(e,t){e.exports=n;function n(i){return r.bind(null,i)}function r(i){var u=[].slice.call(arguments,1);u.unshift("["+i+"]"),process.stderr.write(u.join(" ")+`
|
|
485
|
+
`)}})(Jo)),Jo.exports}var V0;function Cb(){return V0||(V0=1,(function(e,t){bf()("lex"),e.exports=n;function n(r){var i="",u,s=0,a=-1,o=0,l=1,c="before-selector",d=[c],f={},p=[],m=["media","keyframes",{name:"-webkit-keyframes",type:"keyframes",prefix:"-webkit-"},{name:"-moz-keyframes",type:"keyframes",prefix:"-moz-"},{name:"-ms-keyframes",type:"keyframes",prefix:"-ms-"},{name:"-o-keyframes",type:"keyframes",prefix:"-o-"},"font-face",{name:"import",state:"before-at-value"},{name:"charset",state:"before-at-value"},"supports","viewport",{name:"namespace",state:"before-at-value"},"document",{name:"-moz-document",type:"document",prefix:"-moz-"},"page"];function A(){return Q(),r[a]}function E(W){return W?d[d.length-1-W]:c}function g(W){var V=a+1;return W===r.slice(V,V+W.length)}function N(W){var V=r.slice(a).indexOf(W);return V>0?V:!1}function I(W){return W===R(1)}function R(W){return r[a+(W||1)]}function w(){var W=d.pop();return c=d[d.length-1],W}function k(W){return c=W,d.push(c),d.length}function O(W){var V=c;return d[d.length-1]=c=W,V}function Q(W){if((W||1)==1)r[a]==`
|
|
486
|
+
`?(l++,s=1):s++,a++;else{var V=r.slice(a,a+W).split(`
|
|
487
|
+
`);V.length>1&&(l+=V.length-1,s=1),s+=V[V.length-1].length,a=a+W}}function _(){f.end={line:l,col:s},p.push(f),i="",f={}}function x(W){f={type:W,start:{line:l,col:s}}}for(;u=A();)switch(u){case" ":switch(E()){case"selector":case"value":case"value-paren":case"at-group":case"at-value":case"comment":case"double-string":case"single-string":i+=u;break}break;case`
|
|
488
|
+
`:case" ":case"\r":case"\f":switch(E()){case"value":case"value-paren":case"at-group":case"comment":case"single-string":case"double-string":case"selector":i+=u;break;case"at-value":u===`
|
|
489
|
+
`&&(f.value=i.trim(),_(),w());break}break;case":":switch(E()){case"name":f.name=i.trim(),i="",O("before-value");break;case"before-selector":i+=u,x("selector"),k("selector");break;case"before-value":O("value"),i+=u;break;default:i+=u;break}break;case";":switch(E()){case"name":case"before-value":case"value":i.trim().length>0&&(f.value=i.trim(),_()),O("before-name");break;case"value-paren":i+=u;break;case"at-value":f.value=i.trim(),_(),w();break;case"before-name":break;default:i+=u;break}break;case"{":switch(E()){case"selector":if(R(-1)==="\\"){i+=u;break}f.text=i.trim(),_(),O("before-name"),o=o+1;break;case"at-group":switch(f.name=i.trim(),f.type){case"font-face":case"viewport":case"page":k("before-name");break;default:k("before-selector")}_(),o=o+1;break;case"name":case"at-rule":f.name=i.trim(),_(),k("before-name"),o=o+1;break;case"comment":case"double-string":case"single-string":i+=u;break;case"before-value":O("value"),i+=u;break}break;case"}":switch(E()){case"before-name":case"name":case"before-value":case"value":i&&(f.value=i.trim()),f.name&&f.value&&_(),x("end"),_(),w(),E()==="at-group"&&(x("at-group-end"),_(),w()),o>0&&(o=o-1);break;case"at-group":case"before-selector":case"selector":if(R(-1)==="\\"){i+=u;break}o>0&&E(1)==="at-group"&&(x("at-group-end"),_()),o>1&&w(),o>0&&(o=o-1);break;case"double-string":case"single-string":case"comment":i+=u;break}break;case'"':case"'":switch(E()){case"double-string":u==='"'&&R(-1)!=="\\"&&w();break;case"single-string":u==="'"&&R(-1)!=="\\"&&w();break;case"before-at-value":O("at-value"),k(u==='"'?"double-string":"single-string");break;case"before-value":O("value"),k(u==='"'?"double-string":"single-string");break;case"comment":break;default:R(-1)!=="\\"&&k(u==='"'?"double-string":"single-string")}i+=u;break;case"/":switch(E()){case"comment":case"double-string":case"single-string":i+=u;break;case"before-value":case"selector":case"name":case"value":if(I("*")){var B=N("*/");B&&Q(B+1)}else E()=="before-value"&&O("value"),i+=u;break;default:I("*")?(x("comment"),k("comment"),Q()):i+=u;break}break;case"*":switch(E()){case"comment":I("/")?(f.text=i,Q(),_(),w()):i+=u;break;case"before-selector":i+=u,x("selector"),k("selector");break;case"before-value":O("value"),i+=u;break;default:i+=u}break;case"@":switch(E()){case"comment":case"double-string":case"single-string":i+=u;break;case"before-value":O("value"),i+=u;break;default:for(var P=!1,G,J,q=0,se=m.length;!P&&q<se;++q)J=m[q],G=J.name||J,g(G)&&(P=!0,x(G),k(J.state||"at-group"),Q(G.length),J.prefix&&(f.prefix=J.prefix),J.type&&(f.type=J.type));P||(i+=u);break}break;case"(":switch(E()){case"value":k("value-paren");break;case"before-value":O("value");break}i+=u;break;case")":switch(E()){case"value-paren":w();break;case"before-value":O("value");break}i+=u;break;default:switch(E()){case"before-selector":x("selector"),k("selector");break;case"before-name":x("property"),O("name");break;case"before-value":O("value");break;case"before-at-value":O("at-value");break}i+=u;break}return p}})(qo)),qo.exports}var jo={exports:{}},q0;function s5(){return q0||(q0=1,(function(e,t){bf()("parse");var n=Cb();e.exports=a;var r,i,u,s;function a(w,k){k||(k={}),r=!!k.comments,u=!!k.position,i=0,s=Array.isArray(w)?w.slice():n(w);for(var O,Q=[],_;_=l();)O=g(_),O&&Q.push(O);return{type:"stylesheet",stylesheet:{rules:Q}}}function o(w,k){k||(k={});for(var O,Q=["type","name","value"],_={},x=0;x<Q.length;++x)O=Q[x],w[O]&&(_[O]=k[O]||w[O]);for(Q=Object.keys(k),x=0;x<Q.length;++x)O=Q[x],_[O]||(_[O]=k[O]);return u&&(_.position={start:w.start,end:w.end}),_}function l(){var w=s.shift();return w}function c(w){i=i+1;var k={};switch(w.type){case"font-face":case"viewport":k.declarations=I();break;case"page":k.prefix=w.prefix,k.declarations=I();break;default:k.prefix=w.prefix,k.rules=R()}return o(w,k)}function d(w){return o(w)}function f(w){return o(w)}function p(w){return o(w,{text:w.text})}function m(w){return o(w)}function A(w){return o(w)}function E(w){function k(O){return O.trim()}return o(w,{type:"rule",selectors:w.text.split(",").map(k),declarations:I()})}function g(w){switch(w.type){case"property":return A(w);case"selector":return E(w);case"at-group-end":i=i-1;return;case"media":case"keyframes":return c(w);case"comment":if(r)return p(w);break;case"charset":return f(w);case"import":return d(w);case"namespace":return m(w);case"font-face":case"supports":case"viewport":case"document":case"page":return c(w)}}function N(w){for(var k,O=[],Q;(Q=l())&&w&&w(Q);)k=g(Q),k&&O.push(k);return Q&&Q.type!=="end"&&s.unshift(Q),O}function I(){return N(function(w){return w.type==="property"||w.type==="comment"})}function R(){return N(function(){return i})}})(jo)),jo.exports}var Zo={exports:{}},J0;function a5(){return J0||(J0=1,(function(e,t){bf()("stringify");var n,r,i,u,s,a;e.exports=o;function o(R,w){w||(w={}),i=w.indentation||"",r=!!w.compress,n=!!w.comments,u=1,r?s=a="":(s=`
|
|
490
|
+
`,a=" ");var k=m(R.stylesheet.rules,N).join(`
|
|
491
|
+
`).trim();return k}function l(R){if(R){u+=R;return}return r?"":Array(u).join(i||"")}function c(R){return"@"+R.type+" "+R.value+";"+s}function d(R){var w="",k=R.prefix||"";R.name&&(w=" "+R.name);var O=R.type!=="page";return"@"+k+R.type+w+a+A(R,O)+s}function f(R){return n?"/*"+(R.text||"")+"*/"+s:""}function p(R){var w;return R.selectors?w=R.selectors.join(","+s):(w="@"+R.type,w+=R.name?" "+R.name:""),l()+w+a+A(R)+s}function m(R,w){return R.reduce(function(k,O){var Q=O.type==="comment"?f(O):w(O);return Q&&k.push(Q),k},[])}function A(R,w){var k=R.declarations,O=g;return R.rules&&(k=R.rules,O=p),k=E(k,O),k&&(k=s+k+(w?"":s)),"{"+k+l()+"}"}function E(R,w){if(!R)return"";l(1);var k=m(R,w);return l(-1),k.length?k.join(s):""}function g(R){if(R.type==="property")return I(R)}function N(R){switch(R.type){case"rule":return p(R);case"media":case"keyframes":return d(R);case"comment":return f(R);case"import":case"charset":case"namespace":return c(R);case"font-face":case"supports":case"viewport":case"document":case"page":return d(R)}}function I(R){var w=R.name?R.name+":"+a:"";return l()+w+R.value+";"}})(Zo)),Zo.exports}var Xo,j0;function o5(){return j0||(j0=1,Xo={lex:Cb(),parse:s5(),stringify:a5()}),Xo}var $o={exports:{}},el,Z0;function l5(){if(Z0)return el;Z0=1;var e=/([-.*+?^${}()|[\]\/\\])/g,t=/\\/g,n=function(d){return(d+"").replace(e,"\\$1")},r=function(d){return(d+"").replace(t,"")},i=RegExp(`^(?:\\s*(,)\\s*|\\s*(<combinator>+)\\s*|(\\s+)|(<unicode>+|\\*)|\\#(<unicode>+)|\\.(<unicode>+)|\\[\\s*(<unicode1>+)(?:\\s*([*^$!~|]?=)(?:\\s*(?:(["']?)(.*?)\\9)))?\\s*\\](?!\\])|(:+)(<unicode>+)(?:\\((?:(?:(["'])([^\\13]*)\\13)|((?:\\([^)]+\\)|[^()]*)+))\\))?)`.replace(/<combinator>/,"["+n(">+~`!@$%^&={}\\;</")+"]").replace(/<unicode>/g,"(?:[\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])").replace(/<unicode1>/g,"(?:[:\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])")),u=function(f){this.combinator=f||" ",this.tag="*"};u.prototype.toString=function(){if(!this.raw){var d="",f,p;if(d+=this.tag||"*",this.id&&(d+="#"+this.id),this.classes&&(d+="."+this.classList.join(".")),this.attributes)for(f=0;p=this.attributes[f++];)d+="["+p.name+(p.operator?p.operator+'"'+p.value+'"':"")+"]";if(this.pseudos)for(f=0;p=this.pseudos[f++];)d+=":"+p.name,p.value&&(d+="("+p.value+")");this.raw=d}return this.raw};var s=function(){this.length=0};s.prototype.toString=function(){if(!this.raw){for(var d="",f=0,p;p=this[f++];)f!==1&&(d+=" "),p.combinator!==" "&&(d+=p.combinator+" "),d+=p;this.raw=d}return this.raw};var a=function(d,f,p,m,A,E,g,N,I,R,w,k,O,Q,_,x){var B,P;if((f||!this.length)&&(B=this[this.length++]=new s,f))return"";if(B||(B=this[this.length-1]),(p||m||!B.length)&&(P=B[B.length++]=new u(p)),P||(P=B[B.length-1]),A)P.tag=r(A);else if(E)P.id=r(E);else if(g){var G=r(g),J=P.classes||(P.classes={});if(!J[G]){J[G]=n(g);var q=P.classList||(P.classList=[]);q.push(G),q.sort()}}else O?(x=x||_,(P.pseudos||(P.pseudos=[])).push({type:k.length==1?"class":"element",name:r(O),escapedName:n(O),value:x?r(x):null,escapedValue:x?n(x):null})):N&&(w=w?n(w):null,(P.attributes||(P.attributes=[])).push({operator:I,name:r(N),escapedName:n(N),value:w?r(w):null,escapedValue:w?n(w):null}));return""},o=function(f){this.length=0;for(var p=this,m=f,A;f;){if(A=f.replace(i,function(){return a.apply(p,arguments)}),A===f)throw new Error(m+" is an invalid expression");f=A}};o.prototype.toString=function(){if(!this.raw){for(var d=[],f=0,p;p=this[f++];)d.push(p);this.raw=d.join(", ")}return this.raw};var l={},c=function(d){return d==null?null:(d=(""+d).replace(/^\s+|\s+$/g,""),l[d]||(l[d]=new o(d)))};return el=c,el}var X0;function c5(){return X0||(X0=1,(function(e,t){var n=l5();e.exports=r;function r(u,s){this.text=u,this.spec=void 0,this.styleAttribute=s||!1}r.prototype.parsed=function(){return this.tokens||(this.tokens=i(this.text)),this.tokens},r.prototype.specificity=function(){var u=this.styleAttribute;return this.spec||(this.spec=s(this.text,this.parsed())),this.spec;function s(a,o){for(var l=o||i(a),c=[u?1:0,0,0,0],d=[],f=0;f<l.length;f++){var p=l[f],m=p.pseudos;if(p.id&&c[1]++,p.attributes&&(c[2]+=p.attributes.length),p.classList&&(c[2]+=p.classList.length),p.tag&&p.tag!=="*"&&c[3]++,m){c[3]+=m.length;for(var A=0;A<m.length;A++)m[A].name==="not"&&(d.push(m[A].value),c[3]--)}}for(var E=d.length;E--;)for(var g=s(d[E]),N=4;N--;)c[N]+=g[N];return c}};function i(u){try{return n(u)[0]}catch{return[]}}})($o)),$o.exports}var tl={exports:{}},$0;function d5(){return $0||($0=1,(function(e,t){e.exports=r;var n=Ef();function r(i,u,s,a,o){this.prop=i,this.value=u,this.selector=s,this.priority=a||0,this.additionalPriority=o||[]}r.prototype.compareFunc=function(i){var u=[];u.push.apply(u,this.selector.specificity()),u.push.apply(u,this.additionalPriority),u[0]+=this.priority;var s=[];return s.push.apply(s,i.selector.specificity()),s.push.apply(s,i.additionalPriority),s[0]+=i.priority,n.compareFunc(u,s)},r.prototype.compare=function(i){var u=this.compareFunc(i);return u===1?this:i},r.prototype.toString=function(){return this.prop+": "+this.value.replace(/['"]+/g,"")+";"}})(tl)),tl.exports}var ep;function Ef(){return ep||(ep=1,(function(e){var t=o5(),n=c5(),r=d5();e.Selector=n,e.Property=r;e.extract=function(u){for(var s=0,a=[],o="",l=0,c=u.length;l<c;l++){var d=u.charAt(l);s?((d==="]"||d===")")&&s--,o+=d):d===","?(a.push(o),o=""):((d==="["||d==="(")&&s++,(o.length||d!==","&&d!==`
|
|
492
|
+
`&&d!==" ")&&(o+=d))}return o.length&&a.push(o),a},e.parseCSS=function(i){var u=t.parse(i,{position:!0,comments:!0}),s=typeof u.stylesheet<"u"&&u.stylesheet.rules?u.stylesheet.rules:[],a=[],o=!1,l=!1;if(s.length>0&&s[0].type==="comment"&&s[0].text){var c=s[0].text.trim();c==="juice ignore"&&(l=!0)}if(l)return a;for(var d=0,f=s.length;d<f;d++){if(s[d].type==="comment"){if(!s[d].text)continue;var p=s[d].text.trim();p==="juice start ignore"?o=!0:p==="juice end ignore"?o=!1:p==="juice ignore next"&&d++;continue}if(!o&&s[d].type=="rule"){var m=s[d],A=m.selectors,E=[];if(m.declarations)for(var g=!1,N=0;N<m.declarations.length;N++){var I=m.declarations[N];if(I.type==="comment"&&I.text){var R=I.text.trim();if(R==="juice ignore next"){g=!0;continue}}if(g&&I.type==="property"){g=!1;continue}I.type==="property"&&E.push(I)}if(E.length>0)for(var w=0,k=A.length;w<k;w++)a.push([A[w],E])}}return a},e.getPreservedText=function(i,u,s){var a=t.parse(i,{position:!0,comments:!0}),o=typeof a.stylesheet<"u"&&a.stylesheet.rules?a.stylesheet.rules:[],l=[],c=!1,d=[],f=!1,p=new Set;if(o.length>0&&o[0].type==="comment"&&o[0].text){var m=o[0].text.trim();m==="juice ignore"&&(f=!0)}if(f)return`
|
|
492
493
|
`+i+`
|
|
493
|
-
`;for(var
|
|
494
|
+
`;for(var A=0;A<o.length;A++){if(o[A].type==="comment"&&o[A].text){var E=o[A].text.trim();E==="juice ignore next"&&A+1<o.length&&p.add(A+1)}if(o[A].type==="rule"&&o[A].declarations){for(var g=0;g<o[A].declarations.length;g++)if(o[A].declarations[g].type==="comment"&&o[A].declarations[g].text){var N=o[A].declarations[g].text.trim();if(N==="juice ignore next"){p.add(A);break}}}}for(var A=o.length-1;A>=0;A--){var I=o[A];if(I.type==="comment"){if(!I.text)continue;var E=I.text.trim();E==="juice end ignore"?(c=!0,d.push(I)):E==="juice start ignore"&&(c=!1,d.push(I),d.length>0&&(l.unshift(t.stringify({stylesheet:{rules:d.reverse()}},{comments:!0,indentation:" "})),d=[]));continue}if(c){d.push(I);continue}if(p.has(A)){l.unshift(t.stringify({stylesheet:{rules:[I]}},{comments:!0,indentation:" "}));continue}(u.fontFaces&&I.type==="font-face"||u.mediaQueries&&I.type==="media"||u.keyFrames&&I.type==="keyframes"||u.pseudos&&I.selectors&&this.matchesPseudo(I.selectors[0],s)||u.preservedSelectors&&I.selectors&&I.selectors.some(function(w){return e.matchesPreservedSelector(w,u.preservedSelectors)}))&&l.unshift(t.stringify({stylesheet:{rules:[I]}},{comments:!1,indentation:" "})),I.position.start}return l.length===0?!1:`
|
|
494
495
|
`+l.join(`
|
|
495
496
|
`)+`
|
|
496
497
|
`},e.normalizeLineEndings=function(i){return i.replace(/\r\n/g,`
|
|
497
498
|
`).replace(/\n/g,`\r
|
|
498
|
-
`)},e.matchesPseudo=function(i,u){return u.find(function(s){return i.indexOf(":"+s)>-1})},e.matchesPreservedSelector=function(i,u){if(!u||u.length===0)return!1;for(var s=0;s<u.length;s++){var a=u[s];if(i===a||i.indexOf(a)!==-1)return!0}return!1},e.removeInlinedSelectorsFromCSS=function(i,u,s,a){for(var o=t.parse(i,{position:!0,comments:!0}),l=typeof o.stylesheet<"u"&&o.stylesheet.rules?o.stylesheet.rules:[],c=[],d=0;d<l.length;d++){var f=l[d];if(f.type!=="rule"){c.push(f);continue}if(f.selectors&&s.preservePseudos&&this.matchesPseudo(f.selectors[0],a)){c.push(f);continue}if(f.selectors&&s.preservedSelectors&&f.selectors.some(function(b){return e.matchesPreservedSelector(b,s.preservedSelectors)})){c.push(f);continue}var h=f.selectors.filter(function(b){return!u.has(b)});if(h.length>0){var m=Object.assign({},f,{selectors:h});c.push(m)}}return c.length===0?"":t.stringify({stylesheet:{rules:c}},{comments:!1,indentation:" "})},e.compareFunc=function(i,u){for(var s=Math.min(i.length,u.length),a=0;a<s;a++)if(i[a]!==u[a])return i[a]>u[a]?1:-1;return i.length-u.length},e.compare=function(i,u){return e.compareFunc(i,u)==1?i:u},e.getDefaultOptions=function(i){var u=Object.assign({extraCss:"",insertPreservedExtraCss:!0,applyStyleTags:!0,removeStyleTags:!0,removeInlinedSelectors:!1,preserveMediaQueries:!0,preserveFontFaces:!0,preserveKeyFrames:!0,preservePseudos:!0,preservedSelectors:[],applyWidthAttributes:!0,applyHeightAttributes:!0,applyAttributesTableElements:!0,resolveCSSVariables:!0,inlineDuplicateProperties:!1,url:""},i);return u.webResources=u.webResources||{},u}})(rl)),rl}var hp;function RO(){return hp||(hp=1,(function(e){var t=SO;Nf();var n=function(i,u,s){const{xmlMode:a,...o}=u;return u=Object.assign({xml:{decodeEntities:!1,xmlMode:a}},o),i=s(i),t.load(i,u)},r=function(){var i=[],u=function(a){var o=e.exports.codeBlocks;return Object.keys(o).forEach(function(l){var c=new RegExp(o[l].start+"([\\S\\s]*?)"+o[l].end,"g");a=a.replace(c,function(d,f){return i.push(d),"JUICE_CODE_BLOCK_"+(i.length-1)+"_"})}),a},s=function(a){for(var o=0;o<i.length;o++){var l=new RegExp("JUICE_CODE_BLOCK_"+o+'_(="")?',"gi");a=a.replace(l,function(){return i[o]})}return a};return{encodeEntities:u,decodeEntities:s}};e.exports=function(i,u,s,a){var o=r(),l=n(i,u,o.encodeEntities),c=[l];c.push.apply(c,a);var d=s.apply(void 0,c)||l;return u&&u.xmlMode?o.decodeEntities(d.xml()):o.decodeEntities(d.html())},e.exports.codeBlocks={EJS:{start:"<%",end:"%>"},HBS:{start:"{{",end:"}}"}}})(qo)),qo.exports}var fl={},hl={},pl={},pp;function mp(){return pp||(pp=1,(function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.fromCodePoint=void 0,e.replaceCodePoint=r,e.decodeCodePoint=i;const n=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]]);e.fromCodePoint=(t=String.fromCodePoint)!==null&&t!==void 0?t:(u=>{let s="";return u>65535&&(u-=65536,s+=String.fromCharCode(u>>>10&1023|55296),u=56320|u&1023),s+=String.fromCharCode(u),s});function r(u){var s;return u>=55296&&u<=57343||u>1114111?65533:(s=n.get(u))!==null&&s!==void 0?s:u}function i(u){return(0,e.fromCodePoint)(r(u))}})(pl)),pl}var Bi={},gs={},Ap;function vb(){if(Ap)return gs;Ap=1,Object.defineProperty(gs,"__esModule",{value:!0}),gs.decodeBase64=e;function e(t){const n=typeof atob=="function"?atob(t):typeof Buffer.from=="function"?Buffer.from(t,"base64").toString("binary"):new Buffer(t,"base64").toString("binary"),r=n.length&-2,i=new Uint16Array(r/2);for(let u=0,s=0;u<r;u+=2){const a=n.charCodeAt(u),o=n.charCodeAt(u+1);i[s++]=a|o<<8}return i}return gs}var gp;function bp(){if(gp)return Bi;gp=1,Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.htmlDecodeTree=void 0;const e=vb();return Bi.htmlDecodeTree=(0,e.decodeBase64)("QR08ALkAAgH6AYsDNQR2BO0EPgXZBQEGLAbdBxMISQrvCmQLfQurDKQNLw4fD4YPpA+6D/IPAAAAAAAAAAAAAAAAKhBMEY8TmxUWF2EYLBkxGuAa3RsJHDscWR8YIC8jSCSIJcMl6ie3Ku8rEC0CLjoupS7kLgAIRU1hYmNmZ2xtbm9wcnN0dVQAWgBeAGUAaQBzAHcAfgCBAIQAhwCSAJoAoACsALMAbABpAGcAO4DGAMZAUAA7gCYAJkBjAHUAdABlADuAwQDBQHIiZXZlAAJhAAFpeW0AcgByAGMAO4DCAMJAEGRyAADgNdgE3XIAYQB2AGUAO4DAAMBA8CFoYZFj4SFjcgBhZAAAoFMqAAFncIsAjgBvAG4ABGFmAADgNdg43fAlbHlGdW5jdGlvbgCgYSBpAG4AZwA7gMUAxUAAAWNzpACoAHIAAOA12Jzc6SFnbgCgVCJpAGwAZABlADuAwwDDQG0AbAA7gMQAxEAABGFjZWZvcnN1xQDYANoA7QDxAPYA+QD8AAABY3LJAM8AayNzbGFzaAAAoBYidgHTANUAAKDnKmUAZAAAoAYjeQARZIABY3J0AOAA5QDrAGEidXNlAACgNSLuI291bGxpcwCgLCFhAJJjcgAA4DXYBd1wAGYAAOA12Dnd5SF2ZdhiYwDyAOoAbSJwZXEAAKBOIgAHSE9hY2RlZmhpbG9yc3UXARoBHwE6AVIBVQFiAWQBZgGCAakB6QHtAfIBYwB5ACdkUABZADuAqQCpQIABY3B5ACUBKAE1AfUhdGUGYWmg0iJ0KGFsRGlmZmVyZW50aWFsRAAAoEUhbCJleXMAAKAtIQACYWVpb0EBRAFKAU0B8iFvbgxhZABpAGwAO4DHAMdAcgBjAAhhbiJpbnQAAKAwIm8AdAAKYQABZG5ZAV0BaSJsbGEAuGB0I2VyRG90ALdg8gA5AWkAp2NyImNsZQAAAkRNUFRwAXQBeQF9AW8AdAAAoJkiaSJudXMAAKCWIuwhdXMAoJUiaSJtZXMAAKCXIm8AAAFjc4cBlAFrKndpc2VDb250b3VySW50ZWdyYWwAAKAyImUjQ3VybHkAAAFEUZwBpAFvJXVibGVRdW90ZQAAoB0gdSJvdGUAAKAZIAACbG5wdbABtgHNAdgBbwBuAGWgNyIAoHQqgAFnaXQAvAHBAcUB8iJ1ZW50AKBhIm4AdAAAoC8i7yV1ckludGVncmFsAKAuIgABZnLRAdMBAKACIe8iZHVjdACgECJuLnRlckNsb2Nrd2lzZUNvbnRvdXJJbnRlZ3JhbAAAoDMi7yFzcwCgLypjAHIAAOA12J7ccABDoNMiYQBwAACgTSKABURKU1phY2VmaW9zAAsCEgIVAhgCGwIsAjQCOQI9AnMCfwNvoEUh9CJyYWhkAKARKWMAeQACZGMAeQAFZGMAeQAPZIABZ3JzACECJQIoAuchZXIAoCEgcgAAoKEhaAB2AACg5CoAAWF5MAIzAvIhb24OYRRkbAB0oAciYQCUY3IAAOA12AfdAAFhZkECawIAAWNtRQJnAvIjaXRpY2FsAAJBREdUUAJUAl8CYwJjInV0ZQC0YG8AdAFZAloC2WJiJGxlQWN1dGUA3WJyImF2ZQBgYGkibGRlANxi7yFuZACgxCJmJWVyZW50aWFsRAAAoEYhcAR9AgAAAAAAAIECjgIAABoDZgAA4DXYO91EoagAhQKJAm8AdAAAoNwgcSJ1YWwAAKBQIuIhbGUAA0NETFJVVpkCqAK1Au8C/wIRA28AbgB0AG8AdQByAEkAbgB0AGUAZwByAGEA7ADEAW8AdAKvAgAAAACwAqhgbiNBcnJvdwAAoNMhAAFlb7kC0AJmAHQAgAFBUlQAwQLGAs0CciJyb3cAAKDQIekkZ2h0QXJyb3cAoNQhZQDlACsCbgBnAAABTFLWAugC5SFmdAABQVLcAuECciJyb3cAAKD4J+kkZ2h0QXJyb3cAoPon6SRnaHRBcnJvdwCg+SdpImdodAAAAUFU9gL7AnIicm93AACg0iFlAGUAAKCoInAAQQIGAwAAAAALA3Iicm93AACg0SFvJHduQXJyb3cAAKDVIWUlcnRpY2FsQmFyAACgJSJuAAADQUJMUlRhJAM2AzoDWgNxA3oDciJyb3cAAKGTIUJVLAMwA2EAcgAAoBMpcCNBcnJvdwAAoPUhciJldmUAEWPlIWZ00gJDAwAASwMAAFIDaSVnaHRWZWN0b3IAAKBQKWUkZVZlY3RvcgAAoF4p5SJjdG9yQqC9IWEAcgAAoFYpaSJnaHQA1AFiAwAAaQNlJGVWZWN0b3IAAKBfKeUiY3RvckKgwSFhAHIAAKBXKWUAZQBBoKQiciJyb3cAAKCnIXIAcgBvAPcAtAIAAWN0gwOHA3IAAOA12J/c8iFvaxBhAAhOVGFjZGZnbG1vcHFzdHV4owOlA6kDsAO/A8IDxgPNA9ID8gP9AwEEFAQeBCAEJQRHAEphSAA7gNAA0EBjAHUAdABlADuAyQDJQIABYWl5ALYDuQO+A/Ihb24aYXIAYwA7gMoAykAtZG8AdAAWYXIAAOA12AjdcgBhAHYAZQA7gMgAyEDlIm1lbnQAoAgiAAFhcNYD2QNjAHIAEmF0AHkAUwLhAwAAAADpA20lYWxsU3F1YXJlAACg+yVlJ3J5U21hbGxTcXVhcmUAAKCrJQABZ3D2A/kDbwBuABhhZgAA4DXYPN3zImlsb26VY3UAAAFhaQYEDgRsAFSgdSppImxkZQAAoEIi7CNpYnJpdW0AoMwhAAFjaRgEGwRyAACgMCFtAACgcyphAJdjbQBsADuAywDLQAABaXApBC0E8yF0cwCgAyLvJG5lbnRpYWxFAKBHIYACY2Zpb3MAPQQ/BEMEXQRyBHkAJGRyAADgNdgJ3WwibGVkAFMCTAQAAAAAVARtJWFsbFNxdWFyZQAAoPwlZSdyeVNtYWxsU3F1YXJlAACgqiVwA2UEAABpBAAAAABtBGYAAOA12D3dwSFsbACgACLyI2llcnRyZgCgMSFjAPIAcQQABkpUYWJjZGZnb3JzdIgEiwSOBJMElwSkBKcEqwStBLIE5QTqBGMAeQADZDuAPgA+QO0hbWFkoJMD3GNyImV2ZQAeYYABZWl5AJ0EoASjBOQhaWwiYXIAYwAcYRNkbwB0ACBhcgAA4DXYCt0AoNkicABmAADgNdg+3eUiYXRlcgADRUZHTFNUvwTIBM8E1QTZBOAEcSJ1YWwATKBlIuUhc3MAoNsidSRsbEVxdWFsAACgZyJyI2VhdGVyAACgoirlIXNzAKB3IuwkYW50RXF1YWwAoH4qaSJsZGUAAKBzImMAcgAA4DXYotwAoGsiAARBYWNmaW9zdfkE/QQFBQgFCwUTBSIFKwVSIkRjeQAqZAABY3QBBQQFZQBrAMdiXmDpIXJjJGFyAACgDCFsJWJlcnRTcGFjZQAAoAsh8AEYBQAAGwVmAACgDSHpJXpvbnRhbExpbmUAoAAlAAFjdCYFKAXyABIF8iFvayZhbQBwAEQBMQU5BW8AdwBuAEgAdQBtAPAAAAFxInVhbAAAoE8iAAdFSk9hY2RmZ21ub3N0dVMFVgVZBVwFYwVtBXAFcwV6BZAFtgXFBckFzQVjAHkAFWTsIWlnMmFjAHkAAWRjAHUAdABlADuAzQDNQAABaXlnBWwFcgBjADuAzgDOQBhkbwB0ADBhcgAAoBEhcgBhAHYAZQA7gMwAzEAAoREhYXB/BYsFAAFjZ4MFhQVyACphaSNuYXJ5SQAAoEghbABpAGUA8wD6AvQBlQUAAKUFZaAsIgABZ3KaBZ4F8iFhbACgKyLzI2VjdGlvbgCgwiJpI3NpYmxlAAABQ1SsBbEFbyJtbWEAAKBjIGkibWVzAACgYiCAAWdwdAC8Bb8FwwVvAG4ALmFmAADgNdhA3WEAmWNjAHIAAKAQIWkibGRlAChh6wHSBQAA1QVjAHkABmRsADuAzwDPQIACY2Zvc3UA4QXpBe0F8gX9BQABaXnlBegFcgBjADRhGWRyAADgNdgN3XAAZgAA4DXYQd3jAfcFAAD7BXIAAOA12KXc8iFjeQhk6yFjeQRkgANISmFjZm9zAAwGDwYSBhUGHQYhBiYGYwB5ACVkYwB5AAxk8CFwYZpjAAFleRkGHAbkIWlsNmEaZHIAAOA12A7dcABmAADgNdhC3WMAcgAA4DXYptyABUpUYWNlZmxtb3N0AD0GQAZDBl4GawZkB2gHcAd0B80H2gdjAHkACWQ7gDwAPECAAmNtbnByAEwGTwZSBlUGWwb1IXRlOWHiIWRhm2NnAACg6ifsI2FjZXRyZgCgEiFyAACgniGAAWFleQBkBmcGagbyIW9uPWHkIWlsO2EbZAABZnNvBjQHdAAABUFDREZSVFVWYXKABp4GpAbGBssG3AYDByEHwQIqBwABbnKEBowGZyVsZUJyYWNrZXQAAKDoJ/Ihb3cAoZAhQlKTBpcGYQByAACg5CHpJGdodEFycm93AKDGIWUjaWxpbmcAAKAII28A9QGqBgAAsgZiJWxlQnJhY2tldAAAoOYnbgDUAbcGAAC+BmUkZVZlY3RvcgAAoGEp5SJjdG9yQqDDIWEAcgAAoFkpbCJvb3IAAKAKI2kiZ2h0AAABQVbSBtcGciJyb3cAAKCUIeUiY3RvcgCgTikAAWVy4AbwBmUAAKGjIkFW5gbrBnIicm93AACgpCHlImN0b3IAoFopaSNhbmdsZQBCorIi+wYAAAAA/wZhAHIAAKDPKXEidWFsAACgtCJwAIABRFRWAAoHEQcYB+8kd25WZWN0b3IAoFEpZSRlVmVjdG9yAACgYCnlImN0b3JCoL8hYQByAACgWCnlImN0b3JCoLwhYQByAACgUilpAGcAaAB0AGEAcgByAG8A9wDMAnMAAANFRkdMU1Q/B0cHTgdUB1gHXwfxJXVhbEdyZWF0ZXIAoNoidSRsbEVxdWFsAACgZiJyI2VhdGVyAACgdiLlIXNzAKChKuwkYW50RXF1YWwAoH0qaSJsZGUAAKByInIAAOA12A/dZaDYIuYjdGFycm93AKDaIWkiZG90AD9hgAFucHcAege1B7kHZwAAAkxSbHKCB5QHmwerB+UhZnQAAUFSiAeNB3Iicm93AACg9SfpJGdodEFycm93AKD3J+kkZ2h0QXJyb3cAoPYn5SFmdAABYXLcAqEHaQBnAGgAdABhAHIAcgBvAPcA5wJpAGcAaAB0AGEAcgByAG8A9wDuAmYAAOA12EPdZQByAAABTFK/B8YHZSRmdEFycm93AACgmSHpJGdodEFycm93AKCYIYABY2h0ANMH1QfXB/IAWgYAoLAh8iFva0FhAKBqIgAEYWNlZmlvc3XpB+wH7gf/BwMICQgOCBEIcAAAoAUpeQAcZAABZGzyB/kHaSR1bVNwYWNlAACgXyBsI2ludHJmAACgMyFyAADgNdgQ3e4jdXNQbHVzAKATInAAZgAA4DXYRN1jAPIA/gecY4AESmFjZWZvc3R1ACEIJAgoCDUIgQiFCDsKQApHCmMAeQAKZGMidXRlAENhgAFhZXkALggxCDQI8iFvbkdh5CFpbEVhHWSAAWdzdwA7CGEIfQjhInRpdmWAAU1UVgBECEwIWQhlJWRpdW1TcGFjZQAAoAsgaABpAAABY25SCFMIawBTAHAAYQBjAOUASwhlAHIAeQBUAGgAaQDuAFQI9CFlZAABR0xnCHUIcgBlAGEAdABlAHIARwByAGUAYQB0AGUA8gDrBGUAcwBzAEwAZQBzAPMA2wdMImluZQAKYHIAAOA12BHdAAJCbnB0jAiRCJkInAhyImVhawAAoGAgwiZyZWFraW5nU3BhY2WgYGYAAKAVIUOq7CqzCMIIzQgAAOcIGwkAAAAAAAAtCQAAbwkAAIcJAACdCcAJGQoAADQKAAFvdbYIvAjuI2dydWVudACgYiJwIkNhcAAAoG0ibyh1YmxlVmVydGljYWxCYXIAAKAmIoABbHF4ANII1wjhCOUibWVudACgCSL1IWFsVKBgImkibGRlAADgQiI4A2kic3RzAACgBCJyI2VhdGVyAACjbyJFRkdMU1T1CPoIAgkJCQ0JFQlxInVhbAAAoHEidSRsbEVxdWFsAADgZyI4A3IjZWF0ZXIAAOBrIjgD5SFzcwCgeSLsJGFudEVxdWFsAOB+KjgDaSJsZGUAAKB1IvUhbXBEASAJJwnvI3duSHVtcADgTiI4A3EidWFsAADgTyI4A2UAAAFmczEJRgn0JFRyaWFuZ2xlQqLqIj0JAAAAAEIJYQByAADgzyk4A3EidWFsAACg7CJzAICibiJFR0xTVABRCVYJXAlhCWkJcSJ1YWwAAKBwInIjZWF0ZXIAAKB4IuUhc3MA4GoiOAPsJGFudEVxdWFsAOB9KjgDaSJsZGUAAKB0IuUic3RlZAABR0x1CX8J8iZlYXRlckdyZWF0ZXIA4KIqOAPlI3NzTGVzcwDgoSo4A/IjZWNlZGVzAKGAIkVTjwmVCXEidWFsAADgryo4A+wkYW50RXF1YWwAoOAiAAFlaaAJqQl2JmVyc2VFbGVtZW50AACgDCLnJWh0VHJpYW5nbGVCousitgkAAAAAuwlhAHIAAODQKTgDcSJ1YWwAAKDtIgABcXXDCeAJdSNhcmVTdQAAAWJwywnVCfMhZXRF4I8iOANxInVhbAAAoOIi5SJyc2V0ReCQIjgDcSJ1YWwAAKDjIoABYmNwAOYJ8AkNCvMhZXRF4IIi0iBxInVhbAAAoIgi4yJlZWRzgKGBIkVTVAD6CQAKBwpxInVhbAAA4LAqOAPsJGFudEVxdWFsAKDhImkibGRlAADgfyI4A+UicnNldEXggyLSIHEidWFsAACgiSJpImxkZQCAoUEiRUZUACIKJwouCnEidWFsAACgRCJ1JGxsRXF1YWwAAKBHImkibGRlAACgSSJlJXJ0aWNhbEJhcgAAoCQiYwByAADgNdip3GkAbABkAGUAO4DRANFAnWMAB0VhY2RmZ21vcHJzdHV2XgphCmgKcgp2CnoKgQqRCpYKqwqtCrsKyArNCuwhaWdSYWMAdQB0AGUAO4DTANNAAAFpeWwKcQpyAGMAO4DUANRAHmRiImxhYwBQYXIAAOA12BLdcgBhAHYAZQA7gNIA0kCAAWFlaQCHCooKjQpjAHIATGFnAGEAqWNjInJvbgCfY3AAZgAA4DXYRt3lI25DdXJseQABRFGeCqYKbyV1YmxlUXVvdGUAAKAcIHUib3RlAACgGCAAoFQqAAFjbLEKtQpyAADgNdiq3GEAcwBoADuA2ADYQGkAbAHACsUKZABlADuA1QDVQGUAcwAAoDcqbQBsADuA1gDWQGUAcgAAAUJQ0wrmCgABYXLXCtoKcgAAoD4gYQBjAAABZWvgCuIKAKDeI2UAdAAAoLQjYSVyZW50aGVzaXMAAKDcI4AEYWNmaGlsb3JzAP0KAwsFCwkLCwsMCxELIwtaC3IjdGlhbEQAAKACInkAH2RyAADgNdgT3WkApmOgY/Ujc01pbnVzsWAAAWlwFQsgC24AYwBhAHIAZQBwAGwAYQBuAOUACgVmAACgGSGAobsqZWlvACoLRQtJC+MiZWRlc4CheiJFU1QANAs5C0ALcSJ1YWwAAKCvKuwkYW50RXF1YWwAoHwiaSJsZGUAAKB+Im0AZQAAoDMgAAFkcE0LUQv1IWN0AKAPIm8jcnRpb24AYaA3ImwAAKAdIgABY2leC2ILcgAA4DXYq9yoYwACVWZvc2oLbwtzC3cLTwBUADuAIgAiQHIAAOA12BTdcABmAACgGiFjAHIAAOA12KzcAAZCRWFjZWZoaW9yc3WPC5MLlwupC7YL2AvbC90LhQyTDJoMowzhIXJyAKAQKUcAO4CuAK5AgAFjbnIAnQugC6ML9SF0ZVRhZwAAoOsncgB0oKAhbAAAoBYpgAFhZXkArwuyC7UL8iFvblhh5CFpbFZhIGR2oBwhZSJyc2UAAAFFVb8LzwsAAWxxwwvIC+UibWVudACgCyL1JGlsaWJyaXVtAKDLIXAmRXF1aWxpYnJpdW0AAKBvKXIAAKAcIW8AoWPnIWh0AARBQ0RGVFVWYewLCgwQDDIMNwxeDHwM9gIAAW5y8Av4C2clbGVCcmFja2V0AACg6SfyIW93AKGSIUJM/wsDDGEAcgAAoOUhZSRmdEFycm93AACgxCFlI2lsaW5nAACgCSNvAPUBFgwAAB4MYiVsZUJyYWNrZXQAAKDnJ24A1AEjDAAAKgxlJGVWZWN0b3IAAKBdKeUiY3RvckKgwiFhAHIAAKBVKWwib29yAACgCyMAAWVyOwxLDGUAAKGiIkFWQQxGDHIicm93AACgpiHlImN0b3IAoFspaSNhbmdsZQBCorMiVgwAAAAAWgxhAHIAAKDQKXEidWFsAACgtSJwAIABRFRWAGUMbAxzDO8kd25WZWN0b3IAoE8pZSRlVmVjdG9yAACgXCnlImN0b3JCoL4hYQByAACgVCnlImN0b3JCoMAhYQByAACgUykAAXB1iQyMDGYAAKAdIe4kZEltcGxpZXMAoHAp6SRnaHRhcnJvdwCg2yEAAWNongyhDHIAAKAbIQCgsSHsJGVEZWxheWVkAKD0KYAGSE9hY2ZoaW1vcXN0dQC/DMgMzAzQDOIM5gwKDQ0NFA0ZDU8NVA1YDQABQ2PDDMYMyCFjeSlkeQAoZEYiVGN5ACxkYyJ1dGUAWmEAorwqYWVpedgM2wzeDOEM8iFvbmBh5CFpbF5hcgBjAFxhIWRyAADgNdgW3e8hcnQAAkRMUlXvDPYM/QwEDW8kd25BcnJvdwAAoJMhZSRmdEFycm93AACgkCHpJGdodEFycm93AKCSIXAjQXJyb3cAAKCRIechbWGjY+EkbGxDaXJjbGUAoBgicABmAADgNdhK3XICHw0AAAAAIg10AACgGiLhIXJlgKGhJUlTVQAqDTINSg3uJXRlcnNlY3Rpb24AoJMidQAAAWJwNw1ADfMhZXRFoI8icSJ1YWwAAKCRIuUicnNldEWgkCJxInVhbAAAoJIibiJpb24AAKCUImMAcgAA4DXYrtxhAHIAAKDGIgACYmNtcF8Nag2ODZANc6DQImUAdABFoNAicSJ1YWwAAKCGIgABY2huDYkNZSJlZHMAgKF7IkVTVAB4DX0NhA1xInVhbAAAoLAq7CRhbnRFcXVhbACgfSJpImxkZQAAoH8iVABoAGEA9ADHCwCgESIAodEiZXOVDZ8NciJzZXQARaCDInEidWFsAACghyJlAHQAAKDRIoAFSFJTYWNmaGlvcnMAtQ27Db8NyA3ODdsN3w3+DRgOHQ4jDk8AUgBOADuA3gDeQMEhREUAoCIhAAFIY8MNxg1jAHkAC2R5ACZkAAFidcwNzQ0JYKRjgAFhZXkA1A3XDdoN8iFvbmRh5CFpbGJhImRyAADgNdgX3QABZWnjDe4N8gHoDQAA7Q3lImZvcmUAoDQiYQCYYwABY27yDfkNayNTcGFjZQAA4F8gCiDTInBhY2UAoAkg7CFkZYChPCJFRlQABw4MDhMOcSJ1YWwAAKBDInUkbGxFcXVhbAAAoEUiaSJsZGUAAKBIInAAZgAA4DXYS93pI3BsZURvdACg2yAAAWN0Jw4rDnIAAOA12K/c8iFva2Zh4QpFDlYOYA5qDgAAbg5yDgAAAAAAAAAAAAB5DnwOqA6zDgAADg8RDxYPGg8AAWNySA5ODnUAdABlADuA2gDaQHIAb6CfIeMhaXIAoEkpcgDjAVsOAABdDnkADmR2AGUAbGEAAWl5Yw5oDnIAYwA7gNsA20AjZGIibGFjAHBhcgAA4DXYGN1yAGEAdgBlADuA2QDZQOEhY3JqYQABZGl/Dp8OZQByAAABQlCFDpcOAAFhcokOiw5yAF9gYQBjAAABZWuRDpMOAKDfI2UAdAAAoLUjYSVyZW50aGVzaXMAAKDdI28AbgBQoMMi7CF1cwCgjiIAAWdwqw6uDm8AbgByYWYAAOA12EzdAARBREVUYWRwc78O0g7ZDuEOBQPqDvMOBw9yInJvdwDCoZEhyA4AAMwOYQByAACgEilvJHduQXJyb3cAAKDFIW8kd25BcnJvdwAAoJUhcSV1aWxpYnJpdW0AAKBuKWUAZQBBoKUiciJyb3cAAKClIW8AdwBuAGEAcgByAG8A9wAQA2UAcgAAAUxS+Q4AD2UkZnRBcnJvdwAAoJYh6SRnaHRBcnJvdwCglyFpAGyg0gNvAG4ApWPpIW5nbmFjAHIAAOA12LDcaSJsZGUAaGFtAGwAO4DcANxAgAREYmNkZWZvc3YALQ8xDzUPNw89D3IPdg97D4AP4SFzaACgqyJhAHIAAKDrKnkAEmThIXNobKCpIgCg5ioAAWVyQQ9DDwCgwSKAAWJ0eQBJD00Paw9hAHIAAKAWIGmgFiDjIWFsAAJCTFNUWA9cD18PZg9hAHIAAKAjIukhbmV8YGUkcGFyYXRvcgAAoFgnaSJsZGUAAKBAItQkaGluU3BhY2UAoAogcgAA4DXYGd1wAGYAAOA12E3dYwByAADgNdix3GQiYXNoAACgqiKAAmNlZm9zAI4PkQ+VD5kPng/pIXJjdGHkIWdlAKDAInIAAOA12BrdcABmAADgNdhO3WMAcgAA4DXYstwAAmZpb3OqD64Prw+0D3IAAOA12BvdnmNwAGYAAOA12E/dYwByAADgNdiz3IAEQUlVYWNmb3N1AMgPyw/OD9EP2A/gD+QP6Q/uD2MAeQAvZGMAeQAHZGMAeQAuZGMAdQB0AGUAO4DdAN1AAAFpedwP3w9yAGMAdmErZHIAAOA12BzdcABmAADgNdhQ3WMAcgAA4DXYtNxtAGwAeGEABEhhY2RlZm9z/g8BEAUQDRAQEB0QIBAkEGMAeQAWZGMidXRlAHlhAAFheQkQDBDyIW9ufWEXZG8AdAB7YfIBFRAAABwQbwBXAGkAZAB0AOgAVAhhAJZjcgAAoCghcABmAACgJCFjAHIAAOA12LXc4QtCEEkQTRAAAGcQbRByEAAAAAAAAAAAeRCKEJcQ8hD9EAAAGxEhETIROREAAD4RYwB1AHQAZQA7gOEA4UByImV2ZQADYYCiPiJFZGl1eQBWEFkQWxBgEGUQAOA+IjMDAKA/InIAYwA7gOIA4kB0AGUAO4C0ALRAMGRsAGkAZwA7gOYA5kByoGEgAOA12B7dcgBhAHYAZQA7gOAA4EAAAWVwfBCGEAABZnCAEIQQ8yF5bQCgNSHoAIMQaABhALFjAAFhcI0QWwAAAWNskRCTEHIAAWFnAACgPypkApwQAAAAALEQAKInImFkc3ajEKcQqRCuEG4AZAAAoFUqAKBcKmwib3BlAACgWCoAoFoqAKMgImVsbXJzersQvRDAEN0Q5RDtEACgpCllAACgICJzAGQAYaAhImEEzhDQENIQ1BDWENgQ2hDcEACgqCkAoKkpAKCqKQCgqykAoKwpAKCtKQCgrikAoK8pdAB2oB8iYgBkoL4iAKCdKQABcHTpEOwQaAAAoCIixWDhIXJyAKB8IwABZ3D1EPgQbwBuAAVhZgAA4DXYUt0Ao0giRWFlaW9wBxEJEQ0RDxESERQRAKBwKuMhaXIAoG8qAKBKImQAAKBLInMAJ2DyIW94ZaBIIvEADhFpAG4AZwA7gOUA5UCAAWN0eQAmESoRKxFyAADgNdi23CpgbQBwAGWgSCLxAPgBaQBsAGQAZQA7gOMA40BtAGwAO4DkAORAAAFjaUERRxFvAG4AaQBuAPQA6AFuAHQAAKARKgAITmFiY2RlZmlrbG5vcHJzdWQRaBGXEZ8RpxGrEdIR1hErEjASexKKEn0RThNbE3oTbwB0AACg7SoAAWNybBGJEWsAAAJjZXBzdBF4EX0RghHvIW5nAKBMInAjc2lsb24A9mNyImltZQAAoDUgaQBtAGWgPSJxAACgzSJ2AY0RkRFlAGUAAKC9ImUAZABnoAUjZQAAoAUjcgBrAHSgtSPiIXJrAKC2IwABb3mjEaYRbgDnAHcRMWTxIXVvAKAeIIACY21wcnQAtBG5Eb4RwRHFEeEhdXPloDUi5ABwInR5dgAAoLApcwDpAH0RbgBvAPUA6gCAAWFodwDLEcwRzhGyYwCgNiHlIWVuAKBsInIAAOA12B/dZwCAA2Nvc3R1dncA4xHyEQUSEhIhEiYSKRKAAWFpdQDpEesR7xHwAKMFcgBjAACg7yVwAACgwyKAAWRwdAD4EfwRABJvAHQAAKAAKuwhdXMAoAEqaSJtZXMAAKACKnECCxIAAAAADxLjIXVwAKAGKmEAcgAAoAUm8iNpYW5nbGUAAWR1GhIeEu8hd24AoL0lcAAAoLMlcCJsdXMAAKAEKmUA5QBCD+UAkg9hInJvdwAAoA0pgAFha28ANhJoEncSAAFjbjoSZRJrAIABbHN0AEESRxJNEm8jemVuZ2UAAKDrKXEAdQBhAHIA5QBcBPIjaWFuZ2xlgKG0JWRscgBYElwSYBLvIXduAKC+JeUhZnQAoMIlaSJnaHQAAKC4JWsAAKAjJLEBbRIAAHUSsgFxEgAAcxIAoJIlAKCRJTQAAKCTJWMAawAAoIglAAFlb38ShxJx4D0A5SD1IWl2AOBhIuUgdAAAoBAjAAJwdHd4kRKVEpsSnxJmAADgNdhT3XSgpSJvAG0AAKClIvQhaWUAoMgiAAZESFVWYmRobXB0dXayEsES0RLgEvcS+xIKExoTHxMjEygTNxMAAkxSbHK5ErsSvRK/EgCgVyUAoFQlAKBWJQCgUyUAolAlRFVkdckSyxLNEs8SAKBmJQCgaSUAoGQlAKBnJQACTFJsctgS2hLcEt4SAKBdJQCgWiUAoFwlAKBZJQCjUSVITFJobHLrEu0S7xLxEvMS9RIAoGwlAKBjJQCgYCUAoGslAKBiJQCgXyVvAHgAAKDJKQACTFJscgITBBMGEwgTAKBVJQCgUiUAoBAlAKAMJQCiACVEVWR1EhMUExYTGBMAoGUlAKBoJQCgLCUAoDQlaSJudXMAAKCfIuwhdXMAoJ4iaSJtZXMAAKCgIgACTFJsci8TMRMzEzUTAKBbJQCgWCUAoBglAKAUJQCjAiVITFJobHJCE0QTRhNIE0oTTBMAoGolAKBhJQCgXiUAoDwlAKAkJQCgHCUAAWV2UhNVE3YA5QD5AGIAYQByADuApgCmQAACY2Vpb2ITZhNqE24TcgAA4DXYt9xtAGkAAKBPIG0A5aA9IogRbAAAoVwAYmh0E3YTAKDFKfMhdWIAoMgnbAF+E4QTbABloCIgdAAAoCIgcAAAoU4iRWWJE4sTAKCuKvGgTyI8BeEMqRMAAN8TABQDFB8UAAAjFDQUAAAAAIUUAAAAAI0UAAAAANcU4xT3FPsUAACIFQAAlhWAAWNwcgCuE7ET1RP1IXRlB2GAoikiYWJjZHMAuxO/E8QTzhPSE24AZAAAoEQqciJjdXAAAKBJKgABYXXIE8sTcAAAoEsqcAAAoEcqbwB0AACgQCoA4CkiAP4AAWVv2RPcE3QAAKBBIO4ABAUAAmFlaXXlE+8T9RP4E/AB6hMAAO0TcwAAoE0qbwBuAA1hZABpAGwAO4DnAOdAcgBjAAlhcABzAHOgTCptAACgUCpvAHQAC2GAAWRtbgAIFA0UEhRpAGwAO4C4ALhAcCJ0eXYAAKCyKXQAAIGiADtlGBQZFKJAcgBkAG8A9ABiAXIAAOA12CDdgAFjZWkAKBQqFDIUeQBHZGMAawBtoBMn4SFyawCgEyfHY3IAAKPLJUVjZWZtcz8UQRRHFHcUfBSAFACgwykAocYCZWxGFEkUcQAAoFciZQBhAlAUAAAAAGAUciJyb3cAAAFsclYUWhTlIWZ0AKC6IWkiZ2h0AACguyGAAlJTYWNkAGgUaRRrFG8UcxSuYACgyCRzAHQAAKCbIukhcmMAoJoi4SFzaACgnSJuImludAAAoBAqaQBkAACg7yrjIWlyAKDCKfUhYnN1oGMmaQB0AACgYybsApMUmhS2FAAAwxRvAG4AZaA6APGgVCKrAG0CnxQAAAAAoxRhAHSgLABAYAChASJmbKcUqRTuABMNZQAAAW14rhSyFOUhbnQAoAEiZQDzANIB5wG6FAAAwBRkoEUibwB0AACgbSpuAPQAzAGAAWZyeQDIFMsUzhQA4DXYVN1vAOQA1wEAgakAO3MeAdMUcgAAoBchAAFhb9oU3hRyAHIAAKC1IXMAcwAAoBcnAAFjdeYU6hRyAADgNdi43AABYnDuFPIUZaDPKgCg0SploNAqAKDSKuQhb3QAoO8igANkZWxwcnZ3AAYVEBUbFSEVRBVlFYQV4SFycgABbHIMFQ4VAKA4KQCgNSlwAhYVAAAAABkVcgAAoN4iYwAAoN8i4SFycnCgtiEAoD0pgKIqImJjZG9zACsVMBU6FT4VQRVyImNhcAAAoEgqAAFhdTQVNxVwAACgRipwAACgSipvAHQAAKCNInIAAKBFKgDgKiIA/gACYWxydksVURVuFXMVcgByAG2gtyEAoDwpeQCAAWV2dwBYFWUVaRVxAHACXxUAAAAAYxVyAGUA4wAXFXUA4wAZFWUAZQAAoM4iZSJkZ2UAAKDPImUAbgA7gKQApEBlI2Fycm93AAABbHJ7FX8V5SFmdACgtiFpImdodAAAoLchZQDkAG0VAAFjaYsVkRVvAG4AaQBuAPQAkwFuAHQAAKAxImwiY3R5AACgLSOACUFIYWJjZGVmaGlqbG9yc3R1d3oAuBW7Fb8V1RXgFegV+RUKFhUWHxZUFlcWZRbFFtsW7xb7FgUXChdyAPIAtAJhAHIAAKBlKQACZ2xyc8YVyhXOFdAV5yFlcgCgICDlIXRoAKA4IfIA9QxoAHagECAAoKMiawHZFd4VYSJyb3cAAKAPKWEA4wBfAgABYXnkFecV8iFvbg9hNGQAoUYhYW/tFfQVAAFnciEC8RVyAACgyiF0InNlcQAAoHcqgAFnbG0A/xUCFgUWO4CwALBAdABhALRjcCJ0eXYAAKCxKQABaXIOFhIW8yFodACgfykA4DXYId1hAHIAAAFschsWHRYAoMMhAKDCIYACYWVnc3YAKBauAjYWOhY+Fm0AAKHEIm9zLhY0Fm4AZABzoMQi9SFpdACgZiZhIm1tYQDdY2kAbgAAoPIiAKH3AGlvQxZRFmQAZQAAgfcAO29KFksW90BuI3RpbWVzAACgxyJuAPgAUBZjAHkAUmRjAG8CXhYAAAAAYhZyAG4AAKAeI28AcAAAoA0jgAJscHR1dwBuFnEWdRaSFp4W7CFhciRgZgAA4DXYVd0AotkCZW1wc30WhBaJFo0WcQBkoFAibwB0AACgUSJpIm51cwAAoDgi7CF1cwCgFCLxInVhcmUAoKEiYgBsAGUAYgBhAHIAdwBlAGQAZwDlANcAbgCAAWFkaAClFqoWtBZyAHIAbwD3APUMbwB3AG4AYQByAHIAbwB3APMA8xVhI3Jwb29uAAABbHK8FsAWZQBmAPQAHBZpAGcAaAD0AB4WYgHJFs8WawBhAHIAbwD3AJILbwLUFgAAAADYFnIAbgAAoB8jbwBwAACgDCOAAWNvdADhFukW7BYAAXJ55RboFgDgNdi53FVkbAAAoPYp8iFvaxFhAAFkcvMW9xZvAHQAAKDxImkA5qC/JVsSAAFhaP8WAhdyAPIANQNhAPIA1wvhIm5nbGUAoKYpAAFjaQ4XEBd5AF9k5yJyYXJyAKD/JwAJRGFjZGVmZ2xtbm9wcXJzdHV4MRc4F0YXWxcyBF4XaRd5F40XrBe0F78X2RcVGCEYLRg1GEAYAAFEbzUXgRZvAPQA+BUAAWNzPBdCF3UAdABlADuA6QDpQPQhZXIAoG4qAAJhaW95TRdQF1YXWhfyIW9uG2FyAGOgViI7gOoA6kDsIW9uAKBVIk1kbwB0ABdhAAFEcmIXZhdvAHQAAKBSIgDgNdgi3XKhmipuF3QXYQB2AGUAO4DoAOhAZKCWKm8AdAAAoJgqgKGZKmlscwCAF4UXhxfuInRlcnMAoOcjAKATIWSglSpvAHQAAKCXKoABYXBzAJMXlheiF2MAcgATYXQAeQBzogUinxcAAAAAoRdlAHQAAKAFInAAMaADIDMBqRerFwCgBCAAoAUgAAFnc7AXsRdLYXAAAKACIAABZ3C4F7sXbwBuABlhZgAA4DXYVt2AAWFscwDFF8sXzxdyAHOg1SJsAACg4yl1AHMAAKBxKmkAAKG1A2x21RfYF28AbgC1Y/VjAAJjc3V24BfoF/0XEBgAAWlv5BdWF3IAYwAAoFYiaQLuFwAAAADwF+0ADQThIW50AAFnbPUX+Rd0AHIAAKCWKuUhc3MAoJUqgAFhZWkAAxgGGAoYbABzAD1gcwB0AACgXyJ2AESgYSJEAACgeCrwImFyc2wAoOUpAAFEYRkYHRhvAHQAAKBTInIAcgAAoHEpgAFjZGkAJxgqGO0XcgAAoC8hbwD0AIwCAAFhaDEYMhi3YzuA8ADwQAABbXI5GD0YbAA7gOsA60BvAACgrCCAAWNpcABGGEgYSxhsACFgcwD0ACwEAAFlb08YVxhjAHQAYQB0AGkAbwDuABoEbgBlAG4AdABpAGEAbADlADME4Ql1GAAAgRgAAIMYiBgAAAAAoRilGAAAqhgAALsYvhjRGAAA1xgnGWwAbABpAG4AZwBkAG8AdABzAGUA8QBlF3kARGRtImFsZQAAoEAmgAFpbHIAjRiRGJ0Y7CFpZwCgA/tpApcYAAAAAJoYZwAAoAD7aQBnAACgBPsA4DXYI93sIWlnAKAB++whaWcA4GYAagCAAWFsdACvGLIYthh0AACgbSZpAGcAAKAC+24AcwAAoLElbwBmAJJh8AHCGAAAxhhmAADgNdhX3QABYWvJGMwYbADsAGsEdqDUIgCg2SphI3J0aW50AACgDSoAAWFv2hgiGQABY3PeGB8ZsQPnGP0YBRkSGRUZAAAdGbID7xjyGPQY9xj5GAAA+xg7gL0AvUAAoFMhO4C8ALxAAKBVIQCgWSEAoFshswEBGQAAAxkAoFQhAKBWIbQCCxkOGQAAAAAQGTuAvgC+QACgVyEAoFwhNQAAoFghtgEZGQAAGxkAoFohAKBdITgAAKBeIWwAAKBEIHcAbgAAoCIjYwByAADgNdi73IAIRWFiY2RlZmdpamxub3JzdHYARhlKGVoZXhlmGWkZkhmWGZkZnRmgGa0ZxhnLGc8Z4BkjGmygZyIAoIwqgAFjbXAAUBlTGVgZ9SF0ZfVhbQBhAOSgswM6FgCghipyImV2ZQAfYQABaXliGWUZcgBjAB1hM2RvAHQAIWGAoWUibHFzAMYEcBl6GfGhZSLOBAAAdhlsAGEAbgD0AN8EgKF+KmNkbACBGYQZjBljAACgqSpvAHQAb6CAKmyggioAoIQqZeDbIgD+cwAAoJQqcgAA4DXYJN3noGsirATtIWVsAKA3IWMAeQBTZIChdyJFYWoApxmpGasZAKCSKgCgpSoAoKQqAAJFYWVztBm2Gb0ZwhkAoGkicABwoIoq8iFveACgiipxoIgq8aCIKrUZaQBtAACg5yJwAGYAAOA12FjdYQB2AOUAYwIAAWNp0xnWGXIAAKAKIW0AAKFzImVs3BneGQCgjioAoJAqAIM+ADtjZGxxco0E6xn0GfgZ/BkBGgABY2nvGfEZAKCnKnIAAKB6Km8AdAAAoNci0CFhcgCglSl1ImVzdAAAoHwqgAJhZGVscwAKGvQZFhrVBCAa8AEPGgAAFBpwAHIAbwD4AFkZcgAAoHgpcQAAAWxxxAQbGmwAZQBzAPMASRlpAO0A5AQAAWVuJxouGnIjdG5lcXEAAOBpIgD+xQAsGgAFQWFiY2Vma29zeUAaQxpmGmoabRqDGocalhrCGtMacgDyAMwCAAJpbG1yShpOGlAaVBpyAHMA8ABxD2YAvWBpAGwA9AASBQABZHJYGlsaYwB5AEpkAKGUIWN3YBpkGmkAcgAAoEgpAKCtIWEAcgAAoA8h6SFyYyVhgAFhbHIAcxp7Gn8a8iF0c3WgZSZpAHQAAKBlJuwhaXAAoCYg4yFvbgCguSJyAADgNdgl3XMAAAFld4wakRphInJvdwAAoCUpYSJyb3cAAKAmKYACYW1vcHIAnxqjGqcauhq+GnIAcgAAoP8h9CFodACgOyJrAAABbHKsGrMaZSRmdGFycm93AACgqSHpJGdodGFycm93AKCqIWYAAOA12Fnd4iFhcgCgFSCAAWNsdADIGswa0BpyAADgNdi93GEAcwDoAGka8iFvaydhAAFicNca2xr1IWxsAKBDIOghZW4AoBAg4Qr2GgAA/RoAAAgbExsaGwAAIRs7GwAAAAA+G2IbmRuVG6sbAACyG80b0htjAHUAdABlADuA7QDtQAChYyBpeQEbBhtyAGMAO4DuAO5AOGQAAWN4CxsNG3kANWRjAGwAO4ChAKFAAAFmcssCFhsA4DXYJt1yAGEAdgBlADuA7ADsQIChSCFpbm8AJxsyGzYbAAFpbisbLxtuAHQAAKAMKnQAAKAtIuYhaW4AoNwpdABhAACgKSHsIWlnM2GAAWFvcABDG1sbXhuAAWNndABJG0sbWRtyACthgAFlbHAAcQVRG1UbaQBuAOUAyAVhAHIA9AByBWgAMWFmAACgtyJlAGQAtWEAoggiY2ZvdGkbbRt1G3kb4SFyZQCgBSFpAG4AdKAeImkAZQAAoN0pZABvAPQAWxsAoisiY2VscIEbhRuPG5QbYQBsAACguiIAAWdyiRuNG2UAcgDzACMQ4wCCG2EicmhrAACgFyryIW9kAKA8KgACY2dwdJ8boRukG6gbeQBRZG8AbgAvYWYAAOA12FrdYQC5Y3UAZQBzAHQAO4C/AL9AAAFjabUbuRtyAADgNdi+3G4AAKIIIkVkc3bCG8QbyBvQAwCg+SJvAHQAAKD1Inag9CIAoPMiaaBiIOwhZGUpYesB1hsAANkbYwB5AFZkbAA7gO8A70AAA2NmbW9zdeYb7hvyG/Ub+hsFHAABaXnqG+0bcgBjADVhOWRyAADgNdgn3eEhdGg3YnAAZgAA4DXYW93jAf8bAAADHHIAAOA12L/c8iFjeVhk6yFjeVRkAARhY2ZnaGpvcxUcGhwiHCYcKhwtHDAcNRzwIXBhdqC6A/BjAAFleR4cIRzkIWlsN2E6ZHIAAOA12CjdciJlZW4AOGFjAHkARWRjAHkAXGRwAGYAAOA12FzdYwByAADgNdjA3IALQUJFSGFiY2RlZmdoamxtbm9wcnN0dXYAXhxtHHEcdRx5HN8cBx0dHTwd3B3tHfEdAR4EHh0eLB5FHrwewx7hHgkfPR9LH4ABYXJ0AGQcZxxpHHIA8gBvB/IAxQLhIWlsAKAbKeEhcnIAoA4pZ6BmIgCgiyphAHIAAKBiKWMJjRwAAJAcAACVHAAAAAAAAAAAAACZHJwcAACmHKgcrRwAANIc9SF0ZTph7SJwdHl2AKC0KXIAYQDuAFoG4iFkYbtjZwAAoegnZGyhHKMcAKCRKeUAiwYAoIUqdQBvADuAqwCrQHIAgKOQIWJmaGxwc3QAuhy/HMIcxBzHHMoczhxmoOQhcwAAoB8pcwAAoB0p6wCyGnAAAKCrIWwAAKA5KWkAbQAAoHMpbAAAoKIhAKGrKmFl1hzaHGkAbAAAoBkpc6CtKgDgrSoA/oABYWJyAOUc6RztHHIAcgAAoAwpcgBrAACgcicAAWFr8Rz4HGMAAAFla/Yc9xx7YFtgAAFlc/wc/hwAoIspbAAAAWR1Ax0FHQCgjykAoI0pAAJhZXV5Dh0RHRodHB3yIW9uPmEAAWRpFR0YHWkAbAA8YewAowbiAPccO2QAAmNxcnMkHScdLB05HWEAAKA2KXUAbwDyoBwgqhEAAWR1MB00HeghYXIAoGcpcyJoYXIAAKBLKWgAAKCyIQCiZCJmZ3FzRB1FB5Qdnh10AIACYWhscnQATh1WHWUdbB2NHXIicm93AHSgkCFhAOkAzxxhI3Jwb29uAAABZHVeHWId7yF3bgCgvSFwAACgvCHlJGZ0YXJyb3dzAKDHIWkiZ2h0AIABYWhzAHUdex2DHXIicm93APOglCGdBmEAcgBwAG8AbwBuAPMAzgtxAHUAaQBnAGEAcgByAG8A9wBlGugkcmVldGltZXMAoMsi8aFkIk0HAACaHWwAYQBuAPQAXgcAon0qY2Rnc6YdqR2xHbcdYwAAoKgqbwB0AG+gfypyoIEqAKCDKmXg2iIA/nMAAKCTKoACYWRlZ3MAwB3GHcod1h3ZHXAAcAByAG8A+ACmHG8AdAAAoNYicQAAAWdxzx3SHXQA8gBGB2cAdADyAHQcdADyAFMHaQDtAGMHgAFpbHIA4h3mHeod8yFodACgfClvAG8A8gDKBgDgNdgp3UWgdiIAoJEqYQH1Hf4dcgAAAWR1YB35HWygvCEAoGopbABrAACghCVjAHkAWWQAomoiYWNodAweDx4VHhkecgDyAGsdbwByAG4AZQDyAGAW4SFyZACgaylyAGkAAKD6JQABaW8hHiQe5CFvdEBh9SFzdGGgsCPjIWhlAKCwIwACRWFlczMeNR48HkEeAKBoInAAcKCJKvIhb3gAoIkqcaCHKvGghyo0HmkAbQAAoOYiAARhYm5vcHR3elIeXB5fHoUelh6mHqsetB4AAW5yVh5ZHmcAAKDsJ3IAAKD9IXIA6wCwBmcAgAFsbXIAZh52Hnse5SFmdAABYXKIB2weaQBnAGgAdABhAHIAcgBvAPcAkwfhInBzdG8AoPwnaQBnAGgAdABhAHIAcgBvAPcAmgdwI2Fycm93AAABbHKNHpEeZQBmAPQAxhxpImdodAAAoKwhgAFhZmwAnB6fHqIecgAAoIUpAOA12F3ddQBzAACgLSppIm1lcwAAoDQqYQGvHrMecwB0AACgFyLhAIoOZaHKJbkeRhLuIWdlAKDKJWEAcgBsoCgAdAAAoJMpgAJhY2htdADMHs8e1R7bHt0ecgDyAJ0GbwByAG4AZQDyANYWYQByAGSgyyEAoG0pAKAOIHIAaQAAoL8iAANhY2hpcXTrHu8e1QfzHv0eBh/xIXVvAKA5IHIAAOA12MHcbQDloXIi+h4AAPweAKCNKgCgjyoAAWJ19xwBH28AcqAYIACgGiDyIW9rQmEAhDwAO2NkaGlscXJCBhcfxh0gHyQfKB8sHzEfAAFjaRsfHR8AoKYqcgAAoHkqcgBlAOUAkx3tIWVzAKDJIuEhcnIAoHYpdSJlc3QAAKB7KgABUGk1HzkfYQByAACglillocMlAgdfEnIAAAFkdUIfRx9zImhhcgAAoEop6CFhcgCgZikAAWVuTx9WH3IjdG5lcXEAAOBoIgD+xQBUHwAHRGFjZGVmaGlsbm9wc3VuH3Ifoh+rH68ftx+7H74f5h/uH/MfBwj/HwsgxCFvdACgOiIAAmNscHJ5H30fiR+eH3IAO4CvAK9AAAFldIEfgx8AoEImZaAgJ3MAZQAAoCAnc6CmIXQAbwCAoaYhZGx1AJQfmB+cH28AdwDuAHkDZQBmAPQA6gbwAOkO6yFlcgCgriUAAW95ph+qH+0hbWEAoCkqPGThIXNoAKAUIOElc3VyZWRhbmdsZQCgISJyAADgNdgq3W8AAKAnIYABY2RuAMQfyR/bH3IAbwA7gLUAtUBhoiMi0B8AANMf1x9zAPQAKxFpAHIAAKDwKm8AdAA7gLcAt0B1AHMA4qESIh4TAADjH3WgOCIAoCoqYwHqH+0fcAAAoNsq8gB+GnAAbAB1APMACAgAAWRw9x/7H+UhbHMAoKciZgAA4DXYXt0AAWN0AyAHIHIAAOA12MLc8CFvcwCgPiJsobwDECAVIPQiaW1hcACguCJhAPAAEyAADEdMUlZhYmNkZWZnaGlqbG1vcHJzdHV2dzwgRyBmIG0geSCqILgg2iDeIBEhFSEyIUMhTSFQIZwhnyHSIQAiIyKLIrEivyIUIwABZ3RAIEMgAODZIjgD9uBrItIgBwmAAWVsdABNIF8gYiBmAHQAAAFhclMgWCByInJvdwAAoM0h6SRnaHRhcnJvdwCgziEA4NgiOAP24Goi0iBfCekkZ2h0YXJyb3cAoM8hAAFEZHEgdSDhIXNoAKCvIuEhc2gAoK4igAJiY25wdACCIIYgiSCNIKIgbABhAACgByL1IXRlRGFnAADgICLSIACiSSJFaW9wlSCYIJwgniAA4HAqOANkAADgSyI4A3MASWFyAG8A+AAyCnUAcgBhoG4mbADzoG4mmwjzAa8gAACzIHAAO4CgAKBAbQBwAOXgTiI4AyoJgAJhZW91eQDBIMogzSDWINkg8AHGIAAAyCAAoEMqbwBuAEhh5CFpbEZhbgBnAGSgRyJvAHQAAOBtKjgDcAAAoEIqPWThIXNoAKATIACjYCJBYWRxc3jpIO0g+SD+IAIhDCFyAHIAAKDXIXIAAAFocvIg9SBrAACgJClvoJch9wAGD28AdAAA4FAiOAN1AGkA9gC7CAABZWkGIQohYQByAACgKCntAN8I6SFzdPOgBCLlCHIAAOA12CvdAAJFZXN0/wgcISshLiHxoXEiIiEAABMJ8aFxIgAJAAAnIWwAYQBuAPQAEwlpAO0AGQlyoG8iAKBvIoABQWFwADghOyE/IXIA8gBeIHIAcgAAoK4hYQByAACg8ipzogsiSiEAAAAAxwtkoPwiAKD6ImMAeQBaZIADQUVhZGVzdABcIV8hYiFmIWkhkyGWIXIA8gBXIADgZiI4A3IAcgAAoJohcgAAoCUggKFwImZxcwBwIYQhjiF0AAABYXJ1IXohcgByAG8A9wBlIWkAZwBoAHQAYQByAHIAbwD3AD4h8aFwImAhAACKIWwAYQBuAPQAZwlz4H0qOAMAoG4iaQDtAG0JcqBuImkA5aDqIkUJaQDkADoKAAFwdKMhpyFmAADgNdhf3YCBrAA7aW4AriGvIcchrEBuAIChCSJFZHYAtyG6Ib8hAOD5IjgDbwB0AADg9SI4A+EB1gjEIcYhAKD3IgCg9iJpAHagDCLhAagJzyHRIQCg/iIAoP0igAFhb3IA2CHsIfEhcgCAoSYiYXN0AOAh5SHpIWwAbABlAOwAywhsAADg/SrlIADgAiI4A2wiaW50AACgFCrjoYAi9yEAAPohdQDlAJsJY+CvKjgDZaCAIvEAkwkAAkFhaXQHIgoiFyIeInIA8gBsIHIAcgAAoZshY3cRIhQiAOAzKTgDAOCdITgDZyRodGFycm93AACgmyFyAGkA5aDrIr4JgANjaGltcHF1AC8iPCJHIpwhTSJQIloigKGBImNlcgA2Iv0JOSJ1AOUABgoA4DXYw9zvIXJ0bQKdIQAAAABEImEAcgDhAOEhbQBloEEi8aBEIiYKYQDyAMsIcwB1AAABYnBWIlgi5QDUCeUA3wmAAWJjcABgInMieCKAoYQiRWVzAGci7glqIgDgxSo4A2UAdABl4IIi0iBxAPGgiCJoImMAZaCBIvEA/gmAoYUiRWVzAH8iFgqCIgDgxio4A2UAdABl4IMi0iBxAPGgiSKAIgACZ2lscpIilCKaIpwi7AAMCWwAZABlADuA8QDxQOcAWwlpI2FuZ2xlAAABbHKkIqoi5SFmdGWg6iLxAEUJaSJnaHQAZaDrIvEAvgltoL0DAKEjAGVzuCK8InIAbwAAoBYhcAAAoAcggARESGFkZ2lscnMAziLSItYi2iLeIugi7SICIw8j4SFzaACgrSLhIXJyAKAEKXAAAOBNItIg4SFzaACgrCIAAWV04iLlIgDgZSLSIADgPgDSIG4iZmluAACg3imAAUFldADzIvci+iJyAHIAAKACKQDgZCLSIHLgPADSIGkAZQAA4LQi0iAAAUF0BiMKI3IAcgAAoAMp8iFpZQDgtSLSIGkAbQAA4Dwi0iCAAUFhbgAaIx4jKiNyAHIAAKDWIXIAAAFociMjJiNrAACgIylvoJYh9wD/DuUhYXIAoCcpUxJqFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVCMAAF4jaSN/I4IjjSOeI8AUAAAAAKYjwCMAANoj3yMAAO8jHiQvJD8kRCQAAWNzVyNsFHUAdABlADuA8wDzQAABaXlhI2cjcgBjoJoiO4D0APRAPmSAAmFiaW9zAHEjdCN3I3EBeiNzAOgAdhTsIWFjUWF2AACgOCrvIWxkAKC8KewhaWdTYQABY3KFI4kjaQByAACgvykA4DXYLN1vA5QjAAAAAJYjAACcI24A22JhAHYAZQA7gPIA8kAAoMEpAAFibaEjjAphAHIAAKC1KQACYWNpdKwjryO6I70jcgDyAFkUAAFpcrMjtiNyAACgvinvIXNzAKC7KW4A5QDZCgCgwCmAAWFlaQDFI8gjyyNjAHIATWFnAGEAyWOAAWNkbgDRI9Qj1iPyIW9uv2MAoLYpdQDzAHgBcABmAADgNdhg3YABYWVsAOQj5yPrI3IAAKC3KXIAcAAAoLkpdQDzAHwBAKMoImFkaW9zdvkj/CMPJBMkFiQbJHIA8gBeFIChXSplZm0AAyQJJAwkcgBvoDQhZgAAoDQhO4CqAKpAO4C6ALpA5yFvZgCgtiJyAACgVipsIm9wZQAAoFcqAKBbKoABY2xvACMkJSQrJPIACCRhAHMAaAA7gPgA+EBsAACgmCJpAGwBMyQ4JGQAZQA7gPUA9UBlAHMAYaCXInMAAKA2Km0AbAA7gPYA9kDiIWFyAKA9I+EKXiQAAHokAAB8JJQkAACYJKkkAAAAALUkEQsAAPAkAAAAAAQleiUAAIMlcgCAoSUiYXN0AGUkbyQBCwCBtgA7bGokayS2QGwAZQDsABgDaQJ1JAAAAAB4JG0AAKDzKgCg/Sp5AD9kcgCAAmNpbXB0AIUkiCSLJJkSjyRuAHQAJWBvAGQALmBpAGwAAKAwIOUhbmsAoDEgcgAA4DXYLd2AAWltbwCdJKAkpCR2oMYD1WNtAGEA9AD+B24AZQAAoA4m9KHAA64kAAC0JGMjaGZvcmsAAKDUItZjAAFhdbgkxCRuAAABY2u9JMIkawBooA8hAKAOIfYAaRpzAACkKwBhYmNkZW1zdNMkIRPXJNsk4STjJOck6yTjIWlyAKAjKmkAcgAAoCIqAAFvdYsW3yQAoCUqAKByKm4AO4CxALFAaQBtAACgJip3AG8AAKAnKoABaXB1APUk+iT+JO4idGludACgFSpmAADgNdhh3W4AZAA7gKMAo0CApHoiRWFjZWlub3N1ABMlFSUYJRslTCVRJVklSSV1JQCgsypwAACgtyp1AOUAPwtjoK8qgKJ6ImFjZW5zACclLSU0JTYlSSVwAHAAcgBvAPgAFyV1AHIAbAB5AGUA8QA/C/EAOAuAAWFlcwA8JUElRSXwInByb3gAoLkqcQBxAACgtSppAG0AAKDoImkA7QBEC20AZQDzoDIgIguAAUVhcwBDJVclRSXwAEAlgAFkZnAATwtfJXElgAFhbHMAZSVpJW0l7CFhcgCgLiPpIW5lAKASI/UhcmYAoBMjdKAdIu8AWQvyIWVsAKCwIgABY2l9JYElcgAA4DXYxdzIY24iY3NwAACgCCAAA2Zpb3BzdZElKxuVJZolnyWkJXIAAOA12C7dcABmAADgNdhi3XIiaW1lAACgVyBjAHIAAOA12MbcgAFhZW8AqiW6JcAldAAAAWVpryW2JXIAbgBpAG8AbgDzABkFbgB0AACgFipzAHQAZaA/APEACRj0AG0LgApBQkhhYmNkZWZoaWxtbm9wcnN0dXgA4yXyJfYl+iVpJpAmpia9JtUm5ib4JlonaCdxJ3UnnietJ7EnyCfiJ+cngAFhcnQA6SXsJe4lcgDyAJkM8gD6AuEhaWwAoBwpYQByAPIA3BVhAHIAAKBkKYADY2RlbnFydAAGJhAmEyYYJiYmKyZaJgABZXUKJg0mAOA9IjEDdABlAFVhaQDjACAN7SJwdHl2AKCzKWcAgKHpJ2RlbAAgJiImJCYAoJIpAKClKeUA9wt1AG8AO4C7ALtAcgAApZIhYWJjZmhscHN0dz0mQCZFJkcmSiZMJk4mUSZVJlgmcAAAoHUpZqDlIXMAAKAgKQCgMylzAACgHinrALka8ACVHmwAAKBFKWkAbQAAoHQpbAAAoKMhAKCdIQABYWleJmImaQBsAACgGilvAG6gNiJhAGwA8wB2C4ABYWJyAG8mciZ2JnIA8gAvEnIAawAAoHMnAAFha3omgSZjAAABZWt/JoAmfWBdYAABZXOFJocmAKCMKWwAAAFkdYwmjiYAoI4pAKCQKQACYWV1eZcmmiajJqUm8iFvbllhAAFkaZ4moSZpAGwAV2HsAA8M4gCAJkBkAAJjbHFzrSawJrUmuiZhAACgNylkImhhcgAAoGkpdQBvAPKgHSCjAWgAAKCzIYABYWNnAMMm0iaUC2wAgKEcIWlwcwDLJs4migxuAOUAoAxhAHIA9ADaC3QAAKCtJYABaWxyANsm3ybjJvMhaHQAoH0pbwBvAPIANgwA4DXYL90AAWFv6ib1JnIAAAFkde8m8SYAoMEhbKDAIQCgbCl2oMED8WOAAWducwD+Jk4nUCdoAHQAAANhaGxyc3QKJxInISc1Jz0nRydyInJvdwB0oJIhYQDpAFYmYSNycG9vbgAAAWR1GiceJ28AdwDuAPAmcAAAoMAh5SFmdAABYWgnJy0ncgByAG8AdwDzAAkMYQByAHAAbwBvAG4A8wATBGklZ2h0YXJyb3dzAACgySFxAHUAaQBnAGEAcgByAG8A9wBZJugkcmVldGltZXMAoMwiZwDaYmkAbgBnAGQAbwB0AHMAZQDxABwYgAFhaG0AYCdjJ2YncgDyAAkMYQDyABMEAKAPIG8idXN0AGGgsSPjIWhlAKCxI+0haWQAoO4qAAJhYnB0fCeGJ4knmScAAW5ygCeDJ2cAAKDtJ3IAAKD+IXIA6wAcDIABYWZsAI8nkieVJ3IAAKCGKQDgNdhj3XUAcwAAoC4qaSJtZXMAAKA1KgABYXCiJ6gncgBnoCkAdAAAoJQp7yJsaW50AKASKmEAcgDyADwnAAJhY2hxuCe8J6EMwCfxIXVvAKA6IHIAAOA12MfcAAFidYAmxCdvAPKgGSCoAYABaGlyAM4n0ifWJ3IAZQDlAE0n7SFlcwCgyiJpAIChuSVlZmwAXAxjEt4n9CFyaQCgzinsInVoYXIAoGgpAKAeIWENBSgJKA0oSyhVKIYoAACLKLAoAAAAAOMo5ygAABApJCkxKW0pcSmHKaYpAACYKgAAAACxKmMidXRlAFthcQB1AO8ABR+ApHsiRWFjZWlucHN5ABwoHignKCooLygyKEEoRihJKACgtCrwASMoAAAlKACguCpvAG4AYWF1AOUAgw1koLAqaQBsAF9hcgBjAF1hgAFFYXMAOCg6KD0oAKC2KnAAAKC6KmkAbQAAoOki7yJsaW50AKATKmkA7QCIDUFkbwB0AGKixSKRFgAAAABTKACgZiqAA0FhY21zdHgAYChkKG8ocyh1KHkogihyAHIAAKDYIXIAAAFocmkoayjrAJAab6CYIfcAzAd0ADuApwCnQGkAO2D3IWFyAKApKW0AAAFpbn4ozQBuAHUA8wDOAHQAAKA2J3IA7+A12DDdIxkAAmFjb3mRKJUonSisKHIAcAAAoG8mAAFoeZkonChjAHkASWRIZHIAdABtAqUoAAAAAKgoaQDkAFsPYQByAGEA7ABsJDuArQCtQAABZ22zKLsobQBhAAChwwNmdroouijCY4CjPCJkZWdsbnByAMgozCjPKNMo1yjaKN4obwB0AACgairxoEMiCw5FoJ4qAKCgKkWgnSoAoJ8qZQAAoEYi7CF1cwCgJCrhIXJyAKByKWEAcgDyAPwMAAJhZWl07Sj8KAEpCCkAAWxz8Sj4KGwAcwBlAHQAbQDpAH8oaABwAACgMyrwImFyc2wAoOQpAAFkbFoPBSllAACgIyNloKoqc6CsKgDgrCoA/oABZmxwABUpGCkfKfQhY3lMZGKgLwBhoMQpcgAAoD8jZgAA4DXYZN1hAAABZHIoKRcDZQBzAHWgYCZpAHQAAKBgJoABY3N1ADYpRilhKQABYXU6KUApcABzoJMiAOCTIgD+cABzoJQiAOCUIgD+dQAAAWJwSylWKQChjyJlcz4NUCllAHQAZaCPIvEAPw0AoZAiZXNIDVspZQB0AGWgkCLxAEkNAKGhJWFmZilbBHIAZQFrKVwEAKChJWEAcgDyAAMNAAJjZW10dyl7KX8pgilyAADgNdjI3HQAbQDuAM4AaQDsAAYpYQByAOYAVw0AAWFyiimOKXIA5qAGJhESAAFhbpIpoylpImdodAAAAWVwmSmgKXAAcwBpAGwAbwDuANkXaADpAKAkcwCvYIACYmNtbnAArin8KY4NJSooKgCkgiJFZGVtbnByc7wpvinCKcgpzCnUKdgp3CkAoMUqbwB0AACgvSpkoIYibwB0AACgwyr1IWx0AKDBKgABRWXQKdIpAKDLKgCgiiLsIXVzAKC/KuEhcnIAoHkpgAFlaXUA4inxKfQpdAAAoYIiZW7oKewpcQDxoIYivSllAHEA8aCKItEpbQAAoMcqAAFicPgp+ikAoNUqAKDTKmMAgKJ7ImFjZW5zAAcqDSoUKhYqRihwAHAAcgBvAPgAIyh1AHIAbAB5AGUA8QCDDfEAfA2AAWFlcwAcKiIqPShwAHAAcgBvAPgAPChxAPEAOShnAACgaiYApoMiMTIzRWRlaGxtbnBzPCo/KkIqRSpHKlIqWCpjKmcqaypzKncqO4C5ALlAO4CyALJAO4CzALNAAKDGKgABb3NLKk4qdAAAoL4qdQBiAACg2CpkoIcibwB0AACgxCpzAAABb3VdKmAqbAAAoMknYgAAoNcq4SFycgCgeyn1IWx0AKDCKgABRWVvKnEqAKDMKgCgiyLsIXVzAKDAKoABZWl1AH0qjCqPKnQAAKGDImVugyqHKnEA8aCHIkYqZQBxAPGgiyJwKm0AAKDIKgABYnCTKpUqAKDUKgCg1iqAAUFhbgCdKqEqrCpyAHIAAKDZIXIAAAFocqYqqCrrAJUab6CZIfcAxQf3IWFyAKAqKWwAaQBnADuA3wDfQOELzyrZKtwq6SrsKvEqAAD1KjQrAAAAAAAAAAAAAEwrbCsAAHErvSsAAAAAAADRK3IC1CoAAAAA2CrnIWV0AKAWI8RjcgDrAOUKgAFhZXkA4SrkKucq8iFvbmVh5CFpbGNhQmRvAPQAIg5sInJlYwAAoBUjcgAA4DXYMd0AAmVpa2/7KhIrKCsuK/IBACsAAAkrZQAAATRm6g0EK28AcgDlAOsNYQBzorgDECsAAAAAEit5AG0A0WMAAWNuFislK2sAAAFhcxsrIStwAHAAcgBvAPgAFw5pAG0AAKA8InMA8AD9DQABYXMsKyEr8AAXDnIAbgA7gP4A/kDsATgrOyswG2QA5QBnAmUAcwCAgdcAO2JkAEMrRCtJK9dAYaCgInIAAKAxKgCgMCqAAWVwcwBRK1MraSvhAAkh4qKkIlsrXysAAAAAYytvAHQAAKA2I2kAcgAAoPEqb+A12GXdcgBrAACg2irhAHgociJpbWUAAKA0IIABYWlwAHYreSu3K2QA5QC+DYADYWRlbXBzdACFK6MrmiunK6wrsCuzK24iZ2xlAACitSVkbHFykCuUK5ornCvvIXduAKC/JeUhZnRloMMl8QACBwCgXCJpImdodABloLkl8QBdDG8AdAAAoOwlaSJudXMAAKA6KuwhdXMAoDkqYgAAoM0p6SFtZQCgOyrlInppdW0AoOIjgAFjaHQAwivKK80rAAFyecYrySsA4DXYydxGZGMAeQBbZPIhb2tnYQABaW/UK9creAD0ANERaCJlYWQAAAFsct4r5ytlAGYAdABhAHIAcgBvAPcAXQbpJGdodGFycm93AKCgIQAJQUhhYmNkZmdobG1vcHJzdHV3CiwNLBEsHSwnLDEsQCxLLFIsYix6LIQsjyzLLOgs7Sz/LAotcgDyAAkDYQByAACgYykAAWNyFSwbLHUAdABlADuA+gD6QPIACQ1yAOMBIywAACUseQBeZHYAZQBtYQABaXkrLDAscgBjADuA+wD7QENkgAFhYmgANyw6LD0scgDyANEO7CFhY3FhYQDyAOAOAAFpckQsSCzzIWh0AKB+KQDgNdgy3XIAYQB2AGUAO4D5APlAYQFWLF8scgAAAWxyWixcLACgvyEAoL4hbABrAACggCUAAWN0Zix2LG8CbCwAAAAAcyxyAG4AZaAcI3IAAKAcI28AcAAAoA8jcgBpAACg+CUAAWFsfiyBLGMAcgBrYTuAqACoQAABZ3CILIssbwBuAHNhZgAA4DXYZt0AA2FkaGxzdZksniynLLgsuyzFLHIAcgBvAPcACQ1vAHcAbgBhAHIAcgBvAPcA2A5hI3Jwb29uAAABbHKvLLMsZQBmAPQAWyxpAGcAaAD0AF0sdQDzAKYOaQAAocUDaGzBLMIs0mNvAG4AxWPwI2Fycm93cwCgyCGAAWNpdADRLOEs5CxvAtcsAAAAAN4scgBuAGWgHSNyAACgHSNvAHAAAKAOI24AZwBvYXIAaQAAoPklYwByAADgNdjK3IABZGlyAPMs9yz6LG8AdAAAoPAi7CFkZWlhaQBmoLUlAKC0JQABYW0DLQYtcgDyAMosbAA7gPwA/EDhIm5nbGUAoKcpgAdBQkRhY2RlZmxub3Byc3oAJy0qLTAtNC2bLZ0toS2/LcMtxy3TLdgt3C3gLfwtcgDyABADYQByAHag6CoAoOkqYQBzAOgA/gIAAW5yOC08LechcnQAoJwpgANla25wcnN0AJkpSC1NLVQtXi1iLYItYQBwAHAA4QAaHG8AdABoAGkAbgDnAKEXgAFoaXIAoSmzJFotbwBwAPQAdCVooJUh7wD4JgABaXVmLWotZwBtAOEAuygAAWJwbi14LXMjZXRuZXEAceCKIgD+AODLKgD+cyNldG5lcQBx4IsiAP4A4MwqAP4AAWhyhi2KLWUAdADhABIraSNhbmdsZQAAAWxyki2WLeUhZnQAoLIiaSJnaHQAAKCzInkAMmThIXNoAKCiIoABZWxyAKcttC24LWKiKCKuLQAAAACyLWEAcgAAoLsicQAAoFoi7CFpcACg7iIAAWJ0vC1eD2EA8gBfD3IAAOA12DPddAByAOkAlS1zAHUAAAFicM0t0C0A4IIi0iAA4IMi0iBwAGYAAOA12GfdcgBvAPAAWQt0AHIA6QCaLQABY3XkLegtcgAA4DXYy9wAAWJw7C30LW4AAAFFZXUt8S0A4IoiAP5uAAABRWV/LfktAOCLIgD+6SJnemFnAKCaKYADY2Vmb3BycwANLhAuJS4pLiMuLi40LukhcmN1YQABZGkULiEuAAFiZxguHC5hAHIAAKBfKmUAcaAnIgCgWSLlIXJwAKAYIXIAAOA12DTdcABmAADgNdho3WWgQCJhAHQA6ABqD2MAcgAA4DXYzNzjCuQRUC4AAFQuAABYLmIuAAAAAGMubS5wLnQuAAAAAIguki4AAJouJxIqEnQAcgDpAB0ScgAA4DXYNd0AAUFhWy5eLnIA8gDnAnIA8gCTB75jAAFBYWYuaS5yAPIA4AJyAPIAjAdhAPAAeh5pAHMAAKD7IoABZHB0APgReS6DLgABZmx9LoAuAOA12GnddQDzAP8RaQBtAOUABBIAAUFhiy6OLnIA8gDuAnIA8gCaBwABY3GVLgoScgAA4DXYzdwAAXB0nS6hLmwAdQDzACUScgDpACASAARhY2VmaW9zdbEuvC7ELsguzC7PLtQu2S5jAAABdXm2LrsudABlADuA/QD9QE9kAAFpecAuwy5yAGMAd2FLZG4AO4ClAKVAcgAA4DXYNt1jAHkAV2RwAGYAAOA12GrdYwByAADgNdjO3AABY23dLt8ueQBOZGwAO4D/AP9AAAVhY2RlZmhpb3N38y73Lv8uAi8MLxAvEy8YLx0vIi9jInV0ZQB6YQABYXn7Lv4u8iFvbn5hN2RvAHQAfGEAAWV0Bi8KL3QAcgDmAB8QYQC2Y3IAAOA12DfdYwB5ADZk5yJyYXJyAKDdIXAAZgAA4DXYa91jAHIAAOA12M/cAAFqbiYvKC8AoA0gagAAoAwg"),Bi}var Li={},Ep;function yp(){if(Ep)return Li;Ep=1,Object.defineProperty(Li,"__esModule",{value:!0}),Li.xmlDecodeTree=void 0;const e=vb();return Li.xmlDecodeTree=(0,e.decodeBase64)("AAJhZ2xxBwARABMAFQBtAg0AAAAAAA8AcAAmYG8AcwAnYHQAPmB0ADxg9SFvdCJg"),Li}var vi={},Tp;function MO(){if(Tp)return vi;Tp=1,Object.defineProperty(vi,"__esModule",{value:!0}),vi.BinTrieFlags=void 0;var e;return(function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.FLAG13=8192]="FLAG13",t[t.BRANCH_LENGTH=8064]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"})(e||(vi.BinTrieFlags=e={})),vi}var Cp;function xp(){return Cp||(Cp=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.xmlDecodeTree=e.htmlDecodeTree=e.replaceCodePoint=e.fromCodePoint=e.decodeCodePoint=e.EntityDecoder=e.DecodingMode=void 0,e.determineBranch=b,e.decodeHTML=O,e.decodeHTMLAttribute=w,e.decodeHTMLStrict=L,e.decodeXML=_;const t=mp(),n=bp(),r=yp(),i=MO();var u;(function(M){M[M.NUM=35]="NUM",M[M.SEMI=59]="SEMI",M[M.EQUALS=61]="EQUALS",M[M.ZERO=48]="ZERO",M[M.NINE=57]="NINE",M[M.LOWER_A=97]="LOWER_A",M[M.LOWER_F=102]="LOWER_F",M[M.LOWER_X=120]="LOWER_X",M[M.LOWER_Z=122]="LOWER_Z",M[M.UPPER_A=65]="UPPER_A",M[M.UPPER_F=70]="UPPER_F",M[M.UPPER_Z=90]="UPPER_Z"})(u||(u={}));const s=32;function a(M){return M>=u.ZERO&&M<=u.NINE}function o(M){return M>=u.UPPER_A&&M<=u.UPPER_F||M>=u.LOWER_A&&M<=u.LOWER_F}function l(M){return M>=u.UPPER_A&&M<=u.UPPER_Z||M>=u.LOWER_A&&M<=u.LOWER_Z||a(M)}function c(M){return M===u.EQUALS||l(M)}var d;(function(M){M[M.EntityStart=0]="EntityStart",M[M.NumericStart=1]="NumericStart",M[M.NumericDecimal=2]="NumericDecimal",M[M.NumericHex=3]="NumericHex",M[M.NamedEntity=4]="NamedEntity"})(d||(d={}));var f;(function(M){M[M.Legacy=0]="Legacy",M[M.Strict=1]="Strict",M[M.Attribute=2]="Attribute"})(f||(e.DecodingMode=f={}));class h{constructor(S,V,Y){this.decodeTree=S,this.emitCodePoint=V,this.errors=Y,this.state=d.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=f.Strict,this.runConsumed=0}startEntity(S){this.decodeMode=S,this.state=d.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1,this.runConsumed=0}write(S,V){switch(this.state){case d.EntityStart:return S.charCodeAt(V)===u.NUM?(this.state=d.NumericStart,this.consumed+=1,this.stateNumericStart(S,V+1)):(this.state=d.NamedEntity,this.stateNamedEntity(S,V));case d.NumericStart:return this.stateNumericStart(S,V);case d.NumericDecimal:return this.stateNumericDecimal(S,V);case d.NumericHex:return this.stateNumericHex(S,V);case d.NamedEntity:return this.stateNamedEntity(S,V)}}stateNumericStart(S,V){return V>=S.length?-1:(S.charCodeAt(V)|s)===u.LOWER_X?(this.state=d.NumericHex,this.consumed+=1,this.stateNumericHex(S,V+1)):(this.state=d.NumericDecimal,this.stateNumericDecimal(S,V))}stateNumericHex(S,V){for(;V<S.length;){const Y=S.charCodeAt(V);if(a(Y)||o(Y)){const U=Y<=u.NINE?Y-u.ZERO:(Y|s)-u.LOWER_A+10;this.result=this.result*16+U,this.consumed++,V++}else return this.emitNumericEntity(Y,3)}return-1}stateNumericDecimal(S,V){for(;V<S.length;){const Y=S.charCodeAt(V);if(a(Y))this.result=this.result*10+(Y-u.ZERO),this.consumed++,V++;else return this.emitNumericEntity(Y,2)}return-1}emitNumericEntity(S,V){var Y;if(this.consumed<=V)return(Y=this.errors)===null||Y===void 0||Y.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(S===u.SEMI)this.consumed+=1;else if(this.decodeMode===f.Strict)return 0;return this.emitCodePoint((0,t.replaceCodePoint)(this.result),this.consumed),this.errors&&(S!==u.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(S,V){const{decodeTree:Y}=this;let U=Y[this.treeIndex],j=(U&i.BinTrieFlags.VALUE_LENGTH)>>14;for(;V<S.length;){if(j===0&&(U&i.BinTrieFlags.FLAG13)!==0){const se=(U&i.BinTrieFlags.BRANCH_LENGTH)>>7;if(this.runConsumed===0){const z=U&i.BinTrieFlags.JUMP_TABLE;if(S.charCodeAt(V)!==z)return this.result===0?0:this.emitNotTerminatedNamedEntity();V++,this.excess++,this.runConsumed++}for(;this.runConsumed<se;){if(V>=S.length)return-1;const z=this.runConsumed-1,te=Y[this.treeIndex+1+(z>>1)],we=z%2===0?te&255:te>>8&255;if(S.charCodeAt(V)!==we)return this.runConsumed=0,this.result===0?0:this.emitNotTerminatedNamedEntity();V++,this.excess++,this.runConsumed++}this.runConsumed=0,this.treeIndex+=1+(se>>1),U=Y[this.treeIndex],j=(U&i.BinTrieFlags.VALUE_LENGTH)>>14}if(V>=S.length)break;const ee=S.charCodeAt(V);if(ee===u.SEMI&&j!==0&&(U&i.BinTrieFlags.FLAG13)!==0)return this.emitNamedEntityData(this.treeIndex,j,this.consumed+this.excess);if(this.treeIndex=b(Y,U,this.treeIndex+Math.max(1,j),ee),this.treeIndex<0)return this.result===0||this.decodeMode===f.Attribute&&(j===0||c(ee))?0:this.emitNotTerminatedNamedEntity();if(U=Y[this.treeIndex],j=(U&i.BinTrieFlags.VALUE_LENGTH)>>14,j!==0){if(ee===u.SEMI)return this.emitNamedEntityData(this.treeIndex,j,this.consumed+this.excess);this.decodeMode!==f.Strict&&(U&i.BinTrieFlags.FLAG13)===0&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}V++,this.excess++}return-1}emitNotTerminatedNamedEntity(){var S;const{result:V,decodeTree:Y}=this,U=(Y[V]&i.BinTrieFlags.VALUE_LENGTH)>>14;return this.emitNamedEntityData(V,U,this.consumed),(S=this.errors)===null||S===void 0||S.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(S,V,Y){const{decodeTree:U}=this;return this.emitCodePoint(V===1?U[S]&~(i.BinTrieFlags.VALUE_LENGTH|i.BinTrieFlags.FLAG13):U[S+1],Y),V===3&&this.emitCodePoint(U[S+2],Y),Y}end(){var S;switch(this.state){case d.NamedEntity:return this.result!==0&&(this.decodeMode!==f.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case d.NumericDecimal:return this.emitNumericEntity(0,2);case d.NumericHex:return this.emitNumericEntity(0,3);case d.NumericStart:return(S=this.errors)===null||S===void 0||S.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case d.EntityStart:return 0}}}e.EntityDecoder=h;function m(M){let S="";const V=new h(M,Y=>S+=(0,t.fromCodePoint)(Y));return function(U,j){let ee=0,se=0;for(;(se=U.indexOf("&",se))>=0;){S+=U.slice(ee,se),V.startEntity(j);const te=V.write(U,se+1);if(te<0){ee=se+V.end();break}ee=se+te,se=te===0?ee+1:ee}const z=S+U.slice(ee);return S="",z}}function b(M,S,V,Y){const U=(S&i.BinTrieFlags.BRANCH_LENGTH)>>7,j=S&i.BinTrieFlags.JUMP_TABLE;if(U===0)return j!==0&&Y===j?V:-1;if(j){const te=Y-j;return te<0||te>=U?-1:M[V+te]-1}const ee=U+1>>1;let se=0,z=U-1;for(;se<=z;){const te=se+z>>>1,we=te>>1,fe=M[V+we]>>(te&1)*8&255;if(fe<Y)se=te+1;else if(fe>Y)z=te-1;else return M[V+ee+te]}return-1}const T=m(n.htmlDecodeTree),E=m(r.xmlDecodeTree);function O(M,S=f.Legacy){return T(M,S)}function w(M){return T(M,f.Attribute)}function L(M){return T(M,f.Strict)}function _(M){return E(M,f.Strict)}var I=mp();Object.defineProperty(e,"decodeCodePoint",{enumerable:!0,get:function(){return I.decodeCodePoint}}),Object.defineProperty(e,"fromCodePoint",{enumerable:!0,get:function(){return I.fromCodePoint}}),Object.defineProperty(e,"replaceCodePoint",{enumerable:!0,get:function(){return I.replaceCodePoint}});var B=bp();Object.defineProperty(e,"htmlDecodeTree",{enumerable:!0,get:function(){return B.htmlDecodeTree}});var G=yp();Object.defineProperty(e,"xmlDecodeTree",{enumerable:!0,get:function(){return G.xmlDecodeTree}})})(hl)),hl}var Fi={},ml={},kp;function yc(){return kp||(kp=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.escapeText=e.escapeAttribute=e.escapeUTF8=e.escape=e.XML_BITSET_VALUE=e.getCodePoint=void 0,e.encodeXML=n;const t=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);e.getCodePoint=String.prototype.codePointAt==null?(i,u)=>(i.charCodeAt(u)&64512)===55296?(i.charCodeAt(u)-55296)*1024+i.charCodeAt(u+1)-56320+65536:i.charCodeAt(u):(i,u)=>i.codePointAt(u),e.XML_BITSET_VALUE=1342177476;function n(i){let u,s=0;const{length:a}=i;for(let o=0;o<a;o++){const l=i.charCodeAt(o);if(l<128&&((e.XML_BITSET_VALUE>>>l&1)===0||l>=64||l<32))continue;if(u===void 0?u=i.substring(0,o):s!==o&&(u+=i.substring(s,o)),l<64){u+=t.get(l),s=o+1;continue}const c=(0,e.getCodePoint)(i,o);u+=`&#x${c.toString(16)};`,c!==l&&o++,s=o+1}return u===void 0?i:(s<a&&(u+=i.substr(s)),u)}e.escape=n;function r(i,u){return function(a){let o,l=0,c="";for(;o=i.exec(a);)l!==o.index&&(c+=a.substring(l,o.index)),c+=u.get(o[0].charCodeAt(0)),l=o.index+1;return c+a.substring(l)}}e.escapeUTF8=r(/["&'<>]/g,t),e.escapeAttribute=r(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),e.escapeText=r(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))})(ml)),ml}var Pi={},bs={},Sp;function BO(){if(Sp)return bs;Sp=1,Object.defineProperty(bs,"__esModule",{value:!0}),bs.parseEncodeTrie=e;function e(t){const n=new Map,r=t.length;let i=0,u=-1;function s(){const o=i;for(;i<r;){const l=t.charAt(i);if((l<"0"||l>"9")&&(l<"a"||l>"z"))break;i++}return i===o?0:Number.parseInt(t.slice(o,i),36)}function a(){if(t[i]!=="&")throw new Error(`Child entry missing value near index ${i}`);const o=i,l=t.indexOf(";",i+1);if(l===-1)throw new Error(`Unterminated entity starting at index ${o}`);return i=l+1,t.slice(o,i)}for(;i<r;){const o=s(),l=u===-1?o:u+o+1;let c;if(t[i]==="&"&&(c=a()),t[i]==="{"){i++;let d=s(),f=d;const h=a();if(t[i]==="{")throw new Error("Unexpected nested '{' beyond depth 2");if(t[i]==="}")n.set(l,{value:c,next:f,nextValue:h}),i++;else{const m=new Map;m.set(f,h);let b=f;for(;i<r&&t[i]!=="}";){d=s(),f=b+d+1;const T=a();if(t[i]==="{")throw new Error("Unexpected nested '{' beyond depth 2");m.set(f,T),b=f}if(t[i]!=="}")throw new Error("Unterminated child block");i++,n.set(l,{value:c,next:m})}}else{if(c===void 0)throw new Error(`Malformed encode trie: missing value at index ${i}`);n.set(l,c)}u=l}return n}return bs}var Ip;function LO(){if(Ip)return Pi;Ip=1,Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.htmlTrie=void 0;const e=BO();return Pi.htmlTrie=(0,e.parseEncodeTrie)("9	
m!"#$%&'()*+,1./a:;<{6he<⃒}={6hx=⃥}>{6he>⃒}?@q[\]^_`5{2yfj}k{|}y ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒē2ĖėĘęĚěĜĝĞğĠġĢ1ĤĥĦħĨĩĪī2ĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌō2ŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžjƒyƵ1rǵ1tȷ3yˆˇg˘˙˚˛˜˝1f̑3jΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ1ΣΤΥΦΧΨΩ7αβγδεζηθικλμνξοπρςστυφχψω7ϑϒ2ϕϖ5Ϝϝiϰϱ3ϵ϶aЁЂЃЄЅІЇЈЉЊЋЌ1ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя1ёђѓєѕіїјљњћќ1ўџ5gi    1    ​‌‍‎‏‐2–—―‖1‘’‚1“”„1†‡•2‥…9‰‱′″‴‵3‹›3‾2⁁1⁃⁄a⁏7⁗7 {6bu  }⁠⁡⁢⁣20€1a⃛⃜11ℂ2℅4ℊℋℌℍℎℏℐℑℒℓ1ℕ№℗℘ℙℚℛℜℝ℞3™1ℤ2℧ℨ℩2ℬℭ1ℯℰℱ1ℳℴℵℶℷℸcⅅⅆⅇⅈa⅓⅔⅕⅖⅗⅘⅙⅚⅛⅜⅝⅞1d←↑→↓↔↕↖↗↘↙↚↛1↝{mw↝̸}↞↟↠↡↢↣↤↥↦↧1↩↪↫↬↭↮1↰↱↲↳1↵↶↷2↺↻↼↽↾↿⇀⇁⇂⇃⇄⇅⇆⇇⇈⇉⇊⇋⇌⇍⇎⇏⇐⇑⇒⇓⇔⇕⇖⇗⇘⇙⇚⇛1⇝6⇤⇥f⇵7⇽⇾⇿∀∁∂{mw∂̸}∃∄∅1∇∈∉1∋∌2∏∐∑−∓∔1∖∗∘1√2∝∞∟∠{6he∠⃒}∡∢∣∤∥∦∧∨∩{1e68∩︀}∪{1e68∪︀}∫∬∭∮∯∰∱∲∳∴∵∶∷∸1∺∻∼{6he∼⃒}∽{mp∽̱}∾{mr∾̳}∿≀≁≂{mw≂̸}≃≄≅≆≇≈≉≊≋{mw≋̸}≌≍{6he≍⃒}≎{mw≎̸}≏{mw≏̸}≐{mw≐̸}≑≒≓≔≕≖≗1≙≚1≜2≟≠≡{6hx≡⃥}≢1≤{6he≤⃒}≥{6he≥⃒}≦{mw≦̸}≧{mw≧̸}≨{1e68≨︀}≩{1e68≩︀}≪{mw≪̸5uh≪⃒}≫{mw≫̸5uh≫⃒}≬≭≮≯≰≱≲≳≴≵≶≷≸≹≺≻≼≽≾≿{mw≿̸}⊀⊁⊂{6he⊂⃒}⊃{6he⊃⃒}⊄⊅⊆⊇⊈⊉⊊{1e68⊊︀}⊋{1e68⊋︀}1⊍⊎⊏{mw⊏̸}⊐{mw⊐̸}⊑⊒⊓{1e68⊓︀}⊔{1e68⊔︀}⊕⊖⊗⊘⊙⊚⊛1⊝⊞⊟⊠⊡⊢⊣⊤⊥1⊧⊨⊩⊪⊫⊬⊭⊮⊯⊰1⊲⊳⊴{6he⊴⃒}⊵{6he⊵⃒}⊶⊷⊸⊹⊺⊻1⊽⊾⊿⋀⋁⋂⋃⋄⋅⋆⋇⋈⋉⋊⋋⋌⋍⋎⋏⋐⋑⋒⋓⋔⋕⋖⋗⋘{mw⋘̸}⋙{mw⋙̸}⋚{1e68⋚︀}⋛{1e68⋛︀}2⋞⋟⋠⋡⋢⋣2⋦⋧⋨⋩⋪⋫⋬⋭⋮⋯⋰⋱⋲⋳⋴⋵{mw⋵̸}⋶⋷1⋹{mw⋹̸}⋺⋻⋼⋽⋾6⌅⌆1⌈⌉⌊⌋⌌⌍⌎⌏⌐1⌒⌓1⌕⌖5⌜⌝⌞⌟2⌢⌣9⌭⌮7⌶6⌽1⌿1o⍼1f⎰⎱2⎴⎵⎶11⏜⏝⏞⏟2⏢4⏧1n␣4kⓈ1j─1│9┌3┐3└3┘3├7┤7┬7┴7┼j═║╒╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡╢╣╤╥╦╧╨╩╪╫╬j▀3▄3█8░▒▓d□8▪▫1▭▮2▱1△▴▵2▸▹3▽▾▿2◂◃6◊○w◬2◯8◸◹◺◻◼8★☆7☎1d♀1♂t♠2♣1♥♦3♪2♭♮♯4j✓3✗8✠l✶x❘p❲❳2c⟈⟉s⟦⟧⟨⟩⟪⟫⟬⟭7⟵⟶⟷⟸⟹⟺1⟼2⟿76⤂⤃⤄⤅6⤌⤍⤎⤏⤐⤑⤒⤓2⤖2⤙⤚⤛⤜⤝⤞⤟⤠2⤣⤤⤥⤦⤧⤨⤩⤪8⤳{mw⤳̸}1⤵⤶⤷⤸⤹2⤼⤽7⥅2⥈⥉⥊⥋2⥎⥏⥐⥑⥒⥓⥔⥕⥖⥗⥘⥙⥚⥛⥜⥝⥞⥟⥠⥡⥢⥣⥤⥥⥦⥧⥨⥩⥪⥫⥬⥭⥮⥯⥰⥱⥲⥳⥴⥵⥶1⥸⥹1⥻⥼⥽⥾⥿5⦅⦆4⦋⦌⦍⦎⦏⦐⦑⦒⦓⦔⦕⦖3⦚1⦜⦝6⦤⦥⦦⦧⦨⦩⦪⦫⦬⦭⦮⦯⦰⦱⦲⦳⦴⦵⦶⦷1⦹1⦻⦼1⦾⦿⧀⧁⧂⧃⧄⧅3⧉3⧍⧎⧏{mw⧏̸}⧐{mw⧐̸}b⧜⧝⧞4⧣⧤⧥5⧫8⧴1⧶9⨀⨁⨂1⨄1⨆5⨌⨍2⨐⨑⨒⨓⨔⨕⨖⨗a⨢⨣⨤⨥⨦⨧1⨩⨪2⨭⨮⨯⨰⨱1⨳⨴⨵⨶⨷⨸⨹⨺⨻⨼2⨿⩀1⩂⩃⩄⩅⩆⩇⩈⩉⩊⩋⩌⩍2⩐2⩓⩔⩕⩖⩗⩘1⩚⩛⩜⩝1⩟6⩦3⩪2⩭{mw⩭̸}⩮⩯⩰{mw⩰̸}⩱⩲⩳⩴⩵1⩷⩸⩹⩺⩻⩼⩽{mw⩽̸}⩾{mw⩾̸}⩿⪀⪁⪂⪃⪄⪅⪆⪇⪈⪉⪊⪋⪌⪍⪎⪏⪐⪑⪒⪓⪔⪕⪖⪗⪘⪙⪚2⪝⪞⪟⪠⪡{mw⪡̸}⪢{mw⪢̸}1⪤⪥⪦⪧⪨⪩⪪⪫⪬{1e68⪬︀}⪭{1e68⪭︀}⪮⪯{mw⪯̸}⪰{mw⪰̸}2⪳⪴⪵⪶⪷⪸⪹⪺⪻⪼⪽⪾⪿⫀⫁⫂⫃⫄⫅{mw⫅̸}⫆{mw⫆̸}⫇⫈2⫋{1e68⫋︀}⫌{1e68⫌︀}2⫏⫐⫑⫒⫓⫔⫕⫖⫗⫘⫙⫚⫛8⫤1⫦⫧⫨⫩1⫫⫬⫭⫮⫯⫰⫱⫲⫳9⫽{6hx⫽⃥}y7r{17ks𝒜1𝒞𝒟2𝒢2𝒥𝒦2𝒩𝒪𝒫𝒬1𝒮𝒯𝒰𝒱𝒲𝒳𝒴𝒵𝒶𝒷𝒸𝒹1𝒻1𝒽𝒾𝒿𝓀𝓁𝓂𝓃1𝓅𝓆𝓇𝓈𝓉𝓊𝓋𝓌𝓍𝓎𝓏1g𝔄𝔅1𝔇𝔈𝔉𝔊2𝔍𝔎𝔏𝔐𝔑𝔒𝔓𝔔1𝔖𝔗𝔘𝔙𝔚𝔛𝔜1𝔞𝔟𝔠𝔡𝔢𝔣𝔤𝔥𝔦𝔧𝔨𝔩𝔪𝔫𝔬𝔭𝔮𝔯𝔰𝔱𝔲𝔳𝔴𝔵𝔶𝔷𝔸𝔹1𝔻𝔼𝔽𝔾1𝕀𝕁𝕂𝕃𝕄1𝕆3𝕊𝕋𝕌𝕍𝕎𝕏𝕐1𝕒𝕓𝕔𝕕𝕖𝕗𝕘𝕙𝕚𝕛𝕜𝕝𝕞𝕟𝕠𝕡𝕢𝕣𝕤𝕥𝕦𝕧𝕨𝕩𝕪𝕫}6vefffiflffiffl"),Pi}var wp;function Np(){if(wp)return Fi;wp=1,Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.encodeHTML=i,Fi.encodeNonAsciiHTML=u;const e=yc(),t=LO(),n=new Uint32Array([5632,4227923966,4160749569,939524097]),r=new Uint32Array([0,e.XML_BITSET_VALUE,0,0]);function i(a){return s(n,a)}function u(a){return s(r,a)}function s(a,o){let l,c=0;const{length:d}=o;for(let f=0;f<d;f++){const h=o.charCodeAt(f);if(h<128&&!(a[h>>>5]>>>h&1))continue;l===void 0?l=o.substring(0,f):c!==f&&(l+=o.substring(c,f));let m=t.htmlTrie.get(h);if(typeof m=="object"){if(f+1<d){const b=o.charCodeAt(f+1),T=typeof m.next=="number"?m.next===b?m.nextValue:void 0:m.next.get(b);if(T!==void 0){l+=T,f++,c=f+1;continue}}m=m.value}if(m===void 0){const b=(0,e.getCodePoint)(o,f);l+=`&#x${b.toString(16)};`,b!==h&&f++,c=f+1}else l+=m,c=f+1}return l===void 0?o:(c<d&&(l+=o.substr(c)),l)}return Fi}var Dp;function vO(){return Dp||(Dp=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.escapeUTF8=e.escapeText=e.escapeAttribute=e.encodeXML=e.encodeNonAsciiHTML=e.encodeHTML5=e.encodeHTML4=e.encodeHTML=e.EntityDecoder=e.decodeXMLStrict=e.decodeXML=e.decodeHTML5Strict=e.decodeHTML4Strict=e.decodeHTMLStrict=e.decodeHTMLAttribute=e.decodeHTML5=e.decodeHTML4=e.decodeHTML=e.DecodingMode=e.EncodingMode=e.EntityLevel=void 0,e.decode=s,e.decodeStrict=a,e.encode=o;const t=xp(),n=Np(),r=yc();var i;(function(f){f[f.XML=0]="XML",f[f.HTML=1]="HTML"})(i||(e.EntityLevel=i={}));var u;(function(f){f[f.UTF8=0]="UTF8",f[f.ASCII=1]="ASCII",f[f.Extensive=2]="Extensive",f[f.Attribute=3]="Attribute",f[f.Text=4]="Text"})(u||(e.EncodingMode=u={}));function s(f,h=i.XML){if((typeof h=="number"?h:h.level)===i.HTML){const b=typeof h=="object"?h.mode:void 0;return(0,t.decodeHTML)(f,b)}return(0,t.decodeXML)(f)}function a(f,h=i.XML){var m;const b=typeof h=="number"?{level:h}:h;return(m=b.mode)!==null&&m!==void 0||(b.mode=t.DecodingMode.Strict),s(f,b)}function o(f,h=i.XML){const{mode:m=u.Extensive,level:b=i.XML}=typeof h=="number"?{level:h}:h;switch(m){case u.UTF8:return(0,r.escapeUTF8)(f);case u.Attribute:return(0,r.escapeAttribute)(f);case u.Text:return(0,r.escapeText)(f);case u.ASCII:return b===i.HTML?(0,n.encodeNonAsciiHTML)(f):(0,r.encodeXML)(f);case u.Extensive:default:return b===i.HTML?(0,n.encodeHTML)(f):(0,r.encodeXML)(f)}}var l=xp();Object.defineProperty(e,"DecodingMode",{enumerable:!0,get:function(){return l.DecodingMode}}),Object.defineProperty(e,"decodeHTML",{enumerable:!0,get:function(){return l.decodeHTML}}),Object.defineProperty(e,"decodeHTML4",{enumerable:!0,get:function(){return l.decodeHTML}}),Object.defineProperty(e,"decodeHTML5",{enumerable:!0,get:function(){return l.decodeHTML}}),Object.defineProperty(e,"decodeHTMLAttribute",{enumerable:!0,get:function(){return l.decodeHTMLAttribute}}),Object.defineProperty(e,"decodeHTMLStrict",{enumerable:!0,get:function(){return l.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML4Strict",{enumerable:!0,get:function(){return l.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML5Strict",{enumerable:!0,get:function(){return l.decodeHTMLStrict}}),Object.defineProperty(e,"decodeXML",{enumerable:!0,get:function(){return l.decodeXML}}),Object.defineProperty(e,"decodeXMLStrict",{enumerable:!0,get:function(){return l.decodeXML}}),Object.defineProperty(e,"EntityDecoder",{enumerable:!0,get:function(){return l.EntityDecoder}});var c=Np();Object.defineProperty(e,"encodeHTML",{enumerable:!0,get:function(){return c.encodeHTML}}),Object.defineProperty(e,"encodeHTML4",{enumerable:!0,get:function(){return c.encodeHTML}}),Object.defineProperty(e,"encodeHTML5",{enumerable:!0,get:function(){return c.encodeHTML}}),Object.defineProperty(e,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return c.encodeNonAsciiHTML}});var d=yc();Object.defineProperty(e,"encodeXML",{enumerable:!0,get:function(){return d.encodeXML}}),Object.defineProperty(e,"escape",{enumerable:!0,get:function(){return d.escape}}),Object.defineProperty(e,"escapeAttribute",{enumerable:!0,get:function(){return d.escapeAttribute}}),Object.defineProperty(e,"escapeText",{enumerable:!0,get:function(){return d.escapeText}}),Object.defineProperty(e,"escapeUTF8",{enumerable:!0,get:function(){return d.escapeUTF8}})})(fl)),fl}var Es={},_p;function FO(){return _p||(_p=1,Es.romanize=function(e){if(isNaN(e))return NaN;for(var t=String(+e).split(""),n=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"],r="",i=3;i--;)r=(n[+t.pop()+i*10]||"")+r;return Array(+t.join("")+1).join("M")+r},Es.alphanumeric=function(e){for(var t="",n;e>0;)n=(e-1)%26,t=String.fromCharCode(65+n)+t,e=(e-n)/26|0;return t||void 0}),Es}var Al,Op;function PO(){if(Op)return Al;Op=1;const e=r=>{let i="";do i=(Math.random()+1).toString(36).substring(2);while(r.indexOf(i)!==-1);return i},t=(r,i)=>{let u=/([a-z\-]+)\s*\(\s*([^\(\)]*?)\s*(?:,\s*([^\(\)]*?)\s*)?\s*\)/i,s=[],a,o=e(i);for(;(a=u.exec(i))!==null;){let c=`${s.length}`;if(a[1].toLowerCase()=="var"){const f=n(r,a[2]);if(f){i=i.replace(a[0],f);continue}if(a[3]){i=i.replace(a[0],a[3]);continue}}let d=`${o}${c.padStart(5,"-")}`;i=i.replace(a[0],d),s.push({placeholder:d,replace:a[0]})}for(var l=s.length-1;l>=0;l--){const c=s[l];i=i.replace(c.placeholder,c.replace)}return i},n=(r,i)=>{for(;r;){if(r.styleProps&&i in r.styleProps)return r.styleProps[i].value;var r=r.pseudoElementParent||r.parent}};return Al={replaceVariables:t,findVariableValue:n},Al}var gl,Rp;function HO(){if(Rp)return gl;Rp=1;var{decode:e}=vO(),t=Nf(),n=FO(),r=PO();return gl=function(u){u.ignoredPseudos=["hover","active","focus","visited","link"],u.widthElements=["TABLE","TD","TH","IMG"],u.heightElements=["TABLE","TD","TH","IMG"],u.tableElements=["TABLE","TH","TR","TD","CAPTION","COLGROUP","COL","THEAD","TBODY","TFOOT"],u.nonVisualElements=["HEAD","TITLE","BASE","LINK","STYLE","META","SCRIPT","NOSCRIPT"],u.styleToAttribute={"background-color":"bgcolor","background-image":"background","text-align":"align","vertical-align":"valign"},u.excludedProperties=[],u.juiceDocument=h,u.inlineDocument=s;function s(E,O,w){w=w||{};var L=t.parseCSS(O),_=[],I="style",B={},G=w.removeInlinedSelectors?new Set:null;w.styleAttributeName&&(I=w.styleAttributeName);function M(z){var te=z[0],we=z[1],k=new t.Selector(te),fe=k.parsed();if(fe){for(var Re=c(fe),N=0;N<fe.length;++N){var Ge=fe[N];if(Ge.pseudos)for(var zt=0;zt<Ge.pseudos.length;++zt){var Si=Ge.pseudos[zt];if(u.ignoredPseudos.indexOf(Si.name)>=0)return}}if(Re){var ln=fe[fe.length-1],Be=ln.pseudos;ln.pseudos=f(ln.pseudos),te=fe.toString(),ln.pseudos=Be}var Bn;try{Bn=E(te)}catch{return}var Ot=!1;Bn.each(function(){var ge=this;if(ge.name&&u.nonVisualElements.indexOf(ge.name.toUpperCase())>=0)return;if(Ot=!0,ge.counterProps||(ge.counterProps=ge.parent&&ge.parent.counterProps?Object.create(ge.parent.counterProps):{}),Re){var Vt="pseudo"+Re,Kt=ge[Vt];Kt||(Kt=ge[Vt]=E("<span />").get(0),Kt.pseudoElementType=Re,Kt.pseudoElementParent=ge,Kt.counterProps=ge.counterProps,ge[Vt]=Kt),ge=Kt}if(!ge.styleProps){if(ge.styleProps={},E(ge).attr(I)){var $u=E(ge).attr(I),es=w.decodeStyleAttributes?e($u):$u,ts="* { "+es+" } ";Ii(t.parseCSS(ts)[0][1],new t.Selector("<style>",!0))}_.push(ge)}function ns(et,cn){for(var Ue=cn.split(/\s+/),st=0;st<Ue.length;st++){var Fe=Ue[st],ct=parseInt(Ue[st+1],10);isNaN(ct)?et.counterProps[Fe]=B[Fe]=0:et.counterProps[Fe]=B[Ue[st++]]=ct}}function Ga(et,cn){for(var Ue=cn.split(/\s+/),st=0;st<Ue.length;st++){var Fe=Ue[st];if(et.counterProps[Fe]!==void 0){var ct=parseInt(Ue[st+1],10);isNaN(ct)?et.counterProps[Fe]=B[Fe]+=1:et.counterProps[Fe]=B[Ue[st++]]+=ct}}}function Ii(et,cn){for(var Ue=0,st=et.length;Ue<st;Ue++)if(et[Ue].type=="property"){var Fe=et[Ue].name,ct=et[Ue].value;Fe==="counter-reset"&&ns(ge,ct),Fe==="counter-increment"&&Ga(ge,ct);var F=ct.match(/!important$/)!==null;F&&!w.preserveImportant&&(ct=a(ct));var P=[et[Ue].position.start.line,et[Ue].position.start.col],X=new t.Property(Fe,ct,cn,F?2:0,P),ie=ge.styleProps[Fe];if(u.excludedProperties.indexOf(Fe)<0)if(w.inlineDuplicateProperties)if(ie)if(ie.selector===cn)X.nextProp=ie,ge.styleProps[Fe]=X;else{for(var be=ie;be.nextProp;)be=be.nextProp;be.nextProp=X}else ge.styleProps[Fe]=X;else(ie&&ie.compare(X)===X||!ie)&&(ie&&ie.selector!==cn?delete ge.styleProps[Fe]:ie&&(X.nextProp=ie),ge.styleProps[Fe]=X)}}Ii(we,k)}),Ot&&G&&G.add(z[0])}}function S(z){Object.keys(z.styleProps).length;var te=[];Object.keys(z.styleProps).forEach(function(k){for(var fe=z.styleProps[k];typeof fe<"u";)te.push(fe),fe=fe.nextProp}),te.sort(function(k,fe){return k.compareFunc(fe)});var we=te.filter(function(k){return w.resolveCSSVariables&&k.prop.indexOf("--")===0?!1:k.prop!=="content"}).map(function(k){return w.resolveCSSVariables&&(k.value=r.replaceVariables(z,k.value)),k.prop+": "+k.value.replace(/["]/g,"'")+";"}).join(" ");we&&E(z).attr(I,we)}function V(z){if(z.pseudoElementType&&z.styleProps.content){var te=l(z);te.img?(z.name="img",E(z).attr("src",te.img)):E(z).text(te);var we=z.pseudoElementParent;z.pseudoElementType==="before"?E(we).prepend(z):E(we).append(z)}}function Y(z,te){if(z.name){var we=z.name.toUpperCase();if(u[te+"Elements"].indexOf(we)>-1){for(var k in z.styleProps)if(z.styleProps[k].prop===te){var fe=z.styleProps[k].value;if(w.preserveImportant&&(fe=a(fe)),fe.match(/(px|auto)/)){var Re=fe.replace("px","");E(z).attr(te,Re);return}if(u.tableElements.indexOf(we)>-1&&fe.match(/\%/)){E(z).attr(te,fe);return}}}}}function U(z){return z.indexOf("url(")!==0?z:z.replace(/^url\((["'])?([^"']+)\1\)$/,"$2")}function j(z){if(z.name){var te=z.name.toUpperCase(),we=Object.keys(u.styleToAttribute);if(u.tableElements.indexOf(te)>-1){for(var k in z.styleProps)if(we.indexOf(z.styleProps[k].prop)>-1){var fe=u.styleToAttribute[z.styleProps[k].prop],Re=z.styleProps[k].value;if(w.preserveImportant&&(Re=a(Re)),fe==="background"&&(Re=U(Re)),/(linear|radial)-gradient\(/i.test(Re))continue;E(z).attr(fe,Re)}}}}if(L.forEach(M),_.forEach(S),w.inlinePseudoElements&&_.forEach(V),w.applyWidthAttributes&&_.forEach(function(z){Y(z,"width")}),w.applyHeightAttributes&&_.forEach(function(z){Y(z,"height")}),w.applyAttributesTableElements&&_.forEach(j),w.insertPreservedExtraCss&&w.extraCss){var ee=t.getPreservedText(w.extraCss,{mediaQueries:w.preserveMediaQueries,fontFaces:w.preserveFontFaces,keyFrames:w.preserveKeyFrames,preservedSelectors:w.preservedSelectors});if(ee){var se=null;w.insertPreservedExtraCss!==!0?se=E(w.insertPreservedExtraCss):(se=E("head"),se.length||(se=E("body")),se.length||(se=E.root())),se.first().append("<style>"+ee+"</style>")}}return G}function a(E){return E.replace(/\s*!important$/,"")}function o(E,O){switch(O){case"lower-roman":return n.romanize(E).toLowerCase();case"upper-roman":return n.romanize(E);case"lower-latin":case"lower-alpha":return n.alphanumeric(E).toLowerCase();case"upper-latin":case"upper-alpha":return n.alphanumeric(E);default:return E.toString()}}function l(E){var O=E.styleProps.content.value;if(O==="none"||O==="normal")return"";var w=O.match(/^\s*url\s*\(\s*(.*?)\s*\)\s*$/i);if(w){var L=w[1].replace(/^['"]|['"]$/g,"");return{img:L}}for(var _=[],I=O.split(/['"]/),B=0;B<I.length;B++)if(I[B]!==""){var G=I[B].match(/var\s*\(\s*(.*?)\s*(,\s*(.*?)\s*)?\s*\)/i);if(G){var M=r.findVariableValue(E,G[1])||G[2];_.push(M.replace(/^['"]|['"]$/g,""));continue}var S=I[B].match(/counter\s*\(\s*(.*?)\s*(,\s*(.*?)\s*)?\s*\)/i);if(S&&S[1]in E.counterProps){var V=E.counterProps[S[1]];_.push(o(V,S[3]));continue}var Y=I[B].match(/attr\s*\(\s*(.*?)\s*\)/i);if(Y){var U=Y[1];_.push(E.pseudoElementParent?E.pseudoElementParent.attribs[U]:E.attribs[U]);continue}_.push(I[B])}return O=_.join(""),O=O.replace(/\\/g,""),O}function c(E){if(E.length!==0){var O=E[E.length-1].pseudos;if(O){for(var w=0;w<O.length;w++)if(d(O[w]))return O[w].name}}}function d(E){return E.name==="before"||E.name==="after"}function f(E){return E.filter(function(O){return!d(O)})}function h(E,O){O=t.getDefaultOptions(O);var w=new Set;O.removeInlinedSelectors&&!O.removeStyleTags&&E("style[data-embed]").each(function(){w.add(this)});var L=T(E,O);L+=`
|
|
499
|
-
`+
|
|
500
|
-
`);return
|
|
499
|
+
`)},e.matchesPseudo=function(i,u){return u.find(function(s){return i.indexOf(":"+s)>-1})},e.matchesPreservedSelector=function(i,u){if(!u||u.length===0)return!1;for(var s=0;s<u.length;s++){var a=u[s];if(i===a||i.indexOf(a)!==-1)return!0}return!1},e.removeInlinedSelectorsFromCSS=function(i,u,s,a){for(var o=t.parse(i,{position:!0,comments:!0}),l=typeof o.stylesheet<"u"&&o.stylesheet.rules?o.stylesheet.rules:[],c=[],d=0;d<l.length;d++){var f=l[d];if(f.type!=="rule"){c.push(f);continue}if(f.selectors&&s.preservePseudos&&this.matchesPseudo(f.selectors[0],a)){c.push(f);continue}if(f.selectors&&s.preservedSelectors&&f.selectors.some(function(A){return e.matchesPreservedSelector(A,s.preservedSelectors)})){c.push(f);continue}var p=f.selectors.filter(function(A){return!u.has(A)});if(p.length>0){var m=Object.assign({},f,{selectors:p});c.push(m)}}return c.length===0?"":t.stringify({stylesheet:{rules:c}},{comments:!1,indentation:" "})},e.compareFunc=function(i,u){for(var s=Math.min(i.length,u.length),a=0;a<s;a++)if(i[a]!==u[a])return i[a]>u[a]?1:-1;return i.length-u.length},e.compare=function(i,u){return e.compareFunc(i,u)==1?i:u},e.getDefaultOptions=function(i){var u=Object.assign({extraCss:"",insertPreservedExtraCss:!0,applyStyleTags:!0,removeStyleTags:!0,removeInlinedSelectors:!1,preserveMediaQueries:!0,preserveFontFaces:!0,preserveKeyFrames:!0,preservePseudos:!0,preservedSelectors:[],applyWidthAttributes:!0,applyHeightAttributes:!0,applyAttributesTableElements:!0,resolveCSSVariables:!0,inlineDuplicateProperties:!1,url:""},i);return u.webResources=u.webResources||{},u}})(Vo)),Vo}var tp;function f5(){return tp||(tp=1,(function(e){var t=u5;Ef();var n=function(i,u,s){const{xmlMode:a,...o}=u;return u=Object.assign({xml:{decodeEntities:!1,xmlMode:a}},o),i=s(i),t.load(i,u)},r=function(){var i=[],u=function(a){var o=e.exports.codeBlocks;return Object.keys(o).forEach(function(l){var c=new RegExp(o[l].start+"([\\S\\s]*?)"+o[l].end,"g");a=a.replace(c,function(d,f){return i.push(d),"JUICE_CODE_BLOCK_"+(i.length-1)+"_"})}),a},s=function(a){for(var o=0;o<i.length;o++){var l=new RegExp("JUICE_CODE_BLOCK_"+o+'_(="")?',"gi");a=a.replace(l,function(){return i[o]})}return a};return{encodeEntities:u,decodeEntities:s}};e.exports=function(i,u,s,a){var o=r(),l=n(i,u,o.encodeEntities),c=[l];c.push.apply(c,a);var d=s.apply(void 0,c)||l;return u&&u.xmlMode?o.decodeEntities(d.xml()):o.decodeEntities(d.html())},e.exports.codeBlocks={EJS:{start:"<%",end:"%>"},HBS:{start:"{{",end:"}}"}}})(Lo)),Lo.exports}var nl={},rl={},il={},np;function rp(){return np||(np=1,(function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.fromCodePoint=void 0,e.replaceCodePoint=r,e.decodeCodePoint=i;const n=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]]);e.fromCodePoint=(t=String.fromCodePoint)!==null&&t!==void 0?t:(u=>{let s="";return u>65535&&(u-=65536,s+=String.fromCharCode(u>>>10&1023|55296),u=56320|u&1023),s+=String.fromCharCode(u),s});function r(u){var s;return u>=55296&&u<=57343||u>1114111?65533:(s=n.get(u))!==null&&s!==void 0?s:u}function i(u){return(0,e.fromCodePoint)(r(u))}})(il)),il}var Ni={},cs={},ip;function xb(){if(ip)return cs;ip=1,Object.defineProperty(cs,"__esModule",{value:!0}),cs.decodeBase64=e;function e(t){const n=typeof atob=="function"?atob(t):typeof Buffer.from=="function"?Buffer.from(t,"base64").toString("binary"):new Buffer(t,"base64").toString("binary"),r=n.length&-2,i=new Uint16Array(r/2);for(let u=0,s=0;u<r;u+=2){const a=n.charCodeAt(u),o=n.charCodeAt(u+1);i[s++]=a|o<<8}return i}return cs}var up;function sp(){if(up)return Ni;up=1,Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.htmlDecodeTree=void 0;const e=xb();return Ni.htmlDecodeTree=(0,e.decodeBase64)("QR08ALkAAgH6AYsDNQR2BO0EPgXZBQEGLAbdBxMISQrvCmQLfQurDKQNLw4fD4YPpA+6D/IPAAAAAAAAAAAAAAAAKhBMEY8TmxUWF2EYLBkxGuAa3RsJHDscWR8YIC8jSCSIJcMl6ie3Ku8rEC0CLjoupS7kLgAIRU1hYmNmZ2xtbm9wcnN0dVQAWgBeAGUAaQBzAHcAfgCBAIQAhwCSAJoAoACsALMAbABpAGcAO4DGAMZAUAA7gCYAJkBjAHUAdABlADuAwQDBQHIiZXZlAAJhAAFpeW0AcgByAGMAO4DCAMJAEGRyAADgNdgE3XIAYQB2AGUAO4DAAMBA8CFoYZFj4SFjcgBhZAAAoFMqAAFncIsAjgBvAG4ABGFmAADgNdg43fAlbHlGdW5jdGlvbgCgYSBpAG4AZwA7gMUAxUAAAWNzpACoAHIAAOA12Jzc6SFnbgCgVCJpAGwAZABlADuAwwDDQG0AbAA7gMQAxEAABGFjZWZvcnN1xQDYANoA7QDxAPYA+QD8AAABY3LJAM8AayNzbGFzaAAAoBYidgHTANUAAKDnKmUAZAAAoAYjeQARZIABY3J0AOAA5QDrAGEidXNlAACgNSLuI291bGxpcwCgLCFhAJJjcgAA4DXYBd1wAGYAAOA12Dnd5SF2ZdhiYwDyAOoAbSJwZXEAAKBOIgAHSE9hY2RlZmhpbG9yc3UXARoBHwE6AVIBVQFiAWQBZgGCAakB6QHtAfIBYwB5ACdkUABZADuAqQCpQIABY3B5ACUBKAE1AfUhdGUGYWmg0iJ0KGFsRGlmZmVyZW50aWFsRAAAoEUhbCJleXMAAKAtIQACYWVpb0EBRAFKAU0B8iFvbgxhZABpAGwAO4DHAMdAcgBjAAhhbiJpbnQAAKAwIm8AdAAKYQABZG5ZAV0BaSJsbGEAuGB0I2VyRG90ALdg8gA5AWkAp2NyImNsZQAAAkRNUFRwAXQBeQF9AW8AdAAAoJkiaSJudXMAAKCWIuwhdXMAoJUiaSJtZXMAAKCXIm8AAAFjc4cBlAFrKndpc2VDb250b3VySW50ZWdyYWwAAKAyImUjQ3VybHkAAAFEUZwBpAFvJXVibGVRdW90ZQAAoB0gdSJvdGUAAKAZIAACbG5wdbABtgHNAdgBbwBuAGWgNyIAoHQqgAFnaXQAvAHBAcUB8iJ1ZW50AKBhIm4AdAAAoC8i7yV1ckludGVncmFsAKAuIgABZnLRAdMBAKACIe8iZHVjdACgECJuLnRlckNsb2Nrd2lzZUNvbnRvdXJJbnRlZ3JhbAAAoDMi7yFzcwCgLypjAHIAAOA12J7ccABDoNMiYQBwAACgTSKABURKU1phY2VmaW9zAAsCEgIVAhgCGwIsAjQCOQI9AnMCfwNvoEUh9CJyYWhkAKARKWMAeQACZGMAeQAFZGMAeQAPZIABZ3JzACECJQIoAuchZXIAoCEgcgAAoKEhaAB2AACg5CoAAWF5MAIzAvIhb24OYRRkbAB0oAciYQCUY3IAAOA12AfdAAFhZkECawIAAWNtRQJnAvIjaXRpY2FsAAJBREdUUAJUAl8CYwJjInV0ZQC0YG8AdAFZAloC2WJiJGxlQWN1dGUA3WJyImF2ZQBgYGkibGRlANxi7yFuZACgxCJmJWVyZW50aWFsRAAAoEYhcAR9AgAAAAAAAIECjgIAABoDZgAA4DXYO91EoagAhQKJAm8AdAAAoNwgcSJ1YWwAAKBQIuIhbGUAA0NETFJVVpkCqAK1Au8C/wIRA28AbgB0AG8AdQByAEkAbgB0AGUAZwByAGEA7ADEAW8AdAKvAgAAAACwAqhgbiNBcnJvdwAAoNMhAAFlb7kC0AJmAHQAgAFBUlQAwQLGAs0CciJyb3cAAKDQIekkZ2h0QXJyb3cAoNQhZQDlACsCbgBnAAABTFLWAugC5SFmdAABQVLcAuECciJyb3cAAKD4J+kkZ2h0QXJyb3cAoPon6SRnaHRBcnJvdwCg+SdpImdodAAAAUFU9gL7AnIicm93AACg0iFlAGUAAKCoInAAQQIGAwAAAAALA3Iicm93AACg0SFvJHduQXJyb3cAAKDVIWUlcnRpY2FsQmFyAACgJSJuAAADQUJMUlRhJAM2AzoDWgNxA3oDciJyb3cAAKGTIUJVLAMwA2EAcgAAoBMpcCNBcnJvdwAAoPUhciJldmUAEWPlIWZ00gJDAwAASwMAAFIDaSVnaHRWZWN0b3IAAKBQKWUkZVZlY3RvcgAAoF4p5SJjdG9yQqC9IWEAcgAAoFYpaSJnaHQA1AFiAwAAaQNlJGVWZWN0b3IAAKBfKeUiY3RvckKgwSFhAHIAAKBXKWUAZQBBoKQiciJyb3cAAKCnIXIAcgBvAPcAtAIAAWN0gwOHA3IAAOA12J/c8iFvaxBhAAhOVGFjZGZnbG1vcHFzdHV4owOlA6kDsAO/A8IDxgPNA9ID8gP9AwEEFAQeBCAEJQRHAEphSAA7gNAA0EBjAHUAdABlADuAyQDJQIABYWl5ALYDuQO+A/Ihb24aYXIAYwA7gMoAykAtZG8AdAAWYXIAAOA12AjdcgBhAHYAZQA7gMgAyEDlIm1lbnQAoAgiAAFhcNYD2QNjAHIAEmF0AHkAUwLhAwAAAADpA20lYWxsU3F1YXJlAACg+yVlJ3J5U21hbGxTcXVhcmUAAKCrJQABZ3D2A/kDbwBuABhhZgAA4DXYPN3zImlsb26VY3UAAAFhaQYEDgRsAFSgdSppImxkZQAAoEIi7CNpYnJpdW0AoMwhAAFjaRgEGwRyAACgMCFtAACgcyphAJdjbQBsADuAywDLQAABaXApBC0E8yF0cwCgAyLvJG5lbnRpYWxFAKBHIYACY2Zpb3MAPQQ/BEMEXQRyBHkAJGRyAADgNdgJ3WwibGVkAFMCTAQAAAAAVARtJWFsbFNxdWFyZQAAoPwlZSdyeVNtYWxsU3F1YXJlAACgqiVwA2UEAABpBAAAAABtBGYAAOA12D3dwSFsbACgACLyI2llcnRyZgCgMSFjAPIAcQQABkpUYWJjZGZnb3JzdIgEiwSOBJMElwSkBKcEqwStBLIE5QTqBGMAeQADZDuAPgA+QO0hbWFkoJMD3GNyImV2ZQAeYYABZWl5AJ0EoASjBOQhaWwiYXIAYwAcYRNkbwB0ACBhcgAA4DXYCt0AoNkicABmAADgNdg+3eUiYXRlcgADRUZHTFNUvwTIBM8E1QTZBOAEcSJ1YWwATKBlIuUhc3MAoNsidSRsbEVxdWFsAACgZyJyI2VhdGVyAACgoirlIXNzAKB3IuwkYW50RXF1YWwAoH4qaSJsZGUAAKBzImMAcgAA4DXYotwAoGsiAARBYWNmaW9zdfkE/QQFBQgFCwUTBSIFKwVSIkRjeQAqZAABY3QBBQQFZQBrAMdiXmDpIXJjJGFyAACgDCFsJWJlcnRTcGFjZQAAoAsh8AEYBQAAGwVmAACgDSHpJXpvbnRhbExpbmUAoAAlAAFjdCYFKAXyABIF8iFvayZhbQBwAEQBMQU5BW8AdwBuAEgAdQBtAPAAAAFxInVhbAAAoE8iAAdFSk9hY2RmZ21ub3N0dVMFVgVZBVwFYwVtBXAFcwV6BZAFtgXFBckFzQVjAHkAFWTsIWlnMmFjAHkAAWRjAHUAdABlADuAzQDNQAABaXlnBWwFcgBjADuAzgDOQBhkbwB0ADBhcgAAoBEhcgBhAHYAZQA7gMwAzEAAoREhYXB/BYsFAAFjZ4MFhQVyACphaSNuYXJ5SQAAoEghbABpAGUA8wD6AvQBlQUAAKUFZaAsIgABZ3KaBZ4F8iFhbACgKyLzI2VjdGlvbgCgwiJpI3NpYmxlAAABQ1SsBbEFbyJtbWEAAKBjIGkibWVzAACgYiCAAWdwdAC8Bb8FwwVvAG4ALmFmAADgNdhA3WEAmWNjAHIAAKAQIWkibGRlAChh6wHSBQAA1QVjAHkABmRsADuAzwDPQIACY2Zvc3UA4QXpBe0F8gX9BQABaXnlBegFcgBjADRhGWRyAADgNdgN3XAAZgAA4DXYQd3jAfcFAAD7BXIAAOA12KXc8iFjeQhk6yFjeQRkgANISmFjZm9zAAwGDwYSBhUGHQYhBiYGYwB5ACVkYwB5AAxk8CFwYZpjAAFleRkGHAbkIWlsNmEaZHIAAOA12A7dcABmAADgNdhC3WMAcgAA4DXYptyABUpUYWNlZmxtb3N0AD0GQAZDBl4GawZkB2gHcAd0B80H2gdjAHkACWQ7gDwAPECAAmNtbnByAEwGTwZSBlUGWwb1IXRlOWHiIWRhm2NnAACg6ifsI2FjZXRyZgCgEiFyAACgniGAAWFleQBkBmcGagbyIW9uPWHkIWlsO2EbZAABZnNvBjQHdAAABUFDREZSVFVWYXKABp4GpAbGBssG3AYDByEHwQIqBwABbnKEBowGZyVsZUJyYWNrZXQAAKDoJ/Ihb3cAoZAhQlKTBpcGYQByAACg5CHpJGdodEFycm93AKDGIWUjaWxpbmcAAKAII28A9QGqBgAAsgZiJWxlQnJhY2tldAAAoOYnbgDUAbcGAAC+BmUkZVZlY3RvcgAAoGEp5SJjdG9yQqDDIWEAcgAAoFkpbCJvb3IAAKAKI2kiZ2h0AAABQVbSBtcGciJyb3cAAKCUIeUiY3RvcgCgTikAAWVy4AbwBmUAAKGjIkFW5gbrBnIicm93AACgpCHlImN0b3IAoFopaSNhbmdsZQBCorIi+wYAAAAA/wZhAHIAAKDPKXEidWFsAACgtCJwAIABRFRWAAoHEQcYB+8kd25WZWN0b3IAoFEpZSRlVmVjdG9yAACgYCnlImN0b3JCoL8hYQByAACgWCnlImN0b3JCoLwhYQByAACgUilpAGcAaAB0AGEAcgByAG8A9wDMAnMAAANFRkdMU1Q/B0cHTgdUB1gHXwfxJXVhbEdyZWF0ZXIAoNoidSRsbEVxdWFsAACgZiJyI2VhdGVyAACgdiLlIXNzAKChKuwkYW50RXF1YWwAoH0qaSJsZGUAAKByInIAAOA12A/dZaDYIuYjdGFycm93AKDaIWkiZG90AD9hgAFucHcAege1B7kHZwAAAkxSbHKCB5QHmwerB+UhZnQAAUFSiAeNB3Iicm93AACg9SfpJGdodEFycm93AKD3J+kkZ2h0QXJyb3cAoPYn5SFmdAABYXLcAqEHaQBnAGgAdABhAHIAcgBvAPcA5wJpAGcAaAB0AGEAcgByAG8A9wDuAmYAAOA12EPdZQByAAABTFK/B8YHZSRmdEFycm93AACgmSHpJGdodEFycm93AKCYIYABY2h0ANMH1QfXB/IAWgYAoLAh8iFva0FhAKBqIgAEYWNlZmlvc3XpB+wH7gf/BwMICQgOCBEIcAAAoAUpeQAcZAABZGzyB/kHaSR1bVNwYWNlAACgXyBsI2ludHJmAACgMyFyAADgNdgQ3e4jdXNQbHVzAKATInAAZgAA4DXYRN1jAPIA/gecY4AESmFjZWZvc3R1ACEIJAgoCDUIgQiFCDsKQApHCmMAeQAKZGMidXRlAENhgAFhZXkALggxCDQI8iFvbkdh5CFpbEVhHWSAAWdzdwA7CGEIfQjhInRpdmWAAU1UVgBECEwIWQhlJWRpdW1TcGFjZQAAoAsgaABpAAABY25SCFMIawBTAHAAYQBjAOUASwhlAHIAeQBUAGgAaQDuAFQI9CFlZAABR0xnCHUIcgBlAGEAdABlAHIARwByAGUAYQB0AGUA8gDrBGUAcwBzAEwAZQBzAPMA2wdMImluZQAKYHIAAOA12BHdAAJCbnB0jAiRCJkInAhyImVhawAAoGAgwiZyZWFraW5nU3BhY2WgYGYAAKAVIUOq7CqzCMIIzQgAAOcIGwkAAAAAAAAtCQAAbwkAAIcJAACdCcAJGQoAADQKAAFvdbYIvAjuI2dydWVudACgYiJwIkNhcAAAoG0ibyh1YmxlVmVydGljYWxCYXIAAKAmIoABbHF4ANII1wjhCOUibWVudACgCSL1IWFsVKBgImkibGRlAADgQiI4A2kic3RzAACgBCJyI2VhdGVyAACjbyJFRkdMU1T1CPoIAgkJCQ0JFQlxInVhbAAAoHEidSRsbEVxdWFsAADgZyI4A3IjZWF0ZXIAAOBrIjgD5SFzcwCgeSLsJGFudEVxdWFsAOB+KjgDaSJsZGUAAKB1IvUhbXBEASAJJwnvI3duSHVtcADgTiI4A3EidWFsAADgTyI4A2UAAAFmczEJRgn0JFRyaWFuZ2xlQqLqIj0JAAAAAEIJYQByAADgzyk4A3EidWFsAACg7CJzAICibiJFR0xTVABRCVYJXAlhCWkJcSJ1YWwAAKBwInIjZWF0ZXIAAKB4IuUhc3MA4GoiOAPsJGFudEVxdWFsAOB9KjgDaSJsZGUAAKB0IuUic3RlZAABR0x1CX8J8iZlYXRlckdyZWF0ZXIA4KIqOAPlI3NzTGVzcwDgoSo4A/IjZWNlZGVzAKGAIkVTjwmVCXEidWFsAADgryo4A+wkYW50RXF1YWwAoOAiAAFlaaAJqQl2JmVyc2VFbGVtZW50AACgDCLnJWh0VHJpYW5nbGVCousitgkAAAAAuwlhAHIAAODQKTgDcSJ1YWwAAKDtIgABcXXDCeAJdSNhcmVTdQAAAWJwywnVCfMhZXRF4I8iOANxInVhbAAAoOIi5SJyc2V0ReCQIjgDcSJ1YWwAAKDjIoABYmNwAOYJ8AkNCvMhZXRF4IIi0iBxInVhbAAAoIgi4yJlZWRzgKGBIkVTVAD6CQAKBwpxInVhbAAA4LAqOAPsJGFudEVxdWFsAKDhImkibGRlAADgfyI4A+UicnNldEXggyLSIHEidWFsAACgiSJpImxkZQCAoUEiRUZUACIKJwouCnEidWFsAACgRCJ1JGxsRXF1YWwAAKBHImkibGRlAACgSSJlJXJ0aWNhbEJhcgAAoCQiYwByAADgNdip3GkAbABkAGUAO4DRANFAnWMAB0VhY2RmZ21vcHJzdHV2XgphCmgKcgp2CnoKgQqRCpYKqwqtCrsKyArNCuwhaWdSYWMAdQB0AGUAO4DTANNAAAFpeWwKcQpyAGMAO4DUANRAHmRiImxhYwBQYXIAAOA12BLdcgBhAHYAZQA7gNIA0kCAAWFlaQCHCooKjQpjAHIATGFnAGEAqWNjInJvbgCfY3AAZgAA4DXYRt3lI25DdXJseQABRFGeCqYKbyV1YmxlUXVvdGUAAKAcIHUib3RlAACgGCAAoFQqAAFjbLEKtQpyAADgNdiq3GEAcwBoADuA2ADYQGkAbAHACsUKZABlADuA1QDVQGUAcwAAoDcqbQBsADuA1gDWQGUAcgAAAUJQ0wrmCgABYXLXCtoKcgAAoD4gYQBjAAABZWvgCuIKAKDeI2UAdAAAoLQjYSVyZW50aGVzaXMAAKDcI4AEYWNmaGlsb3JzAP0KAwsFCwkLCwsMCxELIwtaC3IjdGlhbEQAAKACInkAH2RyAADgNdgT3WkApmOgY/Ujc01pbnVzsWAAAWlwFQsgC24AYwBhAHIAZQBwAGwAYQBuAOUACgVmAACgGSGAobsqZWlvACoLRQtJC+MiZWRlc4CheiJFU1QANAs5C0ALcSJ1YWwAAKCvKuwkYW50RXF1YWwAoHwiaSJsZGUAAKB+Im0AZQAAoDMgAAFkcE0LUQv1IWN0AKAPIm8jcnRpb24AYaA3ImwAAKAdIgABY2leC2ILcgAA4DXYq9yoYwACVWZvc2oLbwtzC3cLTwBUADuAIgAiQHIAAOA12BTdcABmAACgGiFjAHIAAOA12KzcAAZCRWFjZWZoaW9yc3WPC5MLlwupC7YL2AvbC90LhQyTDJoMowzhIXJyAKAQKUcAO4CuAK5AgAFjbnIAnQugC6ML9SF0ZVRhZwAAoOsncgB0oKAhbAAAoBYpgAFhZXkArwuyC7UL8iFvblhh5CFpbFZhIGR2oBwhZSJyc2UAAAFFVb8LzwsAAWxxwwvIC+UibWVudACgCyL1JGlsaWJyaXVtAKDLIXAmRXF1aWxpYnJpdW0AAKBvKXIAAKAcIW8AoWPnIWh0AARBQ0RGVFVWYewLCgwQDDIMNwxeDHwM9gIAAW5y8Av4C2clbGVCcmFja2V0AACg6SfyIW93AKGSIUJM/wsDDGEAcgAAoOUhZSRmdEFycm93AACgxCFlI2lsaW5nAACgCSNvAPUBFgwAAB4MYiVsZUJyYWNrZXQAAKDnJ24A1AEjDAAAKgxlJGVWZWN0b3IAAKBdKeUiY3RvckKgwiFhAHIAAKBVKWwib29yAACgCyMAAWVyOwxLDGUAAKGiIkFWQQxGDHIicm93AACgpiHlImN0b3IAoFspaSNhbmdsZQBCorMiVgwAAAAAWgxhAHIAAKDQKXEidWFsAACgtSJwAIABRFRWAGUMbAxzDO8kd25WZWN0b3IAoE8pZSRlVmVjdG9yAACgXCnlImN0b3JCoL4hYQByAACgVCnlImN0b3JCoMAhYQByAACgUykAAXB1iQyMDGYAAKAdIe4kZEltcGxpZXMAoHAp6SRnaHRhcnJvdwCg2yEAAWNongyhDHIAAKAbIQCgsSHsJGVEZWxheWVkAKD0KYAGSE9hY2ZoaW1vcXN0dQC/DMgMzAzQDOIM5gwKDQ0NFA0ZDU8NVA1YDQABQ2PDDMYMyCFjeSlkeQAoZEYiVGN5ACxkYyJ1dGUAWmEAorwqYWVpedgM2wzeDOEM8iFvbmBh5CFpbF5hcgBjAFxhIWRyAADgNdgW3e8hcnQAAkRMUlXvDPYM/QwEDW8kd25BcnJvdwAAoJMhZSRmdEFycm93AACgkCHpJGdodEFycm93AKCSIXAjQXJyb3cAAKCRIechbWGjY+EkbGxDaXJjbGUAoBgicABmAADgNdhK3XICHw0AAAAAIg10AACgGiLhIXJlgKGhJUlTVQAqDTINSg3uJXRlcnNlY3Rpb24AoJMidQAAAWJwNw1ADfMhZXRFoI8icSJ1YWwAAKCRIuUicnNldEWgkCJxInVhbAAAoJIibiJpb24AAKCUImMAcgAA4DXYrtxhAHIAAKDGIgACYmNtcF8Nag2ODZANc6DQImUAdABFoNAicSJ1YWwAAKCGIgABY2huDYkNZSJlZHMAgKF7IkVTVAB4DX0NhA1xInVhbAAAoLAq7CRhbnRFcXVhbACgfSJpImxkZQAAoH8iVABoAGEA9ADHCwCgESIAodEiZXOVDZ8NciJzZXQARaCDInEidWFsAACghyJlAHQAAKDRIoAFSFJTYWNmaGlvcnMAtQ27Db8NyA3ODdsN3w3+DRgOHQ4jDk8AUgBOADuA3gDeQMEhREUAoCIhAAFIY8MNxg1jAHkAC2R5ACZkAAFidcwNzQ0JYKRjgAFhZXkA1A3XDdoN8iFvbmRh5CFpbGJhImRyAADgNdgX3QABZWnjDe4N8gHoDQAA7Q3lImZvcmUAoDQiYQCYYwABY27yDfkNayNTcGFjZQAA4F8gCiDTInBhY2UAoAkg7CFkZYChPCJFRlQABw4MDhMOcSJ1YWwAAKBDInUkbGxFcXVhbAAAoEUiaSJsZGUAAKBIInAAZgAA4DXYS93pI3BsZURvdACg2yAAAWN0Jw4rDnIAAOA12K/c8iFva2Zh4QpFDlYOYA5qDgAAbg5yDgAAAAAAAAAAAAB5DnwOqA6zDgAADg8RDxYPGg8AAWNySA5ODnUAdABlADuA2gDaQHIAb6CfIeMhaXIAoEkpcgDjAVsOAABdDnkADmR2AGUAbGEAAWl5Yw5oDnIAYwA7gNsA20AjZGIibGFjAHBhcgAA4DXYGN1yAGEAdgBlADuA2QDZQOEhY3JqYQABZGl/Dp8OZQByAAABQlCFDpcOAAFhcokOiw5yAF9gYQBjAAABZWuRDpMOAKDfI2UAdAAAoLUjYSVyZW50aGVzaXMAAKDdI28AbgBQoMMi7CF1cwCgjiIAAWdwqw6uDm8AbgByYWYAAOA12EzdAARBREVUYWRwc78O0g7ZDuEOBQPqDvMOBw9yInJvdwDCoZEhyA4AAMwOYQByAACgEilvJHduQXJyb3cAAKDFIW8kd25BcnJvdwAAoJUhcSV1aWxpYnJpdW0AAKBuKWUAZQBBoKUiciJyb3cAAKClIW8AdwBuAGEAcgByAG8A9wAQA2UAcgAAAUxS+Q4AD2UkZnRBcnJvdwAAoJYh6SRnaHRBcnJvdwCglyFpAGyg0gNvAG4ApWPpIW5nbmFjAHIAAOA12LDcaSJsZGUAaGFtAGwAO4DcANxAgAREYmNkZWZvc3YALQ8xDzUPNw89D3IPdg97D4AP4SFzaACgqyJhAHIAAKDrKnkAEmThIXNobKCpIgCg5ioAAWVyQQ9DDwCgwSKAAWJ0eQBJD00Paw9hAHIAAKAWIGmgFiDjIWFsAAJCTFNUWA9cD18PZg9hAHIAAKAjIukhbmV8YGUkcGFyYXRvcgAAoFgnaSJsZGUAAKBAItQkaGluU3BhY2UAoAogcgAA4DXYGd1wAGYAAOA12E3dYwByAADgNdix3GQiYXNoAACgqiKAAmNlZm9zAI4PkQ+VD5kPng/pIXJjdGHkIWdlAKDAInIAAOA12BrdcABmAADgNdhO3WMAcgAA4DXYstwAAmZpb3OqD64Prw+0D3IAAOA12BvdnmNwAGYAAOA12E/dYwByAADgNdiz3IAEQUlVYWNmb3N1AMgPyw/OD9EP2A/gD+QP6Q/uD2MAeQAvZGMAeQAHZGMAeQAuZGMAdQB0AGUAO4DdAN1AAAFpedwP3w9yAGMAdmErZHIAAOA12BzdcABmAADgNdhQ3WMAcgAA4DXYtNxtAGwAeGEABEhhY2RlZm9z/g8BEAUQDRAQEB0QIBAkEGMAeQAWZGMidXRlAHlhAAFheQkQDBDyIW9ufWEXZG8AdAB7YfIBFRAAABwQbwBXAGkAZAB0AOgAVAhhAJZjcgAAoCghcABmAACgJCFjAHIAAOA12LXc4QtCEEkQTRAAAGcQbRByEAAAAAAAAAAAeRCKEJcQ8hD9EAAAGxEhETIROREAAD4RYwB1AHQAZQA7gOEA4UByImV2ZQADYYCiPiJFZGl1eQBWEFkQWxBgEGUQAOA+IjMDAKA/InIAYwA7gOIA4kB0AGUAO4C0ALRAMGRsAGkAZwA7gOYA5kByoGEgAOA12B7dcgBhAHYAZQA7gOAA4EAAAWVwfBCGEAABZnCAEIQQ8yF5bQCgNSHoAIMQaABhALFjAAFhcI0QWwAAAWNskRCTEHIAAWFnAACgPypkApwQAAAAALEQAKInImFkc3ajEKcQqRCuEG4AZAAAoFUqAKBcKmwib3BlAACgWCoAoFoqAKMgImVsbXJzersQvRDAEN0Q5RDtEACgpCllAACgICJzAGQAYaAhImEEzhDQENIQ1BDWENgQ2hDcEACgqCkAoKkpAKCqKQCgqykAoKwpAKCtKQCgrikAoK8pdAB2oB8iYgBkoL4iAKCdKQABcHTpEOwQaAAAoCIixWDhIXJyAKB8IwABZ3D1EPgQbwBuAAVhZgAA4DXYUt0Ao0giRWFlaW9wBxEJEQ0RDxESERQRAKBwKuMhaXIAoG8qAKBKImQAAKBLInMAJ2DyIW94ZaBIIvEADhFpAG4AZwA7gOUA5UCAAWN0eQAmESoRKxFyAADgNdi23CpgbQBwAGWgSCLxAPgBaQBsAGQAZQA7gOMA40BtAGwAO4DkAORAAAFjaUERRxFvAG4AaQBuAPQA6AFuAHQAAKARKgAITmFiY2RlZmlrbG5vcHJzdWQRaBGXEZ8RpxGrEdIR1hErEjASexKKEn0RThNbE3oTbwB0AACg7SoAAWNybBGJEWsAAAJjZXBzdBF4EX0RghHvIW5nAKBMInAjc2lsb24A9mNyImltZQAAoDUgaQBtAGWgPSJxAACgzSJ2AY0RkRFlAGUAAKC9ImUAZABnoAUjZQAAoAUjcgBrAHSgtSPiIXJrAKC2IwABb3mjEaYRbgDnAHcRMWTxIXVvAKAeIIACY21wcnQAtBG5Eb4RwRHFEeEhdXPloDUi5ABwInR5dgAAoLApcwDpAH0RbgBvAPUA6gCAAWFodwDLEcwRzhGyYwCgNiHlIWVuAKBsInIAAOA12B/dZwCAA2Nvc3R1dncA4xHyEQUSEhIhEiYSKRKAAWFpdQDpEesR7xHwAKMFcgBjAACg7yVwAACgwyKAAWRwdAD4EfwRABJvAHQAAKAAKuwhdXMAoAEqaSJtZXMAAKACKnECCxIAAAAADxLjIXVwAKAGKmEAcgAAoAUm8iNpYW5nbGUAAWR1GhIeEu8hd24AoL0lcAAAoLMlcCJsdXMAAKAEKmUA5QBCD+UAkg9hInJvdwAAoA0pgAFha28ANhJoEncSAAFjbjoSZRJrAIABbHN0AEESRxJNEm8jemVuZ2UAAKDrKXEAdQBhAHIA5QBcBPIjaWFuZ2xlgKG0JWRscgBYElwSYBLvIXduAKC+JeUhZnQAoMIlaSJnaHQAAKC4JWsAAKAjJLEBbRIAAHUSsgFxEgAAcxIAoJIlAKCRJTQAAKCTJWMAawAAoIglAAFlb38ShxJx4D0A5SD1IWl2AOBhIuUgdAAAoBAjAAJwdHd4kRKVEpsSnxJmAADgNdhT3XSgpSJvAG0AAKClIvQhaWUAoMgiAAZESFVWYmRobXB0dXayEsES0RLgEvcS+xIKExoTHxMjEygTNxMAAkxSbHK5ErsSvRK/EgCgVyUAoFQlAKBWJQCgUyUAolAlRFVkdckSyxLNEs8SAKBmJQCgaSUAoGQlAKBnJQACTFJsctgS2hLcEt4SAKBdJQCgWiUAoFwlAKBZJQCjUSVITFJobHLrEu0S7xLxEvMS9RIAoGwlAKBjJQCgYCUAoGslAKBiJQCgXyVvAHgAAKDJKQACTFJscgITBBMGEwgTAKBVJQCgUiUAoBAlAKAMJQCiACVEVWR1EhMUExYTGBMAoGUlAKBoJQCgLCUAoDQlaSJudXMAAKCfIuwhdXMAoJ4iaSJtZXMAAKCgIgACTFJsci8TMRMzEzUTAKBbJQCgWCUAoBglAKAUJQCjAiVITFJobHJCE0QTRhNIE0oTTBMAoGolAKBhJQCgXiUAoDwlAKAkJQCgHCUAAWV2UhNVE3YA5QD5AGIAYQByADuApgCmQAACY2Vpb2ITZhNqE24TcgAA4DXYt9xtAGkAAKBPIG0A5aA9IogRbAAAoVwAYmh0E3YTAKDFKfMhdWIAoMgnbAF+E4QTbABloCIgdAAAoCIgcAAAoU4iRWWJE4sTAKCuKvGgTyI8BeEMqRMAAN8TABQDFB8UAAAjFDQUAAAAAIUUAAAAAI0UAAAAANcU4xT3FPsUAACIFQAAlhWAAWNwcgCuE7ET1RP1IXRlB2GAoikiYWJjZHMAuxO/E8QTzhPSE24AZAAAoEQqciJjdXAAAKBJKgABYXXIE8sTcAAAoEsqcAAAoEcqbwB0AACgQCoA4CkiAP4AAWVv2RPcE3QAAKBBIO4ABAUAAmFlaXXlE+8T9RP4E/AB6hMAAO0TcwAAoE0qbwBuAA1hZABpAGwAO4DnAOdAcgBjAAlhcABzAHOgTCptAACgUCpvAHQAC2GAAWRtbgAIFA0UEhRpAGwAO4C4ALhAcCJ0eXYAAKCyKXQAAIGiADtlGBQZFKJAcgBkAG8A9ABiAXIAAOA12CDdgAFjZWkAKBQqFDIUeQBHZGMAawBtoBMn4SFyawCgEyfHY3IAAKPLJUVjZWZtcz8UQRRHFHcUfBSAFACgwykAocYCZWxGFEkUcQAAoFciZQBhAlAUAAAAAGAUciJyb3cAAAFsclYUWhTlIWZ0AKC6IWkiZ2h0AACguyGAAlJTYWNkAGgUaRRrFG8UcxSuYACgyCRzAHQAAKCbIukhcmMAoJoi4SFzaACgnSJuImludAAAoBAqaQBkAACg7yrjIWlyAKDCKfUhYnN1oGMmaQB0AACgYybsApMUmhS2FAAAwxRvAG4AZaA6APGgVCKrAG0CnxQAAAAAoxRhAHSgLABAYAChASJmbKcUqRTuABMNZQAAAW14rhSyFOUhbnQAoAEiZQDzANIB5wG6FAAAwBRkoEUibwB0AACgbSpuAPQAzAGAAWZyeQDIFMsUzhQA4DXYVN1vAOQA1wEAgakAO3MeAdMUcgAAoBchAAFhb9oU3hRyAHIAAKC1IXMAcwAAoBcnAAFjdeYU6hRyAADgNdi43AABYnDuFPIUZaDPKgCg0SploNAqAKDSKuQhb3QAoO8igANkZWxwcnZ3AAYVEBUbFSEVRBVlFYQV4SFycgABbHIMFQ4VAKA4KQCgNSlwAhYVAAAAABkVcgAAoN4iYwAAoN8i4SFycnCgtiEAoD0pgKIqImJjZG9zACsVMBU6FT4VQRVyImNhcAAAoEgqAAFhdTQVNxVwAACgRipwAACgSipvAHQAAKCNInIAAKBFKgDgKiIA/gACYWxydksVURVuFXMVcgByAG2gtyEAoDwpeQCAAWV2dwBYFWUVaRVxAHACXxUAAAAAYxVyAGUA4wAXFXUA4wAZFWUAZQAAoM4iZSJkZ2UAAKDPImUAbgA7gKQApEBlI2Fycm93AAABbHJ7FX8V5SFmdACgtiFpImdodAAAoLchZQDkAG0VAAFjaYsVkRVvAG4AaQBuAPQAkwFuAHQAAKAxImwiY3R5AACgLSOACUFIYWJjZGVmaGlqbG9yc3R1d3oAuBW7Fb8V1RXgFegV+RUKFhUWHxZUFlcWZRbFFtsW7xb7FgUXChdyAPIAtAJhAHIAAKBlKQACZ2xyc8YVyhXOFdAV5yFlcgCgICDlIXRoAKA4IfIA9QxoAHagECAAoKMiawHZFd4VYSJyb3cAAKAPKWEA4wBfAgABYXnkFecV8iFvbg9hNGQAoUYhYW/tFfQVAAFnciEC8RVyAACgyiF0InNlcQAAoHcqgAFnbG0A/xUCFgUWO4CwALBAdABhALRjcCJ0eXYAAKCxKQABaXIOFhIW8yFodACgfykA4DXYId1hAHIAAAFschsWHRYAoMMhAKDCIYACYWVnc3YAKBauAjYWOhY+Fm0AAKHEIm9zLhY0Fm4AZABzoMQi9SFpdACgZiZhIm1tYQDdY2kAbgAAoPIiAKH3AGlvQxZRFmQAZQAAgfcAO29KFksW90BuI3RpbWVzAACgxyJuAPgAUBZjAHkAUmRjAG8CXhYAAAAAYhZyAG4AAKAeI28AcAAAoA0jgAJscHR1dwBuFnEWdRaSFp4W7CFhciRgZgAA4DXYVd0AotkCZW1wc30WhBaJFo0WcQBkoFAibwB0AACgUSJpIm51cwAAoDgi7CF1cwCgFCLxInVhcmUAoKEiYgBsAGUAYgBhAHIAdwBlAGQAZwDlANcAbgCAAWFkaAClFqoWtBZyAHIAbwD3APUMbwB3AG4AYQByAHIAbwB3APMA8xVhI3Jwb29uAAABbHK8FsAWZQBmAPQAHBZpAGcAaAD0AB4WYgHJFs8WawBhAHIAbwD3AJILbwLUFgAAAADYFnIAbgAAoB8jbwBwAACgDCOAAWNvdADhFukW7BYAAXJ55RboFgDgNdi53FVkbAAAoPYp8iFvaxFhAAFkcvMW9xZvAHQAAKDxImkA5qC/JVsSAAFhaP8WAhdyAPIANQNhAPIA1wvhIm5nbGUAoKYpAAFjaQ4XEBd5AF9k5yJyYXJyAKD/JwAJRGFjZGVmZ2xtbm9wcXJzdHV4MRc4F0YXWxcyBF4XaRd5F40XrBe0F78X2RcVGCEYLRg1GEAYAAFEbzUXgRZvAPQA+BUAAWNzPBdCF3UAdABlADuA6QDpQPQhZXIAoG4qAAJhaW95TRdQF1YXWhfyIW9uG2FyAGOgViI7gOoA6kDsIW9uAKBVIk1kbwB0ABdhAAFEcmIXZhdvAHQAAKBSIgDgNdgi3XKhmipuF3QXYQB2AGUAO4DoAOhAZKCWKm8AdAAAoJgqgKGZKmlscwCAF4UXhxfuInRlcnMAoOcjAKATIWSglSpvAHQAAKCXKoABYXBzAJMXlheiF2MAcgATYXQAeQBzogUinxcAAAAAoRdlAHQAAKAFInAAMaADIDMBqRerFwCgBCAAoAUgAAFnc7AXsRdLYXAAAKACIAABZ3C4F7sXbwBuABlhZgAA4DXYVt2AAWFscwDFF8sXzxdyAHOg1SJsAACg4yl1AHMAAKBxKmkAAKG1A2x21RfYF28AbgC1Y/VjAAJjc3V24BfoF/0XEBgAAWlv5BdWF3IAYwAAoFYiaQLuFwAAAADwF+0ADQThIW50AAFnbPUX+Rd0AHIAAKCWKuUhc3MAoJUqgAFhZWkAAxgGGAoYbABzAD1gcwB0AACgXyJ2AESgYSJEAACgeCrwImFyc2wAoOUpAAFEYRkYHRhvAHQAAKBTInIAcgAAoHEpgAFjZGkAJxgqGO0XcgAAoC8hbwD0AIwCAAFhaDEYMhi3YzuA8ADwQAABbXI5GD0YbAA7gOsA60BvAACgrCCAAWNpcABGGEgYSxhsACFgcwD0ACwEAAFlb08YVxhjAHQAYQB0AGkAbwDuABoEbgBlAG4AdABpAGEAbADlADME4Ql1GAAAgRgAAIMYiBgAAAAAoRilGAAAqhgAALsYvhjRGAAA1xgnGWwAbABpAG4AZwBkAG8AdABzAGUA8QBlF3kARGRtImFsZQAAoEAmgAFpbHIAjRiRGJ0Y7CFpZwCgA/tpApcYAAAAAJoYZwAAoAD7aQBnAACgBPsA4DXYI93sIWlnAKAB++whaWcA4GYAagCAAWFsdACvGLIYthh0AACgbSZpAGcAAKAC+24AcwAAoLElbwBmAJJh8AHCGAAAxhhmAADgNdhX3QABYWvJGMwYbADsAGsEdqDUIgCg2SphI3J0aW50AACgDSoAAWFv2hgiGQABY3PeGB8ZsQPnGP0YBRkSGRUZAAAdGbID7xjyGPQY9xj5GAAA+xg7gL0AvUAAoFMhO4C8ALxAAKBVIQCgWSEAoFshswEBGQAAAxkAoFQhAKBWIbQCCxkOGQAAAAAQGTuAvgC+QACgVyEAoFwhNQAAoFghtgEZGQAAGxkAoFohAKBdITgAAKBeIWwAAKBEIHcAbgAAoCIjYwByAADgNdi73IAIRWFiY2RlZmdpamxub3JzdHYARhlKGVoZXhlmGWkZkhmWGZkZnRmgGa0ZxhnLGc8Z4BkjGmygZyIAoIwqgAFjbXAAUBlTGVgZ9SF0ZfVhbQBhAOSgswM6FgCghipyImV2ZQAfYQABaXliGWUZcgBjAB1hM2RvAHQAIWGAoWUibHFzAMYEcBl6GfGhZSLOBAAAdhlsAGEAbgD0AN8EgKF+KmNkbACBGYQZjBljAACgqSpvAHQAb6CAKmyggioAoIQqZeDbIgD+cwAAoJQqcgAA4DXYJN3noGsirATtIWVsAKA3IWMAeQBTZIChdyJFYWoApxmpGasZAKCSKgCgpSoAoKQqAAJFYWVztBm2Gb0ZwhkAoGkicABwoIoq8iFveACgiipxoIgq8aCIKrUZaQBtAACg5yJwAGYAAOA12FjdYQB2AOUAYwIAAWNp0xnWGXIAAKAKIW0AAKFzImVs3BneGQCgjioAoJAqAIM+ADtjZGxxco0E6xn0GfgZ/BkBGgABY2nvGfEZAKCnKnIAAKB6Km8AdAAAoNci0CFhcgCglSl1ImVzdAAAoHwqgAJhZGVscwAKGvQZFhrVBCAa8AEPGgAAFBpwAHIAbwD4AFkZcgAAoHgpcQAAAWxxxAQbGmwAZQBzAPMASRlpAO0A5AQAAWVuJxouGnIjdG5lcXEAAOBpIgD+xQAsGgAFQWFiY2Vma29zeUAaQxpmGmoabRqDGocalhrCGtMacgDyAMwCAAJpbG1yShpOGlAaVBpyAHMA8ABxD2YAvWBpAGwA9AASBQABZHJYGlsaYwB5AEpkAKGUIWN3YBpkGmkAcgAAoEgpAKCtIWEAcgAAoA8h6SFyYyVhgAFhbHIAcxp7Gn8a8iF0c3WgZSZpAHQAAKBlJuwhaXAAoCYg4yFvbgCguSJyAADgNdgl3XMAAAFld4wakRphInJvdwAAoCUpYSJyb3cAAKAmKYACYW1vcHIAnxqjGqcauhq+GnIAcgAAoP8h9CFodACgOyJrAAABbHKsGrMaZSRmdGFycm93AACgqSHpJGdodGFycm93AKCqIWYAAOA12Fnd4iFhcgCgFSCAAWNsdADIGswa0BpyAADgNdi93GEAcwDoAGka8iFvaydhAAFicNca2xr1IWxsAKBDIOghZW4AoBAg4Qr2GgAA/RoAAAgbExsaGwAAIRs7GwAAAAA+G2IbmRuVG6sbAACyG80b0htjAHUAdABlADuA7QDtQAChYyBpeQEbBhtyAGMAO4DuAO5AOGQAAWN4CxsNG3kANWRjAGwAO4ChAKFAAAFmcssCFhsA4DXYJt1yAGEAdgBlADuA7ADsQIChSCFpbm8AJxsyGzYbAAFpbisbLxtuAHQAAKAMKnQAAKAtIuYhaW4AoNwpdABhAACgKSHsIWlnM2GAAWFvcABDG1sbXhuAAWNndABJG0sbWRtyACthgAFlbHAAcQVRG1UbaQBuAOUAyAVhAHIA9AByBWgAMWFmAACgtyJlAGQAtWEAoggiY2ZvdGkbbRt1G3kb4SFyZQCgBSFpAG4AdKAeImkAZQAAoN0pZABvAPQAWxsAoisiY2VscIEbhRuPG5QbYQBsAACguiIAAWdyiRuNG2UAcgDzACMQ4wCCG2EicmhrAACgFyryIW9kAKA8KgACY2dwdJ8boRukG6gbeQBRZG8AbgAvYWYAAOA12FrdYQC5Y3UAZQBzAHQAO4C/AL9AAAFjabUbuRtyAADgNdi+3G4AAKIIIkVkc3bCG8QbyBvQAwCg+SJvAHQAAKD1Inag9CIAoPMiaaBiIOwhZGUpYesB1hsAANkbYwB5AFZkbAA7gO8A70AAA2NmbW9zdeYb7hvyG/Ub+hsFHAABaXnqG+0bcgBjADVhOWRyAADgNdgn3eEhdGg3YnAAZgAA4DXYW93jAf8bAAADHHIAAOA12L/c8iFjeVhk6yFjeVRkAARhY2ZnaGpvcxUcGhwiHCYcKhwtHDAcNRzwIXBhdqC6A/BjAAFleR4cIRzkIWlsN2E6ZHIAAOA12CjdciJlZW4AOGFjAHkARWRjAHkAXGRwAGYAAOA12FzdYwByAADgNdjA3IALQUJFSGFiY2RlZmdoamxtbm9wcnN0dXYAXhxtHHEcdRx5HN8cBx0dHTwd3B3tHfEdAR4EHh0eLB5FHrwewx7hHgkfPR9LH4ABYXJ0AGQcZxxpHHIA8gBvB/IAxQLhIWlsAKAbKeEhcnIAoA4pZ6BmIgCgiyphAHIAAKBiKWMJjRwAAJAcAACVHAAAAAAAAAAAAACZHJwcAACmHKgcrRwAANIc9SF0ZTph7SJwdHl2AKC0KXIAYQDuAFoG4iFkYbtjZwAAoegnZGyhHKMcAKCRKeUAiwYAoIUqdQBvADuAqwCrQHIAgKOQIWJmaGxwc3QAuhy/HMIcxBzHHMoczhxmoOQhcwAAoB8pcwAAoB0p6wCyGnAAAKCrIWwAAKA5KWkAbQAAoHMpbAAAoKIhAKGrKmFl1hzaHGkAbAAAoBkpc6CtKgDgrSoA/oABYWJyAOUc6RztHHIAcgAAoAwpcgBrAACgcicAAWFr8Rz4HGMAAAFla/Yc9xx7YFtgAAFlc/wc/hwAoIspbAAAAWR1Ax0FHQCgjykAoI0pAAJhZXV5Dh0RHRodHB3yIW9uPmEAAWRpFR0YHWkAbAA8YewAowbiAPccO2QAAmNxcnMkHScdLB05HWEAAKA2KXUAbwDyoBwgqhEAAWR1MB00HeghYXIAoGcpcyJoYXIAAKBLKWgAAKCyIQCiZCJmZ3FzRB1FB5Qdnh10AIACYWhscnQATh1WHWUdbB2NHXIicm93AHSgkCFhAOkAzxxhI3Jwb29uAAABZHVeHWId7yF3bgCgvSFwAACgvCHlJGZ0YXJyb3dzAKDHIWkiZ2h0AIABYWhzAHUdex2DHXIicm93APOglCGdBmEAcgBwAG8AbwBuAPMAzgtxAHUAaQBnAGEAcgByAG8A9wBlGugkcmVldGltZXMAoMsi8aFkIk0HAACaHWwAYQBuAPQAXgcAon0qY2Rnc6YdqR2xHbcdYwAAoKgqbwB0AG+gfypyoIEqAKCDKmXg2iIA/nMAAKCTKoACYWRlZ3MAwB3GHcod1h3ZHXAAcAByAG8A+ACmHG8AdAAAoNYicQAAAWdxzx3SHXQA8gBGB2cAdADyAHQcdADyAFMHaQDtAGMHgAFpbHIA4h3mHeod8yFodACgfClvAG8A8gDKBgDgNdgp3UWgdiIAoJEqYQH1Hf4dcgAAAWR1YB35HWygvCEAoGopbABrAACghCVjAHkAWWQAomoiYWNodAweDx4VHhkecgDyAGsdbwByAG4AZQDyAGAW4SFyZACgaylyAGkAAKD6JQABaW8hHiQe5CFvdEBh9SFzdGGgsCPjIWhlAKCwIwACRWFlczMeNR48HkEeAKBoInAAcKCJKvIhb3gAoIkqcaCHKvGghyo0HmkAbQAAoOYiAARhYm5vcHR3elIeXB5fHoUelh6mHqsetB4AAW5yVh5ZHmcAAKDsJ3IAAKD9IXIA6wCwBmcAgAFsbXIAZh52Hnse5SFmdAABYXKIB2weaQBnAGgAdABhAHIAcgBvAPcAkwfhInBzdG8AoPwnaQBnAGgAdABhAHIAcgBvAPcAmgdwI2Fycm93AAABbHKNHpEeZQBmAPQAxhxpImdodAAAoKwhgAFhZmwAnB6fHqIecgAAoIUpAOA12F3ddQBzAACgLSppIm1lcwAAoDQqYQGvHrMecwB0AACgFyLhAIoOZaHKJbkeRhLuIWdlAKDKJWEAcgBsoCgAdAAAoJMpgAJhY2htdADMHs8e1R7bHt0ecgDyAJ0GbwByAG4AZQDyANYWYQByAGSgyyEAoG0pAKAOIHIAaQAAoL8iAANhY2hpcXTrHu8e1QfzHv0eBh/xIXVvAKA5IHIAAOA12MHcbQDloXIi+h4AAPweAKCNKgCgjyoAAWJ19xwBH28AcqAYIACgGiDyIW9rQmEAhDwAO2NkaGlscXJCBhcfxh0gHyQfKB8sHzEfAAFjaRsfHR8AoKYqcgAAoHkqcgBlAOUAkx3tIWVzAKDJIuEhcnIAoHYpdSJlc3QAAKB7KgABUGk1HzkfYQByAACglillocMlAgdfEnIAAAFkdUIfRx9zImhhcgAAoEop6CFhcgCgZikAAWVuTx9WH3IjdG5lcXEAAOBoIgD+xQBUHwAHRGFjZGVmaGlsbm9wc3VuH3Ifoh+rH68ftx+7H74f5h/uH/MfBwj/HwsgxCFvdACgOiIAAmNscHJ5H30fiR+eH3IAO4CvAK9AAAFldIEfgx8AoEImZaAgJ3MAZQAAoCAnc6CmIXQAbwCAoaYhZGx1AJQfmB+cH28AdwDuAHkDZQBmAPQA6gbwAOkO6yFlcgCgriUAAW95ph+qH+0hbWEAoCkqPGThIXNoAKAUIOElc3VyZWRhbmdsZQCgISJyAADgNdgq3W8AAKAnIYABY2RuAMQfyR/bH3IAbwA7gLUAtUBhoiMi0B8AANMf1x9zAPQAKxFpAHIAAKDwKm8AdAA7gLcAt0B1AHMA4qESIh4TAADjH3WgOCIAoCoqYwHqH+0fcAAAoNsq8gB+GnAAbAB1APMACAgAAWRw9x/7H+UhbHMAoKciZgAA4DXYXt0AAWN0AyAHIHIAAOA12MLc8CFvcwCgPiJsobwDECAVIPQiaW1hcACguCJhAPAAEyAADEdMUlZhYmNkZWZnaGlqbG1vcHJzdHV2dzwgRyBmIG0geSCqILgg2iDeIBEhFSEyIUMhTSFQIZwhnyHSIQAiIyKLIrEivyIUIwABZ3RAIEMgAODZIjgD9uBrItIgBwmAAWVsdABNIF8gYiBmAHQAAAFhclMgWCByInJvdwAAoM0h6SRnaHRhcnJvdwCgziEA4NgiOAP24Goi0iBfCekkZ2h0YXJyb3cAoM8hAAFEZHEgdSDhIXNoAKCvIuEhc2gAoK4igAJiY25wdACCIIYgiSCNIKIgbABhAACgByL1IXRlRGFnAADgICLSIACiSSJFaW9wlSCYIJwgniAA4HAqOANkAADgSyI4A3MASWFyAG8A+AAyCnUAcgBhoG4mbADzoG4mmwjzAa8gAACzIHAAO4CgAKBAbQBwAOXgTiI4AyoJgAJhZW91eQDBIMogzSDWINkg8AHGIAAAyCAAoEMqbwBuAEhh5CFpbEZhbgBnAGSgRyJvAHQAAOBtKjgDcAAAoEIqPWThIXNoAKATIACjYCJBYWRxc3jpIO0g+SD+IAIhDCFyAHIAAKDXIXIAAAFocvIg9SBrAACgJClvoJch9wAGD28AdAAA4FAiOAN1AGkA9gC7CAABZWkGIQohYQByAACgKCntAN8I6SFzdPOgBCLlCHIAAOA12CvdAAJFZXN0/wgcISshLiHxoXEiIiEAABMJ8aFxIgAJAAAnIWwAYQBuAPQAEwlpAO0AGQlyoG8iAKBvIoABQWFwADghOyE/IXIA8gBeIHIAcgAAoK4hYQByAACg8ipzogsiSiEAAAAAxwtkoPwiAKD6ImMAeQBaZIADQUVhZGVzdABcIV8hYiFmIWkhkyGWIXIA8gBXIADgZiI4A3IAcgAAoJohcgAAoCUggKFwImZxcwBwIYQhjiF0AAABYXJ1IXohcgByAG8A9wBlIWkAZwBoAHQAYQByAHIAbwD3AD4h8aFwImAhAACKIWwAYQBuAPQAZwlz4H0qOAMAoG4iaQDtAG0JcqBuImkA5aDqIkUJaQDkADoKAAFwdKMhpyFmAADgNdhf3YCBrAA7aW4AriGvIcchrEBuAIChCSJFZHYAtyG6Ib8hAOD5IjgDbwB0AADg9SI4A+EB1gjEIcYhAKD3IgCg9iJpAHagDCLhAagJzyHRIQCg/iIAoP0igAFhb3IA2CHsIfEhcgCAoSYiYXN0AOAh5SHpIWwAbABlAOwAywhsAADg/SrlIADgAiI4A2wiaW50AACgFCrjoYAi9yEAAPohdQDlAJsJY+CvKjgDZaCAIvEAkwkAAkFhaXQHIgoiFyIeInIA8gBsIHIAcgAAoZshY3cRIhQiAOAzKTgDAOCdITgDZyRodGFycm93AACgmyFyAGkA5aDrIr4JgANjaGltcHF1AC8iPCJHIpwhTSJQIloigKGBImNlcgA2Iv0JOSJ1AOUABgoA4DXYw9zvIXJ0bQKdIQAAAABEImEAcgDhAOEhbQBloEEi8aBEIiYKYQDyAMsIcwB1AAABYnBWIlgi5QDUCeUA3wmAAWJjcABgInMieCKAoYQiRWVzAGci7glqIgDgxSo4A2UAdABl4IIi0iBxAPGgiCJoImMAZaCBIvEA/gmAoYUiRWVzAH8iFgqCIgDgxio4A2UAdABl4IMi0iBxAPGgiSKAIgACZ2lscpIilCKaIpwi7AAMCWwAZABlADuA8QDxQOcAWwlpI2FuZ2xlAAABbHKkIqoi5SFmdGWg6iLxAEUJaSJnaHQAZaDrIvEAvgltoL0DAKEjAGVzuCK8InIAbwAAoBYhcAAAoAcggARESGFkZ2lscnMAziLSItYi2iLeIugi7SICIw8j4SFzaACgrSLhIXJyAKAEKXAAAOBNItIg4SFzaACgrCIAAWV04iLlIgDgZSLSIADgPgDSIG4iZmluAACg3imAAUFldADzIvci+iJyAHIAAKACKQDgZCLSIHLgPADSIGkAZQAA4LQi0iAAAUF0BiMKI3IAcgAAoAMp8iFpZQDgtSLSIGkAbQAA4Dwi0iCAAUFhbgAaIx4jKiNyAHIAAKDWIXIAAAFociMjJiNrAACgIylvoJYh9wD/DuUhYXIAoCcpUxJqFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVCMAAF4jaSN/I4IjjSOeI8AUAAAAAKYjwCMAANoj3yMAAO8jHiQvJD8kRCQAAWNzVyNsFHUAdABlADuA8wDzQAABaXlhI2cjcgBjoJoiO4D0APRAPmSAAmFiaW9zAHEjdCN3I3EBeiNzAOgAdhTsIWFjUWF2AACgOCrvIWxkAKC8KewhaWdTYQABY3KFI4kjaQByAACgvykA4DXYLN1vA5QjAAAAAJYjAACcI24A22JhAHYAZQA7gPIA8kAAoMEpAAFibaEjjAphAHIAAKC1KQACYWNpdKwjryO6I70jcgDyAFkUAAFpcrMjtiNyAACgvinvIXNzAKC7KW4A5QDZCgCgwCmAAWFlaQDFI8gjyyNjAHIATWFnAGEAyWOAAWNkbgDRI9Qj1iPyIW9uv2MAoLYpdQDzAHgBcABmAADgNdhg3YABYWVsAOQj5yPrI3IAAKC3KXIAcAAAoLkpdQDzAHwBAKMoImFkaW9zdvkj/CMPJBMkFiQbJHIA8gBeFIChXSplZm0AAyQJJAwkcgBvoDQhZgAAoDQhO4CqAKpAO4C6ALpA5yFvZgCgtiJyAACgVipsIm9wZQAAoFcqAKBbKoABY2xvACMkJSQrJPIACCRhAHMAaAA7gPgA+EBsAACgmCJpAGwBMyQ4JGQAZQA7gPUA9UBlAHMAYaCXInMAAKA2Km0AbAA7gPYA9kDiIWFyAKA9I+EKXiQAAHokAAB8JJQkAACYJKkkAAAAALUkEQsAAPAkAAAAAAQleiUAAIMlcgCAoSUiYXN0AGUkbyQBCwCBtgA7bGokayS2QGwAZQDsABgDaQJ1JAAAAAB4JG0AAKDzKgCg/Sp5AD9kcgCAAmNpbXB0AIUkiCSLJJkSjyRuAHQAJWBvAGQALmBpAGwAAKAwIOUhbmsAoDEgcgAA4DXYLd2AAWltbwCdJKAkpCR2oMYD1WNtAGEA9AD+B24AZQAAoA4m9KHAA64kAAC0JGMjaGZvcmsAAKDUItZjAAFhdbgkxCRuAAABY2u9JMIkawBooA8hAKAOIfYAaRpzAACkKwBhYmNkZW1zdNMkIRPXJNsk4STjJOck6yTjIWlyAKAjKmkAcgAAoCIqAAFvdYsW3yQAoCUqAKByKm4AO4CxALFAaQBtAACgJip3AG8AAKAnKoABaXB1APUk+iT+JO4idGludACgFSpmAADgNdhh3W4AZAA7gKMAo0CApHoiRWFjZWlub3N1ABMlFSUYJRslTCVRJVklSSV1JQCgsypwAACgtyp1AOUAPwtjoK8qgKJ6ImFjZW5zACclLSU0JTYlSSVwAHAAcgBvAPgAFyV1AHIAbAB5AGUA8QA/C/EAOAuAAWFlcwA8JUElRSXwInByb3gAoLkqcQBxAACgtSppAG0AAKDoImkA7QBEC20AZQDzoDIgIguAAUVhcwBDJVclRSXwAEAlgAFkZnAATwtfJXElgAFhbHMAZSVpJW0l7CFhcgCgLiPpIW5lAKASI/UhcmYAoBMjdKAdIu8AWQvyIWVsAKCwIgABY2l9JYElcgAA4DXYxdzIY24iY3NwAACgCCAAA2Zpb3BzdZElKxuVJZolnyWkJXIAAOA12C7dcABmAADgNdhi3XIiaW1lAACgVyBjAHIAAOA12MbcgAFhZW8AqiW6JcAldAAAAWVpryW2JXIAbgBpAG8AbgDzABkFbgB0AACgFipzAHQAZaA/APEACRj0AG0LgApBQkhhYmNkZWZoaWxtbm9wcnN0dXgA4yXyJfYl+iVpJpAmpia9JtUm5ib4JlonaCdxJ3UnnietJ7EnyCfiJ+cngAFhcnQA6SXsJe4lcgDyAJkM8gD6AuEhaWwAoBwpYQByAPIA3BVhAHIAAKBkKYADY2RlbnFydAAGJhAmEyYYJiYmKyZaJgABZXUKJg0mAOA9IjEDdABlAFVhaQDjACAN7SJwdHl2AKCzKWcAgKHpJ2RlbAAgJiImJCYAoJIpAKClKeUA9wt1AG8AO4C7ALtAcgAApZIhYWJjZmhscHN0dz0mQCZFJkcmSiZMJk4mUSZVJlgmcAAAoHUpZqDlIXMAAKAgKQCgMylzAACgHinrALka8ACVHmwAAKBFKWkAbQAAoHQpbAAAoKMhAKCdIQABYWleJmImaQBsAACgGilvAG6gNiJhAGwA8wB2C4ABYWJyAG8mciZ2JnIA8gAvEnIAawAAoHMnAAFha3omgSZjAAABZWt/JoAmfWBdYAABZXOFJocmAKCMKWwAAAFkdYwmjiYAoI4pAKCQKQACYWV1eZcmmiajJqUm8iFvbllhAAFkaZ4moSZpAGwAV2HsAA8M4gCAJkBkAAJjbHFzrSawJrUmuiZhAACgNylkImhhcgAAoGkpdQBvAPKgHSCjAWgAAKCzIYABYWNnAMMm0iaUC2wAgKEcIWlwcwDLJs4migxuAOUAoAxhAHIA9ADaC3QAAKCtJYABaWxyANsm3ybjJvMhaHQAoH0pbwBvAPIANgwA4DXYL90AAWFv6ib1JnIAAAFkde8m8SYAoMEhbKDAIQCgbCl2oMED8WOAAWducwD+Jk4nUCdoAHQAAANhaGxyc3QKJxInISc1Jz0nRydyInJvdwB0oJIhYQDpAFYmYSNycG9vbgAAAWR1GiceJ28AdwDuAPAmcAAAoMAh5SFmdAABYWgnJy0ncgByAG8AdwDzAAkMYQByAHAAbwBvAG4A8wATBGklZ2h0YXJyb3dzAACgySFxAHUAaQBnAGEAcgByAG8A9wBZJugkcmVldGltZXMAoMwiZwDaYmkAbgBnAGQAbwB0AHMAZQDxABwYgAFhaG0AYCdjJ2YncgDyAAkMYQDyABMEAKAPIG8idXN0AGGgsSPjIWhlAKCxI+0haWQAoO4qAAJhYnB0fCeGJ4knmScAAW5ygCeDJ2cAAKDtJ3IAAKD+IXIA6wAcDIABYWZsAI8nkieVJ3IAAKCGKQDgNdhj3XUAcwAAoC4qaSJtZXMAAKA1KgABYXCiJ6gncgBnoCkAdAAAoJQp7yJsaW50AKASKmEAcgDyADwnAAJhY2hxuCe8J6EMwCfxIXVvAKA6IHIAAOA12MfcAAFidYAmxCdvAPKgGSCoAYABaGlyAM4n0ifWJ3IAZQDlAE0n7SFlcwCgyiJpAIChuSVlZmwAXAxjEt4n9CFyaQCgzinsInVoYXIAoGgpAKAeIWENBSgJKA0oSyhVKIYoAACLKLAoAAAAAOMo5ygAABApJCkxKW0pcSmHKaYpAACYKgAAAACxKmMidXRlAFthcQB1AO8ABR+ApHsiRWFjZWlucHN5ABwoHignKCooLygyKEEoRihJKACgtCrwASMoAAAlKACguCpvAG4AYWF1AOUAgw1koLAqaQBsAF9hcgBjAF1hgAFFYXMAOCg6KD0oAKC2KnAAAKC6KmkAbQAAoOki7yJsaW50AKATKmkA7QCIDUFkbwB0AGKixSKRFgAAAABTKACgZiqAA0FhY21zdHgAYChkKG8ocyh1KHkogihyAHIAAKDYIXIAAAFocmkoayjrAJAab6CYIfcAzAd0ADuApwCnQGkAO2D3IWFyAKApKW0AAAFpbn4ozQBuAHUA8wDOAHQAAKA2J3IA7+A12DDdIxkAAmFjb3mRKJUonSisKHIAcAAAoG8mAAFoeZkonChjAHkASWRIZHIAdABtAqUoAAAAAKgoaQDkAFsPYQByAGEA7ABsJDuArQCtQAABZ22zKLsobQBhAAChwwNmdroouijCY4CjPCJkZWdsbnByAMgozCjPKNMo1yjaKN4obwB0AACgairxoEMiCw5FoJ4qAKCgKkWgnSoAoJ8qZQAAoEYi7CF1cwCgJCrhIXJyAKByKWEAcgDyAPwMAAJhZWl07Sj8KAEpCCkAAWxz8Sj4KGwAcwBlAHQAbQDpAH8oaABwAACgMyrwImFyc2wAoOQpAAFkbFoPBSllAACgIyNloKoqc6CsKgDgrCoA/oABZmxwABUpGCkfKfQhY3lMZGKgLwBhoMQpcgAAoD8jZgAA4DXYZN1hAAABZHIoKRcDZQBzAHWgYCZpAHQAAKBgJoABY3N1ADYpRilhKQABYXU6KUApcABzoJMiAOCTIgD+cABzoJQiAOCUIgD+dQAAAWJwSylWKQChjyJlcz4NUCllAHQAZaCPIvEAPw0AoZAiZXNIDVspZQB0AGWgkCLxAEkNAKGhJWFmZilbBHIAZQFrKVwEAKChJWEAcgDyAAMNAAJjZW10dyl7KX8pgilyAADgNdjI3HQAbQDuAM4AaQDsAAYpYQByAOYAVw0AAWFyiimOKXIA5qAGJhESAAFhbpIpoylpImdodAAAAWVwmSmgKXAAcwBpAGwAbwDuANkXaADpAKAkcwCvYIACYmNtbnAArin8KY4NJSooKgCkgiJFZGVtbnByc7wpvinCKcgpzCnUKdgp3CkAoMUqbwB0AACgvSpkoIYibwB0AACgwyr1IWx0AKDBKgABRWXQKdIpAKDLKgCgiiLsIXVzAKC/KuEhcnIAoHkpgAFlaXUA4inxKfQpdAAAoYIiZW7oKewpcQDxoIYivSllAHEA8aCKItEpbQAAoMcqAAFicPgp+ikAoNUqAKDTKmMAgKJ7ImFjZW5zAAcqDSoUKhYqRihwAHAAcgBvAPgAIyh1AHIAbAB5AGUA8QCDDfEAfA2AAWFlcwAcKiIqPShwAHAAcgBvAPgAPChxAPEAOShnAACgaiYApoMiMTIzRWRlaGxtbnBzPCo/KkIqRSpHKlIqWCpjKmcqaypzKncqO4C5ALlAO4CyALJAO4CzALNAAKDGKgABb3NLKk4qdAAAoL4qdQBiAACg2CpkoIcibwB0AACgxCpzAAABb3VdKmAqbAAAoMknYgAAoNcq4SFycgCgeyn1IWx0AKDCKgABRWVvKnEqAKDMKgCgiyLsIXVzAKDAKoABZWl1AH0qjCqPKnQAAKGDImVugyqHKnEA8aCHIkYqZQBxAPGgiyJwKm0AAKDIKgABYnCTKpUqAKDUKgCg1iqAAUFhbgCdKqEqrCpyAHIAAKDZIXIAAAFocqYqqCrrAJUab6CZIfcAxQf3IWFyAKAqKWwAaQBnADuA3wDfQOELzyrZKtwq6SrsKvEqAAD1KjQrAAAAAAAAAAAAAEwrbCsAAHErvSsAAAAAAADRK3IC1CoAAAAA2CrnIWV0AKAWI8RjcgDrAOUKgAFhZXkA4SrkKucq8iFvbmVh5CFpbGNhQmRvAPQAIg5sInJlYwAAoBUjcgAA4DXYMd0AAmVpa2/7KhIrKCsuK/IBACsAAAkrZQAAATRm6g0EK28AcgDlAOsNYQBzorgDECsAAAAAEit5AG0A0WMAAWNuFislK2sAAAFhcxsrIStwAHAAcgBvAPgAFw5pAG0AAKA8InMA8AD9DQABYXMsKyEr8AAXDnIAbgA7gP4A/kDsATgrOyswG2QA5QBnAmUAcwCAgdcAO2JkAEMrRCtJK9dAYaCgInIAAKAxKgCgMCqAAWVwcwBRK1MraSvhAAkh4qKkIlsrXysAAAAAYytvAHQAAKA2I2kAcgAAoPEqb+A12GXdcgBrAACg2irhAHgociJpbWUAAKA0IIABYWlwAHYreSu3K2QA5QC+DYADYWRlbXBzdACFK6MrmiunK6wrsCuzK24iZ2xlAACitSVkbHFykCuUK5ornCvvIXduAKC/JeUhZnRloMMl8QACBwCgXCJpImdodABloLkl8QBdDG8AdAAAoOwlaSJudXMAAKA6KuwhdXMAoDkqYgAAoM0p6SFtZQCgOyrlInppdW0AoOIjgAFjaHQAwivKK80rAAFyecYrySsA4DXYydxGZGMAeQBbZPIhb2tnYQABaW/UK9creAD0ANERaCJlYWQAAAFsct4r5ytlAGYAdABhAHIAcgBvAPcAXQbpJGdodGFycm93AKCgIQAJQUhhYmNkZmdobG1vcHJzdHV3CiwNLBEsHSwnLDEsQCxLLFIsYix6LIQsjyzLLOgs7Sz/LAotcgDyAAkDYQByAACgYykAAWNyFSwbLHUAdABlADuA+gD6QPIACQ1yAOMBIywAACUseQBeZHYAZQBtYQABaXkrLDAscgBjADuA+wD7QENkgAFhYmgANyw6LD0scgDyANEO7CFhY3FhYQDyAOAOAAFpckQsSCzzIWh0AKB+KQDgNdgy3XIAYQB2AGUAO4D5APlAYQFWLF8scgAAAWxyWixcLACgvyEAoL4hbABrAACggCUAAWN0Zix2LG8CbCwAAAAAcyxyAG4AZaAcI3IAAKAcI28AcAAAoA8jcgBpAACg+CUAAWFsfiyBLGMAcgBrYTuAqACoQAABZ3CILIssbwBuAHNhZgAA4DXYZt0AA2FkaGxzdZksniynLLgsuyzFLHIAcgBvAPcACQ1vAHcAbgBhAHIAcgBvAPcA2A5hI3Jwb29uAAABbHKvLLMsZQBmAPQAWyxpAGcAaAD0AF0sdQDzAKYOaQAAocUDaGzBLMIs0mNvAG4AxWPwI2Fycm93cwCgyCGAAWNpdADRLOEs5CxvAtcsAAAAAN4scgBuAGWgHSNyAACgHSNvAHAAAKAOI24AZwBvYXIAaQAAoPklYwByAADgNdjK3IABZGlyAPMs9yz6LG8AdAAAoPAi7CFkZWlhaQBmoLUlAKC0JQABYW0DLQYtcgDyAMosbAA7gPwA/EDhIm5nbGUAoKcpgAdBQkRhY2RlZmxub3Byc3oAJy0qLTAtNC2bLZ0toS2/LcMtxy3TLdgt3C3gLfwtcgDyABADYQByAHag6CoAoOkqYQBzAOgA/gIAAW5yOC08LechcnQAoJwpgANla25wcnN0AJkpSC1NLVQtXi1iLYItYQBwAHAA4QAaHG8AdABoAGkAbgDnAKEXgAFoaXIAoSmzJFotbwBwAPQAdCVooJUh7wD4JgABaXVmLWotZwBtAOEAuygAAWJwbi14LXMjZXRuZXEAceCKIgD+AODLKgD+cyNldG5lcQBx4IsiAP4A4MwqAP4AAWhyhi2KLWUAdADhABIraSNhbmdsZQAAAWxyki2WLeUhZnQAoLIiaSJnaHQAAKCzInkAMmThIXNoAKCiIoABZWxyAKcttC24LWKiKCKuLQAAAACyLWEAcgAAoLsicQAAoFoi7CFpcACg7iIAAWJ0vC1eD2EA8gBfD3IAAOA12DPddAByAOkAlS1zAHUAAAFicM0t0C0A4IIi0iAA4IMi0iBwAGYAAOA12GfdcgBvAPAAWQt0AHIA6QCaLQABY3XkLegtcgAA4DXYy9wAAWJw7C30LW4AAAFFZXUt8S0A4IoiAP5uAAABRWV/LfktAOCLIgD+6SJnemFnAKCaKYADY2Vmb3BycwANLhAuJS4pLiMuLi40LukhcmN1YQABZGkULiEuAAFiZxguHC5hAHIAAKBfKmUAcaAnIgCgWSLlIXJwAKAYIXIAAOA12DTdcABmAADgNdho3WWgQCJhAHQA6ABqD2MAcgAA4DXYzNzjCuQRUC4AAFQuAABYLmIuAAAAAGMubS5wLnQuAAAAAIguki4AAJouJxIqEnQAcgDpAB0ScgAA4DXYNd0AAUFhWy5eLnIA8gDnAnIA8gCTB75jAAFBYWYuaS5yAPIA4AJyAPIAjAdhAPAAeh5pAHMAAKD7IoABZHB0APgReS6DLgABZmx9LoAuAOA12GnddQDzAP8RaQBtAOUABBIAAUFhiy6OLnIA8gDuAnIA8gCaBwABY3GVLgoScgAA4DXYzdwAAXB0nS6hLmwAdQDzACUScgDpACASAARhY2VmaW9zdbEuvC7ELsguzC7PLtQu2S5jAAABdXm2LrsudABlADuA/QD9QE9kAAFpecAuwy5yAGMAd2FLZG4AO4ClAKVAcgAA4DXYNt1jAHkAV2RwAGYAAOA12GrdYwByAADgNdjO3AABY23dLt8ueQBOZGwAO4D/AP9AAAVhY2RlZmhpb3N38y73Lv8uAi8MLxAvEy8YLx0vIi9jInV0ZQB6YQABYXn7Lv4u8iFvbn5hN2RvAHQAfGEAAWV0Bi8KL3QAcgDmAB8QYQC2Y3IAAOA12DfdYwB5ADZk5yJyYXJyAKDdIXAAZgAA4DXYa91jAHIAAOA12M/cAAFqbiYvKC8AoA0gagAAoAwg"),Ni}var Di={},ap;function op(){if(ap)return Di;ap=1,Object.defineProperty(Di,"__esModule",{value:!0}),Di.xmlDecodeTree=void 0;const e=xb();return Di.xmlDecodeTree=(0,e.decodeBase64)("AAJhZ2xxBwARABMAFQBtAg0AAAAAAA8AcAAmYG8AcwAnYHQAPmB0ADxg9SFvdCJg"),Di}var _i={},lp;function h5(){if(lp)return _i;lp=1,Object.defineProperty(_i,"__esModule",{value:!0}),_i.BinTrieFlags=void 0;var e;return(function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.FLAG13=8192]="FLAG13",t[t.BRANCH_LENGTH=8064]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"})(e||(_i.BinTrieFlags=e={})),_i}var cp;function dp(){return cp||(cp=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.xmlDecodeTree=e.htmlDecodeTree=e.replaceCodePoint=e.fromCodePoint=e.decodeCodePoint=e.EntityDecoder=e.DecodingMode=void 0,e.determineBranch=A,e.decodeHTML=N,e.decodeHTMLAttribute=I,e.decodeHTMLStrict=R,e.decodeXML=w;const t=rp(),n=sp(),r=op(),i=h5();var u;(function(_){_[_.NUM=35]="NUM",_[_.SEMI=59]="SEMI",_[_.EQUALS=61]="EQUALS",_[_.ZERO=48]="ZERO",_[_.NINE=57]="NINE",_[_.LOWER_A=97]="LOWER_A",_[_.LOWER_F=102]="LOWER_F",_[_.LOWER_X=120]="LOWER_X",_[_.LOWER_Z=122]="LOWER_Z",_[_.UPPER_A=65]="UPPER_A",_[_.UPPER_F=70]="UPPER_F",_[_.UPPER_Z=90]="UPPER_Z"})(u||(u={}));const s=32;function a(_){return _>=u.ZERO&&_<=u.NINE}function o(_){return _>=u.UPPER_A&&_<=u.UPPER_F||_>=u.LOWER_A&&_<=u.LOWER_F}function l(_){return _>=u.UPPER_A&&_<=u.UPPER_Z||_>=u.LOWER_A&&_<=u.LOWER_Z||a(_)}function c(_){return _===u.EQUALS||l(_)}var d;(function(_){_[_.EntityStart=0]="EntityStart",_[_.NumericStart=1]="NumericStart",_[_.NumericDecimal=2]="NumericDecimal",_[_.NumericHex=3]="NumericHex",_[_.NamedEntity=4]="NamedEntity"})(d||(d={}));var f;(function(_){_[_.Legacy=0]="Legacy",_[_.Strict=1]="Strict",_[_.Attribute=2]="Attribute"})(f||(e.DecodingMode=f={}));class p{constructor(x,B,P){this.decodeTree=x,this.emitCodePoint=B,this.errors=P,this.state=d.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=f.Strict,this.runConsumed=0}startEntity(x){this.decodeMode=x,this.state=d.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1,this.runConsumed=0}write(x,B){switch(this.state){case d.EntityStart:return x.charCodeAt(B)===u.NUM?(this.state=d.NumericStart,this.consumed+=1,this.stateNumericStart(x,B+1)):(this.state=d.NamedEntity,this.stateNamedEntity(x,B));case d.NumericStart:return this.stateNumericStart(x,B);case d.NumericDecimal:return this.stateNumericDecimal(x,B);case d.NumericHex:return this.stateNumericHex(x,B);case d.NamedEntity:return this.stateNamedEntity(x,B)}}stateNumericStart(x,B){return B>=x.length?-1:(x.charCodeAt(B)|s)===u.LOWER_X?(this.state=d.NumericHex,this.consumed+=1,this.stateNumericHex(x,B+1)):(this.state=d.NumericDecimal,this.stateNumericDecimal(x,B))}stateNumericHex(x,B){for(;B<x.length;){const P=x.charCodeAt(B);if(a(P)||o(P)){const G=P<=u.NINE?P-u.ZERO:(P|s)-u.LOWER_A+10;this.result=this.result*16+G,this.consumed++,B++}else return this.emitNumericEntity(P,3)}return-1}stateNumericDecimal(x,B){for(;B<x.length;){const P=x.charCodeAt(B);if(a(P))this.result=this.result*10+(P-u.ZERO),this.consumed++,B++;else return this.emitNumericEntity(P,2)}return-1}emitNumericEntity(x,B){var P;if(this.consumed<=B)return(P=this.errors)===null||P===void 0||P.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(x===u.SEMI)this.consumed+=1;else if(this.decodeMode===f.Strict)return 0;return this.emitCodePoint((0,t.replaceCodePoint)(this.result),this.consumed),this.errors&&(x!==u.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(x,B){const{decodeTree:P}=this;let G=P[this.treeIndex],J=(G&i.BinTrieFlags.VALUE_LENGTH)>>14;for(;B<x.length;){if(J===0&&(G&i.BinTrieFlags.FLAG13)!==0){const se=(G&i.BinTrieFlags.BRANCH_LENGTH)>>7;if(this.runConsumed===0){const W=G&i.BinTrieFlags.JUMP_TABLE;if(x.charCodeAt(B)!==W)return this.result===0?0:this.emitNotTerminatedNamedEntity();B++,this.excess++,this.runConsumed++}for(;this.runConsumed<se;){if(B>=x.length)return-1;const W=this.runConsumed-1,V=P[this.treeIndex+1+(W>>1)],ke=W%2===0?V&255:V>>8&255;if(x.charCodeAt(B)!==ke)return this.runConsumed=0,this.result===0?0:this.emitNotTerminatedNamedEntity();B++,this.excess++,this.runConsumed++}this.runConsumed=0,this.treeIndex+=1+(se>>1),G=P[this.treeIndex],J=(G&i.BinTrieFlags.VALUE_LENGTH)>>14}if(B>=x.length)break;const q=x.charCodeAt(B);if(q===u.SEMI&&J!==0&&(G&i.BinTrieFlags.FLAG13)!==0)return this.emitNamedEntityData(this.treeIndex,J,this.consumed+this.excess);if(this.treeIndex=A(P,G,this.treeIndex+Math.max(1,J),q),this.treeIndex<0)return this.result===0||this.decodeMode===f.Attribute&&(J===0||c(q))?0:this.emitNotTerminatedNamedEntity();if(G=P[this.treeIndex],J=(G&i.BinTrieFlags.VALUE_LENGTH)>>14,J!==0){if(q===u.SEMI)return this.emitNamedEntityData(this.treeIndex,J,this.consumed+this.excess);this.decodeMode!==f.Strict&&(G&i.BinTrieFlags.FLAG13)===0&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}B++,this.excess++}return-1}emitNotTerminatedNamedEntity(){var x;const{result:B,decodeTree:P}=this,G=(P[B]&i.BinTrieFlags.VALUE_LENGTH)>>14;return this.emitNamedEntityData(B,G,this.consumed),(x=this.errors)===null||x===void 0||x.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(x,B,P){const{decodeTree:G}=this;return this.emitCodePoint(B===1?G[x]&~(i.BinTrieFlags.VALUE_LENGTH|i.BinTrieFlags.FLAG13):G[x+1],P),B===3&&this.emitCodePoint(G[x+2],P),P}end(){var x;switch(this.state){case d.NamedEntity:return this.result!==0&&(this.decodeMode!==f.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case d.NumericDecimal:return this.emitNumericEntity(0,2);case d.NumericHex:return this.emitNumericEntity(0,3);case d.NumericStart:return(x=this.errors)===null||x===void 0||x.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case d.EntityStart:return 0}}}e.EntityDecoder=p;function m(_){let x="";const B=new p(_,P=>x+=(0,t.fromCodePoint)(P));return function(G,J){let q=0,se=0;for(;(se=G.indexOf("&",se))>=0;){x+=G.slice(q,se),B.startEntity(J);const V=B.write(G,se+1);if(V<0){q=se+B.end();break}q=se+V,se=V===0?q+1:q}const W=x+G.slice(q);return x="",W}}function A(_,x,B,P){const G=(x&i.BinTrieFlags.BRANCH_LENGTH)>>7,J=x&i.BinTrieFlags.JUMP_TABLE;if(G===0)return J!==0&&P===J?B:-1;if(J){const V=P-J;return V<0||V>=G?-1:_[B+V]-1}const q=G+1>>1;let se=0,W=G-1;for(;se<=W;){const V=se+W>>>1,ke=V>>1,oe=_[B+ke]>>(V&1)*8&255;if(oe<P)se=V+1;else if(oe>P)W=V-1;else return _[B+q+V]}return-1}const E=m(n.htmlDecodeTree),g=m(r.xmlDecodeTree);function N(_,x=f.Legacy){return E(_,x)}function I(_){return E(_,f.Attribute)}function R(_){return E(_,f.Strict)}function w(_){return g(_,f.Strict)}var k=rp();Object.defineProperty(e,"decodeCodePoint",{enumerable:!0,get:function(){return k.decodeCodePoint}}),Object.defineProperty(e,"fromCodePoint",{enumerable:!0,get:function(){return k.fromCodePoint}}),Object.defineProperty(e,"replaceCodePoint",{enumerable:!0,get:function(){return k.replaceCodePoint}});var O=sp();Object.defineProperty(e,"htmlDecodeTree",{enumerable:!0,get:function(){return O.htmlDecodeTree}});var Q=op();Object.defineProperty(e,"xmlDecodeTree",{enumerable:!0,get:function(){return Q.xmlDecodeTree}})})(rl)),rl}var Oi={},ul={},fp;function cc(){return fp||(fp=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.escapeText=e.escapeAttribute=e.escapeUTF8=e.escape=e.XML_BITSET_VALUE=e.getCodePoint=void 0,e.encodeXML=n;const t=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);e.getCodePoint=String.prototype.codePointAt==null?(i,u)=>(i.charCodeAt(u)&64512)===55296?(i.charCodeAt(u)-55296)*1024+i.charCodeAt(u+1)-56320+65536:i.charCodeAt(u):(i,u)=>i.codePointAt(u),e.XML_BITSET_VALUE=1342177476;function n(i){let u,s=0;const{length:a}=i;for(let o=0;o<a;o++){const l=i.charCodeAt(o);if(l<128&&((e.XML_BITSET_VALUE>>>l&1)===0||l>=64||l<32))continue;if(u===void 0?u=i.substring(0,o):s!==o&&(u+=i.substring(s,o)),l<64){u+=t.get(l),s=o+1;continue}const c=(0,e.getCodePoint)(i,o);u+=`&#x${c.toString(16)};`,c!==l&&o++,s=o+1}return u===void 0?i:(s<a&&(u+=i.substr(s)),u)}e.escape=n;function r(i,u){return function(a){let o,l=0,c="";for(;o=i.exec(a);)l!==o.index&&(c+=a.substring(l,o.index)),c+=u.get(o[0].charCodeAt(0)),l=o.index+1;return c+a.substring(l)}}e.escapeUTF8=r(/["&'<>]/g,t),e.escapeAttribute=r(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),e.escapeText=r(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))})(ul)),ul}var Ri={},ds={},hp;function p5(){if(hp)return ds;hp=1,Object.defineProperty(ds,"__esModule",{value:!0}),ds.parseEncodeTrie=e;function e(t){const n=new Map,r=t.length;let i=0,u=-1;function s(){const o=i;for(;i<r;){const l=t.charAt(i);if((l<"0"||l>"9")&&(l<"a"||l>"z"))break;i++}return i===o?0:Number.parseInt(t.slice(o,i),36)}function a(){if(t[i]!=="&")throw new Error(`Child entry missing value near index ${i}`);const o=i,l=t.indexOf(";",i+1);if(l===-1)throw new Error(`Unterminated entity starting at index ${o}`);return i=l+1,t.slice(o,i)}for(;i<r;){const o=s(),l=u===-1?o:u+o+1;let c;if(t[i]==="&"&&(c=a()),t[i]==="{"){i++;let d=s(),f=d;const p=a();if(t[i]==="{")throw new Error("Unexpected nested '{' beyond depth 2");if(t[i]==="}")n.set(l,{value:c,next:f,nextValue:p}),i++;else{const m=new Map;m.set(f,p);let A=f;for(;i<r&&t[i]!=="}";){d=s(),f=A+d+1;const E=a();if(t[i]==="{")throw new Error("Unexpected nested '{' beyond depth 2");m.set(f,E),A=f}if(t[i]!=="}")throw new Error("Unterminated child block");i++,n.set(l,{value:c,next:m})}}else{if(c===void 0)throw new Error(`Malformed encode trie: missing value at index ${i}`);n.set(l,c)}u=l}return n}return ds}var pp;function m5(){if(pp)return Ri;pp=1,Object.defineProperty(Ri,"__esModule",{value:!0}),Ri.htmlTrie=void 0;const e=p5();return Ri.htmlTrie=(0,e.parseEncodeTrie)("9	
m!"#$%&'()*+,1./a:;<{6he<⃒}={6hx=⃥}>{6he>⃒}?@q[\]^_`5{2yfj}k{|}y ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒē2ĖėĘęĚěĜĝĞğĠġĢ1ĤĥĦħĨĩĪī2ĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌō2ŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžjƒyƵ1rǵ1tȷ3yˆˇg˘˙˚˛˜˝1f̑3jΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ1ΣΤΥΦΧΨΩ7αβγδεζηθικλμνξοπρςστυφχψω7ϑϒ2ϕϖ5Ϝϝiϰϱ3ϵ϶aЁЂЃЄЅІЇЈЉЊЋЌ1ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя1ёђѓєѕіїјљњћќ1ўџ5gi    1    ​‌‍‎‏‐2–—―‖1‘’‚1“”„1†‡•2‥…9‰‱′″‴‵3‹›3‾2⁁1⁃⁄a⁏7⁗7 {6bu  }⁠⁡⁢⁣20€1a⃛⃜11ℂ2℅4ℊℋℌℍℎℏℐℑℒℓ1ℕ№℗℘ℙℚℛℜℝ℞3™1ℤ2℧ℨ℩2ℬℭ1ℯℰℱ1ℳℴℵℶℷℸcⅅⅆⅇⅈa⅓⅔⅕⅖⅗⅘⅙⅚⅛⅜⅝⅞1d←↑→↓↔↕↖↗↘↙↚↛1↝{mw↝̸}↞↟↠↡↢↣↤↥↦↧1↩↪↫↬↭↮1↰↱↲↳1↵↶↷2↺↻↼↽↾↿⇀⇁⇂⇃⇄⇅⇆⇇⇈⇉⇊⇋⇌⇍⇎⇏⇐⇑⇒⇓⇔⇕⇖⇗⇘⇙⇚⇛1⇝6⇤⇥f⇵7⇽⇾⇿∀∁∂{mw∂̸}∃∄∅1∇∈∉1∋∌2∏∐∑−∓∔1∖∗∘1√2∝∞∟∠{6he∠⃒}∡∢∣∤∥∦∧∨∩{1e68∩︀}∪{1e68∪︀}∫∬∭∮∯∰∱∲∳∴∵∶∷∸1∺∻∼{6he∼⃒}∽{mp∽̱}∾{mr∾̳}∿≀≁≂{mw≂̸}≃≄≅≆≇≈≉≊≋{mw≋̸}≌≍{6he≍⃒}≎{mw≎̸}≏{mw≏̸}≐{mw≐̸}≑≒≓≔≕≖≗1≙≚1≜2≟≠≡{6hx≡⃥}≢1≤{6he≤⃒}≥{6he≥⃒}≦{mw≦̸}≧{mw≧̸}≨{1e68≨︀}≩{1e68≩︀}≪{mw≪̸5uh≪⃒}≫{mw≫̸5uh≫⃒}≬≭≮≯≰≱≲≳≴≵≶≷≸≹≺≻≼≽≾≿{mw≿̸}⊀⊁⊂{6he⊂⃒}⊃{6he⊃⃒}⊄⊅⊆⊇⊈⊉⊊{1e68⊊︀}⊋{1e68⊋︀}1⊍⊎⊏{mw⊏̸}⊐{mw⊐̸}⊑⊒⊓{1e68⊓︀}⊔{1e68⊔︀}⊕⊖⊗⊘⊙⊚⊛1⊝⊞⊟⊠⊡⊢⊣⊤⊥1⊧⊨⊩⊪⊫⊬⊭⊮⊯⊰1⊲⊳⊴{6he⊴⃒}⊵{6he⊵⃒}⊶⊷⊸⊹⊺⊻1⊽⊾⊿⋀⋁⋂⋃⋄⋅⋆⋇⋈⋉⋊⋋⋌⋍⋎⋏⋐⋑⋒⋓⋔⋕⋖⋗⋘{mw⋘̸}⋙{mw⋙̸}⋚{1e68⋚︀}⋛{1e68⋛︀}2⋞⋟⋠⋡⋢⋣2⋦⋧⋨⋩⋪⋫⋬⋭⋮⋯⋰⋱⋲⋳⋴⋵{mw⋵̸}⋶⋷1⋹{mw⋹̸}⋺⋻⋼⋽⋾6⌅⌆1⌈⌉⌊⌋⌌⌍⌎⌏⌐1⌒⌓1⌕⌖5⌜⌝⌞⌟2⌢⌣9⌭⌮7⌶6⌽1⌿1o⍼1f⎰⎱2⎴⎵⎶11⏜⏝⏞⏟2⏢4⏧1n␣4kⓈ1j─1│9┌3┐3└3┘3├7┤7┬7┴7┼j═║╒╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡╢╣╤╥╦╧╨╩╪╫╬j▀3▄3█8░▒▓d□8▪▫1▭▮2▱1△▴▵2▸▹3▽▾▿2◂◃6◊○w◬2◯8◸◹◺◻◼8★☆7☎1d♀1♂t♠2♣1♥♦3♪2♭♮♯4j✓3✗8✠l✶x❘p❲❳2c⟈⟉s⟦⟧⟨⟩⟪⟫⟬⟭7⟵⟶⟷⟸⟹⟺1⟼2⟿76⤂⤃⤄⤅6⤌⤍⤎⤏⤐⤑⤒⤓2⤖2⤙⤚⤛⤜⤝⤞⤟⤠2⤣⤤⤥⤦⤧⤨⤩⤪8⤳{mw⤳̸}1⤵⤶⤷⤸⤹2⤼⤽7⥅2⥈⥉⥊⥋2⥎⥏⥐⥑⥒⥓⥔⥕⥖⥗⥘⥙⥚⥛⥜⥝⥞⥟⥠⥡⥢⥣⥤⥥⥦⥧⥨⥩⥪⥫⥬⥭⥮⥯⥰⥱⥲⥳⥴⥵⥶1⥸⥹1⥻⥼⥽⥾⥿5⦅⦆4⦋⦌⦍⦎⦏⦐⦑⦒⦓⦔⦕⦖3⦚1⦜⦝6⦤⦥⦦⦧⦨⦩⦪⦫⦬⦭⦮⦯⦰⦱⦲⦳⦴⦵⦶⦷1⦹1⦻⦼1⦾⦿⧀⧁⧂⧃⧄⧅3⧉3⧍⧎⧏{mw⧏̸}⧐{mw⧐̸}b⧜⧝⧞4⧣⧤⧥5⧫8⧴1⧶9⨀⨁⨂1⨄1⨆5⨌⨍2⨐⨑⨒⨓⨔⨕⨖⨗a⨢⨣⨤⨥⨦⨧1⨩⨪2⨭⨮⨯⨰⨱1⨳⨴⨵⨶⨷⨸⨹⨺⨻⨼2⨿⩀1⩂⩃⩄⩅⩆⩇⩈⩉⩊⩋⩌⩍2⩐2⩓⩔⩕⩖⩗⩘1⩚⩛⩜⩝1⩟6⩦3⩪2⩭{mw⩭̸}⩮⩯⩰{mw⩰̸}⩱⩲⩳⩴⩵1⩷⩸⩹⩺⩻⩼⩽{mw⩽̸}⩾{mw⩾̸}⩿⪀⪁⪂⪃⪄⪅⪆⪇⪈⪉⪊⪋⪌⪍⪎⪏⪐⪑⪒⪓⪔⪕⪖⪗⪘⪙⪚2⪝⪞⪟⪠⪡{mw⪡̸}⪢{mw⪢̸}1⪤⪥⪦⪧⪨⪩⪪⪫⪬{1e68⪬︀}⪭{1e68⪭︀}⪮⪯{mw⪯̸}⪰{mw⪰̸}2⪳⪴⪵⪶⪷⪸⪹⪺⪻⪼⪽⪾⪿⫀⫁⫂⫃⫄⫅{mw⫅̸}⫆{mw⫆̸}⫇⫈2⫋{1e68⫋︀}⫌{1e68⫌︀}2⫏⫐⫑⫒⫓⫔⫕⫖⫗⫘⫙⫚⫛8⫤1⫦⫧⫨⫩1⫫⫬⫭⫮⫯⫰⫱⫲⫳9⫽{6hx⫽⃥}y7r{17ks𝒜1𝒞𝒟2𝒢2𝒥𝒦2𝒩𝒪𝒫𝒬1𝒮𝒯𝒰𝒱𝒲𝒳𝒴𝒵𝒶𝒷𝒸𝒹1𝒻1𝒽𝒾𝒿𝓀𝓁𝓂𝓃1𝓅𝓆𝓇𝓈𝓉𝓊𝓋𝓌𝓍𝓎𝓏1g𝔄𝔅1𝔇𝔈𝔉𝔊2𝔍𝔎𝔏𝔐𝔑𝔒𝔓𝔔1𝔖𝔗𝔘𝔙𝔚𝔛𝔜1𝔞𝔟𝔠𝔡𝔢𝔣𝔤𝔥𝔦𝔧𝔨𝔩𝔪𝔫𝔬𝔭𝔮𝔯𝔰𝔱𝔲𝔳𝔴𝔵𝔶𝔷𝔸𝔹1𝔻𝔼𝔽𝔾1𝕀𝕁𝕂𝕃𝕄1𝕆3𝕊𝕋𝕌𝕍𝕎𝕏𝕐1𝕒𝕓𝕔𝕕𝕖𝕗𝕘𝕙𝕚𝕛𝕜𝕝𝕞𝕟𝕠𝕡𝕢𝕣𝕤𝕥𝕦𝕧𝕨𝕩𝕪𝕫}6vefffiflffiffl"),Ri}var mp;function Ap(){if(mp)return Oi;mp=1,Object.defineProperty(Oi,"__esModule",{value:!0}),Oi.encodeHTML=i,Oi.encodeNonAsciiHTML=u;const e=cc(),t=m5(),n=new Uint32Array([5632,4227923966,4160749569,939524097]),r=new Uint32Array([0,e.XML_BITSET_VALUE,0,0]);function i(a){return s(n,a)}function u(a){return s(r,a)}function s(a,o){let l,c=0;const{length:d}=o;for(let f=0;f<d;f++){const p=o.charCodeAt(f);if(p<128&&!(a[p>>>5]>>>p&1))continue;l===void 0?l=o.substring(0,f):c!==f&&(l+=o.substring(c,f));let m=t.htmlTrie.get(p);if(typeof m=="object"){if(f+1<d){const A=o.charCodeAt(f+1),E=typeof m.next=="number"?m.next===A?m.nextValue:void 0:m.next.get(A);if(E!==void 0){l+=E,f++,c=f+1;continue}}m=m.value}if(m===void 0){const A=(0,e.getCodePoint)(o,f);l+=`&#x${A.toString(16)};`,A!==p&&f++,c=f+1}else l+=m,c=f+1}return l===void 0?o:(c<d&&(l+=o.substr(c)),l)}return Oi}var gp;function A5(){return gp||(gp=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.escapeUTF8=e.escapeText=e.escapeAttribute=e.encodeXML=e.encodeNonAsciiHTML=e.encodeHTML5=e.encodeHTML4=e.encodeHTML=e.EntityDecoder=e.decodeXMLStrict=e.decodeXML=e.decodeHTML5Strict=e.decodeHTML4Strict=e.decodeHTMLStrict=e.decodeHTMLAttribute=e.decodeHTML5=e.decodeHTML4=e.decodeHTML=e.DecodingMode=e.EncodingMode=e.EntityLevel=void 0,e.decode=s,e.decodeStrict=a,e.encode=o;const t=dp(),n=Ap(),r=cc();var i;(function(f){f[f.XML=0]="XML",f[f.HTML=1]="HTML"})(i||(e.EntityLevel=i={}));var u;(function(f){f[f.UTF8=0]="UTF8",f[f.ASCII=1]="ASCII",f[f.Extensive=2]="Extensive",f[f.Attribute=3]="Attribute",f[f.Text=4]="Text"})(u||(e.EncodingMode=u={}));function s(f,p=i.XML){if((typeof p=="number"?p:p.level)===i.HTML){const A=typeof p=="object"?p.mode:void 0;return(0,t.decodeHTML)(f,A)}return(0,t.decodeXML)(f)}function a(f,p=i.XML){var m;const A=typeof p=="number"?{level:p}:p;return(m=A.mode)!==null&&m!==void 0||(A.mode=t.DecodingMode.Strict),s(f,A)}function o(f,p=i.XML){const{mode:m=u.Extensive,level:A=i.XML}=typeof p=="number"?{level:p}:p;switch(m){case u.UTF8:return(0,r.escapeUTF8)(f);case u.Attribute:return(0,r.escapeAttribute)(f);case u.Text:return(0,r.escapeText)(f);case u.ASCII:return A===i.HTML?(0,n.encodeNonAsciiHTML)(f):(0,r.encodeXML)(f);case u.Extensive:default:return A===i.HTML?(0,n.encodeHTML)(f):(0,r.encodeXML)(f)}}var l=dp();Object.defineProperty(e,"DecodingMode",{enumerable:!0,get:function(){return l.DecodingMode}}),Object.defineProperty(e,"decodeHTML",{enumerable:!0,get:function(){return l.decodeHTML}}),Object.defineProperty(e,"decodeHTML4",{enumerable:!0,get:function(){return l.decodeHTML}}),Object.defineProperty(e,"decodeHTML5",{enumerable:!0,get:function(){return l.decodeHTML}}),Object.defineProperty(e,"decodeHTMLAttribute",{enumerable:!0,get:function(){return l.decodeHTMLAttribute}}),Object.defineProperty(e,"decodeHTMLStrict",{enumerable:!0,get:function(){return l.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML4Strict",{enumerable:!0,get:function(){return l.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML5Strict",{enumerable:!0,get:function(){return l.decodeHTMLStrict}}),Object.defineProperty(e,"decodeXML",{enumerable:!0,get:function(){return l.decodeXML}}),Object.defineProperty(e,"decodeXMLStrict",{enumerable:!0,get:function(){return l.decodeXML}}),Object.defineProperty(e,"EntityDecoder",{enumerable:!0,get:function(){return l.EntityDecoder}});var c=Ap();Object.defineProperty(e,"encodeHTML",{enumerable:!0,get:function(){return c.encodeHTML}}),Object.defineProperty(e,"encodeHTML4",{enumerable:!0,get:function(){return c.encodeHTML}}),Object.defineProperty(e,"encodeHTML5",{enumerable:!0,get:function(){return c.encodeHTML}}),Object.defineProperty(e,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return c.encodeNonAsciiHTML}});var d=cc();Object.defineProperty(e,"encodeXML",{enumerable:!0,get:function(){return d.encodeXML}}),Object.defineProperty(e,"escape",{enumerable:!0,get:function(){return d.escape}}),Object.defineProperty(e,"escapeAttribute",{enumerable:!0,get:function(){return d.escapeAttribute}}),Object.defineProperty(e,"escapeText",{enumerable:!0,get:function(){return d.escapeText}}),Object.defineProperty(e,"escapeUTF8",{enumerable:!0,get:function(){return d.escapeUTF8}})})(nl)),nl}var fs={},bp;function g5(){return bp||(bp=1,fs.romanize=function(e){if(isNaN(e))return NaN;for(var t=String(+e).split(""),n=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"],r="",i=3;i--;)r=(n[+t.pop()+i*10]||"")+r;return Array(+t.join("")+1).join("M")+r},fs.alphanumeric=function(e){for(var t="",n;e>0;)n=(e-1)%26,t=String.fromCharCode(65+n)+t,e=(e-n)/26|0;return t||void 0}),fs}var sl,Ep;function b5(){if(Ep)return sl;Ep=1;const e=r=>{let i="";do i=(Math.random()+1).toString(36).substring(2);while(r.indexOf(i)!==-1);return i},t=(r,i)=>{let u=/([a-z\-]+)\s*\(\s*([^\(\)]*?)\s*(?:,\s*([^\(\)]*?)\s*)?\s*\)/i,s=[],a,o=e(i);for(;(a=u.exec(i))!==null;){let c=`${s.length}`;if(a[1].toLowerCase()=="var"){const f=n(r,a[2]);if(f){i=i.replace(a[0],f);continue}if(a[3]){i=i.replace(a[0],a[3]);continue}}let d=`${o}${c.padStart(5,"-")}`;i=i.replace(a[0],d),s.push({placeholder:d,replace:a[0]})}for(var l=s.length-1;l>=0;l--){const c=s[l];i=i.replace(c.placeholder,c.replace)}return i},n=(r,i)=>{for(;r;){if(r.styleProps&&i in r.styleProps)return r.styleProps[i].value;var r=r.pseudoElementParent||r.parent}};return sl={replaceVariables:t,findVariableValue:n},sl}var al,yp;function E5(){if(yp)return al;yp=1;var{decode:e}=A5(),t=Ef(),n=g5(),r=b5();return al=function(u){u.ignoredPseudos=["hover","active","focus","visited","link"],u.widthElements=["TABLE","TD","TH","IMG"],u.heightElements=["TABLE","TD","TH","IMG"],u.tableElements=["TABLE","TH","TR","TD","CAPTION","COLGROUP","COL","THEAD","TBODY","TFOOT"],u.nonVisualElements=["HEAD","TITLE","BASE","LINK","STYLE","META","SCRIPT","NOSCRIPT"],u.styleToAttribute={"background-color":"bgcolor","background-image":"background","text-align":"align","vertical-align":"valign"},u.excludedProperties=[],u.juiceDocument=p,u.inlineDocument=s;function s(g,N,I){I=I||{};var R=t.parseCSS(N),w=[],k="style",O={},Q=I.removeInlinedSelectors?new Set:null;I.styleAttributeName&&(k=I.styleAttributeName);function _(W){var V=W[0],ke=W[1],C=new t.Selector(V),oe=C.parsed();if(oe){for(var Ne=c(oe),S=0;S<oe.length;++S){var tt=oe[S];if(tt.pseudos)for(var Pt=0;Pt<tt.pseudos.length;++Pt){var Le=tt.pseudos[Pt];if(u.ignoredPseudos.indexOf(Le.name)>=0)return}}if(Ne){var Kt=oe[oe.length-1],Qt=Kt.pseudos;Kt.pseudos=f(Kt.pseudos),V=oe.toString(),Kt.pseudos=Qt}var rn;try{rn=g(V)}catch{return}var un=!1;rn.each(function(){var ge=this;if(ge.name&&u.nonVisualElements.indexOf(ge.name.toUpperCase())>=0)return;if(un=!0,ge.counterProps||(ge.counterProps=ge.parent&&ge.parent.counterProps?Object.create(ge.parent.counterProps):{}),Ne){var Ei="pseudo"+Ne,sn=ge[Ei];sn||(sn=ge[Ei]=g("<span />").get(0),sn.pseudoElementType=Ne,sn.pseudoElementParent=ge,sn.counterProps=ge.counterProps,ge[Ei]=sn),ge=sn}if(!ge.styleProps){if(ge.styleProps={},g(ge).attr(k)){var Vu=g(ge).attr(k),qu=I.decodeStyleAttributes?e(Vu):Vu,Ju="* { "+qu+" } ";yi(t.parseCSS(Ju)[0][1],new t.Selector("<style>",!0))}w.push(ge)}function ju(Je,an){for(var ve=an.split(/\s+/),nt=0;nt<ve.length;nt++){var Re=ve[nt],st=parseInt(ve[nt+1],10);isNaN(st)?Je.counterProps[Re]=O[Re]=0:Je.counterProps[Re]=O[ve[nt++]]=st}}function Ha(Je,an){for(var ve=an.split(/\s+/),nt=0;nt<ve.length;nt++){var Re=ve[nt];if(Je.counterProps[Re]!==void 0){var st=parseInt(ve[nt+1],10);isNaN(st)?Je.counterProps[Re]=O[Re]+=1:Je.counterProps[Re]=O[ve[nt++]]+=st}}}function yi(Je,an){for(var ve=0,nt=Je.length;ve<nt;ve++)if(Je[ve].type=="property"){var Re=Je[ve].name,st=Je[ve].value;Re==="counter-reset"&&ju(ge,st),Re==="counter-increment"&&Ha(ge,st);var L=st.match(/!important$/)!==null;L&&!I.preserveImportant&&(st=a(st));var Y=[Je[ve].position.start.line,Je[ve].position.start.col],j=new t.Property(Re,st,an,L?2:0,Y),te=ge.styleProps[Re];if(u.excludedProperties.indexOf(Re)<0)if(I.inlineDuplicateProperties)if(te)if(te.selector===an)j.nextProp=te,ge.styleProps[Re]=j;else{for(var Ae=te;Ae.nextProp;)Ae=Ae.nextProp;Ae.nextProp=j}else ge.styleProps[Re]=j;else(te&&te.compare(j)===j||!te)&&(te&&te.selector!==an?delete ge.styleProps[Re]:te&&(j.nextProp=te),ge.styleProps[Re]=j)}}yi(ke,C)}),un&&Q&&Q.add(W[0])}}function x(W){Object.keys(W.styleProps).length;var V=[];Object.keys(W.styleProps).forEach(function(C){for(var oe=W.styleProps[C];typeof oe<"u";)V.push(oe),oe=oe.nextProp}),V.sort(function(C,oe){return C.compareFunc(oe)});var ke=V.filter(function(C){return I.resolveCSSVariables&&C.prop.indexOf("--")===0?!1:C.prop!=="content"}).map(function(C){return I.resolveCSSVariables&&(C.value=r.replaceVariables(W,C.value)),C.prop+": "+C.value.replace(/["]/g,"'")+";"}).join(" ");ke&&g(W).attr(k,ke)}function B(W){if(W.pseudoElementType&&W.styleProps.content){var V=l(W);V.img?(W.name="img",g(W).attr("src",V.img)):g(W).text(V);var ke=W.pseudoElementParent;W.pseudoElementType==="before"?g(ke).prepend(W):g(ke).append(W)}}function P(W,V){if(W.name){var ke=W.name.toUpperCase();if(u[V+"Elements"].indexOf(ke)>-1){for(var C in W.styleProps)if(W.styleProps[C].prop===V){var oe=W.styleProps[C].value;if(I.preserveImportant&&(oe=a(oe)),oe.match(/(px|auto)/)){var Ne=oe.replace("px","");g(W).attr(V,Ne);return}if(u.tableElements.indexOf(ke)>-1&&oe.match(/\%/)){g(W).attr(V,oe);return}}}}}function G(W){return W.indexOf("url(")!==0?W:W.replace(/^url\((["'])?([^"']+)\1\)$/,"$2")}function J(W){if(W.name){var V=W.name.toUpperCase(),ke=Object.keys(u.styleToAttribute);if(u.tableElements.indexOf(V)>-1){for(var C in W.styleProps)if(ke.indexOf(W.styleProps[C].prop)>-1){var oe=u.styleToAttribute[W.styleProps[C].prop],Ne=W.styleProps[C].value;if(I.preserveImportant&&(Ne=a(Ne)),oe==="background"&&(Ne=G(Ne)),/(linear|radial)-gradient\(/i.test(Ne))continue;g(W).attr(oe,Ne)}}}}if(R.forEach(_),w.forEach(x),I.inlinePseudoElements&&w.forEach(B),I.applyWidthAttributes&&w.forEach(function(W){P(W,"width")}),I.applyHeightAttributes&&w.forEach(function(W){P(W,"height")}),I.applyAttributesTableElements&&w.forEach(J),I.insertPreservedExtraCss&&I.extraCss){var q=t.getPreservedText(I.extraCss,{mediaQueries:I.preserveMediaQueries,fontFaces:I.preserveFontFaces,keyFrames:I.preserveKeyFrames,preservedSelectors:I.preservedSelectors});if(q){var se=null;I.insertPreservedExtraCss!==!0?se=g(I.insertPreservedExtraCss):(se=g("head"),se.length||(se=g("body")),se.length||(se=g.root())),se.first().append("<style>"+q+"</style>")}}return Q}function a(g){return g.replace(/\s*!important$/,"")}function o(g,N){switch(N){case"lower-roman":return n.romanize(g).toLowerCase();case"upper-roman":return n.romanize(g);case"lower-latin":case"lower-alpha":return n.alphanumeric(g).toLowerCase();case"upper-latin":case"upper-alpha":return n.alphanumeric(g);default:return g.toString()}}function l(g){var N=g.styleProps.content.value;if(N==="none"||N==="normal")return"";var I=N.match(/^\s*url\s*\(\s*(.*?)\s*\)\s*$/i);if(I){var R=I[1].replace(/^['"]|['"]$/g,"");return{img:R}}for(var w=[],k=N.split(/['"]/),O=0;O<k.length;O++)if(k[O]!==""){var Q=k[O].match(/var\s*\(\s*(.*?)\s*(,\s*(.*?)\s*)?\s*\)/i);if(Q){var _=r.findVariableValue(g,Q[1])||Q[2];w.push(_.replace(/^['"]|['"]$/g,""));continue}var x=k[O].match(/counter\s*\(\s*(.*?)\s*(,\s*(.*?)\s*)?\s*\)/i);if(x&&x[1]in g.counterProps){var B=g.counterProps[x[1]];w.push(o(B,x[3]));continue}var P=k[O].match(/attr\s*\(\s*(.*?)\s*\)/i);if(P){var G=P[1];w.push(g.pseudoElementParent?g.pseudoElementParent.attribs[G]:g.attribs[G]);continue}w.push(k[O])}return N=w.join(""),N=N.replace(/\\/g,""),N}function c(g){if(g.length!==0){var N=g[g.length-1].pseudos;if(N){for(var I=0;I<N.length;I++)if(d(N[I]))return N[I].name}}}function d(g){return g.name==="before"||g.name==="after"}function f(g){return g.filter(function(N){return!d(N)})}function p(g,N){N=t.getDefaultOptions(N);var I=new Set;N.removeInlinedSelectors&&!N.removeStyleTags&&g("style[data-embed]").each(function(){I.add(this)});var R=E(g,N);R+=`
|
|
500
|
+
`+N.extraCss;var w=s(g,R,N);return w&&!N.removeStyleTags&&m(g,w,N,I),g}function m(g,N,I,R){var w=g("style");w.each(function(){var k=this,O=k.childNodes;if(O.length===1&&!(R&&R.has(k))){var Q=O[0].nodeValue,_=t.removeInlinedSelectorsFromCSS(Q,N,I,u.ignoredPseudos);_&&_.trim()?k.childNodes[0].nodeValue=_:g(k).remove()}})}function A(g,N){var I=[],R=g("style"),w,k,O;return R.each(function(){if(O=this,w=O.childNodes,w.length!==1){N.removeStyleTags&&g(O).remove();return}if(k=w[0].data,N.applyStyleTags&&g(O).attr("data-embed")===void 0&&I.push(k),N.removeStyleTags&&g(O).attr("data-embed")===void 0){var Q=O.childNodes[0].nodeValue,_=t.getPreservedText(Q,{mediaQueries:N.preserveMediaQueries,fontFaces:N.preserveFontFaces,keyFrames:N.preserveKeyFrames,pseudos:N.preservePseudos,preservedSelectors:N.preservedSelectors},u.ignoredPseudos);_?O.childNodes[0].nodeValue=_:g(O).remove()}g(O).removeAttr("data-embed")}),I}function E(g,N){var I=A(g,N),R=I.join(`
|
|
501
|
+
`);return R}return u},al}var ol,Tp;function y5(){if(Tp)return ol;Tp=1;var e=f5(),t=E5(),n=t(function(i,u){return e(i,{xmlMode:u&&u.xmlMode},r,[u])}),r=function(i,u){return n.juiceDocument(i,u)};return n.inlineContent=function(i,u,s){return e(i,{xmlMode:s&&s.xmlMode},n.inlineDocument,[u,s])},n.codeBlocks=e.codeBlocks,ol=n,ol}var T5=y5();const C5=bc(T5),x5=new Set(["section","p","blockquote","ul","ol","li","pre","code","span","strong","em","b","i","u","s","del","a","img","br","hr","table","thead","tbody","tr","th","td"]),k5=new Set(["script","style","iframe","object","embed","form","button","input","textarea","select","link","meta","svg","math","canvas","template","noscript","video","audio","source"]),I5=new Set(["font","font-family","font-size","font-weight","font-style","color","text-align","line-height","letter-spacing","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-indent","background","background-color","border","border-top","border-right","border-bottom","border-left","border-top-color","border-top-style","border-top-width","border-right-color","border-right-style","border-right-width","border-bottom-color","border-bottom-style","border-bottom-width","border-left-color","border-left-style","border-left-width","border-color","border-width","border-style","border-radius","border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius","border-collapse","padding","padding-top","padding-right","padding-bottom","padding-left","margin","margin-top","margin-right","margin-bottom","margin-left","width","min-width","max-width","height","max-height","display","vertical-align","list-style","list-style-type","list-style-position","white-space","white-space-collapse","text-wrap-mode","text-wrap-style","word-break","word-wrap","overflow-wrap","overflow","overflow-x","overflow-y","box-sizing","table-layout","text-size-adjust","-webkit-text-size-adjust"]),S5=new Set(["block","inline","inline-block","list-item","table","table-row","table-cell","table-row-group","table-header-group","none"]);function Te(e,t){e.dataset.wechatNode=t}function bu(e,t){const n=e.ownerDocument.createElement(t);for(const r of Array.from(e.attributes))n.setAttribute(r.name,r.value);for(;e.firstChild;)n.appendChild(e.firstChild);return e.replaceWith(n),n}function w5(e){return/^(?:https?:)?\/\//i.test(e)}function N5(e,t){return Array.from(e.childNodes).every(n=>n===t?!0:n.nodeType===3&&!(n.nodeValue??"").trim())}const D5={kind:"image",selector:"img",finalizeSelector:"figure, figcaption",async prepare(e,t){Te(e,"image");const n=e.getAttribute("src");n&&e.setAttribute("data-src",n);const r=e.parentElement;if(!r||r.tagName.toLowerCase()!=="p"||!N5(r,e))return;const i=e.getAttribute("alt")??"",u=/^(?:0|[1-9]\d*)\.\d{2}$/.test(i)?Number(i):0;if(u>0&&Number.isFinite(u)){const o=new Image;o.src=n??"";try{if(await o.decode(),!o.naturalWidth)throw new Error("图片原始宽度为空")}catch(l){throw new Error(`无法读取缩放图片的原始尺寸:${e.getAttribute("title")||"无图注"}`,{cause:l})}e.style.width=`${Math.min(u,1)*100}%`,e.style.maxWidth=`${o.naturalWidth*u}px`,e.style.height="auto"}const s=t.document.createElement("figure");Te(s,"image-block"),r.replaceWith(s),s.appendChild(e);const a=e.getAttribute("title")?.trim();if(e.removeAttribute("title"),a){const o=t.document.createElement("figcaption");Te(o,"image-caption"),o.textContent=a,s.appendChild(o)}},finalize(e){const t=e.tagName.toLowerCase();t==="figure"&&bu(e,"section"),t==="figcaption"&&bu(e,"p")}},_5={kind:"code-block",selector:"pre",prepare(e,t){Te(e,"code-block-body");const n=e.querySelector("code");n&&Te(n,"code-block-code");const r=t.document.createElement("section");Te(r,"code-block"),e.replaceWith(r);const i=e.getAttribute("data-language")?.trim();if(i){const u=t.document.createElement("p");Te(u,"code-language"),u.textContent=i,r.appendChild(u)}r.appendChild(e)}},O5={kind:"inline-code",selector:"code:not(pre code)",prepare(e){Te(e,"inline-code")},finalize(e){bu(e,"span")}},R5={kind:"heading",selector:"h1, h2, h3, h4, h5, h6",prepare(e){Te(e,`heading-${e.tagName.slice(1)}`)},finalize(e){bu(e,"section")}},M5={kind:"paragraph",selector:"p",prepare(e){e.dataset.wechatNode||Te(e,"paragraph")}},B5={kind:"emphasis",selector:"strong, b, em, i, s, del, u",prepare(e){Te(e,e.tagName.toLowerCase())}},L5={kind:"blockquote",selector:"blockquote",prepare(e){Te(e,"blockquote")}};function Cp(e){const t=e.trim();if(!t)return"";try{const n=new URL(t);n.hash="",n.hostname=n.hostname.toLowerCase();let r=n.pathname;return r.length>1&&r.endsWith("/")&&(r=r.slice(0,-1)),n.pathname=r,n.toString()}catch{return t.replace(/\/+$/,"")||t}}function v5(e,t,n){const r=Cp(e),i=n.find(s=>Cp(s.url)===r);if(i)return i;const u={index:n.length+1,text:t.trim()||e,url:e};return n.push(u),u}const P5={kind:"link",selector:"a",prepare(e,t){const n=e.getAttribute("href")?.trim()??"";if(!w5(n)){Te(e,"internal-link");return}const r=v5(n,e.textContent?.trim()||n,t.references);Te(e,"external-link");const i=t.document.createElement("span");Te(i,"link-marker"),i.textContent=`[${r.index}]`,e.after(i)},finalize(e){e.dataset.wechatNode==="external-link"&&bu(e,"span")}},F5={kind:"list",selector:"ul, ol, li",prepare(e,t){const n=e.tagName.toLowerCase();if(n==="ul"&&Te(e,"bullet-list"),n==="ol"&&Te(e,"ordered-list"),n!=="li")return;const r=e.getAttribute("data-item-type")==="task";if(Te(e,r?"task-list-item":"list-item"),!r)return;const i=t.document.createElement("span");Te(i,"task-marker"),i.textContent=e.getAttribute("data-checked")==="true"?"☑":"☐",(e.querySelector(":scope > p")??e).prepend(i)}},H5={kind:"table",selector:"table, thead, tbody, tr, th, td",prepare(e){Te(e,e.tagName.toLowerCase())}},U5={kind:"divider",selector:"hr",prepare(e){Te(e,"divider")}},W5={kind:"hard-break",selector:"br",prepare(e){Te(e,"hard-break")}},K5={kind:"article",selector:".zzhub-wechat-article",prepare(e,t){if(t.references.length>0){const n=t.document.createElement("section");Te(n,"references");const r=t.document.createElement("p");Te(r,"references-title"),r.textContent="相关链接",n.appendChild(r);const i=t.document.createElement("ol");Te(i,"references-list");for(const u of t.references){const s=t.document.createElement("li");Te(s,"reference-item"),s.textContent=`[${u.index}] ${u.text}: ${u.url}`,i.appendChild(s)}n.appendChild(i),t.root.appendChild(n)}if(t.theme.footerText){const n=t.document.createElement("section");Te(n,"footer");const r=t.document.createElement("p");Te(r,"footer-text"),r.textContent=t.theme.footerText,n.appendChild(r),t.root.appendChild(n)}}},Q5=[D5,_5,O5,R5,M5,B5,L5,P5,F5,H5,U5,W5,K5];function Y5(e={}){return Q5.map(t=>e[t.kind]??t)}async function xp(e,t,n){for(const r of t){const i=r[e];if(!i)continue;const u=e==="finalize"?r.finalizeSelector??r.selector:r.selector,s=[];n.root.matches(u)&&s.push(n.root),s.push(...Array.from(n.root.querySelectorAll(u)));for(const a of s)(a.isConnected||a===n.root)&&await i(a,n)}}function z5(e,t){return[Object.entries(e).filter(([r])=>/^--[a-z0-9-_]+$/i.test(r)).map(([r,i])=>`${r}: ${i};`).join(`
|
|
501
502
|
`),`--wx-font-family: ${t.fontFamily};`,`--wx-body-color: ${t.bodyColor};`,`--wx-muted-color: ${t.mutedColor};`,`--wx-h2-color: ${t.h2Color};`,`--wx-h3-color: ${t.h3Color};`,`--wx-brand-ink: ${t.primaryColor};`,`--wx-brand-accent: ${e["--brand"]??"#ca6093"};`,`--wx-divider-color: ${t.dividerColor};`,`--wx-blockquote-border: ${t.blockquoteBorderColor};`,`--wx-body-line-height: ${t.bodyLineHeight};`,`--wx-body-letter-spacing: ${t.bodyLetterSpacing};`,`--wx-soft-surface: ${e["--bg-warm"]??"#faf8f9"};`].filter(Boolean).join(`
|
|
502
|
-
`)}function
|
|
503
|
+
`)}function G5(e,t){return`
|
|
503
504
|
.milkdown .editor {
|
|
504
|
-
${
|
|
505
|
+
${z5(e,t)}
|
|
505
506
|
${t.containerStyle};
|
|
506
507
|
}
|
|
507
508
|
.milkdown .editor [data-wechat-node="footer"] {
|
|
508
509
|
${t.footerStyle};
|
|
509
510
|
}
|
|
510
|
-
`}function
|
|
511
|
-
`),a=
|
|
511
|
+
`}function kp(e){return new DOMParser().parseFromString(`<!doctype html><html><body>${e}</body></html>`,"text/html")}function V5(e){const t=[];for(let n=0;n<e.style.length;n+=1){const r=e.style.item(n);r&&t.push(r)}for(const n of t){const r=e.style.getPropertyValue(n).trim(),i=/(?:url\s*\(|expression\s*\(|javascript:|var\s*\()/i.test(r),u=n==="display"&&!S5.has(r.toLowerCase());(!I5.has(n)||i||u)&&e.style.removeProperty(n)}e.style.cssText.trim()||e.removeAttribute("style")}function q5(e){const t=e.tagName.toLowerCase();return t==="img"?new Set(["style","src","data-src","alt","width","height"]):t==="a"?new Set(["style","href","title"]):t==="ol"?new Set(["style","start"]):t==="th"||t==="td"?new Set(["style","colspan","rowspan","align"]):new Set(["style"])}function Ip(e,t){const n=e.getAttribute(t)?.trim()??"";if(!n){e.removeAttribute(t);return}if(/^(?:javascript|vbscript):/i.test(n)){e.removeAttribute(t);return}/^data:/i.test(n)&&!/^data:image\/(?:avif|gif|jpe?g|png|webp);base64,/i.test(n)&&e.removeAttribute(t)}function J5(e){const t=[e,...Array.from(e.querySelectorAll("*"))].reverse();for(const n of t){const r=n.tagName.toLowerCase();if(k5.has(r)){n!==e&&n.remove();continue}if(!x5.has(r)){n!==e&&n.replaceWith(...Array.from(n.childNodes));continue}const i=q5(n);for(const u of Array.from(n.attributes))i.has(u.name)||n.removeAttribute(u.name);if(r==="a"){const u=n.getAttribute("href")??"";/^(?:#|https?:\/\/|mailto:|tel:)/i.test(u)||n.removeAttribute("href")}r==="img"&&(Ip(n,"src"),Ip(n,"data-src")),V5(n)}}async function j5(e){const t=kp(""),n=t.createElement("section");n.className="milkdown";const r=t.createElement("section");r.className="editor zzhub-wechat-article",r.lang="zh-CN",Te(r,"article"),r.innerHTML=e.semanticHtml,n.appendChild(r),t.body.appendChild(n);const i=[],u=Y5(e.renderers);await xp("prepare",u,{document:t,root:r,theme:e.theme,references:i});const s=[e.baseCss,G5(e.editorVars??{},e.theme),e.customCss??""].filter(Boolean).join(`
|
|
512
|
+
`),a=C5.inlineContent(n.outerHTML,s,{applyAttributesTableElements:!1,applyHeightAttributes:!1,applyStyleTags:!1,applyWidthAttributes:!1,inlinePseudoElements:!1,preserveFontFaces:!1,preserveImportant:!1,preserveKeyFrames:!1,preserveMediaQueries:!1,preservePseudos:!1,removeStyleTags:!0,resolveCSSVariables:!0}),o=kp(a),l=o.querySelector(".zzhub-wechat-article");if(!l)throw new Error("Wechat article root missing after CSS inlining");return await xp("finalize",u,{document:o,root:l,theme:e.theme,references:i}),J5(l),l.outerHTML}async function Z5(){const e=window.__ZZHUB_WECHAT_PAYLOAD__;if(!e)throw new Error("Missing __ZZHUB_WECHAT_PAYLOAD__");const t=document.getElementById("editor-host");if(!t)throw new Error("Missing editor host");const n=qx.make().config(u=>{u.set(xs,t),u.set(ys,e.markdown)}).use(_6).use(RS);await n.create();const r=n.action(Xx()),i=await j5({semanticHtml:r,baseCss:MS,customCss:e.customCss,editorVars:e.editorVars,theme:e.exportTheme});await n.destroy(),window.__ZZHUB_SET_RESULT__({status:"success",html:i,semanticHtml:r})}Z5().catch(e=>{const t=e instanceof Error?e.message:String(e);window.__ZZHUB_SET_RESULT__({status:"error",error:t})});
|