vibelet 1.2.224 → 1.2.227
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/README.md +14 -37
- package/dist/index.cjs +1 -1
- package/dist/inventory-scan-worker.cjs +1 -1
- package/dist/{tailcat/vibelet-tailcat-darwin-amd64 → remoteDirect/vibelet-remote-direct-darwin-amd64} +0 -0
- package/dist/{tailcat/vibelet-tailcat-darwin-arm64 → remoteDirect/vibelet-remote-direct-darwin-arm64} +0 -0
- package/dist/{tailcat/vibelet-tailcat-linux-amd64 → remoteDirect/vibelet-remote-direct-linux-amd64} +0 -0
- package/dist/{tailcat/vibelet-tailcat-linux-arm64 → remoteDirect/vibelet-remote-direct-linux-arm64} +0 -0
- package/dist/{tailcat/vibelet-tailcat-win32-amd64.exe → remoteDirect/vibelet-remote-direct-win32-amd64.exe} +0 -0
- package/dist/{tailcat/vibelet-tailcat-win32-arm64.exe → remoteDirect/vibelet-remote-direct-win32-arm64.exe} +0 -0
- package/dist/runtime-version.cjs +1 -1
- package/dist/vibelet.mjs +282 -289
- package/dist/web/assets/App-DfyOZYmt.js +12 -0
- package/dist/web/assets/App-t0H-03RW.css +1 -0
- package/dist/web/assets/BrowserControlPanel-dQOp1WlN.js +1 -0
- package/dist/web/assets/ChipGroup-FQF2g0Fr.js +1 -0
- package/dist/web/assets/DiffDrawer-CHjkoGPE.js +2 -0
- package/dist/web/assets/FileCodeEditor-yqSvo7VZ.css +1 -0
- package/dist/web/assets/FilesControlPanel-A7LFhjRm.js +1 -0
- package/dist/web/assets/FilesControlPanel-DsKJrFYk.css +1 -0
- package/dist/web/assets/GlobalPendingDialog-BeOMI3dc.js +1 -0
- package/dist/web/assets/ImageViewer-BQ9YKQDY.js +1 -0
- package/dist/web/assets/ImageViewer-L8SQkFy1.css +1 -0
- package/dist/web/assets/LanguageSettingsPanel-Benilh-Y.js +1 -0
- package/dist/web/assets/NewSessionDialog-B0YMv6RR.js +1 -0
- package/dist/web/assets/NewSessionDialog-CxPwD87T.css +1 -0
- package/dist/web/assets/NotificationSettingsPanel-B_k_PfhC.js +1 -0
- package/dist/web/assets/TerminalControlPanel-DCmHOa9Y.js +13 -0
- package/dist/web/assets/ThemeSettingsPanel-DNDIWk0L.js +1 -0
- package/dist/web/assets/arrow-right-Boi1uHFr.js +1 -0
- package/dist/web/assets/collectMessageImages-BROUPbis.js +3 -0
- package/dist/web/assets/file-editor-FileCodeEditor-CTEWh6kV.js +13 -0
- package/dist/web/assets/file-editor-MarkdownLivePreview-Blr8OOKh.js +1 -0
- package/dist/web/assets/file-editor-clike-B9uivgTg.js +1 -0
- package/dist/web/assets/file-editor-go-CTD25R5P.js +1 -0
- package/dist/web/assets/file-editor-index-C1T947NK.js +13 -0
- package/dist/web/assets/file-editor-index-Cj9yLeGr.js +1 -0
- package/dist/web/assets/file-editor-index-Ckq0jexT.js +6 -0
- package/dist/web/assets/file-editor-index-CxU5Gq1E.js +1 -0
- package/dist/web/assets/file-editor-index-Dv8iMJMj.js +3 -0
- package/dist/web/assets/file-editor-index-DvdSLdIk.js +1 -0
- package/dist/web/assets/file-editor-index-DvenUGpC.js +1 -0
- package/dist/web/assets/file-editor-index-iFiQtQEr.js +1 -0
- package/dist/web/assets/file-editor-rust-Bh1DdySD.js +1 -0
- package/dist/web/assets/file-editor-shell-CjFT_Tl9.js +1 -0
- package/dist/web/assets/file-editor-sql-B0zzsL_y.js +1 -0
- package/dist/web/assets/file-editor-swift-BzpIVaGY.js +1 -0
- package/dist/web/assets/file-editor-toml-Bm5Em-hy.js +1 -0
- package/dist/web/assets/file-editor-yaml-DsCXHVTH.js +1 -0
- package/dist/web/assets/folder-plus-tHXFtdSw.js +1 -0
- package/dist/web/assets/ghostty-vt-DOMeXDrv.wasm +0 -0
- package/dist/web/assets/highlighted-body-TPN3WLV5-D5c7I9mI.js +1 -0
- package/dist/web/assets/index-CoCv7_xG.css +1 -0
- package/dist/web/assets/index-P4_gSQhN.js +71 -0
- package/dist/web/assets/mermaid-O7DHMXV3-BIyESbw5.js +120 -0
- package/dist/web/assets/mermaid-O7DHMXV3-tkqeC_Xz.css +1 -0
- package/dist/web/ghostty-license.txt +21 -0
- package/dist/web/index.html +2 -2
- package/package.json +3 -3
- package/dist/web/assets/App-CAJ3pB85.js +0 -12
- package/dist/web/assets/ArchiveSyncPanel-_lLATKjA.js +0 -1
- package/dist/web/assets/ConnectionSettingsPanel-4MhvD7ra.js +0 -1
- package/dist/web/assets/DaemonSettingsPanel-zHBCPi0h.js +0 -1
- package/dist/web/assets/DiffDrawer-BGx5Fl6h.js +0 -2
- package/dist/web/assets/FilesControlPanel-D7SPEihe.js +0 -2
- package/dist/web/assets/LanguageSettingsPanel-Bofh0WHQ.js +0 -1
- package/dist/web/assets/NotificationSettingsPanel-BafuO9ww.js +0 -1
- package/dist/web/assets/SavedTargetsPanel-lutvzUOp.js +0 -1
- package/dist/web/assets/ThemeSettingsPanel-ARFGBpot.js +0 -1
- package/dist/web/assets/file-text-CpofUkq8.js +0 -1
- package/dist/web/assets/highlighted-body-TPN3WLV5-CEWZdsEu.js +0 -1
- package/dist/web/assets/index-CFMLtw93.css +0 -1
- package/dist/web/assets/index-D3KotGfi.js +0 -17
- package/dist/web/assets/mermaid-O7DHMXV3-BPtfCfol.css +0 -1
- package/dist/web/assets/mermaid-O7DHMXV3-DuCy9NVb.js +0 -124
- /package/dist/web/assets/{splash-logo-SQcOtj-8.png → logo-SQcOtj-8.png} +0 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/highlighted-body-TPN3WLV5-D5c7I9mI.js","assets/index-P4_gSQhN.js","assets/index-CoCv7_xG.css","assets/collectMessageImages-BROUPbis.js","assets/App-DfyOZYmt.js","assets/App-t0H-03RW.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as k,j as T,i as Gi,_ as Qi}from"./index-P4_gSQhN.js";import{m as Ee,p as Yt,r as Xi,s as Hr,u as Pt,a as ma,n as Er,c as $r,t as Ki,b as dr,d as fr,e as hc,f as pc,g as et,h as Jt,i as St,j as mc,k as bc,l as gc,o as Ec}from"./collectMessageImages-BROUPbis.js";import{x as Tc,M as kc,y as xc,r as Zi}from"./App-DfyOZYmt.js";function Ji(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const me={eof:null,asterisk:42,underscore:95},Yr={characterGroupPunctuation:2,characterGroupWhitespace:1},Ge={emphasis:"emphasis",emphasisSequence:"emphasisSequence",emphasisText:"emphasisText",strong:"strong",strongSequence:"strongSequence",strongText:"strongText"};const ba=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],ga=[12288,12288,65281,65376,65504,65510],Ea=[8361,8361,65377,65470,65474,65479,65482,65487,65490,65495,65498,65500,65512,65518],Ta=[32,126,162,163,165,166,172,172,175,175,10214,10221,10629,10630],nn=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141],Tr=(e,t)=>{let r=0,n=Math.floor(e.length/2)-1;for(;r<=n;){const a=Math.floor((r+n)/2),s=a*2;if(t<e[s])n=a-1;else if(t>e[s+1])r=a+1;else return!0}return!1},Ac=ba[0],_c=ba.at(-1),yc=ga[0],Cc=ga.at(-1),Nc=Ea[0],Ic=Ea.at(-1),Sc=Ta[0],wc=Ta.at(-1),Lc=nn[0],Rc=nn.at(-1),os=19968,[Oc,Dc]=Pc(nn);function Pc(e){let t=e[0],r=e[1];for(let n=0;n<e.length;n+=2){const a=e[n],s=e[n+1];if(os>=a&&os<=s)return[a,s];s-a>r-t&&(t=a,r=s)}return[t,r]}const vc=e=>e<Ac||e>_c?!1:Tr(ba,e),Mc=e=>e<yc||e>Cc?!1:Tr(ga,e),Bc=e=>e<Nc||e>Ic?!1:Tr(Ea,e),Fc=e=>e<Sc||e>wc?!1:Tr(Ta,e),Hc=e=>e>=Oc&&e<=Dc?!0:e<Lc||e>Rc?!1:Tr(nn,e);function Uc(e){return vc(e)?"ambiguous":Mc(e)?"fullwidth":Bc(e)?"halfwidth":Fc(e)?"narrow":Hc(e)?"wide":"neutral"}function jc(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function zc(e){return jc(e),Uc(e)}function $c(e){return new RegExp("^\\p{Emoji_Presentation}","u").test(String.fromCodePoint(e))}function Yc(e){if(!e||e<4352)return!1;switch(zc(e)){case"fullwidth":case"halfwidth":return!0;case"wide":return!$c(e);case"narrow":return!1;case"ambiguous":return 917760<=e&&e<=917999?null:!1;case"neutral":return new RegExp("^\\p{sc=Hangul}","u").test(String.fromCodePoint(e))}}function qc(e,t){return t!==65025||!e||e<8216?!1:e===8216||e===8217||e===8220||e===8221}function Vc(e){return e!==null&&e>=65024&&e<=65038}const Wc=eu(new RegExp("\\p{P}|\\p{S}","u")),Gc=eu(/\s/);function eu(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCodePoint(r))}}function ve(e){return!!(e&Yr.characterGroupWhitespace)}function hr(e){return(e&Ne.cjkPunctuation)===Yr.characterGroupPunctuation}function tu(e){return!!(e&Ne.cjk)}function qr(e){return!!(e&Ne.cjkOrIvs)}function ka(e){return e===Ne.nonEmojiGeneralUseVS}function Vr(e){return!!(e&Ne.spaceOrPunctuation)}let Ne;(function(e){e.spaceOrPunctuation=3,e.cjk=4096,e.cjkPunctuation=4098,e.ivs=8192,e.cjkOrIvs=12288,e.nonEmojiGeneralUseVS=16384,e.variationSelector=24576,e.ivsToCjkRightShift=1})(Ne||(Ne={}));function rt(e){if(e===me.eof||Ee(e)||Gc(e))return Yr.characterGroupWhitespace;let t=0;if(e>=4352){if(Vc(e))return Ne.nonEmojiGeneralUseVS;switch(Yc(e)){case null:return Ne.ivs;case!0:t|=Ne.cjk;break}}return Wc(e)&&(t|=Yr.characterGroupPunctuation),t}function ru(e,t,r){if(!ka(e))return e;const n=t(),a=rt(n);return!n||ve(a)?e:qc(n,r)?Ne.cjkPunctuation:Qc(a)}function Qc(e){return e&~Ne.ivs}function Xc(e){return!!(e&&e>=55296&&e<=56319)}function Kc(e){return!!(e&&e>=56320&&e<=57343)}function Zc(e,t,r){if(t._bufferIndex<2)return e;const n=r({start:{...t,_bufferIndex:t._bufferIndex-2},end:t}).codePointAt(0);return n&&n>=65536?n:e}function Jc(e,t,r){const n=e>=65536?2:1;if(t._bufferIndex<1+n)return null;const a=t._bufferIndex-n-2,s=r({start:{...t,_bufferIndex:a>=0?a:0},end:{...t,_bufferIndex:t._bufferIndex-n}}),i=s.charCodeAt(s.length-1);if(Number.isNaN(i))return null;if(s.length<2||i<56320||57343<i)return i;const l=s.codePointAt(0);return l&&l>=65536?l:i}var ed=class{cachedValue=void 0;constructor(e,t,r){this.previousCode=e,this.nowPoint=t,this.sliceSerialize=r}value(){return this.cachedValue===void 0&&(this.cachedValue=Jc(this.previousCode,this.nowPoint,this.sliceSerialize)),this.cachedValue}};function td(e,t,r){const n=r({start:t,end:{...t,_bufferIndex:t._bufferIndex+2}}).codePointAt(0);return n&&n>=65536?n:e}const Tn={name:"attention",resolveAll:rd,tokenize:nd};function rd(e,t){let r=-1,n,a,s,i,l,u,c,d;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(n=r;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[n][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;u=e[n][1].end.offset-e[n][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const f={...e[n][1].end},h={...e[r][1].start};ls(f,-u),ls(h,u),i={type:u>1?Ge.strongSequence:Ge.emphasisSequence,start:f,end:{...e[n][1].end}},l={type:u>1?Ge.strongSequence:Ge.emphasisSequence,start:{...e[r][1].start},end:h},s={type:u>1?Ge.strongText:Ge.emphasisText,start:{...e[n][1].end},end:{...e[r][1].start}},a={type:u>1?Ge.strong:Ge.emphasis,start:{...i.start},end:{...l.end}},e[n][1].end={...i.start},e[r][1].start={...l.end},c=[],e[n][1].end.offset-e[n][1].start.offset&&(c=Yt(c,[["enter",e[n][1],t],["exit",e[n][1],t]])),c=Yt(c,[["enter",a,t],["enter",i,t],["exit",i,t],["enter",s,t]]),t.parser.constructs.insideSpan.null,c=Yt(c,Xi(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),c=Yt(c,[["exit",s,t],["enter",l,t],["exit",l,t],["exit",a,t]]),e[r][1].end.offset-e[r][1].start.offset?(d=2,c=Yt(c,[["enter",e[r][1],t],["exit",e[r][1],t]])):d=0,Hr(e,n-1,r-n+3,c),r=n+c.length-d-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function nd(e,t){const r=this.parser.constructs.attentionMarkers.null,{now:n,sliceSerialize:a,previous:s}=this,i=Kc(s)?Zc(s,n(),a):s,l=rt(i),u=new ed(i,n(),a),c=ru(l,u.value.bind(u),i);let d;return f;function f(g){return d=g,e.enter("attentionSequence"),h(g)}function h(g){if(g===d)return e.consume(g),h;const b=e.exit("attentionSequence"),_=rt(Xc(g)?td(g,n(),a):g),A=hr(c),y=A||ve(c),S=hr(_),L=S||ve(_),D=qr(c),P=!L||S&&(y||D)||r.includes(g),v=!y||A&&(L||tu(_))||r.includes(i);return b._open=!!(d===me.asterisk?P:P&&(Vr(c)||!v)),b._close=!!(d===me.asterisk?v:v&&(Vr(_)||!P)),t(g)}}function ls(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}function ad(){return{text:{[me.asterisk]:Tn,[me.underscore]:Tn},insideSpan:{null:[Tn]}}}function sd(){const e=this.data();(e.micromarkExtensions||(e.micromarkExtensions=[])).push(ad())}const id=";".codePointAt(0)??me.eof,ud="&".codePointAt(0)??me.eof;function od(){return{handlers:{emphasis:nu,strong:au,text:ld}}}nu.peek=su;au.peek=iu;function nu(e,t,r,n){return uu(e,t,r,n,su(e,t,r),1)}function au(e,t,r,n){return uu(e,t,r,n,iu(e,t,r),2)}function su(e,t,r){return r.options.emphasis||"*"}function iu(e,t,r){return r.options.strong||"*"}function uu(e,t,r,n,a,s){const i=a.repeat(s),l=r.enter(s===1?"emphasis":"strong"),u=r.createTracker(n),c=u.move(i);let d=u.move(r.containerPhrasing(e,{after:a,before:c,...u.current()}));const f=fd(e,t,r,n.before),h=hd(e,t,r,n.after),g=cs(f,Wr(d),a,"open");g.inside&&d&&(d=Ed(d));const b=cs({current:Yn(d),previous:$n(d)},h,a,"close");b.inside&&d&&(d=Td(d));const _=u.move(i);l();const A=b.outside&&gd(t,r);return r.attentionEncodeSurroundingInfo={after:b.outside&&!A,before:g.outside},r.cjkFriendlyEncodeAfterSupplementaryText=A,c+d+_}function ld(e,t,r,n){const a=r;if(!a.cjkFriendlyEncodeAfterSupplementaryText)return r.safe(e.value,n);a.cjkFriendlyEncodeAfterSupplementaryText=!1;const[s=""]=[...e.value],i=e.value.slice(s.length);return`${Aa(s.codePointAt(0)??me.eof)}${r.safe(i,{...n,before:";"})}`}function cs(e,t,r,n){const a=xa(e),s=rt(t);if(!qr(a)&&!qr(s))return n==="open"?ds(a,s,r):ds(s,a,r);const i={inside:!1,outside:!1},l={inside:!0,outside:!1},u={inside:!1,outside:!0},c={inside:!0,outside:!0};for(const d of[i,l,u,c]){const f=n==="open"?d.outside?fs:e:d.inside?fs:e,h=n==="open"?d.inside?hs:t:d.outside?hs:t;if(n==="open"?cd(r,f,h):dd(r,f,h))return d}return c}function ds(e,t,r){return kn(e)?kn(t)?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:ve(t)?{inside:!0,outside:!0}:{inside:!1,outside:!0}:ve(e)?kn(t)?{inside:!1,outside:!1}:ve(t)?{inside:!0,outside:!0}:{inside:!1,outside:!1}:ve(t)?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function cd(e,t,r){const n=xa(t),{close:a,open:s}=ou(n,rt(r));return e==="_"?s&&(Vr(n)||!a):s}function dd(e,t,r){const n=rt(r),{close:a,open:s}=ou(xa(t),n);return e==="_"?a&&(Vr(n)||!s):a}function ou(e,t){const r=hr(e),n=r||ve(e),a=hr(t),s=a||ve(t);return{open:!s||a&&(n||qr(e)),close:!n||r&&(s||tu(t))}}function kn(e){return!ve(e)&&!hr(e)}function xa(e){const t=rt(e.current);return e.current===null||!ka(t)?t:ru(t,()=>e.previous,e.current)}function fd(e,t,r,n){let a=Yn(n),s=$n(n);if(pd(a)||bd(a,s)){const i=lu(e,t,r,-1);i&&(a=Yn(i),s=$n(i))}return{current:a,previous:s}}function hd(e,t,r,n){const a=Wr(n);if(!md(a))return a;const s=lu(e,t,r,1);return s?Wr(s):a}function pd(e){return e!==null&&56320<=e&&e<=57343}function md(e){return e!==null&&55296<=e&&e<=56319}function bd(e,t){return ka(rt(e))&&(t===null||t===me.eof)}function lu(e,t,r,n){if(!t)return;const a=r.indexStack.at(-1),s=t.children,i=typeof a=="number"?a:s.indexOf(e);if(i<0)return;const l=s[i+n];return cu(l)||void 0}function gd(e,t){if(!e)return!1;const r=t.indexStack.at(-1);if(typeof r!="number")return!1;const n=e.children[r+1];return n?.type==="text"&&(Wr(n.value)??0)>65535}function cu(e){return!e||typeof e!="object"?"":"value"in e&&typeof e.value=="string"?e.value:"alt"in e&&typeof e.alt=="string"?e.alt:"children"in e&&Array.isArray(e.children)?e.children.map(cu).join(""):""}function Aa(e){return`&#x${(e??0).toString(16).toUpperCase()};`}function Ed(e){const[t=""]=[...e];return Aa(t.codePointAt(0)??me.eof)+e.slice(t.length)}function Td(e){const t=[...e],r=t.pop();return`${t.join("")}${Aa(r?.codePointAt(0)??me.eof)}`}function $n(e){const t=[...e];return t.pop(),t.at(-1)?.codePointAt(0)??me.eof}function Wr(e){return e.codePointAt(0)??me.eof}function Yn(e){return[...e].at(-1)?.codePointAt(0)??me.eof}const fs={current:id,previous:me.eof},hs=ud;function kd(){const e=this.data();(e.toMarkdownExtensions||(e.toMarkdownExtensions=[])).push(od())}function xd(){sd.call(this),kd.call(this)}var Ad=xd;const an=(function(e){if(e==null)return Nd;if(typeof e=="function")return sn(e);if(typeof e=="object")return Array.isArray(e)?_d(e):yd(e);if(typeof e=="string")return Cd(e);throw new Error("Expected function, string, or object as test")});function _d(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=an(e[r]);return sn(n);function n(...a){let s=-1;for(;++s<t.length;)if(t[s].apply(this,a))return!0;return!1}}function yd(e){const t=e;return sn(r);function r(n){const a=n;let s;for(s in e)if(a[s]!==t[s])return!1;return!0}}function Cd(e){return sn(t);function t(r){return r&&r.type===e}}function sn(e){return t;function t(r,n,a){return!!(Id(r)&&e.call(this,r,typeof n=="number"?n:void 0,a||void 0))}}function Nd(){return!0}function Id(e){return e!==null&&typeof e=="object"&&"type"in e}const du=[],er=!0,qn=!1,Lt="skip";function _a(e,t,r,n){let a;typeof t=="function"&&typeof r!="function"?(n=r,r=t):a=t;const s=an(a),i=n?-1:1;l(e,void 0,[])();function l(u,c,d){const f=u&&typeof u=="object"?u:{};if(typeof f.type=="string"){const g=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(u.type+(g?"<"+g+">":""))+")"})}return h;function h(){let g=du,b,_,A;if((!t||s(u,c,d[d.length-1]||void 0))&&(g=Sd(r(u,d)),g[0]===qn))return g;if("children"in u&&u.children){const y=u;if(y.children&&g[0]!==Lt)for(_=(n?y.children.length:-1)+i,A=d.concat(y);_>-1&&_<y.children.length;){const S=y.children[_];if(b=l(S,_,A)(),b[0]===qn)return b;_=typeof b[1]=="number"?b[1]:_+i}}return g}}}function Sd(e){return Array.isArray(e)?e:typeof e=="number"?[er,e]:e==null?du:[e]}function Me(e,t,r,n){let a,s,i;typeof t=="function"&&typeof r!="function"?(s=void 0,i=t,a=r):(s=t,i=r,a=n),_a(e,s,l,a);function l(u,c){const d=c[c.length-1],f=d?d.children.indexOf(u):void 0;return i(u,f,d)}}const vt={indicator:"indicator",textOnly:"text-only",remove:"remove"};function wd({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:r=[],allowDataImages:n=!1,allowedProtocols:a=[],blockedImageClass:s="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:i="text-gray-500",linkBlockPolicy:l=vt.indicator,imageBlockPolicy:u=vt.indicator}){const c=t.length&&!t.every(f=>f==="*"),d=r.length&&!r.every(f=>f==="*");if(!e&&(c||d))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return f=>{const h=vd(e,t,r,n,a,s,i,l,u);fu(f),Me(f,h)}}function ps(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function Ld(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const Rd=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),Od=new Set(["javascript:","data:","file:","vbscript:"]);function ms(e,t,r,n=!1,a=!1,s=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!a)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return a&&n&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const d=e.substring(5);if(d&&d.length>0&&d!=="invalid")return e}}catch{return null}return null}const i=ps(e,r);if(!i||Od.has(i.protocol)||!(Rd.has(i.protocol)||s.includes(i.protocol)||s.includes("*")))return null;if(i.protocol==="mailto:"||!i.protocol.match(/^https?:$/))return i.href;const u=Ld(e);return i&&t.some(c=>{const d=ps(c,r);return!d||d.origin!==i.origin?!1:i.href.startsWith(d.href)})?u?i.pathname+i.search+i.hash:i.href:t.includes("*")?i.protocol!=="https:"&&i.protocol!=="http:"?null:u?i.pathname+i.search+i.hash:i.href:null}function fu(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)fu(t)}}const xn=Symbol("node-seen");function Dd(e,t,r){return t===vt.remove?{type:"remove"}:t===vt.textOnly?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:r},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function Pd(e,t,r){if(t===vt.remove)return{type:"remove"};if(t===vt.textOnly){const n=String(e.properties.alt||"");return n?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:n}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:r},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}const vd=(e,t,r,n,a,s,i,l,u)=>{const c=(d,f,h)=>{if(d.type!=="element"||d[xn])return er;if(d.tagName==="a"){const g=ms(d.properties.href,t,e,!1,!1,a);if(g===null){if(d[xn]=!0,Me(d,c),h&&typeof f=="number"){const b=Dd(d,l,i);if(b.type==="remove")return h.children.splice(f,1),[Lt,f];h.children[f]=b.element}return Lt}else return d.properties.href=g,d.properties.target="_blank",d.properties.rel="noopener noreferrer",er}if(d.tagName==="img"){const g=ms(d.properties.src,r,e,n,!0,a);if(g===null){if(d[xn]=!0,Me(d,c),h&&typeof f=="number"){const b=Pd(d,u,s);if(b.type==="remove")return h.children.splice(f,1),[Lt,f];h.children[f]=b.element}return Lt}else return d.properties.src=g,er}return er};return c},hu=-1,un=0,ar=1,Gr=2,ya=3,Ca=4,Na=5,Ia=6,pu=7,mu=8,bs=typeof self=="object"?self:globalThis,Md=(e,t)=>{const r=(a,s)=>(e.set(s,a),a),n=a=>{if(e.has(a))return e.get(a);const[s,i]=t[a];switch(s){case un:case hu:return r(i,a);case ar:{const l=r([],a);for(const u of i)l.push(n(u));return l}case Gr:{const l=r({},a);for(const[u,c]of i)l[n(u)]=n(c);return l}case ya:return r(new Date(i),a);case Ca:{const{source:l,flags:u}=i;return r(new RegExp(l,u),a)}case Na:{const l=r(new Map,a);for(const[u,c]of i)l.set(n(u),n(c));return l}case Ia:{const l=r(new Set,a);for(const u of i)l.add(n(u));return l}case pu:{const{name:l,message:u}=i;return r(new bs[l](u),a)}case mu:return r(BigInt(i),a);case"BigInt":return r(Object(BigInt(i)),a);case"ArrayBuffer":return r(new Uint8Array(i).buffer,i);case"DataView":{const{buffer:l}=new Uint8Array(i);return r(new DataView(l),i)}}return r(new bs[s](i),a)};return n},gs=e=>Md(new Map,e)(0),Nt="",{toString:Bd}={},{keys:Fd}=Object,qt=e=>{const t=typeof e;if(t!=="object"||!e)return[un,t];const r=Bd.call(e).slice(8,-1);switch(r){case"Array":return[ar,Nt];case"Object":return[Gr,Nt];case"Date":return[ya,Nt];case"RegExp":return[Ca,Nt];case"Map":return[Na,Nt];case"Set":return[Ia,Nt];case"DataView":return[ar,r]}return r.includes("Array")?[ar,r]:r.includes("Error")?[pu,r]:[Gr,r]},wr=([e,t])=>e===un&&(t==="function"||t==="symbol"),Hd=(e,t,r,n)=>{const a=(i,l)=>{const u=n.push(i)-1;return r.set(l,u),u},s=i=>{if(r.has(i))return r.get(i);let[l,u]=qt(i);switch(l){case un:{let d=i;switch(u){case"bigint":l=mu,d=i.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);d=null;break;case"undefined":return a([hu],i)}return a([l,d],i)}case ar:{if(u){let h=i;return u==="DataView"?h=new Uint8Array(i.buffer):u==="ArrayBuffer"&&(h=new Uint8Array(i)),a([u,[...h]],i)}const d=[],f=a([l,d],i);for(const h of i)d.push(s(h));return f}case Gr:{if(u)switch(u){case"BigInt":return a([u,i.toString()],i);case"Boolean":case"Number":case"String":return a([u,i.valueOf()],i)}if(t&&"toJSON"in i)return s(i.toJSON());const d=[],f=a([l,d],i);for(const h of Fd(i))(e||!wr(qt(i[h])))&&d.push([s(h),s(i[h])]);return f}case ya:return a([l,i.toISOString()],i);case Ca:{const{source:d,flags:f}=i;return a([l,{source:d,flags:f}],i)}case Na:{const d=[],f=a([l,d],i);for(const[h,g]of i)(e||!(wr(qt(h))||wr(qt(g))))&&d.push([s(h),s(g)]);return f}case Ia:{const d=[],f=a([l,d],i);for(const h of i)(e||!wr(qt(h)))&&d.push(s(h));return f}}const{message:c}=i;return a([l,{name:u,message:c}],i)};return s},Es=(e,{json:t,lossy:r}={})=>{const n=[];return Hd(!(t||r),!!t,new Map,n)(e),n},Et=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?gs(Es(e,t)):structuredClone(e):(e,t)=>gs(Es(e,t));class kr{constructor(t,r,n){this.normal=r,this.property=t,n&&(this.space=n)}}kr.prototype.normal={};kr.prototype.property={};kr.prototype.space=void 0;function bu(e,t){const r={},n={};for(const a of e)Object.assign(r,a.property),Object.assign(n,a.normal);return new kr(r,n,t)}function pr(e){return e.toLowerCase()}class ke{constructor(t,r){this.attribute=r,this.property=t}}ke.prototype.attribute="";ke.prototype.booleanish=!1;ke.prototype.boolean=!1;ke.prototype.commaOrSpaceSeparated=!1;ke.prototype.commaSeparated=!1;ke.prototype.defined=!1;ke.prototype.mustUseProperty=!1;ke.prototype.number=!1;ke.prototype.overloadedBoolean=!1;ke.prototype.property="";ke.prototype.spaceSeparated=!1;ke.prototype.space=void 0;let Ud=0;const j=kt(),se=kt(),Vn=kt(),R=kt(),J=kt(),Ot=kt(),xe=kt();function kt(){return 2**++Ud}const Wn=Object.freeze(Object.defineProperty({__proto__:null,boolean:j,booleanish:se,commaOrSpaceSeparated:xe,commaSeparated:Ot,number:R,overloadedBoolean:Vn,spaceSeparated:J},Symbol.toStringTag,{value:"Module"})),An=Object.keys(Wn);class Sa extends ke{constructor(t,r,n,a){let s=-1;if(super(t,r),Ts(this,"space",a),typeof n=="number")for(;++s<An.length;){const i=An[s];Ts(this,An[s],(n&Wn[i])===Wn[i])}}}Sa.prototype.defined=!0;function Ts(e,t,r){r&&(e[t]=r)}function Bt(e){const t={},r={};for(const[n,a]of Object.entries(e.properties)){const s=new Sa(n,e.transform(e.attributes||{},n),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(s.mustUseProperty=!0),t[n]=s,r[pr(n)]=n,r[pr(s.attribute)]=n}return new kr(t,r,e.space)}const gu=Bt({properties:{ariaActiveDescendant:null,ariaAtomic:se,ariaAutoComplete:null,ariaBusy:se,ariaChecked:se,ariaColCount:R,ariaColIndex:R,ariaColSpan:R,ariaControls:J,ariaCurrent:null,ariaDescribedBy:J,ariaDetails:null,ariaDisabled:se,ariaDropEffect:J,ariaErrorMessage:null,ariaExpanded:se,ariaFlowTo:J,ariaGrabbed:se,ariaHasPopup:null,ariaHidden:se,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:J,ariaLevel:R,ariaLive:null,ariaModal:se,ariaMultiLine:se,ariaMultiSelectable:se,ariaOrientation:null,ariaOwns:J,ariaPlaceholder:null,ariaPosInSet:R,ariaPressed:se,ariaReadOnly:se,ariaRelevant:null,ariaRequired:se,ariaRoleDescription:J,ariaRowCount:R,ariaRowIndex:R,ariaRowSpan:R,ariaSelected:se,ariaSetSize:R,ariaSort:null,ariaValueMax:R,ariaValueMin:R,ariaValueNow:R,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Eu(e,t){return t in e?e[t]:t}function Tu(e,t){return Eu(e,t.toLowerCase())}const jd=Bt({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ot,acceptCharset:J,accessKey:J,action:null,allow:null,allowFullScreen:j,allowPaymentRequest:j,allowUserMedia:j,alt:null,as:null,async:j,autoCapitalize:null,autoComplete:J,autoFocus:j,autoPlay:j,blocking:J,capture:null,charSet:null,checked:j,cite:null,className:J,cols:R,colSpan:null,content:null,contentEditable:se,controls:j,controlsList:J,coords:R|Ot,crossOrigin:null,data:null,dateTime:null,decoding:null,default:j,defer:j,dir:null,dirName:null,disabled:j,download:Vn,draggable:se,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:j,formTarget:null,headers:J,height:R,hidden:Vn,high:R,href:null,hrefLang:null,htmlFor:J,httpEquiv:J,id:null,imageSizes:null,imageSrcSet:null,inert:j,inputMode:null,integrity:null,is:null,isMap:j,itemId:null,itemProp:J,itemRef:J,itemScope:j,itemType:J,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:j,low:R,manifest:null,max:null,maxLength:R,media:null,method:null,min:null,minLength:R,multiple:j,muted:j,name:null,nonce:null,noModule:j,noValidate:j,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:j,optimum:R,pattern:null,ping:J,placeholder:null,playsInline:j,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:j,referrerPolicy:null,rel:J,required:j,reversed:j,rows:R,rowSpan:R,sandbox:J,scope:null,scoped:j,seamless:j,selected:j,shadowRootClonable:j,shadowRootDelegatesFocus:j,shadowRootMode:null,shape:null,size:R,sizes:null,slot:null,span:R,spellCheck:se,src:null,srcDoc:null,srcLang:null,srcSet:null,start:R,step:null,style:null,tabIndex:R,target:null,title:null,translate:null,type:null,typeMustMatch:j,useMap:null,value:se,width:R,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:J,axis:null,background:null,bgColor:null,border:R,borderColor:null,bottomMargin:R,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:j,declare:j,event:null,face:null,frame:null,frameBorder:null,hSpace:R,leftMargin:R,link:null,longDesc:null,lowSrc:null,marginHeight:R,marginWidth:R,noResize:j,noHref:j,noShade:j,noWrap:j,object:null,profile:null,prompt:null,rev:null,rightMargin:R,rules:null,scheme:null,scrolling:se,standby:null,summary:null,text:null,topMargin:R,valueType:null,version:null,vAlign:null,vLink:null,vSpace:R,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:j,disableRemotePlayback:j,prefix:null,property:null,results:R,security:null,unselectable:null},space:"html",transform:Tu}),zd=Bt({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:xe,accentHeight:R,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:R,amplitude:R,arabicForm:null,ascent:R,attributeName:null,attributeType:null,azimuth:R,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:R,by:null,calcMode:null,capHeight:R,className:J,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:R,diffuseConstant:R,direction:null,display:null,dur:null,divisor:R,dominantBaseline:null,download:j,dx:null,dy:null,edgeMode:null,editable:null,elevation:R,enableBackground:null,end:null,event:null,exponent:R,externalResourcesRequired:null,fill:null,fillOpacity:R,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ot,g2:Ot,glyphName:Ot,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:R,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:R,horizOriginX:R,horizOriginY:R,id:null,ideographic:R,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:R,k:R,k1:R,k2:R,k3:R,k4:R,kernelMatrix:xe,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:R,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:R,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:R,overlineThickness:R,paintOrder:null,panose1:null,path:null,pathLength:R,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:J,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:R,pointsAtY:R,pointsAtZ:R,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:xe,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:xe,rev:xe,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:xe,requiredFeatures:xe,requiredFonts:xe,requiredFormats:xe,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:R,specularExponent:R,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:R,strikethroughThickness:R,string:null,stroke:null,strokeDashArray:xe,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:R,strokeOpacity:R,strokeWidth:null,style:null,surfaceScale:R,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:xe,tabIndex:R,tableValues:null,target:null,targetX:R,targetY:R,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:xe,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:R,underlineThickness:R,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:R,values:null,vAlphabetic:R,vMathematical:R,vectorEffect:null,vHanging:R,vIdeographic:R,version:null,vertAdvY:R,vertOriginX:R,vertOriginY:R,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:R,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Eu}),ku=Bt({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),xu=Bt({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Tu}),Au=Bt({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),$d={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Yd=/[A-Z]/g,ks=/-[a-z]/g,qd=/^data[-\w.:]+$/i;function on(e,t){const r=pr(t);let n=t,a=ke;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&qd.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(ks,Wd);n="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!ks.test(s)){let i=s.replace(Yd,Vd);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}a=Sa}return new a(n,t)}function Vd(e){return"-"+e.toLowerCase()}function Wd(e){return e.charAt(1).toUpperCase()}const xr=bu([gu,jd,ku,xu,Au],"html"),st=bu([gu,zd,ku,xu,Au],"svg");function xs(e){const t=[],r=String(e||"");let n=r.indexOf(","),a=0,s=!1;for(;!s;){n===-1&&(n=r.length,s=!0);const i=r.slice(a,n).trim();(i||!s)&&t.push(i),a=n+1,n=r.indexOf(",",a)}return t}function _u(e,t){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const As=/[#.]/g;function Gd(e,t){const r=e||"",n={};let a=0,s,i;for(;a<r.length;){As.lastIndex=a;const l=As.exec(r),u=r.slice(a,l?l.index:r.length);u&&(s?s==="#"?n.id=u:Array.isArray(n.className)?n.className.push(u):n.className=[u]:i=u,a+=u.length),l&&(s=l[0],a++)}return{type:"element",tagName:i||t||"div",properties:n,children:[]}}function _s(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function yu(e){return e.join(" ").trim()}function Cu(e,t,r){const n=r?Zd(r):void 0;function a(s,i,...l){let u;if(s==null){u={type:"root",children:[]};const c=i;l.unshift(c)}else{u=Gd(s,t);const c=u.tagName.toLowerCase(),d=n?n.get(c):void 0;if(u.tagName=d||c,Qd(i))l.unshift(i);else for(const[f,h]of Object.entries(i))Xd(e,u.properties,f,h)}for(const c of l)Gn(u.children,c);return u.type==="element"&&u.tagName==="template"&&(u.content={type:"root",children:u.children},u.children=[]),u}return a}function Qd(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,r=Object.keys(e);for(const n of r){const a=t[n];if(a&&typeof a=="object"){if(!Array.isArray(a))return!0;const s=a;for(const i of s)if(typeof i!="number"&&typeof i!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function Xd(e,t,r,n){const a=on(e,r);let s;if(n!=null){if(typeof n=="number"){if(Number.isNaN(n))return;s=n}else typeof n=="boolean"?s=n:typeof n=="string"?a.spaceSeparated?s=_s(n):a.commaSeparated?s=xs(n):a.commaOrSpaceSeparated?s=_s(xs(n).join(" ")):s=ys(a,a.property,n):Array.isArray(n)?s=[...n]:s=a.property==="style"?Kd(n):String(n);if(Array.isArray(s)){const i=[];for(const l of s)i.push(ys(a,a.property,l));s=i}a.property==="className"&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[a.property]=s}}function Gn(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const r of t)Gn(e,r);else if(typeof t=="object"&&"type"in t)t.type==="root"?Gn(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function ys(e,t,r){if(typeof r=="string"){if(e.number&&r&&!Number.isNaN(Number(r)))return Number(r);if((e.boolean||e.overloadedBoolean)&&(r===""||pr(r)===pr(t)))return!0}return r}function Kd(e){const t=[];for(const[r,n]of Object.entries(e))t.push([r,n].join(": "));return t.join("; ")}function Zd(e){const t=new Map;for(const r of e)t.set(r.toLowerCase(),r);return t}const Jd=["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","solidColor","textArea","textPath"],ef=Cu(xr,"div"),tf=Cu(st,"g",Jd);function rf(e){const t=String(e),r=[];return{toOffset:a,toPoint:n};function n(s){if(typeof s=="number"&&s>-1&&s<=t.length){let i=0;for(;;){let l=r[i];if(l===void 0){const u=Cs(t,r[i-1]);l=u===-1?t.length+1:u+1,r[i]=l}if(l>s)return{line:i+1,column:s-(i>0?r[i-1]:0)+1,offset:s};i++}}}function a(s){if(s&&typeof s.line=="number"&&typeof s.column=="number"&&!Number.isNaN(s.line)&&!Number.isNaN(s.column)){for(;r.length<s.line;){const l=r[r.length-1],u=Cs(t,l),c=u===-1?t.length+1:u+1;if(l===c)break;r.push(c)}const i=(s.line>1?r[s.line-2]:0)+s.column-1;if(i<r[s.line-1])return i}}}function Cs(e,t){const r=e.indexOf("\r",t),n=e.indexOf(`
|
|
3
|
+
`,t);return n===-1?r:r===-1||r+1===n?n:r<n?r:n}const bt={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Nu={}.hasOwnProperty,nf=Object.prototype;function af(e,t){const r=t||{};return wa({file:r.file||void 0,location:!1,schema:r.space==="svg"?st:xr,verbose:r.verbose||!1},e)}function wa(e,t){let r;switch(t.nodeName){case"#comment":{const n=t;return r={type:"comment",value:n.data},Ur(e,n,r),r}case"#document":case"#document-fragment":{const n=t,a="mode"in n?n.mode==="quirks"||n.mode==="limited-quirks":!1;if(r={type:"root",children:Iu(e,t.childNodes),data:{quirksMode:a}},e.file&&e.location){const s=String(e.file),i=rf(s),l=i.toPoint(0),u=i.toPoint(s.length);r.position={start:l,end:u}}return r}case"#documentType":{const n=t;return r={type:"doctype"},Ur(e,n,r),r}case"#text":{const n=t;return r={type:"text",value:n.value},Ur(e,n,r),r}default:return r=sf(e,t),r}}function Iu(e,t){let r=-1;const n=[];for(;++r<t.length;){const a=wa(e,t[r]);n.push(a)}return n}function sf(e,t){const r=e.schema;e.schema=t.namespaceURI===bt.svg?st:xr;let n=-1;const a={};for(;++n<t.attrs.length;){const l=t.attrs[n],u=(l.prefix?l.prefix+":":"")+l.name;Nu.call(nf,u)||(a[u]=l.value)}const i=(e.schema.space==="svg"?tf:ef)(t.tagName,a,Iu(e,t.childNodes));if(Ur(e,t,i),i.tagName==="template"){const l=t,u=l.sourceCodeLocation,c=u&&u.startTag&&Rt(u.startTag),d=u&&u.endTag&&Rt(u.endTag),f=wa(e,l.content);c&&d&&e.file&&(f.position={start:c.end,end:d.start}),i.content=f}return e.schema=r,i}function Ur(e,t,r){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const n=uf(e,r,t.sourceCodeLocation);n&&(e.location=!0,r.position=n)}}function uf(e,t,r){const n=Rt(r);if(t.type==="element"){const a=t.children[t.children.length-1];if(n&&!r.endTag&&a&&a.position&&a.position.end&&(n.end=Object.assign({},a.position.end)),e.verbose){const s={};let i;if(r.attrs)for(i in r.attrs)Nu.call(r.attrs,i)&&(s[on(e.schema,i).property]=Rt(r.attrs[i]));r.startTag;const l=Rt(r.startTag),u=r.endTag?Rt(r.endTag):void 0,c={opening:l};u&&(c.closing=u),c.properties=s,t.data={position:c}}}return n}function Rt(e){const t=Ns({line:e.startLine,column:e.startCol,offset:e.startOffset}),r=Ns({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||r?{start:t,end:r}:void 0}function Ns(e){return e.line&&e.column?e:void 0}const Is={}.hasOwnProperty;function Su(e,t){const r=t||{};function n(a,...s){let i=n.invalid;const l=n.handlers;if(a&&Is.call(a,e)){const u=String(a[e]);i=Is.call(l,u)?l[u]:n.unknown}if(i)return i.call(this,a,...s)}return n.handlers=r.handlers||{},n.invalid=r.invalid,n.unknown=r.unknown,n}const of={},lf={}.hasOwnProperty,wu=Su("type",{handlers:{root:df,element:bf,text:pf,comment:mf,doctype:hf}});function cf(e,t){const n=(t||of).space;return wu(e,n==="svg"?st:xr)}function df(e,t){const r={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return r.childNodes=La(e.children,r,t),Ft(e,r),r}function ff(e,t){const r={nodeName:"#document-fragment",childNodes:[]};return r.childNodes=La(e.children,r,t),Ft(e,r),r}function hf(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ft(e,t),t}function pf(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ft(e,t),t}function mf(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ft(e,t),t}function bf(e,t){const r=t;let n=r;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&r.space==="html"&&(n=st);const a=[];let s;if(e.properties){for(s in e.properties)if(s!=="children"&&lf.call(e.properties,s)){const u=gf(n,s,e.properties[s]);u&&a.push(u)}}const i=n.space,l={nodeName:e.tagName,tagName:e.tagName,attrs:a,namespaceURI:bt[i],childNodes:[],parentNode:null};return l.childNodes=La(e.children,l,n),Ft(e,l),e.tagName==="template"&&e.content&&(l.content=ff(e.content,n)),l}function gf(e,t,r){const n=on(e,t);if(r===!1||r===null||r===void 0||typeof r=="number"&&Number.isNaN(r)||!r&&n.boolean)return;Array.isArray(r)&&(r=n.commaSeparated?_u(r):yu(r));const a={name:n.attribute,value:r===!0?"":String(r)};if(n.space&&n.space!=="html"&&n.space!=="svg"){const s=a.name.indexOf(":");s<0?a.prefix="":(a.name=a.name.slice(s+1),a.prefix=n.attribute.slice(0,s)),a.namespace=bt[n.space]}return a}function La(e,t,r){let n=-1;const a=[];if(e)for(;++n<e.length;){const s=wu(e[n],r);s.parentNode=t,a.push(s)}return a}function Ft(e,t){const r=e.position;r&&r.start&&r.end&&(r.start.offset,r.end.offset,t.sourceCodeLocation={startLine:r.start.line,startCol:r.start.column,startOffset:r.start.offset,endLine:r.end.line,endCol:r.end.column,endOffset:r.end.offset})}const Ef=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Tf=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]),ee="�";var p;(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"})(p||(p={}));const ge={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Lu(e){return e>=55296&&e<=57343}function kf(e){return e>=56320&&e<=57343}function xf(e,t){return(e-55296)*1024+9216+t}function Ru(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Ou(e){return e>=64976&&e<=65007||Tf.has(e)}var C;(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"})(C||(C={}));const Af=65536;class _f{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=Af,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,r){const{line:n,col:a,offset:s}=this,i=a+r,l=s+r;return{code:t,startLine:n,endLine:n,startCol:i,endCol:i,startOffset:l,endOffset:l}}_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 r=this.html.charCodeAt(this.pos+1);if(kf(r))return this.pos++,this._addGap(),xf(t,r)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,p.EOF;return this._err(C.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,r){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=r}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,r){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(r)return this.html.startsWith(t,this.pos);for(let n=0;n<t.length;n++)if((this.html.charCodeAt(this.pos+n)|32)!==t.charCodeAt(n))return!1;return!0}peek(t){const r=this.pos+t;if(r>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,p.EOF;const n=this.html.charCodeAt(r);return n===p.CARRIAGE_RETURN?p.LINE_FEED:n}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,p.EOF;let t=this.html.charCodeAt(this.pos);return t===p.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,p.LINE_FEED):t===p.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Lu(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===p.LINE_FEED||t===p.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Ru(t)?this._err(C.controlCharacterInInputStream):Ou(t)&&this._err(C.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Y;(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"})(Y||(Y={}));function Du(e,t){for(let r=e.attrs.length-1;r>=0;r--)if(e.attrs[r].name===t)return e.attrs[r].value;return null}const yf=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))),Cf=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 Nf(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Cf.get(e))!==null&&t!==void 0?t:e}var ce;(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"})(ce||(ce={}));const If=32;var tt;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(tt||(tt={}));function Qn(e){return e>=ce.ZERO&&e<=ce.NINE}function Sf(e){return e>=ce.UPPER_A&&e<=ce.UPPER_F||e>=ce.LOWER_A&&e<=ce.LOWER_F}function wf(e){return e>=ce.UPPER_A&&e<=ce.UPPER_Z||e>=ce.LOWER_A&&e<=ce.LOWER_Z||Qn(e)}function Lf(e){return e===ce.EQUALS||wf(e)}var le;(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"})(le||(le={}));var je;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(je||(je={}));class Rf{constructor(t,r,n){this.decodeTree=t,this.emitCodePoint=r,this.errors=n,this.state=le.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=je.Strict}startEntity(t){this.decodeMode=t,this.state=le.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,r){switch(this.state){case le.EntityStart:return t.charCodeAt(r)===ce.NUM?(this.state=le.NumericStart,this.consumed+=1,this.stateNumericStart(t,r+1)):(this.state=le.NamedEntity,this.stateNamedEntity(t,r));case le.NumericStart:return this.stateNumericStart(t,r);case le.NumericDecimal:return this.stateNumericDecimal(t,r);case le.NumericHex:return this.stateNumericHex(t,r);case le.NamedEntity:return this.stateNamedEntity(t,r)}}stateNumericStart(t,r){return r>=t.length?-1:(t.charCodeAt(r)|If)===ce.LOWER_X?(this.state=le.NumericHex,this.consumed+=1,this.stateNumericHex(t,r+1)):(this.state=le.NumericDecimal,this.stateNumericDecimal(t,r))}addToNumericResult(t,r,n,a){if(r!==n){const s=n-r;this.result=this.result*Math.pow(a,s)+Number.parseInt(t.substr(r,s),a),this.consumed+=s}}stateNumericHex(t,r){const n=r;for(;r<t.length;){const a=t.charCodeAt(r);if(Qn(a)||Sf(a))r+=1;else return this.addToNumericResult(t,n,r,16),this.emitNumericEntity(a,3)}return this.addToNumericResult(t,n,r,16),-1}stateNumericDecimal(t,r){const n=r;for(;r<t.length;){const a=t.charCodeAt(r);if(Qn(a))r+=1;else return this.addToNumericResult(t,n,r,10),this.emitNumericEntity(a,2)}return this.addToNumericResult(t,n,r,10),-1}emitNumericEntity(t,r){var n;if(this.consumed<=r)return(n=this.errors)===null||n===void 0||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===ce.SEMI)this.consumed+=1;else if(this.decodeMode===je.Strict)return 0;return this.emitCodePoint(Nf(this.result),this.consumed),this.errors&&(t!==ce.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,r){const{decodeTree:n}=this;let a=n[this.treeIndex],s=(a&tt.VALUE_LENGTH)>>14;for(;r<t.length;r++,this.excess++){const i=t.charCodeAt(r);if(this.treeIndex=Of(n,a,this.treeIndex+Math.max(1,s),i),this.treeIndex<0)return this.result===0||this.decodeMode===je.Attribute&&(s===0||Lf(i))?0:this.emitNotTerminatedNamedEntity();if(a=n[this.treeIndex],s=(a&tt.VALUE_LENGTH)>>14,s!==0){if(i===ce.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==je.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:r,decodeTree:n}=this,a=(n[r]&tt.VALUE_LENGTH)>>14;return this.emitNamedEntityData(r,a,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,r,n){const{decodeTree:a}=this;return this.emitCodePoint(r===1?a[t]&~tt.VALUE_LENGTH:a[t+1],n),r===3&&this.emitCodePoint(a[t+2],n),n}end(){var t;switch(this.state){case le.NamedEntity:return this.result!==0&&(this.decodeMode!==je.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case le.NumericDecimal:return this.emitNumericEntity(0,2);case le.NumericHex:return this.emitNumericEntity(0,3);case le.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case le.EntityStart:return 0}}}function Of(e,t,r,n){const a=(t&tt.BRANCH_LENGTH)>>7,s=t&tt.JUMP_TABLE;if(a===0)return s!==0&&n===s?r:-1;if(s){const u=n-s;return u<0||u>=a?-1:e[r+u]-1}let i=r,l=i+a-1;for(;i<=l;){const u=i+l>>>1,c=e[u];if(c<n)i=u+1;else if(c>n)l=u-1;else return e[u+a]}return-1}var I;(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/"})(I||(I={}));var gt;(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"})(gt||(gt={}));var ye;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(ye||(ye={}));var x;(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"})(x||(x={}));var o;(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"})(o||(o={}));const Df=new Map([[x.A,o.A],[x.ADDRESS,o.ADDRESS],[x.ANNOTATION_XML,o.ANNOTATION_XML],[x.APPLET,o.APPLET],[x.AREA,o.AREA],[x.ARTICLE,o.ARTICLE],[x.ASIDE,o.ASIDE],[x.B,o.B],[x.BASE,o.BASE],[x.BASEFONT,o.BASEFONT],[x.BGSOUND,o.BGSOUND],[x.BIG,o.BIG],[x.BLOCKQUOTE,o.BLOCKQUOTE],[x.BODY,o.BODY],[x.BR,o.BR],[x.BUTTON,o.BUTTON],[x.CAPTION,o.CAPTION],[x.CENTER,o.CENTER],[x.CODE,o.CODE],[x.COL,o.COL],[x.COLGROUP,o.COLGROUP],[x.DD,o.DD],[x.DESC,o.DESC],[x.DETAILS,o.DETAILS],[x.DIALOG,o.DIALOG],[x.DIR,o.DIR],[x.DIV,o.DIV],[x.DL,o.DL],[x.DT,o.DT],[x.EM,o.EM],[x.EMBED,o.EMBED],[x.FIELDSET,o.FIELDSET],[x.FIGCAPTION,o.FIGCAPTION],[x.FIGURE,o.FIGURE],[x.FONT,o.FONT],[x.FOOTER,o.FOOTER],[x.FOREIGN_OBJECT,o.FOREIGN_OBJECT],[x.FORM,o.FORM],[x.FRAME,o.FRAME],[x.FRAMESET,o.FRAMESET],[x.H1,o.H1],[x.H2,o.H2],[x.H3,o.H3],[x.H4,o.H4],[x.H5,o.H5],[x.H6,o.H6],[x.HEAD,o.HEAD],[x.HEADER,o.HEADER],[x.HGROUP,o.HGROUP],[x.HR,o.HR],[x.HTML,o.HTML],[x.I,o.I],[x.IMG,o.IMG],[x.IMAGE,o.IMAGE],[x.INPUT,o.INPUT],[x.IFRAME,o.IFRAME],[x.KEYGEN,o.KEYGEN],[x.LABEL,o.LABEL],[x.LI,o.LI],[x.LINK,o.LINK],[x.LISTING,o.LISTING],[x.MAIN,o.MAIN],[x.MALIGNMARK,o.MALIGNMARK],[x.MARQUEE,o.MARQUEE],[x.MATH,o.MATH],[x.MENU,o.MENU],[x.META,o.META],[x.MGLYPH,o.MGLYPH],[x.MI,o.MI],[x.MO,o.MO],[x.MN,o.MN],[x.MS,o.MS],[x.MTEXT,o.MTEXT],[x.NAV,o.NAV],[x.NOBR,o.NOBR],[x.NOFRAMES,o.NOFRAMES],[x.NOEMBED,o.NOEMBED],[x.NOSCRIPT,o.NOSCRIPT],[x.OBJECT,o.OBJECT],[x.OL,o.OL],[x.OPTGROUP,o.OPTGROUP],[x.OPTION,o.OPTION],[x.P,o.P],[x.PARAM,o.PARAM],[x.PLAINTEXT,o.PLAINTEXT],[x.PRE,o.PRE],[x.RB,o.RB],[x.RP,o.RP],[x.RT,o.RT],[x.RTC,o.RTC],[x.RUBY,o.RUBY],[x.S,o.S],[x.SCRIPT,o.SCRIPT],[x.SEARCH,o.SEARCH],[x.SECTION,o.SECTION],[x.SELECT,o.SELECT],[x.SOURCE,o.SOURCE],[x.SMALL,o.SMALL],[x.SPAN,o.SPAN],[x.STRIKE,o.STRIKE],[x.STRONG,o.STRONG],[x.STYLE,o.STYLE],[x.SUB,o.SUB],[x.SUMMARY,o.SUMMARY],[x.SUP,o.SUP],[x.TABLE,o.TABLE],[x.TBODY,o.TBODY],[x.TEMPLATE,o.TEMPLATE],[x.TEXTAREA,o.TEXTAREA],[x.TFOOT,o.TFOOT],[x.TD,o.TD],[x.TH,o.TH],[x.THEAD,o.THEAD],[x.TITLE,o.TITLE],[x.TR,o.TR],[x.TRACK,o.TRACK],[x.TT,o.TT],[x.U,o.U],[x.UL,o.UL],[x.SVG,o.SVG],[x.VAR,o.VAR],[x.WBR,o.WBR],[x.XMP,o.XMP]]);function Ht(e){var t;return(t=Df.get(e))!==null&&t!==void 0?t:o.UNKNOWN}const w=o,Pf={[I.HTML]:new Set([w.ADDRESS,w.APPLET,w.AREA,w.ARTICLE,w.ASIDE,w.BASE,w.BASEFONT,w.BGSOUND,w.BLOCKQUOTE,w.BODY,w.BR,w.BUTTON,w.CAPTION,w.CENTER,w.COL,w.COLGROUP,w.DD,w.DETAILS,w.DIR,w.DIV,w.DL,w.DT,w.EMBED,w.FIELDSET,w.FIGCAPTION,w.FIGURE,w.FOOTER,w.FORM,w.FRAME,w.FRAMESET,w.H1,w.H2,w.H3,w.H4,w.H5,w.H6,w.HEAD,w.HEADER,w.HGROUP,w.HR,w.HTML,w.IFRAME,w.IMG,w.INPUT,w.LI,w.LINK,w.LISTING,w.MAIN,w.MARQUEE,w.MENU,w.META,w.NAV,w.NOEMBED,w.NOFRAMES,w.NOSCRIPT,w.OBJECT,w.OL,w.P,w.PARAM,w.PLAINTEXT,w.PRE,w.SCRIPT,w.SECTION,w.SELECT,w.SOURCE,w.STYLE,w.SUMMARY,w.TABLE,w.TBODY,w.TD,w.TEMPLATE,w.TEXTAREA,w.TFOOT,w.TH,w.THEAD,w.TITLE,w.TR,w.TRACK,w.UL,w.WBR,w.XMP]),[I.MATHML]:new Set([w.MI,w.MO,w.MN,w.MS,w.MTEXT,w.ANNOTATION_XML]),[I.SVG]:new Set([w.TITLE,w.FOREIGN_OBJECT,w.DESC]),[I.XLINK]:new Set,[I.XML]:new Set,[I.XMLNS]:new Set},Xn=new Set([w.H1,w.H2,w.H3,w.H4,w.H5,w.H6]);x.STYLE,x.SCRIPT,x.XMP,x.IFRAME,x.NOEMBED,x.NOFRAMES,x.PLAINTEXT;var m;(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"})(m||(m={}));const ae={DATA:m.DATA,RCDATA:m.RCDATA,RAWTEXT:m.RAWTEXT,SCRIPT_DATA:m.SCRIPT_DATA,PLAINTEXT:m.PLAINTEXT,CDATA_SECTION:m.CDATA_SECTION};function vf(e){return e>=p.DIGIT_0&&e<=p.DIGIT_9}function tr(e){return e>=p.LATIN_CAPITAL_A&&e<=p.LATIN_CAPITAL_Z}function Mf(e){return e>=p.LATIN_SMALL_A&&e<=p.LATIN_SMALL_Z}function Ke(e){return Mf(e)||tr(e)}function Ss(e){return Ke(e)||vf(e)}function Lr(e){return e+32}function Pu(e){return e===p.SPACE||e===p.LINE_FEED||e===p.TABULATION||e===p.FORM_FEED}function ws(e){return Pu(e)||e===p.SOLIDUS||e===p.GREATER_THAN_SIGN}function Bf(e){return e===p.NULL?C.nullCharacterReference:e>1114111?C.characterReferenceOutsideUnicodeRange:Lu(e)?C.surrogateCharacterReference:Ou(e)?C.noncharacterCharacterReference:Ru(e)||e===p.CARRIAGE_RETURN?C.controlCharacterReference:null}class Ff{constructor(t,r){this.options=t,this.handler=r,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=m.DATA,this.returnState=m.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new _f(r),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Rf(yf,(n,a)=>{this.preprocessor.pos=this.entityStartPos+a-1,this._flushCodePointConsumedAsCharacterReference(n)},r.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(C.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:n=>{this._err(C.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+n)},validateNumericCharacterReference:n=>{const a=Bf(n);a&&this._err(a,1)}}:void 0)}_err(t,r=0){var n,a;(a=(n=this.handler).onParseError)===null||a===void 0||a.call(n,this.preprocessor.getError(t,r))}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,r,n){this.active=!0,this.preprocessor.write(t,r),this._runParsingLoop(),this.paused||n?.()}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 r=0;r<t;r++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,r){return this.preprocessor.startsWith(t,r)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Y.START_TAG,tagName:"",tagID:o.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Y.END_TAG,tagName:"",tagID:o.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Y.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Y.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,r){this.currentCharacterToken={type:t,chars:r,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,r;const n=this.currentToken;if(Du(n,this.currentAttr.name)===null){if(n.attrs.push(this.currentAttr),n.location&&this.currentLocation){const a=(t=(r=n.location).attrs)!==null&&t!==void 0?t:r.attrs=Object.create(null);a[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(C.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=Ht(t.tagName),t.type===Y.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(C.endTagWithAttributes),t.selfClosing&&this._err(C.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 Y.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Y.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Y.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:Y.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,r){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=r;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,r)}_emitCodePoint(t){const r=Pu(t)?Y.WHITESPACE_CHARACTER:t===p.NULL?Y.NULL_CHARACTER:Y.CHARACTER;this._appendCharToCurrentCharacterToken(r,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Y.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=m.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?je.Attribute:je.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===m.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===m.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===m.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case m.DATA:{this._stateData(t);break}case m.RCDATA:{this._stateRcdata(t);break}case m.RAWTEXT:{this._stateRawtext(t);break}case m.SCRIPT_DATA:{this._stateScriptData(t);break}case m.PLAINTEXT:{this._statePlaintext(t);break}case m.TAG_OPEN:{this._stateTagOpen(t);break}case m.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case m.TAG_NAME:{this._stateTagName(t);break}case m.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case m.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case m.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case m.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case m.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case m.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case m.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case m.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case m.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case m.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case m.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case m.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case m.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case m.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case m.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case m.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case m.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case m.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case m.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case m.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case m.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case m.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case m.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case m.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case m.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case m.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case m.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case m.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case m.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case m.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case m.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case m.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case m.BOGUS_COMMENT:{this._stateBogusComment(t);break}case m.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case m.COMMENT_START:{this._stateCommentStart(t);break}case m.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case m.COMMENT:{this._stateComment(t);break}case m.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case m.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case m.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case m.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case m.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case m.COMMENT_END:{this._stateCommentEnd(t);break}case m.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case m.DOCTYPE:{this._stateDoctype(t);break}case m.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case m.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case m.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case m.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case m.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case m.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case m.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case m.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case m.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case m.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case m.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case m.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case m.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case m.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case m.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case m.CDATA_SECTION:{this._stateCdataSection(t);break}case m.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case m.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case m.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case m.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case p.LESS_THAN_SIGN:{this.state=m.TAG_OPEN;break}case p.AMPERSAND:{this._startCharacterReference();break}case p.NULL:{this._err(C.unexpectedNullCharacter),this._emitCodePoint(t);break}case p.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case p.AMPERSAND:{this._startCharacterReference();break}case p.LESS_THAN_SIGN:{this.state=m.RCDATA_LESS_THAN_SIGN;break}case p.NULL:{this._err(C.unexpectedNullCharacter),this._emitChars(ee);break}case p.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case p.LESS_THAN_SIGN:{this.state=m.RAWTEXT_LESS_THAN_SIGN;break}case p.NULL:{this._err(C.unexpectedNullCharacter),this._emitChars(ee);break}case p.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case p.LESS_THAN_SIGN:{this.state=m.SCRIPT_DATA_LESS_THAN_SIGN;break}case p.NULL:{this._err(C.unexpectedNullCharacter),this._emitChars(ee);break}case p.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case p.NULL:{this._err(C.unexpectedNullCharacter),this._emitChars(ee);break}case p.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Ke(t))this._createStartTagToken(),this.state=m.TAG_NAME,this._stateTagName(t);else switch(t){case p.EXCLAMATION_MARK:{this.state=m.MARKUP_DECLARATION_OPEN;break}case p.SOLIDUS:{this.state=m.END_TAG_OPEN;break}case p.QUESTION_MARK:{this._err(C.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=m.BOGUS_COMMENT,this._stateBogusComment(t);break}case p.EOF:{this._err(C.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(C.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=m.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Ke(t))this._createEndTagToken(),this.state=m.TAG_NAME,this._stateTagName(t);else switch(t){case p.GREATER_THAN_SIGN:{this._err(C.missingEndTagName),this.state=m.DATA;break}case p.EOF:{this._err(C.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(C.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=m.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const r=this.currentToken;switch(t){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:{this.state=m.BEFORE_ATTRIBUTE_NAME;break}case p.SOLIDUS:{this.state=m.SELF_CLOSING_START_TAG;break}case p.GREATER_THAN_SIGN:{this.state=m.DATA,this.emitCurrentTagToken();break}case p.NULL:{this._err(C.unexpectedNullCharacter),r.tagName+=ee;break}case p.EOF:{this._err(C.eofInTag),this._emitEOFToken();break}default:r.tagName+=String.fromCodePoint(tr(t)?Lr(t):t)}}_stateRcdataLessThanSign(t){t===p.SOLIDUS?this.state=m.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=m.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Ke(t)?(this.state=m.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=m.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const r=this.currentToken;switch(r.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=m.BEFORE_ATTRIBUTE_NAME,!1;case p.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=m.SELF_CLOSING_START_TAG,!1;case p.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=m.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=m.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===p.SOLIDUS?this.state=m.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=m.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Ke(t)?(this.state=m.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=m.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=m.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case p.SOLIDUS:{this.state=m.SCRIPT_DATA_END_TAG_OPEN;break}case p.EXCLAMATION_MARK:{this.state=m.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=m.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Ke(t)?(this.state=m.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=m.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=m.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===p.HYPHEN_MINUS?(this.state=m.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=m.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===p.HYPHEN_MINUS?(this.state=m.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=m.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case p.HYPHEN_MINUS:{this.state=m.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case p.LESS_THAN_SIGN:{this.state=m.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case p.NULL:{this._err(C.unexpectedNullCharacter),this._emitChars(ee);break}case p.EOF:{this._err(C.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case p.HYPHEN_MINUS:{this.state=m.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case p.LESS_THAN_SIGN:{this.state=m.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case p.NULL:{this._err(C.unexpectedNullCharacter),this.state=m.SCRIPT_DATA_ESCAPED,this._emitChars(ee);break}case p.EOF:{this._err(C.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=m.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case p.HYPHEN_MINUS:{this._emitChars("-");break}case p.LESS_THAN_SIGN:{this.state=m.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case p.GREATER_THAN_SIGN:{this.state=m.SCRIPT_DATA,this._emitChars(">");break}case p.NULL:{this._err(C.unexpectedNullCharacter),this.state=m.SCRIPT_DATA_ESCAPED,this._emitChars(ee);break}case p.EOF:{this._err(C.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=m.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===p.SOLIDUS?this.state=m.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Ke(t)?(this._emitChars("<"),this.state=m.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=m.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Ke(t)?(this.state=m.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=m.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=m.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(ge.SCRIPT,!1)&&ws(this.preprocessor.peek(ge.SCRIPT.length))){this._emitCodePoint(t);for(let r=0;r<ge.SCRIPT.length;r++)this._emitCodePoint(this._consume());this.state=m.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=m.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case p.HYPHEN_MINUS:{this.state=m.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case p.LESS_THAN_SIGN:{this.state=m.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case p.NULL:{this._err(C.unexpectedNullCharacter),this._emitChars(ee);break}case p.EOF:{this._err(C.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case p.HYPHEN_MINUS:{this.state=m.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case p.LESS_THAN_SIGN:{this.state=m.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case p.NULL:{this._err(C.unexpectedNullCharacter),this.state=m.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ee);break}case p.EOF:{this._err(C.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=m.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case p.HYPHEN_MINUS:{this._emitChars("-");break}case p.LESS_THAN_SIGN:{this.state=m.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case p.GREATER_THAN_SIGN:{this.state=m.SCRIPT_DATA,this._emitChars(">");break}case p.NULL:{this._err(C.unexpectedNullCharacter),this.state=m.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ee);break}case p.EOF:{this._err(C.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=m.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===p.SOLIDUS?(this.state=m.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=m.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(ge.SCRIPT,!1)&&ws(this.preprocessor.peek(ge.SCRIPT.length))){this._emitCodePoint(t);for(let r=0;r<ge.SCRIPT.length;r++)this._emitCodePoint(this._consume());this.state=m.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=m.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:break;case p.SOLIDUS:case p.GREATER_THAN_SIGN:case p.EOF:{this.state=m.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case p.EQUALS_SIGN:{this._err(C.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=m.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=m.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:case p.SOLIDUS:case p.GREATER_THAN_SIGN:case p.EOF:{this._leaveAttrName(),this.state=m.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case p.EQUALS_SIGN:{this._leaveAttrName(),this.state=m.BEFORE_ATTRIBUTE_VALUE;break}case p.QUOTATION_MARK:case p.APOSTROPHE:case p.LESS_THAN_SIGN:{this._err(C.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case p.NULL:{this._err(C.unexpectedNullCharacter),this.currentAttr.name+=ee;break}default:this.currentAttr.name+=String.fromCodePoint(tr(t)?Lr(t):t)}}_stateAfterAttributeName(t){switch(t){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:break;case p.SOLIDUS:{this.state=m.SELF_CLOSING_START_TAG;break}case p.EQUALS_SIGN:{this.state=m.BEFORE_ATTRIBUTE_VALUE;break}case p.GREATER_THAN_SIGN:{this.state=m.DATA,this.emitCurrentTagToken();break}case p.EOF:{this._err(C.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=m.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:break;case p.QUOTATION_MARK:{this.state=m.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case p.APOSTROPHE:{this.state=m.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case p.GREATER_THAN_SIGN:{this._err(C.missingAttributeValue),this.state=m.DATA,this.emitCurrentTagToken();break}default:this.state=m.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case p.QUOTATION_MARK:{this.state=m.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case p.AMPERSAND:{this._startCharacterReference();break}case p.NULL:{this._err(C.unexpectedNullCharacter),this.currentAttr.value+=ee;break}case p.EOF:{this._err(C.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case p.APOSTROPHE:{this.state=m.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case p.AMPERSAND:{this._startCharacterReference();break}case p.NULL:{this._err(C.unexpectedNullCharacter),this.currentAttr.value+=ee;break}case p.EOF:{this._err(C.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:{this._leaveAttrValue(),this.state=m.BEFORE_ATTRIBUTE_NAME;break}case p.AMPERSAND:{this._startCharacterReference();break}case p.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=m.DATA,this.emitCurrentTagToken();break}case p.NULL:{this._err(C.unexpectedNullCharacter),this.currentAttr.value+=ee;break}case p.QUOTATION_MARK:case p.APOSTROPHE:case p.LESS_THAN_SIGN:case p.EQUALS_SIGN:case p.GRAVE_ACCENT:{this._err(C.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case p.EOF:{this._err(C.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:{this._leaveAttrValue(),this.state=m.BEFORE_ATTRIBUTE_NAME;break}case p.SOLIDUS:{this._leaveAttrValue(),this.state=m.SELF_CLOSING_START_TAG;break}case p.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=m.DATA,this.emitCurrentTagToken();break}case p.EOF:{this._err(C.eofInTag),this._emitEOFToken();break}default:this._err(C.missingWhitespaceBetweenAttributes),this.state=m.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case p.GREATER_THAN_SIGN:{const r=this.currentToken;r.selfClosing=!0,this.state=m.DATA,this.emitCurrentTagToken();break}case p.EOF:{this._err(C.eofInTag),this._emitEOFToken();break}default:this._err(C.unexpectedSolidusInTag),this.state=m.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const r=this.currentToken;switch(t){case p.GREATER_THAN_SIGN:{this.state=m.DATA,this.emitCurrentComment(r);break}case p.EOF:{this.emitCurrentComment(r),this._emitEOFToken();break}case p.NULL:{this._err(C.unexpectedNullCharacter),r.data+=ee;break}default:r.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(ge.DASH_DASH,!0)?(this._createCommentToken(ge.DASH_DASH.length+1),this.state=m.COMMENT_START):this._consumeSequenceIfMatch(ge.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(ge.DOCTYPE.length+1),this.state=m.DOCTYPE):this._consumeSequenceIfMatch(ge.CDATA_START,!0)?this.inForeignNode?this.state=m.CDATA_SECTION:(this._err(C.cdataInHtmlContent),this._createCommentToken(ge.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=m.BOGUS_COMMENT):this._ensureHibernation()||(this._err(C.incorrectlyOpenedComment),this._createCommentToken(2),this.state=m.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case p.HYPHEN_MINUS:{this.state=m.COMMENT_START_DASH;break}case p.GREATER_THAN_SIGN:{this._err(C.abruptClosingOfEmptyComment),this.state=m.DATA;const r=this.currentToken;this.emitCurrentComment(r);break}default:this.state=m.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const r=this.currentToken;switch(t){case p.HYPHEN_MINUS:{this.state=m.COMMENT_END;break}case p.GREATER_THAN_SIGN:{this._err(C.abruptClosingOfEmptyComment),this.state=m.DATA,this.emitCurrentComment(r);break}case p.EOF:{this._err(C.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="-",this.state=m.COMMENT,this._stateComment(t)}}_stateComment(t){const r=this.currentToken;switch(t){case p.HYPHEN_MINUS:{this.state=m.COMMENT_END_DASH;break}case p.LESS_THAN_SIGN:{r.data+="<",this.state=m.COMMENT_LESS_THAN_SIGN;break}case p.NULL:{this._err(C.unexpectedNullCharacter),r.data+=ee;break}case p.EOF:{this._err(C.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const r=this.currentToken;switch(t){case p.EXCLAMATION_MARK:{r.data+="!",this.state=m.COMMENT_LESS_THAN_SIGN_BANG;break}case p.LESS_THAN_SIGN:{r.data+="<";break}default:this.state=m.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===p.HYPHEN_MINUS?this.state=m.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=m.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===p.HYPHEN_MINUS?this.state=m.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=m.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==p.GREATER_THAN_SIGN&&t!==p.EOF&&this._err(C.nestedComment),this.state=m.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const r=this.currentToken;switch(t){case p.HYPHEN_MINUS:{this.state=m.COMMENT_END;break}case p.EOF:{this._err(C.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="-",this.state=m.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const r=this.currentToken;switch(t){case p.GREATER_THAN_SIGN:{this.state=m.DATA,this.emitCurrentComment(r);break}case p.EXCLAMATION_MARK:{this.state=m.COMMENT_END_BANG;break}case p.HYPHEN_MINUS:{r.data+="-";break}case p.EOF:{this._err(C.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="--",this.state=m.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const r=this.currentToken;switch(t){case p.HYPHEN_MINUS:{r.data+="--!",this.state=m.COMMENT_END_DASH;break}case p.GREATER_THAN_SIGN:{this._err(C.incorrectlyClosedComment),this.state=m.DATA,this.emitCurrentComment(r);break}case p.EOF:{this._err(C.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="--!",this.state=m.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:{this.state=m.BEFORE_DOCTYPE_NAME;break}case p.GREATER_THAN_SIGN:{this.state=m.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case p.EOF:{this._err(C.eofInDoctype),this._createDoctypeToken(null);const r=this.currentToken;r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(C.missingWhitespaceBeforeDoctypeName),this.state=m.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(tr(t))this._createDoctypeToken(String.fromCharCode(Lr(t))),this.state=m.DOCTYPE_NAME;else switch(t){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:break;case p.NULL:{this._err(C.unexpectedNullCharacter),this._createDoctypeToken(ee),this.state=m.DOCTYPE_NAME;break}case p.GREATER_THAN_SIGN:{this._err(C.missingDoctypeName),this._createDoctypeToken(null);const r=this.currentToken;r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=m.DATA;break}case p.EOF:{this._err(C.eofInDoctype),this._createDoctypeToken(null);const r=this.currentToken;r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=m.DOCTYPE_NAME}}_stateDoctypeName(t){const r=this.currentToken;switch(t){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:{this.state=m.AFTER_DOCTYPE_NAME;break}case p.GREATER_THAN_SIGN:{this.state=m.DATA,this.emitCurrentDoctype(r);break}case p.NULL:{this._err(C.unexpectedNullCharacter),r.name+=ee;break}case p.EOF:{this._err(C.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.name+=String.fromCodePoint(tr(t)?Lr(t):t)}}_stateAfterDoctypeName(t){const r=this.currentToken;switch(t){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:break;case p.GREATER_THAN_SIGN:{this.state=m.DATA,this.emitCurrentDoctype(r);break}case p.EOF:{this._err(C.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(ge.PUBLIC,!1)?this.state=m.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(ge.SYSTEM,!1)?this.state=m.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(C.invalidCharacterSequenceAfterDoctypeName),r.forceQuirks=!0,this.state=m.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const r=this.currentToken;switch(t){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:{this.state=m.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case p.QUOTATION_MARK:{this._err(C.missingWhitespaceAfterDoctypePublicKeyword),r.publicId="",this.state=m.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case p.APOSTROPHE:{this._err(C.missingWhitespaceAfterDoctypePublicKeyword),r.publicId="",this.state=m.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case p.GREATER_THAN_SIGN:{this._err(C.missingDoctypePublicIdentifier),r.forceQuirks=!0,this.state=m.DATA,this.emitCurrentDoctype(r);break}case p.EOF:{this._err(C.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(C.missingQuoteBeforeDoctypePublicIdentifier),r.forceQuirks=!0,this.state=m.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const r=this.currentToken;switch(t){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:break;case p.QUOTATION_MARK:{r.publicId="",this.state=m.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case p.APOSTROPHE:{r.publicId="",this.state=m.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case p.GREATER_THAN_SIGN:{this._err(C.missingDoctypePublicIdentifier),r.forceQuirks=!0,this.state=m.DATA,this.emitCurrentDoctype(r);break}case p.EOF:{this._err(C.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(C.missingQuoteBeforeDoctypePublicIdentifier),r.forceQuirks=!0,this.state=m.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const r=this.currentToken;switch(t){case p.QUOTATION_MARK:{this.state=m.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case p.NULL:{this._err(C.unexpectedNullCharacter),r.publicId+=ee;break}case p.GREATER_THAN_SIGN:{this._err(C.abruptDoctypePublicIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=m.DATA;break}case p.EOF:{this._err(C.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const r=this.currentToken;switch(t){case p.APOSTROPHE:{this.state=m.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case p.NULL:{this._err(C.unexpectedNullCharacter),r.publicId+=ee;break}case p.GREATER_THAN_SIGN:{this._err(C.abruptDoctypePublicIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=m.DATA;break}case p.EOF:{this._err(C.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const r=this.currentToken;switch(t){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:{this.state=m.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case p.GREATER_THAN_SIGN:{this.state=m.DATA,this.emitCurrentDoctype(r);break}case p.QUOTATION_MARK:{this._err(C.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),r.systemId="",this.state=m.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case p.APOSTROPHE:{this._err(C.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),r.systemId="",this.state=m.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case p.EOF:{this._err(C.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(C.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=m.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const r=this.currentToken;switch(t){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:break;case p.GREATER_THAN_SIGN:{this.emitCurrentDoctype(r),this.state=m.DATA;break}case p.QUOTATION_MARK:{r.systemId="",this.state=m.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case p.APOSTROPHE:{r.systemId="",this.state=m.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case p.EOF:{this._err(C.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(C.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=m.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const r=this.currentToken;switch(t){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:{this.state=m.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case p.QUOTATION_MARK:{this._err(C.missingWhitespaceAfterDoctypeSystemKeyword),r.systemId="",this.state=m.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case p.APOSTROPHE:{this._err(C.missingWhitespaceAfterDoctypeSystemKeyword),r.systemId="",this.state=m.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case p.GREATER_THAN_SIGN:{this._err(C.missingDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=m.DATA,this.emitCurrentDoctype(r);break}case p.EOF:{this._err(C.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(C.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=m.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const r=this.currentToken;switch(t){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:break;case p.QUOTATION_MARK:{r.systemId="",this.state=m.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case p.APOSTROPHE:{r.systemId="",this.state=m.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case p.GREATER_THAN_SIGN:{this._err(C.missingDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=m.DATA,this.emitCurrentDoctype(r);break}case p.EOF:{this._err(C.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(C.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=m.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const r=this.currentToken;switch(t){case p.QUOTATION_MARK:{this.state=m.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case p.NULL:{this._err(C.unexpectedNullCharacter),r.systemId+=ee;break}case p.GREATER_THAN_SIGN:{this._err(C.abruptDoctypeSystemIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=m.DATA;break}case p.EOF:{this._err(C.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const r=this.currentToken;switch(t){case p.APOSTROPHE:{this.state=m.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case p.NULL:{this._err(C.unexpectedNullCharacter),r.systemId+=ee;break}case p.GREATER_THAN_SIGN:{this._err(C.abruptDoctypeSystemIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=m.DATA;break}case p.EOF:{this._err(C.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const r=this.currentToken;switch(t){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:break;case p.GREATER_THAN_SIGN:{this.emitCurrentDoctype(r),this.state=m.DATA;break}case p.EOF:{this._err(C.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(C.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=m.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const r=this.currentToken;switch(t){case p.GREATER_THAN_SIGN:{this.emitCurrentDoctype(r),this.state=m.DATA;break}case p.NULL:{this._err(C.unexpectedNullCharacter);break}case p.EOF:{this.emitCurrentDoctype(r),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case p.RIGHT_SQUARE_BRACKET:{this.state=m.CDATA_SECTION_BRACKET;break}case p.EOF:{this._err(C.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===p.RIGHT_SQUARE_BRACKET?this.state=m.CDATA_SECTION_END:(this._emitChars("]"),this.state=m.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case p.GREATER_THAN_SIGN:{this.state=m.DATA;break}case p.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=m.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(p.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Ss(this.preprocessor.peek(1))?m.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Ss(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===p.SEMICOLON&&this._err(C.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const vu=new Set([o.DD,o.DT,o.LI,o.OPTGROUP,o.OPTION,o.P,o.RB,o.RP,o.RT,o.RTC]),Ls=new Set([...vu,o.CAPTION,o.COLGROUP,o.TBODY,o.TD,o.TFOOT,o.TH,o.THEAD,o.TR]),Qr=new Set([o.APPLET,o.CAPTION,o.HTML,o.MARQUEE,o.OBJECT,o.TABLE,o.TD,o.TEMPLATE,o.TH]),Hf=new Set([...Qr,o.OL,o.UL]),Uf=new Set([...Qr,o.BUTTON]),Rs=new Set([o.ANNOTATION_XML,o.MI,o.MN,o.MO,o.MS,o.MTEXT]),Os=new Set([o.DESC,o.FOREIGN_OBJECT,o.TITLE]),jf=new Set([o.TR,o.TEMPLATE,o.HTML]),zf=new Set([o.TBODY,o.TFOOT,o.THEAD,o.TEMPLATE,o.HTML]),$f=new Set([o.TABLE,o.TEMPLATE,o.HTML]),Yf=new Set([o.TD,o.TH]);class qf{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,r,n){this.treeAdapter=r,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=o.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===o.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===I.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,r){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=r,this.currentTagId=r,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,r,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,r){const n=this._indexOf(t);this.items[n]=r,n===this.stackTop&&(this.current=r)}insertAfter(t,r,n){const a=this._indexOf(t)+1;this.items.splice(a,0,r),this.tagIDs.splice(a,0,n),this.stackTop++,a===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,a===this.stackTop)}popUntilTagNamePopped(t){let r=this.stackTop+1;do r=this.tagIDs.lastIndexOf(t,r-1);while(r>0&&this.treeAdapter.getNamespaceURI(this.items[r])!==I.HTML);this.shortenToLength(Math.max(r,0))}shortenToLength(t){for(;this.stackTop>=t;){const r=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(r,this.stackTop<t)}}popUntilElementPopped(t){const r=this._indexOf(t);this.shortenToLength(Math.max(r,0))}popUntilPopped(t,r){const n=this._indexOfTagNames(t,r);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Xn,I.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Yf,I.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,r){for(let n=this.stackTop;n>=0;n--)if(t.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===r)return n;return-1}clearBackTo(t,r){const n=this._indexOfTagNames(t,r);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo($f,I.HTML)}clearBackToTableBodyContext(){this.clearBackTo(zf,I.HTML)}clearBackToTableRowContext(){this.clearBackTo(jf,I.HTML)}remove(t){const r=this._indexOf(t);r>=0&&(r===this.stackTop?this.pop():(this.items.splice(r,1),this.tagIDs.splice(r,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===o.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const r=this._indexOf(t)-1;return r>=0?this.items[r]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===o.HTML}hasInDynamicScope(t,r){for(let n=this.stackTop;n>=0;n--){const a=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case I.HTML:{if(a===t)return!0;if(r.has(a))return!1;break}case I.SVG:{if(Os.has(a))return!1;break}case I.MATHML:{if(Rs.has(a))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Qr)}hasInListItemScope(t){return this.hasInDynamicScope(t,Hf)}hasInButtonScope(t){return this.hasInDynamicScope(t,Uf)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const r=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case I.HTML:{if(Xn.has(r))return!0;if(Qr.has(r))return!1;break}case I.SVG:{if(Os.has(r))return!1;break}case I.MATHML:{if(Rs.has(r))return!1;break}}}return!0}hasInTableScope(t){for(let r=this.stackTop;r>=0;r--)if(this.treeAdapter.getNamespaceURI(this.items[r])===I.HTML)switch(this.tagIDs[r]){case t:return!0;case o.TABLE:case o.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===I.HTML)switch(this.tagIDs[t]){case o.TBODY:case o.THEAD:case o.TFOOT:return!0;case o.TABLE:case o.HTML:return!1}return!0}hasInSelectScope(t){for(let r=this.stackTop;r>=0;r--)if(this.treeAdapter.getNamespaceURI(this.items[r])===I.HTML)switch(this.tagIDs[r]){case t:return!0;case o.OPTION:case o.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&vu.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Ls.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Ls.has(this.currentTagId);)this.pop()}}const _n=3;var Pe;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Pe||(Pe={}));const Ds={type:Pe.Marker};class Vf{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,r){const n=[],a=r.length,s=this.treeAdapter.getTagName(t),i=this.treeAdapter.getNamespaceURI(t);for(let l=0;l<this.entries.length;l++){const u=this.entries[l];if(u.type===Pe.Marker)break;const{element:c}=u;if(this.treeAdapter.getTagName(c)===s&&this.treeAdapter.getNamespaceURI(c)===i){const d=this.treeAdapter.getAttrList(c);d.length===a&&n.push({idx:l,attrs:d})}}return n}_ensureNoahArkCondition(t){if(this.entries.length<_n)return;const r=this.treeAdapter.getAttrList(t),n=this._getNoahArkConditionCandidates(t,r);if(n.length<_n)return;const a=new Map(r.map(i=>[i.name,i.value]));let s=0;for(let i=0;i<n.length;i++){const l=n[i];l.attrs.every(u=>a.get(u.name)===u.value)&&(s+=1,s>=_n&&this.entries.splice(l.idx,1))}}insertMarker(){this.entries.unshift(Ds)}pushElement(t,r){this._ensureNoahArkCondition(t),this.entries.unshift({type:Pe.Element,element:t,token:r})}insertElementAfterBookmark(t,r){const n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:Pe.Element,element:t,token:r})}removeEntry(t){const r=this.entries.indexOf(t);r!==-1&&this.entries.splice(r,1)}clearToLastMarker(){const t=this.entries.indexOf(Ds);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const r=this.entries.find(n=>n.type===Pe.Marker||this.treeAdapter.getTagName(n.element)===t);return r&&r.type===Pe.Element?r:null}getElementEntry(t){return this.entries.find(r=>r.type===Pe.Element&&r.element===t)}}const Ze={createDocument(){return{nodeName:"#document",mode:ye.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,r){return{nodeName:e,tagName:e,attrs:r,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,r){const n=e.childNodes.indexOf(r);e.childNodes.splice(n,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,r,n){const a=e.childNodes.find(s=>s.nodeName==="#documentType");if(a)a.name=t,a.publicId=r,a.systemId=n;else{const s={nodeName:"#documentType",name:t,publicId:r,systemId:n,parentNode:null};Ze.appendChild(e,s)}},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 r=e.childNodes[e.childNodes.length-1];if(Ze.isTextNode(r)){r.value+=t;return}}Ze.appendChild(e,Ze.createTextNode(t))},insertTextBefore(e,t,r){const n=e.childNodes[e.childNodes.indexOf(r)-1];n&&Ze.isTextNode(n)?n.value+=t:Ze.insertBefore(e,Ze.createTextNode(t),r)},adoptAttributes(e,t){const r=new Set(e.attrs.map(n=>n.name));for(let n=0;n<t.length;n++)r.has(t[n].name)||e.attrs.push(t[n])},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}}},Mu="html",Wf="about:legacy-compat",Gf="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Bu=["+//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//"],Qf=[...Bu,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Xf=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Fu=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Kf=[...Fu,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Ps(e,t){return t.some(r=>e.startsWith(r))}function Zf(e){return e.name===Mu&&e.publicId===null&&(e.systemId===null||e.systemId===Wf)}function Jf(e){if(e.name!==Mu)return ye.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===Gf)return ye.QUIRKS;let{publicId:r}=e;if(r!==null){if(r=r.toLowerCase(),Xf.has(r))return ye.QUIRKS;let n=t===null?Qf:Bu;if(Ps(r,n))return ye.QUIRKS;if(n=t===null?Fu:Kf,Ps(r,n))return ye.LIMITED_QUIRKS}return ye.NO_QUIRKS}const vs={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},e0="definitionurl",t0="definitionURL",r0=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])),n0=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:I.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:I.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:I.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:I.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:I.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:I.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:I.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:I.XML}],["xml:space",{prefix:"xml",name:"space",namespace:I.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:I.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:I.XMLNS}]]),a0=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])),s0=new Set([o.B,o.BIG,o.BLOCKQUOTE,o.BODY,o.BR,o.CENTER,o.CODE,o.DD,o.DIV,o.DL,o.DT,o.EM,o.EMBED,o.H1,o.H2,o.H3,o.H4,o.H5,o.H6,o.HEAD,o.HR,o.I,o.IMG,o.LI,o.LISTING,o.MENU,o.META,o.NOBR,o.OL,o.P,o.PRE,o.RUBY,o.S,o.SMALL,o.SPAN,o.STRONG,o.STRIKE,o.SUB,o.SUP,o.TABLE,o.TT,o.U,o.UL,o.VAR]);function i0(e){const t=e.tagID;return t===o.FONT&&e.attrs.some(({name:n})=>n===gt.COLOR||n===gt.SIZE||n===gt.FACE)||s0.has(t)}function Hu(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===e0){e.attrs[t].name=t0;break}}function Uu(e){for(let t=0;t<e.attrs.length;t++){const r=r0.get(e.attrs[t].name);r!=null&&(e.attrs[t].name=r)}}function Ra(e){for(let t=0;t<e.attrs.length;t++){const r=n0.get(e.attrs[t].name);r&&(e.attrs[t].prefix=r.prefix,e.attrs[t].name=r.name,e.attrs[t].namespace=r.namespace)}}function u0(e){const t=a0.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Ht(e.tagName))}function o0(e,t){return t===I.MATHML&&(e===o.MI||e===o.MO||e===o.MN||e===o.MS||e===o.MTEXT)}function l0(e,t,r){if(t===I.MATHML&&e===o.ANNOTATION_XML){for(let n=0;n<r.length;n++)if(r[n].name===gt.ENCODING){const a=r[n].value.toLowerCase();return a===vs.TEXT_HTML||a===vs.APPLICATION_XML}}return t===I.SVG&&(e===o.FOREIGN_OBJECT||e===o.DESC||e===o.TITLE)}function c0(e,t,r,n){return(!n||n===I.HTML)&&l0(e,t,r)||(!n||n===I.MATHML)&&o0(e,t)}const d0="hidden",f0=8,h0=3;var E;(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"})(E||(E={}));const p0={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},ju=new Set([o.TABLE,o.TBODY,o.TFOOT,o.THEAD,o.TR]),Ms={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ze,onParseError:null};class Bs{constructor(t,r,n=null,a=null){this.fragmentContext=n,this.scriptHandler=a,this.currentToken=null,this.stopped=!1,this.insertionMode=E.INITIAL,this.originalInsertionMode=E.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={...Ms,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=r??this.treeAdapter.createDocument(),this.tokenizer=new Ff(this.options,this),this.activeFormattingElements=new Vf(this.treeAdapter),this.fragmentContextID=n?Ht(this.treeAdapter.getTagName(n)):o.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new qf(this.document,this.treeAdapter,this)}static parse(t,r){const n=new this(r);return n.tokenizer.write(t,!0),n.document}static getFragmentParser(t,r){const n={...Ms,...r};t??(t=n.treeAdapter.createElement(x.TEMPLATE,I.HTML,[]));const a=n.treeAdapter.createElement("documentmock",I.HTML,[]),s=new this(n,a,t);return s.fragmentContextID===o.TEMPLATE&&s.tmplInsertionModeStack.unshift(E.IN_TEMPLATE),s._initTokenizerForFragmentParsing(),s._insertFakeRootElement(),s._resetInsertionMode(),s._findFormInFragmentContext(),s}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),r=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,r),r}_err(t,r,n){var a;if(!this.onParseError)return;const s=(a=t.location)!==null&&a!==void 0?a:p0,i={code:r,startLine:s.startLine,startCol:s.startCol,startOffset:s.startOffset,endLine:n?s.startLine:s.endLine,endCol:n?s.startCol:s.endCol,endOffset:n?s.startOffset:s.endOffset};this.onParseError(i)}onItemPush(t,r,n){var a,s;(s=(a=this.treeAdapter).onItemPush)===null||s===void 0||s.call(a,t),n&&this.openElements.stackTop>0&&this._setContextModes(t,r)}onItemPop(t,r){var n,a;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(a=(n=this.treeAdapter).onItemPop)===null||a===void 0||a.call(n,t,this.openElements.current),r){let s,i;this.openElements.stackTop===0&&this.fragmentContext?(s=this.fragmentContext,i=this.fragmentContextID):{current:s,currentTagId:i}=this.openElements,this._setContextModes(s,i)}}_setContextModes(t,r){const n=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===I.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&t!==void 0&&r!==void 0&&!this._isIntegrationPoint(r,t)}_switchToTextParsing(t,r){this._insertElement(t,I.HTML),this.tokenizer.state=r,this.originalInsertionMode=this.insertionMode,this.insertionMode=E.TEXT}switchToPlaintextParsing(){this.insertionMode=E.TEXT,this.originalInsertionMode=E.IN_BODY,this.tokenizer.state=ae.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)===x.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==I.HTML))switch(this.fragmentContextID){case o.TITLE:case o.TEXTAREA:{this.tokenizer.state=ae.RCDATA;break}case o.STYLE:case o.XMP:case o.IFRAME:case o.NOEMBED:case o.NOFRAMES:case o.NOSCRIPT:{this.tokenizer.state=ae.RAWTEXT;break}case o.SCRIPT:{this.tokenizer.state=ae.SCRIPT_DATA;break}case o.PLAINTEXT:{this.tokenizer.state=ae.PLAINTEXT;break}}}_setDocumentType(t){const r=t.name||"",n=t.publicId||"",a=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,r,n,a),t.location){const i=this.treeAdapter.getChildNodes(this.document).find(l=>this.treeAdapter.isDocumentTypeNode(l));i&&this.treeAdapter.setNodeSourceCodeLocation(i,t.location)}}_attachElementToTree(t,r){if(this.options.sourceCodeLocationInfo){const n=r&&{...r,startTag:r};this.treeAdapter.setNodeSourceCodeLocation(t,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const n=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(n??this.document,t)}}_appendElement(t,r){const n=this.treeAdapter.createElement(t.tagName,r,t.attrs);this._attachElementToTree(n,t.location)}_insertElement(t,r){const n=this.treeAdapter.createElement(t.tagName,r,t.attrs);this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID)}_insertFakeElement(t,r){const n=this.treeAdapter.createElement(t,I.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,r)}_insertTemplate(t){const r=this.treeAdapter.createElement(t.tagName,I.HTML,t.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(r,n),this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(x.HTML,I.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,o.HTML)}_appendCommentNode(t,r){const n=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(r,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,t.location)}_insertCharacters(t){let r,n;if(this._shouldFosterParentOnInsertion()?({parent:r,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(r,t.chars,n):this.treeAdapter.insertText(r,t.chars)):(r=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(r,t.chars)),!t.location)return;const a=this.treeAdapter.getChildNodes(r),s=n?a.lastIndexOf(n):a.length,i=a[s-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){const{endLine:u,endCol:c,endOffset:d}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:u,endCol:c,endOffset:d})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,t.location)}_adoptNodes(t,r){for(let n=this.treeAdapter.getFirstChild(t);n;n=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(r,n)}_setEndLocation(t,r){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&r.location){const n=r.location,a=this.treeAdapter.getTagName(t),s=r.type===Y.END_TAG&&a===r.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,s)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let r,n;return this.openElements.stackTop===0&&this.fragmentContext?(r=this.fragmentContext,n=this.fragmentContextID):{current:r,currentTagId:n}=this.openElements,t.tagID===o.SVG&&this.treeAdapter.getTagName(r)===x.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(r)===I.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===o.MGLYPH||t.tagID===o.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,r,I.HTML)}_processToken(t){switch(t.type){case Y.CHARACTER:{this.onCharacter(t);break}case Y.NULL_CHARACTER:{this.onNullCharacter(t);break}case Y.COMMENT:{this.onComment(t);break}case Y.DOCTYPE:{this.onDoctype(t);break}case Y.START_TAG:{this._processStartTag(t);break}case Y.END_TAG:{this.onEndTag(t);break}case Y.EOF:{this.onEof(t);break}case Y.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,r,n){const a=this.treeAdapter.getNamespaceURI(r),s=this.treeAdapter.getAttrList(r);return c0(t,a,s,n)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const r=this.activeFormattingElements.entries.findIndex(a=>a.type===Pe.Marker||this.openElements.contains(a.element)),n=r===-1?t-1:r-1;for(let a=n;a>=0;a--){const s=this.activeFormattingElements.entries[a];this._insertElement(s.token,this.treeAdapter.getNamespaceURI(s.element)),s.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=E.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(o.P),this.openElements.popUntilTagNamePopped(o.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case o.TR:{this.insertionMode=E.IN_ROW;return}case o.TBODY:case o.THEAD:case o.TFOOT:{this.insertionMode=E.IN_TABLE_BODY;return}case o.CAPTION:{this.insertionMode=E.IN_CAPTION;return}case o.COLGROUP:{this.insertionMode=E.IN_COLUMN_GROUP;return}case o.TABLE:{this.insertionMode=E.IN_TABLE;return}case o.BODY:{this.insertionMode=E.IN_BODY;return}case o.FRAMESET:{this.insertionMode=E.IN_FRAMESET;return}case o.SELECT:{this._resetInsertionModeForSelect(t);return}case o.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case o.HTML:{this.insertionMode=this.headElement?E.AFTER_HEAD:E.BEFORE_HEAD;return}case o.TD:case o.TH:{if(t>0){this.insertionMode=E.IN_CELL;return}break}case o.HEAD:{if(t>0){this.insertionMode=E.IN_HEAD;return}break}}this.insertionMode=E.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let r=t-1;r>0;r--){const n=this.openElements.tagIDs[r];if(n===o.TEMPLATE)break;if(n===o.TABLE){this.insertionMode=E.IN_SELECT_IN_TABLE;return}}this.insertionMode=E.IN_SELECT}_isElementCausesFosterParenting(t){return ju.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 r=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case o.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(r)===I.HTML)return{parent:this.treeAdapter.getTemplateContent(r),beforeElement:null};break}case o.TABLE:{const n=this.treeAdapter.getParentNode(r);return n?{parent:n,beforeElement:r}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const r=this._findFosterParentingLocation();r.beforeElement?this.treeAdapter.insertBefore(r.parent,t,r.beforeElement):this.treeAdapter.appendChild(r.parent,t)}_isSpecialElement(t,r){const n=this.treeAdapter.getNamespaceURI(t);return Pf[n].has(r)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Yh(this,t);return}switch(this.insertionMode){case E.INITIAL:{Vt(this,t);break}case E.BEFORE_HTML:{sr(this,t);break}case E.BEFORE_HEAD:{ir(this,t);break}case E.IN_HEAD:{ur(this,t);break}case E.IN_HEAD_NO_SCRIPT:{or(this,t);break}case E.AFTER_HEAD:{lr(this,t);break}case E.IN_BODY:case E.IN_CAPTION:case E.IN_CELL:case E.IN_TEMPLATE:{$u(this,t);break}case E.TEXT:case E.IN_SELECT:case E.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case E.IN_TABLE:case E.IN_TABLE_BODY:case E.IN_ROW:{yn(this,t);break}case E.IN_TABLE_TEXT:{Qu(this,t);break}case E.IN_COLUMN_GROUP:{Xr(this,t);break}case E.AFTER_BODY:{Kr(this,t);break}case E.AFTER_AFTER_BODY:{jr(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){$h(this,t);return}switch(this.insertionMode){case E.INITIAL:{Vt(this,t);break}case E.BEFORE_HTML:{sr(this,t);break}case E.BEFORE_HEAD:{ir(this,t);break}case E.IN_HEAD:{ur(this,t);break}case E.IN_HEAD_NO_SCRIPT:{or(this,t);break}case E.AFTER_HEAD:{lr(this,t);break}case E.TEXT:{this._insertCharacters(t);break}case E.IN_TABLE:case E.IN_TABLE_BODY:case E.IN_ROW:{yn(this,t);break}case E.IN_COLUMN_GROUP:{Xr(this,t);break}case E.AFTER_BODY:{Kr(this,t);break}case E.AFTER_AFTER_BODY:{jr(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Kn(this,t);return}switch(this.insertionMode){case E.INITIAL:case E.BEFORE_HTML:case E.BEFORE_HEAD:case E.IN_HEAD:case E.IN_HEAD_NO_SCRIPT:case E.AFTER_HEAD:case E.IN_BODY:case E.IN_TABLE:case E.IN_CAPTION:case E.IN_COLUMN_GROUP:case E.IN_TABLE_BODY:case E.IN_ROW:case E.IN_CELL:case E.IN_SELECT:case E.IN_SELECT_IN_TABLE:case E.IN_TEMPLATE:case E.IN_FRAMESET:case E.AFTER_FRAMESET:{Kn(this,t);break}case E.IN_TABLE_TEXT:{Wt(this,t);break}case E.AFTER_BODY:{x0(this,t);break}case E.AFTER_AFTER_BODY:case E.AFTER_AFTER_FRAMESET:{A0(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case E.INITIAL:{_0(this,t);break}case E.BEFORE_HEAD:case E.IN_HEAD:case E.IN_HEAD_NO_SCRIPT:case E.AFTER_HEAD:{this._err(t,C.misplacedDoctype);break}case E.IN_TABLE_TEXT:{Wt(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,C.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?qh(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case E.INITIAL:{Vt(this,t);break}case E.BEFORE_HTML:{y0(this,t);break}case E.BEFORE_HEAD:{N0(this,t);break}case E.IN_HEAD:{we(this,t);break}case E.IN_HEAD_NO_SCRIPT:{w0(this,t);break}case E.AFTER_HEAD:{R0(this,t);break}case E.IN_BODY:{fe(this,t);break}case E.IN_TABLE:{Mt(this,t);break}case E.IN_TABLE_TEXT:{Wt(this,t);break}case E.IN_CAPTION:{Ih(this,t);break}case E.IN_COLUMN_GROUP:{Pa(this,t);break}case E.IN_TABLE_BODY:{dn(this,t);break}case E.IN_ROW:{fn(this,t);break}case E.IN_CELL:{Lh(this,t);break}case E.IN_SELECT:{Zu(this,t);break}case E.IN_SELECT_IN_TABLE:{Oh(this,t);break}case E.IN_TEMPLATE:{Ph(this,t);break}case E.AFTER_BODY:{Mh(this,t);break}case E.IN_FRAMESET:{Bh(this,t);break}case E.AFTER_FRAMESET:{Hh(this,t);break}case E.AFTER_AFTER_BODY:{jh(this,t);break}case E.AFTER_AFTER_FRAMESET:{zh(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?Vh(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case E.INITIAL:{Vt(this,t);break}case E.BEFORE_HTML:{C0(this,t);break}case E.BEFORE_HEAD:{I0(this,t);break}case E.IN_HEAD:{S0(this,t);break}case E.IN_HEAD_NO_SCRIPT:{L0(this,t);break}case E.AFTER_HEAD:{O0(this,t);break}case E.IN_BODY:{cn(this,t);break}case E.TEXT:{gh(this,t);break}case E.IN_TABLE:{mr(this,t);break}case E.IN_TABLE_TEXT:{Wt(this,t);break}case E.IN_CAPTION:{Sh(this,t);break}case E.IN_COLUMN_GROUP:{wh(this,t);break}case E.IN_TABLE_BODY:{Zn(this,t);break}case E.IN_ROW:{Ku(this,t);break}case E.IN_CELL:{Rh(this,t);break}case E.IN_SELECT:{Ju(this,t);break}case E.IN_SELECT_IN_TABLE:{Dh(this,t);break}case E.IN_TEMPLATE:{vh(this,t);break}case E.AFTER_BODY:{to(this,t);break}case E.IN_FRAMESET:{Fh(this,t);break}case E.AFTER_FRAMESET:{Uh(this,t);break}case E.AFTER_AFTER_BODY:{jr(this,t);break}}}onEof(t){switch(this.insertionMode){case E.INITIAL:{Vt(this,t);break}case E.BEFORE_HTML:{sr(this,t);break}case E.BEFORE_HEAD:{ir(this,t);break}case E.IN_HEAD:{ur(this,t);break}case E.IN_HEAD_NO_SCRIPT:{or(this,t);break}case E.AFTER_HEAD:{lr(this,t);break}case E.IN_BODY:case E.IN_TABLE:case E.IN_CAPTION:case E.IN_COLUMN_GROUP:case E.IN_TABLE_BODY:case E.IN_ROW:case E.IN_CELL:case E.IN_SELECT:case E.IN_SELECT_IN_TABLE:{Wu(this,t);break}case E.TEXT:{Eh(this,t);break}case E.IN_TABLE_TEXT:{Wt(this,t);break}case E.IN_TEMPLATE:{eo(this,t);break}case E.AFTER_BODY:case E.IN_FRAMESET:case E.AFTER_FRAMESET:case E.AFTER_AFTER_BODY:case E.AFTER_AFTER_FRAMESET:{Da(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===p.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 E.IN_HEAD:case E.IN_HEAD_NO_SCRIPT:case E.AFTER_HEAD:case E.TEXT:case E.IN_COLUMN_GROUP:case E.IN_SELECT:case E.IN_SELECT_IN_TABLE:case E.IN_FRAMESET:case E.AFTER_FRAMESET:{this._insertCharacters(t);break}case E.IN_BODY:case E.IN_CAPTION:case E.IN_CELL:case E.IN_TEMPLATE:case E.AFTER_BODY:case E.AFTER_AFTER_BODY:case E.AFTER_AFTER_FRAMESET:{zu(this,t);break}case E.IN_TABLE:case E.IN_TABLE_BODY:case E.IN_ROW:{yn(this,t);break}case E.IN_TABLE_TEXT:{Gu(this,t);break}}}}function m0(e,t){let r=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return r?e.openElements.contains(r.element)?e.openElements.hasInScope(t.tagID)||(r=null):(e.activeFormattingElements.removeEntry(r),r=null):Vu(e,t),r}function b0(e,t){let r=null,n=e.openElements.stackTop;for(;n>=0;n--){const a=e.openElements.items[n];if(a===t.element)break;e._isSpecialElement(a,e.openElements.tagIDs[n])&&(r=a)}return r||(e.openElements.shortenToLength(Math.max(n,0)),e.activeFormattingElements.removeEntry(t)),r}function g0(e,t,r){let n=t,a=e.openElements.getCommonAncestor(t);for(let s=0,i=a;i!==r;s++,i=a){a=e.openElements.getCommonAncestor(i);const l=e.activeFormattingElements.getElementEntry(i),u=l&&s>=h0;!l||u?(u&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(i)):(i=E0(e,l),n===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(n),e.treeAdapter.appendChild(i,n),n=i)}return n}function E0(e,t){const r=e.treeAdapter.getNamespaceURI(t.element),n=e.treeAdapter.createElement(t.token.tagName,r,t.token.attrs);return e.openElements.replace(t.element,n),t.element=n,n}function T0(e,t,r){const n=e.treeAdapter.getTagName(t),a=Ht(n);if(e._isElementCausesFosterParenting(a))e._fosterParentElement(r);else{const s=e.treeAdapter.getNamespaceURI(t);a===o.TEMPLATE&&s===I.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,r)}}function k0(e,t,r){const n=e.treeAdapter.getNamespaceURI(r.element),{token:a}=r,s=e.treeAdapter.createElement(a.tagName,n,a.attrs);e._adoptNodes(t,s),e.treeAdapter.appendChild(t,s),e.activeFormattingElements.insertElementAfterBookmark(s,a),e.activeFormattingElements.removeEntry(r),e.openElements.remove(r.element),e.openElements.insertAfter(t,s,a.tagID)}function Oa(e,t){for(let r=0;r<f0;r++){const n=m0(e,t);if(!n)break;const a=b0(e,n);if(!a)break;e.activeFormattingElements.bookmark=n;const s=g0(e,a,n.element),i=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(s),i&&T0(e,i,s),k0(e,a,n)}}function Kn(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function x0(e,t){e._appendCommentNode(t,e.openElements.items[0])}function A0(e,t){e._appendCommentNode(t,e.document)}function Da(e,t){if(e.stopped=!0,t.location){const r=e.fragmentContext?0:2;for(let n=e.openElements.stackTop;n>=r;n--)e._setEndLocation(e.openElements.items[n],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const n=e.openElements.items[0],a=e.treeAdapter.getNodeSourceCodeLocation(n);if(a&&!a.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){const s=e.openElements.items[1],i=e.treeAdapter.getNodeSourceCodeLocation(s);i&&!i.endTag&&e._setEndLocation(s,t)}}}}function _0(e,t){e._setDocumentType(t);const r=t.forceQuirks?ye.QUIRKS:Jf(t);Zf(t)||e._err(t,C.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,r),e.insertionMode=E.BEFORE_HTML}function Vt(e,t){e._err(t,C.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,ye.QUIRKS),e.insertionMode=E.BEFORE_HTML,e._processToken(t)}function y0(e,t){t.tagID===o.HTML?(e._insertElement(t,I.HTML),e.insertionMode=E.BEFORE_HEAD):sr(e,t)}function C0(e,t){const r=t.tagID;(r===o.HTML||r===o.HEAD||r===o.BODY||r===o.BR)&&sr(e,t)}function sr(e,t){e._insertFakeRootElement(),e.insertionMode=E.BEFORE_HEAD,e._processToken(t)}function N0(e,t){switch(t.tagID){case o.HTML:{fe(e,t);break}case o.HEAD:{e._insertElement(t,I.HTML),e.headElement=e.openElements.current,e.insertionMode=E.IN_HEAD;break}default:ir(e,t)}}function I0(e,t){const r=t.tagID;r===o.HEAD||r===o.BODY||r===o.HTML||r===o.BR?ir(e,t):e._err(t,C.endTagWithoutMatchingOpenElement)}function ir(e,t){e._insertFakeElement(x.HEAD,o.HEAD),e.headElement=e.openElements.current,e.insertionMode=E.IN_HEAD,e._processToken(t)}function we(e,t){switch(t.tagID){case o.HTML:{fe(e,t);break}case o.BASE:case o.BASEFONT:case o.BGSOUND:case o.LINK:case o.META:{e._appendElement(t,I.HTML),t.ackSelfClosing=!0;break}case o.TITLE:{e._switchToTextParsing(t,ae.RCDATA);break}case o.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,ae.RAWTEXT):(e._insertElement(t,I.HTML),e.insertionMode=E.IN_HEAD_NO_SCRIPT);break}case o.NOFRAMES:case o.STYLE:{e._switchToTextParsing(t,ae.RAWTEXT);break}case o.SCRIPT:{e._switchToTextParsing(t,ae.SCRIPT_DATA);break}case o.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=E.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(E.IN_TEMPLATE);break}case o.HEAD:{e._err(t,C.misplacedStartTagForHeadElement);break}default:ur(e,t)}}function S0(e,t){switch(t.tagID){case o.HEAD:{e.openElements.pop(),e.insertionMode=E.AFTER_HEAD;break}case o.BODY:case o.BR:case o.HTML:{ur(e,t);break}case o.TEMPLATE:{xt(e,t);break}default:e._err(t,C.endTagWithoutMatchingOpenElement)}}function xt(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==o.TEMPLATE&&e._err(t,C.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(o.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,C.endTagWithoutMatchingOpenElement)}function ur(e,t){e.openElements.pop(),e.insertionMode=E.AFTER_HEAD,e._processToken(t)}function w0(e,t){switch(t.tagID){case o.HTML:{fe(e,t);break}case o.BASEFONT:case o.BGSOUND:case o.HEAD:case o.LINK:case o.META:case o.NOFRAMES:case o.STYLE:{we(e,t);break}case o.NOSCRIPT:{e._err(t,C.nestedNoscriptInHead);break}default:or(e,t)}}function L0(e,t){switch(t.tagID){case o.NOSCRIPT:{e.openElements.pop(),e.insertionMode=E.IN_HEAD;break}case o.BR:{or(e,t);break}default:e._err(t,C.endTagWithoutMatchingOpenElement)}}function or(e,t){const r=t.type===Y.EOF?C.openElementsLeftAfterEof:C.disallowedContentInNoscriptInHead;e._err(t,r),e.openElements.pop(),e.insertionMode=E.IN_HEAD,e._processToken(t)}function R0(e,t){switch(t.tagID){case o.HTML:{fe(e,t);break}case o.BODY:{e._insertElement(t,I.HTML),e.framesetOk=!1,e.insertionMode=E.IN_BODY;break}case o.FRAMESET:{e._insertElement(t,I.HTML),e.insertionMode=E.IN_FRAMESET;break}case o.BASE:case o.BASEFONT:case o.BGSOUND:case o.LINK:case o.META:case o.NOFRAMES:case o.SCRIPT:case o.STYLE:case o.TEMPLATE:case o.TITLE:{e._err(t,C.abandonedHeadElementChild),e.openElements.push(e.headElement,o.HEAD),we(e,t),e.openElements.remove(e.headElement);break}case o.HEAD:{e._err(t,C.misplacedStartTagForHeadElement);break}default:lr(e,t)}}function O0(e,t){switch(t.tagID){case o.BODY:case o.HTML:case o.BR:{lr(e,t);break}case o.TEMPLATE:{xt(e,t);break}default:e._err(t,C.endTagWithoutMatchingOpenElement)}}function lr(e,t){e._insertFakeElement(x.BODY,o.BODY),e.insertionMode=E.IN_BODY,ln(e,t)}function ln(e,t){switch(t.type){case Y.CHARACTER:{$u(e,t);break}case Y.WHITESPACE_CHARACTER:{zu(e,t);break}case Y.COMMENT:{Kn(e,t);break}case Y.START_TAG:{fe(e,t);break}case Y.END_TAG:{cn(e,t);break}case Y.EOF:{Wu(e,t);break}}}function zu(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function $u(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function D0(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function P0(e,t){const r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(r,t.attrs))}function v0(e,t){const r=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&r&&(e.treeAdapter.detachNode(r),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,I.HTML),e.insertionMode=E.IN_FRAMESET)}function M0(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,I.HTML)}function B0(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Xn.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,I.HTML)}function F0(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,I.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function H0(e,t){const r=e.openElements.tmplCount>0;(!e.formElement||r)&&(e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,I.HTML),r||(e.formElement=e.openElements.current))}function U0(e,t){e.framesetOk=!1;const r=t.tagID;for(let n=e.openElements.stackTop;n>=0;n--){const a=e.openElements.tagIDs[n];if(r===o.LI&&a===o.LI||(r===o.DD||r===o.DT)&&(a===o.DD||a===o.DT)){e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a);break}if(a!==o.ADDRESS&&a!==o.DIV&&a!==o.P&&e._isSpecialElement(e.openElements.items[n],a))break}e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,I.HTML)}function j0(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,I.HTML),e.tokenizer.state=ae.PLAINTEXT}function z0(e,t){e.openElements.hasInScope(o.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(o.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,I.HTML),e.framesetOk=!1}function $0(e,t){const r=e.activeFormattingElements.getElementEntryInScopeWithTagName(x.A);r&&(Oa(e,t),e.openElements.remove(r.element),e.activeFormattingElements.removeEntry(r)),e._reconstructActiveFormattingElements(),e._insertElement(t,I.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Y0(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,I.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function q0(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(o.NOBR)&&(Oa(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,I.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function V0(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,I.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function W0(e,t){e.treeAdapter.getDocumentMode(e.document)!==ye.QUIRKS&&e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,I.HTML),e.framesetOk=!1,e.insertionMode=E.IN_TABLE}function Yu(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,I.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function qu(e){const t=Du(e,gt.TYPE);return t!=null&&t.toLowerCase()===d0}function G0(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,I.HTML),qu(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Q0(e,t){e._appendElement(t,I.HTML),t.ackSelfClosing=!0}function X0(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._appendElement(t,I.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function K0(e,t){t.tagName=x.IMG,t.tagID=o.IMG,Yu(e,t)}function Z0(e,t){e._insertElement(t,I.HTML),e.skipNextNewLine=!0,e.tokenizer.state=ae.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=E.TEXT}function J0(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,ae.RAWTEXT)}function eh(e,t){e.framesetOk=!1,e._switchToTextParsing(t,ae.RAWTEXT)}function Fs(e,t){e._switchToTextParsing(t,ae.RAWTEXT)}function th(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,I.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===E.IN_TABLE||e.insertionMode===E.IN_CAPTION||e.insertionMode===E.IN_TABLE_BODY||e.insertionMode===E.IN_ROW||e.insertionMode===E.IN_CELL?E.IN_SELECT_IN_TABLE:E.IN_SELECT}function rh(e,t){e.openElements.currentTagId===o.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,I.HTML)}function nh(e,t){e.openElements.hasInScope(o.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,I.HTML)}function ah(e,t){e.openElements.hasInScope(o.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(o.RTC),e._insertElement(t,I.HTML)}function sh(e,t){e._reconstructActiveFormattingElements(),Hu(t),Ra(t),t.selfClosing?e._appendElement(t,I.MATHML):e._insertElement(t,I.MATHML),t.ackSelfClosing=!0}function ih(e,t){e._reconstructActiveFormattingElements(),Uu(t),Ra(t),t.selfClosing?e._appendElement(t,I.SVG):e._insertElement(t,I.SVG),t.ackSelfClosing=!0}function Hs(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,I.HTML)}function fe(e,t){switch(t.tagID){case o.I:case o.S:case o.B:case o.U:case o.EM:case o.TT:case o.BIG:case o.CODE:case o.FONT:case o.SMALL:case o.STRIKE:case o.STRONG:{Y0(e,t);break}case o.A:{$0(e,t);break}case o.H1:case o.H2:case o.H3:case o.H4:case o.H5:case o.H6:{B0(e,t);break}case o.P:case o.DL:case o.OL:case o.UL:case o.DIV:case o.DIR:case o.NAV:case o.MAIN:case o.MENU:case o.ASIDE:case o.CENTER:case o.FIGURE:case o.FOOTER:case o.HEADER:case o.HGROUP:case o.DIALOG:case o.DETAILS:case o.ADDRESS:case o.ARTICLE:case o.SEARCH:case o.SECTION:case o.SUMMARY:case o.FIELDSET:case o.BLOCKQUOTE:case o.FIGCAPTION:{M0(e,t);break}case o.LI:case o.DD:case o.DT:{U0(e,t);break}case o.BR:case o.IMG:case o.WBR:case o.AREA:case o.EMBED:case o.KEYGEN:{Yu(e,t);break}case o.HR:{X0(e,t);break}case o.RB:case o.RTC:{nh(e,t);break}case o.RT:case o.RP:{ah(e,t);break}case o.PRE:case o.LISTING:{F0(e,t);break}case o.XMP:{J0(e,t);break}case o.SVG:{ih(e,t);break}case o.HTML:{D0(e,t);break}case o.BASE:case o.LINK:case o.META:case o.STYLE:case o.TITLE:case o.SCRIPT:case o.BGSOUND:case o.BASEFONT:case o.TEMPLATE:{we(e,t);break}case o.BODY:{P0(e,t);break}case o.FORM:{H0(e,t);break}case o.NOBR:{q0(e,t);break}case o.MATH:{sh(e,t);break}case o.TABLE:{W0(e,t);break}case o.INPUT:{G0(e,t);break}case o.PARAM:case o.TRACK:case o.SOURCE:{Q0(e,t);break}case o.IMAGE:{K0(e,t);break}case o.BUTTON:{z0(e,t);break}case o.APPLET:case o.OBJECT:case o.MARQUEE:{V0(e,t);break}case o.IFRAME:{eh(e,t);break}case o.SELECT:{th(e,t);break}case o.OPTION:case o.OPTGROUP:{rh(e,t);break}case o.NOEMBED:case o.NOFRAMES:{Fs(e,t);break}case o.FRAMESET:{v0(e,t);break}case o.TEXTAREA:{Z0(e,t);break}case o.NOSCRIPT:{e.options.scriptingEnabled?Fs(e,t):Hs(e,t);break}case o.PLAINTEXT:{j0(e,t);break}case o.COL:case o.TH:case o.TD:case o.TR:case o.HEAD:case o.FRAME:case o.TBODY:case o.TFOOT:case o.THEAD:case o.CAPTION:case o.COLGROUP:break;default:Hs(e,t)}}function uh(e,t){if(e.openElements.hasInScope(o.BODY)&&(e.insertionMode=E.AFTER_BODY,e.options.sourceCodeLocationInfo)){const r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e._setEndLocation(r,t)}}function oh(e,t){e.openElements.hasInScope(o.BODY)&&(e.insertionMode=E.AFTER_BODY,to(e,t))}function lh(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r))}function ch(e){const t=e.openElements.tmplCount>0,{formElement:r}=e;t||(e.formElement=null),(r||t)&&e.openElements.hasInScope(o.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(o.FORM):r&&e.openElements.remove(r))}function dh(e){e.openElements.hasInButtonScope(o.P)||e._insertFakeElement(x.P,o.P),e._closePElement()}function fh(e){e.openElements.hasInListItemScope(o.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(o.LI),e.openElements.popUntilTagNamePopped(o.LI))}function hh(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r))}function ph(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function mh(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r),e.activeFormattingElements.clearToLastMarker())}function bh(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(x.BR,o.BR),e.openElements.pop(),e.framesetOk=!1}function Vu(e,t){const r=t.tagName,n=t.tagID;for(let a=e.openElements.stackTop;a>0;a--){const s=e.openElements.items[a],i=e.openElements.tagIDs[a];if(n===i&&(n!==o.UNKNOWN||e.treeAdapter.getTagName(s)===r)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.stackTop>=a&&e.openElements.shortenToLength(a);break}if(e._isSpecialElement(s,i))break}}function cn(e,t){switch(t.tagID){case o.A:case o.B:case o.I:case o.S:case o.U:case o.EM:case o.TT:case o.BIG:case o.CODE:case o.FONT:case o.NOBR:case o.SMALL:case o.STRIKE:case o.STRONG:{Oa(e,t);break}case o.P:{dh(e);break}case o.DL:case o.UL:case o.OL:case o.DIR:case o.DIV:case o.NAV:case o.PRE:case o.MAIN:case o.MENU:case o.ASIDE:case o.BUTTON:case o.CENTER:case o.FIGURE:case o.FOOTER:case o.HEADER:case o.HGROUP:case o.DIALOG:case o.ADDRESS:case o.ARTICLE:case o.DETAILS:case o.SEARCH:case o.SECTION:case o.SUMMARY:case o.LISTING:case o.FIELDSET:case o.BLOCKQUOTE:case o.FIGCAPTION:{lh(e,t);break}case o.LI:{fh(e);break}case o.DD:case o.DT:{hh(e,t);break}case o.H1:case o.H2:case o.H3:case o.H4:case o.H5:case o.H6:{ph(e);break}case o.BR:{bh(e);break}case o.BODY:{uh(e,t);break}case o.HTML:{oh(e,t);break}case o.FORM:{ch(e);break}case o.APPLET:case o.OBJECT:case o.MARQUEE:{mh(e,t);break}case o.TEMPLATE:{xt(e,t);break}default:Vu(e,t)}}function Wu(e,t){e.tmplInsertionModeStack.length>0?eo(e,t):Da(e,t)}function gh(e,t){var r;t.tagID===o.SCRIPT&&((r=e.scriptHandler)===null||r===void 0||r.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Eh(e,t){e._err(t,C.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function yn(e,t){if(e.openElements.currentTagId!==void 0&&ju.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=E.IN_TABLE_TEXT,t.type){case Y.CHARACTER:{Qu(e,t);break}case Y.WHITESPACE_CHARACTER:{Gu(e,t);break}}else Ar(e,t)}function Th(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,I.HTML),e.insertionMode=E.IN_CAPTION}function kh(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,I.HTML),e.insertionMode=E.IN_COLUMN_GROUP}function xh(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(x.COLGROUP,o.COLGROUP),e.insertionMode=E.IN_COLUMN_GROUP,Pa(e,t)}function Ah(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,I.HTML),e.insertionMode=E.IN_TABLE_BODY}function _h(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(x.TBODY,o.TBODY),e.insertionMode=E.IN_TABLE_BODY,dn(e,t)}function yh(e,t){e.openElements.hasInTableScope(o.TABLE)&&(e.openElements.popUntilTagNamePopped(o.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Ch(e,t){qu(t)?e._appendElement(t,I.HTML):Ar(e,t),t.ackSelfClosing=!0}function Nh(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,I.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Mt(e,t){switch(t.tagID){case o.TD:case o.TH:case o.TR:{_h(e,t);break}case o.STYLE:case o.SCRIPT:case o.TEMPLATE:{we(e,t);break}case o.COL:{xh(e,t);break}case o.FORM:{Nh(e,t);break}case o.TABLE:{yh(e,t);break}case o.TBODY:case o.TFOOT:case o.THEAD:{Ah(e,t);break}case o.INPUT:{Ch(e,t);break}case o.CAPTION:{Th(e,t);break}case o.COLGROUP:{kh(e,t);break}default:Ar(e,t)}}function mr(e,t){switch(t.tagID){case o.TABLE:{e.openElements.hasInTableScope(o.TABLE)&&(e.openElements.popUntilTagNamePopped(o.TABLE),e._resetInsertionMode());break}case o.TEMPLATE:{xt(e,t);break}case o.BODY:case o.CAPTION:case o.COL:case o.COLGROUP:case o.HTML:case o.TBODY:case o.TD:case o.TFOOT:case o.TH:case o.THEAD:case o.TR:break;default:Ar(e,t)}}function Ar(e,t){const r=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,ln(e,t),e.fosterParentingEnabled=r}function Gu(e,t){e.pendingCharacterTokens.push(t)}function Qu(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Wt(e,t){let r=0;if(e.hasNonWhitespacePendingCharacterToken)for(;r<e.pendingCharacterTokens.length;r++)Ar(e,e.pendingCharacterTokens[r]);else for(;r<e.pendingCharacterTokens.length;r++)e._insertCharacters(e.pendingCharacterTokens[r]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Xu=new Set([o.CAPTION,o.COL,o.COLGROUP,o.TBODY,o.TD,o.TFOOT,o.TH,o.THEAD,o.TR]);function Ih(e,t){const r=t.tagID;Xu.has(r)?e.openElements.hasInTableScope(o.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(o.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=E.IN_TABLE,Mt(e,t)):fe(e,t)}function Sh(e,t){const r=t.tagID;switch(r){case o.CAPTION:case o.TABLE:{e.openElements.hasInTableScope(o.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(o.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=E.IN_TABLE,r===o.TABLE&&mr(e,t));break}case o.BODY:case o.COL:case o.COLGROUP:case o.HTML:case o.TBODY:case o.TD:case o.TFOOT:case o.TH:case o.THEAD:case o.TR:break;default:cn(e,t)}}function Pa(e,t){switch(t.tagID){case o.HTML:{fe(e,t);break}case o.COL:{e._appendElement(t,I.HTML),t.ackSelfClosing=!0;break}case o.TEMPLATE:{we(e,t);break}default:Xr(e,t)}}function wh(e,t){switch(t.tagID){case o.COLGROUP:{e.openElements.currentTagId===o.COLGROUP&&(e.openElements.pop(),e.insertionMode=E.IN_TABLE);break}case o.TEMPLATE:{xt(e,t);break}case o.COL:break;default:Xr(e,t)}}function Xr(e,t){e.openElements.currentTagId===o.COLGROUP&&(e.openElements.pop(),e.insertionMode=E.IN_TABLE,e._processToken(t))}function dn(e,t){switch(t.tagID){case o.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,I.HTML),e.insertionMode=E.IN_ROW;break}case o.TH:case o.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(x.TR,o.TR),e.insertionMode=E.IN_ROW,fn(e,t);break}case o.CAPTION:case o.COL:case o.COLGROUP:case o.TBODY:case o.TFOOT:case o.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE,Mt(e,t));break}default:Mt(e,t)}}function Zn(e,t){const r=t.tagID;switch(t.tagID){case o.TBODY:case o.TFOOT:case o.THEAD:{e.openElements.hasInTableScope(r)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE);break}case o.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE,mr(e,t));break}case o.BODY:case o.CAPTION:case o.COL:case o.COLGROUP:case o.HTML:case o.TD:case o.TH:case o.TR:break;default:mr(e,t)}}function fn(e,t){switch(t.tagID){case o.TH:case o.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,I.HTML),e.insertionMode=E.IN_CELL,e.activeFormattingElements.insertMarker();break}case o.CAPTION:case o.COL:case o.COLGROUP:case o.TBODY:case o.TFOOT:case o.THEAD:case o.TR:{e.openElements.hasInTableScope(o.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE_BODY,dn(e,t));break}default:Mt(e,t)}}function Ku(e,t){switch(t.tagID){case o.TR:{e.openElements.hasInTableScope(o.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE_BODY);break}case o.TABLE:{e.openElements.hasInTableScope(o.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE_BODY,Zn(e,t));break}case o.TBODY:case o.TFOOT:case o.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(o.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE_BODY,Zn(e,t));break}case o.BODY:case o.CAPTION:case o.COL:case o.COLGROUP:case o.HTML:case o.TD:case o.TH:break;default:mr(e,t)}}function Lh(e,t){const r=t.tagID;Xu.has(r)?(e.openElements.hasInTableScope(o.TD)||e.openElements.hasInTableScope(o.TH))&&(e._closeTableCell(),fn(e,t)):fe(e,t)}function Rh(e,t){const r=t.tagID;switch(r){case o.TD:case o.TH:{e.openElements.hasInTableScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=E.IN_ROW);break}case o.TABLE:case o.TBODY:case o.TFOOT:case o.THEAD:case o.TR:{e.openElements.hasInTableScope(r)&&(e._closeTableCell(),Ku(e,t));break}case o.BODY:case o.CAPTION:case o.COL:case o.COLGROUP:case o.HTML:break;default:cn(e,t)}}function Zu(e,t){switch(t.tagID){case o.HTML:{fe(e,t);break}case o.OPTION:{e.openElements.currentTagId===o.OPTION&&e.openElements.pop(),e._insertElement(t,I.HTML);break}case o.OPTGROUP:{e.openElements.currentTagId===o.OPTION&&e.openElements.pop(),e.openElements.currentTagId===o.OPTGROUP&&e.openElements.pop(),e._insertElement(t,I.HTML);break}case o.HR:{e.openElements.currentTagId===o.OPTION&&e.openElements.pop(),e.openElements.currentTagId===o.OPTGROUP&&e.openElements.pop(),e._appendElement(t,I.HTML),t.ackSelfClosing=!0;break}case o.INPUT:case o.KEYGEN:case o.TEXTAREA:case o.SELECT:{e.openElements.hasInSelectScope(o.SELECT)&&(e.openElements.popUntilTagNamePopped(o.SELECT),e._resetInsertionMode(),t.tagID!==o.SELECT&&e._processStartTag(t));break}case o.SCRIPT:case o.TEMPLATE:{we(e,t);break}}}function Ju(e,t){switch(t.tagID){case o.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===o.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===o.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===o.OPTGROUP&&e.openElements.pop();break}case o.OPTION:{e.openElements.currentTagId===o.OPTION&&e.openElements.pop();break}case o.SELECT:{e.openElements.hasInSelectScope(o.SELECT)&&(e.openElements.popUntilTagNamePopped(o.SELECT),e._resetInsertionMode());break}case o.TEMPLATE:{xt(e,t);break}}}function Oh(e,t){const r=t.tagID;r===o.CAPTION||r===o.TABLE||r===o.TBODY||r===o.TFOOT||r===o.THEAD||r===o.TR||r===o.TD||r===o.TH?(e.openElements.popUntilTagNamePopped(o.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Zu(e,t)}function Dh(e,t){const r=t.tagID;r===o.CAPTION||r===o.TABLE||r===o.TBODY||r===o.TFOOT||r===o.THEAD||r===o.TR||r===o.TD||r===o.TH?e.openElements.hasInTableScope(r)&&(e.openElements.popUntilTagNamePopped(o.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Ju(e,t)}function Ph(e,t){switch(t.tagID){case o.BASE:case o.BASEFONT:case o.BGSOUND:case o.LINK:case o.META:case o.NOFRAMES:case o.SCRIPT:case o.STYLE:case o.TEMPLATE:case o.TITLE:{we(e,t);break}case o.CAPTION:case o.COLGROUP:case o.TBODY:case o.TFOOT:case o.THEAD:{e.tmplInsertionModeStack[0]=E.IN_TABLE,e.insertionMode=E.IN_TABLE,Mt(e,t);break}case o.COL:{e.tmplInsertionModeStack[0]=E.IN_COLUMN_GROUP,e.insertionMode=E.IN_COLUMN_GROUP,Pa(e,t);break}case o.TR:{e.tmplInsertionModeStack[0]=E.IN_TABLE_BODY,e.insertionMode=E.IN_TABLE_BODY,dn(e,t);break}case o.TD:case o.TH:{e.tmplInsertionModeStack[0]=E.IN_ROW,e.insertionMode=E.IN_ROW,fn(e,t);break}default:e.tmplInsertionModeStack[0]=E.IN_BODY,e.insertionMode=E.IN_BODY,fe(e,t)}}function vh(e,t){t.tagID===o.TEMPLATE&&xt(e,t)}function eo(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(o.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Da(e,t)}function Mh(e,t){t.tagID===o.HTML?fe(e,t):Kr(e,t)}function to(e,t){var r;if(t.tagID===o.HTML){if(e.fragmentContext||(e.insertionMode=E.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===o.HTML){e._setEndLocation(e.openElements.items[0],t);const n=e.openElements.items[1];n&&!(!((r=e.treeAdapter.getNodeSourceCodeLocation(n))===null||r===void 0)&&r.endTag)&&e._setEndLocation(n,t)}}else Kr(e,t)}function Kr(e,t){e.insertionMode=E.IN_BODY,ln(e,t)}function Bh(e,t){switch(t.tagID){case o.HTML:{fe(e,t);break}case o.FRAMESET:{e._insertElement(t,I.HTML);break}case o.FRAME:{e._appendElement(t,I.HTML),t.ackSelfClosing=!0;break}case o.NOFRAMES:{we(e,t);break}}}function Fh(e,t){t.tagID===o.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==o.FRAMESET&&(e.insertionMode=E.AFTER_FRAMESET))}function Hh(e,t){switch(t.tagID){case o.HTML:{fe(e,t);break}case o.NOFRAMES:{we(e,t);break}}}function Uh(e,t){t.tagID===o.HTML&&(e.insertionMode=E.AFTER_AFTER_FRAMESET)}function jh(e,t){t.tagID===o.HTML?fe(e,t):jr(e,t)}function jr(e,t){e.insertionMode=E.IN_BODY,ln(e,t)}function zh(e,t){switch(t.tagID){case o.HTML:{fe(e,t);break}case o.NOFRAMES:{we(e,t);break}}}function $h(e,t){t.chars=ee,e._insertCharacters(t)}function Yh(e,t){e._insertCharacters(t),e.framesetOk=!1}function ro(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==I.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function qh(e,t){if(i0(t))ro(e),e._startTagOutsideForeignContent(t);else{const r=e._getAdjustedCurrentElement(),n=e.treeAdapter.getNamespaceURI(r);n===I.MATHML?Hu(t):n===I.SVG&&(u0(t),Uu(t)),Ra(t),t.selfClosing?e._appendElement(t,n):e._insertElement(t,n),t.ackSelfClosing=!0}}function Vh(e,t){if(t.tagID===o.P||t.tagID===o.BR){ro(e),e._endTagOutsideForeignContent(t);return}for(let r=e.openElements.stackTop;r>0;r--){const n=e.openElements.items[r];if(e.treeAdapter.getNamespaceURI(n)===I.HTML){e._endTagOutsideForeignContent(t);break}const a=e.treeAdapter.getTagName(n);if(a.toLowerCase()===t.tagName){t.tagName=a,e.openElements.shortenToLength(r);break}}}x.AREA,x.BASE,x.BASEFONT,x.BGSOUND,x.BR,x.COL,x.EMBED,x.FRAME,x.HR,x.IMG,x.INPUT,x.KEYGEN,x.LINK,x.META,x.PARAM,x.SOURCE,x.TRACK,x.WBR;const hn=no("end"),Be=no("start");function no(e){return t;function t(r){const n=r&&r.position&&r.position[e]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function ao(e){const t=Be(e),r=hn(e);if(t&&r)return{start:t,end:r}}const Wh=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,Gh=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Us={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function so(e,t){const r=ap(e),n=Su("type",{handlers:{root:Qh,element:Xh,text:Kh,comment:uo,doctype:Zh,raw:ep},unknown:tp}),a={parser:r?new Bs(Us):Bs.getFragmentParser(void 0,Us),handle(l){n(l,a)},stitches:!1,options:t||{}};n(e,a),Ut(a,Be());const s=r?a.parser.document:a.parser.getFragment(),i=af(s,{file:a.options.file});return a.stitches&&Me(i,"comment",function(l,u,c){const d=l;if(d.value.stitch&&c&&u!==void 0){const f=c.children;return f[u]=d.value.stitch,u}}),i.type==="root"&&i.children.length===1&&i.children[0].type===e.type?i.children[0]:i}function io(e,t){let r=-1;if(e)for(;++r<e.length;)t.handle(e[r])}function Qh(e,t){io(e.children,t)}function Xh(e,t){rp(e,t),io(e.children,t),np(e,t)}function Kh(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const r={type:Y.CHARACTER,chars:e.value,location:_r(e)};Ut(t,Be(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Zh(e,t){const r={type:Y.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:_r(e)};Ut(t,Be(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Jh(e,t){t.stitches=!0;const r=sp(e);if("children"in e&&"children"in r){const n=so({type:"root",children:e.children},t.options);r.children=n.children}uo({type:"comment",value:{stitch:r}},t)}function uo(e,t){const r=e.value,n={type:Y.COMMENT,data:r,location:_r(e)};Ut(t,Be(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function ep(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,oo(t,Be(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(Wh,"<$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const r=t.parser.tokenizer._consume();t.parser.tokenizer._callState(r)}}function tp(e,t){const r=e;if(t.options.passThrough&&t.options.passThrough.includes(r.type))Jh(r,t);else{let n="";throw Gh.has(r.type)&&(n=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+r.type+"` node"+n)}}function Ut(e,t){oo(e,t);const r=e.parser.tokenizer.currentCharacterToken;r&&r.location&&(r.location.endLine=e.parser.tokenizer.preprocessor.line,r.location.endCol=e.parser.tokenizer.preprocessor.col+1,r.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=r,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=ae.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function oo(e,t){if(t&&t.offset!==void 0){const r={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=r}}function rp(e,t){const r=e.tagName.toLowerCase();if(t.parser.tokenizer.state===ae.PLAINTEXT)return;Ut(t,Be(e));const n=t.parser.openElements.current;let a="namespaceURI"in n?n.namespaceURI:bt.html;a===bt.html&&r==="svg"&&(a=bt.svg);const s=cf({...e,children:[]},{space:a===bt.svg?"svg":"html"}),i={type:Y.START_TAG,tagName:r,tagID:Ht(r),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in s?s.attrs:[],location:_r(e)};t.parser.currentToken=i,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=r}function np(e,t){const r=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Ef.includes(r)||t.parser.tokenizer.state===ae.PLAINTEXT)return;Ut(t,hn(e));const n={type:Y.END_TAG,tagName:r,tagID:Ht(r),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:_r(e)};t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken),r===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===ae.RCDATA||t.parser.tokenizer.state===ae.RAWTEXT||t.parser.tokenizer.state===ae.SCRIPT_DATA)&&(t.parser.tokenizer.state=ae.DATA)}function ap(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function _r(e){const t=Be(e)||{line:void 0,column:void 0,offset:void 0},r=hn(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:r.line,endCol:r.column,endOffset:r.offset}}function sp(e){return"children"in e?Et({...e,children:[]}):Et(e)}function Jn(e){return function(t,r){return so(t,{...e,file:r})}}const dt=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],pt={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...dt,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...dt],h2:[["className","sr-only"]],img:[...dt,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...dt,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...dt],table:[...dt],ul:[...dt,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},Je={}.hasOwnProperty;function ip(e,t){let r={type:"root",children:[]};const n={schema:t?{...pt,...t}:pt,stack:[]},a=lo(n,e);return a&&(Array.isArray(a)?a.length===1?r=a[0]:r.children=a:r=a),r}function lo(e,t){if(t&&typeof t=="object"){const r=t;switch(typeof r.type=="string"?r.type:""){case"comment":return up(e,r);case"doctype":return op(e,r);case"element":return lp(e,r);case"root":return cp(e,r);case"text":return dp(e,r)}}}function up(e,t){if(e.schema.allowComments){const r=typeof t.value=="string"?t.value:"",n=r.indexOf("-->"),s={type:"comment",value:n<0?r:r.slice(0,n)};return yr(s,t),s}}function op(e,t){if(e.schema.allowDoctypes){const r={type:"doctype"};return yr(r,t),r}}function lp(e,t){const r=typeof t.tagName=="string"?t.tagName:"";e.stack.push(r);const n=co(e,t.children),a=fp(e,t.properties);e.stack.pop();let s=!1;if(r&&r!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(r))&&(s=!0,e.schema.ancestors&&Je.call(e.schema.ancestors,r))){const l=e.schema.ancestors[r];let u=-1;for(s=!1;++u<l.length;)e.stack.includes(l[u])&&(s=!0)}if(!s)return e.schema.strip&&!e.schema.strip.includes(r)?n:void 0;const i={type:"element",tagName:r,properties:a,children:n};return yr(i,t),i}function cp(e,t){const n={type:"root",children:co(e,t.children)};return yr(n,t),n}function dp(e,t){const n={type:"text",value:typeof t.value=="string"?t.value:""};return yr(n,t),n}function co(e,t){const r=[];if(Array.isArray(t)){const n=t;let a=-1;for(;++a<n.length;){const s=lo(e,n[a]);s&&(Array.isArray(s)?r.push(...s):r.push(s))}}return r}function fp(e,t){const r=e.stack[e.stack.length-1],n=e.schema.attributes,a=e.schema.required,s=n&&Je.call(n,r)?n[r]:void 0,i=n&&Je.call(n,"*")?n["*"]:void 0,l=t&&typeof t=="object"?t:{},u={};let c;for(c in l)if(Je.call(l,c)){const d=l[c];let f=js(e,zs(s,c),c,d);f==null&&(f=js(e,zs(i,c),c,d)),f!=null&&(u[c]=f)}if(a&&Je.call(a,r)){const d=a[r];for(c in d)Je.call(d,c)&&!Je.call(u,c)&&(u[c]=d[c])}return u}function js(e,t,r,n){return t?Array.isArray(n)?hp(e,t,r,n):fo(e,t,r,n):void 0}function hp(e,t,r,n){let a=-1;const s=[];for(;++a<n.length;){const i=fo(e,t,r,n[a]);(typeof i=="number"||typeof i=="string")&&s.push(i)}return s}function fo(e,t,r,n){if(!(typeof n!="boolean"&&typeof n!="number"&&typeof n!="string")&&pp(e,r,n)){if(typeof t=="object"&&t.length>1){let a=!1,s=0;for(;++s<t.length;){const i=t[s];if(i&&typeof i=="object"&&"flags"in i){if(i.test(String(n))){a=!0;break}}else if(i===n){a=!0;break}}if(!a)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(r)?e.schema.clobberPrefix+n:n}}function pp(e,t,r){const n=e.schema.protocols&&Je.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!n||n.length===0)return!0;const a=String(r),s=a.indexOf(":"),i=a.indexOf("?"),l=a.indexOf("#"),u=a.indexOf("/");if(s<0||u>-1&&s>u||i>-1&&s>i||l>-1&&s>l)return!0;let c=-1;for(;++c<n.length;){const d=n[c];if(s===d.length&&a.slice(0,d.length)===d)return!0}return!1}function yr(e,t){const r=ao(t);t.data&&(e.data=Et(t.data)),r&&(e.position=r)}function zs(e,t){let r,n=-1;if(e)for(;++n<e.length;){const a=e[n],s=typeof a=="string"?a:a[0];if(s===t)return a;s==="data*"&&(r=a)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return r}function ho(e){return function(t){return ip(t,e)}}function $s(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let n=0,a=r.indexOf(t);for(;a!==-1;)n++,a=r.indexOf(t,a+t.length);return n}function mp(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function bp(e,t,r){const a=an((r||{}).ignore||[]),s=gp(t);let i=-1;for(;++i<s.length;)_a(e,"text",l);function l(c,d){let f=-1,h;for(;++f<d.length;){const g=d[f],b=h?h.children:void 0;if(a(g,b?b.indexOf(g):void 0,h))return;h=g}if(h)return u(c,d)}function u(c,d){const f=d[d.length-1],h=s[i][0],g=s[i][1];let b=0;const A=f.children.indexOf(c);let y=!1,S=[];h.lastIndex=0;let L=h.exec(c.value);for(;L;){const D=L.index,P={index:L.index,input:L.input,stack:[...d,c]};let v=g(...L,P);if(typeof v=="string"&&(v=v.length>0?{type:"text",value:v}:void 0),v===!1?h.lastIndex=D+1:(b!==D&&S.push({type:"text",value:c.value.slice(b,D)}),Array.isArray(v)?S.push(...v):v&&S.push(v),b=D+L[0].length,y=!0),!h.global)break;L=h.exec(c.value)}return y?(b<c.value.length&&S.push({type:"text",value:c.value.slice(b)}),f.children.splice(A,1,...S)):S=[c],A+S.length}}function gp(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let n=-1;for(;++n<r.length;){const a=r[n];t.push([Ep(a[0]),Tp(a[1])])}return t}function Ep(e){return typeof e=="string"?new RegExp(mp(e),"g"):e}function Tp(e){return typeof e=="function"?e:function(){return e}}const Cn="phrasing",Nn=["autolink","link","image","label"];function kp(){return{transforms:[Ip],enter:{literalAutolink:Ap,literalAutolinkEmail:In,literalAutolinkHttp:In,literalAutolinkWww:In},exit:{literalAutolink:Np,literalAutolinkEmail:Cp,literalAutolinkHttp:_p,literalAutolinkWww:yp}}}function xp(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Cn,notInConstruct:Nn},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Cn,notInConstruct:Nn},{character:":",before:"[ps]",after:"\\/",inConstruct:Cn,notInConstruct:Nn}]}}function Ap(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function In(e){this.config.enter.autolinkProtocol.call(this,e)}function _p(e){this.config.exit.autolinkProtocol.call(this,e)}function yp(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 Cp(e){this.config.exit.autolinkEmail.call(this,e)}function Np(e){this.exit(e)}function Ip(e){bp(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Sp],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),wp]],{ignore:["link","linkReference"]})}function Sp(e,t,r,n,a){let s="";if(!po(a)||(/^w/i.test(t)&&(r=t+r,t="",s="http://"),!Lp(r)))return!1;const i=Rp(r+n);if(!i[0])return!1;const l={type:"link",title:null,url:s+t+i[0],children:[{type:"text",value:t+i[0]}]};return i[1]?[l,{type:"text",value:i[1]}]:l}function wp(e,t,r,n){return!po(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function Lp(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 Rp(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],n=r.indexOf(")");const a=$s(e,"(");let s=$s(e,")");for(;n!==-1&&a>s;)e+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),s++;return[e,r]}function po(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||Pt(r)||ma(r))&&(!t||r!==47)}mo.peek=Up;function Op(){this.buffer()}function Dp(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Pp(){this.buffer()}function vp(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Mp(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Er(this.sliceSerialize(e)).toLowerCase(),r.label=t}function Bp(e){this.exit(e)}function Fp(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Er(this.sliceSerialize(e)).toLowerCase(),r.label=t}function Hp(e){this.exit(e)}function Up(){return"["}function mo(e,t,r,n){const a=r.createTracker(n);let s=a.move("[^");const i=r.enter("footnoteReference"),l=r.enter("reference");return s+=a.move(r.safe(r.associationId(e),{after:"]",before:s})),l(),i(),s+=a.move("]"),s}function jp(){return{enter:{gfmFootnoteCallString:Op,gfmFootnoteCall:Dp,gfmFootnoteDefinitionLabelString:Pp,gfmFootnoteDefinition:vp},exit:{gfmFootnoteCallString:Mp,gfmFootnoteCall:Bp,gfmFootnoteDefinitionLabelString:Fp,gfmFootnoteDefinition:Hp}}}function zp(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:mo},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(n,a,s,i){const l=s.createTracker(i);let u=l.move("[^");const c=s.enter("footnoteDefinition"),d=s.enter("label");return u+=l.move(s.safe(s.associationId(n),{before:u,after:"]"})),d(),u+=l.move("]:"),n.children&&n.children.length>0&&(l.shift(4),u+=l.move((t?`
|
|
4
|
+
`:" ")+s.indentLines(s.containerFlow(n,l.current()),t?bo:$p))),c(),u}}function $p(e,t,r){return t===0?e:bo(e,t,r)}function bo(e,t,r){return(r?"":" ")+e}const Yp=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];go.peek=Qp;function qp(){return{canContainEols:["delete"],enter:{strikethrough:Wp},exit:{strikethrough:Gp}}}function Vp(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Yp}],handlers:{delete:go}}}function Wp(e){this.enter({type:"delete",children:[]},e)}function Gp(e){this.exit(e)}function go(e,t,r,n){const a=r.createTracker(n),s=r.enter("strikethrough");let i=a.move("~~");return i+=r.containerPhrasing(e,{...a.current(),before:i,after:"~"}),i+=a.move("~~"),s(),i}function Qp(){return"~"}function Xp(e){return e.length}function Kp(e,t){const r=t||{},n=(r.align||[]).concat(),a=r.stringLength||Xp,s=[],i=[],l=[],u=[];let c=0,d=-1;for(;++d<e.length;){const _=[],A=[];let y=-1;for(e[d].length>c&&(c=e[d].length);++y<e[d].length;){const S=Zp(e[d][y]);if(r.alignDelimiters!==!1){const L=a(S);A[y]=L,(u[y]===void 0||L>u[y])&&(u[y]=L)}_.push(S)}i[d]=_,l[d]=A}let f=-1;if(typeof n=="object"&&"length"in n)for(;++f<c;)s[f]=Ys(n[f]);else{const _=Ys(n);for(;++f<c;)s[f]=_}f=-1;const h=[],g=[];for(;++f<c;){const _=s[f];let A="",y="";_===99?(A=":",y=":"):_===108?A=":":_===114&&(y=":");let S=r.alignDelimiters===!1?1:Math.max(1,u[f]-A.length-y.length);const L=A+"-".repeat(S)+y;r.alignDelimiters!==!1&&(S=A.length+S+y.length,S>u[f]&&(u[f]=S),g[f]=S),h[f]=L}i.splice(1,0,h),l.splice(1,0,g),d=-1;const b=[];for(;++d<i.length;){const _=i[d],A=l[d];f=-1;const y=[];for(;++f<c;){const S=_[f]||"";let L="",D="";if(r.alignDelimiters!==!1){const P=u[f]-(A[f]||0),v=s[f];v===114?L=" ".repeat(P):v===99?P%2?(L=" ".repeat(P/2+.5),D=" ".repeat(P/2-.5)):(L=" ".repeat(P/2),D=L):D=" ".repeat(P)}r.delimiterStart!==!1&&!f&&y.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&S==="")&&(r.delimiterStart!==!1||f)&&y.push(" "),r.alignDelimiters!==!1&&y.push(L),y.push(S),r.alignDelimiters!==!1&&y.push(D),r.padding!==!1&&y.push(" "),(r.delimiterEnd!==!1||f!==c-1)&&y.push("|")}b.push(r.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return b.join(`
|
|
5
|
+
`)}function Zp(e){return e==null?"":String(e)}function Ys(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 Jp(e,t,r,n){const a=r.enter("blockquote"),s=r.createTracker(n);s.move("> "),s.shift(2);const i=r.indentLines(r.containerFlow(e,s.current()),em);return a(),i}function em(e,t,r){return">"+(r?"":" ")+e}function tm(e,t){return qs(e,t.inConstruct,!0)&&!qs(e,t.notInConstruct,!1)}function qs(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let n=-1;for(;++n<t.length;)if(e.includes(t[n]))return!0;return!1}function Vs(e,t,r,n){let a=-1;for(;++a<r.unsafe.length;)if(r.unsafe[a].character===`
|
|
6
|
+
`&&tm(r.stack,r.unsafe[a]))return/[ \t]/.test(n.before)?"":" ";return`\\
|
|
7
|
+
`}function rm(e,t){const r=String(e);let n=r.indexOf(t),a=n,s=0,i=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;n!==-1;)n===a?++s>i&&(i=s):s=1,a=n+t.length,n=r.indexOf(t,a);return i}function nm(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 am(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 sm(e,t,r,n){const a=am(r),s=e.value||"",i=a==="`"?"GraveAccent":"Tilde";if(nm(e,r)){const f=r.enter("codeIndented"),h=r.indentLines(s,im);return f(),h}const l=r.createTracker(n),u=a.repeat(Math.max(rm(s,a)+1,3)),c=r.enter("codeFenced");let d=l.move(u);if(e.lang){const f=r.enter(`codeFencedLang${i}`);d+=l.move(r.safe(e.lang,{before:d,after:" ",encode:["`"],...l.current()})),f()}if(e.lang&&e.meta){const f=r.enter(`codeFencedMeta${i}`);d+=l.move(" "),d+=l.move(r.safe(e.meta,{before:d,after:`
|
|
8
|
+
`,encode:["`"],...l.current()})),f()}return d+=l.move(`
|
|
9
|
+
`),s&&(d+=l.move(s+`
|
|
10
|
+
`)),d+=l.move(u),c(),d}function im(e,t,r){return(r?"":" ")+e}function va(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 um(e,t,r,n){const a=va(r),s=a==='"'?"Quote":"Apostrophe",i=r.enter("definition");let l=r.enter("label");const u=r.createTracker(n);let c=u.move("[");return c+=u.move(r.safe(r.associationId(e),{before:c,after:"]",...u.current()})),c+=u.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=r.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(r.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(l=r.enter("destinationRaw"),c+=u.move(r.safe(e.url,{before:c,after:e.title?" ":`
|
|
11
|
+
`,...u.current()}))),l(),e.title&&(l=r.enter(`title${s}`),c+=u.move(" "+a),c+=u.move(r.safe(e.title,{before:c,after:a,...u.current()})),c+=u.move(a),l()),i(),c}function om(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 br(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Zr(e,t,r){const n=$r(e),a=$r(t);return n===void 0?a===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:n===1?a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Eo.peek=lm;function Eo(e,t,r,n){const a=om(r),s=r.enter("emphasis"),i=r.createTracker(n),l=i.move(a);let u=i.move(r.containerPhrasing(e,{after:a,before:l,...i.current()}));const c=u.charCodeAt(0),d=Zr(n.before.charCodeAt(n.before.length-1),c,a);d.inside&&(u=br(c)+u.slice(1));const f=u.charCodeAt(u.length-1),h=Zr(n.after.charCodeAt(0),f,a);h.inside&&(u=u.slice(0,-1)+br(f));const g=i.move(a);return s(),r.attentionEncodeSurroundingInfo={after:h.outside,before:d.outside},l+u+g}function lm(e,t,r){return r.options.emphasis||"*"}function cm(e,t){let r=!1;return Me(e,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return r=!0,qn}),!!((!e.depth||e.depth<3)&&Ki(e)&&(t.options.setext||r))}function dm(e,t,r,n){const a=Math.max(Math.min(6,e.depth||1),1),s=r.createTracker(n);if(cm(e,r)){const d=r.enter("headingSetext"),f=r.enter("phrasing"),h=r.containerPhrasing(e,{...s.current(),before:`
|
|
12
|
+
`,after:`
|
|
13
|
+
`});return f(),d(),h+`
|
|
14
|
+
`+(a===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
|
|
15
|
+
`))+1))}const i="#".repeat(a),l=r.enter("headingAtx"),u=r.enter("phrasing");s.move(i+" ");let c=r.containerPhrasing(e,{before:"# ",after:`
|
|
16
|
+
`,...s.current()});return/^[\t ]/.test(c)&&(c=br(c.charCodeAt(0))+c.slice(1)),c=c?i+" "+c:i,r.options.closeAtx&&(c+=" "+i),u(),l(),c}To.peek=fm;function To(e){return e.value||""}function fm(){return"<"}ko.peek=hm;function ko(e,t,r,n){const a=va(r),s=a==='"'?"Quote":"Apostrophe",i=r.enter("image");let l=r.enter("label");const u=r.createTracker(n);let c=u.move("![");return c+=u.move(r.safe(e.alt,{before:c,after:"]",...u.current()})),c+=u.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=r.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(r.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(l=r.enter("destinationRaw"),c+=u.move(r.safe(e.url,{before:c,after:e.title?" ":")",...u.current()}))),l(),e.title&&(l=r.enter(`title${s}`),c+=u.move(" "+a),c+=u.move(r.safe(e.title,{before:c,after:a,...u.current()})),c+=u.move(a),l()),c+=u.move(")"),i(),c}function hm(){return"!"}xo.peek=pm;function xo(e,t,r,n){const a=e.referenceType,s=r.enter("imageReference");let i=r.enter("label");const l=r.createTracker(n);let u=l.move("![");const c=r.safe(e.alt,{before:u,after:"]",...l.current()});u+=l.move(c+"]["),i();const d=r.stack;r.stack=[],i=r.enter("reference");const f=r.safe(r.associationId(e),{before:u,after:"]",...l.current()});return i(),r.stack=d,s(),a==="full"||!c||c!==f?u+=l.move(f+"]"):a==="shortcut"?u=u.slice(0,-1):u+=l.move("]"),u}function pm(){return"!"}Ao.peek=mm;function Ao(e,t,r){let n=e.value||"",a="`",s=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(n);)a+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++s<r.unsafe.length;){const i=r.unsafe[s],l=r.compilePattern(i);let u;if(i.atBreak)for(;u=l.exec(n);){let c=u.index;n.charCodeAt(c)===10&&n.charCodeAt(c-1)===13&&c--,n=n.slice(0,c)+" "+n.slice(u.index+1)}}return a+n+a}function mm(){return"`"}function _o(e,t){const r=Ki(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}yo.peek=bm;function yo(e,t,r,n){const a=va(r),s=a==='"'?"Quote":"Apostrophe",i=r.createTracker(n);let l,u;if(_o(e,r)){const d=r.stack;r.stack=[],l=r.enter("autolink");let f=i.move("<");return f+=i.move(r.containerPhrasing(e,{before:f,after:">",...i.current()})),f+=i.move(">"),l(),r.stack=d,f}l=r.enter("link"),u=r.enter("label");let c=i.move("[");return c+=i.move(r.containerPhrasing(e,{before:c,after:"](",...i.current()})),c+=i.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=r.enter("destinationLiteral"),c+=i.move("<"),c+=i.move(r.safe(e.url,{before:c,after:">",...i.current()})),c+=i.move(">")):(u=r.enter("destinationRaw"),c+=i.move(r.safe(e.url,{before:c,after:e.title?" ":")",...i.current()}))),u(),e.title&&(u=r.enter(`title${s}`),c+=i.move(" "+a),c+=i.move(r.safe(e.title,{before:c,after:a,...i.current()})),c+=i.move(a),u()),c+=i.move(")"),l(),c}function bm(e,t,r){return _o(e,r)?"<":"["}Co.peek=gm;function Co(e,t,r,n){const a=e.referenceType,s=r.enter("linkReference");let i=r.enter("label");const l=r.createTracker(n);let u=l.move("[");const c=r.containerPhrasing(e,{before:u,after:"]",...l.current()});u+=l.move(c+"]["),i();const d=r.stack;r.stack=[],i=r.enter("reference");const f=r.safe(r.associationId(e),{before:u,after:"]",...l.current()});return i(),r.stack=d,s(),a==="full"||!c||c!==f?u+=l.move(f+"]"):a==="shortcut"?u=u.slice(0,-1):u+=l.move("]"),u}function gm(){return"["}function Ma(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 Em(e){const t=Ma(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function Tm(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 No(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 km(e,t,r,n){const a=r.enter("list"),s=r.bulletCurrent;let i=e.ordered?Tm(r):Ma(r);const l=e.ordered?i==="."?")":".":Em(r);let u=t&&r.bulletLastUsed?i===r.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((i==="*"||i==="-")&&d&&(!d.children||!d.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(u=!0),No(r)===i&&d){let f=-1;for(;++f<e.children.length;){const h=e.children[f];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(i=l),r.bulletCurrent=i;const c=r.containerFlow(e,n);return r.bulletLastUsed=i,r.bulletCurrent=s,a(),c}function xm(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 Am(e,t,r,n){const a=xm(r);let s=r.bulletCurrent||Ma(r);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let i=s.length+1;(a==="tab"||a==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(i=Math.ceil(i/4)*4);const l=r.createTracker(n);l.move(s+" ".repeat(i-s.length)),l.shift(i);const u=r.enter("listItem"),c=r.indentLines(r.containerFlow(e,l.current()),d);return u(),c;function d(f,h,g){return h?(g?"":" ".repeat(i))+f:(g?s:s+" ".repeat(i-s.length))+f}}function _m(e,t,r,n){const a=r.enter("paragraph"),s=r.enter("phrasing"),i=r.containerPhrasing(e,n);return s(),a(),i}const ym=an(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Cm(e,t,r,n){return(e.children.some(function(i){return ym(i)})?r.containerPhrasing:r.containerFlow).call(r,e,n)}function Nm(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Io.peek=Im;function Io(e,t,r,n){const a=Nm(r),s=r.enter("strong"),i=r.createTracker(n),l=i.move(a+a);let u=i.move(r.containerPhrasing(e,{after:a,before:l,...i.current()}));const c=u.charCodeAt(0),d=Zr(n.before.charCodeAt(n.before.length-1),c,a);d.inside&&(u=br(c)+u.slice(1));const f=u.charCodeAt(u.length-1),h=Zr(n.after.charCodeAt(0),f,a);h.inside&&(u=u.slice(0,-1)+br(f));const g=i.move(a+a);return s(),r.attentionEncodeSurroundingInfo={after:h.outside,before:d.outside},l+u+g}function Im(e,t,r){return r.options.strong||"*"}function Sm(e,t,r,n){return r.safe(e.value,n)}function wm(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 Lm(e,t,r){const n=(No(r)+(r.options.ruleSpaces?" ":"")).repeat(wm(r));return r.options.ruleSpaces?n.slice(0,-1):n}const So={blockquote:Jp,break:Vs,code:sm,definition:um,emphasis:Eo,hardBreak:Vs,heading:dm,html:To,image:ko,imageReference:xo,inlineCode:Ao,link:yo,linkReference:Co,list:km,listItem:Am,paragraph:_m,root:Cm,strong:Io,text:Sm,thematicBreak:Lm};function Rm(){return{enter:{table:Om,tableData:Ws,tableHeader:Ws,tableRow:Pm},exit:{codeText:vm,table:Dm,tableData:Sn,tableHeader:Sn,tableRow:Sn}}}function Om(e){const t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function Dm(e){this.exit(e),this.data.inTable=void 0}function Pm(e){this.enter({type:"tableRow",children:[]},e)}function Sn(e){this.exit(e)}function Ws(e){this.enter({type:"tableCell",children:[]},e)}function vm(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Mm));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function Mm(e,t){return t==="|"?t:e}function Bm(e){const t=e||{},r=t.tableCellPadding,n=t.tablePipeAlign,a=t.stringLength,s=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
17
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:i,tableCell:u,tableRow:l}};function i(g,b,_,A){return c(d(g,_,A),g.align)}function l(g,b,_,A){const y=f(g,_,A),S=c([y]);return S.slice(0,S.indexOf(`
|
|
18
|
+
`))}function u(g,b,_,A){const y=_.enter("tableCell"),S=_.enter("phrasing"),L=_.containerPhrasing(g,{...A,before:s,after:s});return S(),y(),L}function c(g,b){return Kp(g,{align:b,alignDelimiters:n,padding:r,stringLength:a})}function d(g,b,_){const A=g.children;let y=-1;const S=[],L=b.enter("table");for(;++y<A.length;)S[y]=f(A[y],b,_);return L(),S}function f(g,b,_){const A=g.children;let y=-1;const S=[],L=b.enter("tableRow");for(;++y<A.length;)S[y]=u(A[y],g,b,_);return L(),S}function h(g,b,_){let A=So.inlineCode(g,b,_);return _.stack.includes("tableCell")&&(A=A.replace(/\|/g,"\\$&")),A}}function Fm(){return{exit:{taskListCheckValueChecked:Gs,taskListCheckValueUnchecked:Gs,paragraph:Um}}}function Hm(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:jm}}}function Gs(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Um(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const n=r.children[0];if(n&&n.type==="text"){const a=t.children;let s=-1,i;for(;++s<a.length;){const l=a[s];if(l.type==="paragraph"){i=l;break}}i===r&&(n.value=n.value.slice(1),n.value.length===0?r.children.shift():r.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,r.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function jm(e,t,r,n){const a=e.children[0],s=typeof e.checked=="boolean"&&a&&a.type==="paragraph",i="["+(e.checked?"x":" ")+"] ",l=r.createTracker(n);s&&l.move(i);let u=So.listItem(e,t,r,{...n,...l.current()});return s&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),u;function c(d){return d+i}}function zm(){return[kp(),jp(),qp(),Rm(),Fm()]}function $m(e){return{extensions:[xp(),zp(e),Vp(),Bm(e),Hm()]}}const Ym={tokenize:Xm,partial:!0},wo={tokenize:Km,partial:!0},Lo={tokenize:Zm,partial:!0},Ro={tokenize:Jm,partial:!0},qm={tokenize:e1,partial:!0},Oo={name:"wwwAutolink",tokenize:Gm,previous:Po},Do={name:"protocolAutolink",tokenize:Qm,previous:vo},ze={name:"emailAutolink",tokenize:Wm,previous:Mo},Fe={};function Vm(){return{text:Fe}}let ft=48;for(;ft<123;)Fe[ft]=ze,ft++,ft===58?ft=65:ft===91&&(ft=97);Fe[43]=ze;Fe[45]=ze;Fe[46]=ze;Fe[95]=ze;Fe[72]=[ze,Do];Fe[104]=[ze,Do];Fe[87]=[ze,Oo];Fe[119]=[ze,Oo];function Wm(e,t,r){const n=this;let a,s;return i;function i(f){return!ea(f)||!Mo.call(n,n.previous)||Ba(n.events)?r(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(f))}function l(f){return ea(f)?(e.consume(f),l):f===64?(e.consume(f),u):r(f)}function u(f){return f===46?e.check(qm,d,c)(f):f===45||f===95||dr(f)?(s=!0,e.consume(f),u):d(f)}function c(f){return e.consume(f),a=!0,u}function d(f){return s&&a&&fr(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):r(f)}}function Gm(e,t,r){const n=this;return a;function a(i){return i!==87&&i!==119||!Po.call(n,n.previous)||Ba(n.events)?r(i):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Ym,e.attempt(wo,e.attempt(Lo,s),r),r)(i))}function s(i){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(i)}}function Qm(e,t,r){const n=this;let a="",s=!1;return i;function i(f){return(f===72||f===104)&&vo.call(n,n.previous)&&!Ba(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(f),e.consume(f),l):r(f)}function l(f){if(fr(f)&&a.length<5)return a+=String.fromCodePoint(f),e.consume(f),l;if(f===58){const h=a.toLowerCase();if(h==="http"||h==="https")return e.consume(f),u}return r(f)}function u(f){return f===47?(e.consume(f),s?c:(s=!0,u)):r(f)}function c(f){return f===null||hc(f)||Ee(f)||Pt(f)||ma(f)?r(f):e.attempt(wo,e.attempt(Lo,d),r)(f)}function d(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function Xm(e,t,r){let n=0;return a;function a(i){return(i===87||i===119)&&n<3?(n++,e.consume(i),a):i===46&&n===3?(e.consume(i),s):r(i)}function s(i){return i===null?r(i):t(i)}}function Km(e,t,r){let n,a,s;return i;function i(c){return c===46||c===95?e.check(Ro,u,l)(c):c===null||Ee(c)||Pt(c)||c!==45&&ma(c)?u(c):(s=!0,e.consume(c),i)}function l(c){return c===95?n=!0:(a=n,n=void 0),e.consume(c),i}function u(c){return a||n||!s?r(c):t(c)}}function Zm(e,t){let r=0,n=0;return a;function a(i){return i===40?(r++,e.consume(i),a):i===41&&n<r?s(i):i===33||i===34||i===38||i===39||i===41||i===42||i===44||i===46||i===58||i===59||i===60||i===63||i===93||i===95||i===126?e.check(Ro,t,s)(i):i===null||Ee(i)||Pt(i)?t(i):(e.consume(i),a)}function s(i){return i===41&&n++,e.consume(i),a}}function Jm(e,t,r){return n;function n(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),n):l===38?(e.consume(l),s):l===93?(e.consume(l),a):l===60||l===null||Ee(l)||Pt(l)?t(l):r(l)}function a(l){return l===null||l===40||l===91||Ee(l)||Pt(l)?t(l):n(l)}function s(l){return fr(l)?i(l):r(l)}function i(l){return l===59?(e.consume(l),n):fr(l)?(e.consume(l),i):r(l)}}function e1(e,t,r){return n;function n(s){return e.consume(s),a}function a(s){return dr(s)?r(s):t(s)}}function Po(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ee(e)}function vo(e){return!fr(e)}function Mo(e){return!(e===47||ea(e))}function ea(e){return e===43||e===45||e===46||e===95||dr(e)}function Ba(e){let t=e.length,r=!1;for(;t--;){const n=e[t][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}function jt(e){const t=[];let r=-1,n=0,a=0;for(;++r<e.length;){const s=e.charCodeAt(r);let i="";if(s===37&&dr(e.charCodeAt(r+1))&&dr(e.charCodeAt(r+2)))a=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(i=String.fromCharCode(s));else if(s>55295&&s<57344){const l=e.charCodeAt(r+1);s<56320&&l>56319&&l<57344?(i=String.fromCharCode(s,l),a=1):i="�"}else i=String.fromCharCode(s);i&&(t.push(e.slice(n,r),encodeURIComponent(i)),n=r+a+1,i=""),a&&(r+=a,a=0)}return t.join("")+e.slice(n)}const t1={tokenize:l1,partial:!0};function r1(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:i1,continuation:{tokenize:u1},exit:o1}},text:{91:{name:"gfmFootnoteCall",tokenize:s1},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:n1,resolveTo:a1}}}}function n1(e,t,r){const n=this;let a=n.events.length;const s=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let i;for(;a--;){const u=n.events[a][1];if(u.type==="labelImage"){i=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return l;function l(u){if(!i||!i._balanced)return r(u);const c=Er(n.sliceSerialize({start:i.end,end:n.now()}));return c.codePointAt(0)!==94||!s.includes(c.slice(1))?r(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function a1(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},i={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},l=[e[r+1],e[r+2],["enter",n,t],e[r+3],e[r+4],["enter",a,t],["exit",a,t],["enter",s,t],["enter",i,t],["exit",i,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",n,t]];return e.splice(r,e.length-r+1,...l),e}function s1(e,t,r){const n=this,a=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let s=0,i;return l;function l(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),u}function u(f){return f!==94?r(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(f){if(s>999||f===93&&!i||f===null||f===91||Ee(f))return r(f);if(f===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return a.includes(Er(n.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(f)}return Ee(f)||(i=!0),s++,e.consume(f),f===92?d:c}function d(f){return f===91||f===92||f===93?(e.consume(f),s++,c):c(f)}}function i1(e,t,r){const n=this,a=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let s,i=0,l;return u;function u(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):r(b)}function d(b){if(i>999||b===93&&!l||b===null||b===91||Ee(b))return r(b);if(b===93){e.exit("chunkString");const _=e.exit("gfmFootnoteDefinitionLabelString");return s=Er(n.sliceSerialize(_)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return Ee(b)||(l=!0),i++,e.consume(b),b===92?f:d}function f(b){return b===91||b===92||b===93?(e.consume(b),i++,d):d(b)}function h(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),a.includes(s)||a.push(s),et(e,g,"gfmFootnoteDefinitionWhitespace")):r(b)}function g(b){return t(b)}}function u1(e,t,r){return e.check(pc,t,e.attempt(t1,t,r))}function o1(e){e.exit("gfmFootnoteDefinition")}function l1(e,t,r){const n=this;return et(e,a,"gfmFootnoteDefinitionIndent",5);function a(s){const i=n.events[n.events.length-1];return i&&i[1].type==="gfmFootnoteDefinitionIndent"&&i[2].sliceSerialize(i[1],!0).length===4?t(s):r(s)}}function c1(e){let r=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:s,resolveAll:a};return r==null&&(r=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function a(i,l){let u=-1;for(;++u<i.length;)if(i[u][0]==="enter"&&i[u][1].type==="strikethroughSequenceTemporary"&&i[u][1]._close){let c=u;for(;c--;)if(i[c][0]==="exit"&&i[c][1].type==="strikethroughSequenceTemporary"&&i[c][1]._open&&i[u][1].end.offset-i[u][1].start.offset===i[c][1].end.offset-i[c][1].start.offset){i[u][1].type="strikethroughSequence",i[c][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},i[c][1].start),end:Object.assign({},i[u][1].end)},f={type:"strikethroughText",start:Object.assign({},i[c][1].end),end:Object.assign({},i[u][1].start)},h=[["enter",d,l],["enter",i[c][1],l],["exit",i[c][1],l],["enter",f,l]],g=l.parser.constructs.insideSpan.null;g&&Hr(h,h.length,0,Xi(g,i.slice(c+1,u),l)),Hr(h,h.length,0,[["exit",f,l],["enter",i[u][1],l],["exit",i[u][1],l],["exit",d,l]]),Hr(i,c-1,u-c+3,h),u=c+h.length-2;break}}for(u=-1;++u<i.length;)i[u][1].type==="strikethroughSequenceTemporary"&&(i[u][1].type="data");return i}function s(i,l,u){const c=this.previous,d=this.events;let f=0;return h;function h(b){return c===126&&d[d.length-1][1].type!=="characterEscape"?u(b):(i.enter("strikethroughSequenceTemporary"),g(b))}function g(b){const _=$r(c);if(b===126)return f>1?u(b):(i.consume(b),f++,g);if(f<2&&!r)return u(b);const A=i.exit("strikethroughSequenceTemporary"),y=$r(b);return A._open=!y||y===2&&!!_,A._close=!_||_===2&&!!y,l(b)}}}class d1{constructor(){this.map=[]}add(t,r,n){f1(this,t,r,n)}consume(t){if(this.map.sort(function(s,i){return s[0]-i[0]}),this.map.length===0)return;let r=this.map.length;const n=[];for(;r>0;)r-=1,n.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];n.push(t.slice()),t.length=0;let a=n.pop();for(;a;){for(const s of a)t.push(s);a=n.pop()}this.map.length=0}}function f1(e,t,r,n){let a=0;if(!(r===0&&n.length===0)){for(;a<e.map.length;){if(e.map[a][0]===t){e.map[a][1]+=r,e.map[a][2].push(...n);return}a+=1}e.map.push([t,r,n])}}function h1(e,t){let r=!1;const n=[];for(;t<e.length;){const a=e[t];if(r){if(a[0]==="enter")a[1].type==="tableContent"&&n.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(a[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=n.length-1;n[s]=n[s]==="left"?"center":"right"}}else if(a[1].type==="tableDelimiterRow")break}else a[0]==="enter"&&a[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return n}function p1(){return{flow:{null:{name:"table",tokenize:m1,resolveAll:b1}}}}function m1(e,t,r){const n=this;let a=0,s=0,i;return l;function l(N){let K=n.events.length-1;for(;K>-1;){const z=n.events[K][1].type;if(z==="lineEnding"||z==="linePrefix")K--;else break}const ue=K>-1?n.events[K][1].type:null,Re=ue==="tableHead"||ue==="tableRow"?v:u;return Re===v&&n.parser.lazy[n.now().line]?r(N):Re(N)}function u(N){return e.enter("tableHead"),e.enter("tableRow"),c(N)}function c(N){return N===124||(i=!0,s+=1),d(N)}function d(N){return N===null?r(N):Jt(N)?s>1?(s=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),g):r(N):St(N)?et(e,d,"whitespace")(N):(s+=1,i&&(i=!1,a+=1),N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),i=!0,d):(e.enter("data"),f(N)))}function f(N){return N===null||N===124||Ee(N)?(e.exit("data"),d(N)):(e.consume(N),N===92?h:f)}function h(N){return N===92||N===124?(e.consume(N),f):f(N)}function g(N){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(N):(e.enter("tableDelimiterRow"),i=!1,St(N)?et(e,b,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):b(N))}function b(N){return N===45||N===58?A(N):N===124?(i=!0,e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),_):P(N)}function _(N){return St(N)?et(e,A,"whitespace")(N):A(N)}function A(N){return N===58?(s+=1,i=!0,e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),y):N===45?(s+=1,y(N)):N===null||Jt(N)?D(N):P(N)}function y(N){return N===45?(e.enter("tableDelimiterFiller"),S(N)):P(N)}function S(N){return N===45?(e.consume(N),S):N===58?(i=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),L):(e.exit("tableDelimiterFiller"),L(N))}function L(N){return St(N)?et(e,D,"whitespace")(N):D(N)}function D(N){return N===124?b(N):N===null||Jt(N)?!i||a!==s?P(N):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(N)):P(N)}function P(N){return r(N)}function v(N){return e.enter("tableRow"),G(N)}function G(N){return N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),G):N===null||Jt(N)?(e.exit("tableRow"),t(N)):St(N)?et(e,G,"whitespace")(N):(e.enter("data"),O(N))}function O(N){return N===null||N===124||Ee(N)?(e.exit("data"),G(N)):(e.consume(N),N===92?Q:O)}function Q(N){return N===92||N===124?(e.consume(N),O):O(N)}}function b1(e,t){let r=-1,n=!0,a=0,s=[0,0,0,0],i=[0,0,0,0],l=!1,u=0,c,d,f;const h=new d1;for(;++r<e.length;){const g=e[r],b=g[1];g[0]==="enter"?b.type==="tableHead"?(l=!1,u!==0&&(Qs(h,t,u,c,d),d=void 0,u=0),c={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},h.add(r,0,[["enter",c,t]])):b.type==="tableRow"||b.type==="tableDelimiterRow"?(n=!0,f=void 0,s=[0,0,0,0],i=[0,r+1,0,0],l&&(l=!1,d={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},h.add(r,0,[["enter",d,t]])),a=b.type==="tableDelimiterRow"?2:d?3:1):a&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")?(n=!1,i[2]===0&&(s[1]!==0&&(i[0]=i[1],f=Rr(h,t,s,a,void 0,f),s=[0,0,0,0]),i[2]=r)):b.type==="tableCellDivider"&&(n?n=!1:(s[1]!==0&&(i[0]=i[1],f=Rr(h,t,s,a,void 0,f)),s=i,i=[s[1],r,0,0])):b.type==="tableHead"?(l=!0,u=r):b.type==="tableRow"||b.type==="tableDelimiterRow"?(u=r,s[1]!==0?(i[0]=i[1],f=Rr(h,t,s,a,r,f)):i[1]!==0&&(f=Rr(h,t,i,a,r,f)),a=0):a&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(i[3]=r)}for(u!==0&&Qs(h,t,u,c,d),h.consume(t.events),r=-1;++r<t.events.length;){const g=t.events[r];g[0]==="enter"&&g[1].type==="table"&&(g[1]._align=h1(t.events,r))}return e}function Rr(e,t,r,n,a,s){const i=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",l="tableContent";r[0]!==0&&(s.end=Object.assign({},wt(t.events,r[0])),e.add(r[0],0,[["exit",s,t]]));const u=wt(t.events,r[1]);if(s={type:i,start:Object.assign({},u),end:Object.assign({},u)},e.add(r[1],0,[["enter",s,t]]),r[2]!==0){const c=wt(t.events,r[2]),d=wt(t.events,r[3]),f={type:l,start:Object.assign({},c),end:Object.assign({},d)};if(e.add(r[2],0,[["enter",f,t]]),n!==2){const h=t.events[r[2]],g=t.events[r[3]];if(h[1].end=Object.assign({},g[1].end),h[1].type="chunkText",h[1].contentType="text",r[3]>r[2]+1){const b=r[2]+1,_=r[3]-r[2]-1;e.add(b,_,[])}}e.add(r[3]+1,0,[["exit",f,t]])}return a!==void 0&&(s.end=Object.assign({},wt(t.events,a)),e.add(a,0,[["exit",s,t]]),s=void 0),s}function Qs(e,t,r,n,a){const s=[],i=wt(t.events,r);a&&(a.end=Object.assign({},i),s.push(["exit",a,t])),n.end=Object.assign({},i),s.push(["exit",n,t]),e.add(r+1,0,s)}function wt(e,t){const r=e[t],n=r[0]==="enter"?"start":"end";return r[1][n]}const g1={name:"tasklistCheck",tokenize:T1};function E1(){return{text:{91:g1}}}function T1(e,t,r){const n=this;return a;function a(u){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?r(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),s)}function s(u){return Ee(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),i):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),i):r(u)}function i(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):r(u)}function l(u){return Jt(u)?t(u):St(u)?e.check({tokenize:k1},t,r)(u):r(u)}}function k1(e,t,r){return et(e,n,"whitespace");function n(a){return a===null?r(a):t(a)}}function x1(e){return mc([Vm(),r1(),c1(e),p1(),E1()])}const A1={};function _1(e){const t=this,r=e||A1,n=t.data(),a=n.micromarkExtensions||(n.micromarkExtensions=[]),s=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),i=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);a.push(x1(r)),s.push(zm()),i.push($m(r))}var y1=Object.defineProperty,C1=Object.defineProperties,N1=Object.getOwnPropertyDescriptors,Xs=Object.getOwnPropertySymbols,I1=Object.prototype.hasOwnProperty,S1=Object.prototype.propertyIsEnumerable,Ks=(e,t,r)=>t in e?y1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Bo=(e,t)=>{for(var r in t||(t={}))I1.call(t,r)&&Ks(e,r,t[r]);if(Xs)for(var r of Xs(t))S1.call(t,r)&&Ks(e,r,t[r]);return e},Fo=(e,t)=>C1(e,N1(t)),Te=(e,t)=>{let r=!1,n=!1;for(let a=0;a<t;a+=1){if(e[a]==="\\"&&a+1<e.length&&e[a+1]==="`"){a+=1;continue}if(e.substring(a,a+3)==="```"){n=!n,a+=2;continue}!n&&e[a]==="`"&&(r=!r)}return r||n},w1=(e,t)=>{let r=e.substring(t,t+3)==="```",n=t>0&&e.substring(t-1,t+2)==="```",a=t>1&&e.substring(t-2,t+1)==="```";return r||n||a},L1=e=>{let t=0;for(let r=0;r<e.length;r+=1){if(e[r]==="\\"&&r+1<e.length&&e[r+1]==="`"){r+=1;continue}e[r]==="`"&&!w1(e,r)&&(t+=1)}return t},nt=(e,t)=>{let r=!1,n=!1,a=-1;for(let s=0;s<e.length;s+=1){if(e[s]==="\\"&&s+1<e.length&&e[s+1]==="`"){s+=1;continue}if(e.substring(s,s+3)==="```"){n=!n,s+=2;continue}if(!n&&e[s]==="`")if(r){if(a<t&&t<s)return!0;r=!1,a=-1}else r=!0,a=s}return!1},R1=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,O1=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(R1,(t,r,n,a)=>Te(e,a)?t:`${r}\\>${n}`),D1=/(\*\*)([^*]*\*?)$/,P1=/(__)([^_]*?)$/,v1=/(\*\*\*)([^*]*?)$/,M1=/(\*)([^*]*?)$/,B1=/(_)([^_]*?)$/,F1=/(`)([^`]*?)$/,H1=/(~~)([^~]*?)$/,At=/^[\s_~*`]*$/,Ho=/^[\s]*[-*+][\s]+$/,U1=/[\p{L}\p{N}_]/u,j1=/^```[^`\n]*```?$/,z1=/^\*{4,}$/,$1=/(__)([^_]+)_$/,Y1=/(~~)([^~]+)~$/,Zs=/~~/g,at=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:U1.test(e)},q1=(e,t)=>{let r=1;for(let n=t-1;n>=0;n-=1)if(e[n]==="]")r+=1;else if(e[n]==="["&&(r-=1,r===0))return n;return-1},Uo=(e,t)=>{let r=1;for(let n=t+1;n<e.length;n+=1)if(e[n]==="[")r+=1;else if(e[n]==="]"&&(r-=1,r===0))return n;return-1},pn=(e,t)=>{let r=!1,n=!1;for(let a=0;a<e.length&&a<t;a+=1){if(e[a]==="\\"&&e[a+1]==="$"){a+=1;continue}e[a]==="$"&&(e[a+1]==="$"?(n=!n,a+=1,r=!1):n||(r=!r))}return r||n},V1=(e,t)=>{for(let r=t;r<e.length;r+=1){if(e[r]===")")return!0;if(e[r]===`
|
|
19
|
+
`)return!1}return!1},jo=(e,t)=>{for(let r=t-1;r>=0;r-=1){if(e[r]===")")return!1;if(e[r]==="(")return r>0&&e[r-1]==="]"?V1(e,t):!1;if(e[r]===`
|
|
20
|
+
`)return!1}return!1},W1=(e,t)=>{for(let r=t-1;r>=0;r-=1){if(e[r]===">")return!1;if(e[r]==="<"){let n=r+1<e.length?e[r+1]:"";return n>="a"&&n<="z"||n>="A"&&n<="Z"||n==="/"}if(e[r]===`
|
|
21
|
+
`)return!1}return!1},Fa=(e,t,r)=>{let n=0;for(let u=t-1;u>=0;u-=1)if(e[u]===`
|
|
22
|
+
`){n=u+1;break}let a=e.length;for(let u=t;u<e.length;u+=1)if(e[u]===`
|
|
23
|
+
`){a=u;break}let s=e.substring(n,a),i=0,l=!1;for(let u of s)if(u===r)i+=1;else if(u!==" "&&u!==" "){l=!0;break}return i>=3&&!l},G1=(e,t,r,n)=>r==="\\"||e.includes("$")&&pn(e,t)?!0:r!=="*"&&n==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(r==="*"||r&&n&&at(r)&&at(n)||(!r||r===" "||r===" "||r===`
|
|
24
|
+
`)&&(!n||n===" "||n===" "||n===`
|
|
25
|
+
`)),zo=e=>{let t=0,r=!1,n=e.length;for(let a=0;a<n;a+=1){if(e[a]==="`"&&a+2<n&&e[a+1]==="`"&&e[a+2]==="`"){r=!r,a+=2;continue}if(r||e[a]!=="*")continue;let s=a>0?e[a-1]:"",i=a<n-1?e[a+1]:"";G1(e,a,s,i)||(t+=1)}return t},Q1=(e,t,r,n)=>!!(r==="\\"||e.includes("$")&&pn(e,t)||jo(e,t)||W1(e,t)||r==="_"||n==="_"||r&&n&&at(r)&&at(n)),X1=e=>{let t=0,r=!1,n=e.length;for(let a=0;a<n;a+=1){if(e[a]==="`"&&a+2<n&&e[a+1]==="`"&&e[a+2]==="`"){r=!r,a+=2;continue}if(r||e[a]!=="_")continue;let s=a>0?e[a-1]:"",i=a<n-1?e[a+1]:"";Q1(e,a,s,i)||(t+=1)}return t},K1=e=>{let t=0,r=0,n=!1;for(let a=0;a<e.length;a+=1){if(e[a]==="`"&&a+2<e.length&&e[a+1]==="`"&&e[a+2]==="`"){r>=3&&(t+=Math.floor(r/3)),r=0,n=!n,a+=2;continue}n||(e[a]==="*"?r+=1:(r>=3&&(t+=Math.floor(r/3)),r=0))}return r>=3&&(t+=Math.floor(r/3)),t},Ha=e=>{let t=0,r=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){r=!r,n+=2;continue}r||e[n]==="*"&&n+1<e.length&&e[n+1]==="*"&&(t+=1,n+=1)}return t},Js=e=>{let t=0,r=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){r=!r,n+=2;continue}r||e[n]==="_"&&n+1<e.length&&e[n+1]==="_"&&(t+=1,n+=1)}return t},Z1=(e,t,r)=>{if(!t||At.test(t))return!0;let n=e.substring(0,r).lastIndexOf(`
|
|
26
|
+
`),a=n===-1?0:n+1,s=e.substring(a,r);return Ho.test(s)&&t.includes(`
|
|
27
|
+
`)?!0:Fa(e,r,"*")},J1=e=>{let t=e.match(D1);if(!t)return e;let r=t[2],n=e.lastIndexOf(t[1]);return Te(e,n)||nt(e,n)||Z1(e,r,n)?e:Ha(e)%2===1?r.endsWith("*")?`${e}*`:`${e}**`:e},eb=(e,t,r)=>{if(!t||At.test(t))return!0;let n=e.substring(0,r).lastIndexOf(`
|
|
28
|
+
`),a=n===-1?0:n+1,s=e.substring(a,r);return Ho.test(s)&&t.includes(`
|
|
29
|
+
`)?!0:Fa(e,r,"_")},tb=e=>{let t=e.match(P1);if(!t){let a=e.match($1);if(a){let s=e.lastIndexOf(a[1]);if(!(Te(e,s)||nt(e,s))&&Js(e)%2===1)return`${e}_`}return e}let r=t[2],n=e.lastIndexOf(t[1]);return Te(e,n)||nt(e,n)||eb(e,r,n)?e:Js(e)%2===1?`${e}__`:e},rb=e=>{let t=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){t=!t,r+=2;continue}if(!t&&e[r]==="*"&&e[r-1]!=="*"&&e[r+1]!=="*"&&e[r-1]!=="\\"&&!pn(e,r)){let n=r>0?e[r-1]:"",a=r<e.length-1?e[r+1]:"";if((!n||n===" "||n===" "||n===`
|
|
30
|
+
`)&&(!a||a===" "||a===" "||a===`
|
|
31
|
+
`)||n&&a&&at(n)&&at(a))continue;return r}}return-1},nb=e=>{if(!e.match(M1))return e;let t=rb(e);if(t===-1||Te(e,t)||nt(e,t))return e;let r=e.substring(t+1);return!r||At.test(r)?e:zo(e)%2===1?`${e}*`:e},$o=e=>{let t=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){t=!t,r+=2;continue}if(!t&&e[r]==="_"&&e[r-1]!=="_"&&e[r+1]!=="_"&&e[r-1]!=="\\"&&!pn(e,r)&&!jo(e,r)){let n=r>0?e[r-1]:"",a=r<e.length-1?e[r+1]:"";if(n&&a&&at(n)&&at(a))continue;return r}}return-1},ab=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
32
|
+
`;)t-=1;if(t<e.length){let r=e.slice(0,t),n=e.slice(t);return`${r}_${n}`}return`${e}_`},sb=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(Ha(t)%2!==1)return null;let r=t.indexOf("**"),n=$o(t);return r!==-1&&n!==-1&&r<n?`${t}_**`:null},ib=e=>{if(!e.match(B1))return e;let t=$o(e);if(t===-1)return e;let r=e.substring(t+1);if(!r||At.test(r)||Te(e,t)||nt(e,t))return e;if(X1(e)%2===1){let n=sb(e);return n!==null?n:ab(e)}return e},ub=e=>{let t=Ha(e),r=zo(e);return t%2===0&&r%2===0},ob=(e,t,r)=>!t||At.test(t)||Te(e,r)||nt(e,r)?!0:Fa(e,r,"*"),lb=e=>{if(z1.test(e))return e;let t=e.match(v1);if(!t)return e;let r=t[2],n=e.lastIndexOf(t[1]);return ob(e,r,n)?e:K1(e)%2===1?ub(e)?e:`${e}***`:e},cb=/<[a-zA-Z/][^>]*$/,db=e=>{let t=e.match(cb);return!t||t.index===void 0||Te(e,t.index)?e:e.substring(0,t.index).trimEnd()},fb=e=>!e.match(j1)||e.includes(`
|
|
33
|
+
`)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,hb=e=>(e.match(/```/g)||[]).length%2===1,pb=e=>{let t=fb(e);if(t!==null)return t;let r=e.match(F1);if(r&&!hb(e)){let n=r[2];if(!n||At.test(n))return e;if(L1(e)%2===1)return`${e}\``}return e},mb=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",bb=e=>{let t=0,r=!1;for(let n=0;n<e.length-1;n+=1)e[n]==="`"&&!mb(e,n)&&(r=!r),!r&&e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},gb=e=>{let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
|
|
34
|
+
`,t)!==-1&&!e.endsWith(`
|
|
35
|
+
`)?`${e}
|
|
36
|
+
$$`:`${e}$$`},Eb=e=>bb(e)%2===0?e:gb(e),Tb=(e,t,r)=>{if(e.substring(t+2).includes(")"))return null;let n=q1(e,t);if(n===-1||Te(e,n))return null;let a=n>0&&e[n-1]==="!",s=a?n-1:n,i=e.substring(0,s);if(a)return i;let l=e.substring(n+1,t);return r==="text-only"?`${i}${l}`:`${i}[${l}](streamdown:incomplete-link)`},ei=(e,t)=>{for(let r=0;r<t;r++)if(e[r]==="["&&!Te(e,r)){if(r>0&&e[r-1]==="!")continue;let n=Uo(e,r);if(n===-1)return r;if(n+1<e.length&&e[n+1]==="("){let a=e.indexOf(")",n+2);a!==-1&&(r=a)}}return t},kb=(e,t,r)=>{let n=t>0&&e[t-1]==="!",a=n?t-1:t;if(!e.substring(t+1).includes("]")){let s=e.substring(0,a);if(n)return s;if(r==="text-only"){let i=ei(e,t);return e.substring(0,i)+e.substring(i+1)}return`${e}](streamdown:incomplete-link)`}if(Uo(e,t)===-1){let s=e.substring(0,a);if(n)return s;if(r==="text-only"){let i=ei(e,t);return e.substring(0,i)+e.substring(i+1)}return`${e}](streamdown:incomplete-link)`}return null},Yo=(e,t="protocol")=>{let r=e.lastIndexOf("](");if(r!==-1&&!Te(e,r)){let n=Tb(e,r,t);if(n!==null)return n}for(let n=e.length-1;n>=0;n-=1)if(e[n]==="["&&!Te(e,n)){let a=kb(e,n,t);if(a!==null)return a}return e},xb=/^-{1,2}$/,Ab=/^[\s]*-{1,2}[\s]+$/,_b=/^={1,2}$/,yb=/^[\s]*={1,2}[\s]+$/,Cb=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
|
|
37
|
+
`);if(t===-1)return e;let r=e.substring(t+1),n=e.substring(0,t),a=r.trim();if(xb.test(a)&&!r.match(Ab)){let s=n.split(`
|
|
38
|
+
`).at(-1);if(s&&s.trim().length>0)return`${e}`}if(_b.test(a)&&!r.match(yb)){let s=n.split(`
|
|
39
|
+
`).at(-1);if(s&&s.trim().length>0)return`${e}`}return e},Nb=e=>{var t,r;let n=e.match(H1);if(n){let a=n[2];if(!a||At.test(a))return e;let s=e.lastIndexOf(n[1]);if(Te(e,s)||nt(e,s))return e;if(((t=e.match(Zs))==null?void 0:t.length)%2===1)return`${e}~~`}else{let a=e.match(Y1);if(a){let s=e.lastIndexOf(a[0].slice(0,2));if(Te(e,s)||nt(e,s))return e;if(((r=e.match(Zs))==null?void 0:r.length)%2===1)return`${e}~`}}return e},wn=e=>e!==!1,Ae={COMPARISON_OPERATORS:-10,HTML_TAGS:-5,SETEXT_HEADINGS:0,LINKS:10,BOLD_ITALIC:20,BOLD:30,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,DEFAULT:100},Ib=[{handler:{name:"comparisonOperators",handle:O1,priority:Ae.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:db,priority:Ae.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:Cb,priority:Ae.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:Yo,priority:Ae.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:lb,priority:Ae.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:J1,priority:Ae.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:tb,priority:Ae.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:nb,priority:Ae.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:ib,priority:Ae.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:pb,priority:Ae.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:Nb,priority:Ae.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:Eb,priority:Ae.KATEX},optionKey:"katex"}],Sb=e=>{var t;let r=(t=e?.linkMode)!=null?t:"protocol";return Ib.filter(({handler:n,optionKey:a})=>n.name==="links"?wn(e?.links)||wn(e?.images):wn(e?.[a])).map(({handler:n,earlyReturn:a})=>n.name==="links"?{handler:Fo(Bo({},n),{handle:s=>Yo(s,r)}),earlyReturn:r==="protocol"?a:void 0}:{handler:n,earlyReturn:a})},wb=(e,t)=>{var r;if(!e||typeof e!="string")return e;let n=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,a=Sb(t),s=((r=t?.handlers)!=null?r:[]).map(l=>{var u;return{handler:Fo(Bo({},l),{priority:(u=l.priority)!=null?u:Ae.DEFAULT}),earlyReturn:void 0}}),i=[...a,...s].sort((l,u)=>{var c,d;return((c=l.handler.priority)!=null?c:0)-((d=u.handler.priority)!=null?d:0)});for(let{handler:l,earlyReturn:u}of i)if(n=l.handle(n),u!=null&&u(n))return n;return n},Lb=wb;function qo(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=qo(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Vo(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=qo(e))&&(n&&(n+=" "),n+=t);return n}const Rb=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},Ob=(e,t)=>({classGroupId:e,validator:t}),Wo=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Jr="-",ti=[],Db="arbitrary..",Pb=e=>{const t=Mb(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return vb(i);const l=i.split(Jr),u=l[0]===""&&l.length>1?1:0;return Go(l,u,t)},getConflictingClassGroupIds:(i,l)=>{if(l){const u=n[i],c=r[i];return u?c?Rb(c,u):u:c||ti}return r[i]||ti}}},Go=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const a=e[t],s=r.nextPart.get(a);if(s){const c=Go(e,t+1,s);if(c)return c}const i=r.validators;if(i===null)return;const l=t===0?e.join(Jr):e.slice(t).join(Jr),u=i.length;for(let c=0;c<u;c++){const d=i[c];if(d.validator(l))return d.classGroupId}},vb=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?Db+n:void 0})(),Mb=e=>{const{theme:t,classGroups:r}=e;return Bb(r,t)},Bb=(e,t)=>{const r=Wo();for(const n in e){const a=e[n];Ua(a,r,n,t)}return r},Ua=(e,t,r,n)=>{const a=e.length;for(let s=0;s<a;s++){const i=e[s];Fb(i,t,r,n)}},Fb=(e,t,r,n)=>{if(typeof e=="string"){Hb(e,t,r);return}if(typeof e=="function"){Ub(e,t,r,n);return}jb(e,t,r,n)},Hb=(e,t,r)=>{const n=e===""?t:Qo(t,e);n.classGroupId=r},Ub=(e,t,r,n)=>{if(zb(e)){Ua(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(Ob(r,e))},jb=(e,t,r,n)=>{const a=Object.entries(e),s=a.length;for(let i=0;i<s;i++){const[l,u]=a[i];Ua(u,Qo(t,l),r,n)}},Qo=(e,t)=>{let r=e;const n=t.split(Jr),a=n.length;for(let s=0;s<a;s++){const i=n[s];let l=r.nextPart.get(i);l||(l=Wo(),r.nextPart.set(i,l)),r=l}return r},zb=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,$b=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const a=(s,i)=>{r[s]=i,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(s){let i=r[s];if(i!==void 0)return i;if((i=n[s])!==void 0)return a(s,i),i},set(s,i){s in r?r[s]=i:a(s,i)}}},ta="!",ri=":",Yb=[],ni=(e,t,r,n,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:a}),qb=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=a=>{const s=[];let i=0,l=0,u=0,c;const d=a.length;for(let _=0;_<d;_++){const A=a[_];if(i===0&&l===0){if(A===ri){s.push(a.slice(u,_)),u=_+1;continue}if(A==="/"){c=_;continue}}A==="["?i++:A==="]"?i--:A==="("?l++:A===")"&&l--}const f=s.length===0?a:a.slice(u);let h=f,g=!1;f.endsWith(ta)?(h=f.slice(0,-1),g=!0):f.startsWith(ta)&&(h=f.slice(1),g=!0);const b=c&&c>u?c-u:void 0;return ni(s,g,h,b)};if(t){const a=t+ri,s=n;n=i=>i.startsWith(a)?s(i.slice(a.length)):ni(Yb,!1,i,void 0,!0)}if(r){const a=n;n=s=>r({className:s,parseClassName:a})}return n},Vb=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let a=[];for(let s=0;s<r.length;s++){const i=r[s],l=i[0]==="[",u=t.has(i);l||u?(a.length>0&&(a.sort(),n.push(...a),a=[]),n.push(i)):a.push(i)}return a.length>0&&(a.sort(),n.push(...a)),n}},Wb=e=>({cache:$b(e.cacheSize),parseClassName:qb(e),sortModifiers:Vb(e),...Pb(e)}),Gb=/\s+/,Qb=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a,sortModifiers:s}=t,i=[],l=e.trim().split(Gb);let u="";for(let c=l.length-1;c>=0;c-=1){const d=l[c],{isExternal:f,modifiers:h,hasImportantModifier:g,baseClassName:b,maybePostfixModifierPosition:_}=r(d);if(f){u=d+(u.length>0?" "+u:u);continue}let A=!!_,y=n(A?b.substring(0,_):b);if(!y){if(!A){u=d+(u.length>0?" "+u:u);continue}if(y=n(b),!y){u=d+(u.length>0?" "+u:u);continue}A=!1}const S=h.length===0?"":h.length===1?h[0]:s(h).join(":"),L=g?S+ta:S,D=L+y;if(i.indexOf(D)>-1)continue;i.push(D);const P=a(y,A);for(let v=0;v<P.length;++v){const G=P[v];i.push(L+G)}u=d+(u.length>0?" "+u:u)}return u},Xb=(...e)=>{let t=0,r,n,a="";for(;t<e.length;)(r=e[t++])&&(n=Xo(r))&&(a&&(a+=" "),a+=n);return a},Xo=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Xo(e[n]))&&(r&&(r+=" "),r+=t);return r},Kb=(e,...t)=>{let r,n,a,s;const i=u=>{const c=t.reduce((d,f)=>f(d),e());return r=Wb(c),n=r.cache.get,a=r.cache.set,s=l,l(u)},l=u=>{const c=n(u);if(c)return c;const d=Qb(u,r);return a(u,d),d};return s=i,(...u)=>s(Xb(...u))},Zb=[],ie=e=>{const t=r=>r[e]||Zb;return t.isThemeGetter=!0,t},Ko=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Zo=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Jb=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,eg=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,tg=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,rg=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ng=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ag=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Qe=e=>Jb.test(e),$=e=>!!e&&!Number.isNaN(Number(e)),Xe=e=>!!e&&Number.isInteger(Number(e)),Ln=e=>e.endsWith("%")&&$(e.slice(0,-1)),Ue=e=>eg.test(e),Jo=()=>!0,sg=e=>tg.test(e)&&!rg.test(e),ja=()=>!1,ig=e=>ng.test(e),ug=e=>ag.test(e),og=e=>!M(e)&&!B(e),lg=e=>it(e,rl,ja),M=e=>Ko.test(e),ht=e=>it(e,nl,sg),ai=e=>it(e,gg,$),cg=e=>it(e,sl,Jo),dg=e=>it(e,al,ja),si=e=>it(e,el,ja),fg=e=>it(e,tl,ug),Or=e=>it(e,il,ig),B=e=>Zo.test(e),Gt=e=>_t(e,nl),hg=e=>_t(e,al),ii=e=>_t(e,el),pg=e=>_t(e,rl),mg=e=>_t(e,tl),Dr=e=>_t(e,il,!0),bg=e=>_t(e,sl,!0),it=(e,t,r)=>{const n=Ko.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},_t=(e,t,r=!1)=>{const n=Zo.exec(e);return n?n[1]?t(n[1]):r:!1},el=e=>e==="position"||e==="percentage",tl=e=>e==="image"||e==="url",rl=e=>e==="length"||e==="size"||e==="bg-size",nl=e=>e==="length",gg=e=>e==="number",al=e=>e==="family-name",sl=e=>e==="number"||e==="weight",il=e=>e==="shadow",Eg=()=>{const e=ie("color"),t=ie("font"),r=ie("text"),n=ie("font-weight"),a=ie("tracking"),s=ie("leading"),i=ie("breakpoint"),l=ie("container"),u=ie("spacing"),c=ie("radius"),d=ie("shadow"),f=ie("inset-shadow"),h=ie("text-shadow"),g=ie("drop-shadow"),b=ie("blur"),_=ie("perspective"),A=ie("aspect"),y=ie("ease"),S=ie("animate"),L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],P=()=>[...D(),B,M],v=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto","contain","none"],O=()=>[B,M,u],Q=()=>[Qe,"full","auto",...O()],N=()=>[Xe,"none","subgrid",B,M],K=()=>["auto",{span:["full",Xe,B,M]},Xe,B,M],ue=()=>[Xe,"auto",B,M],Re=()=>["auto","min","max","fr",B,M],z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],H=()=>["start","end","center","stretch","center-safe","end-safe"],F=()=>["auto",...O()],Z=()=>[Qe,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...O()],He=()=>[Qe,"screen","full","dvw","lvw","svw","min","max","fit",...O()],ut=()=>[Qe,"screen","full","lh","dvh","lvh","svh","min","max","fit",...O()],U=()=>[e,B,M],Ye=()=>[...D(),ii,si,{position:[B,M]}],Ir=()=>["no-repeat",{repeat:["","x","y","space","round"]}],zt=()=>["auto","cover","contain",pg,lg,{size:[B,M]}],be=()=>[Ln,Gt,ht],oe=()=>["","none","full",c,B,M],de=()=>["",$,Gt,ht],qe=()=>["solid","dashed","dotted","double"],Ve=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ne=()=>[$,Ln,ii,si],Sr=()=>["","none",b,B,M],ot=()=>["none",$,B,M],lt=()=>["none",$,B,M],Ct=()=>[$,B,M],ct=()=>[Qe,"full",...O()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ue],breakpoint:[Ue],color:[Jo],container:[Ue],"drop-shadow":[Ue],ease:["in","out","in-out"],font:[og],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ue],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ue],shadow:[Ue],spacing:["px",$],text:[Ue],"text-shadow":[Ue],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Qe,M,B,A]}],container:["container"],columns:[{columns:[$,M,B,l]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:P()}],overflow:[{overflow:v()}],"overflow-x":[{"overflow-x":v()}],"overflow-y":[{"overflow-y":v()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Q()}],"inset-x":[{"inset-x":Q()}],"inset-y":[{"inset-y":Q()}],start:[{"inset-s":Q(),start:Q()}],end:[{"inset-e":Q(),end:Q()}],"inset-bs":[{"inset-bs":Q()}],"inset-be":[{"inset-be":Q()}],top:[{top:Q()}],right:[{right:Q()}],bottom:[{bottom:Q()}],left:[{left:Q()}],visibility:["visible","invisible","collapse"],z:[{z:[Xe,"auto",B,M]}],basis:[{basis:[Qe,"full","auto",l,...O()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[$,Qe,"auto","initial","none",M]}],grow:[{grow:["",$,B,M]}],shrink:[{shrink:["",$,B,M]}],order:[{order:[Xe,"first","last","none",B,M]}],"grid-cols":[{"grid-cols":N()}],"col-start-end":[{col:K()}],"col-start":[{"col-start":ue()}],"col-end":[{"col-end":ue()}],"grid-rows":[{"grid-rows":N()}],"row-start-end":[{row:K()}],"row-start":[{"row-start":ue()}],"row-end":[{"row-end":ue()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Re()}],"auto-rows":[{"auto-rows":Re()}],gap:[{gap:O()}],"gap-x":[{"gap-x":O()}],"gap-y":[{"gap-y":O()}],"justify-content":[{justify:[...z(),"normal"]}],"justify-items":[{"justify-items":[...H(),"normal"]}],"justify-self":[{"justify-self":["auto",...H()]}],"align-content":[{content:["normal",...z()]}],"align-items":[{items:[...H(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...H(),{baseline:["","last"]}]}],"place-content":[{"place-content":z()}],"place-items":[{"place-items":[...H(),"baseline"]}],"place-self":[{"place-self":["auto",...H()]}],p:[{p:O()}],px:[{px:O()}],py:[{py:O()}],ps:[{ps:O()}],pe:[{pe:O()}],pbs:[{pbs:O()}],pbe:[{pbe:O()}],pt:[{pt:O()}],pr:[{pr:O()}],pb:[{pb:O()}],pl:[{pl:O()}],m:[{m:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mbs:[{mbs:F()}],mbe:[{mbe:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"space-x":[{"space-x":O()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":O()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],"inline-size":[{inline:["auto",...He()]}],"min-inline-size":[{"min-inline":["auto",...He()]}],"max-inline-size":[{"max-inline":["none",...He()]}],"block-size":[{block:["auto",...ut()]}],"min-block-size":[{"min-block":["auto",...ut()]}],"max-block-size":[{"max-block":["none",...ut()]}],w:[{w:[l,"screen",...Z()]}],"min-w":[{"min-w":[l,"screen","none",...Z()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[i]},...Z()]}],h:[{h:["screen","lh",...Z()]}],"min-h":[{"min-h":["screen","lh","none",...Z()]}],"max-h":[{"max-h":["screen","lh",...Z()]}],"font-size":[{text:["base",r,Gt,ht]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,bg,cg]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ln,M]}],"font-family":[{font:[hg,dg,t]}],"font-features":[{"font-features":[M]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,B,M]}],"line-clamp":[{"line-clamp":[$,"none",B,ai]}],leading:[{leading:[s,...O()]}],"list-image":[{"list-image":["none",B,M]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",B,M]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:U()}],"text-color":[{text:U()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...qe(),"wavy"]}],"text-decoration-thickness":[{decoration:[$,"from-font","auto",B,ht]}],"text-decoration-color":[{decoration:U()}],"underline-offset":[{"underline-offset":[$,"auto",B,M]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",B,M]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",B,M]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Ye()}],"bg-repeat":[{bg:Ir()}],"bg-size":[{bg:zt()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Xe,B,M],radial:["",B,M],conic:[Xe,B,M]},mg,fg]}],"bg-color":[{bg:U()}],"gradient-from-pos":[{from:be()}],"gradient-via-pos":[{via:be()}],"gradient-to-pos":[{to:be()}],"gradient-from":[{from:U()}],"gradient-via":[{via:U()}],"gradient-to":[{to:U()}],rounded:[{rounded:oe()}],"rounded-s":[{"rounded-s":oe()}],"rounded-e":[{"rounded-e":oe()}],"rounded-t":[{"rounded-t":oe()}],"rounded-r":[{"rounded-r":oe()}],"rounded-b":[{"rounded-b":oe()}],"rounded-l":[{"rounded-l":oe()}],"rounded-ss":[{"rounded-ss":oe()}],"rounded-se":[{"rounded-se":oe()}],"rounded-ee":[{"rounded-ee":oe()}],"rounded-es":[{"rounded-es":oe()}],"rounded-tl":[{"rounded-tl":oe()}],"rounded-tr":[{"rounded-tr":oe()}],"rounded-br":[{"rounded-br":oe()}],"rounded-bl":[{"rounded-bl":oe()}],"border-w":[{border:de()}],"border-w-x":[{"border-x":de()}],"border-w-y":[{"border-y":de()}],"border-w-s":[{"border-s":de()}],"border-w-e":[{"border-e":de()}],"border-w-bs":[{"border-bs":de()}],"border-w-be":[{"border-be":de()}],"border-w-t":[{"border-t":de()}],"border-w-r":[{"border-r":de()}],"border-w-b":[{"border-b":de()}],"border-w-l":[{"border-l":de()}],"divide-x":[{"divide-x":de()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":de()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...qe(),"hidden","none"]}],"divide-style":[{divide:[...qe(),"hidden","none"]}],"border-color":[{border:U()}],"border-color-x":[{"border-x":U()}],"border-color-y":[{"border-y":U()}],"border-color-s":[{"border-s":U()}],"border-color-e":[{"border-e":U()}],"border-color-bs":[{"border-bs":U()}],"border-color-be":[{"border-be":U()}],"border-color-t":[{"border-t":U()}],"border-color-r":[{"border-r":U()}],"border-color-b":[{"border-b":U()}],"border-color-l":[{"border-l":U()}],"divide-color":[{divide:U()}],"outline-style":[{outline:[...qe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[$,B,M]}],"outline-w":[{outline:["",$,Gt,ht]}],"outline-color":[{outline:U()}],shadow:[{shadow:["","none",d,Dr,Or]}],"shadow-color":[{shadow:U()}],"inset-shadow":[{"inset-shadow":["none",f,Dr,Or]}],"inset-shadow-color":[{"inset-shadow":U()}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:U()}],"ring-offset-w":[{"ring-offset":[$,ht]}],"ring-offset-color":[{"ring-offset":U()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":U()}],"text-shadow":[{"text-shadow":["none",h,Dr,Or]}],"text-shadow-color":[{"text-shadow":U()}],opacity:[{opacity:[$,B,M]}],"mix-blend":[{"mix-blend":[...Ve(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ve()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[$]}],"mask-image-linear-from-pos":[{"mask-linear-from":ne()}],"mask-image-linear-to-pos":[{"mask-linear-to":ne()}],"mask-image-linear-from-color":[{"mask-linear-from":U()}],"mask-image-linear-to-color":[{"mask-linear-to":U()}],"mask-image-t-from-pos":[{"mask-t-from":ne()}],"mask-image-t-to-pos":[{"mask-t-to":ne()}],"mask-image-t-from-color":[{"mask-t-from":U()}],"mask-image-t-to-color":[{"mask-t-to":U()}],"mask-image-r-from-pos":[{"mask-r-from":ne()}],"mask-image-r-to-pos":[{"mask-r-to":ne()}],"mask-image-r-from-color":[{"mask-r-from":U()}],"mask-image-r-to-color":[{"mask-r-to":U()}],"mask-image-b-from-pos":[{"mask-b-from":ne()}],"mask-image-b-to-pos":[{"mask-b-to":ne()}],"mask-image-b-from-color":[{"mask-b-from":U()}],"mask-image-b-to-color":[{"mask-b-to":U()}],"mask-image-l-from-pos":[{"mask-l-from":ne()}],"mask-image-l-to-pos":[{"mask-l-to":ne()}],"mask-image-l-from-color":[{"mask-l-from":U()}],"mask-image-l-to-color":[{"mask-l-to":U()}],"mask-image-x-from-pos":[{"mask-x-from":ne()}],"mask-image-x-to-pos":[{"mask-x-to":ne()}],"mask-image-x-from-color":[{"mask-x-from":U()}],"mask-image-x-to-color":[{"mask-x-to":U()}],"mask-image-y-from-pos":[{"mask-y-from":ne()}],"mask-image-y-to-pos":[{"mask-y-to":ne()}],"mask-image-y-from-color":[{"mask-y-from":U()}],"mask-image-y-to-color":[{"mask-y-to":U()}],"mask-image-radial":[{"mask-radial":[B,M]}],"mask-image-radial-from-pos":[{"mask-radial-from":ne()}],"mask-image-radial-to-pos":[{"mask-radial-to":ne()}],"mask-image-radial-from-color":[{"mask-radial-from":U()}],"mask-image-radial-to-color":[{"mask-radial-to":U()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":D()}],"mask-image-conic-pos":[{"mask-conic":[$]}],"mask-image-conic-from-pos":[{"mask-conic-from":ne()}],"mask-image-conic-to-pos":[{"mask-conic-to":ne()}],"mask-image-conic-from-color":[{"mask-conic-from":U()}],"mask-image-conic-to-color":[{"mask-conic-to":U()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Ye()}],"mask-repeat":[{mask:Ir()}],"mask-size":[{mask:zt()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",B,M]}],filter:[{filter:["","none",B,M]}],blur:[{blur:Sr()}],brightness:[{brightness:[$,B,M]}],contrast:[{contrast:[$,B,M]}],"drop-shadow":[{"drop-shadow":["","none",g,Dr,Or]}],"drop-shadow-color":[{"drop-shadow":U()}],grayscale:[{grayscale:["",$,B,M]}],"hue-rotate":[{"hue-rotate":[$,B,M]}],invert:[{invert:["",$,B,M]}],saturate:[{saturate:[$,B,M]}],sepia:[{sepia:["",$,B,M]}],"backdrop-filter":[{"backdrop-filter":["","none",B,M]}],"backdrop-blur":[{"backdrop-blur":Sr()}],"backdrop-brightness":[{"backdrop-brightness":[$,B,M]}],"backdrop-contrast":[{"backdrop-contrast":[$,B,M]}],"backdrop-grayscale":[{"backdrop-grayscale":["",$,B,M]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[$,B,M]}],"backdrop-invert":[{"backdrop-invert":["",$,B,M]}],"backdrop-opacity":[{"backdrop-opacity":[$,B,M]}],"backdrop-saturate":[{"backdrop-saturate":[$,B,M]}],"backdrop-sepia":[{"backdrop-sepia":["",$,B,M]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":O()}],"border-spacing-x":[{"border-spacing-x":O()}],"border-spacing-y":[{"border-spacing-y":O()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",B,M]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[$,"initial",B,M]}],ease:[{ease:["linear","initial",y,B,M]}],delay:[{delay:[$,B,M]}],animate:[{animate:["none",S,B,M]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[_,B,M]}],"perspective-origin":[{"perspective-origin":P()}],rotate:[{rotate:ot()}],"rotate-x":[{"rotate-x":ot()}],"rotate-y":[{"rotate-y":ot()}],"rotate-z":[{"rotate-z":ot()}],scale:[{scale:lt()}],"scale-x":[{"scale-x":lt()}],"scale-y":[{"scale-y":lt()}],"scale-z":[{"scale-z":lt()}],"scale-3d":["scale-3d"],skew:[{skew:Ct()}],"skew-x":[{"skew-x":Ct()}],"skew-y":[{"skew-y":Ct()}],transform:[{transform:[B,M,"","none","gpu","cpu"]}],"transform-origin":[{origin:P()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ct()}],"translate-x":[{"translate-x":ct()}],"translate-y":[{"translate-y":ct()}],"translate-z":[{"translate-z":ct()}],"translate-none":["translate-none"],accent:[{accent:U()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:U()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",B,M]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mbs":[{"scroll-mbs":O()}],"scroll-mbe":[{"scroll-mbe":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pbs":[{"scroll-pbs":O()}],"scroll-pbe":[{"scroll-pbe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",B,M]}],fill:[{fill:["none",...U()]}],"stroke-w":[{stroke:[$,Gt,ht,ai]}],stroke:[{stroke:["none",...U()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},ul=Kb(Eg),Tg=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,kg=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,xg={};function ui(e,t){return(xg.jsx?kg:Tg).test(e)}const Ag=/[ \t\n\f\r]/g;function _g(e){return typeof e=="object"?e.type==="text"?oi(e.value):!1:oi(e)}function oi(e){return e.replace(Ag,"")===""}var It={},Rn,li;function yg(){if(li)return Rn;li=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,n=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,i=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
|
|
40
|
+
`,c="/",d="*",f="",h="comment",g="declaration";function b(A,y){if(typeof A!="string")throw new TypeError("First argument must be a string");if(!A)return[];y=y||{};var S=1,L=1;function D(z){var H=z.match(t);H&&(S+=H.length);var F=z.lastIndexOf(u);L=~F?z.length-F:L+z.length}function P(){var z={line:S,column:L};return function(H){return H.position=new v(z),Q(),H}}function v(z){this.start=z,this.end={line:S,column:L},this.source=y.source}v.prototype.content=A;function G(z){var H=new Error(y.source+":"+S+":"+L+": "+z);if(H.reason=z,H.filename=y.source,H.line=S,H.column=L,H.source=A,!y.silent)throw H}function O(z){var H=z.exec(A);if(H){var F=H[0];return D(F),A=A.slice(F.length),H}}function Q(){O(r)}function N(z){var H;for(z=z||[];H=K();)H!==!1&&z.push(H);return z}function K(){var z=P();if(!(c!=A.charAt(0)||d!=A.charAt(1))){for(var H=2;f!=A.charAt(H)&&(d!=A.charAt(H)||c!=A.charAt(H+1));)++H;if(H+=2,f===A.charAt(H-1))return G("End of comment missing");var F=A.slice(2,H-2);return L+=2,D(F),A=A.slice(H),L+=2,z({type:h,comment:F})}}function ue(){var z=P(),H=O(n);if(H){if(K(),!O(a))return G("property missing ':'");var F=O(s),Z=z({type:g,property:_(H[0].replace(e,f)),value:F?_(F[0].replace(e,f)):f});return O(i),Z}}function Re(){var z=[];N(z);for(var H;H=ue();)H!==!1&&(z.push(H),N(z));return z}return Q(),Re()}function _(A){return A?A.replace(l,f):f}return Rn=b,Rn}var ci;function Cg(){if(ci)return It;ci=1;var e=It&&It.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(It,"__esModule",{value:!0}),It.default=r;const t=e(yg());function r(n,a){let s=null;if(!n||typeof n!="string")return s;const i=(0,t.default)(n),l=typeof a=="function";return i.forEach(u=>{if(u.type!=="declaration")return;const{property:c,value:d}=u;l?a(c,d,u):d&&(s=s||{},s[c]=d)}),s}return It}var Qt={},di;function Ng(){if(di)return Qt;di=1,Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,r=/^[^-]+$/,n=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,s=function(c){return!c||r.test(c)||e.test(c)},i=function(c,d){return d.toUpperCase()},l=function(c,d){return"".concat(d,"-")},u=function(c,d){return d===void 0&&(d={}),s(c)?c:(c=c.toLowerCase(),d.reactCompat?c=c.replace(a,l):c=c.replace(n,l),c.replace(t,i))};return Qt.camelCase=u,Qt}var Xt,fi;function Ig(){if(fi)return Xt;fi=1;var e=Xt&&Xt.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(Cg()),r=Ng();function n(a,s){var i={};return!a||typeof a!="string"||(0,t.default)(a,function(l,u){l&&u&&(i[(0,r.camelCase)(l,s)]=u)}),i}return n.default=n,Xt=n,Xt}var Sg=Ig();const wg=Ji(Sg);class he extends Error{constructor(t,r,n){super(),typeof r=="string"&&(n=r,r=void 0);let a="",s={},i=!1;if(r&&("line"in r&&"column"in r?s={place:r}:"start"in r&&"end"in r?s={place:r}:"type"in r?s={ancestors:[r],place:r.position}:s={...r}),typeof t=="string"?a=t:!s.cause&&t&&(i=!0,a=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof n=="string"){const u=n.indexOf(":");u===-1?s.ruleId=n:(s.source=n.slice(0,u),s.ruleId=n.slice(u+1))}if(!s.place&&s.ancestors&&s.ancestors){const u=s.ancestors[s.ancestors.length-1];u&&(s.place=u.position)}const l=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=l?l.line:void 0,this.name=bc(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=i&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}he.prototype.file="";he.prototype.name="";he.prototype.reason="";he.prototype.message="";he.prototype.stack="";he.prototype.column=void 0;he.prototype.line=void 0;he.prototype.ancestors=void 0;he.prototype.cause=void 0;he.prototype.fatal=void 0;he.prototype.place=void 0;he.prototype.ruleId=void 0;he.prototype.source=void 0;const za={}.hasOwnProperty,Lg=new Map,Rg=/[A-Z]/g,Og=new Set(["table","tbody","thead","tfoot","tr"]),Dg=new Set(["td","th"]),ol="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Pg(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let n;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=zg(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=jg(r,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:n,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?st:xr,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=ll(a,e,void 0);return s&&typeof s!="string"?s:a.create(e,a.Fragment,{children:s||void 0},void 0)}function ll(e,t,r){if(t.type==="element")return vg(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Mg(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Fg(e,t,r);if(t.type==="mdxjsEsm")return Bg(e,t);if(t.type==="root")return Hg(e,t,r);if(t.type==="text")return Ug(e,t)}function vg(e,t,r){const n=e.schema;let a=n;t.tagName.toLowerCase()==="svg"&&n.space==="html"&&(a=st,e.schema=a),e.ancestors.push(t);const s=dl(e,t.tagName,!1),i=$g(e,t);let l=Ya(e,t);return Og.has(t.tagName)&&(l=l.filter(function(u){return typeof u=="string"?!_g(u):!0})),cl(e,i,s,t),$a(i,l),e.ancestors.pop(),e.schema=n,e.create(t,s,i,r)}function Mg(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}gr(e,t.position)}function Bg(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);gr(e,t.position)}function Fg(e,t,r){const n=e.schema;let a=n;t.name==="svg"&&n.space==="html"&&(a=st,e.schema=a),e.ancestors.push(t);const s=t.name===null?e.Fragment:dl(e,t.name,!0),i=Yg(e,t),l=Ya(e,t);return cl(e,i,s,t),$a(i,l),e.ancestors.pop(),e.schema=n,e.create(t,s,i,r)}function Hg(e,t,r){const n={};return $a(n,Ya(e,t)),e.create(t,e.Fragment,n,r)}function Ug(e,t){return t.value}function cl(e,t,r,n){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=n)}function $a(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function jg(e,t,r){return n;function n(a,s,i,l){const c=Array.isArray(i.children)?r:t;return l?c(s,i,l):c(s,i)}}function zg(e,t){return r;function r(n,a,s,i){const l=Array.isArray(s.children),u=Be(n);return t(a,s,i,l,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function $g(e,t){const r={};let n,a;for(a in t.properties)if(a!=="children"&&za.call(t.properties,a)){const s=qg(e,a,t.properties[a]);if(s){const[i,l]=s;e.tableCellAlignToStyle&&i==="align"&&typeof l=="string"&&Dg.has(t.tagName)?n=l:r[i]=l}}if(n){const s=r.style||(r.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return r}function Yg(e,t){const r={};for(const n of t.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&e.evaluater){const s=n.data.estree.body[0];s.type;const i=s.expression;i.type;const l=i.properties[0];l.type,Object.assign(r,e.evaluater.evaluateExpression(l.argument))}else gr(e,t.position);else{const a=n.name;let s;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&e.evaluater){const l=n.value.data.estree.body[0];l.type,s=e.evaluater.evaluateExpression(l.expression)}else gr(e,t.position);else s=n.value===null?!0:n.value;r[a]=s}return r}function Ya(e,t){const r=[];let n=-1;const a=e.passKeys?new Map:Lg;for(;++n<t.children.length;){const s=t.children[n];let i;if(e.passKeys){const u=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(u){const c=a.get(u)||0;i=u+"-"+c,a.set(u,c+1)}}const l=ll(e,s,i);l!==void 0&&r.push(l)}return r}function qg(e,t,r){const n=on(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=n.commaSeparated?_u(r):yu(r)),n.property==="style"){let a=typeof r=="object"?r:Vg(e,String(r));return e.stylePropertyNameCase==="css"&&(a=Wg(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&n.space?$d[n.property]||n.property:n.attribute,r]}}function Vg(e,t){try{return wg(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const n=r,a=new he("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=ol+"#cannot-parse-style-attribute",a}}function dl(e,t,r){let n;if(!r)n={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let s=-1,i;for(;++s<a.length;){const l=ui(a[s])?{type:"Identifier",name:a[s]}:{type:"Literal",value:a[s]};i=i?{type:"MemberExpression",object:i,property:l,computed:!!(s&&l.type==="Literal"),optional:!1}:l}n=i}else n=ui(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(n.type==="Literal"){const a=n.value;return za.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(n);gr(e)}function gr(e,t){const r=new he("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=ol+"#cannot-handle-mdx-estrees-without-createevaluater",r}function Wg(e){const t={};let r;for(r in e)za.call(e,r)&&(t[Gg(r)]=e[r]);return t}function Gg(e){let t=e.replace(Rg,Qg);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Qg(e){return"-"+e.toLowerCase()}const On={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]};function Xg(e){const t=this;t.parser=r;function r(n){return gc(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Kg(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function Zg(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
|
|
41
|
+
`}]}function Jg(e,t){const r=t.value?t.value+`
|
|
42
|
+
`:"",n={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(n.className=["language-"+a[0]]);let s={type:"element",tagName:"code",properties:n,children:[{type:"text",value:r}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function eE(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function tE(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function rE(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=String(t.identifier).toUpperCase(),a=jt(n.toLowerCase()),s=e.footnoteOrder.indexOf(n);let i,l=e.footnoteCounts.get(n);l===void 0?(l=0,e.footnoteOrder.push(n),i=e.footnoteOrder.length):i=s+1,l+=1,e.footnoteCounts.set(n,l);const u={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+a,id:r+"fnref-"+a+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(i)}]};e.patch(t,u);const c={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,c),e.applyData(t,c)}function nE(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function aE(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function fl(e,t){const r=t.referenceType;let n="]";if(r==="collapsed"?n+="[]":r==="full"&&(n+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+n}];const a=e.all(t),s=a[0];s&&s.type==="text"?s.value="["+s.value:a.unshift({type:"text",value:"["});const i=a[a.length-1];return i&&i.type==="text"?i.value+=n:a.push({type:"text",value:n}),a}function sE(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return fl(e,t);const a={src:jt(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(a.title=n.title);const s={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,s),e.applyData(t,s)}function iE(e,t){const r={src:jt(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,n),e.applyData(t,n)}function uE(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const n={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,n),e.applyData(t,n)}function oE(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return fl(e,t);const a={href:jt(n.url||"")};n.title!==null&&n.title!==void 0&&(a.title=n.title);const s={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function lE(e,t){const r={href:jt(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function cE(e,t,r){const n=e.all(t),a=r?dE(r):hl(t),s={},i=[];if(typeof t.checked=="boolean"){const d=n[0];let f;d&&d.type==="element"&&d.tagName==="p"?f=d:(f={type:"element",tagName:"p",properties:{},children:[]},n.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let l=-1;for(;++l<n.length;){const d=n[l];(a||l!==0||d.type!=="element"||d.tagName!=="p")&&i.push({type:"text",value:`
|
|
43
|
+
`}),d.type==="element"&&d.tagName==="p"&&!a?i.push(...d.children):i.push(d)}const u=n[n.length-1];u&&(a||u.type!=="element"||u.tagName!=="p")&&i.push({type:"text",value:`
|
|
44
|
+
`});const c={type:"element",tagName:"li",properties:s,children:i};return e.patch(t,c),e.applyData(t,c)}function dE(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const r=e.children;let n=-1;for(;!t&&++n<r.length;)t=hl(r[n])}return t}function hl(e){const t=e.spread;return t??e.children.length>1}function fE(e,t){const r={},n=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++a<n.length;){const i=n[a];if(i.type==="element"&&i.tagName==="li"&&i.properties&&Array.isArray(i.properties.className)&&i.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(n,!0)};return e.patch(t,s),e.applyData(t,s)}function hE(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function pE(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function mE(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function bE(e,t){const r=e.all(t),n=r.shift(),a=[];if(n){const i={type:"element",tagName:"thead",properties:{},children:e.wrap([n],!0)};e.patch(t.children[0],i),a.push(i)}if(r.length>0){const i={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},l=Be(t.children[1]),u=hn(t.children[t.children.length-1]);l&&u&&(i.position={start:l,end:u}),a.push(i)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,s),e.applyData(t,s)}function gE(e,t,r){const n=r?r.children:void 0,s=(n?n.indexOf(t):1)===0?"th":"td",i=r&&r.type==="table"?r.align:void 0,l=i?i.length:t.children.length;let u=-1;const c=[];for(;++u<l;){const f=t.children[u],h={},g=i?i[u]:void 0;g&&(h.align=g);let b={type:"element",tagName:s,properties:h,children:[]};f&&(b.children=e.all(f),e.patch(f,b),b=e.applyData(f,b)),c.push(b)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,d),e.applyData(t,d)}function EE(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}const hi=9,pi=32;function TE(e){const t=String(e),r=/\r?\n|\r/g;let n=r.exec(t),a=0;const s=[];for(;n;)s.push(mi(t.slice(a,n.index),a>0,!0),n[0]),a=n.index+n[0].length,n=r.exec(t);return s.push(mi(t.slice(a),a>0,!1)),s.join("")}function mi(e,t,r){let n=0,a=e.length;if(t){let s=e.codePointAt(n);for(;s===hi||s===pi;)n++,s=e.codePointAt(n)}if(r){let s=e.codePointAt(a-1);for(;s===hi||s===pi;)a--,s=e.codePointAt(a-1)}return a>n?e.slice(n,a):""}function kE(e,t){const r={type:"text",value:TE(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function xE(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const AE={blockquote:Kg,break:Zg,code:Jg,delete:eE,emphasis:tE,footnoteReference:rE,heading:nE,html:aE,imageReference:sE,image:iE,inlineCode:uE,linkReference:oE,link:lE,listItem:cE,list:fE,paragraph:hE,root:pE,strong:mE,table:bE,tableCell:EE,tableRow:gE,text:kE,thematicBreak:xE,toml:Pr,yaml:Pr,definition:Pr,footnoteDefinition:Pr};function Pr(){}function _E(e,t){const r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function yE(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function CE(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||_E,n=e.options.footnoteBackLabel||yE,a=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",i=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let u=-1;for(;++u<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[u]);if(!c)continue;const d=e.all(c),f=String(c.identifier).toUpperCase(),h=jt(f.toLowerCase());let g=0;const b=[],_=e.footnoteCounts.get(f);for(;_!==void 0&&++g<=_;){b.length>0&&b.push({type:"text",value:" "});let S=typeof r=="string"?r:r(u,g);typeof S=="string"&&(S={type:"text",value:S}),b.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(g>1?"-"+g:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(u,g),className:["data-footnote-backref"]},children:Array.isArray(S)?S:[S]})}const A=d[d.length-1];if(A&&A.type==="element"&&A.tagName==="p"){const S=A.children[A.children.length-1];S&&S.type==="text"?S.value+=" ":A.children.push({type:"text",value:" "}),A.children.push(...b)}else d.push(...b);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(d,!0)};e.patch(c,y),l.push(y)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Et(i),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
|
|
45
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
|
|
46
|
+
`}]}}const ra={}.hasOwnProperty,NE={};function IE(e,t){const r=t||NE,n=new Map,a=new Map,s=new Map,i={...AE,...r.handlers},l={all:c,applyData:wE,definitionById:n,footnoteById:a,footnoteCounts:s,footnoteOrder:[],handlers:i,one:u,options:r,patch:SE,wrap:RE};return Me(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const f=d.type==="definition"?n:a,h=String(d.identifier).toUpperCase();f.has(h)||f.set(h,d)}}),l;function u(d,f){const h=d.type,g=l.handlers[h];if(ra.call(l.handlers,h)&&g)return g(l,d,f);if(l.options.passThrough&&l.options.passThrough.includes(h)){if("children"in d){const{children:_,...A}=d,y=Et(A);return y.children=l.all(d),y}return Et(d)}return(l.options.unknownHandler||LE)(l,d,f)}function c(d){const f=[];if("children"in d){const h=d.children;let g=-1;for(;++g<h.length;){const b=l.one(h[g],d);if(b){if(g&&h[g-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=bi(b.value)),!Array.isArray(b)&&b.type==="element")){const _=b.children[0];_&&_.type==="text"&&(_.value=bi(_.value))}Array.isArray(b)?f.push(...b):f.push(b)}}}return f}}function SE(e,t){e.position&&(t.position=ao(e))}function wE(e,t){let r=t;if(e&&e.data){const n=e.data.hName,a=e.data.hChildren,s=e.data.hProperties;if(typeof n=="string")if(r.type==="element")r.tagName=n;else{const i="children"in r?r.children:[r];r={type:"element",tagName:n,properties:{},children:i}}r.type==="element"&&s&&Object.assign(r.properties,Et(s)),"children"in r&&r.children&&a!==null&&a!==void 0&&(r.children=a)}return r}function LE(e,t){const r=t.data||{},n="value"in t&&!(ra.call(r,"hProperties")||ra.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function RE(e,t){const r=[];let n=-1;for(t&&r.push({type:"text",value:`
|
|
47
|
+
`});++n<e.length;)n&&r.push({type:"text",value:`
|
|
48
|
+
`}),r.push(e[n]);return t&&e.length>0&&r.push({type:"text",value:`
|
|
49
|
+
`}),r}function bi(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function gi(e,t){const r=IE(e,t),n=r.one(e,void 0),a=CE(r),s=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return a&&s.children.push({type:"text",value:`
|
|
50
|
+
`},a),s}function OE(e,t){return e&&"run"in e?async function(r,n){const a=gi(r,{file:n,...t});await e.run(a,n)}:function(r,n){return gi(r,{file:n,...e||t})}}function Ei(e){if(e)throw e}var Dn,Ti;function DE(){if(Ti)return Dn;Ti=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,a=function(c){return typeof Array.isArray=="function"?Array.isArray(c):t.call(c)==="[object Array]"},s=function(c){if(!c||t.call(c)!=="[object Object]")return!1;var d=e.call(c,"constructor"),f=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!d&&!f)return!1;var h;for(h in c);return typeof h>"u"||e.call(c,h)},i=function(c,d){r&&d.name==="__proto__"?r(c,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):c[d.name]=d.newValue},l=function(c,d){if(d==="__proto__")if(e.call(c,d)){if(n)return n(c,d).value}else return;return c[d]};return Dn=function u(){var c,d,f,h,g,b,_=arguments[0],A=1,y=arguments.length,S=!1;for(typeof _=="boolean"&&(S=_,_=arguments[1]||{},A=2),(_==null||typeof _!="object"&&typeof _!="function")&&(_={});A<y;++A)if(c=arguments[A],c!=null)for(d in c)f=l(_,d),h=l(c,d),_!==h&&(S&&h&&(s(h)||(g=a(h)))?(g?(g=!1,b=f&&a(f)?f:[]):b=f&&s(f)?f:{},i(_,{name:d,newValue:u(S,b,h)})):typeof h<"u"&&i(_,{name:d,newValue:h}));return _},Dn}var PE=DE();const Pn=Ji(PE);function na(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 vE(){const e=[],t={run:r,use:n};return t;function r(...a){let s=-1;const i=a.pop();if(typeof i!="function")throw new TypeError("Expected function as last argument, not "+i);l(null,...a);function l(u,...c){const d=e[++s];let f=-1;if(u){i(u);return}for(;++f<a.length;)(c[f]===null||c[f]===void 0)&&(c[f]=a[f]);a=c,d?ME(d,l)(...c):i(null,...c)}}function n(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function ME(e,t){let r;return n;function n(...i){const l=e.length>i.length;let u;l&&i.push(a);try{u=e.apply(this,i)}catch(c){const d=c;if(l&&r)throw d;return a(d)}l||(u&&u.then&&typeof u.then=="function"?u.then(s,a):u instanceof Error?a(u):s(u))}function a(i,...l){r||(r=!0,t(i,...l))}function s(i){a(null,i)}}const De={basename:BE,dirname:FE,extname:HE,join:UE,sep:"/"};function BE(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Cr(e);let r=0,n=-1,a=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(s){r=a+1;break}}else n<0&&(s=!0,n=a+1);return n<0?"":e.slice(r,n)}if(t===e)return"";let i=-1,l=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(s){r=a+1;break}}else i<0&&(s=!0,i=a+1),l>-1&&(e.codePointAt(a)===t.codePointAt(l--)?l<0&&(n=a):(l=-1,n=i));return r===n?n=i:n<0&&(n=e.length),e.slice(r,n)}function FE(e){if(Cr(e),e.length===0)return".";let t=-1,r=e.length,n;for(;--r;)if(e.codePointAt(r)===47){if(n){t=r;break}}else n||(n=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function HE(e){Cr(e);let t=e.length,r=-1,n=0,a=-1,s=0,i;for(;t--;){const l=e.codePointAt(t);if(l===47){if(i){n=t+1;break}continue}r<0&&(i=!0,r=t+1),l===46?a<0?a=t:s!==1&&(s=1):a>-1&&(s=-1)}return a<0||r<0||s===0||s===1&&a===r-1&&a===n+1?"":e.slice(a,r)}function UE(...e){let t=-1,r;for(;++t<e.length;)Cr(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":jE(r)}function jE(e){Cr(e);const t=e.codePointAt(0)===47;let r=zE(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function zE(e,t){let r="",n=0,a=-1,s=0,i=-1,l,u;for(;++i<=e.length;){if(i<e.length)l=e.codePointAt(i);else{if(l===47)break;l=47}if(l===47){if(!(a===i-1||s===1))if(a!==i-1&&s===2){if(r.length<2||n!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(u=r.lastIndexOf("/"),u!==r.length-1){u<0?(r="",n=0):(r=r.slice(0,u),n=r.length-1-r.lastIndexOf("/")),a=i,s=0;continue}}else if(r.length>0){r="",n=0,a=i,s=0;continue}}t&&(r=r.length>0?r+"/..":"..",n=2)}else r.length>0?r+="/"+e.slice(a+1,i):r=e.slice(a+1,i),n=i-a-1;a=i,s=0}else l===46&&s>-1?s++:s=-1}return r}function Cr(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const $E={cwd:YE};function YE(){return"/"}function aa(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function qE(e){if(typeof e=="string")e=new URL(e);else if(!aa(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 VE(e)}function VE(e){if(e.hostname!==""){const n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const n=t.codePointAt(r+2);if(n===70||n===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(t)}const vn=["history","path","basename","stem","extname","dirname"];class WE{constructor(t){let r;t?aa(t)?r={path:t}:typeof t=="string"||GE(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":$E.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<vn.length;){const s=vn[n];s in r&&r[s]!==void 0&&r[s]!==null&&(this[s]=s==="history"?[...r[s]]:r[s])}let a;for(a in r)vn.includes(a)||(this[a]=r[a])}get basename(){return typeof this.path=="string"?De.basename(this.path):void 0}set basename(t){Bn(t,"basename"),Mn(t,"basename"),this.path=De.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?De.dirname(this.path):void 0}set dirname(t){ki(this.basename,"dirname"),this.path=De.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?De.extname(this.path):void 0}set extname(t){if(Mn(t,"extname"),ki(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=De.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){aa(t)&&(t=qE(t)),Bn(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?De.basename(this.path,this.extname):void 0}set stem(t){Bn(t,"stem"),Mn(t,"stem"),this.path=De.join(this.dirname||"",t+(this.extname||""))}fail(t,r,n){const a=this.message(t,r,n);throw a.fatal=!0,a}info(t,r,n){const a=this.message(t,r,n);return a.fatal=void 0,a}message(t,r,n){const a=new he(t,r,n);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Mn(e,t){if(e&&e.includes(De.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+De.sep+"`")}function Bn(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ki(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function GE(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const QE=(function(e){const n=this.constructor.prototype,a=n[e],s=function(){return a.apply(s,arguments)};return Object.setPrototypeOf(s,n),s}),XE={}.hasOwnProperty;class qa extends QE{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=vE()}copy(){const t=new qa;let r=-1;for(;++r<this.attachers.length;){const n=this.attachers[r];t.use(...n)}return t.data(Pn(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(Un("data",this.frozen),this.namespace[t]=r,this):XE.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Un("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[r,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);const a=r.call(t,...n);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=vr(t),n=this.parser||this.Parser;return Fn("parse",n),n(String(r),r)}process(t,r){const n=this;return this.freeze(),Fn("process",this.parser||this.Parser),Hn("process",this.compiler||this.Compiler),r?a(void 0,r):new Promise(a);function a(s,i){const l=vr(t),u=n.parse(l);n.run(u,l,function(d,f,h){if(d||!f||!h)return c(d);const g=f,b=n.stringify(g,h);JE(b)?h.value=b:h.result=b,c(d,h)});function c(d,f){d||!f?i(d):s?s(f):r(void 0,f)}}}processSync(t){let r=!1,n;return this.freeze(),Fn("processSync",this.parser||this.Parser),Hn("processSync",this.compiler||this.Compiler),this.process(t,a),Ai("processSync","process",r),n;function a(s,i){r=!0,Ei(s),n=i}}run(t,r,n){xi(t),this.freeze();const a=this.transformers;return!n&&typeof r=="function"&&(n=r,r=void 0),n?s(void 0,n):new Promise(s);function s(i,l){const u=vr(r);a.run(t,u,c);function c(d,f,h){const g=f||t;d?l(d):i?i(g):n(void 0,g,h)}}}runSync(t,r){let n=!1,a;return this.run(t,r,s),Ai("runSync","run",n),a;function s(i,l){Ei(i),a=l,n=!0}}stringify(t,r){this.freeze();const n=vr(r),a=this.compiler||this.Compiler;return Hn("stringify",a),xi(t),a(t,n)}use(t,...r){const n=this.attachers,a=this.namespace;if(Un("use",this.frozen),t!=null)if(typeof t=="function")u(t,r);else if(typeof t=="object")Array.isArray(t)?l(t):i(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(c){if(typeof c=="function")u(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[d,...f]=c;u(d,f)}else i(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function i(c){if(!("plugins"in c)&&!("settings"in c))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");l(c.plugins),c.settings&&(a.settings=Pn(!0,a.settings,c.settings))}function l(c){let d=-1;if(c!=null)if(Array.isArray(c))for(;++d<c.length;){const f=c[d];s(f)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function u(c,d){let f=-1,h=-1;for(;++f<n.length;)if(n[f][0]===c){h=f;break}if(h===-1)n.push([c,...d]);else if(d.length>0){let[g,...b]=d;const _=n[h][1];na(_)&&na(g)&&(g=Pn(!0,_,g)),n[h]=[c,g,...b]}}}}const KE=new qa().freeze();function Fn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Hn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Un(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 xi(e){if(!na(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ai(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function vr(e){return ZE(e)?e:new WE(e)}function ZE(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function JE(e){return typeof e=="string"||e2(e)}function e2(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function Va(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var yt=Va();function pl(e){yt=e}var mt={exec:()=>null};function W(e,t=""){let r=typeof e=="string"?e:e.source,n={replace:(a,s)=>{let i=typeof s=="string"?s:s.source;return i=i.replace(pe.caret,"$1"),r=r.replace(a,i),n},getRegex:()=>new RegExp(r,t)};return n}var t2=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),pe={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},r2=/^(?:[ \t]*(?:\n|$))+/,n2=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,a2=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Nr=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,s2=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Wa=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,ml=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,bl=W(ml).replace(/bull/g,Wa).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),i2=W(ml).replace(/bull/g,Wa).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ga=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,u2=/^[^\n]+/,Qa=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,o2=W(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Qa).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),l2=W(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Wa).getRegex(),mn="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Xa=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,c2=W("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Xa).replace("tag",mn).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),gl=W(Ga).replace("hr",Nr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",mn).getRegex(),d2=W(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",gl).getRegex(),Ka={blockquote:d2,code:n2,def:o2,fences:a2,heading:s2,hr:Nr,html:c2,lheading:bl,list:l2,newline:r2,paragraph:gl,table:mt,text:u2},_i=W("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Nr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",mn).getRegex(),f2={...Ka,lheading:i2,table:_i,paragraph:W(Ga).replace("hr",Nr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",_i).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",mn).getRegex()},h2={...Ka,html:W(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Xa).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:mt,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:W(Ga).replace("hr",Nr).replace("heading",` *#{1,6} *[^
|
|
51
|
+
]`).replace("lheading",bl).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},p2=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,m2=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,El=/^( {2,}|\\)\n(?!\s*$)/,b2=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,bn=/[\p{P}\p{S}]/u,Za=/[\s\p{P}\p{S}]/u,Tl=/[^\s\p{P}\p{S}]/u,g2=W(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Za).getRegex(),kl=/(?!~)[\p{P}\p{S}]/u,E2=/(?!~)[\s\p{P}\p{S}]/u,T2=/(?:[^\s\p{P}\p{S}]|~)/u,xl=/(?![*_])[\p{P}\p{S}]/u,k2=/(?![*_])[\s\p{P}\p{S}]/u,x2=/(?:[^\s\p{P}\p{S}]|[*_])/u,A2=W(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",t2?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Al=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,_2=W(Al,"u").replace(/punct/g,bn).getRegex(),y2=W(Al,"u").replace(/punct/g,kl).getRegex(),_l="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",C2=W(_l,"gu").replace(/notPunctSpace/g,Tl).replace(/punctSpace/g,Za).replace(/punct/g,bn).getRegex(),N2=W(_l,"gu").replace(/notPunctSpace/g,T2).replace(/punctSpace/g,E2).replace(/punct/g,kl).getRegex(),I2=W("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Tl).replace(/punctSpace/g,Za).replace(/punct/g,bn).getRegex(),S2=W(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,xl).getRegex(),w2="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",L2=W(w2,"gu").replace(/notPunctSpace/g,x2).replace(/punctSpace/g,k2).replace(/punct/g,xl).getRegex(),R2=W(/\\(punct)/,"gu").replace(/punct/g,bn).getRegex(),O2=W(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),D2=W(Xa).replace("(?:-->|$)","-->").getRegex(),P2=W("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",D2).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),en=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,v2=W(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",en).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),yl=W(/^!?\[(label)\]\[(ref)\]/).replace("label",en).replace("ref",Qa).getRegex(),Cl=W(/^!?\[(ref)\](?:\[\])?/).replace("ref",Qa).getRegex(),M2=W("reflink|nolink(?!\\()","g").replace("reflink",yl).replace("nolink",Cl).getRegex(),yi=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ja={_backpedal:mt,anyPunctuation:R2,autolink:O2,blockSkip:A2,br:El,code:m2,del:mt,delLDelim:mt,delRDelim:mt,emStrongLDelim:_2,emStrongRDelimAst:C2,emStrongRDelimUnd:I2,escape:p2,link:v2,nolink:Cl,punctuation:g2,reflink:yl,reflinkSearch:M2,tag:P2,text:b2,url:mt},B2={...Ja,link:W(/^!?\[(label)\]\((.*?)\)/).replace("label",en).getRegex(),reflink:W(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",en).getRegex()},sa={...Ja,emStrongRDelimAst:N2,emStrongLDelim:y2,delLDelim:S2,delRDelim:L2,url:W(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",yi).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:W(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",yi).getRegex()},F2={...sa,br:W(El).replace("{2,}","*").getRegex(),text:W(sa.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Mr={normal:Ka,gfm:f2,pedantic:h2},Kt={normal:Ja,gfm:sa,breaks:F2,pedantic:B2},H2={"&":"&","<":"<",">":">",'"':""","'":"'"},Ci=e=>H2[e];function Oe(e,t){if(t){if(pe.escapeTest.test(e))return e.replace(pe.escapeReplace,Ci)}else if(pe.escapeTestNoEncode.test(e))return e.replace(pe.escapeReplaceNoEncode,Ci);return e}function Ni(e){try{e=encodeURI(e).replace(pe.percentDecode,"%")}catch{return null}return e}function Ii(e,t){let r=e.replace(pe.findPipe,(s,i,l)=>{let u=!1,c=i;for(;--c>=0&&l[c]==="\\";)u=!u;return u?"|":" |"}),n=r.split(pe.splitPipe),a=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;a<n.length;a++)n[a]=n[a].trim().replace(pe.slashPipe,"|");return n}function Zt(e,t,r){let n=e.length;if(n===0)return"";let a=0;for(;a<n&&e.charAt(n-a-1)===t;)a++;return e.slice(0,n-a)}function U2(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let n=0;n<e.length;n++)if(e[n]==="\\")n++;else if(e[n]===t[0])r++;else if(e[n]===t[1]&&(r--,r<0))return n;return r>0?-2:-1}function j2(e,t=0){let r=t,n="";for(let a of e)if(a===" "){let s=4-r%4;n+=" ".repeat(s),r+=s}else n+=a,r++;return n}function Si(e,t,r,n,a){let s=t.href,i=t.title||null,l=e[1].replace(a.other.outputLinkReplace,"$1");n.state.inLink=!0;let u={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:s,title:i,text:l,tokens:n.inlineTokens(l)};return n.state.inLink=!1,u}function z2(e,t,r){let n=e.match(r.other.indentCodeCompensation);if(n===null)return t;let a=n[1];return t.split(`
|
|
52
|
+
`).map(s=>{let i=s.match(r.other.beginningSpace);if(i===null)return s;let[l]=i;return l.length>=a.length?s.slice(a.length):s}).join(`
|
|
53
|
+
`)}var tn=class{options;rules;lexer;constructor(e){this.options=e||yt}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let r=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Zt(r,`
|
|
54
|
+
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let r=t[0],n=z2(r,t[3]||"",this.rules);return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let r=t[2].trim();if(this.rules.other.endingHash.test(r)){let n=Zt(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(r=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Zt(t[0],`
|
|
55
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let r=Zt(t[0],`
|
|
56
|
+
`).split(`
|
|
57
|
+
`),n="",a="",s=[];for(;r.length>0;){let i=!1,l=[],u;for(u=0;u<r.length;u++)if(this.rules.other.blockquoteStart.test(r[u]))l.push(r[u]),i=!0;else if(!i)l.push(r[u]);else break;r=r.slice(u);let c=l.join(`
|
|
58
|
+
`),d=c.replace(this.rules.other.blockquoteSetextReplace,`
|
|
59
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
|
|
60
|
+
${c}`:c,a=a?`${a}
|
|
61
|
+
${d}`:d;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,s,!0),this.lexer.state.top=f,r.length===0)break;let h=s.at(-1);if(h?.type==="code")break;if(h?.type==="blockquote"){let g=h,b=g.raw+`
|
|
62
|
+
`+r.join(`
|
|
63
|
+
`),_=this.blockquote(b);s[s.length-1]=_,n=n.substring(0,n.length-g.raw.length)+_.raw,a=a.substring(0,a.length-g.text.length)+_.text;break}else if(h?.type==="list"){let g=h,b=g.raw+`
|
|
64
|
+
`+r.join(`
|
|
65
|
+
`),_=this.list(b);s[s.length-1]=_,n=n.substring(0,n.length-h.raw.length)+_.raw,a=a.substring(0,a.length-g.raw.length)+_.raw,r=b.substring(s.at(-1).raw.length).split(`
|
|
66
|
+
`);continue}}return{type:"blockquote",raw:n,tokens:s,text:a}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim(),n=r.length>1,a={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");let s=this.rules.other.listItemRegex(r),i=!1;for(;e;){let u=!1,c="",d="";if(!(t=s.exec(e))||this.rules.block.hr.test(e))break;c=t[0],e=e.substring(c.length);let f=j2(t[2].split(`
|
|
67
|
+
`,1)[0],t[1].length),h=e.split(`
|
|
68
|
+
`,1)[0],g=!f.trim(),b=0;if(this.options.pedantic?(b=2,d=f.trimStart()):g?b=t[1].length+1:(b=f.search(this.rules.other.nonSpaceChar),b=b>4?1:b,d=f.slice(b),b+=t[1].length),g&&this.rules.other.blankLine.test(h)&&(c+=h+`
|
|
69
|
+
`,e=e.substring(h.length+1),u=!0),!u){let _=this.rules.other.nextBulletRegex(b),A=this.rules.other.hrRegex(b),y=this.rules.other.fencesBeginRegex(b),S=this.rules.other.headingBeginRegex(b),L=this.rules.other.htmlBeginRegex(b),D=this.rules.other.blockquoteBeginRegex(b);for(;e;){let P=e.split(`
|
|
70
|
+
`,1)[0],v;if(h=P,this.options.pedantic?(h=h.replace(this.rules.other.listReplaceNesting," "),v=h):v=h.replace(this.rules.other.tabCharGlobal," "),y.test(h)||S.test(h)||L.test(h)||D.test(h)||_.test(h)||A.test(h))break;if(v.search(this.rules.other.nonSpaceChar)>=b||!h.trim())d+=`
|
|
71
|
+
`+v.slice(b);else{if(g||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||y.test(f)||S.test(f)||A.test(f))break;d+=`
|
|
72
|
+
`+h}g=!h.trim(),c+=P+`
|
|
73
|
+
`,e=e.substring(P.length+1),f=v.slice(b)}}a.loose||(i?a.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(i=!0)),a.items.push({type:"list_item",raw:c,task:!!this.options.gfm&&this.rules.other.listIsTask.test(d),loose:!1,text:d,tokens:[]}),a.raw+=c}let l=a.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let u of a.items){if(this.lexer.state.top=!1,u.tokens=this.lexer.blockTokens(u.text,[]),u.task){if(u.text=u.text.replace(this.rules.other.listReplaceTask,""),u.tokens[0]?.type==="text"||u.tokens[0]?.type==="paragraph"){u.tokens[0].raw=u.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),u.tokens[0].text=u.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let d=this.lexer.inlineQueue.length-1;d>=0;d--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[d].src)){this.lexer.inlineQueue[d].src=this.lexer.inlineQueue[d].src.replace(this.rules.other.listReplaceTask,"");break}}let c=this.rules.other.listTaskCheckbox.exec(u.raw);if(c){let d={type:"checkbox",raw:c[0]+" ",checked:c[0]!=="[ ]"};u.checked=d.checked,a.loose?u.tokens[0]&&["paragraph","text"].includes(u.tokens[0].type)&&"tokens"in u.tokens[0]&&u.tokens[0].tokens?(u.tokens[0].raw=d.raw+u.tokens[0].raw,u.tokens[0].text=d.raw+u.tokens[0].text,u.tokens[0].tokens.unshift(d)):u.tokens.unshift({type:"paragraph",raw:d.raw,text:d.raw,tokens:[d]}):u.tokens.unshift(d)}}if(!a.loose){let c=u.tokens.filter(f=>f.type==="space"),d=c.length>0&&c.some(f=>this.rules.other.anyLine.test(f.raw));a.loose=d}}if(a.loose)for(let u of a.items){u.loose=!0;for(let c of u.tokens)c.type==="text"&&(c.type="paragraph")}return a}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let r=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:r,raw:t[0],href:n,title:a}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let r=Ii(t[1]),n=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
74
|
+
`):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(r.length===n.length){for(let i of n)this.rules.other.tableAlignRight.test(i)?s.align.push("right"):this.rules.other.tableAlignCenter.test(i)?s.align.push("center"):this.rules.other.tableAlignLeft.test(i)?s.align.push("left"):s.align.push(null);for(let i=0;i<r.length;i++)s.header.push({text:r[i],tokens:this.lexer.inline(r[i]),header:!0,align:s.align[i]});for(let i of a)s.rows.push(Ii(i,s.header.length).map((l,u)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:s.align[u]})));return s}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let r=t[1].charAt(t[1].length-1)===`
|
|
75
|
+
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:r,tokens:this.lexer.inline(r)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let s=Zt(r.slice(0,-1),"\\");if((r.length-s.length)%2===0)return}else{let s=U2(t[2],"()");if(s===-2)return;if(s>-1){let i=(t[0].indexOf("!")===0?5:4)+t[1].length+s;t[2]=t[2].substring(0,s),t[0]=t[0].substring(0,i).trim(),t[3]=""}}let n=t[2],a="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(n);s&&(n=s[1],a=s[3])}else a=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),Si(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let n=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=t[n.toLowerCase()];if(!a){let s=r[0].charAt(0);return{type:"text",raw:s,text:s}}return Si(r,a,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!(!n||n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!r||this.rules.inline.punctuation.exec(r))){let a=[...n[0]].length-1,s,i,l=a,u=0,c=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+a);(n=c.exec(t))!=null;){if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!s)continue;if(i=[...s].length,n[3]||n[4]){l+=i;continue}else if((n[5]||n[6])&&a%3&&!((a+i)%3)){u+=i;continue}if(l-=i,l>0)continue;i=Math.min(i,i+l+u);let d=[...n[0]][0].length,f=e.slice(0,a+n.index+d+i);if(Math.min(a,i)%2){let g=f.slice(1,-1);return{type:"em",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}let h=f.slice(2,-2);return{type:"strong",raw:f,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(r),a=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&a&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:t[0],text:r}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,r=""){let n=this.rules.inline.delLDelim.exec(e);if(n&&(!n[1]||!r||this.rules.inline.punctuation.exec(r))){let a=[...n[0]].length-1,s,i,l=a,u=this.rules.inline.delRDelim;for(u.lastIndex=0,t=t.slice(-1*e.length+a);(n=u.exec(t))!=null;){if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!s||(i=[...s].length,i!==a))continue;if(n[3]||n[4]){l+=i;continue}if(l-=i,l>0)continue;i=Math.min(i,i+l);let c=[...n[0]][0].length,d=e.slice(0,a+n.index+c+i),f=d.slice(a,-a);return{type:"del",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let r,n;return t[2]==="@"?(r=t[1],n="mailto:"+r):(r=t[1],n=r),{type:"link",raw:t[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let r,n;if(t[2]==="@")r=t[0],n="mailto:"+r;else{let a;do a=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(a!==t[0]);r=t[0],t[1]==="www."?n="http://"+t[0]:n=t[0]}return{type:"link",raw:t[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let r=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:r}}}},Ce=class ia{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||yt,this.options.tokenizer=this.options.tokenizer||new tn,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:pe,block:Mr.normal,inline:Kt.normal};this.options.pedantic?(r.block=Mr.pedantic,r.inline=Kt.pedantic):this.options.gfm&&(r.block=Mr.gfm,this.options.breaks?r.inline=Kt.breaks:r.inline=Kt.gfm),this.tokenizer.rules=r}static get rules(){return{block:Mr,inline:Kt}}static lex(t,r){return new ia(r).lex(t)}static lexInline(t,r){return new ia(r).inlineTokens(t)}lex(t){t=t.replace(pe.carriageReturn,`
|
|
76
|
+
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],n=!1){for(this.options.pedantic&&(t=t.replace(pe.tabCharGlobal," ").replace(pe.spaceLine,""));t;){let a;if(this.options.extensions?.block?.some(i=>(a=i.call({lexer:this},t,r))?(t=t.substring(a.raw.length),r.push(a),!0):!1))continue;if(a=this.tokenizer.space(t)){t=t.substring(a.raw.length);let i=r.at(-1);a.raw.length===1&&i!==void 0?i.raw+=`
|
|
77
|
+
`:r.push(a);continue}if(a=this.tokenizer.code(t)){t=t.substring(a.raw.length);let i=r.at(-1);i?.type==="paragraph"||i?.type==="text"?(i.raw+=(i.raw.endsWith(`
|
|
78
|
+
`)?"":`
|
|
79
|
+
`)+a.raw,i.text+=`
|
|
80
|
+
`+a.text,this.inlineQueue.at(-1).src=i.text):r.push(a);continue}if(a=this.tokenizer.fences(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.heading(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.hr(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.blockquote(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.list(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.html(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.def(t)){t=t.substring(a.raw.length);let i=r.at(-1);i?.type==="paragraph"||i?.type==="text"?(i.raw+=(i.raw.endsWith(`
|
|
81
|
+
`)?"":`
|
|
82
|
+
`)+a.raw,i.text+=`
|
|
83
|
+
`+a.raw,this.inlineQueue.at(-1).src=i.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title},r.push(a));continue}if(a=this.tokenizer.table(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.lheading(t)){t=t.substring(a.raw.length),r.push(a);continue}let s=t;if(this.options.extensions?.startBlock){let i=1/0,l=t.slice(1),u;this.options.extensions.startBlock.forEach(c=>{u=c.call({lexer:this},l),typeof u=="number"&&u>=0&&(i=Math.min(i,u))}),i<1/0&&i>=0&&(s=t.substring(0,i+1))}if(this.state.top&&(a=this.tokenizer.paragraph(s))){let i=r.at(-1);n&&i?.type==="paragraph"?(i.raw+=(i.raw.endsWith(`
|
|
84
|
+
`)?"":`
|
|
85
|
+
`)+a.raw,i.text+=`
|
|
86
|
+
`+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):r.push(a),n=s.length!==t.length,t=t.substring(a.raw.length);continue}if(a=this.tokenizer.text(t)){t=t.substring(a.raw.length);let i=r.at(-1);i?.type==="text"?(i.raw+=(i.raw.endsWith(`
|
|
87
|
+
`)?"":`
|
|
88
|
+
`)+a.raw,i.text+=`
|
|
89
|
+
`+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):r.push(a);continue}if(t){let i="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(i);break}else throw new Error(i)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let n=t,a=null;if(this.tokens.links){let u=Object.keys(this.tokens.links);if(u.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)u.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,a.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s;for(;(a=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)s=a[2]?a[2].length:0,n=n.slice(0,a.index+s)+"["+"a".repeat(a[0].length-s-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let i=!1,l="";for(;t;){i||(l=""),i=!1;let u;if(this.options.extensions?.inline?.some(d=>(u=d.call({lexer:this},t,r))?(t=t.substring(u.raw.length),r.push(u),!0):!1))continue;if(u=this.tokenizer.escape(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.tag(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.link(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(u.raw.length);let d=r.at(-1);u.type==="text"&&d?.type==="text"?(d.raw+=u.raw,d.text+=u.text):r.push(u);continue}if(u=this.tokenizer.emStrong(t,n,l)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.codespan(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.br(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.del(t,n,l)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.autolink(t)){t=t.substring(u.raw.length),r.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(t))){t=t.substring(u.raw.length),r.push(u);continue}let c=t;if(this.options.extensions?.startInline){let d=1/0,f=t.slice(1),h;this.options.extensions.startInline.forEach(g=>{h=g.call({lexer:this},f),typeof h=="number"&&h>=0&&(d=Math.min(d,h))}),d<1/0&&d>=0&&(c=t.substring(0,d+1))}if(u=this.tokenizer.inlineText(c)){t=t.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(l=u.raw.slice(-1)),i=!0;let d=r.at(-1);d?.type==="text"?(d.raw+=u.raw,d.text+=u.text):r.push(u);continue}if(t){let d="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return r}},rn=class{options;parser;constructor(t){this.options=t||yt}space(t){return""}code({text:t,lang:r,escaped:n}){let a=(r||"").match(pe.notSpaceStart)?.[0],s=t.replace(pe.endingNewline,"")+`
|
|
90
|
+
`;return a?'<pre><code class="language-'+Oe(a)+'">'+(n?s:Oe(s,!0))+`</code></pre>
|
|
91
|
+
`:"<pre><code>"+(n?s:Oe(s,!0))+`</code></pre>
|
|
92
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
93
|
+
${this.parser.parse(t)}</blockquote>
|
|
94
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
|
|
95
|
+
`}hr(t){return`<hr>
|
|
96
|
+
`}list(t){let r=t.ordered,n=t.start,a="";for(let l=0;l<t.items.length;l++){let u=t.items[l];a+=this.listitem(u)}let s=r?"ol":"ul",i=r&&n!==1?' start="'+n+'"':"";return"<"+s+i+`>
|
|
97
|
+
`+a+"</"+s+`>
|
|
98
|
+
`}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
|
|
99
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
100
|
+
`}table(t){let r="",n="";for(let s=0;s<t.header.length;s++)n+=this.tablecell(t.header[s]);r+=this.tablerow({text:n});let a="";for(let s=0;s<t.rows.length;s++){let i=t.rows[s];n="";for(let l=0;l<i.length;l++)n+=this.tablecell(i[l]);a+=this.tablerow({text:n})}return a&&(a=`<tbody>${a}</tbody>`),`<table>
|
|
101
|
+
<thead>
|
|
102
|
+
`+r+`</thead>
|
|
103
|
+
`+a+`</table>
|
|
104
|
+
`}tablerow({text:t}){return`<tr>
|
|
105
|
+
${t}</tr>
|
|
106
|
+
`}tablecell(t){let r=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+r+`</${n}>
|
|
107
|
+
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Oe(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:n}){let a=this.parser.parseInline(n),s=Ni(t);if(s===null)return a;t=s;let i='<a href="'+t+'"';return r&&(i+=' title="'+Oe(r)+'"'),i+=">"+a+"</a>",i}image({href:t,title:r,text:n,tokens:a}){a&&(n=this.parser.parseInline(a,this.parser.textRenderer));let s=Ni(t);if(s===null)return Oe(n);t=s;let i=`<img src="${t}" alt="${Oe(n)}"`;return r&&(i+=` title="${Oe(r)}"`),i+=">",i}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Oe(t.text)}},es=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},Se=class ua{options;renderer;textRenderer;constructor(t){this.options=t||yt,this.options.renderer=this.options.renderer||new rn,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new es}static parse(t,r){return new ua(r).parse(t)}static parseInline(t,r){return new ua(r).parseInline(t)}parse(t){let r="";for(let n=0;n<t.length;n++){let a=t[n];if(this.options.extensions?.renderers?.[a.type]){let i=a,l=this.options.extensions.renderers[i.type].call({parser:this},i);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(i.type)){r+=l||"";continue}}let s=a;switch(s.type){case"space":{r+=this.renderer.space(s);break}case"hr":{r+=this.renderer.hr(s);break}case"heading":{r+=this.renderer.heading(s);break}case"code":{r+=this.renderer.code(s);break}case"table":{r+=this.renderer.table(s);break}case"blockquote":{r+=this.renderer.blockquote(s);break}case"list":{r+=this.renderer.list(s);break}case"checkbox":{r+=this.renderer.checkbox(s);break}case"html":{r+=this.renderer.html(s);break}case"def":{r+=this.renderer.def(s);break}case"paragraph":{r+=this.renderer.paragraph(s);break}case"text":{r+=this.renderer.text(s);break}default:{let i='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(i),"";throw new Error(i)}}}return r}parseInline(t,r=this.renderer){let n="";for(let a=0;a<t.length;a++){let s=t[a];if(this.options.extensions?.renderers?.[s.type]){let l=this.options.extensions.renderers[s.type].call({parser:this},s);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){n+=l||"";continue}}let i=s;switch(i.type){case"escape":{n+=r.text(i);break}case"html":{n+=r.html(i);break}case"link":{n+=r.link(i);break}case"image":{n+=r.image(i);break}case"checkbox":{n+=r.checkbox(i);break}case"strong":{n+=r.strong(i);break}case"em":{n+=r.em(i);break}case"codespan":{n+=r.codespan(i);break}case"br":{n+=r.br(i);break}case"del":{n+=r.del(i);break}case"text":{n+=r.text(i);break}default:{let l='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}},rr=class{options;block;constructor(e){this.options=e||yt}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?Ce.lex:Ce.lexInline}provideParser(){return this.block?Se.parse:Se.parseInline}},$2=class{defaults=Va();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Se;Renderer=rn;TextRenderer=es;Lexer=Ce;Tokenizer=tn;Hooks=rr;constructor(...t){this.use(...t)}walkTokens(t,r){let n=[];for(let a of t)switch(n=n.concat(r.call(this,a)),a.type){case"table":{let s=a;for(let i of s.header)n=n.concat(this.walkTokens(i.tokens,r));for(let i of s.rows)for(let l of i)n=n.concat(this.walkTokens(l.tokens,r));break}case"list":{let s=a;n=n.concat(this.walkTokens(s.items,r));break}default:{let s=a;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(i=>{let l=s[i].flat(1/0);n=n.concat(this.walkTokens(l,r))}):s.tokens&&(n=n.concat(this.walkTokens(s.tokens,r)))}}return n}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let a={...n};if(a.async=this.defaults.async||a.async||!1,n.extensions&&(n.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let i=r.renderers[s.name];i?r.renderers[s.name]=function(...l){let u=s.renderer.apply(this,l);return u===!1&&(u=i.apply(this,l)),u}:r.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=r[s.level];i?i.unshift(s.tokenizer):r[s.level]=[s.tokenizer],s.start&&(s.level==="block"?r.startBlock?r.startBlock.push(s.start):r.startBlock=[s.start]:s.level==="inline"&&(r.startInline?r.startInline.push(s.start):r.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(r.childTokens[s.name]=s.childTokens)}),a.extensions=r),n.renderer){let s=this.defaults.renderer||new rn(this.defaults);for(let i in n.renderer){if(!(i in s))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let l=i,u=n.renderer[l],c=s[l];s[l]=(...d)=>{let f=u.apply(s,d);return f===!1&&(f=c.apply(s,d)),f||""}}a.renderer=s}if(n.tokenizer){let s=this.defaults.tokenizer||new tn(this.defaults);for(let i in n.tokenizer){if(!(i in s))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let l=i,u=n.tokenizer[l],c=s[l];s[l]=(...d)=>{let f=u.apply(s,d);return f===!1&&(f=c.apply(s,d)),f}}a.tokenizer=s}if(n.hooks){let s=this.defaults.hooks||new rr;for(let i in n.hooks){if(!(i in s))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let l=i,u=n.hooks[l],c=s[l];rr.passThroughHooks.has(i)?s[l]=d=>{if(this.defaults.async&&rr.passThroughHooksRespectAsync.has(i))return(async()=>{let h=await u.call(s,d);return c.call(s,h)})();let f=u.call(s,d);return c.call(s,f)}:s[l]=(...d)=>{if(this.defaults.async)return(async()=>{let h=await u.apply(s,d);return h===!1&&(h=await c.apply(s,d)),h})();let f=u.apply(s,d);return f===!1&&(f=c.apply(s,d)),f}}a.hooks=s}if(n.walkTokens){let s=this.defaults.walkTokens,i=n.walkTokens;a.walkTokens=function(l){let u=[];return u.push(i.call(this,l)),s&&(u=u.concat(s.call(this,l))),u}}this.defaults={...this.defaults,...a}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return Ce.lex(t,r??this.defaults)}parser(t,r){return Se.parse(t,r??this.defaults)}parseMarkdown(t){return(r,n)=>{let a={...n},s={...this.defaults,...a},i=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&a.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=t),s.async)return(async()=>{let l=s.hooks?await s.hooks.preprocess(r):r,u=await(s.hooks?await s.hooks.provideLexer():t?Ce.lex:Ce.lexInline)(l,s),c=s.hooks?await s.hooks.processAllTokens(u):u;s.walkTokens&&await Promise.all(this.walkTokens(c,s.walkTokens));let d=await(s.hooks?await s.hooks.provideParser():t?Se.parse:Se.parseInline)(c,s);return s.hooks?await s.hooks.postprocess(d):d})().catch(i);try{s.hooks&&(r=s.hooks.preprocess(r));let l=(s.hooks?s.hooks.provideLexer():t?Ce.lex:Ce.lexInline)(r,s);s.hooks&&(l=s.hooks.processAllTokens(l)),s.walkTokens&&this.walkTokens(l,s.walkTokens);let u=(s.hooks?s.hooks.provideParser():t?Se.parse:Se.parseInline)(l,s);return s.hooks&&(u=s.hooks.postprocess(u)),u}catch(l){return i(l)}}}onError(t,r){return n=>{if(n.message+=`
|
|
108
|
+
Please report this to https://github.com/markedjs/marked.`,t){let a="<p>An error occurred:</p><pre>"+Oe(n.message+"",!0)+"</pre>";return r?Promise.resolve(a):a}if(r)return Promise.reject(n);throw n}}},Tt=new $2;function X(e,t){return Tt.parse(e,t)}X.options=X.setOptions=function(e){return Tt.setOptions(e),X.defaults=Tt.defaults,pl(X.defaults),X};X.getDefaults=Va;X.defaults=yt;X.use=function(...e){return Tt.use(...e),X.defaults=Tt.defaults,pl(X.defaults),X};X.walkTokens=function(e,t){return Tt.walkTokens(e,t)};X.parseInline=Tt.parseInline;X.Parser=Se;X.parser=Se.parse;X.Renderer=rn;X.TextRenderer=es;X.Lexer=Ce;X.lexer=Ce.lex;X.Tokenizer=tn;X.Hooks=rr;X.parse=X;X.options;X.setOptions;X.use;X.walkTokens;X.parseInline;Se.parse;Ce.lex;var Y2=300,q2="300px",V2=500;function W2(e={}){let{immediate:t=!1,debounceDelay:r=Y2,rootMargin:n=q2,idleTimeout:a=V2}=e,[s,i]=k.useState(!1),l=k.useRef(null),u=k.useRef(null),c=k.useRef(null),d=k.useMemo(()=>g=>{let b=Date.now();return window.setTimeout(()=>{g({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-b))})},1)},[]),f=k.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(g,b)=>window.requestIdleCallback(g,b):d,[d]),h=k.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?g=>window.cancelIdleCallback(g):g=>{clearTimeout(g)},[]);return k.useEffect(()=>{if(t){i(!0);return}let g=l.current;if(!g)return;u.current&&(clearTimeout(u.current),u.current=null),c.current&&(h(c.current),c.current=null);let b=()=>{u.current&&(clearTimeout(u.current),u.current=null),c.current&&(h(c.current),c.current=null)},_=L=>{c.current=f(D=>{D.timeRemaining()>0||D.didTimeout?(i(!0),L.disconnect()):c.current=f(()=>{i(!0),L.disconnect()},{timeout:a/2})},{timeout:a})},A=L=>{b(),u.current=window.setTimeout(()=>{var D,P;let v=L.takeRecords();(v.length===0||(P=(D=v.at(-1))==null?void 0:D.isIntersecting)!=null&&P)&&_(L)},r)},y=(L,D)=>{L.isIntersecting?A(D):b()},S=new IntersectionObserver(L=>{for(let D of L)y(D,S)},{rootMargin:n,threshold:0});return S.observe(g),()=>{u.current&&clearTimeout(u.current),c.current&&h(c.current),S.disconnect()}},[t,r,n,a,h,f]),{shouldRender:s,containerRef:l}}var Nl=/\s/,G2=/^\s+$/,Q2=new Set(["code","pre","svg","math","annotation"]),X2=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",K2=e=>e.some(t=>X2(t)&&Q2.has(t.tagName)),Z2=e=>{let t=[],r="",n=!1;for(let a of e){let s=Nl.test(a);s!==n&&r&&(t.push(r),r=""),r+=a,n=s}return r&&t.push(r),t},J2=e=>{let t=[],r="";for(let n of e)Nl.test(n)?r+=n:(r&&(t.push(r),r=""),t.push(n));return r&&t.push(r),t},eT=(e,t,r,n,a)=>({type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:a?`--sd-animation:sd-${t};--sd-duration:0ms;--sd-easing:${n}`:`--sd-animation:sd-${t};--sd-duration:${r}ms;--sd-easing:${n}`},children:[{type:"text",value:e}]}),tT=(e,t,r,n,a)=>{let s=t.at(-1);if(!(s&&"children"in s))return;if(K2(t))return Lt;let i=s,l=i.children.indexOf(e);if(l===-1)return;let u=e.value;if(!u.trim()){a.count+=u.length;return}let c=r.sep==="char"?J2(u):Z2(u),d=n.prevContentLength,f=c.map(h=>{let g=a.count;if(a.count+=h.length,G2.test(h))return{type:"text",value:h};let b=d>0&&g<d;return eT(h,r.animation,r.duration,r.easing,b)});return i.children.splice(l,1,...f),l+f.length},rT=0;function oa(e){var t,r,n,a;let s={animation:(t=e?.animation)!=null?t:"fadeIn",duration:(r=e?.duration)!=null?r:150,easing:(n=e?.easing)!=null?n:"ease",sep:(a=e?.sep)!=null?a:"word"},i={prevContentLength:0,lastRenderCharCount:0},l=rT++,u=()=>c=>{let d={count:0};_a(c,"text",(f,h)=>tT(f,h,s,i,d)),i.lastRenderCharCount=d.count,i.prevContentLength=0};return Object.defineProperty(u,"name",{value:`rehypeAnimate$${l}`}),{name:"animate",type:"animate",rehypePlugin:u,setPrevContentLength(c){i.prevContentLength=c},getLastRenderCharCount(){let c=i.lastRenderCharCount;return i.lastRenderCharCount=0,c}}}oa();var Il=k.createContext(!1),nT=()=>k.useContext(Il),ts=(...e)=>ul(Vo(e)),aT=(e,t)=>{if(!e||!t)return t;let r=`${e}:`;return t.split(/\s+/).filter(Boolean).map(n=>n.startsWith(r)?n:`${e}:${n}`).join(" ")},sT=e=>e?(...t)=>aT(e,ul(Vo(t))):ts,Dt=(e,t,r)=>{let n=typeof t=="string"?new Blob([t],{type:r}):t,a=URL.createObjectURL(n),s=document.createElement("a");s.href=a,s.download=e,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(a)},la=k.createContext(ts),q=()=>k.useContext(la),iT=ts("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),uT=e=>{let t={};for(let r of e.split(";")){let n=r.indexOf(":");if(n>0){let a=r.slice(0,n).trim(),s=r.slice(n+1).trim();a&&s&&(t[a]=s)}}return t},oT=k.memo(({children:e,result:t,language:r,className:n,startLine:a,...s})=>{let i=q(),l=k.useMemo(()=>i(iT),[i]),u=k.useMemo(()=>{let c={};return t.bg&&(c["--sdm-bg"]=t.bg),t.fg&&(c["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(c,uT(t.rootStyle)),c},[t.bg,t.fg,t.rootStyle]);return T.jsx("div",{className:i(n,"overflow-hidden rounded-md border border-border bg-background p-4 text-sm"),"data-language":r,"data-streamdown":"code-block-body",...s,children:T.jsx("pre",{className:i(n,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:u,children:T.jsx("code",{className:i("[counter-increment:line_0] [counter-reset:line]"),style:a&&a>1?{counterReset:`line ${a-1}`}:void 0,children:t.tokens.map((c,d)=>T.jsx("span",{className:l,children:c.length===0||c.length===1&&c[0].content===""?`
|
|
109
|
+
`:c.map((f,h)=>{let g={},b=!!f.bgColor;if(f.color&&(g["--sdm-c"]=f.color),f.bgColor&&(g["--sdm-tbg"]=f.bgColor),f.htmlStyle)for(let[_,A]of Object.entries(f.htmlStyle))_==="color"?g["--sdm-c"]=A:_==="background-color"?(g["--sdm-tbg"]=A,b=!0):g[_]=A;return T.jsx("span",{className:i("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",b&&"bg-[var(--sdm-tbg)]",b&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:g,...f.htmlAttrs,children:f.content},h)})},d))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className&&e.startLine===t.startLine),lT=({className:e,language:t,style:r,isIncomplete:n,...a})=>{let s=q();return T.jsx("div",{className:s("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":n||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...r},...a})},Sl=k.createContext({code:""}),wl=()=>k.useContext(Sl),cT=({language:e})=>{let t=q();return T.jsx("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:T.jsx("span",{className:t("ml-1 font-mono lowercase"),children:e})})},dT=/\n+$/,fT=k.lazy(()=>Qi(()=>import("./highlighted-body-TPN3WLV5-D5c7I9mI.js"),__vite__mapDeps([0,1,2,3,4,5])).then(e=>({default:e.HighlightedCodeBlockBody}))),hT=({code:e,language:t,className:r,children:n,isIncomplete:a=!1,startLine:s,...i})=>{let l=q(),u=k.useMemo(()=>e.replace(dT,""),[e]),c=k.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:u.split(`
|
|
110
|
+
`).map(d=>[{content:d,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[u]);return T.jsx(Sl.Provider,{value:{code:e},children:T.jsxs(lT,{isIncomplete:a,language:t,children:[T.jsx(cT,{language:t}),n?T.jsx("div",{className:l("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:T.jsx("div",{className:l("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"code-block-actions",children:n})}):null,T.jsx(k.Suspense,{fallback:T.jsx(oT,{className:r,language:t,result:c,startLine:s,...i}),children:T.jsx(fT,{className:r,code:u,language:t,raw:c,startLine:s,...i})})]})})},pT=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),mT=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),bT=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),gT=e=>T.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[T.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),ET=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),TT=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),kT=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),xT=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),AT=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),_T=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),nr={CheckIcon:pT,CopyIcon:mT,DownloadIcon:bT,ExternalLinkIcon:xT,Loader2Icon:gT,Maximize2Icon:ET,RotateCcwIcon:TT,XIcon:kT,ZoomInIcon:AT,ZoomOutIcon:_T},Ll=k.createContext(nr),yT=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let r=Object.keys(e),n=Object.keys(t);return r.length!==n.length?!1:r.every(a=>e[a]===t[a])},wi=({icons:e,children:t})=>{let r=k.useRef(e),n=k.useRef(e?{...nr,...e}:nr);yT(r.current,e)||(r.current=e,n.current=e?{...nr,...e}:nr);let a=n.current;return T.jsx(Ll.Provider,{value:a,children:t})},Le=()=>k.useContext(Ll),Rl={copyCode:"Copy Code",downloadFile:"Download file",downloadDiagram:"Download diagram",downloadDiagramAsSvg:"Download diagram as SVG",downloadDiagramAsPng:"Download diagram as PNG",downloadDiagramAsMmd:"Download diagram as MMD",viewFullscreen:"View fullscreen",exitFullscreen:"Exit fullscreen",mermaidFormatSvg:"SVG",mermaidFormatPng:"PNG",mermaidFormatMmd:"MMD",copyTable:"Copy table",copyTableAsMarkdown:"Copy table as Markdown",copyTableAsCsv:"Copy table as CSV",copyTableAsTsv:"Copy table as TSV",downloadTable:"Download table",downloadTableAsCsv:"Download table as CSV",downloadTableAsMarkdown:"Download table as Markdown",tableFormatMarkdown:"Markdown",tableFormatCsv:"CSV",tableFormatTsv:"TSV",imageNotAvailable:"Image not available",downloadImage:"Download image",openExternalLink:"Open external link?",externalLinkWarning:"You're about to visit an external website.",close:"Close",copyLink:"Copy link",copied:"Copied",openLink:"Open link"},ca=k.createContext(Rl),$e=()=>k.useContext(ca),Li=({onCopy:e,onError:t,timeout:r=2e3,children:n,className:a,code:s,...i})=>{let l=q(),[u,c]=k.useState(!1),d=k.useRef(0),{code:f}=wl(),{isAnimating:h}=k.useContext(_e),g=$e(),b=s??f,_=async()=>{var S;if(typeof window>"u"||!((S=navigator?.clipboard)!=null&&S.writeText)){t?.(new Error("Clipboard API not available"));return}try{u||(await navigator.clipboard.writeText(b),c(!0),e?.(),d.current=window.setTimeout(()=>c(!1),r))}catch(L){t?.(L)}};k.useEffect(()=>()=>{window.clearTimeout(d.current)},[]);let A=Le(),y=u?A.CheckIcon:A.CopyIcon;return T.jsx("button",{className:l("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",a),"data-streamdown":"code-block-copy-button",disabled:h,onClick:_,title:g.copyCode,type:"button",...i,children:n??T.jsx(y,{size:14})})},Ri={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},CT=({onDownload:e,onError:t,language:r,children:n,className:a,code:s,...i})=>{let l=q(),{code:u}=wl(),{isAnimating:c}=k.useContext(_e),d=$e(),f=Le(),h=s??u,g=`file.${r&&r in Ri?Ri[r]:"txt"}`,b="text/plain",_=()=>{try{Dt(g,h,b),e?.()}catch(A){t?.(A)}};return T.jsx("button",{className:l("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",a),"data-streamdown":"code-block-download-button",disabled:c,onClick:_,title:d.downloadFile,type:"button",...i,children:n??T.jsx(f.DownloadIcon,{size:14})})},Oi=()=>{let{Loader2Icon:e}=Le(),t=q();return T.jsxs("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[T.jsx("div",{className:t("h-[46px] w-full bg-muted/80")}),T.jsx("div",{className:t("flex w-full items-center justify-center p-4"),children:T.jsx(e,{className:t("size-4 animate-spin")})})]})},NT=/\.[^/.]+$/,IT=({node:e,className:t,src:r,alt:n,onLoad:a,onError:s,...i})=>{let{DownloadIcon:l}=Le(),u=q(),c=k.useRef(null),[d,f]=k.useState(!1),[h,g]=k.useState(!1),b=$e(),_=i.width!=null||i.height!=null,A=(d||_)&&!h,y=h&&!_;k.useEffect(()=>{let P=c.current;if(P!=null&&P.complete){let v=P.naturalWidth>0;f(v),g(!v)}},[]);let S=k.useCallback(P=>{f(!0),g(!1),a?.(P)},[a]),L=k.useCallback(P=>{f(!1),g(!0),s?.(P)},[s]),D=async()=>{if(r)try{let P=await(await fetch(r)).blob(),v=new URL(r,window.location.origin).pathname.split("/").pop()||"",G=v.split(".").pop(),O=v.includes(".")&&G!==void 0&&G.length<=4,Q="";if(O)Q=v;else{let N=P.type,K="png";N.includes("jpeg")||N.includes("jpg")?K="jpg":N.includes("png")?K="png":N.includes("svg")?K="svg":N.includes("gif")?K="gif":N.includes("webp")&&(K="webp"),Q=`${(n||v||"image").replace(NT,"")}.${K}`}Dt(Q,P,P.type)}catch{window.open(r,"_blank")}};return r?T.jsxs("div",{className:u("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[T.jsx("img",{alt:n,className:u("max-w-full rounded-lg",y&&"hidden",t),"data-streamdown":"image",onError:L,onLoad:S,ref:c,src:r,...i}),y&&T.jsx("span",{className:u("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:b.imageNotAvailable}),T.jsx("div",{className:u("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block")}),A&&T.jsx("button",{className:u("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:D,title:b.downloadImage,type:"button",children:T.jsx(l,{size:14})})]}):null},cr=0,rs=()=>{cr+=1,cr===1&&(document.body.style.overflow="hidden")},ns=()=>{cr=Math.max(0,cr-1),cr===0&&(document.body.style.overflow="")},ST=({url:e,isOpen:t,onClose:r,onConfirm:n})=>{let{CheckIcon:a,CopyIcon:s,ExternalLinkIcon:i,XIcon:l}=Le(),u=q(),[c,d]=k.useState(!1),f=$e(),h=k.useCallback(async()=>{try{await navigator.clipboard.writeText(e),d(!0),setTimeout(()=>d(!1),2e3)}catch{}},[e]),g=k.useCallback(()=>{n(),r()},[n,r]);return k.useEffect(()=>{if(t){rs();let b=_=>{_.key==="Escape"&&r()};return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b),ns()}}},[t,r]),t?T.jsx("div",{className:u("fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm"),"data-streamdown":"link-safety-modal",onClick:r,onKeyDown:b=>{b.key==="Escape"&&r()},role:"button",tabIndex:0,children:T.jsxs("div",{className:u("relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg"),onClick:b=>b.stopPropagation(),onKeyDown:b=>b.stopPropagation(),role:"presentation",children:[T.jsx("button",{className:u("absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:r,title:f.close,type:"button",children:T.jsx(l,{size:16})}),T.jsxs("div",{className:u("flex flex-col gap-2"),children:[T.jsxs("div",{className:u("flex items-center gap-2 font-semibold text-lg"),children:[T.jsx(i,{size:20}),T.jsx("span",{children:f.openExternalLink})]}),T.jsx("p",{className:u("text-muted-foreground text-sm"),children:f.externalLinkWarning})]}),T.jsx("div",{className:u("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),T.jsxs("div",{className:u("flex gap-2"),children:[T.jsx("button",{className:u("flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted"),onClick:h,type:"button",children:c?T.jsxs(T.Fragment,{children:[T.jsx(a,{size:14}),T.jsx("span",{children:f.copied})]}):T.jsxs(T.Fragment,{children:[T.jsx(s,{size:14}),T.jsx("span",{children:f.copyLink})]})}),T.jsxs("button",{className:u("flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90"),onClick:g,type:"button",children:[T.jsx(i,{size:14}),T.jsx("span",{children:f.openLink})]})]})]})}):null},da=k.createContext(null),as=()=>k.useContext(da),P3=()=>{var e;let t=as();return(e=t?.code)!=null?e:null},ss=()=>{var e;let t=as();return(e=t?.mermaid)!=null?e:null},wT=e=>{var t;let r=as();return r!=null&&r.renderers&&e&&(t=r.renderers.find(n=>Array.isArray(n.language)?n.language.includes(e):n.language===e))!=null?t:null},LT=(e,t)=>{var r;let n=(r=void 0)!=null?r:5;return new Promise((a,s)=>{let i="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),l=new Image;l.crossOrigin="anonymous",l.onload=()=>{let u=document.createElement("canvas"),c=l.width*n,d=l.height*n;u.width=c,u.height=d;let f=u.getContext("2d");if(!f){s(new Error("Failed to create 2D canvas context for PNG export"));return}f.drawImage(l,0,0,c,d),u.toBlob(h=>{if(!h){s(new Error("Failed to create PNG blob"));return}a(h)},"image/png")},l.onerror=()=>s(new Error("Failed to load SVG image")),l.src=i})},RT=({chart:e,children:t,className:r,onDownload:n,config:a,onError:s})=>{let i=q(),[l,u]=k.useState(!1),c=k.useRef(null),{isAnimating:d}=k.useContext(_e),f=Le(),h=ss(),g=$e(),b=async _=>{try{if(_==="mmd"){Dt("diagram.mmd",e,"text/plain"),u(!1),n?.(_);return}if(!h){s?.(new Error("Mermaid plugin not available"));return}let A=h.getMermaid(a),y=e.split("").reduce((D,P)=>(D<<5)-D+P.charCodeAt(0)|0,0),S=`mermaid-${Math.abs(y)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:L}=await A.render(S,e);if(!L){s?.(new Error("SVG not found. Please wait for the diagram to render."));return}if(_==="svg"){Dt("diagram.svg",L,"image/svg+xml"),u(!1),n?.(_);return}if(_==="png"){let D=await LT(L);Dt("diagram.png",D,"image/png"),n?.(_),u(!1);return}}catch(A){s?.(A)}};return k.useEffect(()=>{let _=A=>{let y=A.composedPath();c.current&&!y.includes(c.current)&&u(!1)};return document.addEventListener("mousedown",_),()=>{document.removeEventListener("mousedown",_)}},[]),T.jsxs("div",{className:i("relative"),ref:c,children:[T.jsx("button",{className:i("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",r),disabled:d,onClick:()=>u(!l),title:g.downloadDiagram,type:"button",children:t??T.jsx(f.DownloadIcon,{size:14})}),l?T.jsxs("div",{className:i("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[T.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>b("svg"),title:g.downloadDiagramAsSvg,type:"button",children:g.mermaidFormatSvg}),T.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>b("png"),title:g.downloadDiagramAsPng,type:"button",children:g.mermaidFormatPng}),T.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>b("mmd"),title:g.downloadDiagramAsMmd,type:"button",children:g.mermaidFormatMmd})]}):null]})},OT=({chart:e,config:t,onFullscreen:r,onExit:n,className:a,...s})=>{let{Maximize2Icon:i,XIcon:l}=Le(),u=q(),[c,d]=k.useState(!1),{isAnimating:f,controls:h}=k.useContext(_e),g=$e(),b=(()=>{if(typeof h=="boolean")return h;let A=h.mermaid;return A===!1?!1:A===!0||A===void 0?!0:A.panZoom!==!1})(),_=()=>{d(!c)};return k.useEffect(()=>{if(c){rs();let A=y=>{y.key==="Escape"&&d(!1)};return document.addEventListener("keydown",A),()=>{document.removeEventListener("keydown",A),ns()}}},[c]),k.useEffect(()=>{c?r?.():n&&n()},[c,r,n]),T.jsxs(T.Fragment,{children:[T.jsx("button",{className:u("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",a),disabled:f,onClick:_,title:g.viewFullscreen,type:"button",...s,children:T.jsx(i,{size:14})}),c?Gi.createPortal(T.jsxs("div",{className:u("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),onClick:_,onKeyDown:A=>{A.key==="Escape"&&_()},role:"button",tabIndex:0,children:[T.jsx("button",{className:u("absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:_,title:g.exitFullscreen,type:"button",children:T.jsx(l,{size:20})}),T.jsx("div",{className:u("flex size-full items-center justify-center p-4"),onClick:A=>A.stopPropagation(),onKeyDown:A=>A.stopPropagation(),role:"presentation",children:T.jsx(dc,{chart:e,className:u("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:b})})]}),document.body):null]})},Ol=e=>{var t,r;let n=[],a=[],s=e.querySelectorAll("thead th");for(let l of s)n.push(((t=l.textContent)==null?void 0:t.trim())||"");let i=e.querySelectorAll("tbody tr");for(let l of i){let u=[],c=l.querySelectorAll("td");for(let d of c)u.push(((r=d.textContent)==null?void 0:r.trim())||"");a.push(u)}return{headers:n,rows:a}},Dl=e=>{let{headers:t,rows:r}=e,n=l=>{let u=!1,c=!1;for(let d of l){if(d==='"'){u=!0,c=!0;break}(d===","||d===`
|
|
111
|
+
`)&&(u=!0)}return u?c?`"${l.replace(/"/g,'""')}"`:`"${l}"`:l},a=t.length>0?r.length+1:r.length,s=new Array(a),i=0;t.length>0&&(s[i]=t.map(n).join(","),i+=1);for(let l of r)s[i]=l.map(n).join(","),i+=1;return s.join(`
|
|
112
|
+
`)},DT=e=>{let{headers:t,rows:r}=e,n=l=>{let u=!1;for(let d of l)if(d===" "||d===`
|
|
113
|
+
`||d==="\r"){u=!0;break}if(!u)return l;let c=[];for(let d of l)d===" "?c.push("\\t"):d===`
|
|
114
|
+
`?c.push("\\n"):d==="\r"?c.push("\\r"):c.push(d);return c.join("")},a=t.length>0?r.length+1:r.length,s=new Array(a),i=0;t.length>0&&(s[i]=t.map(n).join(" "),i+=1);for(let l of r)s[i]=l.map(n).join(" "),i+=1;return s.join(`
|
|
115
|
+
`)},jn=e=>{let t=!1;for(let n of e)if(n==="\\"||n==="|"){t=!0;break}if(!t)return e;let r=[];for(let n of e)n==="\\"?r.push("\\\\"):n==="|"?r.push("\\|"):r.push(n);return r.join("")},fa=e=>{let{headers:t,rows:r}=e;if(t.length===0)return"";let n=new Array(r.length+2),a=0,s=t.map(l=>jn(l));n[a]=`| ${s.join(" | ")} |`,a+=1;let i=new Array(t.length);for(let l=0;l<t.length;l+=1)i[l]="---";n[a]=`| ${i.join(" | ")} |`,a+=1;for(let l of r)if(l.length<t.length){let u=new Array(t.length);for(let c=0;c<t.length;c+=1)u[c]=c<l.length?jn(l[c]):"";n[a]=`| ${u.join(" | ")} |`,a+=1}else{let u=l.map(c=>jn(c));n[a]=`| ${u.join(" | ")} |`,a+=1}return n.join(`
|
|
116
|
+
`)},Pl=({children:e,className:t,onCopy:r,onError:n,timeout:a=2e3})=>{let s=q(),[i,l]=k.useState(!1),[u,c]=k.useState(!1),d=k.useRef(null),f=k.useRef(0),{isAnimating:h}=k.useContext(_e),g=$e(),b=async y=>{var S,L;if(typeof window>"u"||!((S=navigator?.clipboard)!=null&&S.write)){n?.(new Error("Clipboard API not available"));return}try{let D=(L=d.current)==null?void 0:L.closest('[data-streamdown="table-wrapper"]'),P=D?.querySelector("table");if(!P){n?.(new Error("Table not found"));return}let v=Ol(P),G=({csv:Dl,tsv:DT,md:fa}[y]||fa)(v),O=new ClipboardItem({"text/plain":new Blob([G],{type:"text/plain"}),"text/html":new Blob([P.outerHTML],{type:"text/html"})});await navigator.clipboard.write([O]),c(!0),l(!1),r?.(y),f.current=window.setTimeout(()=>c(!1),a)}catch(D){n?.(D)}};k.useEffect(()=>{let y=S=>{let L=S.composedPath();d.current&&!L.includes(d.current)&&l(!1)};return document.addEventListener("mousedown",y),()=>{document.removeEventListener("mousedown",y),window.clearTimeout(f.current)}},[]);let _=Le(),A=u?_.CheckIcon:_.CopyIcon;return T.jsxs("div",{className:s("relative"),ref:d,children:[T.jsx("button",{className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:h,onClick:()=>l(!i),title:g.copyTable,type:"button",children:e??T.jsx(A,{height:14,width:14})}),i?T.jsxs("div",{className:s("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[T.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>b("md"),title:g.copyTableAsMarkdown,type:"button",children:g.tableFormatMarkdown}),T.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>b("csv"),title:g.copyTableAsCsv,type:"button",children:g.tableFormatCsv}),T.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>b("tsv"),title:g.copyTableAsTsv,type:"button",children:g.tableFormatTsv})]}):null]})},vl=({children:e,className:t,onDownload:r,onError:n})=>{let a=q(),[s,i]=k.useState(!1),l=k.useRef(null),{isAnimating:u}=k.useContext(_e),c=$e(),d=Le(),f=h=>{var g;try{let b=(g=l.current)==null?void 0:g.closest('[data-streamdown="table-wrapper"]'),_=b?.querySelector("table");if(!_){n?.(new Error("Table not found"));return}let A=Ol(_),y=h==="csv"?Dl(A):fa(A);Dt(`table.${h==="csv"?"csv":"md"}`,y,h==="csv"?"text/csv":"text/markdown"),i(!1),r?.(h)}catch(b){n?.(b)}};return k.useEffect(()=>{let h=g=>{let b=g.composedPath();l.current&&!b.includes(l.current)&&i(!1)};return document.addEventListener("mousedown",h),()=>{document.removeEventListener("mousedown",h)}},[]),T.jsxs("div",{className:a("relative"),ref:l,children:[T.jsx("button",{className:a("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:u,onClick:()=>i(!s),title:c.downloadTable,type:"button",children:e??T.jsx(d.DownloadIcon,{size:14})}),s?T.jsxs("div",{className:a("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[T.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>f("csv"),title:c.downloadTableAsCsv,type:"button",children:c.tableFormatCsv}),T.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>f("markdown"),title:c.downloadTableAsMarkdown,type:"button",children:c.tableFormatMarkdown})]}):null]})},PT=({children:e,className:t,showCopy:r=!0,showDownload:n=!0})=>{let{Maximize2Icon:a,XIcon:s}=Le(),i=q(),[l,u]=k.useState(!1),{isAnimating:c}=k.useContext(_e),d=$e(),f=()=>{u(!0)},h=()=>{u(!1)};return k.useEffect(()=>{if(l){rs();let g=b=>{b.key==="Escape"&&u(!1)};return document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g),ns()}}},[l]),T.jsxs(T.Fragment,{children:[T.jsx("button",{className:i("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:c,onClick:f,title:d.viewFullscreen,type:"button",children:T.jsx(a,{size:14})}),l?Gi.createPortal(T.jsx("div",{"aria-label":d.viewFullscreen,"aria-modal":"true",className:i("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:h,onKeyDown:g=>{g.key==="Escape"&&h()},role:"dialog",children:T.jsxs("div",{className:i("flex h-full flex-col"),onClick:g=>g.stopPropagation(),onKeyDown:g=>g.stopPropagation(),role:"presentation",children:[T.jsxs("div",{className:i("flex items-center justify-end gap-1 p-4"),children:[r?T.jsx(Pl,{}):null,n?T.jsx(vl,{}):null,T.jsx("button",{className:i("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:h,title:d.exitFullscreen,type:"button",children:T.jsx(s,{size:20})})]}),T.jsx("div",{className:i("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:T.jsx("table",{className:i("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),document.body):null]})},vT=({children:e,className:t,showControls:r,showCopy:n=!0,showDownload:a=!0,showFullscreen:s=!0,...i})=>{let l=q(),u=r&&n,c=r&&a,d=r&&s,f=u||c||d;return T.jsxs("div",{className:l("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"),"data-streamdown":"table-wrapper",children:[f?T.jsxs("div",{className:l("flex items-center justify-end gap-1"),children:[u?T.jsx(Pl,{}):null,c?T.jsx(vl,{}):null,d?T.jsx(PT,{showCopy:u,showDownload:c,children:e}):null]}):null,T.jsx("div",{className:l("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),children:T.jsx("table",{className:l("w-full divide-y divide-border",t),"data-streamdown":"table",...i,children:e})})]})},MT=/startLine=(\d+)/,BT=k.lazy(()=>Qi(()=>Promise.resolve().then(()=>S3),void 0).then(e=>({default:e.Mermaid}))),FT=/language-([^\s]+)/;function gn(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let r=e.position.start,n=t.position.start,a=e.position.end,s=t.position.end;return r?.line===n?.line&&r?.column===n?.column&&a?.line===s?.line&&a?.column===s?.column}function re(e,t){return e.className===t.className&&gn(e.node,t.node)}var ha=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,zn=(e,t)=>{if(typeof e=="boolean")return e;let r=e.table;return r===!1?!1:r===!0||r===void 0?!0:r[t]!==!1},Di=(e,t)=>{if(typeof e=="boolean")return e;let r=e.code;return r===!1?!1:r===!0||r===void 0?!0:r[t]!==!1},Br=(e,t)=>{if(typeof e=="boolean")return e;let r=e.mermaid;return r===!1?!1:r===!0||r===void 0?!0:r[t]!==!1},is=k.memo(({children:e,className:t,node:r,...n})=>{let a=q();return T.jsx("ol",{className:a("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...n,children:e})},(e,t)=>re(e,t));is.displayName="MarkdownOl";var Ml=k.memo(({children:e,className:t,node:r,...n})=>{let a=q();return T.jsx("li",{className:a("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...n,children:e})},(e,t)=>e.className===t.className&&gn(e.node,t.node));Ml.displayName="MarkdownLi";var Bl=k.memo(({children:e,className:t,node:r,...n})=>{let a=q();return T.jsx("ul",{className:a("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...n,children:e})},(e,t)=>re(e,t));Bl.displayName="MarkdownUl";var Fl=k.memo(({className:e,node:t,...r})=>{let n=q();return T.jsx("hr",{className:n("my-6 border-border",e),"data-streamdown":"horizontal-rule",...r})},(e,t)=>re(e,t));Fl.displayName="MarkdownHr";var Hl=k.memo(({children:e,className:t,node:r,...n})=>{let a=q();return T.jsx("span",{className:a("font-semibold",t),"data-streamdown":"strong",...n,children:e})},(e,t)=>re(e,t));Hl.displayName="MarkdownStrong";var HT=({children:e,className:t,href:r,node:n,...a})=>{let s=q(),{linkSafety:i}=k.useContext(_e),[l,u]=k.useState(!1),c=r==="streamdown:incomplete-link",d=k.useCallback(async b=>{if(!(!(i!=null&&i.enabled&&r)||c)){if(b.preventDefault(),i.onLinkCheck&&await i.onLinkCheck(r)){window.open(r,"_blank","noreferrer");return}u(!0)}},[i,r,c]),f=k.useCallback(()=>{r&&window.open(r,"_blank","noreferrer")},[r]),h=k.useCallback(()=>{u(!1)},[]),g={url:r??"",isOpen:l,onClose:h,onConfirm:f};return i!=null&&i.enabled&&r?T.jsxs(T.Fragment,{children:[T.jsx("button",{className:s("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":c,"data-streamdown":"link",onClick:d,type:"button",children:e}),i.renderModal?i.renderModal(g):T.jsx(ST,{...g})]}):T.jsx("a",{className:s("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":c,"data-streamdown":"link",href:r,rel:"noreferrer",target:"_blank",...a,children:e})},Ul=k.memo(HT,(e,t)=>re(e,t)&&e.href===t.href);Ul.displayName="MarkdownA";var jl=k.memo(({children:e,className:t,node:r,...n})=>{let a=q();return T.jsx("h1",{className:a("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...n,children:e})},(e,t)=>re(e,t));jl.displayName="MarkdownH1";var zl=k.memo(({children:e,className:t,node:r,...n})=>{let a=q();return T.jsx("h2",{className:a("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...n,children:e})},(e,t)=>re(e,t));zl.displayName="MarkdownH2";var $l=k.memo(({children:e,className:t,node:r,...n})=>{let a=q();return T.jsx("h3",{className:a("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...n,children:e})},(e,t)=>re(e,t));$l.displayName="MarkdownH3";var Yl=k.memo(({children:e,className:t,node:r,...n})=>{let a=q();return T.jsx("h4",{className:a("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...n,children:e})},(e,t)=>re(e,t));Yl.displayName="MarkdownH4";var ql=k.memo(({children:e,className:t,node:r,...n})=>{let a=q();return T.jsx("h5",{className:a("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...n,children:e})},(e,t)=>re(e,t));ql.displayName="MarkdownH5";var Vl=k.memo(({children:e,className:t,node:r,...n})=>{let a=q();return T.jsx("h6",{className:a("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...n,children:e})},(e,t)=>re(e,t));Vl.displayName="MarkdownH6";var Wl=k.memo(({children:e,className:t,node:r,...n})=>{let{controls:a}=k.useContext(_e),s=ha(a,"table"),i=zn(a,"copy"),l=zn(a,"download"),u=zn(a,"fullscreen");return T.jsx(vT,{className:t,showControls:s,showCopy:i,showDownload:l,showFullscreen:u,...n,children:e})},(e,t)=>re(e,t));Wl.displayName="MarkdownTable";var Gl=k.memo(({children:e,className:t,node:r,...n})=>{let a=q();return T.jsx("thead",{className:a("bg-muted/80",t),"data-streamdown":"table-header",...n,children:e})},(e,t)=>re(e,t));Gl.displayName="MarkdownThead";var Ql=k.memo(({children:e,className:t,node:r,...n})=>{let a=q();return T.jsx("tbody",{className:a("divide-y divide-border",t),"data-streamdown":"table-body",...n,children:e})},(e,t)=>re(e,t));Ql.displayName="MarkdownTbody";var Xl=k.memo(({children:e,className:t,node:r,...n})=>{let a=q();return T.jsx("tr",{className:a("border-border",t),"data-streamdown":"table-row",...n,children:e})},(e,t)=>re(e,t));Xl.displayName="MarkdownTr";var Kl=k.memo(({children:e,className:t,node:r,...n})=>{let a=q();return T.jsx("th",{className:a("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...n,children:e})},(e,t)=>re(e,t));Kl.displayName="MarkdownTh";var Zl=k.memo(({children:e,className:t,node:r,...n})=>{let a=q();return T.jsx("td",{className:a("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...n,children:e})},(e,t)=>re(e,t));Zl.displayName="MarkdownTd";var Jl=k.memo(({children:e,className:t,node:r,...n})=>{let a=q();return T.jsx("blockquote",{className:a("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...n,children:e})},(e,t)=>re(e,t));Jl.displayName="MarkdownBlockquote";var ec=k.memo(({children:e,className:t,node:r,...n})=>{let a=q();return T.jsx("sup",{className:a("text-sm",t),"data-streamdown":"superscript",...n,children:e})},(e,t)=>re(e,t));ec.displayName="MarkdownSup";var tc=k.memo(({children:e,className:t,node:r,...n})=>{let a=q();return T.jsx("sub",{className:a("text-sm",t),"data-streamdown":"subscript",...n,children:e})},(e,t)=>re(e,t));tc.displayName="MarkdownSub";var rc=k.memo(({children:e,className:t,node:r,...n})=>{if("data-footnotes"in n){let a=i=>{var l,u;if(!k.isValidElement(i))return!1;let c=Array.isArray(i.props.children)?i.props.children:[i.props.children],d=!1,f=!1;for(let h of c)if(h){if(typeof h=="string")h.trim()!==""&&(d=!0);else if(k.isValidElement(h))if(((l=h.props)==null?void 0:l["data-footnote-backref"])!==void 0)f=!0;else{let g=Array.isArray(h.props.children)?h.props.children:[h.props.children];for(let b of g){if(typeof b=="string"&&b.trim()!==""){d=!0;break}if(k.isValidElement(b)&&((u=b.props)==null?void 0:u["data-footnote-backref"])===void 0){d=!0;break}}}}return f&&!d},s=Array.isArray(e)?e.map(i=>{if(!k.isValidElement(i))return i;if(i.type===is){let l=(Array.isArray(i.props.children)?i.props.children:[i.props.children]).filter(u=>!a(u));return l.length===0?null:{...i,props:{...i.props,children:l}}}return i}):e;return(Array.isArray(s)?s.some(i=>i!==null):s!==null)?T.jsx("section",{className:t,...n,children:s}):null}return T.jsx("section",{className:t,...n,children:e})},(e,t)=>re(e,t));rc.displayName="MarkdownSection";var UT=({node:e,className:t,children:r,...n})=>{var a,s;let i=q(),l=!("data-block"in n),{mermaid:u,controls:c}=k.useContext(_e),d=ss(),f=nT(),h=t?.match(FT),g=(a=h?.at(1))!=null?a:"",b=wT(g);if(l)return T.jsx("code",{className:i("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...n,children:r});let _=(s=e?.properties)==null?void 0:s.metastring,A=_?.match(MT),y=A?Number.parseInt(A[1],10):void 0,S=y!==void 0&&y>=1?y:void 0,L="";if(k.isValidElement(r)&&r.props&&typeof r.props=="object"&&"children"in r.props&&typeof r.props.children=="string"?L=r.props.children:typeof r=="string"&&(L=r),b){let G=b.component;return T.jsx(k.Suspense,{fallback:T.jsx(Oi,{}),children:T.jsx(G,{code:L,isIncomplete:f,language:g})})}if(g==="mermaid"&&d){let G=ha(c,"mermaid"),O=Br(c,"download"),Q=Br(c,"copy"),N=Br(c,"fullscreen"),K=Br(c,"panZoom"),ue=G&&(O||Q||N);return T.jsx(k.Suspense,{fallback:T.jsx(Oi,{}),children:T.jsxs("div",{className:i("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",t),"data-streamdown":"mermaid-block",children:[T.jsx("div",{className:i("flex h-8 items-center text-muted-foreground text-xs"),children:T.jsx("span",{className:i("ml-1 font-mono lowercase"),children:"mermaid"})}),ue?T.jsx("div",{className:i("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:T.jsxs("div",{className:i("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"mermaid-block-actions",children:[O?T.jsx(RT,{chart:L,config:u?.config}):null,Q?T.jsx(Li,{code:L}):null,N?T.jsx(OT,{chart:L,config:u?.config}):null]})}):null,T.jsx("div",{className:i("rounded-md border border-border bg-background"),children:T.jsx(BT,{chart:L,config:u?.config,showControls:K})})]})})}let D=ha(c,"code"),P=Di(c,"download"),v=Di(c,"copy");return T.jsx(hT,{className:t,code:L,isIncomplete:f,language:g,startLine:S,children:D?T.jsxs(T.Fragment,{children:[P?T.jsx(CT,{code:L,language:g}):null,v?T.jsx(Li,{}):null]}):null})},nc=k.memo(UT,(e,t)=>e.className===t.className&&gn(e.node,t.node));nc.displayName="MarkdownCode";var ac=k.memo(IT,(e,t)=>e.className===t.className&&gn(e.node,t.node));ac.displayName="MarkdownImg";var sc=k.memo(({children:e,node:t,...r})=>{let n=(Array.isArray(e)?e:[e]).filter(a=>a!=null&&a!=="");if(n.length===1&&k.isValidElement(n[0])){let a=n[0].props.node,s=a?.tagName;if(s==="img")return T.jsx(T.Fragment,{children:e});if(s==="code"&&"data-block"in n[0].props)return T.jsx(T.Fragment,{children:e})}return T.jsx("p",{...r,children:e})},(e,t)=>re(e,t));sc.displayName="MarkdownParagraph";var jT={ol:is,li:Ml,ul:Bl,hr:Fl,strong:Hl,a:Ul,h1:jl,h2:zl,h3:$l,h4:Yl,h5:ql,h6:Vl,table:Wl,thead:Gl,tbody:Ql,tr:Xl,th:Kl,td:Zl,blockquote:Jl,code:nc,img:ac,pre:({children:e})=>k.isValidElement(e)?k.cloneElement(e,{"data-block":"true"}):e,sup:ec,sub:tc,p:sc,section:rc},zT=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,$T=new RegExp("\\p{L}","u");function Pi(e){let t=e.replace(/^#{1,6}\s+/gm,"").replace(/(\*{1,3}|_{1,3})/g,"").replace(/`[^`]*`/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^[\s>*\-+\d.]+/gm,"");for(let r of t){if(zT.test(r))return"rtl";if($T.test(r))return"ltr"}return"ltr"}var YT=/^[ \t]{0,3}(`{3,}|~{3,})/,qT=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,vi=e=>{let t=e.split(`
|
|
117
|
+
`),r=null,n=0;for(let a of t){let s=YT.exec(a);if(r===null){if(s){let i=s[1];r=i[0],n=i.length}}else if(s){let i=s[1],l=i[0],u=i.length;l===r&&u>=n&&(r=null,n=0)}}return r!==null},VT=e=>{let t=e.split(`
|
|
118
|
+
`);for(let r of t){let n=r.trim();if(n.length>0&&n.includes("|")&&qT.test(n))return!0}return!1},WT=()=>e=>{Me(e,"html",(t,r,n)=>{!n||typeof r!="number"||(n.children[r]={type:"text",value:t.value})})},Mi=[],Bi={allowDangerousHtml:!0},Fr=new WeakMap,GT=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let r=e.rehypePlugins,n=e.remarkPlugins,a=e.remarkRehypeOptions;if(!(r||n||a)){let d="default";return this.keyCache.set(e,d),d}let s=d=>{if(!d||d.length===0)return"";let f="";for(let h=0;h<d.length;h+=1){let g=d[h];if(h>0&&(f+=","),Array.isArray(g)){let[b,_]=g;if(typeof b=="function"){let A=Fr.get(b);A||(A=b.name,Fr.set(b,A)),f+=A}else f+=String(b);f+=":",f+=JSON.stringify(_)}else if(typeof g=="function"){let b=Fr.get(g);b||(b=g.name,Fr.set(g,b)),f+=b}else f+=String(g)}return f},i=s(r),l=s(n),u=a?JSON.stringify(a):"",c=`${l}::${i}::${u}`;return this.keyCache.set(e,c),c}get(e){let t=this.generateCacheKey(e),r=this.cache.get(t);return r&&(this.cache.delete(t),this.cache.set(t,r)),r}set(e,t){let r=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let n=this.cache.keys().next().value;n&&this.cache.delete(n)}this.cache.set(r,t)}clear(){this.cache.clear()}},Fi=new GT,ic=e=>{let t=QT(e),r=e.children||"",n=t.runSync(t.parse(r),r);return t3(n,e)},QT=e=>{let t=Fi.get(e);if(t)return t;let r=KT(e);return Fi.set(e,r),r},XT=e=>e.some(t=>Array.isArray(t)?t[0]===Jn:t===Jn),KT=e=>{let t=e.rehypePlugins||Mi,r=e.remarkPlugins||Mi,n=XT(t)?r:[...r,WT],a=e.remarkRehypeOptions?{...Bi,...e.remarkRehypeOptions}:Bi;return KE().use(Xg).use(n).use(OE,a).use(t)},uc=e=>e,ZT=(e,t,r,n)=>{r?e.children.splice(t,1):e.children[t]={type:"text",value:n}},JT=(e,t)=>{var r;for(let n in On)if(Object.hasOwn(On,n)&&Object.hasOwn(e.properties,n)){let a=e.properties[n],s=On[n];(s===null||s.includes(e.tagName))&&(e.properties[n]=(r=t(String(a||""),n,e))!=null?r:void 0)}},e3=(e,t,r,n,a,s)=>{let i=!1;return n?i=!n.includes(e.tagName):a&&(i=a.includes(e.tagName)),!i&&s&&typeof t=="number"&&(i=!s(e,t,r)),i},t3=(e,t)=>{let{allowElement:r,allowedElements:n,disallowedElements:a,skipHtml:s,unwrapDisallowed:i,urlTransform:l}=t;if(r||n||a||s||l){let u=l||uc;Me(e,(c,d,f)=>{if(c.type==="raw"&&f&&typeof d=="number")return ZT(f,d,s,c.value),d;if(c.type==="element"&&(JT(c,u),e3(c,d,f,n,a,r)&&f&&typeof d=="number"))return i&&c.children?f.children.splice(d,1,...c.children):f.children.splice(d,1),d})}return Pg(e,{Fragment:T.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:T.jsx,jsxs:T.jsxs,passKeys:!0,passNode:!0})},r3=/\[\^[\w-]{1,200}\](?!:)/,n3=/\[\^[\w-]{1,200}\]:/,a3=/<(\w+)[\s>]/,s3=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Hi=new Map,Ui=new Map,i3=e=>{let t=e.toLowerCase(),r=Hi.get(t);if(r)return r;let n=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return Hi.set(t,n),n},u3=e=>{let t=e.toLowerCase(),r=Ui.get(t);if(r)return r;let n=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return Ui.set(t,n),n},ji=(e,t)=>{if(s3.has(t.toLowerCase()))return 0;let r=e.match(i3(t));if(!r)return 0;let n=0;for(let a of r)a.trimEnd().endsWith("/>")||(n+=1);return n},zi=(e,t)=>{let r=e.match(u3(t));return r?r.length:0},o3=e=>{let t=0;for(let r=0;r<e.length-1;r+=1)e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},l3=e=>{let t=r3.test(e),r=n3.test(e);if(t||r)return[e];let n=Ce.lex(e,{gfm:!0}),a=[],s=[],i=!1;for(let l of n){let u=l.raw,c=a.length;if(s.length>0){a[c-1]+=u;let d=s.at(-1),f=ji(u,d),h=zi(u,d);for(let g=0;g<f;g+=1)s.push(d);for(let g=0;g<h;g+=1)s.length>0&&s.at(-1)===d&&s.pop();continue}if(l.type==="html"&&l.block){let d=u.match(a3);if(d){let f=d[1],h=ji(u,f),g=zi(u,f);h>g&&s.push(f)}}if(c>0&&!i){let d=a[c-1];if(o3(d)%2===1){a[c-1]=d+u;continue}}a.push(u),l.type!=="space"&&(i=l.type==="code")}return a},c3=(e,t)=>{if(!t.length)return e;let r=e;for(let n of t){let a=new RegExp(`(<${n}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${n}\\s*>)`,"gi");r=r.replace(a,(s,i,l,u)=>{let c=l.replace(/\n\n/g,`
|
|
119
|
+
<!---->
|
|
120
|
+
`);return i+c+u})}return r},d3=/([\\`*_~[\]|])/g,f3=e=>e.replace(d3,"\\$1"),h3=(e,t)=>{if(!t.length)return e;let r=e;for(let n of t){let a=new RegExp(`(<${n}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${n}\\s*>)`,"gi");r=r.replace(a,(s,i,l,u)=>i+f3(l)+u)}return r},oc=e=>e.type==="text"?e.value:"children"in e&&Array.isArray(e.children)?e.children.map(oc).join(""):"",p3=e=>t=>{if(!e||e.length===0)return;let r=new Set(e.map(n=>n.toLowerCase()));Me(t,"element",n=>{if(r.has(n.tagName.toLowerCase())){let a=oc(n);n.children=a?[{type:"text",value:a}]:[]}})},m3=()=>e=>{Me(e,"code",t=>{var r,n;t.meta&&(t.data=(r=t.data)!=null?r:{},t.data.hProperties={...(n=t.data.hProperties)!=null?n:{},metastring:t.meta})})},b3=/^[ \t]*<[\w!/?-]/,g3=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,E3=e=>typeof e!="string"||e.length===0||!b3.test(e)?e:e.replace(g3,"$1"),$i,Yi,qi,Vi,zr={...pt,protocols:{...pt.protocols,href:[...(Yi=($i=pt.protocols)==null?void 0:$i.href)!=null?Yi:[],"tel"]},attributes:{...pt.attributes,code:[...(Vi=(qi=pt.attributes)==null?void 0:qi.code)!=null?Vi:[],"metastring"]}},pa={raw:Jn,sanitize:[ho,zr],harden:[wd,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},lc={gfm:[_1,{}],codeMeta:m3},Wi=Object.values(pa),T3=Object.values(lc),k3={block:" ▋",circle:" ●"},x3={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},_e=k.createContext(x3),us=k.memo(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:r,index:n,isIncomplete:a,dir:s,animatePlugin:i,...l})=>{if(i){let d=i.getLastRenderCharCount();i.setPrevContentLength(d)}let u=typeof e=="string"&&r?E3(e):e,c=T.jsx(ic,{...l,children:u});return T.jsx(Il.Provider,{value:a,children:s?T.jsx("div",{dir:s,style:{display:"contents"},children:c}):c})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete||e.dir!==t.dir)return!1;if(e.components!==t.components){let r=Object.keys(e.components||{}),n=Object.keys(t.components||{});if(r.length!==n.length||r.some(a=>{var s,i;return((s=e.components)==null?void 0:s[a])!==((i=t.components)==null?void 0:i[a])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});us.displayName="Block";var A3=["github-light","github-dark"],cc=k.memo(({children:e,mode:t="streaming",dir:r,parseIncompleteMarkdown:n=!0,normalizeHtmlIndentation:a=!1,components:s,rehypePlugins:i=Wi,remarkPlugins:l=T3,className:u,shikiTheme:c=A3,mermaid:d,controls:f=!0,isAnimating:h=!1,animated:g,BlockComponent:b=us,parseMarkdownIntoBlocksFn:_=l3,caret:A,plugins:y,remend:S,linkSafety:L={enabled:!0},allowedTags:D,literalTagContent:P,translations:v,icons:G,prefix:O,onAnimationStart:Q,onAnimationEnd:N,...K})=>{let ue=k.useId(),[Re,z]=k.useTransition(),H=k.useMemo(()=>sT(O),[O]),F=k.useRef(null),Z=k.useRef(Q),He=k.useRef(N);Z.current=Q,He.current=N,k.useEffect(()=>{var V,te,Ie;if(t==="static")return;let We=F.current;if(F.current=h,We===null){h&&((V=Z.current)==null||V.call(Z));return}h&&!We?(te=Z.current)==null||te.call(Z):!h&&We&&((Ie=He.current)==null||Ie.call(He))},[h,t]);let ut=k.useMemo(()=>D?Object.keys(D):[],[D]),U=k.useMemo(()=>{if(typeof e!="string")return"";let V=t==="streaming"&&n?Lb(e,S):e;return P&&P.length>0&&(V=h3(V,P)),ut.length>0&&(V=c3(V,ut)),V},[e,t,n,S,ut,P]),Ye=k.useMemo(()=>_(U),[U,_]),[Ir,zt]=k.useState(Ye);k.useEffect(()=>{t==="streaming"&&!Ve?z(()=>{zt(Ye)}):zt(Ye)},[Ye,t]);let be=t==="streaming"?Ir:Ye,oe=k.useMemo(()=>r==="auto"?be.map(Pi):void 0,[be,r]),de=k.useMemo(()=>be.map((V,te)=>`${ue}-${te}`),[be.length,ue]),qe=k.useMemo(()=>g===!0?"true":g?JSON.stringify(g):"",[g]),Ve=k.useMemo(()=>qe?qe==="true"?oa():oa(g):null,[qe]),ne=k.useMemo(()=>{var V,te;return{shikiTheme:(te=(V=y?.code)==null?void 0:V.getThemes())!=null?te:c,controls:f,isAnimating:h,mode:t,mermaid:d,linkSafety:L}},[c,f,h,t,d,L,y?.code]),Sr=k.useMemo(()=>v?JSON.stringify(v):"",[v]),ot=k.useMemo(()=>({...Rl,...v}),[Sr]),lt=k.useMemo(()=>{let{inlineCode:V,...te}=s??{},Ie={...jT,...te};if(V){let We=Ie.code;Ie.code=$t=>"data-block"in $t?We?k.createElement(We,$t):null:k.createElement(V,$t)}return Ie},[s]),Ct=k.useMemo(()=>{let V=[];return y!=null&&y.cjk&&(V=[...V,...y.cjk.remarkPluginsBefore]),V=[...V,...l],y!=null&&y.cjk&&(V=[...V,...y.cjk.remarkPluginsAfter]),y!=null&&y.math&&(V=[...V,y.math.remarkPlugin]),V},[l,y?.math,y?.cjk]),ct=k.useMemo(()=>{var V;let te=i;if(D&&Object.keys(D).length>0&&i===Wi){let Ie={...zr,tagNames:[...(V=zr.tagNames)!=null?V:[],...Object.keys(D)],attributes:{...zr.attributes,...D}};te=[pa.raw,[ho,Ie],pa.harden]}return P&&P.length>0&&(te=[...te,[p3,P]]),y!=null&&y.math&&(te=[...te,y.math.rehypePlugin]),Ve&&h&&(te=[...te,Ve.rehypePlugin]),te},[i,y?.math,Ve,h,D,P]),En=k.useMemo(()=>{if(!h||be.length===0)return!1;let V=be.at(-1);return vi(V)||VT(V)},[h,be]),fc=k.useMemo(()=>A&&h&&!En?{"--streamdown-caret":`"${k3[A]}"`}:void 0,[A,h,En]);return t==="static"?T.jsx(ca.Provider,{value:ot,children:T.jsx(da.Provider,{value:y??null,children:T.jsx(_e.Provider,{value:ne,children:T.jsx(wi,{icons:G,children:T.jsx(la.Provider,{value:H,children:T.jsx("div",{className:H("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",u),dir:r==="auto"?Pi(U):r,children:T.jsx(ic,{components:lt,rehypePlugins:ct,remarkPlugins:Ct,...K,children:U})})})})})})}):T.jsx(ca.Provider,{value:ot,children:T.jsx(da.Provider,{value:y??null,children:T.jsx(_e.Provider,{value:ne,children:T.jsx(wi,{icons:G,children:T.jsx(la.Provider,{value:H,children:T.jsxs("div",{className:H("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",A&&!En?"*:last:after:inline *:last:after:align-baseline *:last:after:content-[var(--streamdown-caret)]":null,u),style:fc,children:[be.length===0&&A&&h&&T.jsx("span",{}),be.map((V,te)=>{var Ie;let We=te===be.length-1,$t=h&&We&&vi(V);return T.jsx(b,{animatePlugin:Ve,components:lt,content:V,dir:(Ie=oe?.[te])!=null?Ie:r!=="auto"?r:void 0,index:te,isIncomplete:$t,rehypePlugins:ct,remarkPlugins:Ct,shouldNormalizeHtmlIndentation:a,shouldParseIncompleteMarkdown:n,...K},de[te])})]})})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir);cc.displayName="Streamdown";var _3=({children:e,className:t,minZoom:r=.5,maxZoom:n=3,zoomStep:a=.1,showControls:s=!0,initialZoom:i=1,fullscreen:l=!1})=>{let{RotateCcwIcon:u,ZoomInIcon:c,ZoomOutIcon:d}=Le(),f=q(),h=k.useRef(null),g=k.useRef(null),[b,_]=k.useState(i),[A,y]=k.useState({x:0,y:0}),[S,L]=k.useState(!1),[D,P]=k.useState({x:0,y:0}),[v,G]=k.useState({x:0,y:0}),O=k.useCallback(F=>{_(Z=>Math.max(r,Math.min(n,Z+F)))},[r,n]),Q=k.useCallback(()=>{O(a)},[O,a]),N=k.useCallback(()=>{O(-a)},[O,a]),K=k.useCallback(()=>{_(i),y({x:0,y:0})},[i]),ue=k.useCallback(F=>{F.preventDefault();let Z=F.deltaY>0?-a:a;O(Z)},[O,a]),Re=k.useCallback(F=>{if(F.button!==0||F.isPrimary===!1)return;L(!0),P({x:F.clientX,y:F.clientY}),G(A);let Z=F.currentTarget;Z instanceof HTMLElement&&Z.setPointerCapture(F.pointerId)},[A]),z=k.useCallback(F=>{if(!S)return;F.preventDefault();let Z=F.clientX-D.x,He=F.clientY-D.y;y({x:v.x+Z,y:v.y+He})},[S,D,v]),H=k.useCallback(F=>{L(!1);let Z=F.currentTarget;Z instanceof HTMLElement&&Z.releasePointerCapture(F.pointerId)},[]);return k.useEffect(()=>{let F=h.current;if(F)return F.addEventListener("wheel",ue,{passive:!1}),()=>{F.removeEventListener("wheel",ue)}},[ue]),k.useEffect(()=>{let F=g.current;if(F&&S)return document.body.style.userSelect="none",F.addEventListener("pointermove",z,{passive:!1}),F.addEventListener("pointerup",H),F.addEventListener("pointercancel",H),()=>{document.body.style.userSelect="",F.removeEventListener("pointermove",z),F.removeEventListener("pointerup",H),F.removeEventListener("pointercancel",H)}},[S,z,H]),T.jsxs("div",{className:f("relative flex flex-col",l?"h-full w-full":"min-h-28 w-full",t),ref:h,style:{cursor:S?"grabbing":"grab"},children:[s?T.jsxs("div",{className:f("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm",l?"bottom-4 left-4":"bottom-2 left-2"),children:[T.jsx("button",{className:f("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:b>=n,onClick:Q,title:"Zoom in",type:"button",children:T.jsx(c,{size:16})}),T.jsx("button",{className:f("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:b<=r,onClick:N,title:"Zoom out",type:"button",children:T.jsx(d,{size:16})}),T.jsx("button",{className:f("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"),onClick:K,title:"Reset zoom and pan",type:"button",children:T.jsx(u,{size:16})})]}):null,T.jsx("div",{className:f("flex-1 origin-center transition-transform duration-150 ease-out",l?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:Re,ref:g,role:"application",style:{transform:`translate(${A.x}px, ${A.y}px) scale(${b})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},dc=({chart:e,className:t,config:r,fullscreen:n=!1,showControls:a=!0})=>{let s=q(),[i,l]=k.useState(null),[u,c]=k.useState(!1),[d,f]=k.useState(""),[h,g]=k.useState(""),[b,_]=k.useState(0),{mermaid:A}=k.useContext(_e),y=ss(),S=A?.errorComponent,{shouldRender:L,containerRef:D}=W2({immediate:n});if(k.useEffect(()=>{if(L){if(!y){l("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{l(null),c(!0);let v=y.getMermaid(r),G=e.split("").reduce((N,K)=>(N<<5)-N+K.charCodeAt(0)|0,0),O=`mermaid-${Math.abs(G)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:Q}=await v.render(O,e);f(Q),g(Q)}catch(v){if(!(h||d)){let G=v instanceof Error?v.message:"Failed to render Mermaid chart";l(G)}}finally{c(!1)}})()}},[e,r,b,L,y]),!(L||d||h))return T.jsx("div",{className:s("my-4 min-h-[200px]",t),ref:D});if(u&&!d&&!h)return T.jsx("div",{className:s("my-4 flex justify-center p-4",t),ref:D,children:T.jsxs("div",{className:s("flex items-center space-x-2 text-muted-foreground"),children:[T.jsx("div",{className:s("h-4 w-4 animate-spin rounded-full border-current border-b-2")}),T.jsx("span",{className:s("text-sm"),children:"Loading diagram..."})]})});if(i&&!d&&!h){let v=()=>_(G=>G+1);return S?T.jsx("div",{ref:D,children:T.jsx(S,{chart:e,error:i,retry:v})}):T.jsxs("div",{className:s("rounded-md bg-red-50 p-4",t),ref:D,children:[T.jsxs("p",{className:s("font-mono text-red-700 text-sm"),children:["Mermaid Error: ",i]}),T.jsxs("details",{className:s("mt-2"),children:[T.jsx("summary",{className:s("cursor-pointer text-red-600 text-xs"),children:"Show Code"}),T.jsx("pre",{className:s("mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs"),children:e})]})]})}let P=d||h;return T.jsx("div",{className:s("size-full",t),"data-streamdown":"mermaid",ref:D,children:T.jsx(_3,{className:s(n?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:n,maxZoom:3,minZoom:.5,showControls:a,zoomStep:.1,children:T.jsx("div",{"aria-label":"Mermaid chart",className:s("flex justify-center",n?"size-full items-center":null),dangerouslySetInnerHTML:{__html:P},role:"img"})})})};function y3(e){return k.createElement(us,{...e,key:e.content})}const C3=(e,t,r)=>Zi(e)?e:uc(e);function N3(e){if(!(e instanceof Element))return null;const t=e.closest("a[href]");return t instanceof HTMLAnchorElement?t:null}function I3({baseCwd:e,content:t,galleryContent:r,additionalImages:n,onOpenRemoteFile:a}){const s=k.useMemo(()=>Tc(t),[t]),i=k.useMemo(()=>({img:({src:u,alt:c})=>T.jsx(kc,{src:typeof u=="string"?u:"",alt:c,cwd:e,onOpen:a,gallery:()=>[...Ec(r?.()??t,e),...(n??[]).map(d=>({src:d,cwd:e}))]})}),[e,t,r,n,a]),l=u=>{if(u.defaultPrevented||u.button!==0)return;const c=N3(u.target),d=Zi(c?.getAttribute("href"));d&&(u.preventDefault(),a(d,e))};return T.jsx("div",{className:"message-markdown",onClick:l,children:T.jsx(cc,{BlockComponent:y3,isAnimating:!1,linkSafety:{enabled:!1},urlTransform:C3,remarkPlugins:[Ad,...Object.values(lc),xc],components:i,children:s})})}const v3=Object.freeze(Object.defineProperty({__proto__:null,MessageMarkdown:I3},Symbol.toStringTag,{value:"Module"})),S3=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:dc},Symbol.toStringTag,{value:"Module"}));export{oT as B,P3 as M,_e as R,I3 as a,v3 as b};
|