db-studio 2.1.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +69 -69
- package/dist/index.js.map +1 -1
- package/dist/web-dist/assets/_pathlessLayout-1KXlcJn5.js +1 -0
- package/dist/web-dist/assets/_pathlessLayout-D4dS7_ZZ.js +2 -0
- package/dist/web-dist/assets/_queryId-DfjPCkx7.js +1 -0
- package/dist/web-dist/assets/_table-ChX0JQnV.js +1 -0
- package/dist/web-dist/assets/{_table-BUNHOVIK.js → _table-DQvTfc38.js} +1 -1
- package/dist/web-dist/assets/_table-M7xRcFSl.js +1 -0
- package/dist/web-dist/assets/{abap-B-HzHdT_.js → abap-DYZIj1QT.js} +1 -1
- package/dist/web-dist/assets/{apex-t5VcK3BF.js → apex-CaiB2cHW.js} +1 -1
- package/dist/web-dist/assets/{azcli-Ce3iuV2p.js → azcli-BSMSllBA.js} +1 -1
- package/dist/web-dist/assets/{badge-COF6gx-2.js → badge-DAJ-55CZ.js} +1 -1
- package/dist/web-dist/assets/{bat-bOBZcLbK.js → bat-DslF3aSP.js} +1 -1
- package/dist/web-dist/assets/{bicep-TSicgsnM.js → bicep-BaONjKcy.js} +1 -1
- package/dist/web-dist/assets/{browser-B-fV6CZb.js → browser-BXjW1U6_.js} +1 -1
- package/dist/web-dist/assets/bundle-mjs-DGKUXiQC.js +1 -0
- package/dist/web-dist/assets/{cameligo-D-9xpPXV.js → cameligo-B-VCpHXR.js} +1 -1
- package/dist/web-dist/assets/chat-sidebar-DhhMmf_h.js +161 -0
- package/dist/web-dist/assets/{clojure-9X3x3csE.js → clojure-CQdNGvuT.js} +1 -1
- package/dist/web-dist/assets/{code-editor-tPwHd3zF.js → code-editor-B9_5weuZ.js} +2 -2
- package/dist/web-dist/assets/{codicon-Brq4_Ui5.ttf → codicon-DF1abBS2.ttf} +0 -0
- package/dist/web-dist/assets/{coffee-anOch8Z-.js → coffee-GJxdv8v9.js} +1 -1
- package/dist/web-dist/assets/connect-CCHOGwiQ.js +1 -0
- package/dist/web-dist/assets/constants-CJqw7w68.js +20 -0
- package/dist/web-dist/assets/{cpp-oW293AoF.js → cpp-bdOuYgjm.js} +1 -1
- package/dist/web-dist/assets/{csharp-BOXMgm5k.js → csharp-DtT4S3qG.js} +1 -1
- package/dist/web-dist/assets/{csp-D67JhNKT.js → csp-DcT8MidV.js} +1 -1
- package/dist/web-dist/assets/{css-Bk6H7_K_.js → css-aK0ks7hY.js} +1 -1
- package/dist/web-dist/assets/{css.worker-B-fFSVTK.js → css.worker-bHD0dlJO.js} +1507 -1453
- package/dist/web-dist/assets/cssMode-5aGt4Xk4.js +1 -0
- package/dist/web-dist/assets/{cypher-DB0LBjic.js → cypher-gkqrqdhb.js} +1 -1
- package/dist/web-dist/assets/{dart-CS3MbwLP.js → dart-D55faCn9.js} +1 -1
- package/dist/web-dist/assets/database.store-BOgNcBMG.js +57 -0
- package/dist/web-dist/assets/dist-BA0_BdMR.js +1 -0
- package/dist/web-dist/assets/dist-DAuUtATJ.js +2 -0
- package/dist/web-dist/assets/{dockerfile-BGz3qsmk.js → dockerfile-CsHs8WRI.js} +1 -1
- package/dist/web-dist/assets/{ecl-lt3qcklx.js → ecl-CQKiIf56.js} +1 -1
- package/dist/web-dist/assets/editor-g1MJRkXV.css +1 -0
- package/dist/web-dist/assets/editor.api-BZk1XbZs.js +926 -0
- package/dist/web-dist/assets/{editor.worker-BYfbSb3U.js → editor.worker-ByY_fgkM.js} +1328 -1274
- package/dist/web-dist/assets/{elixir-cMyUafed.js → elixir-CfFxQLCK.js} +1 -1
- package/dist/web-dist/assets/esm-BhcGPxbM.js +1 -0
- package/dist/web-dist/assets/{esm-B-4Q6MuQ.js → esm-C1Qg-CCP.js} +1 -1
- package/dist/web-dist/assets/{flow9-BI9V6TuS.js → flow9-CLkaJU-U.js} +1 -1
- package/dist/web-dist/assets/format-cell-value-BcH_SExw.js +1 -0
- package/dist/web-dist/assets/{freemarker2-mnCFA3xV.js → freemarker2-Dbf5KAvd.js} +2 -2
- package/dist/web-dist/assets/{fsharp-I1kqnt0E.js → fsharp-4RCsDl1X.js} +1 -1
- package/dist/web-dist/assets/{go-Cg4qMFVj.js → go-BCuLk40y.js} +1 -1
- package/dist/web-dist/assets/{graphql-CvtHcP49.js → graphql-Cuc1fjZl.js} +1 -1
- package/dist/web-dist/assets/{handlebars-BUcE6Uyy.js → handlebars-Bc8nHcpq.js} +1 -1
- package/dist/web-dist/assets/{hcl-BkvCdKNu.js → hcl-BqquCvZs.js} +1 -1
- package/dist/web-dist/assets/highlighted-body-JLMTFACH-Q1Yc-gaw.js +1 -0
- package/dist/web-dist/assets/{html-BBqcfykD.js → html-ZcQmh2HM.js} +1 -1
- package/dist/web-dist/assets/{html.worker-CdalOg9p.js → html.worker-CHVREBCJ.js} +1527 -1473
- package/dist/web-dist/assets/{htmlMode-D8je66Rk.js → htmlMode-BkwHscgL.js} +1 -1
- package/dist/web-dist/assets/icons-IBpZgbE4.js +1 -0
- package/dist/web-dist/assets/index-DTVRtzpz.css +2 -0
- package/dist/web-dist/assets/index-DfnmlclA.js +34 -0
- package/dist/web-dist/assets/indexes-DUzB2YOr.js +1 -0
- package/dist/web-dist/assets/{ini-CPc8BCWu.js → ini-DK3PnweE.js} +1 -1
- package/dist/web-dist/assets/{java-C9Yie4SH.js → java-CCKilWzS.js} +1 -1
- package/dist/web-dist/assets/{javascript-CuGq5ydO.js → javascript-Cy_Mv9Jz.js} +1 -1
- package/dist/web-dist/assets/{json-editor-Dc1E8Fc-.js → json-editor-CE8bI5n-.js} +1 -1
- package/dist/web-dist/assets/{json.worker-DI02pyM8.js → json.worker-BKCy_srb.js} +2747 -2693
- package/dist/web-dist/assets/{jsonMode-BgdTmYik.js → jsonMode-wvGZQK-h.js} +4 -4
- package/dist/web-dist/assets/{julia--qJGRfN8.js → julia-yMXHdeoG.js} +1 -1
- package/dist/web-dist/assets/{keys-Bs0DRbCB.js → keys-B1bnQf8h.js} +1 -1
- package/dist/web-dist/assets/{kotlin-C3MSe-0N.js → kotlin-BbY6gpqm.js} +1 -1
- package/dist/web-dist/assets/{label-DzHJlGAx.js → label-B5lrF5vb.js} +1 -1
- package/dist/web-dist/assets/{less-DOBYgWSY.js → less-rp9k6ONg.js} +1 -1
- package/dist/web-dist/assets/{lexon-Djd2rGvJ.js → lexon-rRyNfudJ.js} +1 -1
- package/dist/web-dist/assets/{liquid-DXfHmR66.js → liquid-TDvflZF7.js} +1 -1
- package/dist/web-dist/assets/{logs-BortjBc-.js → logs-C2iyjCnP.js} +1 -1
- package/dist/web-dist/assets/{lspLanguageFeatures-C7-iyD6G.js → lspLanguageFeatures-DkWvqpF_.js} +1 -1
- package/dist/web-dist/assets/{lua-Ck8vNcPw.js → lua-DInTck7-.js} +1 -1
- package/dist/web-dist/assets/{m3-a6Kl4TV0.js → m3-D1zMDYBU.js} +1 -1
- package/dist/web-dist/assets/{markdown-DkcRBwO0.js → markdown-DTHzen51.js} +1 -1
- package/dist/web-dist/assets/{mdx-QI5o45qz.js → mdx-D9pd4Hjw.js} +1 -1
- package/dist/web-dist/assets/mermaid-WFAXDIZX-B2YMTdfH.js +1 -0
- package/dist/web-dist/assets/middleware-gB5jp1rF.js +1 -0
- package/dist/web-dist/assets/{mips-Cc1YVI2p.js → mips-7Slzy87X.js} +1 -1
- package/dist/web-dist/assets/module-BHjgyYxe.js +3 -0
- package/dist/web-dist/assets/monaco-theme-CFrVB-OG.js +68 -0
- package/dist/web-dist/assets/monaco-theme-DtsiNm_H.css +1 -0
- package/dist/web-dist/assets/{msdax-Bh41xUoQ.js → msdax-CVw_oFJe.js} +1 -1
- package/dist/web-dist/assets/{mysql-BZTZMxPa.js → mysql-92xfRPFN.js} +1 -1
- package/dist/web-dist/assets/{objective-c-CxZIMOHQ.js → objective-c-BXnCggXS.js} +1 -1
- package/dist/web-dist/assets/{overlay.store-DsUdwZjE.js → overlay.store-wgNV6JkK.js} +1 -1
- package/dist/web-dist/assets/{pascal-I-WmLkmD.js → pascal-3fByeJdZ.js} +1 -1
- package/dist/web-dist/assets/{pascaligo-DEZ-6bwf.js → pascaligo-BdC4YsoB.js} +1 -1
- package/dist/web-dist/assets/{perl-DfeHQJxJ.js → perl-ClTLOqGp.js} +1 -1
- package/dist/web-dist/assets/{personal-preferences.store-DXSnKmVN.js → personal-preferences.store-dG5rDcRw.js} +1 -1
- package/dist/web-dist/assets/{pgsql-OdOoQYPW.js → pgsql-DEzB6Ucu.js} +1 -1
- package/dist/web-dist/assets/{php-CF1bUutw.js → php-DVFKZpKp.js} +1 -1
- package/dist/web-dist/assets/{pla-BHZr0GrY.js → pla-0ER0Ntvs.js} +1 -1
- package/dist/web-dist/assets/{postiats-BSB6a63H.js → postiats-CEuE_fTP.js} +1 -1
- package/dist/web-dist/assets/{powerquery-Bu0p84Ye.js → powerquery-IX0j-GcX.js} +1 -1
- package/dist/web-dist/assets/{powershell-Dcq3YM6T.js → powershell-PrZfSRSf.js} +1 -1
- package/dist/web-dist/assets/preload-helper-Bpqt02Xx.js +1 -0
- package/dist/web-dist/assets/{protobuf-CsWrQxqX.js → protobuf-CCWom7A4.js} +1 -1
- package/dist/web-dist/assets/{pug-DLQiv3Bp.js → pug-B-mwU8C7.js} +1 -1
- package/dist/web-dist/assets/{python-BvKEpyP9.js → python-B-RGw6sh.js} +1 -1
- package/dist/web-dist/assets/{qsharp-D8nrRUNu.js → qsharp-zXtiGbGZ.js} +1 -1
- package/dist/web-dist/assets/{queries.store-BaeyNA64.js → queries.store-CL_QZ9kV.js} +1 -1
- package/dist/web-dist/assets/query-runner-__vttAd8.js +17 -0
- package/dist/web-dist/assets/{r-xhyKpGTk.js → r-ff7AzNUE.js} +1 -1
- package/dist/web-dist/assets/radix-ui-BLYTVDm9.js +41 -0
- package/dist/web-dist/assets/{razor-Ceb9S1Rz.js → razor-f0SZhWBH.js} +1 -1
- package/dist/web-dist/assets/react-Cuc8VqJk.js +1 -0
- package/dist/web-dist/assets/react-dom-Cx6AFOpM.js +9 -0
- package/dist/web-dist/assets/{redis-BnpkEvbr.js → redis-3WrJd2UX.js} +1 -1
- package/dist/web-dist/assets/{redis-value-DMk0-Zuc.js → redis-value-DvCMBdEM.js} +1 -1
- package/dist/web-dist/assets/{redshift-BpxVXjAI.js → redshift-BFFZqrqe.js} +1 -1
- package/dist/web-dist/assets/{restructuredtext-5afXtW7D.js → restructuredtext-BRpKlTYP.js} +1 -1
- package/dist/web-dist/assets/rolldown-runtime-v8MIZ6et.js +1 -0
- package/dist/web-dist/assets/{ruby-CHaoWUHT.js → ruby-Dik41UlM.js} +1 -1
- package/dist/web-dist/assets/runner-DIQss6Kz.js +1 -0
- package/dist/web-dist/assets/{rust-Bw0WVsLy.js → rust-DADSh0Pc.js} +1 -1
- package/dist/web-dist/assets/{sb-CEjXmIyG.js → sb-DuvpHrMN.js} +1 -1
- package/dist/web-dist/assets/{scala-BuaCSaU6.js → scala-CtuFqcla.js} +1 -1
- package/dist/web-dist/assets/schema-BqwkN_6u.js +1 -0
- package/dist/web-dist/assets/schema-qGsKd6zv.js +1 -0
- package/dist/web-dist/assets/{scheme-DIKzlmFG.js → scheme-hPwS1w0C.js} +1 -1
- package/dist/web-dist/assets/{scss-C2_UsWzg.js → scss-477oFtwU.js} +1 -1
- package/dist/web-dist/assets/{select-C-nrz7Tx.js → select-DDjmR6pO.js} +1 -1
- package/dist/web-dist/assets/{separator-DnB61XAO.js → separator-CGjaYtx-.js} +1 -1
- package/dist/web-dist/assets/{sheet-sidebar-BGxJGRbd.js → sheet-sidebar-Cde4bLIJ.js} +1 -1
- package/dist/web-dist/assets/{shell-2aEL2EVH.js → shell-n9PWT21s.js} +1 -1
- package/dist/web-dist/assets/{solidity-D-5XfYE1.js → solidity-BUjaJYHp.js} +1 -1
- package/dist/web-dist/assets/{sophia-s4MFSvUF.js → sophia-BCcvs9t1.js} +1 -1
- package/dist/web-dist/assets/{sparql-Dkv46wS5.js → sparql-BflQKwzI.js} +1 -1
- package/dist/web-dist/assets/spinner-ioIImnLq.js +1 -0
- package/dist/web-dist/assets/{sql-Dz9Xhs8s.js → sql-B-t7xHK1.js} +1 -1
- package/dist/web-dist/assets/{st-Cbo0XVmr.js → st-CSYG-jYM.js} +1 -1
- package/dist/web-dist/assets/{swift-B66X97nW.js → swift-CKmn3JdQ.js} +1 -1
- package/dist/web-dist/assets/{systemverilog-gGKga8Gf.js → systemverilog-rn_hwEIB.js} +1 -1
- package/dist/web-dist/assets/table-BWy367NZ.js +1 -0
- package/dist/web-dist/assets/tables-geLC-tRf.js +16 -0
- package/dist/web-dist/assets/tanstack-2cKzRGRb.js +5 -0
- package/dist/web-dist/assets/{tcl-BtbeJsUN.js → tcl-Fn2CV_28.js} +1 -1
- package/dist/web-dist/assets/{ts.worker-r_qbh1JO.js → ts.worker-BLC4EdqU.js} +18311 -18257
- package/dist/web-dist/assets/{tsMode-BgtcNcpl.js → tsMode-C-8HcC0f.js} +4 -4
- package/dist/web-dist/assets/{twig-0_nXiuYs.js → twig-CLjUHOwE.js} +1 -1
- package/dist/web-dist/assets/{typescript-Cy_CzC_-.js → typescript-BubYBQa0.js} +1 -1
- package/dist/web-dist/assets/{typespec-DBO6_WMJ.js → typespec-IO61FhU-.js} +1 -1
- package/dist/web-dist/assets/use-database-engine-C1fvJDyS.js +1 -0
- package/dist/web-dist/assets/{use-theme-DBhPknw6.js → use-theme-uud1RcFP.js} +1 -1
- package/dist/web-dist/assets/utils-D49oYrWW.js +1 -0
- package/dist/web-dist/assets/{vb-DFJjBsW2.js → vb-Lm9DdJMK.js} +1 -1
- package/dist/web-dist/assets/visualizer-Bd-PB2Fm.js +1 -0
- package/dist/web-dist/assets/{wgsl-U3RBM2M0.js → wgsl-CG8088eu.js} +1 -1
- package/dist/web-dist/assets/{workers-ClRH6A2w.js → workers-H_G6sPzI.js} +1 -1
- package/dist/web-dist/assets/{xml-D11j3J2_.js → xml-Da0DCKCb.js} +1 -1
- package/dist/web-dist/assets/{yaml-D7Z_4mnx.js → yaml-C-84Dbfu.js} +1 -1
- package/dist/web-dist/index.html +31 -31
- package/package.json +22 -22
- package/dist/web-dist/assets/_pathlessLayout-CUDS1e28.js +0 -1
- package/dist/web-dist/assets/_pathlessLayout-WZkezfN7.js +0 -2
- package/dist/web-dist/assets/_queryId-CEJb62Vl.js +0 -1
- package/dist/web-dist/assets/_table-6SZEx92j.js +0 -1
- package/dist/web-dist/assets/_table-CwyP_2EP.js +0 -1
- package/dist/web-dist/assets/bundle-mjs-CZwf2xtr.js +0 -1
- package/dist/web-dist/assets/chat-sidebar-DwzCElBd.js +0 -132
- package/dist/web-dist/assets/connect-l3LjAClZ.js +0 -1
- package/dist/web-dist/assets/constants-CKAehpPm.js +0 -12
- package/dist/web-dist/assets/cssMode-G6latsS7.js +0 -1
- package/dist/web-dist/assets/database.store-BuqVJMY6.js +0 -57
- package/dist/web-dist/assets/dist-Bz0qAN0x.js +0 -2
- package/dist/web-dist/assets/dist-Cf0L32Jd.js +0 -1
- package/dist/web-dist/assets/editor-1FQrmyyI.css +0 -1
- package/dist/web-dist/assets/editor.api-BTIrAcm5.js +0 -865
- package/dist/web-dist/assets/format-cell-value-CgUtYv8B.js +0 -1
- package/dist/web-dist/assets/highlighted-body-OFNGDK62-t8UIAZOZ.js +0 -1
- package/dist/web-dist/assets/icons-DxFtdMXW.js +0 -1
- package/dist/web-dist/assets/index-QVi4Lb9U.css +0 -2
- package/dist/web-dist/assets/index-WFVurGCI.js +0 -34
- package/dist/web-dist/assets/indexes-C3Qddb5L.js +0 -1
- package/dist/web-dist/assets/mermaid-GHXKKRXX-D35eppUc.js +0 -1
- package/dist/web-dist/assets/middleware-CXk7SlTF.js +0 -1
- package/dist/web-dist/assets/module-D_kjbMCc.js +0 -2
- package/dist/web-dist/assets/monaco-theme-BnSsSzUH.css +0 -1
- package/dist/web-dist/assets/monaco-theme-C2k_taVU.js +0 -64
- package/dist/web-dist/assets/preload-helper-DF7hIgef.js +0 -1
- package/dist/web-dist/assets/query-runner-f473QQSD.js +0 -17
- package/dist/web-dist/assets/radix-ui-CxCv--D1.js +0 -51
- package/dist/web-dist/assets/react-DEQ0BgTL.js +0 -1
- package/dist/web-dist/assets/react-dom-ITw3Lqwx.js +0 -9
- package/dist/web-dist/assets/rolldown-runtime-fzu9RN21.js +0 -1
- package/dist/web-dist/assets/runner-NsYjzIZs.js +0 -1
- package/dist/web-dist/assets/schema-CE1yGygf.js +0 -1
- package/dist/web-dist/assets/schema-rxLBue8Q.js +0 -1
- package/dist/web-dist/assets/spinner-CNnB5r0X.js +0 -1
- package/dist/web-dist/assets/table-C8WK3uAc.js +0 -1
- package/dist/web-dist/assets/tables-D98Kbmcb.js +0 -16
- package/dist/web-dist/assets/tanstack-RwHFfmqj.js +0 -8
- package/dist/web-dist/assets/use-database-engine-DZZj7-4J.js +0 -1
- package/dist/web-dist/assets/utils-EJLOIroS.js +0 -1
- package/dist/web-dist/assets/visualizer-CgYlDJ_-.js +0 -1
- package/dist/web-dist/assets/vscode-wuSgCuZI.js +0 -1
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/highlighted-body-OFNGDK62-t8UIAZOZ.js","assets/rolldown-runtime-fzu9RN21.js","assets/icons-DxFtdMXW.js","assets/radix-ui-CxCv--D1.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{n as pi,r as tr,t as kn}from"./rolldown-runtime-fzu9RN21.js";import{At as tu,D as nu,Lt as ru,Tt as iu,g as au,lt as su,n as ou,z as lu,zt as cu}from"./icons-DxFtdMXW.js";import{At as uu,Dt as Ki,ft as hu,jt as du,n as fu,r as pu,t as mu}from"./radix-ui-CxCv--D1.js";import{n as Us,t as js}from"./bundle-mjs-CZwf2xtr.js";import{t as me}from"./utils-EJLOIroS.js";import{a as gu,c as Eu,n as nr,o as Tu,t as zs}from"./overlay.store-DsUdwZjE.js";import{c as bu,d as ku,l as Au,t as _u,u as xu}from"./sheet-sidebar-BGxJGRbd.js";import{H as yu,U as Cu,q as Su}from"./constants-CKAehpPm.js";import{t as Nu}from"./database.store-BuqVJMY6.js";import{t as $s}from"./preload-helper-DF7hIgef.js";import{i as Iu,r as vu}from"./separator-DnB61XAO.js";import{C as wu,a as Ys,d as Lu,f as Ru,l as qs,p as zr,u as Vs}from"./index-WFVurGCI.js";import{n as Ws}from"./_pathlessLayout-WZkezfN7.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"db-studio@2.1.0"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ad356737-ddaf-4ba9-ba0a-4fe709fcdc41",e._sentryDebugIdIdentifier="sentry-dbid-ad356737-ddaf-4ba9-ba0a-4fe709fcdc41")}catch{}})();var Ou=["Show me all tables in my database","What columns are in the users table?","Write a query to find all active users","How many orders were placed last month?","Find top 5 customers by total spend","Write a JOIN between users and orders","Users who haven't made any purchase yet","Generate monthly revenue summary query","Suggest useful indexes for better performance","Show schema of the products / inventory table","Latest 20 orders with customer names","Help me write a safe UPDATE query"],rr=(function(e){if(e==null)return Bu;if(typeof e=="function")return ir(e);if(typeof e=="object")return Array.isArray(e)?Du(e):Pu(e);if(typeof e=="string")return Mu(e);throw new Error("Expected function, string, or object as test")});function Du(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=rr(e[n]);return ir(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function Pu(e){const t=e;return ir(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function Mu(e){return ir(t);function t(n){return n&&n.type===e}}function ir(e){return t;function t(n,r,i){return!!(Fu(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Bu(){return!0}function Fu(e){return e!==null&&typeof e=="object"&&"type"in e}var Gs=[];var rn="skip";function mi(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=rr(i),s=r?-1:1;l(e,void 0,[])();function l(o,u,d){const h=o&&typeof o=="object"?o:{};if(typeof h.type=="string"){const p=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(o.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=Gs,E,N,y;if((!t||a(o,u,d[d.length-1]||void 0))&&(p=Hu(n(o,d)),p[0]===!1))return p;if("children"in o&&o.children){const _=o;if(_.children&&p[0]!=="skip")for(N=(r?_.children.length:-1)+s,y=d.concat(_);N>-1&&N<_.children.length;){const C=_.children[N];if(E=l(C,N,y)(),E[0]===!1)return E;N=typeof E[1]=="number"?E[1]:N+s}}return p}}}function Hu(e){return Array.isArray(e)?e:typeof e=="number"?[!0,e]:e==null?Gs:[e]}function Xe(e,t,n,r){let i,a,s;typeof t=="function"&&typeof n!="function"?(a=void 0,s=t,i=n):(a=t,s=n,i=r),mi(e,a,l,i);function l(o,u){const d=u[u.length-1],h=d?d.children.indexOf(o):void 0;return s(o,h,d)}}var k=tr(cu(),1),m=du(),Ht={indicator:"indicator",textOnly:"text-only",remove:"remove"};function Uu({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:a="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:s="text-gray-500",linkBlockPolicy:l=Ht.indicator,imageBlockPolicy:o=Ht.indicator}){const u=t.length&&!t.every(h=>h==="*"),d=n.length&&!n.every(h=>h==="*");if(!e&&(u||d))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return h=>{const f=Vu(e,t,n,r,i,a,s,l,o);Qs(h),Xe(h,f)}}function Xi(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 ju(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}var zu=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),$u=new Set(["javascript:","data:","file:","vbscript:"]);function Zi(e,t,n,r=!1,i=!1,a=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!i)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return i&&r&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const o=e.substring(5);if(o&&o.length>0&&o!=="invalid")return e}}catch{return null}return null}const s=Xi(e,n);if(!s||$u.has(s.protocol)||!(zu.has(s.protocol)||a.includes(s.protocol)||a.includes("*")))return null;if(s.protocol==="mailto:"||!s.protocol.match(/^https?:$/))return s.href;const l=ju(e);return s&&t.some(o=>{const u=Xi(o,n);return!u||u.origin!==s.origin?!1:s.href.startsWith(u.href)})?l?s.pathname+s.search+s.hash:s.href:t.includes("*")?s.protocol!=="https:"&&s.protocol!=="http:"?null:l?s.pathname+s.search+s.hash:s.href:null}function Qs(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)Qs(t)}}var Tr=Symbol("node-seen");function Yu(e,t,n){return t===Ht.remove?{type:"remove"}:t===Ht.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:n},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function qu(e,t,n){if(t===Ht.remove)return{type:"remove"};if(t===Ht.textOnly){const r=String(e.properties.alt||"");return r?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:r}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:n},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}var Vu=(e,t,n,r,i,a,s,l,o)=>{const u=(d,h,f)=>{if(d.type!=="element"||d[Tr])return!0;if(d.tagName==="a"){const p=Zi(d.properties.href,t,e,!1,!1,i);if(p===null){if(d[Tr]=!0,Xe(d,u),f&&typeof h=="number"){const E=Yu(d,l,s);if(E.type==="remove")return f.children.splice(h,1),[rn,h];f.children[h]=E.element}return rn}else return d.properties.href=p,d.properties.target="_blank",d.properties.rel="noopener noreferrer",!0}if(d.tagName==="img"){const p=Zi(d.properties.src,n,e,r,!0,i);if(p===null){if(d[Tr]=!0,Xe(d,u),f&&typeof h=="number"){const E=qu(d,o,a);if(E.type==="remove")return f.children.splice(h,1),[rn,h];f.children[h]=E.element}return rn}else return d.properties.src=p,!0}return!0};return u},Ji=typeof self=="object"?self:globalThis,Wu=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,s]=t[i];switch(a){case 0:case-1:return n(s,i);case 1:{const l=n([],i);for(const o of s)l.push(r(o));return l}case 2:{const l=n({},i);for(const[o,u]of s)l[r(o)]=r(u);return l}case 3:return n(new Date(s),i);case 4:{const{source:l,flags:o}=s;return n(new RegExp(l,o),i)}case 5:{const l=n(new Map,i);for(const[o,u]of s)l.set(r(o),r(u));return l}case 6:{const l=n(new Set,i);for(const o of s)l.add(r(o));return l}case 7:{const{name:l,message:o}=s;return n(new Ji[l](o),i)}case 8:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:l}=new Uint8Array(s);return n(new DataView(l),s)}}return n(new Ji[a](s),i)};return r},ea=e=>Wu(new Map,e)(0),Dt="",{toString:Gu}={},{keys:Qu}=Object,Xt=e=>{const t=typeof e;if(t!=="object"||!e)return[0,t];const n=Gu.call(e).slice(8,-1);switch(n){case"Array":return[1,Dt];case"Object":return[2,Dt];case"Date":return[3,Dt];case"RegExp":return[4,Dt];case"Map":return[5,Dt];case"Set":return[6,Dt];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},Dn=([e,t])=>e===0&&(t==="function"||t==="symbol"),Ku=(e,t,n,r)=>{const i=(s,l)=>{const o=r.push(s)-1;return n.set(l,o),o},a=s=>{if(n.has(s))return n.get(s);let[l,o]=Xt(s);switch(l){case 0:{let d=s;switch(o){case"bigint":l=8,d=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);d=null;break;case"undefined":return i([-1],s)}return i([l,d],s)}case 1:{if(o){let f=s;return o==="DataView"?f=new Uint8Array(s.buffer):o==="ArrayBuffer"&&(f=new Uint8Array(s)),i([o,[...f]],s)}const d=[],h=i([l,d],s);for(const f of s)d.push(a(f));return h}case 2:{if(o)switch(o){case"BigInt":return i([o,s.toString()],s);case"Boolean":case"Number":case"String":return i([o,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const d=[],h=i([l,d],s);for(const f of Qu(s))(e||!Dn(Xt(s[f])))&&d.push([a(f),a(s[f])]);return h}case 3:return i([l,s.toISOString()],s);case 4:{const{source:d,flags:h}=s;return i([l,{source:d,flags:h}],s)}case 5:{const d=[],h=i([l,d],s);for(const[f,p]of s)(e||!(Dn(Xt(f))||Dn(Xt(p))))&&d.push([a(f),a(p)]);return h}case 6:{const d=[],h=i([l,d],s);for(const f of s)(e||!Dn(Xt(f)))&&d.push(a(f));return h}}const{message:u}=s;return i([l,{name:o,message:u}],s)};return a},ta=(e,{json:t,lossy:n}={})=>{const r=[];return Ku(!(t||n),!!t,new Map,r)(e),r},yt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ea(ta(e,t)):structuredClone(e):(e,t)=>ea(ta(e,t));var An=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};An.prototype.normal={};An.prototype.property={};An.prototype.space=void 0;function Ks(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new An(n,r,t)}function gn(e){return e.toLowerCase()}var Re=class{constructor(e,t){this.attribute=t,this.property=e}};Re.prototype.attribute="";Re.prototype.booleanish=!1;Re.prototype.boolean=!1;Re.prototype.commaOrSpaceSeparated=!1;Re.prototype.commaSeparated=!1;Re.prototype.defined=!1;Re.prototype.mustUseProperty=!1;Re.prototype.number=!1;Re.prototype.overloadedBoolean=!1;Re.prototype.property="";Re.prototype.spaceSeparated=!1;Re.prototype.space=void 0;var $r=pi({boolean:()=>Z,booleanish:()=>be,commaOrSpaceSeparated:()=>Me,commaSeparated:()=>Bt,number:()=>F,overloadedBoolean:()=>Yr,spaceSeparated:()=>ue}),Xu=0,Z=Nt(),be=Nt(),Yr=Nt(),F=Nt(),ue=Nt(),Bt=Nt(),Me=Nt();function Nt(){return 2**++Xu}var br=Object.keys($r),gi=class extends Re{constructor(e,t,n,r){let i=-1;if(super(e,t),na(this,"space",r),typeof n=="number")for(;++i<br.length;){const a=br[i];na(this,br[i],(n&$r[a])===$r[a])}}};gi.prototype.defined=!0;function na(e,t,n){n&&(e[t]=n)}function zt(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new gi(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[gn(r)]=r,n[gn(a.attribute)]=r}return new An(t,n,e.space)}var Xs=zt({properties:{ariaActiveDescendant:null,ariaAtomic:be,ariaAutoComplete:null,ariaBusy:be,ariaChecked:be,ariaColCount:F,ariaColIndex:F,ariaColSpan:F,ariaControls:ue,ariaCurrent:null,ariaDescribedBy:ue,ariaDetails:null,ariaDisabled:be,ariaDropEffect:ue,ariaErrorMessage:null,ariaExpanded:be,ariaFlowTo:ue,ariaGrabbed:be,ariaHasPopup:null,ariaHidden:be,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ue,ariaLevel:F,ariaLive:null,ariaModal:be,ariaMultiLine:be,ariaMultiSelectable:be,ariaOrientation:null,ariaOwns:ue,ariaPlaceholder:null,ariaPosInSet:F,ariaPressed:be,ariaReadOnly:be,ariaRelevant:null,ariaRequired:be,ariaRoleDescription:ue,ariaRowCount:F,ariaRowIndex:F,ariaRowSpan:F,ariaSelected:be,ariaSetSize:F,ariaSort:null,ariaValueMax:F,ariaValueMin:F,ariaValueNow:F,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Zs(e,t){return t in e?e[t]:t}function Js(e,t){return Zs(e,t.toLowerCase())}var Zu=zt({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Bt,acceptCharset:ue,accessKey:ue,action:null,allow:null,allowFullScreen:Z,allowPaymentRequest:Z,allowUserMedia:Z,alt:null,as:null,async:Z,autoCapitalize:null,autoComplete:ue,autoFocus:Z,autoPlay:Z,blocking:ue,capture:null,charSet:null,checked:Z,cite:null,className:ue,cols:F,colSpan:null,content:null,contentEditable:be,controls:Z,controlsList:ue,coords:F|Bt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Z,defer:Z,dir:null,dirName:null,disabled:Z,download:Yr,draggable:be,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Z,formTarget:null,headers:ue,height:F,hidden:Yr,high:F,href:null,hrefLang:null,htmlFor:ue,httpEquiv:ue,id:null,imageSizes:null,imageSrcSet:null,inert:Z,inputMode:null,integrity:null,is:null,isMap:Z,itemId:null,itemProp:ue,itemRef:ue,itemScope:Z,itemType:ue,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Z,low:F,manifest:null,max:null,maxLength:F,media:null,method:null,min:null,minLength:F,multiple:Z,muted:Z,name:null,nonce:null,noModule:Z,noValidate:Z,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:Z,optimum:F,pattern:null,ping:ue,placeholder:null,playsInline:Z,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Z,referrerPolicy:null,rel:ue,required:Z,reversed:Z,rows:F,rowSpan:F,sandbox:ue,scope:null,scoped:Z,seamless:Z,selected:Z,shadowRootClonable:Z,shadowRootDelegatesFocus:Z,shadowRootMode:null,shape:null,size:F,sizes:null,slot:null,span:F,spellCheck:be,src:null,srcDoc:null,srcLang:null,srcSet:null,start:F,step:null,style:null,tabIndex:F,target:null,title:null,translate:null,type:null,typeMustMatch:Z,useMap:null,value:be,width:F,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ue,axis:null,background:null,bgColor:null,border:F,borderColor:null,bottomMargin:F,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Z,declare:Z,event:null,face:null,frame:null,frameBorder:null,hSpace:F,leftMargin:F,link:null,longDesc:null,lowSrc:null,marginHeight:F,marginWidth:F,noResize:Z,noHref:Z,noShade:Z,noWrap:Z,object:null,profile:null,prompt:null,rev:null,rightMargin:F,rules:null,scheme:null,scrolling:be,standby:null,summary:null,text:null,topMargin:F,valueType:null,version:null,vAlign:null,vLink:null,vSpace:F,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Z,disableRemotePlayback:Z,prefix:null,property:null,results:F,security:null,unselectable:null},space:"html",transform:Js}),Ju=zt({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:Me,accentHeight:F,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:F,amplitude:F,arabicForm:null,ascent:F,attributeName:null,attributeType:null,azimuth:F,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:F,by:null,calcMode:null,capHeight:F,className:ue,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:F,diffuseConstant:F,direction:null,display:null,dur:null,divisor:F,dominantBaseline:null,download:Z,dx:null,dy:null,edgeMode:null,editable:null,elevation:F,enableBackground:null,end:null,event:null,exponent:F,externalResourcesRequired:null,fill:null,fillOpacity:F,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:Bt,g2:Bt,glyphName:Bt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:F,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:F,horizOriginX:F,horizOriginY:F,id:null,ideographic:F,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:F,k:F,k1:F,k2:F,k3:F,k4:F,kernelMatrix:Me,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:F,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:F,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:F,overlineThickness:F,paintOrder:null,panose1:null,path:null,pathLength:F,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ue,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:F,pointsAtY:F,pointsAtZ:F,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Me,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Me,rev:Me,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Me,requiredFeatures:Me,requiredFonts:Me,requiredFormats:Me,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:F,specularExponent:F,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:F,strikethroughThickness:F,string:null,stroke:null,strokeDashArray:Me,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:F,strokeOpacity:F,strokeWidth:null,style:null,surfaceScale:F,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Me,tabIndex:F,tableValues:null,target:null,targetX:F,targetY:F,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Me,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:F,underlineThickness:F,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:F,values:null,vAlphabetic:F,vMathematical:F,vectorEffect:null,vHanging:F,vIdeographic:F,version:null,vertAdvY:F,vertOriginX:F,vertOriginY:F,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:F,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Zs}),eo=zt({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()}}),to=zt({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Js}),no=zt({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),eh={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"},th=/[A-Z]/g,ra=/-[a-z]/g,nh=/^data[-\w.:]+$/i;function ar(e,t){const n=gn(t);let r=t,i=Re;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&nh.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(ra,ih);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!ra.test(a)){let s=a.replace(th,rh);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=gi}return new i(r,t)}function rh(e){return"-"+e.toLowerCase()}function ih(e){return e.charAt(1).toUpperCase()}var _n=Ks([Xs,Zu,eo,to,no],"html"),pt=Ks([Xs,Ju,eo,to,no],"svg");function ia(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const s=n.slice(i,r).trim();(s||!a)&&t.push(s),i=r+1,r=n.indexOf(",",i)}return t}function ro(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}var aa=/[#.]/g;function ah(e,t){const n=e||"",r={};let i=0,a,s;for(;i<n.length;){aa.lastIndex=i;const l=aa.exec(n),o=n.slice(i,l?l.index:n.length);o&&(a?a==="#"?r.id=o:Array.isArray(r.className)?r.className.push(o):r.className=[o]:s=o,i+=o.length),l&&(a=l[0],i++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}function sa(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function io(e){return e.join(" ").trim()}function ao(e,t,n){const r=n?ch(n):void 0;function i(a,s,...l){let o;if(a==null){o={type:"root",children:[]};const u=s;l.unshift(u)}else{o=ah(a,t);const u=o.tagName.toLowerCase(),d=r?r.get(u):void 0;if(o.tagName=d||u,sh(s))l.unshift(s);else for(const[h,f]of Object.entries(s))oh(e,o.properties,h,f)}for(const u of l)qr(o.children,u);return o.type==="element"&&o.tagName==="template"&&(o.content={type:"root",children:o.children},o.children=[]),o}return i}function sh(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const a=i;for(const s of a)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function oh(e,t,n,r){const i=ar(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?i.spaceSeparated?a=sa(r):i.commaSeparated?a=ia(r):i.commaOrSpaceSeparated?a=sa(ia(r).join(" ")):a=oa(i,i.property,r):Array.isArray(r)?a=[...r]:a=i.property==="style"?lh(r):String(r);if(Array.isArray(a)){const s=[];for(const l of a)s.push(oa(i,i.property,l));a=s}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function qr(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 n of t)qr(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?qr(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function oa(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||gn(n)===gn(t)))return!0}return n}function lh(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function ch(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}var uh=["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"],hh=ao(_n,"div"),dh=ao(pt,"g",uh);function fh(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let s=0;for(;;){let l=n[s];if(l===void 0){const o=la(t,n[s-1]);l=o===-1?t.length+1:o+1,n[s]=l}if(l>a)return{line:s+1,column:a-(s>0?n[s-1]:0)+1,offset:a};s++}}}function i(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const l=n[n.length-1],o=la(t,l),u=o===-1?t.length+1:o+1;if(l===u)break;n.push(u)}const s=(a.line>1?n[a.line-2]:0)+a.column-1;if(s<n[a.line-1])return s}}}function la(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
3
|
-
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}var _t={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/"},so={}.hasOwnProperty,ph=Object.prototype;function mh(e,t){const n=t||{};return Ei({file:n.file||void 0,location:!1,schema:n.space==="svg"?pt:_n,verbose:n.verbose||!1},e)}function Ei(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},zn(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:oo(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),s=fh(a),l=s.toPoint(0),o=s.toPoint(a.length);n.position={start:l,end:o}}return n}case"#documentType":{const r=t;return n={type:"doctype"},zn(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},zn(e,r,n),n}default:return n=gh(e,t),n}}function oo(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=Ei(e,t[n]);r.push(i)}return r}function gh(e,t){const n=e.schema;e.schema=t.namespaceURI===_t.svg?pt:_n;let r=-1;const i={};for(;++r<t.attrs.length;){const s=t.attrs[r],l=(s.prefix?s.prefix+":":"")+s.name;so.call(ph,l)||(i[l]=s.value)}const a=(e.schema.space==="svg"?dh:hh)(t.tagName,i,oo(e,t.childNodes));if(zn(e,t,a),a.tagName==="template"){const s=t,l=s.sourceCodeLocation,o=l&&l.startTag&&Mt(l.startTag),u=l&&l.endTag&&Mt(l.endTag),d=Ei(e,s.content);o&&u&&e.file&&(d.position={start:o.end,end:u.start}),a.content=d}return e.schema=n,a}function zn(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=Eh(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function Eh(e,t,n){const r=Mt(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const a={};let s;if(n.attrs)for(s in n.attrs)so.call(n.attrs,s)&&(a[ar(e.schema,s).property]=Mt(n.attrs[s]));n.startTag;const l=Mt(n.startTag),o=n.endTag?Mt(n.endTag):void 0,u={opening:l};o&&(u.closing=o),u.properties=a,t.data={position:u}}}return r}function Mt(e){const t=ca({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=ca({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function ca(e){return e.line&&e.column?e:void 0}var ua={}.hasOwnProperty;function lo(e,t){const n=t||{};function r(i,...a){let s=r.invalid;const l=r.handlers;if(i&&ua.call(i,e)){const o=String(i[e]);s=ua.call(l,o)?l[o]:r.unknown}if(s)return s.call(this,i,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var Th={},bh={}.hasOwnProperty,co=lo("type",{handlers:{root:Ah,element:Sh,text:yh,comment:Ch,doctype:xh}});function kh(e,t){const n=(t||Th).space;return co(e,n==="svg"?pt:_n)}function Ah(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Ti(e.children,n,t),$t(e,n),n}function _h(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Ti(e.children,n,t),$t(e,n),n}function xh(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return $t(e,t),t}function yh(e){const t={nodeName:"#text",value:e.value,parentNode:null};return $t(e,t),t}function Ch(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return $t(e,t),t}function Sh(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=pt);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&bh.call(e.properties,a)){const o=Nh(r,a,e.properties[a]);o&&i.push(o)}}const s=r.space,l={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:_t[s],childNodes:[],parentNode:null};return l.childNodes=Ti(e.children,l,r),$t(e,l),e.tagName==="template"&&e.content&&(l.content=_h(e.content,r)),l}function Nh(e,t,n){const r=ar(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?ro(n):io(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=i.name.indexOf(":");a<0?i.prefix="":(i.name=i.name.slice(a+1),i.prefix=r.attribute.slice(0,a)),i.namespace=_t[r.space]}return i}function Ti(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const a=co(e[r],n);a.parentNode=t,i.push(a)}return i}function $t(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}var Ih=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],vh=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]);var g;(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"})(g||(g={}));var we={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function uo(e){return e>=55296&&e<=57343}function wh(e){return e>=56320&&e<=57343}function Lh(e,t){return(e-55296)*1024+9216+t}function ho(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function fo(e){return e>=64976&&e<=65007||vh.has(e)}var L;(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"})(L||(L={}));var Rh=65536,Oh=class{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=Rh,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(e,t){const{line:n,col:r,offset:i}=this,a=r+t,s=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:s,endOffset:s}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){const t=this.html.charCodeAt(this.pos+1);if(wh(t))return this.pos++,this._addGap(),Lh(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,g.EOF;return this._err(L.surrogateInInputStream),e}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(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let n=0;n<e.length;n++)if((this.html.charCodeAt(this.pos+n)|32)!==e.charCodeAt(n))return!1;return!0}peek(e){const t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,g.EOF;const n=this.html.charCodeAt(t);return n===g.CARRIAGE_RETURN?g.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,g.EOF;let e=this.html.charCodeAt(this.pos);return e===g.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,g.LINE_FEED):e===g.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,uo(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===g.LINE_FEED||e===g.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){ho(e)?this._err(L.controlCharacterInInputStream):fo(e)&&this._err(L.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},ee;(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"})(ee||(ee={}));function po(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}var Dh=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))),kr,Ph=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]]),$x=(kr=String.fromCodePoint)!==null&&kr!==void 0?kr:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function Mh(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Ph.get(e))!==null&&t!==void 0?t:e}var Ae;(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"})(Ae||(Ae={}));var Bh=32,ht;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(ht||(ht={}));function Vr(e){return e>=Ae.ZERO&&e<=Ae.NINE}function Fh(e){return e>=Ae.UPPER_A&&e<=Ae.UPPER_F||e>=Ae.LOWER_A&&e<=Ae.LOWER_F}function Hh(e){return e>=Ae.UPPER_A&&e<=Ae.UPPER_Z||e>=Ae.LOWER_A&&e<=Ae.LOWER_Z||Vr(e)}function Uh(e){return e===Ae.EQUALS||Hh(e)}var ke;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(ke||(ke={}));var rt;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(rt||(rt={}));var jh=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=ke.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=rt.Strict}startEntity(e){this.decodeMode=e,this.state=ke.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case ke.EntityStart:return e.charCodeAt(t)===Ae.NUM?(this.state=ke.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=ke.NamedEntity,this.stateNamedEntity(e,t));case ke.NumericStart:return this.stateNumericStart(e,t);case ke.NumericDecimal:return this.stateNumericDecimal(e,t);case ke.NumericHex:return this.stateNumericHex(e,t);case ke.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|Bh)===Ae.LOWER_X?(this.state=ke.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=ke.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){const i=n-t;this.result=this.result*Math.pow(r,i)+Number.parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){const n=t;for(;t<e.length;){const r=e.charCodeAt(t);if(Vr(r)||Fh(r))t+=1;else return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(r,3)}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){const n=t;for(;t<e.length;){const r=e.charCodeAt(t);if(Vr(r))t+=1;else return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2)}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return(n=this.errors)===null||n===void 0||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===Ae.SEMI)this.consumed+=1;else if(this.decodeMode===rt.Strict)return 0;return this.emitCodePoint(Mh(this.result),this.consumed),this.errors&&(e!==Ae.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){const{decodeTree:n}=this;let r=n[this.treeIndex],i=(r&ht.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){const a=e.charCodeAt(t);if(this.treeIndex=zh(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===rt.Attribute&&(i===0||Uh(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&ht.VALUE_LENGTH)>>14,i!==0){if(a===Ae.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==rt.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:t,decodeTree:n}=this,r=(n[t]&ht.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){const{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~ht.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case ke.NamedEntity:return this.result!==0&&(this.decodeMode!==rt.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case ke.NumericDecimal:return this.emitNumericEntity(0,2);case ke.NumericHex:return this.emitNumericEntity(0,3);case ke.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case ke.EntityStart:return 0}}};function zh(e,t,n,r){const i=(t&ht.BRANCH_LENGTH)>>7,a=t&ht.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){const o=r-a;return o<0||o>=i?-1:e[n+o]-1}let s=n,l=s+i-1;for(;s<=l;){const o=s+l>>>1,u=e[o];if(u<r)s=o+1;else if(u>r)l=o-1;else return e[o+i]}return-1}var M;(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/"})(M||(M={}));var xt;(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"})(xt||(xt={}));var Ue;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Ue||(Ue={}));var v;(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"})(v||(v={}));var c;(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"})(c||(c={}));var $h=new Map([[v.A,c.A],[v.ADDRESS,c.ADDRESS],[v.ANNOTATION_XML,c.ANNOTATION_XML],[v.APPLET,c.APPLET],[v.AREA,c.AREA],[v.ARTICLE,c.ARTICLE],[v.ASIDE,c.ASIDE],[v.B,c.B],[v.BASE,c.BASE],[v.BASEFONT,c.BASEFONT],[v.BGSOUND,c.BGSOUND],[v.BIG,c.BIG],[v.BLOCKQUOTE,c.BLOCKQUOTE],[v.BODY,c.BODY],[v.BR,c.BR],[v.BUTTON,c.BUTTON],[v.CAPTION,c.CAPTION],[v.CENTER,c.CENTER],[v.CODE,c.CODE],[v.COL,c.COL],[v.COLGROUP,c.COLGROUP],[v.DD,c.DD],[v.DESC,c.DESC],[v.DETAILS,c.DETAILS],[v.DIALOG,c.DIALOG],[v.DIR,c.DIR],[v.DIV,c.DIV],[v.DL,c.DL],[v.DT,c.DT],[v.EM,c.EM],[v.EMBED,c.EMBED],[v.FIELDSET,c.FIELDSET],[v.FIGCAPTION,c.FIGCAPTION],[v.FIGURE,c.FIGURE],[v.FONT,c.FONT],[v.FOOTER,c.FOOTER],[v.FOREIGN_OBJECT,c.FOREIGN_OBJECT],[v.FORM,c.FORM],[v.FRAME,c.FRAME],[v.FRAMESET,c.FRAMESET],[v.H1,c.H1],[v.H2,c.H2],[v.H3,c.H3],[v.H4,c.H4],[v.H5,c.H5],[v.H6,c.H6],[v.HEAD,c.HEAD],[v.HEADER,c.HEADER],[v.HGROUP,c.HGROUP],[v.HR,c.HR],[v.HTML,c.HTML],[v.I,c.I],[v.IMG,c.IMG],[v.IMAGE,c.IMAGE],[v.INPUT,c.INPUT],[v.IFRAME,c.IFRAME],[v.KEYGEN,c.KEYGEN],[v.LABEL,c.LABEL],[v.LI,c.LI],[v.LINK,c.LINK],[v.LISTING,c.LISTING],[v.MAIN,c.MAIN],[v.MALIGNMARK,c.MALIGNMARK],[v.MARQUEE,c.MARQUEE],[v.MATH,c.MATH],[v.MENU,c.MENU],[v.META,c.META],[v.MGLYPH,c.MGLYPH],[v.MI,c.MI],[v.MO,c.MO],[v.MN,c.MN],[v.MS,c.MS],[v.MTEXT,c.MTEXT],[v.NAV,c.NAV],[v.NOBR,c.NOBR],[v.NOFRAMES,c.NOFRAMES],[v.NOEMBED,c.NOEMBED],[v.NOSCRIPT,c.NOSCRIPT],[v.OBJECT,c.OBJECT],[v.OL,c.OL],[v.OPTGROUP,c.OPTGROUP],[v.OPTION,c.OPTION],[v.P,c.P],[v.PARAM,c.PARAM],[v.PLAINTEXT,c.PLAINTEXT],[v.PRE,c.PRE],[v.RB,c.RB],[v.RP,c.RP],[v.RT,c.RT],[v.RTC,c.RTC],[v.RUBY,c.RUBY],[v.S,c.S],[v.SCRIPT,c.SCRIPT],[v.SEARCH,c.SEARCH],[v.SECTION,c.SECTION],[v.SELECT,c.SELECT],[v.SOURCE,c.SOURCE],[v.SMALL,c.SMALL],[v.SPAN,c.SPAN],[v.STRIKE,c.STRIKE],[v.STRONG,c.STRONG],[v.STYLE,c.STYLE],[v.SUB,c.SUB],[v.SUMMARY,c.SUMMARY],[v.SUP,c.SUP],[v.TABLE,c.TABLE],[v.TBODY,c.TBODY],[v.TEMPLATE,c.TEMPLATE],[v.TEXTAREA,c.TEXTAREA],[v.TFOOT,c.TFOOT],[v.TD,c.TD],[v.TH,c.TH],[v.THEAD,c.THEAD],[v.TITLE,c.TITLE],[v.TR,c.TR],[v.TRACK,c.TRACK],[v.TT,c.TT],[v.U,c.U],[v.UL,c.UL],[v.SVG,c.SVG],[v.VAR,c.VAR],[v.WBR,c.WBR],[v.XMP,c.XMP]]);function Yt(e){var t;return(t=$h.get(e))!==null&&t!==void 0?t:c.UNKNOWN}var B=c,Yh={[M.HTML]:new Set([B.ADDRESS,B.APPLET,B.AREA,B.ARTICLE,B.ASIDE,B.BASE,B.BASEFONT,B.BGSOUND,B.BLOCKQUOTE,B.BODY,B.BR,B.BUTTON,B.CAPTION,B.CENTER,B.COL,B.COLGROUP,B.DD,B.DETAILS,B.DIR,B.DIV,B.DL,B.DT,B.EMBED,B.FIELDSET,B.FIGCAPTION,B.FIGURE,B.FOOTER,B.FORM,B.FRAME,B.FRAMESET,B.H1,B.H2,B.H3,B.H4,B.H5,B.H6,B.HEAD,B.HEADER,B.HGROUP,B.HR,B.HTML,B.IFRAME,B.IMG,B.INPUT,B.LI,B.LINK,B.LISTING,B.MAIN,B.MARQUEE,B.MENU,B.META,B.NAV,B.NOEMBED,B.NOFRAMES,B.NOSCRIPT,B.OBJECT,B.OL,B.P,B.PARAM,B.PLAINTEXT,B.PRE,B.SCRIPT,B.SECTION,B.SELECT,B.SOURCE,B.STYLE,B.SUMMARY,B.TABLE,B.TBODY,B.TD,B.TEMPLATE,B.TEXTAREA,B.TFOOT,B.TH,B.THEAD,B.TITLE,B.TR,B.TRACK,B.UL,B.WBR,B.XMP]),[M.MATHML]:new Set([B.MI,B.MO,B.MN,B.MS,B.MTEXT,B.ANNOTATION_XML]),[M.SVG]:new Set([B.TITLE,B.FOREIGN_OBJECT,B.DESC]),[M.XLINK]:new Set,[M.XML]:new Set,[M.XMLNS]:new Set},Wr=new Set([B.H1,B.H2,B.H3,B.H4,B.H5,B.H6]),Yx=new Set([v.STYLE,v.SCRIPT,v.XMP,v.IFRAME,v.NOEMBED,v.NOFRAMES,v.PLAINTEXT]),T;(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"})(T||(T={}));var Te={DATA:T.DATA,RCDATA:T.RCDATA,RAWTEXT:T.RAWTEXT,SCRIPT_DATA:T.SCRIPT_DATA,PLAINTEXT:T.PLAINTEXT,CDATA_SECTION:T.CDATA_SECTION};function qh(e){return e>=g.DIGIT_0&&e<=g.DIGIT_9}function an(e){return e>=g.LATIN_CAPITAL_A&&e<=g.LATIN_CAPITAL_Z}function Vh(e){return e>=g.LATIN_SMALL_A&&e<=g.LATIN_SMALL_Z}function lt(e){return Vh(e)||an(e)}function ha(e){return lt(e)||qh(e)}function Pn(e){return e+32}function mo(e){return e===g.SPACE||e===g.LINE_FEED||e===g.TABULATION||e===g.FORM_FEED}function da(e){return mo(e)||e===g.SOLIDUS||e===g.GREATER_THAN_SIGN}function Wh(e){return e===g.NULL?L.nullCharacterReference:e>1114111?L.characterReferenceOutsideUnicodeRange:uo(e)?L.surrogateCharacterReference:fo(e)?L.noncharacterCharacterReference:ho(e)||e===g.CARRIAGE_RETURN?L.controlCharacterReference:null}var Gh=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=T.DATA,this.returnState=T.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Oh(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new jh(Dh,(n,r)=>{this.preprocessor.pos=this.entityStartPos+r-1,this._flushCodePointConsumedAsCharacterReference(n)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(L.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:n=>{this._err(L.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+n)},validateNumericCharacterReference:n=>{const r=Wh(n);r&&this._err(r,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)===null||r===void 0||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),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(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return this.preprocessor.startsWith(e,t)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:ee.START_TAG,tagName:"",tagID:c.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:ee.END_TAG,tagName:"",tagID:c.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:ee.COMMENT,data:"",location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:ee.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e,t;const n=this.currentToken;if(po(n,this.currentAttr.name)===null){if(n.attrs.push(this.currentAttr),n.location&&this.currentLocation){const r=(e=(t=n.location).attrs)!==null&&e!==void 0?e:t.attrs=Object.create(null);r[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(L.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const e=this.currentToken;this.prepareToken(e),e.tagID=Yt(e.tagName),e.type===ee.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(L.endTagWithAttributes),e.selfClosing&&this._err(L.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case ee.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case ee.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case ee.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){const e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:ee.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,t)}_emitCodePoint(e){const t=mo(e)?ee.WHITESPACE_CHARACTER:e===g.NULL?ee.NULL_CHARACTER:ee.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(ee.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=T.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?rt.Attribute:rt.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===T.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===T.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===T.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case T.DATA:this._stateData(e);break;case T.RCDATA:this._stateRcdata(e);break;case T.RAWTEXT:this._stateRawtext(e);break;case T.SCRIPT_DATA:this._stateScriptData(e);break;case T.PLAINTEXT:this._statePlaintext(e);break;case T.TAG_OPEN:this._stateTagOpen(e);break;case T.END_TAG_OPEN:this._stateEndTagOpen(e);break;case T.TAG_NAME:this._stateTagName(e);break;case T.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case T.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case T.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case T.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case T.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case T.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case T.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case T.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case T.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case T.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case T.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case T.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case T.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case T.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case T.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case T.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case T.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case T.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case T.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case T.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case T.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case T.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case T.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case T.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case T.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case T.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case T.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case T.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case T.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case T.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case T.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case T.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case T.BOGUS_COMMENT:this._stateBogusComment(e);break;case T.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case T.COMMENT_START:this._stateCommentStart(e);break;case T.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case T.COMMENT:this._stateComment(e);break;case T.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case T.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case T.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case T.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case T.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case T.COMMENT_END:this._stateCommentEnd(e);break;case T.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case T.DOCTYPE:this._stateDoctype(e);break;case T.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case T.DOCTYPE_NAME:this._stateDoctypeName(e);break;case T.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case T.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case T.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case T.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case T.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case T.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case T.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case T.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case T.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case T.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case T.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case T.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case T.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case T.CDATA_SECTION:this._stateCdataSection(e);break;case T.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case T.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case T.CHARACTER_REFERENCE:this._stateCharacterReference();break;case T.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw new Error("Unknown state")}}_stateData(e){switch(e){case g.LESS_THAN_SIGN:this.state=T.TAG_OPEN;break;case g.AMPERSAND:this._startCharacterReference();break;case g.NULL:this._err(L.unexpectedNullCharacter),this._emitCodePoint(e);break;case g.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case g.AMPERSAND:this._startCharacterReference();break;case g.LESS_THAN_SIGN:this.state=T.RCDATA_LESS_THAN_SIGN;break;case g.NULL:this._err(L.unexpectedNullCharacter),this._emitChars("�");break;case g.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case g.LESS_THAN_SIGN:this.state=T.RAWTEXT_LESS_THAN_SIGN;break;case g.NULL:this._err(L.unexpectedNullCharacter),this._emitChars("�");break;case g.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case g.LESS_THAN_SIGN:this.state=T.SCRIPT_DATA_LESS_THAN_SIGN;break;case g.NULL:this._err(L.unexpectedNullCharacter),this._emitChars("�");break;case g.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case g.NULL:this._err(L.unexpectedNullCharacter),this._emitChars("�");break;case g.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(lt(e))this._createStartTagToken(),this.state=T.TAG_NAME,this._stateTagName(e);else switch(e){case g.EXCLAMATION_MARK:this.state=T.MARKUP_DECLARATION_OPEN;break;case g.SOLIDUS:this.state=T.END_TAG_OPEN;break;case g.QUESTION_MARK:this._err(L.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=T.BOGUS_COMMENT,this._stateBogusComment(e);break;case g.EOF:this._err(L.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break;default:this._err(L.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=T.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(lt(e))this._createEndTagToken(),this.state=T.TAG_NAME,this._stateTagName(e);else switch(e){case g.GREATER_THAN_SIGN:this._err(L.missingEndTagName),this.state=T.DATA;break;case g.EOF:this._err(L.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break;default:this._err(L.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=T.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){const t=this.currentToken;switch(e){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:this.state=T.BEFORE_ATTRIBUTE_NAME;break;case g.SOLIDUS:this.state=T.SELF_CLOSING_START_TAG;break;case g.GREATER_THAN_SIGN:this.state=T.DATA,this.emitCurrentTagToken();break;case g.NULL:this._err(L.unexpectedNullCharacter),t.tagName+="�";break;case g.EOF:this._err(L.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(an(e)?Pn(e):e)}}_stateRcdataLessThanSign(e){e===g.SOLIDUS?this.state=T.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=T.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){lt(e)?(this.state=T.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars("</"),this.state=T.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=T.BEFORE_ATTRIBUTE_NAME,!1;case g.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=T.SELF_CLOSING_START_TAG,!1;case g.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=T.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=T.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===g.SOLIDUS?this.state=T.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=T.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){lt(e)?(this.state=T.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars("</"),this.state=T.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=T.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case g.SOLIDUS:this.state=T.SCRIPT_DATA_END_TAG_OPEN;break;case g.EXCLAMATION_MARK:this.state=T.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break;default:this._emitChars("<"),this.state=T.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){lt(e)?(this.state=T.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars("</"),this.state=T.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=T.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===g.HYPHEN_MINUS?(this.state=T.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=T.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===g.HYPHEN_MINUS?(this.state=T.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=T.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case g.HYPHEN_MINUS:this.state=T.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break;case g.LESS_THAN_SIGN:this.state=T.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case g.NULL:this._err(L.unexpectedNullCharacter),this._emitChars("�");break;case g.EOF:this._err(L.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case g.HYPHEN_MINUS:this.state=T.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break;case g.LESS_THAN_SIGN:this.state=T.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case g.NULL:this._err(L.unexpectedNullCharacter),this.state=T.SCRIPT_DATA_ESCAPED,this._emitChars("�");break;case g.EOF:this._err(L.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=T.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case g.HYPHEN_MINUS:this._emitChars("-");break;case g.LESS_THAN_SIGN:this.state=T.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case g.GREATER_THAN_SIGN:this.state=T.SCRIPT_DATA,this._emitChars(">");break;case g.NULL:this._err(L.unexpectedNullCharacter),this.state=T.SCRIPT_DATA_ESCAPED,this._emitChars("�");break;case g.EOF:this._err(L.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=T.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===g.SOLIDUS?this.state=T.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:lt(e)?(this._emitChars("<"),this.state=T.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=T.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){lt(e)?(this.state=T.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("</"),this.state=T.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=T.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(we.SCRIPT,!1)&&da(this.preprocessor.peek(we.SCRIPT.length))){this._emitCodePoint(e);for(let t=0;t<we.SCRIPT.length;t++)this._emitCodePoint(this._consume());this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=T.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case g.HYPHEN_MINUS:this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break;case g.LESS_THAN_SIGN:this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case g.NULL:this._err(L.unexpectedNullCharacter),this._emitChars("�");break;case g.EOF:this._err(L.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case g.HYPHEN_MINUS:this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break;case g.LESS_THAN_SIGN:this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case g.NULL:this._err(L.unexpectedNullCharacter),this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars("�");break;case g.EOF:this._err(L.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case g.HYPHEN_MINUS:this._emitChars("-");break;case g.LESS_THAN_SIGN:this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case g.GREATER_THAN_SIGN:this.state=T.SCRIPT_DATA,this._emitChars(">");break;case g.NULL:this._err(L.unexpectedNullCharacter),this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars("�");break;case g.EOF:this._err(L.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===g.SOLIDUS?(this.state=T.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(we.SCRIPT,!1)&&da(this.preprocessor.peek(we.SCRIPT.length))){this._emitCodePoint(e);for(let t=0;t<we.SCRIPT.length;t++)this._emitCodePoint(this._consume());this.state=T.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.SOLIDUS:case g.GREATER_THAN_SIGN:case g.EOF:this.state=T.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case g.EQUALS_SIGN:this._err(L.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=T.ATTRIBUTE_NAME;break;default:this._createAttr(""),this.state=T.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:case g.SOLIDUS:case g.GREATER_THAN_SIGN:case g.EOF:this._leaveAttrName(),this.state=T.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case g.EQUALS_SIGN:this._leaveAttrName(),this.state=T.BEFORE_ATTRIBUTE_VALUE;break;case g.QUOTATION_MARK:case g.APOSTROPHE:case g.LESS_THAN_SIGN:this._err(L.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case g.NULL:this._err(L.unexpectedNullCharacter),this.currentAttr.name+="�";break;default:this.currentAttr.name+=String.fromCodePoint(an(e)?Pn(e):e)}}_stateAfterAttributeName(e){switch(e){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.SOLIDUS:this.state=T.SELF_CLOSING_START_TAG;break;case g.EQUALS_SIGN:this.state=T.BEFORE_ATTRIBUTE_VALUE;break;case g.GREATER_THAN_SIGN:this.state=T.DATA,this.emitCurrentTagToken();break;case g.EOF:this._err(L.eofInTag),this._emitEOFToken();break;default:this._createAttr(""),this.state=T.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.QUOTATION_MARK:this.state=T.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case g.APOSTROPHE:this.state=T.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case g.GREATER_THAN_SIGN:this._err(L.missingAttributeValue),this.state=T.DATA,this.emitCurrentTagToken();break;default:this.state=T.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case g.QUOTATION_MARK:this.state=T.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case g.AMPERSAND:this._startCharacterReference();break;case g.NULL:this._err(L.unexpectedNullCharacter),this.currentAttr.value+="�";break;case g.EOF:this._err(L.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case g.APOSTROPHE:this.state=T.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case g.AMPERSAND:this._startCharacterReference();break;case g.NULL:this._err(L.unexpectedNullCharacter),this.currentAttr.value+="�";break;case g.EOF:this._err(L.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:this._leaveAttrValue(),this.state=T.BEFORE_ATTRIBUTE_NAME;break;case g.AMPERSAND:this._startCharacterReference();break;case g.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=T.DATA,this.emitCurrentTagToken();break;case g.NULL:this._err(L.unexpectedNullCharacter),this.currentAttr.value+="�";break;case g.QUOTATION_MARK:case g.APOSTROPHE:case g.LESS_THAN_SIGN:case g.EQUALS_SIGN:case g.GRAVE_ACCENT:this._err(L.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case g.EOF:this._err(L.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:this._leaveAttrValue(),this.state=T.BEFORE_ATTRIBUTE_NAME;break;case g.SOLIDUS:this._leaveAttrValue(),this.state=T.SELF_CLOSING_START_TAG;break;case g.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=T.DATA,this.emitCurrentTagToken();break;case g.EOF:this._err(L.eofInTag),this._emitEOFToken();break;default:this._err(L.missingWhitespaceBetweenAttributes),this.state=T.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case g.GREATER_THAN_SIGN:{const t=this.currentToken;t.selfClosing=!0,this.state=T.DATA,this.emitCurrentTagToken();break}case g.EOF:this._err(L.eofInTag),this._emitEOFToken();break;default:this._err(L.unexpectedSolidusInTag),this.state=T.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){const t=this.currentToken;switch(e){case g.GREATER_THAN_SIGN:this.state=T.DATA,this.emitCurrentComment(t);break;case g.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case g.NULL:this._err(L.unexpectedNullCharacter),t.data+="�";break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(we.DASH_DASH,!0)?(this._createCommentToken(we.DASH_DASH.length+1),this.state=T.COMMENT_START):this._consumeSequenceIfMatch(we.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(we.DOCTYPE.length+1),this.state=T.DOCTYPE):this._consumeSequenceIfMatch(we.CDATA_START,!0)?this.inForeignNode?this.state=T.CDATA_SECTION:(this._err(L.cdataInHtmlContent),this._createCommentToken(we.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=T.BOGUS_COMMENT):this._ensureHibernation()||(this._err(L.incorrectlyOpenedComment),this._createCommentToken(2),this.state=T.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case g.HYPHEN_MINUS:this.state=T.COMMENT_START_DASH;break;case g.GREATER_THAN_SIGN:{this._err(L.abruptClosingOfEmptyComment),this.state=T.DATA;const t=this.currentToken;this.emitCurrentComment(t);break}default:this.state=T.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){const t=this.currentToken;switch(e){case g.HYPHEN_MINUS:this.state=T.COMMENT_END;break;case g.GREATER_THAN_SIGN:this._err(L.abruptClosingOfEmptyComment),this.state=T.DATA,this.emitCurrentComment(t);break;case g.EOF:this._err(L.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=T.COMMENT,this._stateComment(e)}}_stateComment(e){const t=this.currentToken;switch(e){case g.HYPHEN_MINUS:this.state=T.COMMENT_END_DASH;break;case g.LESS_THAN_SIGN:t.data+="<",this.state=T.COMMENT_LESS_THAN_SIGN;break;case g.NULL:this._err(L.unexpectedNullCharacter),t.data+="�";break;case g.EOF:this._err(L.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){const t=this.currentToken;switch(e){case g.EXCLAMATION_MARK:t.data+="!",this.state=T.COMMENT_LESS_THAN_SIGN_BANG;break;case g.LESS_THAN_SIGN:t.data+="<";break;default:this.state=T.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===g.HYPHEN_MINUS?this.state=T.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=T.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===g.HYPHEN_MINUS?this.state=T.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=T.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==g.GREATER_THAN_SIGN&&e!==g.EOF&&this._err(L.nestedComment),this.state=T.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){const t=this.currentToken;switch(e){case g.HYPHEN_MINUS:this.state=T.COMMENT_END;break;case g.EOF:this._err(L.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=T.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){const t=this.currentToken;switch(e){case g.GREATER_THAN_SIGN:this.state=T.DATA,this.emitCurrentComment(t);break;case g.EXCLAMATION_MARK:this.state=T.COMMENT_END_BANG;break;case g.HYPHEN_MINUS:t.data+="-";break;case g.EOF:this._err(L.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--",this.state=T.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){const t=this.currentToken;switch(e){case g.HYPHEN_MINUS:t.data+="--!",this.state=T.COMMENT_END_DASH;break;case g.GREATER_THAN_SIGN:this._err(L.incorrectlyClosedComment),this.state=T.DATA,this.emitCurrentComment(t);break;case g.EOF:this._err(L.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--!",this.state=T.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:this.state=T.BEFORE_DOCTYPE_NAME;break;case g.GREATER_THAN_SIGN:this.state=T.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case g.EOF:{this._err(L.eofInDoctype),this._createDoctypeToken(null);const t=this.currentToken;t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(L.missingWhitespaceBeforeDoctypeName),this.state=T.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(an(e))this._createDoctypeToken(String.fromCharCode(Pn(e))),this.state=T.DOCTYPE_NAME;else switch(e){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.NULL:this._err(L.unexpectedNullCharacter),this._createDoctypeToken("�"),this.state=T.DOCTYPE_NAME;break;case g.GREATER_THAN_SIGN:{this._err(L.missingDoctypeName),this._createDoctypeToken(null);const t=this.currentToken;t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=T.DATA;break}case g.EOF:{this._err(L.eofInDoctype),this._createDoctypeToken(null);const t=this.currentToken;t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=T.DOCTYPE_NAME}}_stateDoctypeName(e){const t=this.currentToken;switch(e){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:this.state=T.AFTER_DOCTYPE_NAME;break;case g.GREATER_THAN_SIGN:this.state=T.DATA,this.emitCurrentDoctype(t);break;case g.NULL:this._err(L.unexpectedNullCharacter),t.name+="�";break;case g.EOF:this._err(L.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(an(e)?Pn(e):e)}}_stateAfterDoctypeName(e){const t=this.currentToken;switch(e){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.GREATER_THAN_SIGN:this.state=T.DATA,this.emitCurrentDoctype(t);break;case g.EOF:this._err(L.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(we.PUBLIC,!1)?this.state=T.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(we.SYSTEM,!1)?this.state=T.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(L.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){const t=this.currentToken;switch(e){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:this.state=T.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case g.QUOTATION_MARK:this._err(L.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=T.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case g.APOSTROPHE:this._err(L.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=T.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case g.GREATER_THAN_SIGN:this._err(L.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=T.DATA,this.emitCurrentDoctype(t);break;case g.EOF:this._err(L.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(L.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){const t=this.currentToken;switch(e){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.QUOTATION_MARK:t.publicId="",this.state=T.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case g.APOSTROPHE:t.publicId="",this.state=T.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case g.GREATER_THAN_SIGN:this._err(L.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=T.DATA,this.emitCurrentDoctype(t);break;case g.EOF:this._err(L.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(L.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case g.QUOTATION_MARK:this.state=T.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case g.NULL:this._err(L.unexpectedNullCharacter),t.publicId+="�";break;case g.GREATER_THAN_SIGN:this._err(L.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=T.DATA;break;case g.EOF:this._err(L.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){const t=this.currentToken;switch(e){case g.APOSTROPHE:this.state=T.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case g.NULL:this._err(L.unexpectedNullCharacter),t.publicId+="�";break;case g.GREATER_THAN_SIGN:this._err(L.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=T.DATA;break;case g.EOF:this._err(L.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){const t=this.currentToken;switch(e){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:this.state=T.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case g.GREATER_THAN_SIGN:this.state=T.DATA,this.emitCurrentDoctype(t);break;case g.QUOTATION_MARK:this._err(L.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case g.APOSTROPHE:this._err(L.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case g.EOF:this._err(L.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(L.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){const t=this.currentToken;switch(e){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=T.DATA;break;case g.QUOTATION_MARK:t.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case g.APOSTROPHE:t.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case g.EOF:this._err(L.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(L.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){const t=this.currentToken;switch(e){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:this.state=T.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case g.QUOTATION_MARK:this._err(L.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case g.APOSTROPHE:this._err(L.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case g.GREATER_THAN_SIGN:this._err(L.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=T.DATA,this.emitCurrentDoctype(t);break;case g.EOF:this._err(L.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(L.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){const t=this.currentToken;switch(e){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.QUOTATION_MARK:t.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case g.APOSTROPHE:t.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case g.GREATER_THAN_SIGN:this._err(L.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=T.DATA,this.emitCurrentDoctype(t);break;case g.EOF:this._err(L.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(L.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case g.QUOTATION_MARK:this.state=T.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case g.NULL:this._err(L.unexpectedNullCharacter),t.systemId+="�";break;case g.GREATER_THAN_SIGN:this._err(L.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=T.DATA;break;case g.EOF:this._err(L.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){const t=this.currentToken;switch(e){case g.APOSTROPHE:this.state=T.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case g.NULL:this._err(L.unexpectedNullCharacter),t.systemId+="�";break;case g.GREATER_THAN_SIGN:this._err(L.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=T.DATA;break;case g.EOF:this._err(L.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){const t=this.currentToken;switch(e){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=T.DATA;break;case g.EOF:this._err(L.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(L.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){const t=this.currentToken;switch(e){case g.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=T.DATA;break;case g.NULL:this._err(L.unexpectedNullCharacter);break;case g.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case g.RIGHT_SQUARE_BRACKET:this.state=T.CDATA_SECTION_BRACKET;break;case g.EOF:this._err(L.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===g.RIGHT_SQUARE_BRACKET?this.state=T.CDATA_SECTION_END:(this._emitChars("]"),this.state=T.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case g.GREATER_THAN_SIGN:this.state=T.DATA;break;case g.RIGHT_SQUARE_BRACKET:this._emitChars("]");break;default:this._emitChars("]]"),this.state=T.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0)if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}e===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(g.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&ha(this.preprocessor.peek(1))?T.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){ha(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===g.SEMICOLON&&this._err(L.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},go=new Set([c.DD,c.DT,c.LI,c.OPTGROUP,c.OPTION,c.P,c.RB,c.RP,c.RT,c.RTC]),fa=new Set([...go,c.CAPTION,c.COLGROUP,c.TBODY,c.TD,c.TFOOT,c.TH,c.THEAD,c.TR]),Vn=new Set([c.APPLET,c.CAPTION,c.HTML,c.MARQUEE,c.OBJECT,c.TABLE,c.TD,c.TEMPLATE,c.TH]),Qh=new Set([...Vn,c.OL,c.UL]),Kh=new Set([...Vn,c.BUTTON]),pa=new Set([c.ANNOTATION_XML,c.MI,c.MN,c.MO,c.MS,c.MTEXT]),ma=new Set([c.DESC,c.FOREIGN_OBJECT,c.TITLE]),Xh=new Set([c.TR,c.TEMPLATE,c.HTML]),Zh=new Set([c.TBODY,c.TFOOT,c.THEAD,c.TEMPLATE,c.HTML]),Jh=new Set([c.TABLE,c.TEMPLATE,c.HTML]),ed=new Set([c.TD,c.TH]),td=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=c.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===c.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===M.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){const e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){const n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){const r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==M.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){const t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){const n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Wr,M.HTML)}popUntilTableCellPopped(){this.popUntilPopped(ed,M.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){const n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(Jh,M.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Zh,M.HTML)}clearBackToTableRowContext(){this.clearBackTo(Xh,M.HTML)}remove(e){const t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===c.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){const t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===c.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){const r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case M.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case M.SVG:if(ma.has(r))return!1;break;case M.MATHML:if(pa.has(r))return!1}}return!0}hasInScope(e){return this.hasInDynamicScope(e,Vn)}hasInListItemScope(e){return this.hasInDynamicScope(e,Qh)}hasInButtonScope(e){return this.hasInDynamicScope(e,Kh)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case M.HTML:if(Wr.has(t))return!0;if(Vn.has(t))return!1;break;case M.SVG:if(ma.has(t))return!1;break;case M.MATHML:if(pa.has(t))return!1}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===M.HTML)switch(this.tagIDs[t]){case e:return!0;case c.TABLE:case c.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===M.HTML)switch(this.tagIDs[e]){case c.TBODY:case c.THEAD:case c.TFOOT:return!0;case c.TABLE:case c.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===M.HTML)switch(this.tagIDs[t]){case e:return!0;case c.OPTION:case c.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&go.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&fa.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&fa.has(this.currentTagId);)this.pop()}},Ar=3,Ke;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Ke||(Ke={}));var ga={type:Ke.Marker},nd=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){const n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let s=0;s<this.entries.length;s++){const l=this.entries[s];if(l.type===Ke.Marker)break;const{element:o}=l;if(this.treeAdapter.getTagName(o)===i&&this.treeAdapter.getNamespaceURI(o)===a){const u=this.treeAdapter.getAttrList(o);u.length===r&&n.push({idx:s,attrs:u})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<Ar)return;const t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<Ar)return;const r=new Map(t.map(a=>[a.name,a.value]));let i=0;for(let a=0;a<n.length;a++){const s=n[a];s.attrs.every(l=>r.get(l.name)===l.value)&&(i+=1,i>=Ar&&this.entries.splice(s.idx,1))}}insertMarker(){this.entries.unshift(ga)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:Ke.Element,element:e,token:t})}insertElementAfterBookmark(e,t){const n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:Ke.Element,element:e,token:t})}removeEntry(e){const t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){const e=this.entries.indexOf(ga);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){const t=this.entries.find(n=>n.type===Ke.Marker||this.treeAdapter.getTagName(n.element)===e);return t&&t.type===Ke.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===Ke.Element&&t.element===e)}},ct={createDocument(){return{nodeName:"#document",mode:Ue.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(a=>a.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};ct.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(ct.isTextNode(n)){n.value+=t;return}}ct.appendChild(e,ct.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&ct.isTextNode(r)?r.value+=t:ct.insertBefore(e,ct.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},Eo="html",rd="about:legacy-compat",id="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",To=["+//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//"],ad=[...To,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],sd=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),bo=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],od=[...bo,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Ea(e,t){return t.some(n=>e.startsWith(n))}function ld(e){return e.name===Eo&&e.publicId===null&&(e.systemId===null||e.systemId===rd)}function cd(e){if(e.name!==Eo)return Ue.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===id)return Ue.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),sd.has(n))return Ue.QUIRKS;let r=t===null?ad:To;if(Ea(n,r))return Ue.QUIRKS;if(r=t===null?bo:od,Ea(n,r))return Ue.LIMITED_QUIRKS}return Ue.NO_QUIRKS}var Ta={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},ud="definitionurl",hd="definitionURL",dd=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])),fd=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:M.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:M.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:M.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:M.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:M.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:M.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:M.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:M.XML}],["xml:space",{prefix:"xml",name:"space",namespace:M.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:M.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:M.XMLNS}]]),pd=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])),md=new Set([c.B,c.BIG,c.BLOCKQUOTE,c.BODY,c.BR,c.CENTER,c.CODE,c.DD,c.DIV,c.DL,c.DT,c.EM,c.EMBED,c.H1,c.H2,c.H3,c.H4,c.H5,c.H6,c.HEAD,c.HR,c.I,c.IMG,c.LI,c.LISTING,c.MENU,c.META,c.NOBR,c.OL,c.P,c.PRE,c.RUBY,c.S,c.SMALL,c.SPAN,c.STRONG,c.STRIKE,c.SUB,c.SUP,c.TABLE,c.TT,c.U,c.UL,c.VAR]);function gd(e){const t=e.tagID;return t===c.FONT&&e.attrs.some(({name:n})=>n===xt.COLOR||n===xt.SIZE||n===xt.FACE)||md.has(t)}function ko(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===ud){e.attrs[t].name=hd;break}}function Ao(e){for(let t=0;t<e.attrs.length;t++){const n=dd.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function bi(e){for(let t=0;t<e.attrs.length;t++){const n=fd.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function Ed(e){const t=pd.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Yt(e.tagName))}function Td(e,t){return t===M.MATHML&&(e===c.MI||e===c.MO||e===c.MN||e===c.MS||e===c.MTEXT)}function bd(e,t,n){if(t===M.MATHML&&e===c.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===xt.ENCODING){const i=n[r].value.toLowerCase();return i===Ta.TEXT_HTML||i===Ta.APPLICATION_XML}}return t===M.SVG&&(e===c.FOREIGN_OBJECT||e===c.DESC||e===c.TITLE)}function kd(e,t,n,r){return(!r||r===M.HTML)&&bd(e,t,n)||(!r||r===M.MATHML)&&Td(e,t)}var Ad="hidden",_d=8,xd=3,b;(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"})(b||(b={}));var yd={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},_o=new Set([c.TABLE,c.TBODY,c.TFOOT,c.THEAD,c.TR]),ba={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:ct,onParseError:null},ka=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=b.INITIAL,this.originalInsertionMode=b.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={...ba,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=t??this.treeAdapter.createDocument(),this.tokenizer=new Gh(this.options,this),this.activeFormattingElements=new nd(this.treeAdapter),this.fragmentContextID=n?Yt(this.treeAdapter.getTagName(n)):c.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new td(this.document,this.treeAdapter,this)}static parse(e,t){const n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){const n={...ba,...t};e!=null||(e=n.treeAdapter.createElement(v.TEMPLATE,M.HTML,[]));const r=n.treeAdapter.createElement("documentmock",M.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===c.TEMPLATE&&i.tmplInsertionModeStack.unshift(b.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){const e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){var r;if(!this.onParseError)return;const i=(r=e.location)!==null&&r!==void 0?r:yd,a={code:t,startLine:i.startLine,startCol:i.startCol,startOffset:i.startOffset,endLine:n?i.startLine:i.endLine,endCol:n?i.startCol:i.endCol,endOffset:n?i.startOffset:i.endOffset};this.onParseError(a)}onItemPush(e,t,n){var r,i;(i=(r=this.treeAdapter).onItemPush)===null||i===void 0||i.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)===null||r===void 0||r.call(n,e,this.openElements.current),t){let i,a;this.openElements.stackTop===0&&this.fragmentContext?(i=this.fragmentContext,a=this.fragmentContextID):{current:i,currentTagId:a}=this.openElements,this._setContextModes(i,a)}}_setContextModes(e,t){const n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===M.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,M.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=b.TEXT}switchToPlaintextParsing(){this.insertionMode=b.TEXT,this.originalInsertionMode=b.IN_BODY,this.tokenizer.state=Te.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===v.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==M.HTML))switch(this.fragmentContextID){case c.TITLE:case c.TEXTAREA:this.tokenizer.state=Te.RCDATA;break;case c.STYLE:case c.XMP:case c.IFRAME:case c.NOEMBED:case c.NOFRAMES:case c.NOSCRIPT:this.tokenizer.state=Te.RAWTEXT;break;case c.SCRIPT:this.tokenizer.state=Te.SCRIPT_DATA;break;case c.PLAINTEXT:this.tokenizer.state=Te.PLAINTEXT}}_setDocumentType(e){const t=e.name||"",n=e.publicId||"",r=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){const i=this.treeAdapter.getChildNodes(this.document).find(a=>this.treeAdapter.isDocumentTypeNode(a));i&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){const n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const n=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(n??this.document,e)}}_appendElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){const n=this.treeAdapter.createElement(e,M.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){const t=this.treeAdapter.createElement(e.tagName,M.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(v.HTML,M.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,c.HTML)}_appendCommentNode(e,t){const n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;const r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){const{endLine:a,endCol:s,endOffset:l}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:a,endCol:s,endOffset:l})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){const n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===ee.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===c.SVG&&this.treeAdapter.getTagName(t)===v.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===M.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===c.MGLYPH||e.tagID===c.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,M.HTML)}_processToken(e){switch(e.type){case ee.CHARACTER:this.onCharacter(e);break;case ee.NULL_CHARACTER:this.onNullCharacter(e);break;case ee.COMMENT:this.onComment(e);break;case ee.DOCTYPE:this.onDoctype(e);break;case ee.START_TAG:this._processStartTag(e);break;case ee.END_TAG:this.onEndTag(e);break;case ee.EOF:this.onEof(e);break;case ee.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){const r=this.treeAdapter.getNamespaceURI(t),i=this.treeAdapter.getAttrList(t);return kd(e,r,i,n)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.entries.length;if(e){const t=this.activeFormattingElements.entries.findIndex(r=>r.type===Ke.Marker||this.openElements.contains(r.element)),n=t===-1?e-1:t-1;for(let r=n;r>=0;r--){const i=this.activeFormattingElements.entries[r];this._insertElement(i.token,this.treeAdapter.getNamespaceURI(i.element)),i.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=b.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(c.P),this.openElements.popUntilTagNamePopped(c.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case c.TR:this.insertionMode=b.IN_ROW;return;case c.TBODY:case c.THEAD:case c.TFOOT:this.insertionMode=b.IN_TABLE_BODY;return;case c.CAPTION:this.insertionMode=b.IN_CAPTION;return;case c.COLGROUP:this.insertionMode=b.IN_COLUMN_GROUP;return;case c.TABLE:this.insertionMode=b.IN_TABLE;return;case c.BODY:this.insertionMode=b.IN_BODY;return;case c.FRAMESET:this.insertionMode=b.IN_FRAMESET;return;case c.SELECT:this._resetInsertionModeForSelect(e);return;case c.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case c.HTML:this.insertionMode=this.headElement?b.AFTER_HEAD:b.BEFORE_HEAD;return;case c.TD:case c.TH:if(e>0){this.insertionMode=b.IN_CELL;return}break;case c.HEAD:if(e>0){this.insertionMode=b.IN_HEAD;return}}this.insertionMode=b.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){const n=this.openElements.tagIDs[t];if(n===c.TEMPLATE)break;if(n===c.TABLE){this.insertionMode=b.IN_SELECT_IN_TABLE;return}}this.insertionMode=b.IN_SELECT}_isElementCausesFosterParenting(e){return _o.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){const t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case c.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===M.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case c.TABLE:{const n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){const n=this.treeAdapter.getNamespaceURI(e);return Yh[n].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){tp(this,e);return}switch(this.insertionMode){case b.INITIAL:Zt(this,e);break;case b.BEFORE_HTML:ln(this,e);break;case b.BEFORE_HEAD:cn(this,e);break;case b.IN_HEAD:un(this,e);break;case b.IN_HEAD_NO_SCRIPT:hn(this,e);break;case b.AFTER_HEAD:dn(this,e);break;case b.IN_BODY:case b.IN_CAPTION:case b.IN_CELL:case b.IN_TEMPLATE:yo(this,e);break;case b.TEXT:case b.IN_SELECT:case b.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case b.IN_TABLE:case b.IN_TABLE_BODY:case b.IN_ROW:_r(this,e);break;case b.IN_TABLE_TEXT:wo(this,e);break;case b.IN_COLUMN_GROUP:Wn(this,e);break;case b.AFTER_BODY:Gn(this,e);break;case b.AFTER_AFTER_BODY:$n(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){ep(this,e);return}switch(this.insertionMode){case b.INITIAL:Zt(this,e);break;case b.BEFORE_HTML:ln(this,e);break;case b.BEFORE_HEAD:cn(this,e);break;case b.IN_HEAD:un(this,e);break;case b.IN_HEAD_NO_SCRIPT:hn(this,e);break;case b.AFTER_HEAD:dn(this,e);break;case b.TEXT:this._insertCharacters(e);break;case b.IN_TABLE:case b.IN_TABLE_BODY:case b.IN_ROW:_r(this,e);break;case b.IN_COLUMN_GROUP:Wn(this,e);break;case b.AFTER_BODY:Gn(this,e);break;case b.AFTER_AFTER_BODY:$n(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){Gr(this,e);return}switch(this.insertionMode){case b.INITIAL:case b.BEFORE_HTML:case b.BEFORE_HEAD:case b.IN_HEAD:case b.IN_HEAD_NO_SCRIPT:case b.AFTER_HEAD:case b.IN_BODY:case b.IN_TABLE:case b.IN_CAPTION:case b.IN_COLUMN_GROUP:case b.IN_TABLE_BODY:case b.IN_ROW:case b.IN_CELL:case b.IN_SELECT:case b.IN_SELECT_IN_TABLE:case b.IN_TEMPLATE:case b.IN_FRAMESET:case b.AFTER_FRAMESET:Gr(this,e);break;case b.IN_TABLE_TEXT:Jt(this,e);break;case b.AFTER_BODY:Ld(this,e);break;case b.AFTER_AFTER_BODY:case b.AFTER_AFTER_FRAMESET:Rd(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case b.INITIAL:Od(this,e);break;case b.BEFORE_HEAD:case b.IN_HEAD:case b.IN_HEAD_NO_SCRIPT:case b.AFTER_HEAD:this._err(e,L.misplacedDoctype);break;case b.IN_TABLE_TEXT:Jt(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,L.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?np(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case b.INITIAL:Zt(this,e);break;case b.BEFORE_HTML:Dd(this,e);break;case b.BEFORE_HEAD:Md(this,e);break;case b.IN_HEAD:qe(this,e);break;case b.IN_HEAD_NO_SCRIPT:Hd(this,e);break;case b.AFTER_HEAD:jd(this,e);break;case b.IN_BODY:xe(this,e);break;case b.IN_TABLE:Ut(this,e);break;case b.IN_TABLE_TEXT:Jt(this,e);break;case b.IN_CAPTION:Ff(this,e);break;case b.IN_COLUMN_GROUP:_i(this,e);break;case b.IN_TABLE_BODY:lr(this,e);break;case b.IN_ROW:cr(this,e);break;case b.IN_CELL:jf(this,e);break;case b.IN_SELECT:Oo(this,e);break;case b.IN_SELECT_IN_TABLE:$f(this,e);break;case b.IN_TEMPLATE:qf(this,e);break;case b.AFTER_BODY:Wf(this,e);break;case b.IN_FRAMESET:Gf(this,e);break;case b.AFTER_FRAMESET:Kf(this,e);break;case b.AFTER_AFTER_BODY:Zf(this,e);break;case b.AFTER_AFTER_FRAMESET:Jf(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?rp(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case b.INITIAL:Zt(this,e);break;case b.BEFORE_HTML:Pd(this,e);break;case b.BEFORE_HEAD:Bd(this,e);break;case b.IN_HEAD:Fd(this,e);break;case b.IN_HEAD_NO_SCRIPT:Ud(this,e);break;case b.AFTER_HEAD:zd(this,e);break;case b.IN_BODY:or(this,e);break;case b.TEXT:If(this,e);break;case b.IN_TABLE:En(this,e);break;case b.IN_TABLE_TEXT:Jt(this,e);break;case b.IN_CAPTION:Hf(this,e);break;case b.IN_COLUMN_GROUP:Uf(this,e);break;case b.IN_TABLE_BODY:Qr(this,e);break;case b.IN_ROW:Ro(this,e);break;case b.IN_CELL:zf(this,e);break;case b.IN_SELECT:Do(this,e);break;case b.IN_SELECT_IN_TABLE:Yf(this,e);break;case b.IN_TEMPLATE:Vf(this,e);break;case b.AFTER_BODY:Mo(this,e);break;case b.IN_FRAMESET:Qf(this,e);break;case b.AFTER_FRAMESET:Xf(this,e);break;case b.AFTER_AFTER_BODY:$n(this,e)}}onEof(e){switch(this.insertionMode){case b.INITIAL:Zt(this,e);break;case b.BEFORE_HTML:ln(this,e);break;case b.BEFORE_HEAD:cn(this,e);break;case b.IN_HEAD:un(this,e);break;case b.IN_HEAD_NO_SCRIPT:hn(this,e);break;case b.AFTER_HEAD:dn(this,e);break;case b.IN_BODY:case b.IN_TABLE:case b.IN_CAPTION:case b.IN_COLUMN_GROUP:case b.IN_TABLE_BODY:case b.IN_ROW:case b.IN_CELL:case b.IN_SELECT:case b.IN_SELECT_IN_TABLE:Io(this,e);break;case b.TEXT:vf(this,e);break;case b.IN_TABLE_TEXT:Jt(this,e);break;case b.IN_TEMPLATE:Po(this,e);break;case b.AFTER_BODY:case b.IN_FRAMESET:case b.AFTER_FRAMESET:case b.AFTER_AFTER_BODY:case b.AFTER_AFTER_FRAMESET:Ai(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===g.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case b.IN_HEAD:case b.IN_HEAD_NO_SCRIPT:case b.AFTER_HEAD:case b.TEXT:case b.IN_COLUMN_GROUP:case b.IN_SELECT:case b.IN_SELECT_IN_TABLE:case b.IN_FRAMESET:case b.AFTER_FRAMESET:this._insertCharacters(e);break;case b.IN_BODY:case b.IN_CAPTION:case b.IN_CELL:case b.IN_TEMPLATE:case b.AFTER_BODY:case b.AFTER_AFTER_BODY:case b.AFTER_AFTER_FRAMESET:xo(this,e);break;case b.IN_TABLE:case b.IN_TABLE_BODY:case b.IN_ROW:_r(this,e);break;case b.IN_TABLE_TEXT:vo(this,e)}}};function Cd(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):No(e,t),n}function Sd(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function Nd(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,s=i;s!==n;a++,s=i){i=e.openElements.getCommonAncestor(s);const l=e.activeFormattingElements.getElementEntry(s),o=l&&a>=xd;!l||o?(o&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(s)):(s=Id(e,l),r===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function Id(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function vd(e,t,n){const r=e.treeAdapter.getTagName(t),i=Yt(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);i===c.TEMPLATE&&a===M.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function wd(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function ki(e,t){for(let n=0;n<_d;n++){const r=Cd(e,t);if(!r)break;const i=Sd(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const a=Nd(e,i,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),s&&vd(e,s,a),wd(e,i,r)}}function Gr(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Ld(e,t){e._appendCommentNode(t,e.openElements.items[0])}function Rd(e,t){e._appendCommentNode(t,e.document)}function Ai(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(a);s&&!s.endTag&&e._setEndLocation(a,t)}}}}function Od(e,t){e._setDocumentType(t);const n=t.forceQuirks?Ue.QUIRKS:cd(t);ld(t)||e._err(t,L.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=b.BEFORE_HTML}function Zt(e,t){e._err(t,L.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Ue.QUIRKS),e.insertionMode=b.BEFORE_HTML,e._processToken(t)}function Dd(e,t){t.tagID===c.HTML?(e._insertElement(t,M.HTML),e.insertionMode=b.BEFORE_HEAD):ln(e,t)}function Pd(e,t){const n=t.tagID;(n===c.HTML||n===c.HEAD||n===c.BODY||n===c.BR)&&ln(e,t)}function ln(e,t){e._insertFakeRootElement(),e.insertionMode=b.BEFORE_HEAD,e._processToken(t)}function Md(e,t){switch(t.tagID){case c.HTML:xe(e,t);break;case c.HEAD:e._insertElement(t,M.HTML),e.headElement=e.openElements.current,e.insertionMode=b.IN_HEAD;break;default:cn(e,t)}}function Bd(e,t){const n=t.tagID;n===c.HEAD||n===c.BODY||n===c.HTML||n===c.BR?cn(e,t):e._err(t,L.endTagWithoutMatchingOpenElement)}function cn(e,t){e._insertFakeElement(v.HEAD,c.HEAD),e.headElement=e.openElements.current,e.insertionMode=b.IN_HEAD,e._processToken(t)}function qe(e,t){switch(t.tagID){case c.HTML:xe(e,t);break;case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break;case c.TITLE:e._switchToTextParsing(t,Te.RCDATA);break;case c.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,Te.RAWTEXT):(e._insertElement(t,M.HTML),e.insertionMode=b.IN_HEAD_NO_SCRIPT);break;case c.NOFRAMES:case c.STYLE:e._switchToTextParsing(t,Te.RAWTEXT);break;case c.SCRIPT:e._switchToTextParsing(t,Te.SCRIPT_DATA);break;case c.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=b.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(b.IN_TEMPLATE);break;case c.HEAD:e._err(t,L.misplacedStartTagForHeadElement);break;default:un(e,t)}}function Fd(e,t){switch(t.tagID){case c.HEAD:e.openElements.pop(),e.insertionMode=b.AFTER_HEAD;break;case c.BODY:case c.BR:case c.HTML:un(e,t);break;case c.TEMPLATE:It(e,t);break;default:e._err(t,L.endTagWithoutMatchingOpenElement)}}function It(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==c.TEMPLATE&&e._err(t,L.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(c.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,L.endTagWithoutMatchingOpenElement)}function un(e,t){e.openElements.pop(),e.insertionMode=b.AFTER_HEAD,e._processToken(t)}function Hd(e,t){switch(t.tagID){case c.HTML:xe(e,t);break;case c.BASEFONT:case c.BGSOUND:case c.HEAD:case c.LINK:case c.META:case c.NOFRAMES:case c.STYLE:qe(e,t);break;case c.NOSCRIPT:e._err(t,L.nestedNoscriptInHead);break;default:hn(e,t)}}function Ud(e,t){switch(t.tagID){case c.NOSCRIPT:e.openElements.pop(),e.insertionMode=b.IN_HEAD;break;case c.BR:hn(e,t);break;default:e._err(t,L.endTagWithoutMatchingOpenElement)}}function hn(e,t){const n=t.type===ee.EOF?L.openElementsLeftAfterEof:L.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=b.IN_HEAD,e._processToken(t)}function jd(e,t){switch(t.tagID){case c.HTML:xe(e,t);break;case c.BODY:e._insertElement(t,M.HTML),e.framesetOk=!1,e.insertionMode=b.IN_BODY;break;case c.FRAMESET:e._insertElement(t,M.HTML),e.insertionMode=b.IN_FRAMESET;break;case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:case c.NOFRAMES:case c.SCRIPT:case c.STYLE:case c.TEMPLATE:case c.TITLE:e._err(t,L.abandonedHeadElementChild),e.openElements.push(e.headElement,c.HEAD),qe(e,t),e.openElements.remove(e.headElement);break;case c.HEAD:e._err(t,L.misplacedStartTagForHeadElement);break;default:dn(e,t)}}function zd(e,t){switch(t.tagID){case c.BODY:case c.HTML:case c.BR:dn(e,t);break;case c.TEMPLATE:It(e,t);break;default:e._err(t,L.endTagWithoutMatchingOpenElement)}}function dn(e,t){e._insertFakeElement(v.BODY,c.BODY),e.insertionMode=b.IN_BODY,sr(e,t)}function sr(e,t){switch(t.type){case ee.CHARACTER:yo(e,t);break;case ee.WHITESPACE_CHARACTER:xo(e,t);break;case ee.COMMENT:Gr(e,t);break;case ee.START_TAG:xe(e,t);break;case ee.END_TAG:or(e,t);break;case ee.EOF:Io(e,t)}}function xo(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function yo(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function $d(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Yd(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function qd(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,M.HTML),e.insertionMode=b.IN_FRAMESET)}function Vd(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML)}function Wd(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Wr.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,M.HTML)}function Gd(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Qd(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML),n||(e.formElement=e.openElements.current))}function Kd(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===c.LI&&i===c.LI||(n===c.DD||n===c.DT)&&(i===c.DD||i===c.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==c.ADDRESS&&i!==c.DIV&&i!==c.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML)}function Xd(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML),e.tokenizer.state=Te.PLAINTEXT}function Zd(e,t){e.openElements.hasInScope(c.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(c.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.framesetOk=!1}function Jd(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(v.A);n&&(ki(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ef(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function tf(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(c.NOBR)&&(ki(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,M.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function nf(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function rf(e,t){e.treeAdapter.getDocumentMode(e.document)!==Ue.QUIRKS&&e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML),e.framesetOk=!1,e.insertionMode=b.IN_TABLE}function Co(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,M.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function So(e){const t=po(e,xt.TYPE);return t!=null&&t.toLowerCase()===Ad}function af(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,M.HTML),So(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function sf(e,t){e._appendElement(t,M.HTML),t.ackSelfClosing=!0}function of(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._appendElement(t,M.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function lf(e,t){t.tagName=v.IMG,t.tagID=c.IMG,Co(e,t)}function cf(e,t){e._insertElement(t,M.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Te.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=b.TEXT}function uf(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Te.RAWTEXT)}function hf(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Te.RAWTEXT)}function Aa(e,t){e._switchToTextParsing(t,Te.RAWTEXT)}function df(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===b.IN_TABLE||e.insertionMode===b.IN_CAPTION||e.insertionMode===b.IN_TABLE_BODY||e.insertionMode===b.IN_ROW||e.insertionMode===b.IN_CELL?b.IN_SELECT_IN_TABLE:b.IN_SELECT}function ff(e,t){e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML)}function pf(e,t){e.openElements.hasInScope(c.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,M.HTML)}function mf(e,t){e.openElements.hasInScope(c.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(c.RTC),e._insertElement(t,M.HTML)}function gf(e,t){e._reconstructActiveFormattingElements(),ko(t),bi(t),t.selfClosing?e._appendElement(t,M.MATHML):e._insertElement(t,M.MATHML),t.ackSelfClosing=!0}function Ef(e,t){e._reconstructActiveFormattingElements(),Ao(t),bi(t),t.selfClosing?e._appendElement(t,M.SVG):e._insertElement(t,M.SVG),t.ackSelfClosing=!0}function _a(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML)}function xe(e,t){switch(t.tagID){case c.I:case c.S:case c.B:case c.U:case c.EM:case c.TT:case c.BIG:case c.CODE:case c.FONT:case c.SMALL:case c.STRIKE:case c.STRONG:ef(e,t);break;case c.A:Jd(e,t);break;case c.H1:case c.H2:case c.H3:case c.H4:case c.H5:case c.H6:Wd(e,t);break;case c.P:case c.DL:case c.OL:case c.UL:case c.DIV:case c.DIR:case c.NAV:case c.MAIN:case c.MENU:case c.ASIDE:case c.CENTER:case c.FIGURE:case c.FOOTER:case c.HEADER:case c.HGROUP:case c.DIALOG:case c.DETAILS:case c.ADDRESS:case c.ARTICLE:case c.SEARCH:case c.SECTION:case c.SUMMARY:case c.FIELDSET:case c.BLOCKQUOTE:case c.FIGCAPTION:Vd(e,t);break;case c.LI:case c.DD:case c.DT:Kd(e,t);break;case c.BR:case c.IMG:case c.WBR:case c.AREA:case c.EMBED:case c.KEYGEN:Co(e,t);break;case c.HR:of(e,t);break;case c.RB:case c.RTC:pf(e,t);break;case c.RT:case c.RP:mf(e,t);break;case c.PRE:case c.LISTING:Gd(e,t);break;case c.XMP:uf(e,t);break;case c.SVG:Ef(e,t);break;case c.HTML:$d(e,t);break;case c.BASE:case c.LINK:case c.META:case c.STYLE:case c.TITLE:case c.SCRIPT:case c.BGSOUND:case c.BASEFONT:case c.TEMPLATE:qe(e,t);break;case c.BODY:Yd(e,t);break;case c.FORM:Qd(e,t);break;case c.NOBR:tf(e,t);break;case c.MATH:gf(e,t);break;case c.TABLE:rf(e,t);break;case c.INPUT:af(e,t);break;case c.PARAM:case c.TRACK:case c.SOURCE:sf(e,t);break;case c.IMAGE:lf(e,t);break;case c.BUTTON:Zd(e,t);break;case c.APPLET:case c.OBJECT:case c.MARQUEE:nf(e,t);break;case c.IFRAME:hf(e,t);break;case c.SELECT:df(e,t);break;case c.OPTION:case c.OPTGROUP:ff(e,t);break;case c.NOEMBED:case c.NOFRAMES:Aa(e,t);break;case c.FRAMESET:qd(e,t);break;case c.TEXTAREA:cf(e,t);break;case c.NOSCRIPT:e.options.scriptingEnabled?Aa(e,t):_a(e,t);break;case c.PLAINTEXT:Xd(e,t);break;case c.COL:case c.TH:case c.TD:case c.TR:case c.HEAD:case c.FRAME:case c.TBODY:case c.TFOOT:case c.THEAD:case c.CAPTION:case c.COLGROUP:break;default:_a(e,t)}}function Tf(e,t){if(e.openElements.hasInScope(c.BODY)&&(e.insertionMode=b.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function bf(e,t){e.openElements.hasInScope(c.BODY)&&(e.insertionMode=b.AFTER_BODY,Mo(e,t))}function kf(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function Af(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(c.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(c.FORM):n&&e.openElements.remove(n))}function _f(e){e.openElements.hasInButtonScope(c.P)||e._insertFakeElement(v.P,c.P),e._closePElement()}function xf(e){e.openElements.hasInListItemScope(c.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(c.LI),e.openElements.popUntilTagNamePopped(c.LI))}function yf(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function Cf(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function Sf(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Nf(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(v.BR,c.BR),e.openElements.pop(),e.framesetOk=!1}function No(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const a=e.openElements.items[i],s=e.openElements.tagIDs[i];if(r===s&&(r!==c.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(a,s))break}}function or(e,t){switch(t.tagID){case c.A:case c.B:case c.I:case c.S:case c.U:case c.EM:case c.TT:case c.BIG:case c.CODE:case c.FONT:case c.NOBR:case c.SMALL:case c.STRIKE:case c.STRONG:ki(e,t);break;case c.P:_f(e);break;case c.DL:case c.UL:case c.OL:case c.DIR:case c.DIV:case c.NAV:case c.PRE:case c.MAIN:case c.MENU:case c.ASIDE:case c.BUTTON:case c.CENTER:case c.FIGURE:case c.FOOTER:case c.HEADER:case c.HGROUP:case c.DIALOG:case c.ADDRESS:case c.ARTICLE:case c.DETAILS:case c.SEARCH:case c.SECTION:case c.SUMMARY:case c.LISTING:case c.FIELDSET:case c.BLOCKQUOTE:case c.FIGCAPTION:kf(e,t);break;case c.LI:xf(e);break;case c.DD:case c.DT:yf(e,t);break;case c.H1:case c.H2:case c.H3:case c.H4:case c.H5:case c.H6:Cf(e);break;case c.BR:Nf(e);break;case c.BODY:Tf(e,t);break;case c.HTML:bf(e,t);break;case c.FORM:Af(e);break;case c.APPLET:case c.OBJECT:case c.MARQUEE:Sf(e,t);break;case c.TEMPLATE:It(e,t);break;default:No(e,t)}}function Io(e,t){e.tmplInsertionModeStack.length>0?Po(e,t):Ai(e,t)}function If(e,t){var n;t.tagID===c.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function vf(e,t){e._err(t,L.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function _r(e,t){if(e.openElements.currentTagId!==void 0&&_o.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=b.IN_TABLE_TEXT,t.type){case ee.CHARACTER:wo(e,t);break;case ee.WHITESPACE_CHARACTER:vo(e,t)}else xn(e,t)}function wf(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,M.HTML),e.insertionMode=b.IN_CAPTION}function Lf(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,M.HTML),e.insertionMode=b.IN_COLUMN_GROUP}function Rf(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(v.COLGROUP,c.COLGROUP),e.insertionMode=b.IN_COLUMN_GROUP,_i(e,t)}function Of(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,M.HTML),e.insertionMode=b.IN_TABLE_BODY}function Df(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(v.TBODY,c.TBODY),e.insertionMode=b.IN_TABLE_BODY,lr(e,t)}function Pf(e,t){e.openElements.hasInTableScope(c.TABLE)&&(e.openElements.popUntilTagNamePopped(c.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Mf(e,t){So(t)?e._appendElement(t,M.HTML):xn(e,t),t.ackSelfClosing=!0}function Bf(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,M.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Ut(e,t){switch(t.tagID){case c.TD:case c.TH:case c.TR:Df(e,t);break;case c.STYLE:case c.SCRIPT:case c.TEMPLATE:qe(e,t);break;case c.COL:Rf(e,t);break;case c.FORM:Bf(e,t);break;case c.TABLE:Pf(e,t);break;case c.TBODY:case c.TFOOT:case c.THEAD:Of(e,t);break;case c.INPUT:Mf(e,t);break;case c.CAPTION:wf(e,t);break;case c.COLGROUP:Lf(e,t);break;default:xn(e,t)}}function En(e,t){switch(t.tagID){case c.TABLE:e.openElements.hasInTableScope(c.TABLE)&&(e.openElements.popUntilTagNamePopped(c.TABLE),e._resetInsertionMode());break;case c.TEMPLATE:It(e,t);break;case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:case c.TBODY:case c.TD:case c.TFOOT:case c.TH:case c.THEAD:case c.TR:break;default:xn(e,t)}}function xn(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,sr(e,t),e.fosterParentingEnabled=n}function vo(e,t){e.pendingCharacterTokens.push(t)}function wo(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Jt(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)xn(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var Lo=new Set([c.CAPTION,c.COL,c.COLGROUP,c.TBODY,c.TD,c.TFOOT,c.TH,c.THEAD,c.TR]);function Ff(e,t){const n=t.tagID;Lo.has(n)?e.openElements.hasInTableScope(c.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(c.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=b.IN_TABLE,Ut(e,t)):xe(e,t)}function Hf(e,t){const n=t.tagID;switch(n){case c.CAPTION:case c.TABLE:e.openElements.hasInTableScope(c.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(c.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=b.IN_TABLE,n===c.TABLE&&En(e,t));break;case c.BODY:case c.COL:case c.COLGROUP:case c.HTML:case c.TBODY:case c.TD:case c.TFOOT:case c.TH:case c.THEAD:case c.TR:break;default:or(e,t)}}function _i(e,t){switch(t.tagID){case c.HTML:xe(e,t);break;case c.COL:e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break;case c.TEMPLATE:qe(e,t);break;default:Wn(e,t)}}function Uf(e,t){switch(t.tagID){case c.COLGROUP:e.openElements.currentTagId===c.COLGROUP&&(e.openElements.pop(),e.insertionMode=b.IN_TABLE);break;case c.TEMPLATE:It(e,t);break;case c.COL:break;default:Wn(e,t)}}function Wn(e,t){e.openElements.currentTagId===c.COLGROUP&&(e.openElements.pop(),e.insertionMode=b.IN_TABLE,e._processToken(t))}function lr(e,t){switch(t.tagID){case c.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,M.HTML),e.insertionMode=b.IN_ROW;break;case c.TH:case c.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(v.TR,c.TR),e.insertionMode=b.IN_ROW,cr(e,t);break;case c.CAPTION:case c.COL:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=b.IN_TABLE,Ut(e,t));break;default:Ut(e,t)}}function Qr(e,t){const n=t.tagID;switch(t.tagID){case c.TBODY:case c.TFOOT:case c.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=b.IN_TABLE);break;case c.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=b.IN_TABLE,En(e,t));break;case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:case c.TD:case c.TH:case c.TR:break;default:En(e,t)}}function cr(e,t){switch(t.tagID){case c.TH:case c.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,M.HTML),e.insertionMode=b.IN_CELL,e.activeFormattingElements.insertMarker();break;case c.CAPTION:case c.COL:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:case c.TR:e.openElements.hasInTableScope(c.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=b.IN_TABLE_BODY,lr(e,t));break;default:Ut(e,t)}}function Ro(e,t){switch(t.tagID){case c.TR:e.openElements.hasInTableScope(c.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=b.IN_TABLE_BODY);break;case c.TABLE:e.openElements.hasInTableScope(c.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=b.IN_TABLE_BODY,Qr(e,t));break;case c.TBODY:case c.TFOOT:case c.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(c.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=b.IN_TABLE_BODY,Qr(e,t));break;case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:case c.TD:case c.TH:break;default:En(e,t)}}function jf(e,t){const n=t.tagID;Lo.has(n)?(e.openElements.hasInTableScope(c.TD)||e.openElements.hasInTableScope(c.TH))&&(e._closeTableCell(),cr(e,t)):xe(e,t)}function zf(e,t){const n=t.tagID;switch(n){case c.TD:case c.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=b.IN_ROW);break;case c.TABLE:case c.TBODY:case c.TFOOT:case c.THEAD:case c.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Ro(e,t));break;case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:break;default:or(e,t)}}function Oo(e,t){switch(t.tagID){case c.HTML:xe(e,t);break;case c.OPTION:e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e._insertElement(t,M.HTML);break;case c.OPTGROUP:e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e.openElements.currentTagId===c.OPTGROUP&&e.openElements.pop(),e._insertElement(t,M.HTML);break;case c.HR:e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e.openElements.currentTagId===c.OPTGROUP&&e.openElements.pop(),e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break;case c.INPUT:case c.KEYGEN:case c.TEXTAREA:case c.SELECT:e.openElements.hasInSelectScope(c.SELECT)&&(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),t.tagID!==c.SELECT&&e._processStartTag(t));break;case c.SCRIPT:case c.TEMPLATE:qe(e,t)}}function Do(e,t){switch(t.tagID){case c.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===c.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===c.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===c.OPTGROUP&&e.openElements.pop();break;case c.OPTION:e.openElements.currentTagId===c.OPTION&&e.openElements.pop();break;case c.SELECT:e.openElements.hasInSelectScope(c.SELECT)&&(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode());break;case c.TEMPLATE:It(e,t)}}function $f(e,t){const n=t.tagID;n===c.CAPTION||n===c.TABLE||n===c.TBODY||n===c.TFOOT||n===c.THEAD||n===c.TR||n===c.TD||n===c.TH?(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Oo(e,t)}function Yf(e,t){const n=t.tagID;n===c.CAPTION||n===c.TABLE||n===c.TBODY||n===c.TFOOT||n===c.THEAD||n===c.TR||n===c.TD||n===c.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Do(e,t)}function qf(e,t){switch(t.tagID){case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:case c.NOFRAMES:case c.SCRIPT:case c.STYLE:case c.TEMPLATE:case c.TITLE:qe(e,t);break;case c.CAPTION:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:e.tmplInsertionModeStack[0]=b.IN_TABLE,e.insertionMode=b.IN_TABLE,Ut(e,t);break;case c.COL:e.tmplInsertionModeStack[0]=b.IN_COLUMN_GROUP,e.insertionMode=b.IN_COLUMN_GROUP,_i(e,t);break;case c.TR:e.tmplInsertionModeStack[0]=b.IN_TABLE_BODY,e.insertionMode=b.IN_TABLE_BODY,lr(e,t);break;case c.TD:case c.TH:e.tmplInsertionModeStack[0]=b.IN_ROW,e.insertionMode=b.IN_ROW,cr(e,t);break;default:e.tmplInsertionModeStack[0]=b.IN_BODY,e.insertionMode=b.IN_BODY,xe(e,t)}}function Vf(e,t){t.tagID===c.TEMPLATE&&It(e,t)}function Po(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(c.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Ai(e,t)}function Wf(e,t){t.tagID===c.HTML?xe(e,t):Gn(e,t)}function Mo(e,t){var n;if(t.tagID===c.HTML){if(e.fragmentContext||(e.insertionMode=b.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===c.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else Gn(e,t)}function Gn(e,t){e.insertionMode=b.IN_BODY,sr(e,t)}function Gf(e,t){switch(t.tagID){case c.HTML:xe(e,t);break;case c.FRAMESET:e._insertElement(t,M.HTML);break;case c.FRAME:e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break;case c.NOFRAMES:qe(e,t)}}function Qf(e,t){t.tagID===c.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==c.FRAMESET&&(e.insertionMode=b.AFTER_FRAMESET))}function Kf(e,t){switch(t.tagID){case c.HTML:xe(e,t);break;case c.NOFRAMES:qe(e,t)}}function Xf(e,t){t.tagID===c.HTML&&(e.insertionMode=b.AFTER_AFTER_FRAMESET)}function Zf(e,t){t.tagID===c.HTML?xe(e,t):$n(e,t)}function $n(e,t){e.insertionMode=b.IN_BODY,sr(e,t)}function Jf(e,t){switch(t.tagID){case c.HTML:xe(e,t);break;case c.NOFRAMES:qe(e,t)}}function ep(e,t){t.chars="�",e._insertCharacters(t)}function tp(e,t){e._insertCharacters(t),e.framesetOk=!1}function Bo(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==M.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function np(e,t){if(gd(t))Bo(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===M.MATHML?ko(t):r===M.SVG&&(Ed(t),Ao(t)),bi(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function rp(e,t){if(t.tagID===c.P||t.tagID===c.BR){Bo(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===M.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}var qx=new Set([v.AREA,v.BASE,v.BASEFONT,v.BGSOUND,v.BR,v.COL,v.EMBED,v.FRAME,v.HR,v.IMG,v.INPUT,v.KEYGEN,v.LINK,v.META,v.PARAM,v.SOURCE,v.TRACK,v.WBR]),ur=Fo("end"),Ze=Fo("start");function Fo(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Ho(e){const t=Ze(e),n=ur(e);if(t&&n)return{start:t,end:n}}var ip=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,ap=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),xa={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Uo(e,t){const n=mp(e),r=lo("type",{handlers:{root:sp,element:op,text:lp,comment:zo,doctype:cp,raw:hp},unknown:dp}),i={parser:n?new ka(xa):ka.getFragmentParser(void 0,xa),handle(l){r(l,i)},stitches:!1,options:t||{}};r(e,i),qt(i,Ze());const a=n?i.parser.document:i.parser.getFragment(),s=mh(a,{file:i.options.file});return i.stitches&&Xe(s,"comment",function(l,o,u){const d=l;if(d.value.stitch&&u&&o!==void 0){const h=u.children;return h[o]=d.value.stitch,o}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function jo(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function sp(e,t){jo(e.children,t)}function op(e,t){fp(e,t),jo(e.children,t),pp(e,t)}function lp(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:ee.CHARACTER,chars:e.value,location:yn(e)};qt(t,Ze(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function cp(e,t){const n={type:ee.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:yn(e)};qt(t,Ze(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function up(e,t){t.stitches=!0;const n=gp(e);"children"in e&&"children"in n&&(n.children=Uo({type:"root",children:e.children},t.options).children),zo({type:"comment",value:{stitch:n}},t)}function zo(e,t){const n=e.value,r={type:ee.COMMENT,data:n,location:yn(e)};qt(t,Ze(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function hp(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,$o(t,Ze(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(ip,"<$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 n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function dp(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))up(n,t);else{let r="";throw ap.has(n.type)&&(r=". 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 `"+n.type+"` node"+r)}}function qt(e,t){$o(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,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=Te.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 $o(e,t){if(t&&t.offset!==void 0){const n={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=n}}function fp(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Te.PLAINTEXT)return;qt(t,Ze(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:_t.html;i===_t.html&&n==="svg"&&(i=_t.svg);const a=kh({...e,children:[]},{space:i===_t.svg?"svg":"html"}),s={type:ee.START_TAG,tagName:n,tagID:Yt(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:yn(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function pp(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Ih.includes(n)||t.parser.tokenizer.state===Te.PLAINTEXT)return;qt(t,ur(e));const r={type:ee.END_TAG,tagName:n,tagID:Yt(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:yn(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Te.RCDATA||t.parser.tokenizer.state===Te.RAWTEXT||t.parser.tokenizer.state===Te.SCRIPT_DATA)&&(t.parser.tokenizer.state=Te.DATA)}function mp(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function yn(e){const t=Ze(e)||{line:void 0,column:void 0,offset:void 0},n=ur(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function gp(e){return"children"in e?yt({...e,children:[]}):yt(e)}function Kr(e){return function(t,n){return Uo(t,{...e,file:n})}}var Tt=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],kt={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Tt,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Tt],h2:[["className","sr-only"]],img:[...Tt,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Tt,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Tt],table:[...Tt],ul:[...Tt,["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"]},ut={}.hasOwnProperty;function Ep(e,t){let n={type:"root",children:[]};const r=Yo({schema:t?{...kt,...t}:kt,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function Yo(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return Tp(e,n);case"doctype":return bp(e,n);case"element":return kp(e,n);case"root":return Ap(e,n);case"text":return _p(e,n)}}}function Tp(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),i={type:"comment",value:r<0?n:n.slice(0,r)};return Cn(i,t),i}}function bp(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Cn(n,t),n}}function kp(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=qo(e,t.children),i=xp(e,t.properties);e.stack.pop();let a=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&ut.call(e.schema.ancestors,n))){const l=e.schema.ancestors[n];let o=-1;for(a=!1;++o<l.length;)e.stack.includes(l[o])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const s={type:"element",tagName:n,properties:i,children:r};return Cn(s,t),s}function Ap(e,t){const n={type:"root",children:qo(e,t.children)};return Cn(n,t),n}function _p(e,t){const n={type:"text",value:typeof t.value=="string"?t.value:""};return Cn(n,t),n}function qo(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const a=Yo(e,r[i]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function xp(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&ut.call(r,n)?r[n]:void 0,s=r&&ut.call(r,"*")?r["*"]:void 0,l=t&&typeof t=="object"?t:{},o={};let u;for(u in l)if(ut.call(l,u)){const d=l[u];let h=ya(e,Ca(a,u),u,d);h==null&&(h=ya(e,Ca(s,u),u,d)),h!=null&&(o[u]=h)}if(i&&ut.call(i,n)){const d=i[n];for(u in d)ut.call(d,u)&&!ut.call(o,u)&&(o[u]=d[u])}return o}function ya(e,t,n,r){return t?Array.isArray(r)?yp(e,t,n,r):Vo(e,t,n,r):void 0}function yp(e,t,n,r){let i=-1;const a=[];for(;++i<r.length;){const s=Vo(e,t,n,r[i]);(typeof s=="number"||typeof s=="string")&&a.push(s)}return a}function Vo(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&Cp(e,n,r)){if(typeof t=="object"&&t.length>1){let i=!1,a=0;for(;++a<t.length;){const s=t[a];if(s&&typeof s=="object"&&"flags"in s){if(s.test(String(r))){i=!0;break}}else if(s===r){i=!0;break}}if(!i)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function Cp(e,t,n){const r=e.schema.protocols&&ut.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const i=String(n),a=i.indexOf(":"),s=i.indexOf("?"),l=i.indexOf("#"),o=i.indexOf("/");if(a<0||o>-1&&a>o||s>-1&&a>s||l>-1&&a>l)return!0;let u=-1;for(;++u<r.length;){const d=r[u];if(a===d.length&&i.slice(0,d.length)===d)return!0}return!1}function Cn(e,t){const n=Ho(t);t.data&&(e.data=yt(t.data)),n&&(e.position=n)}function Ca(e,t){let n,r=-1;if(e)for(;++r<e.length;){const i=e[r],a=typeof i=="string"?i:i[0];if(a===t)return i;a==="data*"&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function Wo(e){return function(t){return Ep(t,e)}}function Sa(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}var Se=mt(/[A-Za-z]/),_e=mt(/[\dA-Za-z]/),Sp=mt(/[#-'*+\--9=?A-Z^-~]/);function Qn(e){return e!==null&&(e<32||e===127)}var Xr=mt(/\d/),Np=mt(/[\dA-Fa-f]/),Ip=mt(/[!-/:-@[-`{-~]/);function G(e){return e!==null&&e<-2}function le(e){return e!==null&&(e<0||e===32)}function ne(e){return e===-2||e===-1||e===32}var hr=mt(/\p{P}|\p{S}/u),Ct=mt(/\s/);function mt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function vp(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function wp(e,t,n){const r=rr((n||{}).ignore||[]),i=Lp(t);let a=-1;for(;++a<i.length;)mi(e,"text",s);function s(o,u){let d=-1,h;for(;++d<u.length;){const f=u[d],p=h?h.children:void 0;if(r(f,p?p.indexOf(f):void 0,h))return;h=f}if(h)return l(o,u)}function l(o,u){const d=u[u.length-1],h=i[a][0],f=i[a][1];let p=0;const E=d.children.indexOf(o);let N=!1,y=[];h.lastIndex=0;let _=h.exec(o.value);for(;_;){const C=_.index,w={index:_.index,input:_.input,stack:[...u,o]};let R=f(..._,w);if(typeof R=="string"&&(R=R.length>0?{type:"text",value:R}:void 0),R===!1?h.lastIndex=C+1:(p!==C&&y.push({type:"text",value:o.value.slice(p,C)}),Array.isArray(R)?y.push(...R):R&&y.push(R),p=C+_[0].length,N=!0),!h.global)break;_=h.exec(o.value)}return N?(p<o.value.length&&y.push({type:"text",value:o.value.slice(p)}),d.children.splice(E,1,...y)):y=[o],E+y.length}}function Lp(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([Rp(i[0]),Op(i[1])])}return t}function Rp(e){return typeof e=="string"?new RegExp(vp(e),"g"):e}function Op(e){return typeof e=="function"?e:function(){return e}}var xr="phrasing",yr=["autolink","link","image","label"];function Dp(){return{transforms:[jp],enter:{literalAutolink:Mp,literalAutolinkEmail:Cr,literalAutolinkHttp:Cr,literalAutolinkWww:Cr},exit:{literalAutolink:Up,literalAutolinkEmail:Hp,literalAutolinkHttp:Bp,literalAutolinkWww:Fp}}}function Pp(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:xr,notInConstruct:yr},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:xr,notInConstruct:yr},{character:":",before:"[ps]",after:"\\/",inConstruct:xr,notInConstruct:yr}]}}function Mp(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Cr(e){this.config.enter.autolinkProtocol.call(this,e)}function Bp(e){this.config.exit.autolinkProtocol.call(this,e)}function Fp(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 Hp(e){this.config.exit.autolinkEmail.call(this,e)}function Up(e){this.exit(e)}function jp(e){wp(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,zp],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,$p]],{ignore:["link","linkReference"]})}function zp(e,t,n,r,i){let a="";if(!Go(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!Yp(n)))return!1;const s=qp(n+r);if(!s[0])return!1;const l={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[l,{type:"text",value:s[1]}]:l}function $p(e,t,n,r){return!Go(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Yp(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 qp(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Sa(e,"(");let a=Sa(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function Go(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ct(n)||hr(n))&&(!t||n!==47)}function Ye(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}Qo.peek=em;function Vp(){this.buffer()}function Wp(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Gp(){this.buffer()}function Qp(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Kp(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ye(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Xp(e){this.exit(e)}function Zp(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ye(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Jp(e){this.exit(e)}function em(){return"["}function Qo(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),l=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),l(),s(),a+=i.move("]"),a}function tm(){return{enter:{gfmFootnoteCallString:Vp,gfmFootnoteCall:Wp,gfmFootnoteDefinitionLabelString:Gp,gfmFootnoteDefinition:Qp},exit:{gfmFootnoteCallString:Kp,gfmFootnoteCall:Xp,gfmFootnoteDefinitionLabelString:Zp,gfmFootnoteDefinition:Jp}}}function nm(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Qo},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,s){const l=a.createTracker(s);let o=l.move("[^");const u=a.enter("footnoteDefinition"),d=a.enter("label");return o+=l.move(a.safe(a.associationId(r),{before:o,after:"]"})),d(),o+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),o+=l.move((t?`
|
|
4
|
-
`:" ")+a.indentLines(a.containerFlow(r,l.current()),t?Ko:rm))),u(),o}}function rm(e,t,n){return t===0?e:Ko(e,t,n)}function Ko(e,t,n){return(n?"":" ")+e}var im=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Xo.peek=cm;function am(){return{canContainEols:["delete"],enter:{strikethrough:om},exit:{strikethrough:lm}}}function sm(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:im}],handlers:{delete:Xo}}}function om(e){this.enter({type:"delete",children:[]},e)}function lm(e){this.exit(e)}function Xo(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),a(),s}function cm(){return"~"}function um(e){return e.length}function hm(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||um,a=[],s=[],l=[],o=[];let u=0,d=-1;for(;++d<e.length;){const N=[],y=[];let _=-1;for(e[d].length>u&&(u=e[d].length);++_<e[d].length;){const C=dm(e[d][_]);if(n.alignDelimiters!==!1){const w=i(C);y[_]=w,(o[_]===void 0||w>o[_])&&(o[_]=w)}N.push(C)}s[d]=N,l[d]=y}let h=-1;if(typeof r=="object"&&"length"in r)for(;++h<u;)a[h]=Na(r[h]);else{const N=Na(r);for(;++h<u;)a[h]=N}h=-1;const f=[],p=[];for(;++h<u;){const N=a[h];let y="",_="";N===99?(y=":",_=":"):N===108?y=":":N===114&&(_=":");let C=n.alignDelimiters===!1?1:Math.max(1,o[h]-y.length-_.length);const w=y+"-".repeat(C)+_;n.alignDelimiters!==!1&&(C=y.length+C+_.length,C>o[h]&&(o[h]=C),p[h]=C),f[h]=w}s.splice(1,0,f),l.splice(1,0,p),d=-1;const E=[];for(;++d<s.length;){const N=s[d],y=l[d];h=-1;const _=[];for(;++h<u;){const C=N[h]||"";let w="",R="";if(n.alignDelimiters!==!1){const O=o[h]-(y[h]||0),S=a[h];S===114?w=" ".repeat(O):S===99?O%2?(w=" ".repeat(O/2+.5),R=" ".repeat(O/2-.5)):(w=" ".repeat(O/2),R=w):R=" ".repeat(O)}n.delimiterStart!==!1&&!h&&_.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&C==="")&&(n.delimiterStart!==!1||h)&&_.push(" "),n.alignDelimiters!==!1&&_.push(w),_.push(C),n.alignDelimiters!==!1&&_.push(R),n.padding!==!1&&_.push(" "),(n.delimiterEnd!==!1||h!==u-1)&&_.push("|")}E.push(n.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return E.join(`
|
|
5
|
-
`)}function dm(e){return e==null?"":String(e)}function Na(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 fm(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const s=n.indentLines(n.containerFlow(e,a.current()),pm);return i(),s}function pm(e,t,n){return">"+(n?"":" ")+e}function mm(e,t){return Ia(e,t.inConstruct,!0)&&!Ia(e,t.notInConstruct,!1)}function Ia(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function va(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
6
|
-
`&&mm(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
7
|
-
`}function gm(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>s&&(s=a):a=1,i=r+t.length,r=n.indexOf(t,i);return s}function Em(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 Tm(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 bm(e,t,n,r){const i=Tm(n),a=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(Em(e,n)){const h=n.enter("codeIndented"),f=n.indentLines(a,km);return h(),f}const l=n.createTracker(r),o=i.repeat(Math.max(gm(a,i)+1,3)),u=n.enter("codeFenced");let d=l.move(o);if(e.lang){const h=n.enter(`codeFencedLang${s}`);d+=l.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...l.current()})),h()}if(e.lang&&e.meta){const h=n.enter(`codeFencedMeta${s}`);d+=l.move(" "),d+=l.move(n.safe(e.meta,{before:d,after:`
|
|
8
|
-
`,encode:["`"],...l.current()})),h()}return d+=l.move(`
|
|
9
|
-
`),a&&(d+=l.move(a+`
|
|
10
|
-
`)),d+=l.move(o),u(),d}function km(e,t,n){return(n?"":" ")+e}function xi(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 Am(e,t,n,r){const i=xi(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let l=n.enter("label");const o=n.createTracker(r);let u=o.move("[");return u+=o.move(n.safe(n.associationId(e),{before:u,after:"]",...o.current()})),u+=o.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(n.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(l=n.enter("destinationRaw"),u+=o.move(n.safe(e.url,{before:u,after:e.title?" ":`
|
|
11
|
-
`,...o.current()}))),l(),e.title&&(l=n.enter(`title${a}`),u+=o.move(" "+i),u+=o.move(n.safe(e.title,{before:u,after:i,...o.current()})),u+=o.move(i),l()),s(),u}function _m(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 Tn(e){return"&#x"+e.toString(16).toUpperCase()+";"}function jt(e){if(e===null||le(e)||Ct(e))return 1;if(hr(e))return 2}function Kn(e,t,n){const r=jt(e),i=jt(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Zo.peek=xm;function Zo(e,t,n,r){const i=_m(n),a=n.enter("emphasis"),s=n.createTracker(r),l=s.move(i);let o=s.move(n.containerPhrasing(e,{after:i,before:l,...s.current()}));const u=o.charCodeAt(0),d=Kn(r.before.charCodeAt(r.before.length-1),u,i);d.inside&&(o=Tn(u)+o.slice(1));const h=o.charCodeAt(o.length-1),f=Kn(r.after.charCodeAt(0),h,i);f.inside&&(o=o.slice(0,-1)+Tn(h));const p=s.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:d.outside},l+o+p}function xm(e,t,n){return n.options.emphasis||"*"}var ym={};function yi(e,t){const n=t||ym;return Jo(e,typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,typeof n.includeHtml=="boolean"?n.includeHtml:!0)}function Jo(e,t,n){if(Cm(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return wa(e.children,t,n)}return Array.isArray(e)?wa(e,t,n):""}function wa(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Jo(e[i],t,n);return r.join("")}function Cm(e){return!!(e&&typeof e=="object")}function Sm(e,t){let n=!1;return Xe(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,!1}),!!((!e.depth||e.depth<3)&&yi(e)&&(t.options.setext||n))}function Nm(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Sm(e,n)){const d=n.enter("headingSetext"),h=n.enter("phrasing"),f=n.containerPhrasing(e,{...a.current(),before:`
|
|
12
|
-
`,after:`
|
|
13
|
-
`});return h(),d(),f+`
|
|
14
|
-
`+(i===1?"=":"-").repeat(f.length-(Math.max(f.lastIndexOf("\r"),f.lastIndexOf(`
|
|
15
|
-
`))+1))}const s="#".repeat(i),l=n.enter("headingAtx"),o=n.enter("phrasing");a.move(s+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
|
|
16
|
-
`,...a.current()});return/^[\t ]/.test(u)&&(u=Tn(u.charCodeAt(0))+u.slice(1)),u=u?s+" "+u:s,n.options.closeAtx&&(u+=" "+s),o(),l(),u}el.peek=Im;function el(e){return e.value||""}function Im(){return"<"}tl.peek=vm;function tl(e,t,n,r){const i=xi(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let l=n.enter("label");const o=n.createTracker(r);let u=o.move("![");return u+=o.move(n.safe(e.alt,{before:u,after:"]",...o.current()})),u+=o.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(n.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(l=n.enter("destinationRaw"),u+=o.move(n.safe(e.url,{before:u,after:e.title?" ":")",...o.current()}))),l(),e.title&&(l=n.enter(`title${a}`),u+=o.move(" "+i),u+=o.move(n.safe(e.title,{before:u,after:i,...o.current()})),u+=o.move(i),l()),u+=o.move(")"),s(),u}function vm(){return"!"}nl.peek=wm;function nl(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let s=n.enter("label");const l=n.createTracker(r);let o=l.move("![");const u=n.safe(e.alt,{before:o,after:"]",...l.current()});o+=l.move(u+"]["),s();const d=n.stack;n.stack=[],s=n.enter("reference");const h=n.safe(n.associationId(e),{before:o,after:"]",...l.current()});return s(),n.stack=d,a(),i==="full"||!u||u!==h?o+=l.move(h+"]"):i==="shortcut"?o=o.slice(0,-1):o+=l.move("]"),o}function wm(){return"!"}rl.peek=Lm;function rl(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const s=n.unsafe[a],l=n.compilePattern(s);let o;if(s.atBreak)for(;o=l.exec(r);){let u=o.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(o.index+1)}}return i+r+i}function Lm(){return"`"}function il(e,t){const n=yi(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}al.peek=Rm;function al(e,t,n,r){const i=xi(n),a=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let l,o;if(il(e,n)){const d=n.stack;n.stack=[],l=n.enter("autolink");let h=s.move("<");return h+=s.move(n.containerPhrasing(e,{before:h,after:">",...s.current()})),h+=s.move(">"),l(),n.stack=d,h}l=n.enter("link"),o=n.enter("label");let u=s.move("[");return u+=s.move(n.containerPhrasing(e,{before:u,after:"](",...s.current()})),u+=s.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(o=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),o(),e.title&&(o=n.enter(`title${a}`),u+=s.move(" "+i),u+=s.move(n.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),o()),u+=s.move(")"),l(),u}function Rm(e,t,n){return il(e,n)?"<":"["}sl.peek=Om;function sl(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let s=n.enter("label");const l=n.createTracker(r);let o=l.move("[");const u=n.containerPhrasing(e,{before:o,after:"]",...l.current()});o+=l.move(u+"]["),s();const d=n.stack;n.stack=[],s=n.enter("reference");const h=n.safe(n.associationId(e),{before:o,after:"]",...l.current()});return s(),n.stack=d,a(),i==="full"||!u||u!==h?o+=l.move(h+"]"):i==="shortcut"?o=o.slice(0,-1):o+=l.move("]"),o}function Om(){return"["}function Ci(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 Dm(e){const t=Ci(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Pm(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 ol(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 Mm(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let s=e.ordered?Pm(n):Ci(n);const l=e.ordered?s==="."?")":".":Dm(n);let o=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&d&&(!d.children||!d.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(o=!0),ol(n)===s&&d){let h=-1;for(;++h<e.children.length;){const f=e.children[h];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){o=!0;break}}}}o&&(s=l),n.bulletCurrent=s;const u=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=a,i(),u}function Bm(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 Fm(e,t,n,r){const i=Bm(n);let a=n.bulletCurrent||Ci(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let s=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const l=n.createTracker(r);l.move(a+" ".repeat(s-a.length)),l.shift(s);const o=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,l.current()),d);return o(),u;function d(h,f,p){return f?(p?"":" ".repeat(s))+h:(p?a:a+" ".repeat(s-a.length))+h}}function Hm(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),s=n.containerPhrasing(e,r);return a(),i(),s}var Um=rr(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function jm(e,t,n,r){return(e.children.some(function(i){return Um(i)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function zm(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}ll.peek=$m;function ll(e,t,n,r){const i=zm(n),a=n.enter("strong"),s=n.createTracker(r),l=s.move(i+i);let o=s.move(n.containerPhrasing(e,{after:i,before:l,...s.current()}));const u=o.charCodeAt(0),d=Kn(r.before.charCodeAt(r.before.length-1),u,i);d.inside&&(o=Tn(u)+o.slice(1));const h=o.charCodeAt(o.length-1),f=Kn(r.after.charCodeAt(0),h,i);f.inside&&(o=o.slice(0,-1)+Tn(h));const p=s.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:d.outside},l+o+p}function $m(e,t,n){return n.options.strong||"*"}function Ym(e,t,n,r){return n.safe(e.value,r)}function qm(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 Vm(e,t,n){const r=(ol(n)+(n.options.ruleSpaces?" ":"")).repeat(qm(n));return n.options.ruleSpaces?r.slice(0,-1):r}var cl={blockquote:fm,break:va,code:bm,definition:Am,emphasis:Zo,hardBreak:va,heading:Nm,html:el,image:tl,imageReference:nl,inlineCode:rl,link:al,linkReference:sl,list:Mm,listItem:Fm,paragraph:Hm,root:jm,strong:ll,text:Ym,thematicBreak:Vm},La=document.createElement("i");function Si(e){const t="&"+e+";";La.innerHTML=t;const n=La.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ul(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}var Wm=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Gm(e){return e.replace(Wm,Qm)}function Qm(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const r=n.charCodeAt(1),i=r===120||r===88;return ul(n.slice(i?2:1),i?16:10)}return Si(n)||e}function Km(){return{enter:{table:Xm,tableData:Ra,tableHeader:Ra,tableRow:Jm},exit:{codeText:eg,table:Zm,tableData:Sr,tableHeader:Sr,tableRow:Sr}}}function Xm(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function Zm(e){this.exit(e),this.data.inTable=void 0}function Jm(e){this.enter({type:"tableRow",children:[]},e)}function Sr(e){this.exit(e)}function Ra(e){this.enter({type:"tableCell",children:[]},e)}function eg(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,tg));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function tg(e,t){return t==="|"?t:e}function ng(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";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:f,table:s,tableCell:o,tableRow:l}};function s(p,E,N,y){return u(d(p,N,y),p.align)}function l(p,E,N,y){const _=u([h(p,N,y)]);return _.slice(0,_.indexOf(`
|
|
18
|
-
`))}function o(p,E,N,y){const _=N.enter("tableCell"),C=N.enter("phrasing"),w=N.containerPhrasing(p,{...y,before:a,after:a});return C(),_(),w}function u(p,E){return hm(p,{align:E,alignDelimiters:r,padding:n,stringLength:i})}function d(p,E,N){const y=p.children;let _=-1;const C=[],w=E.enter("table");for(;++_<y.length;)C[_]=h(y[_],E,N);return w(),C}function h(p,E,N){const y=p.children;let _=-1;const C=[],w=E.enter("tableRow");for(;++_<y.length;)C[_]=o(y[_],p,E,N);return w(),C}function f(p,E,N){let y=cl.inlineCode(p,E,N);return N.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function rg(){return{exit:{taskListCheckValueChecked:Oa,taskListCheckValueUnchecked:Oa,paragraph:ag}}}function ig(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:sg}}}function Oa(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function ag(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,s;for(;++a<i.length;){const l=i[a];if(l.type==="paragraph"){s=l;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function sg(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);a&&l.move(s);let o=cl.listItem(e,t,n,{...r,...l.current()});return a&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),o;function u(d){return d+s}}function og(){return[Dp(),tm(),am(),Km(),rg()]}function lg(e){return{extensions:[Pp(),nm(e),sm(),ng(e),ig()]}}function Be(e,t,n,r){const i=e.length;let a=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);a<r.length;)s=r.slice(a,a+1e4),s.unshift(t,0),e.splice(...s),a+=1e4,t+=1e4}function je(e,t){return e.length>0?(Be(e,e.length,0,t),e):t}var Da={}.hasOwnProperty;function hl(e){const t={};let n=-1;for(;++n<e.length;)cg(t,e[n]);return t}function cg(e,t){let n;for(n in t){const r=(Da.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let a;if(i)for(a in i){Da.call(r,a)||(r[a]=[]);const s=i[a];ug(r[a],Array.isArray(s)?s:s?[s]:[])}}}function ug(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Be(e,0,0,r)}var hg={tokenize:Eg,partial:!0},dl={tokenize:Tg,partial:!0},fl={tokenize:bg,partial:!0},pl={tokenize:kg,partial:!0},dg={tokenize:Ag,partial:!0},ml={name:"wwwAutolink",tokenize:mg,previous:El},gl={name:"protocolAutolink",tokenize:gg,previous:Tl},it={name:"emailAutolink",tokenize:pg,previous:bl},Je={};function fg(){return{text:Je}}var bt=48;for(;bt<123;)Je[bt]=it,bt++,bt===58?bt=65:bt===91&&(bt=97);Je[43]=it;Je[45]=it;Je[46]=it;Je[95]=it;Je[72]=[it,gl];Je[104]=[it,gl];Je[87]=[it,ml];Je[119]=[it,ml];function pg(e,t,n){const r=this;let i,a;return s;function s(h){return!Zr(h)||!bl.call(r,r.previous)||Ni(r.events)?n(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(h))}function l(h){return Zr(h)?(e.consume(h),l):h===64?(e.consume(h),o):n(h)}function o(h){return h===46?e.check(dg,d,u)(h):h===45||h===95||_e(h)?(a=!0,e.consume(h),o):d(h)}function u(h){return e.consume(h),i=!0,o}function d(h){return a&&i&&Se(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(h)):n(h)}}function mg(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!El.call(r,r.previous)||Ni(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(hg,e.attempt(dl,e.attempt(fl,a),n),n)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function gg(e,t,n){const r=this;let i="",a=!1;return s;function s(h){return(h===72||h===104)&&Tl.call(r,r.previous)&&!Ni(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(h),e.consume(h),l):n(h)}function l(h){if(Se(h)&&i.length<5)return i+=String.fromCodePoint(h),e.consume(h),l;if(h===58){const f=i.toLowerCase();if(f==="http"||f==="https")return e.consume(h),o}return n(h)}function o(h){return h===47?(e.consume(h),a?u:(a=!0,o)):n(h)}function u(h){return h===null||Qn(h)||le(h)||Ct(h)||hr(h)?n(h):e.attempt(dl,e.attempt(fl,d),n)(h)}function d(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(h)}}function Eg(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),a):n(s)}function a(s){return s===null?n(s):t(s)}}function Tg(e,t,n){let r,i,a;return s;function s(u){return u===46||u===95?e.check(pl,o,l)(u):u===null||le(u)||Ct(u)||u!==45&&hr(u)?o(u):(a=!0,e.consume(u),s)}function l(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),s}function o(u){return i||r||!a?n(u):t(u)}}function bg(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?a(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(pl,t,a)(s):s===null||le(s)||Ct(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&r++,e.consume(s),i}}function kg(e,t,n){return r;function r(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),r):l===38?(e.consume(l),a):l===93?(e.consume(l),i):l===60||l===null||le(l)||Ct(l)?t(l):n(l)}function i(l){return l===null||l===40||l===91||le(l)||Ct(l)?t(l):r(l)}function a(l){return Se(l)?s(l):n(l)}function s(l){return l===59?(e.consume(l),r):Se(l)?(e.consume(l),s):n(l)}}function Ag(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return _e(a)?n(a):t(a)}}function El(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||le(e)}function Tl(e){return!Se(e)}function bl(e){return!(e===47||Zr(e))}function Zr(e){return e===43||e===45||e===46||e===95||_e(e)}function Ni(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function Vt(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let s="";if(a===37&&_e(e.charCodeAt(n+1))&&_e(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(s=String.fromCharCode(a));else if(a>55295&&a<57344){const l=e.charCodeAt(n+1);a<56320&&l>56319&&l<57344?(s=String.fromCharCode(a,l),i=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function dr(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var Jr={name:"attention",resolveAll:_g,tokenize:xg};function _g(e,t){let n=-1,r,i,a,s,l,o,u,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;o=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const h={...e[r][1].end},f={...e[n][1].start};Pa(h,-o),Pa(f,o),s={type:o>1?"strongSequence":"emphasisSequence",start:h,end:{...e[r][1].end}},l={type:o>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},a={type:o>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:o>1?"strong":"emphasis",start:{...s.start},end:{...l.end}},e[r][1].end={...s.start},e[n][1].start={...l.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=je(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=je(u,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),u=je(u,dr(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=je(u,[["exit",a,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,u=je(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,Be(e,r-1,n-r+3,u),n=r+u.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function xg(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=jt(r);let a;return s;function s(o){return a=o,e.enter("attentionSequence"),l(o)}function l(o){if(o===a)return e.consume(o),l;const u=e.exit("attentionSequence"),d=jt(o),h=!d||d===2&&i||n.includes(o),f=!i||i===2&&d||n.includes(r);return u._open=!!(a===42?h:h&&(i||!f)),u._close=!!(a===42?f:f&&(d||!h)),t(o)}}function Pa(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var yg={name:"autolink",tokenize:Cg};function Cg(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(p){return Se(p)?(e.consume(p),s):p===64?n(p):u(p)}function s(p){return p===43||p===45||p===46||_e(p)?(r=1,l(p)):u(p)}function l(p){return p===58?(e.consume(p),r=0,o):(p===43||p===45||p===46||_e(p))&&r++<32?(e.consume(p),l):(r=0,u(p))}function o(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Qn(p)?n(p):(e.consume(p),o)}function u(p){return p===64?(e.consume(p),d):Sp(p)?(e.consume(p),u):n(p)}function d(p){return _e(p)?h(p):n(p)}function h(p){return p===46?(e.consume(p),r=0,d):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):f(p)}function f(p){if((p===45||_e(p))&&r++<63){const E=p===45?f:h;return e.consume(p),E}return n(p)}}function ie(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(o){return ne(o)?(e.enter(n),l(o)):t(o)}function l(o){return ne(o)&&a++<i?(e.consume(o),l):(e.exit(n),t(o))}}var Sn={partial:!0,tokenize:Sg};function Sg(e,t,n){return r;function r(a){return ne(a)?ie(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||G(a)?t(a):n(a)}}var kl={continuation:{tokenize:Ig},exit:vg,name:"blockQuote",tokenize:Ng};function Ng(e,t,n){const r=this;return i;function i(s){if(s===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return n(s)}function a(s){return ne(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function Ig(e,t,n){const r=this;return i;function i(s){return ne(s)?ie(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(kl,t,n)(s)}}function vg(e){e.exit("blockQuote")}var Al={name:"characterEscape",tokenize:wg};function wg(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return Ip(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}var _l={name:"characterReference",tokenize:Lg};function Lg(e,t,n){const r=this;let i=0,a,s;return l;function l(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),o}function o(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),a=31,s=_e,d(h))}function u(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=Np,d):(e.enter("characterReferenceValue"),a=7,s=Xr,d(h))}function d(h){if(h===59&&i){const f=e.exit("characterReferenceValue");return s===_e&&!Si(r.sliceSerialize(f))?n(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(h)&&i++<a?(e.consume(h),d):n(h)}}var Ma={partial:!0,tokenize:Og},Ba={concrete:!0,name:"codeFenced",tokenize:Rg};function Rg(e,t,n){const r=this,i={partial:!0,tokenize:O};let a=0,s=0,l;return o;function o(S){return u(S)}function u(S){const $=r.events[r.events.length-1];return a=$&&$[1].type==="linePrefix"?$[2].sliceSerialize($[1],!0).length:0,l=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(S)}function d(S){return S===l?(s++,e.consume(S),d):s<3?n(S):(e.exit("codeFencedFenceSequence"),ne(S)?ie(e,h,"whitespace")(S):h(S))}function h(S){return S===null||G(S)?(e.exit("codeFencedFence"),r.interrupt?t(S):e.check(Ma,N,R)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(S))}function f(S){return S===null||G(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(S)):ne(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ie(e,p,"whitespace")(S)):S===96&&S===l?n(S):(e.consume(S),f)}function p(S){return S===null||G(S)?h(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),E(S))}function E(S){return S===null||G(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(S)):S===96&&S===l?n(S):(e.consume(S),E)}function N(S){return e.attempt(i,R,y)(S)}function y(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),_}function _(S){return a>0&&ne(S)?ie(e,C,"linePrefix",a+1)(S):C(S)}function C(S){return S===null||G(S)?e.check(Ma,N,R)(S):(e.enter("codeFlowValue"),w(S))}function w(S){return S===null||G(S)?(e.exit("codeFlowValue"),C(S)):(e.consume(S),w)}function R(S){return e.exit("codeFenced"),t(S)}function O(S,$,Y){let W=0;return I;function I(Q){return S.enter("lineEnding"),S.consume(Q),S.exit("lineEnding"),U}function U(Q){return S.enter("codeFencedFence"),ne(Q)?ie(S,z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):z(Q)}function z(Q){return Q===l?(S.enter("codeFencedFenceSequence"),q(Q)):Y(Q)}function q(Q){return Q===l?(W++,S.consume(Q),q):W>=s?(S.exit("codeFencedFenceSequence"),ne(Q)?ie(S,J,"whitespace")(Q):J(Q)):Y(Q)}function J(Q){return Q===null||G(Q)?(S.exit("codeFencedFence"),$(Q)):Y(Q)}}}function Og(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}var Nr={name:"codeIndented",tokenize:Pg},Dg={partial:!0,tokenize:Mg};function Pg(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),ie(e,a,"linePrefix",5)(u)}function a(u){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?s(u):n(u)}function s(u){return u===null?o(u):G(u)?e.attempt(Dg,s,o)(u):(e.enter("codeFlowValue"),l(u))}function l(u){return u===null||G(u)?(e.exit("codeFlowValue"),s(u)):(e.consume(u),l)}function o(u){return e.exit("codeIndented"),t(u)}}function Mg(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):G(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):ie(e,a,"linePrefix",5)(s)}function a(s){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):G(s)?i(s):n(s)}}var Bg={name:"codeText",previous:Hg,resolve:Fg,tokenize:Ug};function Fg(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Hg(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Ug(e,t,n){let r=0,i,a;return s;function s(h){return e.enter("codeText"),e.enter("codeTextSequence"),l(h)}function l(h){return h===96?(e.consume(h),r++,l):(e.exit("codeTextSequence"),o(h))}function o(h){return h===null?n(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),o):h===96?(a=e.enter("codeTextSequence"),i=0,d(h)):G(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),o):(e.enter("codeTextData"),u(h))}function u(h){return h===null||h===32||h===96||G(h)?(e.exit("codeTextData"),o(h)):(e.consume(h),u)}function d(h){return h===96?(e.consume(h),i++,d):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(a.type="codeTextData",u(h))}}var jg=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=t??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const i=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&en(this.left,n),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),en(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),en(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);en(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);en(this.left,t.reverse())}}};function en(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function xl(e){const t={};let n=-1,r,i,a,s,l,o,u;const d=new jg(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(o=r[1]._tokenizer.events,a=0,a<o.length&&o[a][1].type==="lineEndingBlank"&&(a+=2),a<o.length&&o[a][1].type==="content"))for(;++a<o.length&&o[a][1].type!=="content";)o[a][1].type==="chunkText"&&(o[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,zg(d,n)),n=t[n],u=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(s=d.get(a),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(d.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=a);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...d.get(i)[1].start},l=d.slice(i,n),l.unshift(r),d.splice(i,n-i+1,l))}}return Be(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!u}function zg(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const l=s.events,o=[],u={};let d,h,f=-1,p=n,E=0,N=0;const y=[N];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(d=r.sliceStream(p),p.next||d.push(null),h&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(d),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),h=p,p=p.next}for(p=n;++f<l.length;)l[f][0]==="exit"&&l[f-1][0]==="enter"&&l[f][1].type===l[f-1][1].type&&l[f][1].start.line!==l[f][1].end.line&&(N=f+1,y.push(N),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):y.pop(),f=y.length;f--;){const _=l.slice(y[f],y[f+1]),C=a.pop();o.push([C,C+_.length-1]),e.splice(C,2,_)}for(o.reverse(),f=-1;++f<o.length;)u[E+o[f][0]]=E+o[f][1],E+=o[f][1]-o[f][0]-1;return u}var $g={resolve:qg,tokenize:Vg},Yg={partial:!0,tokenize:Wg};function qg(e){return xl(e),e}function Vg(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?a(l):G(l)?e.check(Yg,s,a)(l):(e.consume(l),i)}function a(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function s(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Wg(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),ie(e,a,"linePrefix")}function a(s){if(s===null||G(s))return n(s);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function yl(e,t,n,r,i,a,s,l,o){const u=o||Number.POSITIVE_INFINITY;let d=0;return h;function h(_){return _===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(_),e.exit(a),f):_===null||_===32||_===41||Qn(_)?n(_):(e.enter(r),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),N(_))}function f(_){return _===62?(e.enter(a),e.consume(_),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),p(_))}function p(_){return _===62?(e.exit("chunkString"),e.exit(l),f(_)):_===null||_===60||G(_)?n(_):(e.consume(_),_===92?E:p)}function E(_){return _===60||_===62||_===92?(e.consume(_),p):p(_)}function N(_){return!d&&(_===null||_===41||le(_))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(r),t(_)):d<u&&_===40?(e.consume(_),d++,N):_===41?(e.consume(_),d--,N):_===null||_===32||_===40||Qn(_)?n(_):(e.consume(_),_===92?y:N)}function y(_){return _===40||_===41||_===92?(e.consume(_),N):N(_)}}function Cl(e,t,n,r,i,a){const s=this;let l=0,o;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(a),d}function d(p){return l>999||p===null||p===91||p===93&&!o||p===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(p):p===93?(e.exit(a),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):G(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===null||p===91||p===93||G(p)||l++>999?(e.exit("chunkString"),d(p)):(e.consume(p),o||(o=!ne(p)),p===92?f:h)}function f(p){return p===91||p===92||p===93?(e.consume(p),l++,h):h(p)}}function Sl(e,t,n,r,i,a){let s;return l;function l(f){return f===34||f===39||f===40?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),s=f===40?41:f,o):n(f)}function o(f){return f===s?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):(e.enter(a),u(f))}function u(f){return f===s?(e.exit(a),o(s)):f===null?n(f):G(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),ie(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===s||f===null||G(f)?(e.exit("chunkString"),u(f)):(e.consume(f),f===92?h:d)}function h(f){return f===s||f===92?(e.consume(f),d):d(f)}}function fn(e,t){let n;return r;function r(i){return G(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ne(i)?ie(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}var Gg={name:"definition",tokenize:Kg},Qg={partial:!0,tokenize:Xg};function Kg(e,t,n){const r=this;let i;return a;function a(p){return e.enter("definition"),s(p)}function s(p){return Cl.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function l(p){return i=Ye(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),o):n(p)}function o(p){return le(p)?fn(e,u)(p):u(p)}function u(p){return yl(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function d(p){return e.attempt(Qg,h,h)(p)}function h(p){return ne(p)?ie(e,f,"whitespace")(p):f(p)}function f(p){return p===null||G(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function Xg(e,t,n){return r;function r(l){return le(l)?fn(e,i)(l):n(l)}function i(l){return Sl(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return ne(l)?ie(e,s,"whitespace")(l):s(l)}function s(l){return l===null||G(l)?t(l):n(l)}}var Zg={name:"hardBreakEscape",tokenize:Jg};function Jg(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return G(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}var eE={name:"headingAtx",resolve:tE,tokenize:nE};function tE(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Be(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function nE(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),a(d)}function a(d){return e.enter("atxHeadingSequence"),s(d)}function s(d){return d===35&&r++<6?(e.consume(d),s):d===null||le(d)?(e.exit("atxHeadingSequence"),l(d)):n(d)}function l(d){return d===35?(e.enter("atxHeadingSequence"),o(d)):d===null||G(d)?(e.exit("atxHeading"),t(d)):ne(d)?ie(e,l,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function o(d){return d===35?(e.consume(d),o):(e.exit("atxHeadingSequence"),l(d))}function u(d){return d===null||d===35||le(d)?(e.exit("atxHeadingText"),l(d)):(e.consume(d),u)}}var rE=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Fa=["pre","script","style","textarea"],iE={concrete:!0,name:"htmlFlow",resolveTo:oE,tokenize:lE},aE={partial:!0,tokenize:uE},sE={partial:!0,tokenize:cE};function oE(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function lE(e,t,n){const r=this;let i,a,s,l,o;return u;function u(x){return d(x)}function d(x){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(x),h}function h(x){return x===33?(e.consume(x),f):x===47?(e.consume(x),a=!0,N):x===63?(e.consume(x),i=3,r.interrupt?t:A):Se(x)?(e.consume(x),s=String.fromCharCode(x),y):n(x)}function f(x){return x===45?(e.consume(x),i=2,p):x===91?(e.consume(x),i=5,l=0,E):Se(x)?(e.consume(x),i=4,r.interrupt?t:A):n(x)}function p(x){return x===45?(e.consume(x),r.interrupt?t:A):n(x)}function E(x){return x==="CDATA[".charCodeAt(l++)?(e.consume(x),l===6?r.interrupt?t:z:E):n(x)}function N(x){return Se(x)?(e.consume(x),s=String.fromCharCode(x),y):n(x)}function y(x){if(x===null||x===47||x===62||le(x)){const Oe=x===47,Ee=s.toLowerCase();return!Oe&&!a&&Fa.includes(Ee)?(i=1,r.interrupt?t(x):z(x)):rE.includes(s.toLowerCase())?(i=6,Oe?(e.consume(x),_):r.interrupt?t(x):z(x)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(x):a?C(x):w(x))}return x===45||_e(x)?(e.consume(x),s+=String.fromCharCode(x),y):n(x)}function _(x){return x===62?(e.consume(x),r.interrupt?t:z):n(x)}function C(x){return ne(x)?(e.consume(x),C):I(x)}function w(x){return x===47?(e.consume(x),I):x===58||x===95||Se(x)?(e.consume(x),R):ne(x)?(e.consume(x),w):I(x)}function R(x){return x===45||x===46||x===58||x===95||_e(x)?(e.consume(x),R):O(x)}function O(x){return x===61?(e.consume(x),S):ne(x)?(e.consume(x),O):w(x)}function S(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),o=x,$):ne(x)?(e.consume(x),S):Y(x)}function $(x){return x===o?(e.consume(x),o=null,W):x===null||G(x)?n(x):(e.consume(x),$)}function Y(x){return x===null||x===34||x===39||x===47||x===60||x===61||x===62||x===96||le(x)?O(x):(e.consume(x),Y)}function W(x){return x===47||x===62||ne(x)?w(x):n(x)}function I(x){return x===62?(e.consume(x),U):n(x)}function U(x){return x===null||G(x)?z(x):ne(x)?(e.consume(x),U):n(x)}function z(x){return x===45&&i===2?(e.consume(x),H):x===60&&i===1?(e.consume(x),P):x===62&&i===4?(e.consume(x),oe):x===63&&i===3?(e.consume(x),A):x===93&&i===5?(e.consume(x),X):G(x)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(aE,fe,q)(x)):x===null||G(x)?(e.exit("htmlFlowData"),q(x)):(e.consume(x),z)}function q(x){return e.check(sE,J,fe)(x)}function J(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),Q}function Q(x){return x===null||G(x)?q(x):(e.enter("htmlFlowData"),z(x))}function H(x){return x===45?(e.consume(x),A):z(x)}function P(x){return x===47?(e.consume(x),s="",V):z(x)}function V(x){if(x===62){const Oe=s.toLowerCase();return Fa.includes(Oe)?(e.consume(x),oe):z(x)}return Se(x)&&s.length<8?(e.consume(x),s+=String.fromCharCode(x),V):z(x)}function X(x){return x===93?(e.consume(x),A):z(x)}function A(x){return x===62?(e.consume(x),oe):x===45&&i===2?(e.consume(x),A):z(x)}function oe(x){return x===null||G(x)?(e.exit("htmlFlowData"),fe(x)):(e.consume(x),oe)}function fe(x){return e.exit("htmlFlow"),t(x)}}function cE(e,t,n){const r=this;return i;function i(s){return G(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):n(s)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function uE(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Sn,t,n)}}var hE={name:"htmlText",tokenize:dE};function dE(e,t,n){const r=this;let i,a,s;return l;function l(A){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(A),o}function o(A){return A===33?(e.consume(A),u):A===47?(e.consume(A),O):A===63?(e.consume(A),w):Se(A)?(e.consume(A),Y):n(A)}function u(A){return A===45?(e.consume(A),d):A===91?(e.consume(A),a=0,E):Se(A)?(e.consume(A),C):n(A)}function d(A){return A===45?(e.consume(A),p):n(A)}function h(A){return A===null?n(A):A===45?(e.consume(A),f):G(A)?(s=h,P(A)):(e.consume(A),h)}function f(A){return A===45?(e.consume(A),p):h(A)}function p(A){return A===62?H(A):A===45?f(A):h(A)}function E(A){return A==="CDATA[".charCodeAt(a++)?(e.consume(A),a===6?N:E):n(A)}function N(A){return A===null?n(A):A===93?(e.consume(A),y):G(A)?(s=N,P(A)):(e.consume(A),N)}function y(A){return A===93?(e.consume(A),_):N(A)}function _(A){return A===62?H(A):A===93?(e.consume(A),_):N(A)}function C(A){return A===null||A===62?H(A):G(A)?(s=C,P(A)):(e.consume(A),C)}function w(A){return A===null?n(A):A===63?(e.consume(A),R):G(A)?(s=w,P(A)):(e.consume(A),w)}function R(A){return A===62?H(A):w(A)}function O(A){return Se(A)?(e.consume(A),S):n(A)}function S(A){return A===45||_e(A)?(e.consume(A),S):$(A)}function $(A){return G(A)?(s=$,P(A)):ne(A)?(e.consume(A),$):H(A)}function Y(A){return A===45||_e(A)?(e.consume(A),Y):A===47||A===62||le(A)?W(A):n(A)}function W(A){return A===47?(e.consume(A),H):A===58||A===95||Se(A)?(e.consume(A),I):G(A)?(s=W,P(A)):ne(A)?(e.consume(A),W):H(A)}function I(A){return A===45||A===46||A===58||A===95||_e(A)?(e.consume(A),I):U(A)}function U(A){return A===61?(e.consume(A),z):G(A)?(s=U,P(A)):ne(A)?(e.consume(A),U):W(A)}function z(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(e.consume(A),i=A,q):G(A)?(s=z,P(A)):ne(A)?(e.consume(A),z):(e.consume(A),J)}function q(A){return A===i?(e.consume(A),i=void 0,Q):A===null?n(A):G(A)?(s=q,P(A)):(e.consume(A),q)}function J(A){return A===null||A===34||A===39||A===60||A===61||A===96?n(A):A===47||A===62||le(A)?W(A):(e.consume(A),J)}function Q(A){return A===47||A===62||le(A)?W(A):n(A)}function H(A){return A===62?(e.consume(A),e.exit("htmlTextData"),e.exit("htmlText"),t):n(A)}function P(A){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),V}function V(A){return ne(A)?ie(e,X,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):X(A)}function X(A){return e.enter("htmlTextData"),s(A)}}var Ii={name:"labelEnd",resolveAll:gE,resolveTo:EE,tokenize:TE},fE={tokenize:bE},pE={tokenize:kE},mE={tokenize:AE};function gE(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Be(e,0,e.length,n),e}function EE(e,t){let n=e.length,r=0,i,a,s,l;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const o={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[a][1].start},end:{...e[s][1].end}},d={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[s-2][1].start}};return l=[["enter",o,t],["enter",u,t]],l=je(l,e.slice(a+1,a+r+3)),l=je(l,[["enter",d,t]]),l=je(l,dr(t.parser.constructs.insideSpan.null,e.slice(a+r+4,s-3),t)),l=je(l,[["exit",d,t],e[s-2],e[s-1],["exit",u,t]]),l=je(l,e.slice(s+1)),l=je(l,[["exit",o,t]]),Be(e,a,e.length,l),e}function TE(e,t,n){const r=this;let i=r.events.length,a,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return l;function l(f){return a?a._inactive?h(f):(s=r.parser.defined.includes(Ye(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),o):n(f)}function o(f){return f===40?e.attempt(fE,d,s?d:h)(f):f===91?e.attempt(pE,d,s?u:h)(f):s?d(f):h(f)}function u(f){return e.attempt(mE,d,h)(f)}function d(f){return t(f)}function h(f){return a._balanced=!0,n(f)}}function bE(e,t,n){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),i}function i(h){return le(h)?fn(e,a)(h):a(h)}function a(h){return h===41?d(h):yl(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function s(h){return le(h)?fn(e,o)(h):d(h)}function l(h){return n(h)}function o(h){return h===34||h===39||h===40?Sl(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):d(h)}function u(h){return le(h)?fn(e,d)(h):d(h)}function d(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):n(h)}}function kE(e,t,n){const r=this;return i;function i(l){return Cl.call(r,e,a,s,"reference","referenceMarker","referenceString")(l)}function a(l){return r.parser.defined.includes(Ye(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function s(l){return n(l)}}function AE(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}var _E={name:"labelStartImage",resolveAll:Ii.resolveAll,tokenize:xE};function xE(e,t,n){const r=this;return i;function i(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),a}function a(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),s):n(l)}function s(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}var yE={name:"labelStartLink",resolveAll:Ii.resolveAll,tokenize:CE};function CE(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),a}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}var Ir={name:"lineEnding",tokenize:SE};function SE(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ie(e,t,"linePrefix")}}var Yn={name:"thematicBreak",tokenize:NE};function NE(e,t,n){let r=0,i;return a;function a(u){return e.enter("thematicBreak"),s(u)}function s(u){return i=u,l(u)}function l(u){return u===i?(e.enter("thematicBreakSequence"),o(u)):r>=3&&(u===null||G(u))?(e.exit("thematicBreak"),t(u)):n(u)}function o(u){return u===i?(e.consume(u),r++,o):(e.exit("thematicBreakSequence"),ne(u)?ie(e,l,"whitespace")(u):l(u))}}var Le={continuation:{tokenize:LE},exit:OE,name:"list",tokenize:wE},IE={partial:!0,tokenize:DE},vE={partial:!0,tokenize:RE};function wE(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return l;function l(p){const E=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Xr(p)){if(r.containerState.type||(r.containerState.type=E,e.enter(E,{_container:!0})),E==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Yn,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(p)}return n(p)}function o(p){return Xr(p)&&++s<10?(e.consume(p),o):(!r.interrupt||s<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):n(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Sn,r.interrupt?n:d,e.attempt(IE,f,h))}function d(p){return r.containerState.initialBlankLine=!0,a++,f(p)}function h(p){return ne(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),f):n(p)}function f(p){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function LE(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Sn,i,a);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ie(e,t,"listItemIndent",r.containerState.size+1)(l)}function a(l){return r.containerState.furtherBlankLines||!ne(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(vE,t,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,ie(e,e.attempt(Le,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function RE(e,t,n){const r=this;return ie(e,i,"listItemIndent",r.containerState.size+1);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(a):n(a)}}function OE(e){e.exit(this.containerState.type)}function DE(e,t,n){const r=this;return ie(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=r.events[r.events.length-1];return!ne(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}var Ha={name:"setextUnderline",resolveTo:PE,tokenize:ME};function PE(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",s,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function ME(e,t,n){const r=this;let i;return a;function a(u){let d=r.events.length,h;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){h=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),i=u,s(u)):n(u)}function s(u){return e.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===i?(e.consume(u),l):(e.exit("setextHeadingLineSequence"),ne(u)?ie(e,o,"lineSuffix")(u):o(u))}function o(u){return u===null||G(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}var BE={tokenize:qE,partial:!0};function FE(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:zE,continuation:{tokenize:$E},exit:YE}},text:{91:{name:"gfmFootnoteCall",tokenize:jE},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:HE,resolveTo:UE}}}}function HE(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const o=r.events[i][1];if(o.type==="labelImage"){s=o;break}if(o.type==="gfmFootnoteCall"||o.type==="labelLink"||o.type==="label"||o.type==="image"||o.type==="link")break}return l;function l(o){if(!s||!s._balanced)return n(o);const u=Ye(r.sliceSerialize({start:s.end,end:r.now()}));return u.codePointAt(0)!==94||!a.includes(u.slice(1))?n(o):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o))}}function UE(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function jE(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,s;return l;function l(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),o}function o(h){return h!==94?n(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(h){if(a>999||h===93&&!s||h===null||h===91||le(h))return n(h);if(h===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return i.includes(Ye(r.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(h)}return le(h)||(s=!0),a++,e.consume(h),h===92?d:u}function d(h){return h===91||h===92||h===93?(e.consume(h),a++,u):u(h)}}function zE(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0,l;return o;function o(E){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(E){return E===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(E)}function d(E){if(s>999||E===93&&!l||E===null||E===91||le(E))return n(E);if(E===93){e.exit("chunkString");const N=e.exit("gfmFootnoteDefinitionLabelString");return a=Ye(r.sliceSerialize(N)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return le(E)||(l=!0),s++,e.consume(E),E===92?h:d}function h(E){return E===91||E===92||E===93?(e.consume(E),s++,d):d(E)}function f(E){return E===58?(e.enter("definitionMarker"),e.consume(E),e.exit("definitionMarker"),i.includes(a)||i.push(a),ie(e,p,"gfmFootnoteDefinitionWhitespace")):n(E)}function p(E){return t(E)}}function $E(e,t,n){return e.check(Sn,t,e.attempt(BE,t,n))}function YE(e){e.exit("gfmFootnoteDefinition")}function qE(e,t,n){const r=this;return ie(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(a):n(a)}}function VE(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:i,resolveAll:r};return t==null&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(a,s){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let o=l;for(;o--;)if(a[o][0]==="exit"&&a[o][1].type==="strikethroughSequenceTemporary"&&a[o][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[o][1].end.offset-a[o][1].start.offset){a[l][1].type="strikethroughSequence",a[o][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},a[o][1].start),end:Object.assign({},a[l][1].end)},d={type:"strikethroughText",start:Object.assign({},a[o][1].end),end:Object.assign({},a[l][1].start)},h=[["enter",u,s],["enter",a[o][1],s],["exit",a[o][1],s],["enter",d,s]],f=s.parser.constructs.insideSpan.null;f&&Be(h,h.length,0,dr(f,a.slice(o+1,l),s)),Be(h,h.length,0,[["exit",d,s],["enter",a[l][1],s],["exit",a[l][1],s],["exit",u,s]]),Be(a,o-1,l-o+3,h),l=o+h.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function i(a,s,l){const o=this.previous,u=this.events;let d=0;return h;function h(p){return o===126&&u[u.length-1][1].type!=="characterEscape"?l(p):(a.enter("strikethroughSequenceTemporary"),f(p))}function f(p){const E=jt(o);if(p===126)return d>1?l(p):(a.consume(p),d++,f);if(d<2&&!t)return l(p);const N=a.exit("strikethroughSequenceTemporary"),y=jt(p);return N._open=!y||y===2&&!!E,N._close=!E||E===2&&!!y,s(p)}}}var WE=class{constructor(){this.map=[]}add(e,t,n){GE(this,e,t,n)}consume(e){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const i of r)e.push(i);r=n.pop()}this.map.length=0}};function GE(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function QE(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function KE(){return{flow:{null:{name:"table",tokenize:XE,resolveAll:ZE}}}}function XE(e,t,n){const r=this;let i=0,a=0,s;return l;function l(I){let U=r.events.length-1;for(;U>-1;){const J=r.events[U][1].type;if(J==="lineEnding"||J==="linePrefix")U--;else break}const z=U>-1?r.events[U][1].type:null,q=z==="tableHead"||z==="tableRow"?S:o;return q===S&&r.parser.lazy[r.now().line]?n(I):q(I)}function o(I){return e.enter("tableHead"),e.enter("tableRow"),u(I)}function u(I){return I===124||(s=!0,a+=1),d(I)}function d(I){return I===null?n(I):G(I)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),p):n(I):ne(I)?ie(e,d,"whitespace")(I):(a+=1,s&&(s=!1,i+=1),I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),s=!0,d):(e.enter("data"),h(I)))}function h(I){return I===null||I===124||le(I)?(e.exit("data"),d(I)):(e.consume(I),I===92?f:h)}function f(I){return I===92||I===124?(e.consume(I),h):h(I)}function p(I){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(I):(e.enter("tableDelimiterRow"),s=!1,ne(I)?ie(e,E,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):E(I))}function E(I){return I===45||I===58?y(I):I===124?(s=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),N):O(I)}function N(I){return ne(I)?ie(e,y,"whitespace")(I):y(I)}function y(I){return I===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),_):I===45?(a+=1,_(I)):I===null||G(I)?R(I):O(I)}function _(I){return I===45?(e.enter("tableDelimiterFiller"),C(I)):O(I)}function C(I){return I===45?(e.consume(I),C):I===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(I))}function w(I){return ne(I)?ie(e,R,"whitespace")(I):R(I)}function R(I){return I===124?E(I):I===null||G(I)?!s||i!==a?O(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(I)):O(I)}function O(I){return n(I)}function S(I){return e.enter("tableRow"),$(I)}function $(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),$):I===null||G(I)?(e.exit("tableRow"),t(I)):ne(I)?ie(e,$,"whitespace")(I):(e.enter("data"),Y(I))}function Y(I){return I===null||I===124||le(I)?(e.exit("data"),$(I)):(e.consume(I),I===92?W:Y)}function W(I){return I===92||I===124?(e.consume(I),Y):Y(I)}}function ZE(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],l=!1,o=0,u,d,h;const f=new WE;for(;++n<e.length;){const p=e[n],E=p[1];p[0]==="enter"?E.type==="tableHead"?(l=!1,o!==0&&(Ua(f,t,o,u,d),d=void 0,o=0),u={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},f.add(n,0,[["enter",u,t]])):E.type==="tableRow"||E.type==="tableDelimiterRow"?(r=!0,h=void 0,a=[0,0,0,0],s=[0,n+1,0,0],l&&(l=!1,d={type:"tableBody",start:Object.assign({},E.start),end:Object.assign({},E.end)},f.add(n,0,[["enter",d,t]])),i=E.type==="tableDelimiterRow"?2:d?3:1):i&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(a[1]!==0&&(s[0]=s[1],h=Mn(f,t,a,i,void 0,h),a=[0,0,0,0]),s[2]=n)):E.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(s[0]=s[1],h=Mn(f,t,a,i,void 0,h)),a=s,s=[a[1],n,0,0])):E.type==="tableHead"?(l=!0,o=n):E.type==="tableRow"||E.type==="tableDelimiterRow"?(o=n,a[1]!==0?(s[0]=s[1],h=Mn(f,t,a,i,n,h)):s[1]!==0&&(h=Mn(f,t,s,i,n,h)),i=0):i&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(s[3]=n)}for(o!==0&&Ua(f,t,o,u,d),f.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=QE(t.events,n))}return e}function Mn(e,t,n,r,i,a){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(a.end=Object.assign({},Pt(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const o=Pt(t.events,n[1]);if(a={type:s,start:Object.assign({},o),end:Object.assign({},o)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const u=Pt(t.events,n[2]),d=Pt(t.events,n[3]),h={type:l,start:Object.assign({},u),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",h,t]]),r!==2){const f=t.events[n[2]],p=t.events[n[3]];if(f[1].end=Object.assign({},p[1].end),f[1].type="chunkText",f[1].contentType="text",n[3]>n[2]+1){const E=n[2]+1,N=n[3]-n[2]-1;e.add(E,N,[])}}e.add(n[3]+1,0,[["exit",h,t]])}return i!==void 0&&(a.end=Object.assign({},Pt(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function Ua(e,t,n,r,i){const a=[],s=Pt(t.events,n);i&&(i.end=Object.assign({},s),a.push(["exit",i,t])),r.end=Object.assign({},s),a.push(["exit",r,t]),e.add(n+1,0,a)}function Pt(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}var JE={name:"tasklistCheck",tokenize:tT};function eT(){return{text:{91:JE}}}function tT(e,t,n){const r=this;return i;function i(o){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(o):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),a)}function a(o){return le(o)?(e.enter("taskListCheckValueUnchecked"),e.consume(o),e.exit("taskListCheckValueUnchecked"),s):o===88||o===120?(e.enter("taskListCheckValueChecked"),e.consume(o),e.exit("taskListCheckValueChecked"),s):n(o)}function s(o){return o===93?(e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(o)}function l(o){return G(o)?t(o):ne(o)?e.check({tokenize:nT},t,n)(o):n(o)}}function nT(e,t,n){return ie(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function rT(e){return hl([fg(),FE(),VE(e),KE(),eT()])}var iT={};function aT(e){const t=this,n=e||iT,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(rT(n)),a.push(og()),s.push(lg(n))}var sT=Object.defineProperty,oT=Object.defineProperties,lT=Object.getOwnPropertyDescriptors,ja=Object.getOwnPropertySymbols,cT=Object.prototype.hasOwnProperty,uT=Object.prototype.propertyIsEnumerable,za=(e,t,n)=>t in e?sT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Nl=(e,t)=>{for(var n in t||(t={}))cT.call(t,n)&&za(e,n,t[n]);if(ja)for(var n of ja(t))uT.call(t,n)&&za(e,n,t[n]);return e},Il=(e,t)=>oT(e,lT(t)),Ie=(e,t)=>{let n=!1,r=!1;for(let i=0;i<t;i+=1){if(e[i]==="\\"&&i+1<e.length&&e[i+1]==="`"){i+=1;continue}if(e.substring(i,i+3)==="```"){r=!r,i+=2;continue}!r&&e[i]==="`"&&(n=!n)}return n||r},hT=(e,t)=>{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",i=t>1&&e.substring(t-2,t+1)==="```";return n||r||i},dT=e=>{let t=0;for(let n=0;n<e.length;n+=1){if(e[n]==="\\"&&n+1<e.length&&e[n+1]==="`"){n+=1;continue}e[n]==="`"&&!hT(e,n)&&(t+=1)}return t},dt=(e,t)=>{let n=!1,r=!1,i=-1;for(let a=0;a<e.length;a+=1){if(e[a]==="\\"&&a+1<e.length&&e[a+1]==="`"){a+=1;continue}if(e.substring(a,a+3)==="```"){r=!r,a+=2;continue}if(!r&&e[a]==="`")if(n){if(i<t&&t<a)return!0;n=!1,i=-1}else n=!0,i=a}return!1},fT=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,pT=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(fT,(t,n,r,i)=>Ie(e,i)?t:`${n}\\>${r}`),mT=/(\*\*)([^*]*\*?)$/,gT=/(__)([^_]*?)$/,ET=/(\*\*\*)([^*]*?)$/,TT=/(\*)([^*]*?)$/,bT=/(_)([^_]*?)$/,kT=/(`)([^`]*?)$/,AT=/(~~)([^~]*?)$/,vt=/^[\s_~*`]*$/,vl=/^[\s]*[-*+][\s]+$/,_T=/[\p{L}\p{N}_]/u,xT=/^```[^`\n]*```?$/,yT=/^\*{4,}$/,CT=/(__)([^_]+)_$/,ST=/(~~)([^~]+)~$/,$a=/~~/g,ft=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:_T.test(e)},NT=(e,t)=>{let n=1;for(let r=t-1;r>=0;r-=1)if(e[r]==="]")n+=1;else if(e[r]==="["&&(n-=1,n===0))return r;return-1},wl=(e,t)=>{let n=1;for(let r=t+1;r<e.length;r+=1)if(e[r]==="[")n+=1;else if(e[r]==="]"&&(n-=1,n===0))return r;return-1},fr=(e,t)=>{let n=!1,r=!1;for(let i=0;i<e.length&&i<t;i+=1){if(e[i]==="\\"&&e[i+1]==="$"){i+=1;continue}e[i]==="$"&&(e[i+1]==="$"?(r=!r,i+=1,n=!1):r||(n=!n))}return n||r},IT=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
|
|
19
|
-
`)return!1}return!1},Ll=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===")")return!1;if(e[n]==="(")return n>0&&e[n-1]==="]"?IT(e,t):!1;if(e[n]===`
|
|
20
|
-
`)return!1}return!1},vT=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===">")return!1;if(e[n]==="<"){let r=n+1<e.length?e[n+1]:"";return r>="a"&&r<="z"||r>="A"&&r<="Z"||r==="/"}if(e[n]===`
|
|
21
|
-
`)return!1}return!1},vi=(e,t,n)=>{let r=0;for(let o=t-1;o>=0;o-=1)if(e[o]===`
|
|
22
|
-
`){r=o+1;break}let i=e.length;for(let o=t;o<e.length;o+=1)if(e[o]===`
|
|
23
|
-
`){i=o;break}let a=e.substring(r,i),s=0,l=!1;for(let o of a)if(o===n)s+=1;else if(o!==" "&&o!==" "){l=!0;break}return s>=3&&!l},wT=(e,t,n,r)=>n==="\\"||e.includes("$")&&fr(e,t)?!0:n!=="*"&&r==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&r&&ft(n)&&ft(r)||(!n||n===" "||n===" "||n===`
|
|
24
|
-
`)&&(!r||r===" "||r===" "||r===`
|
|
25
|
-
`)),Rl=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!=="*")continue;let a=i>0?e[i-1]:"",s=i<r-1?e[i+1]:"";wT(e,i,a,s)||(t+=1)}return t},LT=(e,t,n,r)=>!!(n==="\\"||e.includes("$")&&fr(e,t)||Ll(e,t)||vT(e,t)||n==="_"||r==="_"||n&&r&&ft(n)&&ft(r)),RT=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!=="_")continue;let a=i>0?e[i-1]:"",s=i<r-1?e[i+1]:"";LT(e,i,a,s)||(t+=1)}return t},OT=e=>{let t=0,n=0,r=!1;for(let i=0;i<e.length;i+=1){if(e[i]==="`"&&i+2<e.length&&e[i+1]==="`"&&e[i+2]==="`"){n>=3&&(t+=Math.floor(n/3)),n=0,r=!r,i+=2;continue}r||(e[i]==="*"?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0))}return n>=3&&(t+=Math.floor(n/3)),t},wi=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]==="*"&&r+1<e.length&&e[r+1]==="*"&&(t+=1,r+=1)}return t},Ya=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]==="_"&&r+1<e.length&&e[r+1]==="_"&&(t+=1,r+=1)}return t},DT=(e,t,n)=>{if(!t||vt.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
26
|
-
`),i=r===-1?0:r+1,a=e.substring(i,n);return vl.test(a)&&t.includes(`
|
|
27
|
-
`)?!0:vi(e,n,"*")},PT=e=>{let t=e.match(mT);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return Ie(e,r)||dt(e,r)||DT(e,n,r)?e:wi(e)%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},MT=(e,t,n)=>{if(!t||vt.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
28
|
-
`),i=r===-1?0:r+1,a=e.substring(i,n);return vl.test(a)&&t.includes(`
|
|
29
|
-
`)?!0:vi(e,n,"_")},BT=e=>{let t=e.match(gT);if(!t){let i=e.match(CT);if(i){let a=e.lastIndexOf(i[1]);if(!(Ie(e,a)||dt(e,a))&&Ya(e)%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return Ie(e,r)||dt(e,r)||MT(e,n,r)?e:Ya(e)%2===1?`${e}__`:e},FT=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="*"&&e[n-1]!=="*"&&e[n+1]!=="*"&&e[n-1]!=="\\"&&!fr(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if((!r||r===" "||r===" "||r===`
|
|
30
|
-
`)&&(!i||i===" "||i===" "||i===`
|
|
31
|
-
`)||r&&i&&ft(r)&&ft(i))continue;return n}}return-1},HT=e=>{if(!e.match(TT))return e;let t=FT(e);if(t===-1||Ie(e,t)||dt(e,t))return e;let n=e.substring(t+1);return!n||vt.test(n)?e:Rl(e)%2===1?`${e}*`:e},Ol=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="_"&&e[n-1]!=="_"&&e[n+1]!=="_"&&e[n-1]!=="\\"&&!fr(e,n)&&!Ll(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if(r&&i&&ft(r)&&ft(i))continue;return n}}return-1},UT=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
32
|
-
`;)t-=1;return t<e.length?`${e.slice(0,t)}_${e.slice(t)}`:`${e}_`},jT=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(wi(t)%2!==1)return null;let n=t.indexOf("**"),r=Ol(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},zT=e=>{if(!e.match(bT))return e;let t=Ol(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||vt.test(n)||Ie(e,t)||dt(e,t))return e;if(RT(e)%2===1){let r=jT(e);return r!==null?r:UT(e)}return e},$T=e=>{let t=wi(e),n=Rl(e);return t%2===0&&n%2===0},YT=(e,t,n)=>!t||vt.test(t)||Ie(e,n)||dt(e,n)?!0:vi(e,n,"*"),qT=e=>{if(yT.test(e))return e;let t=e.match(ET);if(!t)return e;let n=t[2];return YT(e,n,e.lastIndexOf(t[1]))?e:OT(e)%2===1?$T(e)?e:`${e}***`:e},VT=/<[a-zA-Z/][^>]*$/,WT=e=>{let t=e.match(VT);return!t||t.index===void 0||Ie(e,t.index)?e:e.substring(0,t.index).trimEnd()},GT=e=>!e.match(xT)||e.includes(`
|
|
33
|
-
`)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,QT=e=>(e.match(/```/g)||[]).length%2===1,KT=e=>{let t=GT(e);if(t!==null)return t;let n=e.match(kT);if(n&&!QT(e)){let r=n[2];if(!r||vt.test(r))return e;if(dT(e)%2===1)return`${e}\``}return e},Dl=(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)==="```",XT=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!Dl(e,r)&&(n=!n),!n&&e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},ZT=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="\\"){r+=1;continue}if(e[r]==="`"&&!Dl(e,r)){n=!n;continue}!n&&e[r]==="$"&&(r+1<e.length&&e[r+1]==="$"?r+=1:t+=1)}return t},JT=e=>{if(e.endsWith("$")&&!e.endsWith("$$"))return`${e}$`;let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
|
|
34
|
-
`,t)!==-1&&!e.endsWith(`
|
|
35
|
-
`)?`${e}
|
|
36
|
-
$$`:`${e}$$`},eb=e=>XT(e)%2===0?e:JT(e),tb=e=>ZT(e)%2===1?`${e}$`:e,nb=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=NT(e,t);if(r===-1||Ie(e,r))return null;let i=r>0&&e[r-1]==="!",a=i?r-1:r,s=e.substring(0,a);if(i)return s;let l=e.substring(r+1,t);return n==="text-only"?`${s}${l}`:`${s}[${l}](streamdown:incomplete-link)`},qa=(e,t)=>{for(let n=0;n<t;n++)if(e[n]==="["&&!Ie(e,n)){if(n>0&&e[n-1]==="!")continue;let r=wl(e,n);if(r===-1)return n;if(r+1<e.length&&e[r+1]==="("){let i=e.indexOf(")",r+2);i!==-1&&(n=i)}}return t},rb=(e,t,n)=>{let r=t>0&&e[t-1]==="!",i=r?t-1:t;if(!e.substring(t+1).includes("]")){let a=e.substring(0,i);if(r)return a;if(n==="text-only"){let s=qa(e,t);return e.substring(0,s)+e.substring(s+1)}return`${e}](streamdown:incomplete-link)`}if(wl(e,t)===-1){let a=e.substring(0,i);if(r)return a;if(n==="text-only"){let s=qa(e,t);return e.substring(0,s)+e.substring(s+1)}return`${e}](streamdown:incomplete-link)`}return null},Pl=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!Ie(e,n)){let r=nb(e,n,t);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!Ie(e,r)){let i=rb(e,r,t);if(i!==null)return i}return e},ib=/^-{1,2}$/,ab=/^[\s]*-{1,2}[\s]+$/,sb=/^={1,2}$/,ob=/^[\s]*={1,2}[\s]+$/,lb=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
|
|
37
|
-
`);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(ib.test(i)&&!n.match(ab)){let a=r.split(`
|
|
38
|
-
`).at(-1);if(a&&a.trim().length>0)return`${e}`}if(sb.test(i)&&!n.match(ob)){let a=r.split(`
|
|
39
|
-
`).at(-1);if(a&&a.trim().length>0)return`${e}`}return e},cb=new RegExp("(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])","gu"),ub=e=>!e||typeof e!="string"||!e.includes("~")?e:e.replace(cb,(t,n)=>Ie(e,n)?t:"\\~"),hb=e=>{var t,n;let r=e.match(AT);if(r){let i=r[2];if(!i||vt.test(i))return e;let a=e.lastIndexOf(r[1]);if(Ie(e,a)||dt(e,a))return e;if(((t=e.match($a))==null?void 0:t.length)%2===1)return`${e}~~`}else{let i=e.match(ST);if(i){let a=e.lastIndexOf(i[0].slice(0,2));if(Ie(e,a)||dt(e,a))return e;if(((n=e.match($a))==null?void 0:n.length)%2===1)return`${e}~`}}return e},vr=e=>e!==!1,db=e=>e===!0,Ce={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},fb=[{handler:{name:"singleTilde",handle:ub,priority:Ce.SINGLE_TILDE},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:pT,priority:Ce.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:WT,priority:Ce.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:lb,priority:Ce.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:Pl,priority:Ce.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:qT,priority:Ce.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:PT,priority:Ce.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:BT,priority:Ce.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:HT,priority:Ce.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:zT,priority:Ce.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:KT,priority:Ce.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:hb,priority:Ce.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:eb,priority:Ce.KATEX},optionKey:"katex"},{handler:{name:"inlineKatex",handle:tb,priority:Ce.INLINE_KATEX},optionKey:"inlineKatex"}],pb=e=>{var t;let n=(t=e?.linkMode)!=null?t:"protocol";return fb.filter(({handler:r,optionKey:i})=>r.name==="links"?vr(e?.links)||vr(e?.images):r.name==="inlineKatex"?db(e?.inlineKatex):vr(e?.[i])).map(({handler:r,earlyReturn:i})=>r.name==="links"?{handler:Il(Nl({},r),{handle:a=>Pl(a,n)}),earlyReturn:n==="protocol"?i:void 0}:{handler:r,earlyReturn:i})},mb=(e,t)=>{var n;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=pb(t),a=((n=t?.handlers)!=null?n:[]).map(l=>{var o;return{handler:Il(Nl({},l),{priority:(o=l.priority)!=null?o:Ce.DEFAULT}),earlyReturn:void 0}}),s=[...i,...a].sort((l,o)=>{var u,d;return((u=l.handler.priority)!=null?u:0)-((d=o.handler.priority)!=null?d:0)});for(let{handler:l,earlyReturn:o}of s)if(r=l.handle(r),o!=null&&o(r))return r;return r},gb=mb,Eb=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Tb=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,bb={};function Va(e,t){return((t||bb).jsx?Tb:Eb).test(e)}var kb=/[ \t\n\f\r]/g;function Ab(e){return typeof e=="object"?e.type==="text"?Wa(e.value):!1:Wa(e)}function Wa(e){return e.replace(kb,"")===""}var _b=kn(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,u=/^\s+|\s+$/g,d=`
|
|
40
|
-
`,h="/",f="*",p="",E="comment",N="declaration";function y(C,w){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];w=w||{};var R=1,O=1;function S(H){var P=H.match(r);P&&(R+=P.length);var V=H.lastIndexOf(d);O=~V?H.length-V:O+H.length}function $(){var H={line:R,column:O};return function(P){return P.position=new Y(H),U(),P}}function Y(H){this.start=H,this.end={line:R,column:O},this.source=w.source}Y.prototype.content=C;function W(H){var P=new Error(w.source+":"+R+":"+O+": "+H);if(P.reason=H,P.filename=w.source,P.line=R,P.column=O,P.source=C,!w.silent)throw P}function I(H){var P=H.exec(C);if(P){var V=P[0];return S(V),C=C.slice(V.length),P}}function U(){I(i)}function z(H){var P;for(H=H||[];P=q();)P!==!1&&H.push(P);return H}function q(){var H=$();if(!(h!=C.charAt(0)||f!=C.charAt(1))){for(var P=2;p!=C.charAt(P)&&(f!=C.charAt(P)||h!=C.charAt(P+1));)++P;if(P+=2,p===C.charAt(P-1))return W("End of comment missing");var V=C.slice(2,P-2);return O+=2,S(V),C=C.slice(P),O+=2,H({type:E,comment:V})}}function J(){var H=$(),P=I(a);if(P){if(q(),!I(s))return W("property missing ':'");var V=I(l),X=H({type:N,property:_(P[0].replace(n,p)),value:V?_(V[0].replace(n,p)):p});return I(o),X}}function Q(){var H=[];z(H);for(var P;P=J();)P!==!1&&(H.push(P),z(H));return H}return U(),Q()}function _(C){return C?C.replace(u,p):p}t.exports=y})),xb=kn((e=>{var t=e&&e.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(_b());function r(i,a){let s=null;if(!i||typeof i!="string")return s;const l=(0,n.default)(i),o=typeof a=="function";return l.forEach(u=>{if(u.type!=="declaration")return;const{property:d,value:h}=u;o?a(d,h,u):h&&(s=s||{},s[d]=h)}),s}})),yb=kn((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,s=function(d){return!d||r.test(d)||t.test(d)},l=function(d,h){return h.toUpperCase()},o=function(d,h){return"".concat(h,"-")},u=function(d,h){return h===void 0&&(h={}),s(d)?d:(d=d.toLowerCase(),h.reactCompat?d=d.replace(a,o):d=d.replace(i,o),d.replace(n,l))};e.camelCase=u})),Cb=kn(((e,t)=>{var n=(e&&e.__importDefault||function(a){return a&&a.__esModule?a:{default:a}})(xb()),r=yb();function i(a,s){var l={};return!a||typeof a!="string"||(0,n.default)(a,function(o,u){o&&u&&(l[(0,r.camelCase)(o,s)]=u)}),l}i.default=i,t.exports=i}));function pn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Ga(e.position):"start"in e||"end"in e?Ga(e):"line"in e||"column"in e?ei(e):""}function ei(e){return Qa(e&&e.line)+":"+Qa(e&&e.column)}function Ga(e){return ei(e&&e.start)+"-"+ei(e&&e.end)}function Qa(e){return e&&typeof e=="number"?e:1}var ye=class extends Error{constructor(e,t,n){super(),typeof t=="string"&&(n=t,t=void 0);let r="",i={},a=!1;if(t&&("line"in t&&"column"in t?i={place:t}:"start"in t&&"end"in t?i={place:t}:"type"in t?i={ancestors:[t],place:t.position}:i={...t}),typeof e=="string"?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n=="string"){const l=n.indexOf(":");l===-1?i.ruleId=n:(i.source=n.slice(0,l),i.ruleId=n.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=s?s.line:void 0,this.name=pn(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};ye.prototype.file="";ye.prototype.name="";ye.prototype.reason="";ye.prototype.message="";ye.prototype.stack="";ye.prototype.column=void 0;ye.prototype.line=void 0;ye.prototype.ancestors=void 0;ye.prototype.cause=void 0;ye.prototype.fatal=void 0;ye.prototype.place=void 0;ye.prototype.ruleId=void 0;ye.prototype.source=void 0;var Sb=tr(Cb(),1),Li={}.hasOwnProperty,Nb=new Map,Ib=/[A-Z]/g,vb=new Set(["table","tbody","thead","tfoot","tr"]),wb=new Set(["td","th"]),Ml="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Lb(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Hb(n,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");r=Fb(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?pt:_n,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Bl(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Bl(e,t,n){if(t.type==="element")return Rb(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Ob(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Pb(e,t,n);if(t.type==="mdxjsEsm")return Db(e,t);if(t.type==="root")return Mb(e,t,n);if(t.type==="text")return Bb(e,t)}function Rb(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=pt,e.schema=i),e.ancestors.push(t);const a=Hl(e,t.tagName,!1),s=Ub(e,t);let l=Oi(e,t);return vb.has(t.tagName)&&(l=l.filter(function(o){return typeof o=="string"?!Ab(o):!0})),Fl(e,s,a,t),Ri(s,l),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function Ob(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)}bn(e,t.position)}function Db(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);bn(e,t.position)}function Pb(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=pt,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:Hl(e,t.name,!0),s=jb(e,t),l=Oi(e,t);return Fl(e,s,a,t),Ri(s,l),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function Mb(e,t,n){const r={};return Ri(r,Oi(e,t)),e.create(t,e.Fragment,r,n)}function Bb(e,t){return t.value}function Fl(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Ri(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Fb(e,t,n){return r;function r(i,a,s,l){const o=Array.isArray(s.children)?n:t;return l?o(a,s,l):o(a,s)}}function Hb(e,t){return n;function n(r,i,a,s){const l=Array.isArray(a.children),o=Ze(r);return t(i,a,s,l,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}function Ub(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Li.call(t.properties,i)){const a=zb(e,i,t.properties[i]);if(a){const[s,l]=a;e.tableCellAlignToStyle&&s==="align"&&typeof l=="string"&&wb.has(t.tagName)?r=l:n[s]=l}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function jb(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const a=i.expression;a.type;const s=a.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else bn(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,a=e.evaluater.evaluateExpression(s.expression)}else bn(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Oi(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Nb;for(;++r<t.children.length;){const a=t.children[r];let s;if(e.passKeys){const o=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(o){const u=i.get(o)||0;s=o+"-"+u,i.set(o,u+1)}}const l=Bl(e,a,s);l!==void 0&&n.push(l)}return n}function zb(e,t,n){const r=ar(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?ro(n):io(n)),r.property==="style"){let i=typeof n=="object"?n:$b(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Yb(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?eh[r.property]||r.property:r.attribute,n]}}function $b(e,t){try{return(0,Sb.default)(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new ye("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Ml+"#cannot-parse-style-attribute",i}}function Hl(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,s;for(;++a<i.length;){const l=Va(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:l,computed:!!(a&&l.type==="Literal"),optional:!1}:l}r=s}else r=Va(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Li.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);bn(e)}function bn(e,t){const n=new ye("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Ml+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Yb(e){const t={};let n;for(n in e)Li.call(e,n)&&(t[qb(n)]=e[n]);return t}function qb(e){let t=e.replace(Ib,Vb);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Vb(e){return"-"+e.toLowerCase()}var wr={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"]},Wb={tokenize:Gb};function Gb(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),ie(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),a(l)}function a(l){const o=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=o),n=o,s(l)}function s(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return G(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),s)}}var Qb={tokenize:Kb},Ka={tokenize:Xb};function Kb(e){const t=this,n=[];let r=0,i,a,s;return l;function l(w){if(r<n.length){const R=n[r];return t.containerState=R[1],e.attempt(R[0].continuation,o,u)(w)}return u(w)}function o(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&C();const R=t.events.length;let O=R,S;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){S=t.events[O][1].end;break}_(r);let $=R;for(;$<t.events.length;)t.events[$][1].end={...S},$++;return Be(t.events,O+1,0,t.events.slice(R)),t.events.length=$,u(w)}return l(w)}function u(w){if(r===n.length){if(!i)return f(w);if(i.currentConstruct&&i.currentConstruct.concrete)return E(w);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ka,d,h)(w)}function d(w){return i&&C(),_(r),f(w)}function h(w){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,E(w)}function f(w){return t.containerState={},e.attempt(Ka,p,E)(w)}function p(w){return r++,n.push([t.currentConstruct,t.containerState]),f(w)}function E(w){if(w===null){i&&C(),_(0),e.consume(w);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),N(w)}function N(w){if(w===null){y(e.exit("chunkFlow"),!0),_(0),e.consume(w);return}return G(w)?(e.consume(w),y(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(w),N)}function y(w,R){const O=t.sliceStream(w);if(R&&O.push(null),w.previous=a,a&&(a.next=w),a=w,i.defineSkip(w.start),i.write(O),t.parser.lazy[w.start.line]){let S=i.events.length;for(;S--;)if(i.events[S][1].start.offset<s&&(!i.events[S][1].end||i.events[S][1].end.offset>s))return;const $=t.events.length;let Y=$,W,I;for(;Y--;)if(t.events[Y][0]==="exit"&&t.events[Y][1].type==="chunkFlow"){if(W){I=t.events[Y][1].end;break}W=!0}for(_(r),S=$;S<t.events.length;)t.events[S][1].end={...I},S++;Be(t.events,Y+1,0,t.events.slice($)),t.events.length=S}}function _(w){let R=n.length;for(;R-- >w;){const O=n[R];t.containerState=O[1],O[0].exit.call(t,e)}n.length=w}function C(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Xb(e,t,n){return ie(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}var Zb={tokenize:Jb};function Jb(e){const t=this,n=e.attempt(Sn,r,e.attempt(this.parser.constructs.flowInitial,i,ie(e,e.attempt(this.parser.constructs.flow,i,e.attempt($g,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}var ek={resolveAll:jl()},tk=Ul("string"),nk=Ul("text");function Ul(e){return{resolveAll:jl(e==="text"?rk:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,s,l);return s;function s(d){return u(d)?a(d):l(d)}function l(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),o}function o(d){return u(d)?(n.exit("data"),a(d)):(n.consume(d),o)}function u(d){if(d===null)return!0;const h=i[d];let f=-1;if(h)for(;++f<h.length;){const p=h[f];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function jl(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function rk(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,s=-1,l=0,o;for(;a--;){const u=i[a];if(typeof u=="string"){for(s=u.length;u.charCodeAt(s-1)===32;)l++,s--;if(s)break;s=-1}else if(u===-2)o=!0,l++;else if(u!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const u={type:n===e.length||o||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:r.start._bufferIndex+s,_index:r.start._index+a,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}var ik=pi({attentionMarkers:()=>dk,contentInitial:()=>sk,disable:()=>fk,document:()=>ak,flow:()=>lk,flowInitial:()=>ok,insideSpan:()=>hk,string:()=>ck,text:()=>uk}),ak={42:Le,43:Le,45:Le,48:Le,49:Le,50:Le,51:Le,52:Le,53:Le,54:Le,55:Le,56:Le,57:Le,62:kl},sk={91:Gg},ok={[-2]:Nr,[-1]:Nr,32:Nr},lk={35:eE,42:Yn,45:[Ha,Yn],60:iE,61:Ha,95:Yn,96:Ba,126:Ba},ck={38:_l,92:Al},uk={[-5]:Ir,[-4]:Ir,[-3]:Ir,33:_E,38:_l,42:Jr,60:[yg,hE],91:yE,92:[Zg,Al],93:Ii,95:Jr,96:Bg},hk={null:[Jr,ek]},dk={null:[42,95]},fk={null:[]};function pk(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let s=[],l=[];const o={attempt:$(O),check:$(S),consume:C,enter:w,exit:R,interrupt:$(S,{interrupt:!0})},u={code:null,containerState:{},defineSkip:N,events:[],now:E,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:h};let d=t.tokenize.call(u,o);return t.resolveAll&&a.push(t),u;function h(U){return s=je(s,U),y(),s[s.length-1]!==null?[]:(Y(t,0),u.events=dr(a,u.events,u),u.events)}function f(U,z){return gk(p(U),z)}function p(U){return mk(s,U)}function E(){const{_bufferIndex:U,_index:z,line:q,column:J,offset:Q}=r;return{_bufferIndex:U,_index:z,line:q,column:J,offset:Q}}function N(U){i[U.line]=U.column,I()}function y(){let U;for(;r._index<s.length;){const z=s[r._index];if(typeof z=="string")for(U=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===U&&r._bufferIndex<z.length;)_(z.charCodeAt(r._bufferIndex));else _(z)}}function _(U){d=d(U)}function C(U){G(U)?(r.line++,r.column=1,r.offset+=U===-3?2:1,I()):U!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=U}function w(U,z){const q=z||{};return q.type=U,q.start=E(),u.events.push(["enter",q,u]),l.push(q),q}function R(U){const z=l.pop();return z.end=E(),u.events.push(["exit",z,u]),z}function O(U,z){Y(U,z.from)}function S(U,z){z.restore()}function $(U,z){return q;function q(J,Q,H){let P,V,X,A;return Array.isArray(J)?fe(J):"tokenize"in J?fe([J]):oe(J);function oe(pe){return gt;function gt(De){const He=De!==null&&pe[De],et=De!==null&&pe.null;return fe([...Array.isArray(He)?He:He?[He]:[],...Array.isArray(et)?et:et?[et]:[]])(De)}}function fe(pe){return P=pe,V=0,pe.length===0?H:x(pe[V])}function x(pe){return gt;function gt(De){return A=W(),X=pe,pe.partial||(u.currentConstruct=pe),pe.name&&u.parser.constructs.disable.null.includes(pe.name)?Ee(De):pe.tokenize.call(z?Object.assign(Object.create(u),z):u,o,Oe,Ee)(De)}}function Oe(pe){return U(X,A),Q}function Ee(pe){return A.restore(),++V<P.length?x(P[V]):H}}}function Y(U,z){U.resolveAll&&!a.includes(U)&&a.push(U),U.resolve&&Be(u.events,z,u.events.length-z,U.resolve(u.events.slice(z),u)),U.resolveTo&&(u.events=U.resolveTo(u.events,u))}function W(){const U=E(),z=u.previous,q=u.currentConstruct,J=u.events.length,Q=Array.from(l);return{from:J,restore:H};function H(){r=U,u.previous=z,u.currentConstruct=q,u.events.length=J,l=Q,I()}}function I(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function mk(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,a)];else{if(s=e.slice(n,i),r>-1){const l=s[0];typeof l=="string"?s[0]=l.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function gk(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let s;if(typeof a=="string")s=a;else switch(a){case-5:s="\r";break;case-4:s=`
|
|
41
|
-
`;break;case-3:s=`\r
|
|
42
|
-
`;break;case-2:s=t?" ":" ";break;case-1:if(!t&&i)continue;s=" ";break;default:s=String.fromCharCode(a)}i=a===-2,r.push(s)}return r.join("")}function Ek(e){const t={constructs:hl([ik,...(e||{}).extensions||[]]),content:n(Wb),defined:[],document:n(Qb),flow:n(Zb),lazy:{},string:n(tk),text:n(nk)};return t;function n(r){return i;function i(a){return pk(t,r,a)}}}function Tk(e){for(;!xl(e););return e}var Xa=/[\0\t\n\r]/g;function bk(){let e=1,t="",n=!0,r;return i;function i(a,s,l){const o=[];let u,d,h,f,p;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),h=0,t="",n&&(a.charCodeAt(0)===65279&&h++,n=void 0);h<a.length;){if(Xa.lastIndex=h,u=Xa.exec(a),f=u&&u.index!==void 0?u.index:a.length,p=a.charCodeAt(f),!u){t=a.slice(h);break}if(p===10&&h===f&&r)o.push(-3),r=void 0;else switch(r&&(o.push(-5),r=void 0),h<f&&(o.push(a.slice(h,f)),e+=f-h),p){case 0:o.push(65533),e++;break;case 9:for(d=Math.ceil(e/4)*4,o.push(-2);e++<d;)o.push(-1);break;case 10:o.push(-4),e=1;break;default:r=!0,e=1}h=f+1}return l&&(r&&o.push(-5),t&&o.push(t),o.push(null)),o}}var zl={}.hasOwnProperty;function kk(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Ak(n)(Tk(Ek(n).document().write(bk()(e,t,!0))))}function Ak(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(ce),autolinkProtocol:W,autolinkEmail:W,atxHeading:a(Gt),blockQuote:a(et),characterEscape:W,characterReference:W,codeFenced:a(vn),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(vn,s),codeText:a(wn,s),codeTextData:W,data:W,codeFlowValue:W,definition:a(Ln),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(Rn),hardBreakEscape:a(Lt),hardBreakTrailing:a(Lt),htmlFlow:a(On,s),htmlFlowData:W,htmlText:a(On,s),htmlTextData:W,image:a(re),label:s,link:a(ce),listItem:a(We),listItemValue:f,listOrdered:a(ve,h),listUnordered:a(ve),paragraph:a(Et),reference:x,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(Gt),strong:a(Zc),thematicBreak:a(eu)},exit:{atxHeading:o(),atxHeadingSequence:O,autolink:o(),autolinkEmail:He,autolinkProtocol:De,blockQuote:o(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:Ee,characterReferenceMarkerNumeric:Ee,characterReferenceValue:pe,characterReference:gt,codeFenced:o(y),codeFencedFence:N,codeFencedFenceInfo:p,codeFencedFenceMeta:E,codeFlowValue:I,codeIndented:o(_),codeText:o(Q),codeTextData:I,data:I,definition:o(),definitionDestinationString:R,definitionLabelString:C,definitionTitleString:w,emphasis:o(),hardBreakEscape:o(z),hardBreakTrailing:o(z),htmlFlow:o(q),htmlFlowData:I,htmlText:o(J),htmlTextData:I,image:o(P),label:X,labelText:V,lineEnding:U,link:o(H),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:Oe,resourceDestinationString:A,resourceTitleString:oe,resource:fe,setextHeading:o(Y),setextHeadingLineSequence:$,setextHeadingText:S,strong:o(),thematicBreak:o()}};$l(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(D){let j={type:"root",children:[]};const K={stack:[j],tokenStack:[],config:t,enter:l,exit:u,buffer:s,resume:d,data:n},he=[];let de=-1;for(;++de<D.length;)(D[de][1].type==="listOrdered"||D[de][1].type==="listUnordered")&&(D[de][0]==="enter"?he.push(de):de=i(D,he.pop(),de));for(de=-1;++de<D.length;){const st=t[D[de][0]];zl.call(st,D[de][1].type)&&st[D[de][1].type].call(Object.assign({sliceSerialize:D[de][2].sliceSerialize},K),D[de][1])}if(K.tokenStack.length>0){const st=K.tokenStack[K.tokenStack.length-1];(st[1]||Za).call(K,void 0,st[0])}for(j.position={start:ot(D.length>0?D[0][1].start:{line:1,column:1,offset:0}),end:ot(D.length>0?D[D.length-2][1].end:{line:1,column:1,offset:0})},de=-1;++de<t.transforms.length;)j=t.transforms[de](j)||j;return j}function i(D,j,K){let he=j-1,de=-1,st=!1,Rt,tt,Qt,Kt;for(;++he<=K;){const Pe=D[he];switch(Pe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":Pe[0]==="enter"?de++:de--,Kt=void 0;break;case"lineEndingBlank":Pe[0]==="enter"&&(Rt&&!Kt&&!de&&!Qt&&(Qt=he),Kt=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Kt=void 0}if(!de&&Pe[0]==="enter"&&Pe[1].type==="listItemPrefix"||de===-1&&Pe[0]==="exit"&&(Pe[1].type==="listUnordered"||Pe[1].type==="listOrdered")){if(Rt){let Ot=he;for(tt=void 0;Ot--;){const nt=D[Ot];if(nt[1].type==="lineEnding"||nt[1].type==="lineEndingBlank"){if(nt[0]==="exit")continue;tt&&(D[tt][1].type="lineEndingBlank",st=!0),nt[1].type="lineEnding",tt=Ot}else if(!(nt[1].type==="linePrefix"||nt[1].type==="blockQuotePrefix"||nt[1].type==="blockQuotePrefixWhitespace"||nt[1].type==="blockQuoteMarker"||nt[1].type==="listItemIndent"))break}Qt&&(!tt||Qt<tt)&&(Rt._spread=!0),Rt.end=Object.assign({},tt?D[tt][1].start:Pe[1].end),D.splice(tt||he,0,["exit",Rt,Pe[2]]),he++,K++}if(Pe[1].type==="listItemPrefix"){const Ot={type:"listItem",_spread:!1,start:Object.assign({},Pe[1].start),end:void 0};Rt=Ot,D.splice(he,0,["enter",Ot,Pe[2]]),he++,K++,Qt=void 0,Kt=!0}}}return D[j][1]._spread=st,K}function a(D,j){return K;function K(he){l.call(this,D(he),he),j&&j.call(this,he)}}function s(){this.stack.push({type:"fragment",children:[]})}function l(D,j,K){this.stack[this.stack.length-1].children.push(D),this.stack.push(D),this.tokenStack.push([j,K||void 0]),D.position={start:ot(j.start),end:void 0}}function o(D){return j;function j(K){D&&D.call(this,K),u.call(this,K)}}function u(D,j){const K=this.stack.pop(),he=this.tokenStack.pop();if(he)he[0].type!==D.type&&(j?j.call(this,D,he[0]):(he[1]||Za).call(this,D,he[0]));else throw new Error("Cannot close `"+D.type+"` ("+pn({start:D.start,end:D.end})+"): it’s not open");K.position.end=ot(D.end)}function d(){return yi(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function f(D){if(this.data.expectingFirstListItemValue){const j=this.stack[this.stack.length-2];j.start=Number.parseInt(this.sliceSerialize(D),10),this.data.expectingFirstListItemValue=void 0}}function p(){const D=this.resume(),j=this.stack[this.stack.length-1];j.lang=D}function E(){const D=this.resume(),j=this.stack[this.stack.length-1];j.meta=D}function N(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const D=this.resume(),j=this.stack[this.stack.length-1];j.value=D.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const D=this.resume(),j=this.stack[this.stack.length-1];j.value=D.replace(/(\r?\n|\r)$/g,"")}function C(D){const j=this.resume(),K=this.stack[this.stack.length-1];K.label=j,K.identifier=Ye(this.sliceSerialize(D)).toLowerCase()}function w(){const D=this.resume(),j=this.stack[this.stack.length-1];j.title=D}function R(){const D=this.resume(),j=this.stack[this.stack.length-1];j.url=D}function O(D){const j=this.stack[this.stack.length-1];j.depth||(j.depth=this.sliceSerialize(D).length)}function S(){this.data.setextHeadingSlurpLineEnding=!0}function $(D){const j=this.stack[this.stack.length-1];j.depth=this.sliceSerialize(D).codePointAt(0)===61?1:2}function Y(){this.data.setextHeadingSlurpLineEnding=void 0}function W(D){const j=this.stack[this.stack.length-1].children;let K=j[j.length-1];(!K||K.type!=="text")&&(K=Jc(),K.position={start:ot(D.start),end:void 0},j.push(K)),this.stack.push(K)}function I(D){const j=this.stack.pop();j.value+=this.sliceSerialize(D),j.position.end=ot(D.end)}function U(D){const j=this.stack[this.stack.length-1];if(this.data.atHardBreak){const K=j.children[j.children.length-1];K.position.end=ot(D.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(j.type)&&(W.call(this,D),I.call(this,D))}function z(){this.data.atHardBreak=!0}function q(){const D=this.resume(),j=this.stack[this.stack.length-1];j.value=D}function J(){const D=this.resume(),j=this.stack[this.stack.length-1];j.value=D}function Q(){const D=this.resume(),j=this.stack[this.stack.length-1];j.value=D}function H(){const D=this.stack[this.stack.length-1];if(this.data.inReference){const j=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=j,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function P(){const D=this.stack[this.stack.length-1];if(this.data.inReference){const j=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=j,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function V(D){const j=this.sliceSerialize(D),K=this.stack[this.stack.length-2];K.label=Gm(j),K.identifier=Ye(j).toLowerCase()}function X(){const D=this.stack[this.stack.length-1],j=this.resume(),K=this.stack[this.stack.length-1];this.data.inReference=!0,K.type==="link"?K.children=D.children:K.alt=j}function A(){const D=this.resume(),j=this.stack[this.stack.length-1];j.url=D}function oe(){const D=this.resume(),j=this.stack[this.stack.length-1];j.title=D}function fe(){this.data.inReference=void 0}function x(){this.data.referenceType="collapsed"}function Oe(D){const j=this.resume(),K=this.stack[this.stack.length-1];K.label=j,K.identifier=Ye(this.sliceSerialize(D)).toLowerCase(),this.data.referenceType="full"}function Ee(D){this.data.characterReferenceType=D.type}function pe(D){const j=this.sliceSerialize(D),K=this.data.characterReferenceType;let he;K?(he=ul(j,K==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):he=Si(j);const de=this.stack[this.stack.length-1];de.value+=he}function gt(D){const j=this.stack.pop();j.position.end=ot(D.end)}function De(D){I.call(this,D);const j=this.stack[this.stack.length-1];j.url=this.sliceSerialize(D)}function He(D){I.call(this,D);const j=this.stack[this.stack.length-1];j.url="mailto:"+this.sliceSerialize(D)}function et(){return{type:"blockquote",children:[]}}function vn(){return{type:"code",lang:null,meta:null,value:""}}function wn(){return{type:"inlineCode",value:""}}function Ln(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Rn(){return{type:"emphasis",children:[]}}function Gt(){return{type:"heading",depth:0,children:[]}}function Lt(){return{type:"break"}}function On(){return{type:"html",value:""}}function re(){return{type:"image",title:null,url:"",alt:null}}function ce(){return{type:"link",title:null,url:"",children:[]}}function ve(D){return{type:"list",ordered:D.type==="listOrdered",start:null,spread:D._spread,children:[]}}function We(D){return{type:"listItem",spread:D._spread,checked:null,children:[]}}function Et(){return{type:"paragraph",children:[]}}function Zc(){return{type:"strong",children:[]}}function Jc(){return{type:"text",value:""}}function eu(){return{type:"thematicBreak"}}}function ot(e){return{line:e.line,column:e.column,offset:e.offset}}function $l(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?$l(e,r):_k(e,r)}}function _k(e,t){let n;for(n in t)if(zl.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Za(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+pn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+pn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+pn({start:t.start,end:t.end})+") is still open")}function xk(e){const t=this;t.parser=n;function n(r){return kk(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function yk(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Ck(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
43
|
-
`}]}function Sk(e,t){const n=t.value?t.value+`
|
|
44
|
-
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function Nk(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ik(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vk(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Vt(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let s,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=a+1,l+=1,e.footnoteCounts.set(r,l);const o={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,o);const u={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(t,u),e.applyData(t,u)}function wk(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Lk(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Yl(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function Rk(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Yl(e,t);const i={src:Vt(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function Ok(e,t){const n={src:Vt(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Dk(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Pk(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Yl(e,t);const i={href:Vt(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Mk(e,t){const n={href:Vt(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Bk(e,t,n){const r=e.all(t),i=n?Fk(n):ql(t),a={},s=[];if(typeof t.checked=="boolean"){const d=r[0];let h;d&&d.type==="element"&&d.tagName==="p"?h=d:(h={type:"element",tagName:"p",properties:{},children:[]},r.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const d=r[l];(i||l!==0||d.type!=="element"||d.tagName!=="p")&&s.push({type:"text",value:`
|
|
45
|
-
`}),d.type==="element"&&d.tagName==="p"&&!i?s.push(...d.children):s.push(d)}const o=r[r.length-1];o&&(i||o.type!=="element"||o.tagName!=="p")&&s.push({type:"text",value:`
|
|
46
|
-
`});const u={type:"element",tagName:"li",properties:a,children:s};return e.patch(t,u),e.applyData(t,u)}function Fk(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=ql(n[r])}return t}function ql(e){const t=e.spread;return t??e.children.length>1}function Hk(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Uk(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function jk(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function zk(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $k(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=Ze(t.children[1]),o=ur(t.children[t.children.length-1]);l&&o&&(s.position={start:l,end:o}),i.push(s)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Yk(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,s=a?a.length:t.children.length;let l=-1;const o=[];for(;++l<s;){const d=t.children[l],h={},f=a?a[l]:void 0;f&&(h.align=f);let p={type:"element",tagName:i,properties:h,children:[]};d&&(p.children=e.all(d),e.patch(d,p),p=e.applyData(d,p)),o.push(p)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(o,!0)};return e.patch(t,u),e.applyData(t,u)}function qk(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Ja=9,es=32;function Vk(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(ts(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(ts(t.slice(i),i>0,!1)),a.join("")}function ts(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===Ja||a===es;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===Ja||a===es;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Wk(e,t){const n={type:"text",value:Vk(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Gk(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var Qk={blockquote:yk,break:Ck,code:Sk,delete:Nk,emphasis:Ik,footnoteReference:vk,heading:wk,html:Lk,imageReference:Rk,image:Ok,inlineCode:Dk,linkReference:Pk,link:Mk,listItem:Bk,list:Hk,paragraph:Uk,root:jk,strong:zk,table:$k,tableCell:qk,tableRow:Yk,text:Wk,thematicBreak:Gk,toml:Bn,yaml:Bn,definition:Bn,footnoteDefinition:Bn};function Bn(){}function Kk(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Xk(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Zk(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Kk,r=e.options.footnoteBackLabel||Xk,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let o=-1;for(;++o<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[o]);if(!u)continue;const d=e.all(u),h=String(u.identifier).toUpperCase(),f=Vt(h.toLowerCase());let p=0;const E=[],N=e.footnoteCounts.get(h);for(;N!==void 0&&++p<=N;){E.length>0&&E.push({type:"text",value:" "});let C=typeof n=="string"?n:n(o,p);typeof C=="string"&&(C={type:"text",value:C}),E.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+f+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(o,p),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const y=d[d.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const C=y.children[y.children.length-1];C&&C.type==="text"?C.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...E)}else d.push(...E);const _={type:"element",tagName:"li",properties:{id:t+"fn-"+f},children:e.wrap(d,!0)};e.patch(u,_),l.push(_)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...yt(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
47
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
|
|
48
|
-
`}]}}var ti={}.hasOwnProperty,Jk={};function e0(e,t){const n=t||Jk,r=new Map,i=new Map,a={all:l,applyData:n0,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...Qk,...n.handlers},one:s,options:n,patch:t0,wrap:i0};return Xe(e,function(o){if(o.type==="definition"||o.type==="footnoteDefinition"){const u=o.type==="definition"?r:i,d=String(o.identifier).toUpperCase();u.has(d)||u.set(d,o)}}),a;function s(o,u){const d=o.type,h=a.handlers[d];if(ti.call(a.handlers,d)&&h)return h(a,o,u);if(a.options.passThrough&&a.options.passThrough.includes(d)){if("children"in o){const{children:f,...p}=o,E=yt(p);return E.children=a.all(o),E}return yt(o)}return(a.options.unknownHandler||r0)(a,o,u)}function l(o){const u=[];if("children"in o){const d=o.children;let h=-1;for(;++h<d.length;){const f=a.one(d[h],o);if(f){if(h&&d[h-1].type==="break"&&(!Array.isArray(f)&&f.type==="text"&&(f.value=ns(f.value)),!Array.isArray(f)&&f.type==="element")){const p=f.children[0];p&&p.type==="text"&&(p.value=ns(p.value))}Array.isArray(f)?u.push(...f):u.push(f)}}}return u}}function t0(e,t){e.position&&(t.position=Ho(e))}function n0(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;typeof r=="string"&&(n.type==="element"?n.tagName=r:n={type:"element",tagName:r,properties:{},children:"children"in n?n.children:[n]}),n.type==="element"&&a&&Object.assign(n.properties,yt(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function r0(e,t){const n=t.data||{},r="value"in t&&!(ti.call(n,"hProperties")||ti.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function i0(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
49
|
-
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
50
|
-
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
51
|
-
`}),n}function ns(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function rs(e,t){const n=e0(e,t),r=n.one(e,void 0),i=Zk(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&("children"in a,a.children.push({type:"text",value:`
|
|
52
|
-
`},i)),a}function a0(e,t){return e&&"run"in e?async function(n,r){const i=rs(n,{file:r,...t});await e.run(i,r)}:function(n,r){return rs(n,{file:r,...e||t})}}function is(e){if(e)throw e}var s0=kn(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(h){return typeof Array.isArray=="function"?Array.isArray(h):r.call(h)==="[object Array]"},l=function(h){if(!h||r.call(h)!=="[object Object]")return!1;var f=n.call(h,"constructor"),p=h.constructor&&h.constructor.prototype&&n.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!f&&!p)return!1;var E;for(E in h);return typeof E>"u"||n.call(h,E)},o=function(h,f){i&&f.name==="__proto__"?i(h,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):h[f.name]=f.newValue},u=function(h,f){if(f==="__proto__")if(n.call(h,f)){if(a)return a(h,f).value}else return;return h[f]};t.exports=function d(){var h,f,p,E,N,y,_=arguments[0],C=1,w=arguments.length,R=!1;for(typeof _=="boolean"&&(R=_,_=arguments[1]||{},C=2),(_==null||typeof _!="object"&&typeof _!="function")&&(_={});C<w;++C)if(h=arguments[C],h!=null)for(f in h)p=u(_,f),E=u(h,f),_!==E&&(R&&E&&(l(E)||(N=s(E)))?(N?(N=!1,y=p&&s(p)?p:[]):y=p&&l(p)?p:{},o(_,{name:f,newValue:d(R,y,E)})):typeof E<"u"&&o(_,{name:f,newValue:E}));return _}}));function ni(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 o0(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);l(null,...i);function l(o,...u){const d=e[++a];let h=-1;if(o){s(o);return}for(;++h<i.length;)(u[h]===null||u[h]===void 0)&&(u[h]=i[h]);i=u,d?l0(d,l)(...u):s(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function l0(e,t){let n;return r;function r(...s){const l=e.length>s.length;let o;l&&s.push(i);try{o=e.apply(this,s)}catch(u){const d=u;if(l&&n)throw d;return i(d)}l||(o&&o.then&&typeof o.then=="function"?o.then(a,i):o instanceof Error?i(o):a(o))}function i(s,...l){n||(n=!0,t(s,...l))}function a(s){i(null,s)}}var Qe={basename:c0,dirname:u0,extname:h0,join:d0,sep:"/"};function c0(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Nn(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,l=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else s<0&&(a=!0,s=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(r=i):(l=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function u0(e){if(Nn(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function h0(e){Nn(e);let t=e.length,n=-1,r=0,i=-1,a=0,s;for(;t--;){const l=e.codePointAt(t);if(l===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),l===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function d0(...e){let t=-1,n;for(;++t<e.length;)Nn(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":f0(n)}function f0(e){Nn(e);const t=e.codePointAt(0)===47;let n=p0(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function p0(e,t){let n="",r=0,i=-1,a=0,s=-1,l,o;for(;++s<=e.length;){if(s<e.length)l=e.codePointAt(s);else{if(l===47)break;l=47}if(l===47){if(!(i===s-1||a===1))if(i!==s-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(o=n.lastIndexOf("/"),o!==n.length-1){o<0?(n="",r=0):(n=n.slice(0,o),r=n.length-1-n.lastIndexOf("/")),i=s,a=0;continue}}else if(n.length>0){n="",r=0,i=s,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else l===46&&a>-1?a++:a=-1}return n}function Nn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var m0={cwd:g0};function g0(){return"/"}function ri(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function E0(e){if(typeof e=="string")e=new URL(e);else if(!ri(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 T0(e)}function T0(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}var Lr=["history","path","basename","stem","extname","dirname"],b0=class{constructor(e){let t;e?ri(e)?t={path:e}:typeof e=="string"||k0(e)?t={value:e}:t=e:t={},this.cwd="cwd"in t?"":m0.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Lr.length;){const i=Lr[n];i in t&&t[i]!==void 0&&t[i]!==null&&(this[i]=i==="history"?[...t[i]]:t[i])}let r;for(r in t)Lr.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path=="string"?Qe.basename(this.path):void 0}set basename(e){Or(e,"basename"),Rr(e,"basename"),this.path=Qe.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?Qe.dirname(this.path):void 0}set dirname(e){as(this.basename,"dirname"),this.path=Qe.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?Qe.extname(this.path):void 0}set extname(e){if(Rr(e,"extname"),as(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Qe.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){ri(e)&&(e=E0(e)),Or(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?Qe.basename(this.path,this.extname):void 0}set stem(e){Or(e,"stem"),Rr(e,"stem"),this.path=Qe.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new ye(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Rr(e,t){if(e&&e.includes(Qe.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Qe.sep+"`")}function Or(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function as(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function k0(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var A0=(function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),Dr=tr(s0(),1),_0={}.hasOwnProperty,x0=class Vl extends A0{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=o0()}copy(){const t=new Vl;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data((0,Dr.default)(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Br("data",this.frozen),this.namespace[t]=n,this):_0.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Br("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Fn(t),r=this.parser||this.Parser;return Pr("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Pr("process",this.parser||this.Parser),Mr("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,s){const l=Fn(t),o=r.parse(l);r.run(o,l,function(d,h,f){if(d||!h||!f)return u(d);const p=h,E=r.stringify(p,f);S0(E)?f.value=E:f.result=E,u(d,f)});function u(d,h){d||!h?s(d):a?a(h):n(void 0,h)}}}processSync(t){let n=!1,r;return this.freeze(),Pr("processSync",this.parser||this.Parser),Mr("processSync",this.compiler||this.Compiler),this.process(t,i),os("processSync","process",n),r;function i(a,s){n=!0,is(a),r=s}}run(t,n,r){ss(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(s,l){const o=Fn(n);i.run(t,o,u);function u(d,h,f){const p=h||t;d?l(d):s?s(p):r(void 0,p,f)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),os("runSync","run",r),i;function a(s,l){is(s),i=l,r=!0}}stringify(t,n){this.freeze();const r=Fn(n),i=this.compiler||this.Compiler;return Mr("stringify",i),ss(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Br("use",this.frozen),t!=null)if(typeof t=="function")o(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(u){if(typeof u=="function")o(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[d,...h]=u;o(d,h)}else s(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function s(u){if(!("plugins"in u)&&!("settings"in u))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(u.plugins),u.settings&&(i.settings=(0,Dr.default)(!0,i.settings,u.settings))}function l(u){let d=-1;if(u!=null)if(Array.isArray(u))for(;++d<u.length;){const h=u[d];a(h)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function o(u,d){let h=-1,f=-1;for(;++h<r.length;)if(r[h][0]===u){f=h;break}if(f===-1)r.push([u,...d]);else if(d.length>0){let[p,...E]=d;const N=r[f][1];ni(N)&&ni(p)&&(p=(0,Dr.default)(!0,N,p)),r[f]=[u,p,...E]}}}},y0=new x0().freeze();function Pr(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Mr(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Br(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 ss(e){if(!ni(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function os(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Fn(e){return C0(e)?e:new b0(e)}function C0(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function S0(e){return typeof e=="string"||N0(e)}function N0(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var Wl=tr(uu(),1);function Di(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var wt=Di();function Gl(e){wt=e}var At={exec:()=>null};function ae(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(Ne.caret,"$1"),n=n.replace(i,s),r},getRegex:()=>new RegExp(n,t)};return r}var I0=(()=>{try{return!0}catch{return!1}})(),Ne={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)}}>`)},v0=/^(?:[ \t]*(?:\n|$))+/,w0=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,L0=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,In=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,R0=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Pi=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Ql=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Kl=ae(Ql).replace(/bull/g,Pi).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(),O0=ae(Ql).replace(/bull/g,Pi).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(),Mi=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,D0=/^[^\n]+/,Bi=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,P0=ae(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Bi).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),M0=ae(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Pi).getRegex(),pr="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",Fi=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,B0=ae("^ {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",Fi).replace("tag",pr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ls=ae(Mi).replace("hr",In).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",pr).getRegex(),Hi={blockquote:ae(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ls).getRegex(),code:w0,def:P0,fences:L0,heading:R0,hr:In,html:B0,lheading:Kl,list:M0,newline:v0,paragraph:ls,table:At,text:D0},cs=ae("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",In).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",pr).getRegex(),F0={...Hi,lheading:O0,table:cs,paragraph:ae(Mi).replace("hr",In).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",cs).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",pr).getRegex()},H0={...Hi,html:ae(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Fi).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:At,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ae(Mi).replace("hr",In).replace("heading",` *#{1,6} *[^
|
|
53
|
-
]`).replace("lheading",Kl).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},U0=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,j0=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Xl=/^( {2,}|\\)\n(?!\s*$)/,z0=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Wt=/[\p{P}\p{S}]/u,mr=/[\s\p{P}\p{S}]/u,Ui=/[^\s\p{P}\p{S}]/u,$0=ae(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,mr).getRegex(),Zl=/(?!~)[\p{P}\p{S}]/u,Y0=/(?!~)[\s\p{P}\p{S}]/u,q0=/(?:[^\s\p{P}\p{S}]|~)/u,V0=ae(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",I0?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Jl=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,W0=ae(Jl,"u").replace(/punct/g,Wt).getRegex(),G0=ae(Jl,"u").replace(/punct/g,Zl).getRegex(),ec="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Q0=ae(ec,"gu").replace(/notPunctSpace/g,Ui).replace(/punctSpace/g,mr).replace(/punct/g,Wt).getRegex(),K0=ae(ec,"gu").replace(/notPunctSpace/g,q0).replace(/punctSpace/g,Y0).replace(/punct/g,Zl).getRegex(),X0=ae("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ui).replace(/punctSpace/g,mr).replace(/punct/g,Wt).getRegex(),Z0=ae(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Wt).getRegex(),J0=ae("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,Ui).replace(/punctSpace/g,mr).replace(/punct/g,Wt).getRegex(),eA=ae(/\\(punct)/,"gu").replace(/punct/g,Wt).getRegex(),tA=ae(/^<(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(),nA=ae(Fi).replace("(?:-->|$)","-->").getRegex(),rA=ae("^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",nA).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Xn=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,iA=ae(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Xn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),tc=ae(/^!?\[(label)\]\[(ref)\]/).replace("label",Xn).replace("ref",Bi).getRegex(),nc=ae(/^!?\[(ref)\](?:\[\])?/).replace("ref",Bi).getRegex(),aA=ae("reflink|nolink(?!\\()","g").replace("reflink",tc).replace("nolink",nc).getRegex(),us=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ji={_backpedal:At,anyPunctuation:eA,autolink:tA,blockSkip:V0,br:Xl,code:j0,del:At,delLDelim:At,delRDelim:At,emStrongLDelim:W0,emStrongRDelimAst:Q0,emStrongRDelimUnd:X0,escape:U0,link:iA,nolink:nc,punctuation:$0,reflink:tc,reflinkSearch:aA,tag:rA,text:z0,url:At},sA={...ji,link:ae(/^!?\[(label)\]\((.*?)\)/).replace("label",Xn).getRegex(),reflink:ae(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Xn).getRegex()},ii={...ji,emStrongRDelimAst:K0,emStrongLDelim:G0,delLDelim:Z0,delRDelim:J0,url:ae(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",us).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:ae(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",us).getRegex()},oA={...ii,br:ae(Xl).replace("{2,}","*").getRegex(),text:ae(ii.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Hn={normal:Hi,gfm:F0,pedantic:H0},tn={normal:ji,gfm:ii,breaks:oA,pedantic:sA},lA={"&":"&","<":"<",">":">",'"':""","'":"'"},hs=e=>lA[e];function Ge(e,t){if(t){if(Ne.escapeTest.test(e))return e.replace(Ne.escapeReplace,hs)}else if(Ne.escapeTestNoEncode.test(e))return e.replace(Ne.escapeReplaceNoEncode,hs);return e}function ds(e){try{e=encodeURI(e).replace(Ne.percentDecode,"%")}catch{return null}return e}function fs(e,t){let n=e.replace(Ne.findPipe,(i,a,s)=>{let l=!1,o=a;for(;--o>=0&&s[o]==="\\";)l=!l;return l?"|":" |"}).split(Ne.splitPipe),r=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(;r<n.length;r++)n[r]=n[r].trim().replace(Ne.slashPipe,"|");return n}function nn(e,t,n){let r=e.length;if(r===0)return"";let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function cA(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function uA(e,t=0){let n=t,r="";for(let i of e)if(i===" "){let a=4-n%4;r+=" ".repeat(a),n+=a}else r+=i,n++;return r}function ps(e,t,n,r,i){let a=t.href,s=t.title||null,l=e[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let o={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:a,title:s,text:l,tokens:r.inlineTokens(l)};return r.state.inLink=!1,o}function hA(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
54
|
-
`).map(a=>{let s=a.match(n.other.beginningSpace);if(s===null)return a;let[l]=s;return l.length>=i.length?a.slice(i.length):a}).join(`
|
|
55
|
-
`)}var Zn=class{options;rules;lexer;constructor(e){this.options=e||wt}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 n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:nn(n,`
|
|
56
|
-
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=hA(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let r=nn(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:nn(t[0],`
|
|
57
|
-
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=nn(t[0],`
|
|
58
|
-
`).split(`
|
|
59
|
-
`),r="",i="",a=[];for(;n.length>0;){let s=!1,l=[],o;for(o=0;o<n.length;o++)if(this.rules.other.blockquoteStart.test(n[o]))l.push(n[o]),s=!0;else if(!s)l.push(n[o]);else break;n=n.slice(o);let u=l.join(`
|
|
60
|
-
`),d=u.replace(this.rules.other.blockquoteSetextReplace,`
|
|
61
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
|
|
62
|
-
${u}`:u,i=i?`${i}
|
|
63
|
-
${d}`:d;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,a,!0),this.lexer.state.top=h,n.length===0)break;let f=a.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){let p=f,E=p.raw+`
|
|
64
|
-
`+n.join(`
|
|
65
|
-
`),N=this.blockquote(E);a[a.length-1]=N,r=r.substring(0,r.length-p.raw.length)+N.raw,i=i.substring(0,i.length-p.text.length)+N.text;break}else if(f?.type==="list"){let p=f,E=p.raw+`
|
|
66
|
-
`+n.join(`
|
|
67
|
-
`),N=this.list(E);a[a.length-1]=N,r=r.substring(0,r.length-f.raw.length)+N.raw,i=i.substring(0,i.length-p.raw.length)+N.raw,n=E.substring(a.at(-1).raw.length).split(`
|
|
68
|
-
`);continue}}return{type:"blockquote",raw:r,tokens:a,text:i}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let a=this.rules.other.listItemRegex(n),s=!1;for(;e;){let o=!1,u="",d="";if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;u=t[0],e=e.substring(u.length);let h=uA(t[2].split(`
|
|
69
|
-
`,1)[0],t[1].length),f=e.split(`
|
|
70
|
-
`,1)[0],p=!h.trim(),E=0;if(this.options.pedantic?(E=2,d=h.trimStart()):p?E=t[1].length+1:(E=h.search(this.rules.other.nonSpaceChar),E=E>4?1:E,d=h.slice(E),E+=t[1].length),p&&this.rules.other.blankLine.test(f)&&(u+=f+`
|
|
71
|
-
`,e=e.substring(f.length+1),o=!0),!o){let N=this.rules.other.nextBulletRegex(E),y=this.rules.other.hrRegex(E),_=this.rules.other.fencesBeginRegex(E),C=this.rules.other.headingBeginRegex(E),w=this.rules.other.htmlBeginRegex(E),R=this.rules.other.blockquoteBeginRegex(E);for(;e;){let O=e.split(`
|
|
72
|
-
`,1)[0],S;if(f=O,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),S=f):S=f.replace(this.rules.other.tabCharGlobal," "),_.test(f)||C.test(f)||w.test(f)||R.test(f)||N.test(f)||y.test(f))break;if(S.search(this.rules.other.nonSpaceChar)>=E||!f.trim())d+=`
|
|
73
|
-
`+S.slice(E);else{if(p||h.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||_.test(h)||C.test(h)||y.test(h))break;d+=`
|
|
74
|
-
`+f}p=!f.trim(),u+=O+`
|
|
75
|
-
`,e=e.substring(O.length+1),h=S.slice(E)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(s=!0)),i.items.push({type:"list_item",raw:u,task:!!this.options.gfm&&this.rules.other.listIsTask.test(d),loose:!1,text:d,tokens:[]}),i.raw+=u}let l=i.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let o of i.items){if(this.lexer.state.top=!1,o.tokens=this.lexer.blockTokens(o.text,[]),o.task){if(o.text=o.text.replace(this.rules.other.listReplaceTask,""),o.tokens[0]?.type==="text"||o.tokens[0]?.type==="paragraph"){o.tokens[0].raw=o.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),o.tokens[0].text=o.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 u=this.rules.other.listTaskCheckbox.exec(o.raw);if(u){let d={type:"checkbox",raw:u[0]+" ",checked:u[0]!=="[ ]"};o.checked=d.checked,i.loose?o.tokens[0]&&["paragraph","text"].includes(o.tokens[0].type)&&"tokens"in o.tokens[0]&&o.tokens[0].tokens?(o.tokens[0].raw=d.raw+o.tokens[0].raw,o.tokens[0].text=d.raw+o.tokens[0].text,o.tokens[0].tokens.unshift(d)):o.tokens.unshift({type:"paragraph",raw:d.raw,text:d.raw,tokens:[d]}):o.tokens.unshift(d)}}if(!i.loose){let u=o.tokens.filter(d=>d.type==="space");i.loose=u.length>0&&u.some(d=>this.rules.other.anyLine.test(d.raw))}}if(i.loose)for(let o of i.items){o.loose=!0;for(let u of o.tokens)u.type==="text"&&(u.type="paragraph")}return i}}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 n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:r,title:i}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=fs(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
76
|
-
`):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let s of r)this.rules.other.tableAlignRight.test(s)?a.align.push("right"):this.rules.other.tableAlignCenter.test(s)?a.align.push("center"):this.rules.other.tableAlignLeft.test(s)?a.align.push("left"):a.align.push(null);for(let s=0;s<n.length;s++)a.header.push({text:n[s],tokens:this.lexer.inline(n[s]),header:!0,align:a.align[s]});for(let s of i)a.rows.push(fs(s,a.header.length).map((l,o)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:a.align[o]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let n=t[1].trim();return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
|
|
77
|
-
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}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 n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let a=nn(n.slice(0,-1),"\\");if((n.length-a.length)%2===0)return}else{let a=cA(t[2],"()");if(a===-2)return;if(a>-1){let s=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,s).trim(),t[3]=""}}let r=t[2],i="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(r);a&&(r=a[1],i=a[3])}else i=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),ps(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!r){let i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return ps(n,r,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,a,s,l=i,o=0,u=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+i);(r=u.exec(t))!==null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(s=[...a].length,r[3]||r[4]){l+=s;continue}else if((r[5]||r[6])&&i%3&&!((i+s)%3)){o+=s;continue}if(l-=s,l>0)continue;s=Math.min(s,s+l+o);let d=[...r[0]][0].length,h=e.slice(0,i+r.index+d+s);if(Math.min(i,s)%2){let p=h.slice(1,-1);return{type:"em",raw:h,text:p,tokens:this.lexer.inlineTokens(p)}}let f=h.slice(2,-2);return{type:"strong",raw:h,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),i=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&i&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,n=""){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,a,s,l=i,o=this.rules.inline.delRDelim;for(o.lastIndex=0,t=t.slice(-1*e.length+i);(r=o.exec(t))!==null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a||(s=[...a].length,s!==i))continue;if(r[3]||r[4]){l+=s;continue}if(l-=s,l>0)continue;s=Math.min(s,s+l);let u=[...r[0]][0].length,d=e.slice(0,i+r.index+u+s),h=d.slice(i,-i);return{type:"del",raw:d,text:h,tokens:this.lexer.inlineTokens(h)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,r;return t[2]==="@"?(n=t[1],r="mailto:"+n):(n=t[1],r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let n,r;if(t[2]==="@")n=t[0],r="mailto:"+n;else{let i;do i=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(i!==t[0]);n=t[0],t[1]==="www."?r="http://"+t[0]:r=t[0]}return{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},ze=class ai{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||wt,this.options.tokenizer=this.options.tokenizer||new Zn,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 n={other:Ne,block:Hn.normal,inline:tn.normal};this.options.pedantic?(n.block=Hn.pedantic,n.inline=tn.pedantic):this.options.gfm&&(n.block=Hn.gfm,this.options.breaks?n.inline=tn.breaks:n.inline=tn.gfm),this.tokenizer.rules=n}static get rules(){return{block:Hn,inline:tn}}static lex(t,n){return new ai(n).lex(t)}static lexInline(t,n){return new ai(n).inlineTokens(t)}lex(t){t=t.replace(Ne.carriageReturn,`
|
|
78
|
-
`),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],r=!1){for(this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(Ne.tabCharGlobal," ").replace(Ne.spaceLine,""));t;){let i;if(this.options.extensions?.block?.some(s=>(i=s.call({lexer:this},t,n))?(t=t.substring(i.raw.length),n.push(i),!0):!1))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let s=n.at(-1);i.raw.length===1&&s!==void 0?s.raw+=`
|
|
79
|
-
`:n.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let s=n.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
|
|
80
|
-
`)?"":`
|
|
81
|
-
`)+i.raw,s.text+=`
|
|
82
|
-
`+i.text,this.inlineQueue.at(-1).src=s.text):n.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let s=n.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
|
|
83
|
-
`)?"":`
|
|
84
|
-
`)+i.raw,s.text+=`
|
|
85
|
-
`+i.raw,this.inlineQueue.at(-1).src=s.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},n.push(i));continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),n.push(i);continue}let a=t;if(this.options.extensions?.startBlock){let s=1/0,l=t.slice(1),o;this.options.extensions.startBlock.forEach(u=>{o=u.call({lexer:this},l),typeof o=="number"&&o>=0&&(s=Math.min(s,o))}),s<1/0&&s>=0&&(a=t.substring(0,s+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){let s=n.at(-1);r&&s?.type==="paragraph"?(s.raw+=(s.raw.endsWith(`
|
|
86
|
-
`)?"":`
|
|
87
|
-
`)+i.raw,s.text+=`
|
|
88
|
-
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):n.push(i),r=a.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let s=n.at(-1);s?.type==="text"?(s.raw+=(s.raw.endsWith(`
|
|
89
|
-
`)?"":`
|
|
90
|
-
`)+i.raw,s.text+=`
|
|
91
|
-
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):n.push(i);continue}if(t){let s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){this.tokenizer.lexer=this;let r=t,i=null;if(this.tokens.links){let o=Object.keys(this.tokens.links);if(o.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!==null;)o.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(r))!==null;)r=r.slice(0,i.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!==null;)a=i[2]?i[2].length:0,r=r.slice(0,i.index+a)+"["+"a".repeat(i[0].length-a-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let s=!1,l="";for(;t;){s||(l=""),s=!1;let o;if(this.options.extensions?.inline?.some(d=>(o=d.call({lexer:this},t,n))?(t=t.substring(o.raw.length),n.push(o),!0):!1))continue;if(o=this.tokenizer.escape(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.tag(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.link(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(o.raw.length);let d=n.at(-1);o.type==="text"&&d?.type==="text"?(d.raw+=o.raw,d.text+=o.text):n.push(o);continue}if(o=this.tokenizer.emStrong(t,r,l)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.codespan(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.br(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.del(t,r,l)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.autolink(t)){t=t.substring(o.raw.length),n.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(t))){t=t.substring(o.raw.length),n.push(o);continue}let u=t;if(this.options.extensions?.startInline){let d=1/0,h=t.slice(1),f;this.options.extensions.startInline.forEach(p=>{f=p.call({lexer:this},h),typeof f=="number"&&f>=0&&(d=Math.min(d,f))}),d<1/0&&d>=0&&(u=t.substring(0,d+1))}if(o=this.tokenizer.inlineText(u)){t=t.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(l=o.raw.slice(-1)),s=!0;let d=n.at(-1);d?.type==="text"?(d.raw+=o.raw,d.text+=o.text):n.push(o);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 n}},Jn=class{options;parser;constructor(e){this.options=e||wt}space(e){return""}code({text:e,lang:t,escaped:n}){let r=(t||"").match(Ne.notSpaceStart)?.[0],i=e.replace(Ne.endingNewline,"")+`
|
|
92
|
-
`;return r?'<pre><code class="language-'+Ge(r)+'">'+(n?i:Ge(i,!0))+`</code></pre>
|
|
93
|
-
`:"<pre><code>"+(n?i:Ge(i,!0))+`</code></pre>
|
|
94
|
-
`}blockquote({tokens:e}){return`<blockquote>
|
|
95
|
-
${this.parser.parse(e)}</blockquote>
|
|
96
|
-
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
97
|
-
`}hr(e){return`<hr>
|
|
98
|
-
`}list(e){let t=e.ordered,n=e.start,r="";for(let s=0;s<e.items.length;s++){let l=e.items[s];r+=this.listitem(l)}let i=t?"ol":"ul",a=t&&n!==1?' start="'+n+'"':"";return"<"+i+a+`>
|
|
99
|
-
`+r+"</"+i+`>
|
|
100
|
-
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
|
101
|
-
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
102
|
-
`}table(e){let t="",n="";for(let i=0;i<e.header.length;i++)n+=this.tablecell(e.header[i]);t+=this.tablerow({text:n});let r="";for(let i=0;i<e.rows.length;i++){let a=e.rows[i];n="";for(let s=0;s<a.length;s++)n+=this.tablecell(a[s]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
|
|
103
|
-
<thead>
|
|
104
|
-
`+t+`</thead>
|
|
105
|
-
`+r+`</table>
|
|
106
|
-
`}tablerow({text:e}){return`<tr>
|
|
107
|
-
${e}</tr>
|
|
108
|
-
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
109
|
-
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Ge(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=ds(e);if(i===null)return r;e=i;let a='<a href="'+e+'"';return t&&(a+=' title="'+Ge(t)+'"'),a+=">"+r+"</a>",a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=ds(e);if(i===null)return Ge(n);e=i;let a=`<img src="${e}" alt="${Ge(n)}"`;return t&&(a+=` title="${Ge(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Ge(e.text)}},zi=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}},$e=class si{options;renderer;textRenderer;constructor(t){this.options=t||wt,this.options.renderer=this.options.renderer||new Jn,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new zi}static parse(t,n){return new si(n).parse(t)}static parseInline(t,n){return new si(n).parseInline(t)}parse(t){this.renderer.parser=this;let n="";for(let r=0;r<t.length;r++){let i=t[r];if(this.options.extensions?.renderers?.[i.type]){let s=i,l=this.options.extensions.renderers[s.type].call({parser:this},s);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(s.type)){n+=l||"";continue}}let a=i;switch(a.type){case"space":n+=this.renderer.space(a);break;case"hr":n+=this.renderer.hr(a);break;case"heading":n+=this.renderer.heading(a);break;case"code":n+=this.renderer.code(a);break;case"table":n+=this.renderer.table(a);break;case"blockquote":n+=this.renderer.blockquote(a);break;case"list":n+=this.renderer.list(a);break;case"checkbox":n+=this.renderer.checkbox(a);break;case"html":n+=this.renderer.html(a);break;case"def":n+=this.renderer.def(a);break;case"paragraph":n+=this.renderer.paragraph(a);break;case"text":n+=this.renderer.text(a);break;default:{let s='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return n}parseInline(t,n=this.renderer){this.renderer.parser=this;let r="";for(let i=0;i<t.length;i++){let a=t[i];if(this.options.extensions?.renderers?.[a.type]){let l=this.options.extensions.renderers[a.type].call({parser:this},a);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){r+=l||"";continue}}let s=a;switch(s.type){case"escape":r+=n.text(s);break;case"html":r+=n.html(s);break;case"link":r+=n.link(s);break;case"image":r+=n.image(s);break;case"checkbox":r+=n.checkbox(s);break;case"strong":r+=n.strong(s);break;case"em":r+=n.em(s);break;case"codespan":r+=n.codespan(s);break;case"br":r+=n.br(s);break;case"del":r+=n.del(s);break;case"text":r+=n.text(s);break;default:{let l='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}},sn=class{options;block;constructor(e){this.options=e||wt}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(e=this.block){return e?ze.lex:ze.lexInline}provideParser(e=this.block){return e?$e.parse:$e.parseInline}},dA=class{defaults=Di();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=$e;Renderer=Jn;TextRenderer=zi;Lexer=ze;Tokenizer=Zn;Hooks=sn;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":{let i=r;for(let a of i.header)n=n.concat(this.walkTokens(a.tokens,t));for(let a of i.rows)for(let s of a)n=n.concat(this.walkTokens(s.tokens,t));break}case"list":{let i=r;n=n.concat(this.walkTokens(i.items,t));break}default:{let i=r;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(a=>{let s=i[a].flat(1/0);n=n.concat(this.walkTokens(s,t))}):i.tokens&&(n=n.concat(this.walkTokens(i.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let r={...n};if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let a=t.renderers[i.name];a?t.renderers[i.name]=function(...s){let l=i.renderer.apply(this,s);return l===!1&&(l=a.apply(this,s)),l}:t.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=t[i.level];a?a.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),r.extensions=t),n.renderer){let i=this.defaults.renderer||new Jn(this.defaults);for(let a in n.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let s=a,l=n.renderer[s],o=i[s];i[s]=(...u)=>{let d=l.apply(i,u);return d===!1&&(d=o.apply(i,u)),d||""}}r.renderer=i}if(n.tokenizer){let i=this.defaults.tokenizer||new Zn(this.defaults);for(let a in n.tokenizer){if(!(a in i))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let s=a,l=n.tokenizer[s],o=i[s];i[s]=(...u)=>{let d=l.apply(i,u);return d===!1&&(d=o.apply(i,u)),d}}r.tokenizer=i}if(n.hooks){let i=this.defaults.hooks||new sn;for(let a in n.hooks){if(!(a in i))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let s=a,l=n.hooks[s],o=i[s];sn.passThroughHooks.has(a)?i[s]=u=>{if(this.defaults.async&&sn.passThroughHooksRespectAsync.has(a))return(async()=>{let h=await l.call(i,u);return o.call(i,h)})();let d=l.call(i,u);return o.call(i,d)}:i[s]=(...u)=>{if(this.defaults.async)return(async()=>{let h=await l.apply(i,u);return h===!1&&(h=await o.apply(i,u)),h})();let d=l.apply(i,u);return d===!1&&(d=o.apply(i,u)),d}}r.hooks=i}if(n.walkTokens){let i=this.defaults.walkTokens,a=n.walkTokens;r.walkTokens=function(s){let l=[];return l.push(a.call(this,s)),i&&(l=l.concat(i.call(this,s))),l}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ze.lex(e,t??this.defaults)}parser(e,t){return $e.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(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 t>"u"||t===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let s=i.hooks?await i.hooks.preprocess(t):t,l=await(i.hooks?await i.hooks.provideLexer(e):e?ze.lex:ze.lexInline)(s,i),o=i.hooks?await i.hooks.processAllTokens(l):l;i.walkTokens&&await Promise.all(this.walkTokens(o,i.walkTokens));let u=await(i.hooks?await i.hooks.provideParser(e):e?$e.parse:$e.parseInline)(o,i);return i.hooks?await i.hooks.postprocess(u):u})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let s=(i.hooks?i.hooks.provideLexer(e):e?ze.lex:ze.lexInline)(t,i);i.hooks&&(s=i.hooks.processAllTokens(s)),i.walkTokens&&this.walkTokens(s,i.walkTokens);let l=(i.hooks?i.hooks.provideParser(e):e?$e.parse:$e.parseInline)(s,i);return i.hooks&&(l=i.hooks.postprocess(l)),l}catch(s){return a(s)}}}onError(e,t){return n=>{if(n.message+=`
|
|
110
|
-
Please report this to https://github.com/markedjs/marked.`,e){let r="<p>An error occurred:</p><pre>"+Ge(n.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}},St=new dA;function se(e,t){return St.parse(e,t)}se.options=se.setOptions=function(e){return St.setOptions(e),se.defaults=St.defaults,Gl(se.defaults),se};se.getDefaults=Di;se.defaults=wt;se.use=function(...e){return St.use(...e),se.defaults=St.defaults,Gl(se.defaults),se};se.walkTokens=function(e,t){return St.walkTokens(e,t)};se.parseInline=St.parseInline;se.Parser=$e;se.parser=$e.parse;se.Renderer=Jn;se.TextRenderer=zi;se.Lexer=ze;se.lexer=ze.lex;se.Tokenizer=Zn;se.Hooks=sn;se.parse=se;var Vx=se.options,Wx=se.setOptions,Gx=se.use,Qx=se.walkTokens,Kx=se.parseInline,Xx=$e.parse,Zx=ze.lex,fA=300,pA="300px",mA=500;function gA(e={}){let{immediate:t=!1,debounceDelay:n=fA,rootMargin:r=pA,idleTimeout:i=mA}=e,[a,s]=(0,k.useState)(!1),l=(0,k.useRef)(null),o=(0,k.useRef)(null),u=(0,k.useRef)(null),d=(0,k.useMemo)(()=>p=>{let E=Date.now();return window.setTimeout(()=>{p({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-E))})},1)},[]),h=(0,k.useMemo)(()=>typeof window<"u"&&window.requestIdleCallback?(p,E)=>window.requestIdleCallback(p,E):d,[d]),f=(0,k.useMemo)(()=>typeof window<"u"&&window.cancelIdleCallback?p=>window.cancelIdleCallback(p):p=>{clearTimeout(p)},[]);return(0,k.useEffect)(()=>{if(t){s(!0);return}let p=l.current;if(!p)return;o.current&&(clearTimeout(o.current),o.current=null),u.current&&(f(u.current),u.current=null);let E=()=>{o.current&&(clearTimeout(o.current),o.current=null),u.current&&(f(u.current),u.current=null)},N=w=>{u.current=h(R=>{R.timeRemaining()>0||R.didTimeout?(s(!0),w.disconnect()):u.current=h(()=>{s(!0),w.disconnect()},{timeout:i/2})},{timeout:i})},y=w=>{E(),o.current=window.setTimeout(()=>{var R,O;let S=w.takeRecords();(S.length===0||(O=(R=S.at(-1))==null?void 0:R.isIntersecting)!=null&&O)&&N(w)},n)},_=(w,R)=>{w.isIntersecting?y(R):E()},C=new IntersectionObserver(w=>{for(let R of w)_(R,C)},{rootMargin:r,threshold:0});return C.observe(p),()=>{o.current&&clearTimeout(o.current),u.current&&f(u.current),C.disconnect()}},[t,n,r,i,f,h]),{shouldRender:a,containerRef:l}}var rc=/\s/,EA=/^\s+$/,TA=new Set(["code","pre","svg","math","annotation"]),bA=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",kA=e=>e.some(t=>bA(t)&&TA.has(t.tagName)),AA=e=>{let t=[],n="",r=!1;for(let i of e){let a=rc.test(i);a!==r&&n&&(t.push(n),n=""),n+=i,r=a}return n&&t.push(n),t},_A=e=>{let t=[],n="";for(let r of e)rc.test(r)?n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&t.push(n),t},xA=(e,t,n,r,i,a)=>{let s=`--sd-animation:sd-${t};--sd-duration:${i?0:n}ms;--sd-easing:${r}`;return a&&(s+=`;--sd-delay:${a}ms`),{type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:s},children:[{type:"text",value:e}]}},yA=(e,t,n,r,i)=>{let a=t.at(-1);if(!(a&&"children"in a))return;if(kA(t))return rn;let s=a,l=s.children.indexOf(e);if(l===-1)return;let o=e.value;if(!o.trim()){i.count+=o.length;return}let u=n.sep==="char"?_A(o):AA(o),d=r.prevContentLength,h=u.map(f=>{let p=i.count;if(i.count+=f.length,EA.test(f))return{type:"text",value:f};let E=d>0&&p<d,N=E?0:i.newIndex++*n.stagger;return xA(f,n.animation,n.duration,n.easing,E,N)});return s.children.splice(l,1,...h),l+h.length},CA=0;function oi(e){var t,n,r,i,a;let s={animation:(t=e?.animation)!=null?t:"fadeIn",duration:(n=e?.duration)!=null?n:150,easing:(r=e?.easing)!=null?r:"ease",sep:(i=e?.sep)!=null?i:"word",stagger:(a=e?.stagger)!=null?a:40},l={prevContentLength:0,lastRenderCharCount:0},o=CA++,u=()=>d=>{let h={count:0,newIndex:0};mi(d,"text",(f,p)=>yA(f,p,s,l,h)),l.lastRenderCharCount=h.count,l.prevContentLength=0};return Object.defineProperty(u,"name",{value:`rehypeAnimate$${o}`}),{name:"animate",type:"animate",rehypePlugin:u,setPrevContentLength(d){l.prevContentLength=d},getLastRenderCharCount(){let d=l.lastRenderCharCount;return l.lastRenderCharCount=0,d}}}oi();var ic=(0,k.createContext)(!1),SA=()=>(0,k.useContext)(ic),$i=(...e)=>js(Us(e)),NA=(e,t)=>{if(!e||!t)return t;let n=`${e}:`;return t.split(/\s+/).filter(Boolean).map(r=>r.startsWith(n)?r:`${e}:${r}`).join(" ")},IA=e=>e?(...t)=>NA(e,js(Us(t))):$i,Ft=(e,t,n)=>{let r=typeof t=="string"&&n.startsWith("text/csv")?"\uFEFF":"",i=typeof t=="string"?new Blob([r+t],{type:n}):t,a=URL.createObjectURL(i),s=document.createElement("a");s.href=a,s.download=e,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(a)},li=(0,k.createContext)($i),te=()=>(0,k.useContext)(li),vA=$i("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"),wA=e=>{let t={};for(let n of e.split(";")){let r=n.indexOf(":");if(r>0){let i=n.slice(0,r).trim(),a=n.slice(r+1).trim();i&&a&&(t[i]=a)}}return t},LA=(0,k.memo)(({children:e,result:t,language:n,className:r,startLine:i,lineNumbers:a=!0,...s})=>{let l=te(),o=(0,k.useMemo)(()=>l(vA),[l]),u=(0,k.useMemo)(()=>{let d={};return t.bg&&(d["--sdm-bg"]=t.bg),t.fg&&(d["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(d,wA(t.rootStyle)),d},[t.bg,t.fg,t.rootStyle]);return(0,m.jsx)("div",{className:l(r,"overflow-x-auto rounded-md border border-border bg-background p-4 text-sm"),"data-language":n,"data-streamdown":"code-block-body",...s,children:(0,m.jsx)("pre",{className:l(r,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:u,children:(0,m.jsx)("code",{className:a?l("[counter-increment:line_0] [counter-reset:line]"):void 0,style:a&&i&&i>1?{counterReset:`line ${i-1}`}:void 0,children:t.tokens.map((d,h)=>(0,m.jsx)("span",{className:a?o:void 0,children:d.length===0||d.length===1&&d[0].content===""?`
|
|
111
|
-
`:d.map((f,p)=>{let E={},N=!!f.bgColor;if(f.color&&(E["--sdm-c"]=f.color),f.bgColor&&(E["--sdm-tbg"]=f.bgColor),f.htmlStyle)for(let[y,_]of Object.entries(f.htmlStyle))y==="color"?E["--sdm-c"]=_:y==="background-color"?(E["--sdm-tbg"]=_,N=!0):E[y]=_;return(0,m.jsx)("span",{className:l("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",N&&"bg-[var(--sdm-tbg)]",N&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:E,...f.htmlAttrs,children:f.content},p)})},h))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className&&e.startLine===t.startLine&&e.lineNumbers===t.lineNumbers),RA=({className:e,language:t,style:n,isIncomplete:r,...i})=>{let a=te();return(0,m.jsx)("div",{className:a("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":r||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...n},...i})},ac=(0,k.createContext)({code:""}),sc=()=>(0,k.useContext)(ac),OA=({language:e})=>{let t=te();return(0,m.jsx)("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:(0,m.jsx)("span",{className:t("ml-1 font-mono lowercase"),children:e})})},DA=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
112
|
-
`;)t--;return e.slice(0,t)},PA=(0,k.lazy)(()=>$s(()=>import("./highlighted-body-OFNGDK62-t8UIAZOZ.js").then(e=>({default:e.HighlightedCodeBlockBody})),__vite__mapDeps([0,1,2,3]))),MA=({code:e,language:t,className:n,children:r,isIncomplete:i=!1,startLine:a,lineNumbers:s,...l})=>{let o=te(),u=(0,k.useMemo)(()=>DA(e),[e]),d=(0,k.useMemo)(()=>({bg:"transparent",fg:"inherit",tokens:u.split(`
|
|
113
|
-
`).map(h=>[{content:h,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[u]);return(0,m.jsx)(ac.Provider,{value:{code:e},children:(0,m.jsxs)(RA,{isIncomplete:i,language:t,children:[(0,m.jsx)(OA,{language:t}),r?(0,m.jsx)("div",{className:o("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:(0,m.jsx)("div",{className:o("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:r})}):null,(0,m.jsx)(k.Suspense,{fallback:(0,m.jsx)(LA,{className:n,language:t,lineNumbers:s,result:d,startLine:a,...l}),children:(0,m.jsx)(PA,{className:n,code:u,language:t,lineNumbers:s,raw:d,startLine:a,...l})})]})})},BA=e=>(0,m.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,m.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"})}),FA=e=>(0,m.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,m.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"})}),HA=e=>(0,m.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,m.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"})}),UA=e=>(0,m.jsxs)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[(0,m.jsx)("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),(0,m.jsx)("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),(0,m.jsx)("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),(0,m.jsx)("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),(0,m.jsx)("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),(0,m.jsx)("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),(0,m.jsx)("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),(0,m.jsx)("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),(0,m.jsx)("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),(0,m.jsx)("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),jA=e=>(0,m.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,m.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"})}),zA=e=>(0,m.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,m.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"})}),$A=e=>(0,m.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,m.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"})}),YA=e=>(0,m.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,m.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"})}),qA=e=>(0,m.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,m.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"})}),VA=e=>(0,m.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,m.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"})}),on={CheckIcon:BA,CopyIcon:FA,DownloadIcon:HA,ExternalLinkIcon:YA,Loader2Icon:UA,Maximize2Icon:jA,RotateCcwIcon:zA,XIcon:$A,ZoomInIcon:qA,ZoomOutIcon:VA},oc=(0,k.createContext)(on),WA=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(i=>e[i]===t[i])},ms=({icons:e,children:t})=>{let n=(0,k.useRef)(e),r=(0,k.useRef)(e?{...on,...e}:on);WA(n.current,e)||(n.current=e,r.current=e?{...on,...e}:on);let i=r.current;return(0,m.jsx)(oc.Provider,{value:i,children:t})},Ve=()=>(0,k.useContext)(oc),lc={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"},ci=(0,k.createContext)(lc),at=()=>(0,k.useContext)(ci),gs=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:a,...s})=>{let l=te(),[o,u]=(0,k.useState)(!1),d=(0,k.useRef)(0),{code:h}=sc(),{isAnimating:f}=(0,k.useContext)(Fe),p=at(),E=a??h,N=async()=>{var C;if(typeof window>"u"||!((C=navigator?.clipboard)!=null&&C.writeText)){t?.(new Error("Clipboard API not available"));return}try{o||(await navigator.clipboard.writeText(E),u(!0),e?.(),d.current=window.setTimeout(()=>u(!1),n))}catch(w){t?.(w)}};(0,k.useEffect)(()=>()=>{window.clearTimeout(d.current)},[]);let y=Ve(),_=o?y.CheckIcon:y.CopyIcon;return(0,m.jsx)("button",{className:l("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-copy-button",disabled:f,onClick:N,title:p.copyCode,type:"button",...s,children:r??(0,m.jsx)(_,{size:14})})},Es={"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"},GA=({onDownload:e,onError:t,language:n,children:r,className:i,code:a,...s})=>{let l=te(),{code:o}=sc(),{isAnimating:u}=(0,k.useContext)(Fe),d=at(),h=Ve(),f=a??o,p=`file.${n&&n in Es?Es[n]:"txt"}`,E="text/plain",N=()=>{try{Ft(p,f,E),e?.()}catch(y){t?.(y)}};return(0,m.jsx)("button",{className:l("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-download-button",disabled:u,onClick:N,title:d.downloadFile,type:"button",...s,children:r??(0,m.jsx)(h.DownloadIcon,{size:14})})},Ts=()=>{let{Loader2Icon:e}=Ve(),t=te();return(0,m.jsxs)("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[(0,m.jsx)("div",{className:t("h-[46px] w-full bg-muted/80")}),(0,m.jsx)("div",{className:t("flex w-full items-center justify-center p-4"),children:(0,m.jsx)(e,{className:t("size-4 animate-spin")})})]})},QA=/\.[^/.]+$/,KA=({node:e,className:t,src:n,alt:r,onLoad:i,onError:a,...s})=>{let{DownloadIcon:l}=Ve(),o=te(),u=(0,k.useRef)(null),[d,h]=(0,k.useState)(!1),[f,p]=(0,k.useState)(!1),E=at(),N=s.width!=null||s.height!=null,y=(d||N)&&!f,_=f&&!N;(0,k.useEffect)(()=>{let O=u.current;if(O!=null&&O.complete){let S=O.naturalWidth>0;h(S),p(!S)}},[]);let C=(0,k.useCallback)(O=>{h(!0),p(!1),i?.(O)},[i]),w=(0,k.useCallback)(O=>{h(!1),p(!0),a?.(O)},[a]),R=async()=>{if(n)try{let O=await(await fetch(n)).blob(),S=new URL(n,window.location.origin).pathname.split("/").pop()||"",$=S.split(".").pop(),Y=S.includes(".")&&$!==void 0&&$.length<=4,W="";if(Y)W=S;else{let I=O.type,U="png";I.includes("jpeg")||I.includes("jpg")?U="jpg":I.includes("png")?U="png":I.includes("svg")?U="svg":I.includes("gif")?U="gif":I.includes("webp")&&(U="webp"),W=`${(r||S||"image").replace(QA,"")}.${U}`}Ft(W,O,O.type)}catch{window.open(n,"_blank")}};return n?(0,m.jsxs)("div",{className:o("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[(0,m.jsx)("img",{alt:r,className:o("max-w-full rounded-lg",_&&"hidden",t),"data-streamdown":"image",onError:w,onLoad:C,ref:u,src:n,...s}),_&&(0,m.jsx)("span",{className:o("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:E.imageNotAvailable}),(0,m.jsx)("div",{className:o("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block")}),y&&(0,m.jsx)("button",{className:o("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:R,title:E.downloadImage,type:"button",children:(0,m.jsx)(l,{size:14})})]}):null},mn=0,Yi=()=>{mn+=1,mn===1&&(document.body.style.overflow="hidden")},qi=()=>{mn=Math.max(0,mn-1),mn===0&&(document.body.style.overflow="")},XA=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let{CheckIcon:i,CopyIcon:a,ExternalLinkIcon:s,XIcon:l}=Ve(),o=te(),[u,d]=(0,k.useState)(!1),h=at(),f=(0,k.useCallback)(async()=>{try{await navigator.clipboard.writeText(e),d(!0),setTimeout(()=>d(!1),2e3)}catch{}},[e]),p=(0,k.useCallback)(()=>{r(),n()},[r,n]);return(0,k.useEffect)(()=>{if(t){Yi();let E=N=>{N.key==="Escape"&&n()};return document.addEventListener("keydown",E),()=>{document.removeEventListener("keydown",E),qi()}}},[t,n]),t?(0,m.jsx)("div",{className:o("fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm"),"data-streamdown":"link-safety-modal",onClick:n,onKeyDown:E=>{E.key==="Escape"&&n()},role:"button",tabIndex:0,children:(0,m.jsxs)("div",{className:o("relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg"),onClick:E=>E.stopPropagation(),onKeyDown:E=>E.stopPropagation(),role:"presentation",children:[(0,m.jsx)("button",{className:o("absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:n,title:h.close,type:"button",children:(0,m.jsx)(l,{size:16})}),(0,m.jsxs)("div",{className:o("flex flex-col gap-2"),children:[(0,m.jsxs)("div",{className:o("flex items-center gap-2 font-semibold text-lg"),children:[(0,m.jsx)(s,{size:20}),(0,m.jsx)("span",{children:h.openExternalLink})]}),(0,m.jsx)("p",{className:o("text-muted-foreground text-sm"),children:h.externalLinkWarning})]}),(0,m.jsx)("div",{className:o("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),(0,m.jsxs)("div",{className:o("flex gap-2"),children:[(0,m.jsx)("button",{className:o("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:f,type:"button",children:u?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(i,{size:14}),(0,m.jsx)("span",{children:h.copied})]}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(a,{size:14}),(0,m.jsx)("span",{children:h.copyLink})]})}),(0,m.jsxs)("button",{className:o("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:p,type:"button",children:[(0,m.jsx)(s,{size:14}),(0,m.jsx)("span",{children:h.openLink})]})]})]})}):null},ui=(0,k.createContext)(null),Vi=()=>(0,k.useContext)(ui),Jx=()=>{var e;let t=Vi();return(e=t?.code)!=null?e:null},Wi=()=>{var e;let t=Vi();return(e=t?.mermaid)!=null?e:null},ZA=e=>{var t;let n=Vi();return n!=null&&n.renderers&&e&&(t=n.renderers.find(r=>Array.isArray(r.language)?r.language.includes(e):r.language===e))!=null?t:null},JA=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((i,a)=>{let s="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),l=new Image;l.crossOrigin="anonymous",l.onload=()=>{let o=document.createElement("canvas"),u=l.width*r,d=l.height*r;o.width=u,o.height=d;let h=o.getContext("2d");if(!h){a(new Error("Failed to create 2D canvas context for PNG export"));return}h.drawImage(l,0,0,u,d),o.toBlob(f=>{if(!f){a(new Error("Failed to create PNG blob"));return}i(f)},"image/png")},l.onerror=()=>a(new Error("Failed to load SVG image")),l.src=s})},e_=({chart:e,children:t,className:n,onDownload:r,config:i,onError:a})=>{let s=te(),[l,o]=(0,k.useState)(!1),u=(0,k.useRef)(null),{isAnimating:d}=(0,k.useContext)(Fe),h=Ve(),f=Wi(),p=at(),E=async N=>{try{if(N==="mmd"){Ft("diagram.mmd",e,"text/plain"),o(!1),r?.(N);return}if(!f){a?.(new Error("Mermaid plugin not available"));return}let y=f.getMermaid(i),_=e.split("").reduce((R,O)=>(R<<5)-R+O.charCodeAt(0)|0,0),C=`mermaid-${Math.abs(_)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:w}=await y.render(C,e);if(!w){a?.(new Error("SVG not found. Please wait for the diagram to render."));return}if(N==="svg"){Ft("diagram.svg",w,"image/svg+xml"),o(!1),r?.(N);return}if(N==="png"){Ft("diagram.png",await JA(w),"image/png"),r?.(N),o(!1);return}}catch(y){a?.(y)}};return(0,k.useEffect)(()=>{let N=y=>{let _=y.composedPath();u.current&&!_.includes(u.current)&&o(!1)};return document.addEventListener("mousedown",N),()=>{document.removeEventListener("mousedown",N)}},[]),(0,m.jsxs)("div",{className:s("relative"),ref:u,children:[(0,m.jsx)("button",{className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:d,onClick:()=>o(!l),title:p.downloadDiagram,type:"button",children:t??(0,m.jsx)(h.DownloadIcon,{size:14})}),l?(0,m.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:[(0,m.jsx)("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>E("svg"),title:p.downloadDiagramAsSvg,type:"button",children:p.mermaidFormatSvg}),(0,m.jsx)("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>E("png"),title:p.downloadDiagramAsPng,type:"button",children:p.mermaidFormatPng}),(0,m.jsx)("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>E("mmd"),title:p.downloadDiagramAsMmd,type:"button",children:p.mermaidFormatMmd})]}):null]})},t_=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...a})=>{let{Maximize2Icon:s,XIcon:l}=Ve(),o=te(),[u,d]=(0,k.useState)(!1),{isAnimating:h,controls:f}=(0,k.useContext)(Fe),p=at(),E=(()=>{if(typeof f=="boolean")return f;let y=f.mermaid;return y===!1?!1:y===!0||y===void 0?!0:y.panZoom!==!1})(),N=()=>{d(!u)};return(0,k.useEffect)(()=>{if(u){Yi();let y=_=>{_.key==="Escape"&&d(!1)};return document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y),qi()}}},[u]),(0,k.useEffect)(()=>{u?n?.():r&&r()},[u,n,r]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("button",{className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:h,onClick:N,title:p.viewFullscreen,type:"button",...a,children:(0,m.jsx)(s,{size:14})}),u?(0,Wl.createPortal)((0,m.jsxs)("div",{className:o("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),onClick:N,onKeyDown:y=>{y.key==="Escape"&&N()},role:"button",tabIndex:0,children:[(0,m.jsx)("button",{className:o("absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:N,title:p.exitFullscreen,type:"button",children:(0,m.jsx)(l,{size:20})}),(0,m.jsx)("div",{className:o("flex size-full items-center justify-center p-4"),onClick:y=>y.stopPropagation(),onKeyDown:y=>y.stopPropagation(),role:"presentation",children:(0,m.jsx)(G_,{chart:e,className:o("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:E})})]}),document.body):null]})},cc=e=>{var t,n;let r=[],i=[],a=e.querySelectorAll("thead th");for(let l of a)r.push(((t=l.textContent)==null?void 0:t.trim())||"");let s=e.querySelectorAll("tbody tr");for(let l of s){let o=[],u=l.querySelectorAll("td");for(let d of u)o.push(((n=d.textContent)==null?void 0:n.trim())||"");i.push(o)}return{headers:r,rows:i}},uc=e=>{let{headers:t,rows:n}=e,r=l=>{let o=!1,u=!1;for(let d of l){if(d==='"'){o=!0,u=!0;break}(d===","||d===`
|
|
114
|
-
`)&&(o=!0)}return o?u?`"${l.replace(/"/g,'""')}"`:`"${l}"`:l},i=t.length>0?n.length+1:n.length,a=new Array(i),s=0;t.length>0&&(a[s]=t.map(r).join(","),s+=1);for(let l of n)a[s]=l.map(r).join(","),s+=1;return a.join(`
|
|
115
|
-
`)},n_=e=>{let{headers:t,rows:n}=e,r=l=>{let o=!1;for(let d of l)if(d===" "||d===`
|
|
116
|
-
`||d==="\r"){o=!0;break}if(!o)return l;let u=[];for(let d of l)d===" "?u.push("\\t"):d===`
|
|
117
|
-
`?u.push("\\n"):d==="\r"?u.push("\\r"):u.push(d);return u.join("")},i=t.length>0?n.length+1:n.length,a=new Array(i),s=0;t.length>0&&(a[s]=t.map(r).join(" "),s+=1);for(let l of n)a[s]=l.map(r).join(" "),s+=1;return a.join(`
|
|
118
|
-
`)},Fr=e=>{let t=!1;for(let r of e)if(r==="\\"||r==="|"){t=!0;break}if(!t)return e;let n=[];for(let r of e)r==="\\"?n.push("\\\\"):r==="|"?n.push("\\|"):n.push(r);return n.join("")},hi=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),i=0,a=t.map(l=>Fr(l));r[i]=`| ${a.join(" | ")} |`,i+=1;let s=new Array(t.length);for(let l=0;l<t.length;l+=1)s[l]="---";r[i]=`| ${s.join(" | ")} |`,i+=1;for(let l of n)if(l.length<t.length){let o=new Array(t.length);for(let u=0;u<t.length;u+=1)o[u]=u<l.length?Fr(l[u]):"";r[i]=`| ${o.join(" | ")} |`,i+=1}else{let o=l.map(u=>Fr(u));r[i]=`| ${o.join(" | ")} |`,i+=1}return r.join(`
|
|
119
|
-
`)},hc=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let a=te(),[s,l]=(0,k.useState)(!1),[o,u]=(0,k.useState)(!1),d=(0,k.useRef)(null),h=(0,k.useRef)(0),{isAnimating:f}=(0,k.useContext)(Fe),p=at(),E=async _=>{var C,w;if(typeof window>"u"||!((C=navigator?.clipboard)!=null&&C.write)){r?.(new Error("Clipboard API not available"));return}try{let R=(w=d.current)==null?void 0:w.closest('[data-streamdown="table-wrapper"]'),O=R?.querySelector("table");if(!O){r?.(new Error("Table not found"));return}let S=cc(O),$=({csv:uc,tsv:n_,md:hi}[_]||hi)(S),Y=new ClipboardItem({"text/plain":new Blob([$],{type:"text/plain"}),"text/html":new Blob([O.outerHTML],{type:"text/html"})});await navigator.clipboard.write([Y]),u(!0),l(!1),n?.(_),h.current=window.setTimeout(()=>u(!1),i)}catch(R){r?.(R)}};(0,k.useEffect)(()=>{let _=C=>{let w=C.composedPath();d.current&&!w.includes(d.current)&&l(!1)};return document.addEventListener("mousedown",_),()=>{document.removeEventListener("mousedown",_),window.clearTimeout(h.current)}},[]);let N=Ve(),y=o?N.CheckIcon:N.CopyIcon;return(0,m.jsxs)("div",{className:a("relative"),ref:d,children:[(0,m.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:f,onClick:()=>l(!s),title:p.copyTable,type:"button",children:e??(0,m.jsx)(y,{height:14,width:14})}),s?(0,m.jsxs)("div",{className:a("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[(0,m.jsx)("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>E("md"),title:p.copyTableAsMarkdown,type:"button",children:p.tableFormatMarkdown}),(0,m.jsx)("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>E("csv"),title:p.copyTableAsCsv,type:"button",children:p.tableFormatCsv}),(0,m.jsx)("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>E("tsv"),title:p.copyTableAsTsv,type:"button",children:p.tableFormatTsv})]}):null]})},dc=({children:e,className:t,onDownload:n,onError:r})=>{let i=te(),[a,s]=(0,k.useState)(!1),l=(0,k.useRef)(null),{isAnimating:o}=(0,k.useContext)(Fe),u=at(),d=Ve(),h=f=>{var p;try{let E=(p=l.current)==null?void 0:p.closest('[data-streamdown="table-wrapper"]'),N=E?.querySelector("table");if(!N){r?.(new Error("Table not found"));return}let y=cc(N),_=f==="csv"?uc(y):hi(y);Ft(`table.${f==="csv"?"csv":"md"}`,_,f==="csv"?"text/csv":"text/markdown"),s(!1),n?.(f)}catch(E){r?.(E)}};return(0,k.useEffect)(()=>{let f=p=>{let E=p.composedPath();l.current&&!E.includes(l.current)&&s(!1)};return document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f)}},[]),(0,m.jsxs)("div",{className:i("relative"),ref:l,children:[(0,m.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:o,onClick:()=>s(!a),title:u.downloadTable,type:"button",children:e??(0,m.jsx)(d.DownloadIcon,{size:14})}),a?(0,m.jsxs)("div",{className:i("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[(0,m.jsx)("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>h("csv"),title:u.downloadTableAsCsv,type:"button",children:u.tableFormatCsv}),(0,m.jsx)("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>h("markdown"),title:u.downloadTableAsMarkdown,type:"button",children:u.tableFormatMarkdown})]}):null]})},r_=({children:e,className:t,showCopy:n=!0,showDownload:r=!0})=>{let{Maximize2Icon:i,XIcon:a}=Ve(),s=te(),[l,o]=(0,k.useState)(!1),{isAnimating:u}=(0,k.useContext)(Fe),d=at(),h=()=>{o(!0)},f=()=>{o(!1)};return(0,k.useEffect)(()=>{if(l){Yi();let p=E=>{E.key==="Escape"&&o(!1)};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p),qi()}}},[l]),(0,m.jsxs)(m.Fragment,{children:[(0,m.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:u,onClick:h,title:d.viewFullscreen,type:"button",children:(0,m.jsx)(i,{size:14})}),l?(0,Wl.createPortal)((0,m.jsx)("div",{"aria-label":d.viewFullscreen,"aria-modal":"true",className:s("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:f,onKeyDown:p=>{p.key==="Escape"&&f()},role:"dialog",children:(0,m.jsxs)("div",{className:s("flex h-full flex-col"),onClick:p=>p.stopPropagation(),onKeyDown:p=>p.stopPropagation(),role:"presentation",children:[(0,m.jsxs)("div",{className:s("flex items-center justify-end gap-1 p-4"),children:[n?(0,m.jsx)(hc,{}):null,r?(0,m.jsx)(dc,{}):null,(0,m.jsx)("button",{className:s("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:f,title:d.exitFullscreen,type:"button",children:(0,m.jsx)(a,{size:20})})]}),(0,m.jsx)("div",{className:s("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:(0,m.jsx)("table",{className:s("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),document.body):null]})},i_=({children:e,className:t,showControls:n,showCopy:r=!0,showDownload:i=!0,showFullscreen:a=!0,...s})=>{let l=te(),o=n&&r,u=n&&i,d=n&&a,h=o||u||d;return(0,m.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:[h?(0,m.jsxs)("div",{className:l("flex items-center justify-end gap-1"),children:[o?(0,m.jsx)(hc,{}):null,u?(0,m.jsx)(dc,{}):null,d?(0,m.jsx)(r_,{showCopy:o,showDownload:u,children:e}):null]}):null,(0,m.jsx)("div",{className:l("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),children:(0,m.jsx)("table",{className:l("w-full divide-y divide-border",t),"data-streamdown":"table",...s,children:e})})]})},a_=/startLine=(\d+)/,s_=/\bnoLineNumbers\b/,o_=(0,k.lazy)(()=>$s(()=>import("./mermaid-GHXKKRXX-D35eppUc.js").then(e=>({default:e.Mermaid})),[])),l_=/language-([^\s]+)/;function gr(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 n=e.position.start,r=t.position.start,i=e.position.end,a=t.position.end;return n?.line===r?.line&&n?.column===r?.column&&i?.line===a?.line&&i?.column===a?.column}function ge(e,t){return e.className===t.className&&gr(e.node,t.node)}var di=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,Hr=(e,t)=>{if(typeof e=="boolean")return e;let n=e.table;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},bs=(e,t)=>{if(typeof e=="boolean")return e;let n=e.code;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},Un=(e,t)=>{if(typeof e=="boolean")return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},Gi=(0,k.memo)(({children:e,className:t,node:n,...r})=>{let i=te();return(0,m.jsx)("ol",{className:i("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e})},(e,t)=>ge(e,t));Gi.displayName="MarkdownOl";var fc=(0,k.memo)(({children:e,className:t,node:n,...r})=>{let i=te();return(0,m.jsx)("li",{className:i("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e})},(e,t)=>e.className===t.className&&gr(e.node,t.node));fc.displayName="MarkdownLi";var pc=(0,k.memo)(({children:e,className:t,node:n,...r})=>{let i=te();return(0,m.jsx)("ul",{className:i("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e})},(e,t)=>ge(e,t));pc.displayName="MarkdownUl";var mc=(0,k.memo)(({className:e,node:t,...n})=>{let r=te();return(0,m.jsx)("hr",{className:r("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n})},(e,t)=>ge(e,t));mc.displayName="MarkdownHr";var gc=(0,k.memo)(({children:e,className:t,node:n,...r})=>{let i=te();return(0,m.jsx)("span",{className:i("font-semibold",t),"data-streamdown":"strong",...r,children:e})},(e,t)=>ge(e,t));gc.displayName="MarkdownStrong";var c_=({children:e,className:t,href:n,node:r,...i})=>{let a=te(),{linkSafety:s}=(0,k.useContext)(Fe),[l,o]=(0,k.useState)(!1),u=n==="streamdown:incomplete-link",d=(0,k.useCallback)(async E=>{if(!(!(s!=null&&s.enabled&&n)||u)){if(E.preventDefault(),s.onLinkCheck&&await s.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}o(!0)}},[s,n,u]),h=(0,k.useCallback)(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),f=(0,k.useCallback)(()=>{o(!1)},[]),p={url:n??"",isOpen:l,onClose:f,onConfirm:h};return s!=null&&s.enabled&&n?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("button",{className:a("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":u,"data-streamdown":"link",onClick:d,type:"button",children:e}),s.renderModal?s.renderModal(p):(0,m.jsx)(XA,{...p})]}):(0,m.jsx)("a",{className:a("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":u,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...i,children:e})},Ec=(0,k.memo)(c_,(e,t)=>ge(e,t)&&e.href===t.href);Ec.displayName="MarkdownA";var Tc=(0,k.memo)(({children:e,className:t,node:n,...r})=>{let i=te();return(0,m.jsx)("h1",{className:i("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e})},(e,t)=>ge(e,t));Tc.displayName="MarkdownH1";var bc=(0,k.memo)(({children:e,className:t,node:n,...r})=>{let i=te();return(0,m.jsx)("h2",{className:i("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e})},(e,t)=>ge(e,t));bc.displayName="MarkdownH2";var kc=(0,k.memo)(({children:e,className:t,node:n,...r})=>{let i=te();return(0,m.jsx)("h3",{className:i("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e})},(e,t)=>ge(e,t));kc.displayName="MarkdownH3";var Ac=(0,k.memo)(({children:e,className:t,node:n,...r})=>{let i=te();return(0,m.jsx)("h4",{className:i("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e})},(e,t)=>ge(e,t));Ac.displayName="MarkdownH4";var _c=(0,k.memo)(({children:e,className:t,node:n,...r})=>{let i=te();return(0,m.jsx)("h5",{className:i("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e})},(e,t)=>ge(e,t));_c.displayName="MarkdownH5";var xc=(0,k.memo)(({children:e,className:t,node:n,...r})=>{let i=te();return(0,m.jsx)("h6",{className:i("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e})},(e,t)=>ge(e,t));xc.displayName="MarkdownH6";var yc=(0,k.memo)(({children:e,className:t,node:n,...r})=>{let{controls:i}=(0,k.useContext)(Fe),a=di(i,"table"),s=Hr(i,"copy"),l=Hr(i,"download"),o=Hr(i,"fullscreen");return(0,m.jsx)(i_,{className:t,showControls:a,showCopy:s,showDownload:l,showFullscreen:o,...r,children:e})},(e,t)=>ge(e,t));yc.displayName="MarkdownTable";var Cc=(0,k.memo)(({children:e,className:t,node:n,...r})=>{let i=te();return(0,m.jsx)("thead",{className:i("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e})},(e,t)=>ge(e,t));Cc.displayName="MarkdownThead";var Sc=(0,k.memo)(({children:e,className:t,node:n,...r})=>{let i=te();return(0,m.jsx)("tbody",{className:i("divide-y divide-border",t),"data-streamdown":"table-body",...r,children:e})},(e,t)=>ge(e,t));Sc.displayName="MarkdownTbody";var Nc=(0,k.memo)(({children:e,className:t,node:n,...r})=>{let i=te();return(0,m.jsx)("tr",{className:i("border-border",t),"data-streamdown":"table-row",...r,children:e})},(e,t)=>ge(e,t));Nc.displayName="MarkdownTr";var Ic=(0,k.memo)(({children:e,className:t,node:n,...r})=>{let i=te();return(0,m.jsx)("th",{className:i("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e})},(e,t)=>ge(e,t));Ic.displayName="MarkdownTh";var vc=(0,k.memo)(({children:e,className:t,node:n,...r})=>{let i=te();return(0,m.jsx)("td",{className:i("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e})},(e,t)=>ge(e,t));vc.displayName="MarkdownTd";var wc=(0,k.memo)(({children:e,className:t,node:n,...r})=>{let i=te();return(0,m.jsx)("blockquote",{className:i("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e})},(e,t)=>ge(e,t));wc.displayName="MarkdownBlockquote";var Lc=(0,k.memo)(({children:e,className:t,node:n,...r})=>{let i=te();return(0,m.jsx)("sup",{className:i("text-sm",t),"data-streamdown":"superscript",...r,children:e})},(e,t)=>ge(e,t));Lc.displayName="MarkdownSup";var Rc=(0,k.memo)(({children:e,className:t,node:n,...r})=>{let i=te();return(0,m.jsx)("sub",{className:i("text-sm",t),"data-streamdown":"subscript",...r,children:e})},(e,t)=>ge(e,t));Rc.displayName="MarkdownSub";var Oc=(0,k.memo)(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=s=>{var l,o;if(!(0,k.isValidElement)(s))return!1;let u=Array.isArray(s.props.children)?s.props.children:[s.props.children],d=!1,h=!1;for(let f of u)if(f){if(typeof f=="string")f.trim()!==""&&(d=!0);else if((0,k.isValidElement)(f))if(((l=f.props)==null?void 0:l["data-footnote-backref"])!==void 0)h=!0;else{let p=Array.isArray(f.props.children)?f.props.children:[f.props.children];for(let E of p){if(typeof E=="string"&&E.trim()!==""){d=!0;break}if((0,k.isValidElement)(E)&&((o=E.props)==null?void 0:o["data-footnote-backref"])===void 0){d=!0;break}}}}return h&&!d},a=Array.isArray(e)?e.map(s=>{if(!(0,k.isValidElement)(s))return s;if(s.type===Gi){let l=(Array.isArray(s.props.children)?s.props.children:[s.props.children]).filter(o=>!i(o));return l.length===0?null:{...s,props:{...s.props,children:l}}}return s}):e;return(Array.isArray(a)?a.some(s=>s!==null):a!==null)?(0,m.jsx)("section",{className:t,...r,children:a}):null}return(0,m.jsx)("section",{className:t,...r,children:e})},(e,t)=>ge(e,t));Oc.displayName="MarkdownSection";var u_=({node:e,className:t,children:n,...r})=>{var i,a;let s=te(),l=!("data-block"in r),{mermaid:o,controls:u,lineNumbers:d}=(0,k.useContext)(Fe),h=Wi(),f=SA(),p=t?.match(l_),E=(i=p?.at(1))!=null?i:"",N=ZA(E);if(l)return(0,m.jsx)("code",{className:s("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let y=(a=e?.properties)==null?void 0:a.metastring,_=y?.match(a_),C=_?Number.parseInt(_[1],10):void 0,w=C!==void 0&&C>=1?C:void 0,R=!(y&&s_.test(y))&&d!==!1,O="";if((0,k.isValidElement)(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?O=n.props.children:typeof n=="string"&&(O=n),N){let W=N.component;return(0,m.jsx)(k.Suspense,{fallback:(0,m.jsx)(Ts,{}),children:(0,m.jsx)(W,{code:O,isIncomplete:f,language:E,meta:y})})}if(E==="mermaid"&&h){let W=di(u,"mermaid"),I=Un(u,"download"),U=Un(u,"copy"),z=Un(u,"fullscreen"),q=Un(u,"panZoom"),J=W&&(I||U||z);return(0,m.jsx)(k.Suspense,{fallback:(0,m.jsx)(Ts,{}),children:(0,m.jsxs)("div",{className:s("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:[(0,m.jsx)("div",{className:s("flex h-8 items-center text-muted-foreground text-xs"),children:(0,m.jsx)("span",{className:s("ml-1 font-mono lowercase"),children:"mermaid"})}),J?(0,m.jsx)("div",{className:s("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:(0,m.jsxs)("div",{className:s("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:[I?(0,m.jsx)(e_,{chart:O,config:o?.config}):null,U?(0,m.jsx)(gs,{code:O}):null,z?(0,m.jsx)(t_,{chart:O,config:o?.config}):null]})}):null,(0,m.jsx)("div",{className:s("rounded-md border border-border bg-background"),children:(0,m.jsx)(o_,{chart:O,config:o?.config,showControls:q})})]})})}let S=di(u,"code"),$=bs(u,"download"),Y=bs(u,"copy");return(0,m.jsx)(MA,{className:t,code:O,isIncomplete:f,language:E,lineNumbers:R,startLine:w,children:S?(0,m.jsxs)(m.Fragment,{children:[$?(0,m.jsx)(GA,{code:O,language:E}):null,Y?(0,m.jsx)(gs,{}):null]}):null})},Dc=(0,k.memo)(u_,(e,t)=>e.className===t.className&&gr(e.node,t.node));Dc.displayName="MarkdownCode";var Pc=(0,k.memo)(KA,(e,t)=>e.className===t.className&&gr(e.node,t.node));Pc.displayName="MarkdownImg";var Mc=(0,k.memo)(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(i=>i!=null&&i!=="");if(r.length===1&&(0,k.isValidElement)(r[0])){let i=r[0].props.node,a=i?.tagName;if(a==="img")return(0,m.jsx)(m.Fragment,{children:e});if(a==="code"&&"data-block"in r[0].props)return(0,m.jsx)(m.Fragment,{children:e})}return(0,m.jsx)("p",{...n,children:e})},(e,t)=>ge(e,t));Mc.displayName="MarkdownParagraph";var h_={ol:Gi,li:fc,ul:pc,hr:mc,strong:gc,a:Ec,h1:Tc,h2:bc,h3:kc,h4:Ac,h5:_c,h6:xc,table:yc,thead:Cc,tbody:Sc,tr:Nc,th:Ic,td:vc,blockquote:wc,code:Dc,img:Pc,pre:({children:e})=>(0,k.isValidElement)(e)?(0,k.cloneElement)(e,{"data-block":"true"}):e,sup:Lc,sub:Rc,p:Mc,section:Oc},d_=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,f_=/\p{L}/u;function ks(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 n of t){if(d_.test(n))return"rtl";if(f_.test(n))return"ltr"}return"ltr"}var p_=/^[ \t]{0,3}(`{3,}|~{3,})/,m_=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,As=e=>{let t=e.split(`
|
|
120
|
-
`),n=null,r=0;for(let i of t){let a=p_.exec(i);if(n===null){if(a){let s=a[1];n=s[0],r=s.length}}else if(a){let s=a[1],l=s[0],o=s.length;l===n&&o>=r&&(n=null,r=0)}}return n!==null},g_=e=>{let t=e.split(`
|
|
121
|
-
`);for(let n of t){let r=n.trim();if(r.length>0&&r.includes("|")&&m_.test(r))return!0}return!1},E_=()=>e=>{Xe(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},_s=[],xs={allowDangerousHtml:!0},jn=new WeakMap,T_=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 n=e.rehypePlugins,r=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(n||r||i)){let o="default";return this.keyCache.set(e,o),o}let a=o=>{if(!o||o.length===0)return"";let u="";for(let d=0;d<o.length;d+=1){let h=o[d];if(d>0&&(u+=","),Array.isArray(h)){let[f,p]=h;if(typeof f=="function"){let E=jn.get(f);E||(E=f.name,jn.set(f,E)),u+=E}else u+=String(f);u+=":",u+=JSON.stringify(p)}else if(typeof h=="function"){let f=jn.get(h);f||(f=h.name,jn.set(h,f)),u+=f}else u+=String(h)}return u},s=a(n),l=`${a(r)}::${s}::${i?JSON.stringify(i):""}`;return this.keyCache.set(e,l),l}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let r=this.cache.keys().next().value;r&&this.cache.delete(r)}this.cache.set(n,t)}clear(){this.cache.clear()}},ys=new T_,Bc=e=>{let t=b_(e),n=e.children||"";return S_(t.runSync(t.parse(n),n),e)},b_=e=>{let t=ys.get(e);if(t)return t;let n=A_(e);return ys.set(e,n),n},k_=e=>e.some(t=>Array.isArray(t)?t[0]===Kr:t===Kr),A_=e=>{let t=e.rehypePlugins||_s,n=e.remarkPlugins||_s,r=k_(t)?n:[...n,E_],i=e.remarkRehypeOptions?{...xs,...e.remarkRehypeOptions}:xs;return y0().use(xk).use(r).use(a0,i).use(t)},__=e=>e,x_=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},y_=(e,t)=>{var n;for(let r in wr)if(Object.hasOwn(wr,r)&&Object.hasOwn(e.properties,r)){let i=e.properties[r],a=wr[r];(a===null||a.includes(e.tagName))&&(e.properties[r]=(n=t(String(i||""),r,e))!=null?n:void 0)}},C_=(e,t,n,r,i,a)=>{let s=!1;return r?s=!r.includes(e.tagName):i&&(s=i.includes(e.tagName)),!s&&a&&typeof t=="number"&&(s=!a(e,t,n)),s},S_=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:a,unwrapDisallowed:s,urlTransform:l}=t;if(n||r||i||a||l){let o=l||__;Xe(e,(u,d,h)=>{if(u.type==="raw"&&h&&typeof d=="number")return x_(h,d,a,u.value),d;if(u.type==="element"&&(y_(u,o),C_(u,d,h,r,i,n)&&h&&typeof d=="number"))return s&&u.children?h.children.splice(d,1,...u.children):h.children.splice(d,1),d})}return Lb(e,{Fragment:m.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:m.jsx,jsxs:m.jsxs,passKeys:!0,passNode:!0})},N_=/\[\^[\w-]{1,200}\](?!:)/,I_=/\[\^[\w-]{1,200}\]:/,v_=/<(\w+)[\s>]/,w_=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Cs=new Map,Ss=new Map,L_=e=>{let t=e.toLowerCase(),n=Cs.get(t);if(n)return n;let r=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return Cs.set(t,r),r},R_=e=>{let t=e.toLowerCase(),n=Ss.get(t);if(n)return n;let r=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return Ss.set(t,r),r},Ns=(e,t)=>{if(w_.has(t.toLowerCase()))return 0;let n=e.match(L_(t));if(!n)return 0;let r=0;for(let i of n)i.trimEnd().endsWith("/>")||(r+=1);return r},Is=(e,t)=>{let n=e.match(R_(t));return n?n.length:0},O_=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},D_=e=>{let t=N_.test(e),n=I_.test(e);if(t||n)return[e];let r=ze.lex(e,{gfm:!0}),i=[],a=[],s=!1;for(let l of r){let o=l.raw,u=i.length;if(a.length>0){i[u-1]+=o;let d=a.at(-1),h=Ns(o,d),f=Is(o,d);for(let p=0;p<h;p+=1)a.push(d);for(let p=0;p<f;p+=1)a.length>0&&a.at(-1)===d&&a.pop();continue}if(l.type==="html"&&l.block){let d=o.match(v_);if(d){let h=d[1];Ns(o,h)>Is(o,h)&&a.push(h)}}if(u>0&&!s){let d=i[u-1];if(O_(d)%2===1){i[u-1]=d+o;continue}}i.push(o),l.type!=="space"&&(s=l.type==="code")}return i},P_=(e,t)=>{if(!t.length)return e;let n=e;for(let r of t){let i=new RegExp(`(<${r}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${r}\\s*>)`,"gi");n=n.replace(i,(a,s,l,o)=>{if(!l.includes(`
|
|
122
|
-
|
|
123
|
-
`))return s+l+o;let u=l.replace(/\n\n/g,`
|
|
124
|
-
<!---->
|
|
125
|
-
`);return`${s}${(u.startsWith(`
|
|
126
|
-
`)?"":`
|
|
127
|
-
`)+u+(u.endsWith(`
|
|
128
|
-
`)?"":`
|
|
129
|
-
`)}${o}
|
|
130
|
-
|
|
131
|
-
`})}return n},M_=/([\\`*_~[\]|])/g,B_=e=>e.replace(M_,"\\$1"),F_=(e,t)=>{if(!t.length)return e;let n=e;for(let r of t){let i=new RegExp(`(<${r}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${r}\\s*>)`,"gi");n=n.replace(i,(a,s,l,o)=>s+B_(l).replace(/\n\n/g," ")+o)}return n},Fc=e=>e.type==="text"?e.value:"children"in e&&Array.isArray(e.children)?e.children.map(Fc).join(""):"",H_=e=>t=>{if(!e||e.length===0)return;let n=new Set(e.map(r=>r.toLowerCase()));Xe(t,"element",r=>{if(n.has(r.tagName.toLowerCase())){let i=Fc(r);r.children=i?[{type:"text",value:i}]:[]}})},U_=()=>e=>{Xe(e,"code",t=>{var n,r;t.meta&&(t.data=(n=t.data)!=null?n:{},t.data.hProperties={...(r=t.data.hProperties)!=null?r:{},metastring:t.meta})})},j_=/^[ \t]*<[\w!/?-]/,z_=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,$_=e=>typeof e!="string"||e.length===0||!j_.test(e)?e:e.replace(z_,"$1"),vs,ws,Ls,Rs,qn={...kt,protocols:{...kt.protocols,href:[...(ws=(vs=kt.protocols)==null?void 0:vs.href)!=null?ws:[],"tel"]},attributes:{...kt.attributes,code:[...(Rs=(Ls=kt.attributes)==null?void 0:Ls.code)!=null?Rs:[],"metastring"]}},fi={raw:Kr,sanitize:[Wo,qn],harden:[Uu,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},Y_={gfm:[aT,{}],codeMeta:U_},Os=Object.values(fi),q_=Object.values(Y_),V_={block:" ▋",circle:" ●"},Hc=["github-light","github-dark"],Uc={enabled:!0},Fe=(0,k.createContext)({shikiTheme:Hc,controls:!0,isAnimating:!1,lineNumbers:!0,mode:"streaming",mermaid:void 0,linkSafety:Uc}),jc=(0,k.memo)(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:r,isIncomplete:i,dir:a,animatePlugin:s,...l})=>{if(s){let d=s.getLastRenderCharCount();s.setPrevContentLength(d)}let o=typeof e=="string"&&n?$_(e):e,u=(0,m.jsx)(Bc,{...l,children:o});return(0,m.jsx)(ic.Provider,{value:i,children:a?(0,m.jsx)("div",{dir:a,style:{display:"contents"},children:u}):u})},(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 n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(i=>{var a,s;return((a=e.components)==null?void 0:a[i])!==((s=t.components)==null?void 0:s[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});jc.displayName="Block";var Qi=(0,k.memo)(({children:e,mode:t="streaming",dir:n,parseIncompleteMarkdown:r=!0,normalizeHtmlIndentation:i=!1,components:a,rehypePlugins:s=Os,remarkPlugins:l=q_,className:o,shikiTheme:u=Hc,mermaid:d,controls:h=!0,isAnimating:f=!1,animated:p,BlockComponent:E=jc,parseMarkdownIntoBlocksFn:N=D_,caret:y,plugins:_,remend:C,linkSafety:w=Uc,lineNumbers:R=!0,allowedTags:O,literalTagContent:S,translations:$,icons:Y,prefix:W,onAnimationStart:I,onAnimationEnd:U,...z})=>{let q=(0,k.useId)(),[J,Q]=(0,k.useTransition)(),H=(0,k.useMemo)(()=>IA(W),[W]),P=(0,k.useRef)(null),V=(0,k.useRef)(I),X=(0,k.useRef)(U);V.current=I,X.current=U,(0,k.useEffect)(()=>{var re,ce,ve;if(t==="static")return;let We=P.current;if(P.current=f,We===null){f&&((re=V.current)==null||re.call(V));return}f&&!We?(ce=V.current)==null||ce.call(V):!f&&We&&((ve=X.current)==null||ve.call(X))},[f,t]);let A=(0,k.useMemo)(()=>O?Object.keys(O):[],[O]),oe=(0,k.useMemo)(()=>{if(typeof e!="string")return"";let re=t==="streaming"&&r?gb(e,C):e;return S&&S.length>0&&(re=F_(re,S)),A.length>0&&(re=P_(re,A)),re},[e,t,r,C,A,S]),fe=(0,k.useMemo)(()=>N(oe),[oe,N]),[x,Oe]=(0,k.useState)(fe);(0,k.useEffect)(()=>{t==="streaming"&&!He?Q(()=>{Oe(fe)}):Oe(fe)},[fe,t]);let Ee=t==="streaming"?x:fe,pe=(0,k.useMemo)(()=>n==="auto"?Ee.map(ks):void 0,[Ee,n]),gt=(0,k.useMemo)(()=>Ee.map((re,ce)=>`${q}-${ce}`),[Ee.length,q]),De=(0,k.useMemo)(()=>p===!0?"true":p?JSON.stringify(p):"",[p]),He=(0,k.useMemo)(()=>De?De==="true"?oi():oi(p):null,[De]),et=(0,k.useMemo)(()=>{var re,ce;return{shikiTheme:(ce=(re=_?.code)==null?void 0:re.getThemes())!=null?ce:u,controls:h,isAnimating:f,lineNumbers:R,mode:t,mermaid:d,linkSafety:w}},[u,h,f,R,t,d,w,_?.code]),vn=(0,k.useMemo)(()=>$?JSON.stringify($):"",[$]),wn=(0,k.useMemo)(()=>({...lc,...$}),[vn]),Ln=(0,k.useMemo)(()=>{let{inlineCode:re,...ce}=a??{},ve={...h_,...ce};if(re){let We=ve.code;ve.code=Et=>"data-block"in Et?We?(0,k.createElement)(We,Et):null:(0,k.createElement)(re,Et)}return ve},[a]),Rn=(0,k.useMemo)(()=>{let re=[];return _!=null&&_.cjk&&(re=[...re,..._.cjk.remarkPluginsBefore]),re=[...re,...l],_!=null&&_.cjk&&(re=[...re,..._.cjk.remarkPluginsAfter]),_!=null&&_.math&&(re=[...re,_.math.remarkPlugin]),re},[l,_?.math,_?.cjk]),Gt=(0,k.useMemo)(()=>{var re;let ce=s;if(O&&Object.keys(O).length>0&&s===Os){let ve={...qn,tagNames:[...(re=qn.tagNames)!=null?re:[],...Object.keys(O)],attributes:{...qn.attributes,...O}};ce=[fi.raw,[Wo,ve],fi.harden]}return S&&S.length>0&&(ce=[...ce,[H_,S]]),_!=null&&_.math&&(ce=[...ce,_.math.rehypePlugin]),He&&f&&(ce=[...ce,He.rehypePlugin]),ce},[s,_?.math,He,f,O,S]),Lt=(0,k.useMemo)(()=>{if(!f||Ee.length===0)return!1;let re=Ee.at(-1);return As(re)||g_(re)},[f,Ee]),On=(0,k.useMemo)(()=>y&&f&&!Lt?{"--streamdown-caret":`"${V_[y]}"`}:void 0,[y,f,Lt]);return t==="static"?(0,m.jsx)(ci.Provider,{value:wn,children:(0,m.jsx)(ui.Provider,{value:_??null,children:(0,m.jsx)(Fe.Provider,{value:et,children:(0,m.jsx)(ms,{icons:Y,children:(0,m.jsx)(li.Provider,{value:H,children:(0,m.jsx)("div",{className:H("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",o),dir:n==="auto"?ks(oe):n,children:(0,m.jsx)(Bc,{components:Ln,rehypePlugins:Gt,remarkPlugins:Rn,...z,children:oe})})})})})})}):(0,m.jsx)(ci.Provider,{value:wn,children:(0,m.jsx)(ui.Provider,{value:_??null,children:(0,m.jsx)(Fe.Provider,{value:et,children:(0,m.jsx)(ms,{icons:Y,children:(0,m.jsx)(li.Provider,{value:H,children:(0,m.jsxs)("div",{className:H("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",y&&!Lt?"[&>*:last-child]:after:inline [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)]":null,o),style:On,children:[Ee.length===0&&y&&f&&(0,m.jsx)("span",{}),Ee.map((re,ce)=>{var ve;let We=ce===Ee.length-1,Et=f&&We&&As(re);return(0,m.jsx)(E,{animatePlugin:He,components:Ln,content:re,dir:(ve=pe?.[ce])!=null?ve:n!=="auto"?n:void 0,index:ce,isIncomplete:Et,rehypePlugins:Gt,remarkPlugins:Rn,shouldNormalizeHtmlIndentation:i,shouldParseIncompleteMarkdown:r,...z},gt[ce])})]})})})})})})},(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.lineNumbers===t.lineNumbers&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir);Qi.displayName="Streamdown";var W_=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:a=!0,initialZoom:s=1,fullscreen:l=!1})=>{let{RotateCcwIcon:o,ZoomInIcon:u,ZoomOutIcon:d}=Ve(),h=te(),f=(0,k.useRef)(null),p=(0,k.useRef)(null),[E,N]=(0,k.useState)(s),[y,_]=(0,k.useState)({x:0,y:0}),[C,w]=(0,k.useState)(!1),[R,O]=(0,k.useState)({x:0,y:0}),[S,$]=(0,k.useState)({x:0,y:0}),Y=(0,k.useCallback)(H=>{N(P=>Math.max(n,Math.min(r,P+H)))},[n,r]),W=(0,k.useCallback)(()=>{Y(i)},[Y,i]),I=(0,k.useCallback)(()=>{Y(-i)},[Y,i]),U=(0,k.useCallback)(()=>{N(s),_({x:0,y:0})},[s]),z=(0,k.useCallback)(H=>{H.preventDefault();let P=H.deltaY>0?-i:i;Y(P)},[Y,i]),q=(0,k.useCallback)(H=>{if(H.button!==0||H.isPrimary===!1)return;w(!0),O({x:H.clientX,y:H.clientY}),$(y);let P=H.currentTarget;P instanceof HTMLElement&&P.setPointerCapture(H.pointerId)},[y]),J=(0,k.useCallback)(H=>{if(!C)return;H.preventDefault();let P=H.clientX-R.x,V=H.clientY-R.y;_({x:S.x+P,y:S.y+V})},[C,R,S]),Q=(0,k.useCallback)(H=>{w(!1);let P=H.currentTarget;P instanceof HTMLElement&&P.releasePointerCapture(H.pointerId)},[]);return(0,k.useEffect)(()=>{let H=f.current;if(H)return H.addEventListener("wheel",z,{passive:!1}),()=>{H.removeEventListener("wheel",z)}},[z]),(0,k.useEffect)(()=>{let H=p.current;if(H&&C)return document.body.style.userSelect="none",H.addEventListener("pointermove",J,{passive:!1}),H.addEventListener("pointerup",Q),H.addEventListener("pointercancel",Q),()=>{document.body.style.userSelect="",H.removeEventListener("pointermove",J),H.removeEventListener("pointerup",Q),H.removeEventListener("pointercancel",Q)}},[C,J,Q]),(0,m.jsxs)("div",{className:h("relative flex flex-col",l?"h-full w-full":"min-h-28 w-full",t),ref:f,style:{cursor:C?"grabbing":"grab"},children:[a?(0,m.jsxs)("div",{className:h("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:[(0,m.jsx)("button",{className:h("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:E>=r,onClick:W,title:"Zoom in",type:"button",children:(0,m.jsx)(u,{size:16})}),(0,m.jsx)("button",{className:h("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:E<=n,onClick:I,title:"Zoom out",type:"button",children:(0,m.jsx)(d,{size:16})}),(0,m.jsx)("button",{className:h("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"),onClick:U,title:"Reset zoom and pan",type:"button",children:(0,m.jsx)(o,{size:16})})]}):null,(0,m.jsx)("div",{className:h("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:q,ref:p,role:"application",style:{transform:`translate(${y.x}px, ${y.y}px) scale(${E})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},G_=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let a=te(),[s,l]=(0,k.useState)(null),[o,u]=(0,k.useState)(!1),[d,h]=(0,k.useState)(""),[f,p]=(0,k.useState)(""),[E,N]=(0,k.useState)(0),{mermaid:y}=(0,k.useContext)(Fe),_=Wi(),C=y?.errorComponent,{shouldRender:w,containerRef:R}=gA({immediate:r});if((0,k.useEffect)(()=>{if(w){if(!_){l("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{l(null),u(!0);let S=_.getMermaid(n),$=e.split("").reduce((I,U)=>(I<<5)-I+U.charCodeAt(0)|0,0),Y=`mermaid-${Math.abs($)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:W}=await S.render(Y,e);h(W),p(W)}catch(S){if(!(f||d)){let $=S instanceof Error?S.message:"Failed to render Mermaid chart";l($)}}finally{u(!1)}})()}},[e,n,E,w,_]),!(w||d||f))return(0,m.jsx)("div",{className:a("my-4 min-h-[200px]",t),ref:R});if(o&&!d&&!f)return(0,m.jsx)("div",{className:a("my-4 flex justify-center p-4",t),ref:R,children:(0,m.jsxs)("div",{className:a("flex items-center space-x-2 text-muted-foreground"),children:[(0,m.jsx)("div",{className:a("h-4 w-4 animate-spin rounded-full border-current border-b-2")}),(0,m.jsx)("span",{className:a("text-sm"),children:"Loading diagram..."})]})});if(s&&!d&&!f){let S=()=>N($=>$+1);return C?(0,m.jsx)("div",{ref:R,children:(0,m.jsx)(C,{chart:e,error:s,retry:S})}):(0,m.jsxs)("div",{className:a("rounded-md bg-red-50 p-4",t),ref:R,children:[(0,m.jsxs)("p",{className:a("font-mono text-red-700 text-sm"),children:["Mermaid Error: ",s]}),(0,m.jsxs)("details",{className:a("mt-2"),children:[(0,m.jsx)("summary",{className:a("cursor-pointer text-red-600 text-xs"),children:"Show Code"}),(0,m.jsx)("pre",{className:a("mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs"),children:e})]})]})}let O=d||f;return(0,m.jsx)("div",{className:a("size-full",t),"data-streamdown":"mermaid",ref:R,children:(0,m.jsx)(W_,{className:a(r?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:(0,m.jsx)("div",{"aria-label":"Mermaid chart",className:a("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:O},role:"img"})})})},Q_={damping:.7,stiffness:.05,mass:1.25},K_=70,X_=1e3/60,Z_=350,Er=!1;globalThis.document?.addEventListener("mousedown",()=>{Er=!0});globalThis.document?.addEventListener("mouseup",()=>{Er=!1});globalThis.document?.addEventListener("click",()=>{Er=!1});var J_=(e={})=>{const[t,n]=(0,k.useState)(!1),[r,i]=(0,k.useState)(e.initial!==!1),[a,s]=(0,k.useState)(!1),l=(0,k.useRef)(null);l.current=e;const o=(0,k.useCallback)(()=>{if(!Er)return!1;const C=window.getSelection();if(!C||!C.rangeCount)return!1;const w=C.getRangeAt(0);return w.commonAncestorContainer.contains(y.current)||y.current?.contains(w.commonAncestorContainer)},[]),u=(0,k.useCallback)(C=>{h.isAtBottom=C,i(C)},[]),d=(0,k.useCallback)(C=>{h.escapedFromLock=C,n(C)},[]),h=(0,k.useMemo)(()=>{let C;return{escapedFromLock:t,isAtBottom:r,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return y.current?.scrollTop??0},set scrollTop(w){if(y.current){const{scrollBehavior:R}=getComputedStyle(y.current);R!=="auto"&&(y.current.style.scrollBehavior="auto"),y.current.scrollTop=w,h.ignoreScrollToTop=y.current.scrollTop,R!=="auto"&&(y.current.style.scrollBehavior=R)}},get targetScrollTop(){return!y.current||!_.current?0:y.current.scrollHeight-1-y.current.clientHeight},get calculatedTargetScrollTop(){if(!y.current||!_.current)return 0;const{targetScrollTop:w}=this;if(!e.targetScrollTop)return w;if(C?.targetScrollTop===w)return C.calculatedScrollTop;const R=Math.max(Math.min(e.targetScrollTop(w,{scrollElement:y.current,contentElement:_.current}),w),0);return C={targetScrollTop:w,calculatedScrollTop:R},requestAnimationFrame(()=>{C=void 0}),R},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=K_}}},[]),f=(0,k.useCallback)((C={})=>{typeof C=="string"&&(C={animation:C}),C.preserveScrollPosition||u(!0);const w=Date.now()+(Number(C.wait)||0),R=jr(l.current,C.animation),{ignoreEscapes:O=!1}=C;let S,$=h.calculatedTargetScrollTop;C.duration instanceof Promise?C.duration.finally(()=>{S=Date.now()}):S=w+(C.duration??0);const Y=async()=>{const W=new Promise(requestAnimationFrame).then(()=>{if(!h.isAtBottom)return h.animation=void 0,!1;const{scrollTop:I}=h,U=performance.now(),z=(U-(h.lastTick??U))/X_;if(h.animation||(h.animation={behavior:R,promise:W,ignoreEscapes:O}),h.animation.behavior===R&&(h.lastTick=U),o()||w>Date.now())return Y();if(I<Math.min($,h.calculatedTargetScrollTop)){if(h.animation?.behavior===R){if(R==="instant")return h.scrollTop=h.calculatedTargetScrollTop,Y();h.velocity=(R.damping*h.velocity+R.stiffness*h.scrollDifference)/R.mass,h.accumulated+=h.velocity*z,h.scrollTop+=h.accumulated,h.scrollTop!==I&&(h.accumulated=0)}return Y()}return S>Date.now()?($=h.calculatedTargetScrollTop,Y()):(h.animation=void 0,h.scrollTop<h.calculatedTargetScrollTop?f({animation:jr(l.current,l.current.resize),ignoreEscapes:O,duration:Math.max(0,S-Date.now())||void 0}):h.isAtBottom)});return W.then(I=>(requestAnimationFrame(()=>{h.animation||(h.lastTick=void 0,h.velocity=0)}),I))};return C.wait!==!0&&(h.animation=void 0),h.animation?.behavior===R?h.animation.promise:Y()},[u,o,h]),p=(0,k.useCallback)(()=>{d(!0),u(!1)},[d,u]),E=(0,k.useCallback)(({target:C})=>{if(C!==y.current)return;const{scrollTop:w,ignoreScrollToTop:R}=h;let{lastScrollTop:O=w}=h;h.lastScrollTop=w,h.ignoreScrollToTop=void 0,R&&R>w&&(O=R),s(h.isNearBottom),setTimeout(()=>{if(h.resizeDifference||w===R)return;if(o()){d(!0),u(!1);return}const S=w>O,$=w<O;if(h.animation?.ignoreEscapes){h.scrollTop=O;return}$&&(d(!0),u(!1)),S&&d(!1),!h.escapedFromLock&&h.isNearBottom&&u(!0)},1)},[d,u,o,h]),N=(0,k.useCallback)(({target:C,deltaY:w})=>{let R=C;for(;!["scroll","auto"].includes(getComputedStyle(R).overflow);){if(!R.parentElement)return;R=R.parentElement}R===y.current&&w<0&&y.current.scrollHeight>y.current.clientHeight&&!h.animation?.ignoreEscapes&&(d(!0),u(!1))},[d,u,h]),y=Ds(C=>{y.current?.removeEventListener("scroll",E),y.current?.removeEventListener("wheel",N),C?.addEventListener("scroll",E,{passive:!0}),C?.addEventListener("wheel",N,{passive:!0})},[]),_=Ds(C=>{if(h.resizeObserver?.disconnect(),!C)return;let w;h.resizeObserver=new ResizeObserver(([R])=>{const{height:O}=R.contentRect,S=O-(w??O);if(h.resizeDifference=S,h.scrollTop>h.targetScrollTop&&(h.scrollTop=h.targetScrollTop),s(h.isNearBottom),S>=0){const $=jr(l.current,w?l.current.resize:l.current.initial);f({animation:$,wait:!0,preserveScrollPosition:!0,duration:$==="instant"?void 0:Z_})}else h.isNearBottom&&(d(!1),u(!0));w=O,requestAnimationFrame(()=>{setTimeout(()=>{h.resizeDifference===S&&(h.resizeDifference=0)},1)})}),h.resizeObserver?.observe(C)},[]);return{contentRef:_,scrollRef:y,scrollToBottom:f,stopScroll:p,isAtBottom:r||a,isNearBottom:a,escapedFromLock:t,state:h}};function Ds(e,t){const n=(0,k.useCallback)(r=>(n.current=r,e(r)),t);return n}var Ur=new Map;function jr(...e){const t={...Q_};let n=!1;for(const i of e){if(i==="instant"){n=!0;continue}typeof i=="object"&&(n=!1,t.damping=i.damping??t.damping,t.stiffness=i.stiffness??t.stiffness,t.mass=i.mass??t.mass)}const r=JSON.stringify(t);return Ur.has(r)||Ur.set(r,Object.freeze(t)),n?"instant":Ur.get(r)}var zc=(0,k.createContext)(null),ex=typeof window<"u"?k.useLayoutEffect:k.useEffect;function er({instance:e,children:t,resize:n,initial:r,mass:i,damping:a,stiffness:s,targetScrollTop:l,contextRef:o,...u}){const d=(0,k.useRef)(null),h=k.useCallback((O,S)=>(R?.targetScrollTop??l)?.(O,S)??O,[l]),f=J_({mass:i,damping:a,stiffness:s,resize:n,initial:r,targetScrollTop:h}),{scrollRef:p,contentRef:E,scrollToBottom:N,stopScroll:y,isAtBottom:_,escapedFromLock:C,state:w}=e??f,R=(0,k.useMemo)(()=>({scrollToBottom:N,stopScroll:y,scrollRef:p,isAtBottom:_,escapedFromLock:C,contentRef:E,state:w,get targetScrollTop(){return d.current},set targetScrollTop(O){d.current=O}}),[N,_,E,p,y,C,w]);return(0,k.useImperativeHandle)(o,()=>R,[R]),ex(()=>{p.current&&getComputedStyle(p.current).overflow==="visible"&&(p.current.style.overflow="auto")},[]),k.createElement(zc.Provider,{value:R},k.createElement("div",{...u},typeof t=="function"?t(R):t))}(function(e){function t({children:n,scrollClassName:r,...i}){const a=$c();return k.createElement("div",{ref:a.scrollRef,style:{height:"100%",width:"100%",scrollbarGutter:"stable both-edges"},className:r},k.createElement("div",{...i,ref:a.contentRef},typeof n=="function"?n(a):n))}e.Content=t})(er||(er={}));function $c(){const e=(0,k.useContext)(zc);if(!e)throw new Error("use-stick-to-bottom component context must be used within a StickToBottom component");return e}var tx=({className:e,...t})=>(0,m.jsx)(er,{className:me("relative flex-1 overflow-y-hidden",e),initial:"smooth",resize:"smooth",role:"log",...t}),nx=({className:e,...t})=>(0,m.jsx)(er.Content,{className:me("flex flex-col gap-8 p-4",e),...t}),rx=({className:e,...t})=>{const{isAtBottom:n,scrollToBottom:r}=$c(),i=(0,k.useCallback)(()=>{r()},[r]);return!n&&(0,m.jsx)(nr,{className:me("absolute bottom-4 left-[50%] translate-x-[-50%] rounded-full",e),onClick:i,size:"icon",type:"button",variant:"outline",...t,children:(0,m.jsx)(ru,{className:"size-4"})})},Ps=[{variant:"shine",component:({children:e,className:t,...n})=>(0,m.jsx)("span",{...n,className:me("bg-[linear-gradient(110deg,#bfbfbf,35%,#000,50%,#bfbfbf,75%,#bfbfbf)] dark:bg-[linear-gradient(110deg,#404040,35%,#fff,50%,#404040,75%,#404040)]","bg-size-[200%_100%] bg-clip-text text-transparent","animate-shine",t),children:e})}];function ix({variant:e="shine",className:t,...n}){const r=Ps.find(i=>i.variant===e)?.component||Ps[0].component;return(0,m.jsx)(hu,{className:me("font-medium text-sm"),children:(0,m.jsx)(r,{...n,className:t})})}var Ms=({className:e,from:t,...n})=>(0,m.jsx)("div",{className:me("group flex w-full max-w-[95%] flex-col gap-2",t==="user"?"is-user ml-auto justify-end":"is-assistant",e),...n}),Bs=({children:e,className:t,...n})=>(0,m.jsx)("div",{className:me("is-user:dark flex w-fit max-w-full min-w-0 flex-col gap-2 overflow-hidden text-sm","group-[.is-user]:ml-auto group-[.is-user]:rounded-lg group-[.is-user]:bg-secondary group-[.is-user]:px-4 group-[.is-user]:py-3 group-[.is-user]:text-foreground","group-[.is-assistant]:text-foreground",t),...n,children:e}),Yc=(0,k.createContext)(null),ax=()=>{const e=(0,k.use)(Yc);if(!e)throw new Error("MessageBranch components must be used within MessageBranch");return e},Fs=({defaultBranch:e=0,onBranchChange:t,className:n,...r})=>{const[i,a]=(0,k.useState)(e),[s,l]=(0,k.useState)([]),o=f=>{a(f),t?.(f)},u=()=>{const f=i>0?i-1:s.length-1;o(f)},d=()=>{const f=i<s.length-1?i+1:0;o(f)},h={currentBranch:i,totalBranches:s.length,goToPrevious:u,goToNext:d,branches:s,setBranches:l};return(0,m.jsx)(Yc.Provider,{value:h,children:(0,m.jsx)("div",{className:me("grid w-full gap-2 [&>div]:pb-0",n),...r})})},Hs=({children:e,...t})=>{const{currentBranch:n,setBranches:r,branches:i}=ax(),a=Array.isArray(e)?e:[e];return(0,k.useEffect)(()=>{i.length!==a.length&&r(a)},[a,i,r]),a.map((s,l)=>(0,m.jsx)("div",{className:me("grid gap-2 overflow-hidden [&>div]:pb-0",l===n?"block":"hidden"),...t,children:s},s.key))},qc=(0,k.memo)(({className:e,...t})=>(0,m.jsx)(Qi,{className:me("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",e),...t}),(e,t)=>e.children===t.children);qc.displayName="MessageResponse";var sx="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",ox=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=sx[n[e]&63];return t},lx=(0,k.createContext)(null),cx=(0,k.createContext)(null),Vc=()=>(0,k.useContext)(lx),ux=()=>(0,k.useContext)(cx),Wc=(0,k.createContext)(null),hx=()=>{const e=ux(),t=(0,k.use)(Wc),n=e??t;if(!n)throw new Error("usePromptInputAttachments must be used within a PromptInput or PromptInputProvider");return n},dx=({className:e,accept:t,multiple:n,globalDrop:r,syncHiddenInput:i,maxFiles:a,maxFileSize:s,onError:l,onSubmit:o,children:u,...d})=>{const h=Vc(),f=!!h,p=(0,k.useRef)(null),E=(0,k.useRef)(null),[N,y]=(0,k.useState)([]),_=f?h.attachments.files:N,C=(0,k.useRef)(_);C.current=_;const w=(0,k.useCallback)(()=>{p.current?.click()},[]),R=(0,k.useCallback)(P=>!t||t.trim()===""?!0:t.split(",").map(V=>V.trim()).filter(Boolean).some(V=>{if(V.endsWith("/*")){const X=V.slice(0,-1);return P.type.startsWith(X)}return P.type===V}),[t]),O=(0,k.useCallback)(P=>{const V=Array.from(P),X=V.filter(fe=>R(fe));if(V.length&&X.length===0){l?.({code:"accept",message:"No files match the accepted types."});return}const A=fe=>s?fe.size<=s:!0,oe=X.filter(A);if(X.length>0&&oe.length===0){l?.({code:"max_file_size",message:"All files exceed the maximum size."});return}y(fe=>{const x=typeof a=="number"?Math.max(0,a-fe.length):void 0,Oe=typeof x=="number"?oe.slice(0,x):oe;typeof x=="number"&&oe.length>x&&l?.({code:"max_files",message:"Too many files. Some were not added."});const Ee=[];for(const pe of Oe)Ee.push({id:ox(),type:"file",url:URL.createObjectURL(pe),mediaType:pe.type,filename:pe.name});return fe.concat(Ee)})},[R,a,s,l]),S=(0,k.useCallback)(P=>y(V=>{const X=V.find(A=>A.id===P);return X?.url&&URL.revokeObjectURL(X.url),V.filter(A=>A.id!==P)}),[]),$=(0,k.useCallback)(()=>y(P=>{for(const V of P)V.url&&URL.revokeObjectURL(V.url);return[]}),[]),Y=f?h.attachments.add:O,W=f?h.attachments.remove:S,I=f?h.attachments.clear:$,U=f?h.attachments.openFileDialog:w;(0,k.useEffect)(()=>{f&&h.__registerFileInput(p,()=>p.current?.click())},[f,h]),(0,k.useEffect)(()=>{i&&p.current&&_.length===0&&(p.current.value="")},[_,i]),(0,k.useEffect)(()=>{const P=E.current;if(!P||r)return;const V=A=>{A.dataTransfer?.types?.includes("Files")&&A.preventDefault()},X=A=>{A.dataTransfer?.types?.includes("Files")&&A.preventDefault(),A.dataTransfer?.files&&A.dataTransfer.files.length>0&&Y(A.dataTransfer.files)};return P.addEventListener("dragover",V),P.addEventListener("drop",X),()=>{P.removeEventListener("dragover",V),P.removeEventListener("drop",X)}},[Y,r]),(0,k.useEffect)(()=>{if(!r)return;const P=X=>{X.dataTransfer?.types?.includes("Files")&&X.preventDefault()},V=X=>{X.dataTransfer?.types?.includes("Files")&&X.preventDefault(),X.dataTransfer?.files&&X.dataTransfer.files.length>0&&Y(X.dataTransfer.files)};return document.addEventListener("dragover",P),document.addEventListener("drop",V),()=>{document.removeEventListener("dragover",P),document.removeEventListener("drop",V)}},[Y,r]),(0,k.useEffect)(()=>()=>{if(!f)for(const P of C.current)P.url&&URL.revokeObjectURL(P.url)},[f]);const z=P=>{P.currentTarget.files&&Y(P.currentTarget.files),P.currentTarget.value=""},q=async P=>{try{const V=await(await fetch(P)).blob();return new Promise(X=>{const A=new FileReader;A.onloadend=()=>X(A.result),A.onerror=()=>X(null),A.readAsDataURL(V)})}catch{return null}},J=(0,k.useMemo)(()=>({files:_.map(P=>({...P,id:P.id})),add:Y,remove:W,clear:I,openFileDialog:U,fileInputRef:p}),[_,Y,W,I,U]),Q=P=>{P.preventDefault();const V=P.currentTarget,X=f?h.textInput.value:new FormData(V).get("message")||"";f||V.reset(),Promise.all(_.map(async({id:A,...oe})=>{if(oe.url?.startsWith("blob:")){const fe=await q(oe.url);return{...oe,url:fe??oe.url}}return oe})).then(A=>{try{const oe=o({text:X,files:A},P);oe instanceof Promise?oe.then(()=>{I(),f&&h.textInput.clear()}).catch(()=>{}):(I(),f&&h.textInput.clear())}catch{}}).catch(()=>{})},H=(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("input",{accept:t,"aria-label":"Upload files",className:"hidden",multiple:n,onChange:z,ref:p,title:"Upload files",type:"file"}),(0,m.jsx)("form",{className:me("w-full",e),onSubmit:Q,ref:E,...d,children:(0,m.jsx)(bu,{className:"overflow-hidden",children:u})})]});return f?H:(0,m.jsx)(Wc.Provider,{value:J,children:H})},fx=({className:e,...t})=>(0,m.jsx)("div",{className:me("contents",e),...t}),px=({onChange:e,className:t,placeholder:n="What would you like to know?",...r})=>{const i=Vc(),a=hx(),[s,l]=(0,k.useState)(!1),o=h=>{if(h.key==="Enter"){if(s||h.nativeEvent.isComposing||h.shiftKey)return;h.preventDefault();const f=h.currentTarget.form;if(f?.querySelector('button[type="submit"]')?.disabled)return;f?.requestSubmit()}if(h.key==="Backspace"&&h.currentTarget.value===""&&a.files.length>0){h.preventDefault();const f=a.files.at(-1);f&&a.remove(f.id)}},u=h=>{const f=h.clipboardData?.items;if(!f)return;const p=[];for(const E of f)if(E.kind==="file"){const N=E.getAsFile();N&&p.push(N)}p.length>0&&(h.preventDefault(),a.add(p))},d=i?{value:i.textInput.value,onChange:h=>{i.textInput.setInput(h.currentTarget.value),e?.(h)}}:{onChange:e};return(0,m.jsx)(ku,{className:me("field-sizing-content max-h-48 min-h-16",t),name:"message",onCompositionEnd:()=>l(!1),onCompositionStart:()=>l(!0),onKeyDown:o,onPaste:u,placeholder:n,...r,...d})},mx=({className:e,...t})=>(0,m.jsx)(Au,{align:"block-end",className:me("justify-between justify-end gap-1",e),...t}),gx=({className:e,variant:t="default",size:n="icon-sm",status:r,children:i,...a})=>{let s=(0,m.jsx)(su,{className:"size-4"});return r==="submitted"?s=(0,m.jsx)(lu,{className:"size-4 animate-spin"}):r==="streaming"?s=(0,m.jsx)(au,{className:"size-4"}):r==="error"&&(s=(0,m.jsx)(ou,{className:"size-4"})),(0,m.jsx)(xu,{"aria-label":"Submit",className:me(e),size:n,type:"submit",variant:t,...a,children:i??s})};function Ex({...e}){return(0,m.jsx)(fu,{"data-slot":"collapsible",...e})}function Tx({...e}){return(0,m.jsx)(pu,{"data-slot":"collapsible-trigger",...e})}function bx({...e}){return(0,m.jsx)(mu,{"data-slot":"collapsible-content",...e})}var kx=({children:e,as:t="p",className:n,duration:r=2,spread:i=2})=>{const a=(0,k.useMemo)(()=>(e?.length??0)*i,[e,i]);return(0,m.jsx)(t,{className:me("relative inline-block bg-size-[250%_100%,auto] bg-clip-text text-transparent","[--bg:linear-gradient(90deg,#0000_calc(50%-var(--spread)),var(--color-background),#0000_calc(50%+var(--spread)))] [background-repeat:no-repeat,padding-box]","animate-shimmer",n),style:{"--spread":`${a}px`,"--duration":`${r}s`,backgroundImage:"var(--bg), linear-gradient(var(--color-muted-foreground), var(--color-muted-foreground))"},children:e})},Ax=(0,k.memo)(kx),Gc=(0,k.createContext)(null),_x=()=>{const e=(0,k.use)(Gc);if(!e)throw new Error("Reasoning components must be used within Reasoning");return e},xx=1e3,yx=1e3,Qc=(0,k.memo)(({className:e,isStreaming:t=!1,open:n,defaultOpen:r=!0,onOpenChange:i,duration:a,children:s,...l})=>{const[o,u]=Ki({prop:n,defaultProp:r,onChange:i}),[d,h]=Ki({prop:a,defaultProp:void 0}),[f,p]=(0,k.useState)(!1),[E,N]=(0,k.useState)(null);(0,k.useEffect)(()=>{t?E===null&&N(Date.now()):E!==null&&(h(Math.ceil((Date.now()-E)/yx)),N(null))},[t,E,h]),(0,k.useEffect)(()=>{if(r&&!t&&o&&!f){const _=setTimeout(()=>{u(!1),p(!0)},xx);return()=>clearTimeout(_)}},[t,o,r,u,f]);const y=_=>{u(_)};return(0,m.jsx)(Gc.Provider,{value:{isStreaming:t,isOpen:o,setIsOpen:u,duration:d},children:(0,m.jsx)(Ex,{className:me("not-prose mb-4",e),onOpenChange:y,open:o,...l,children:s})})}),Cx=(e,t)=>e||t===0?(0,m.jsx)(Ax,{duration:1,children:"Thinking..."}):t===void 0?(0,m.jsx)("p",{children:"Thought for a few seconds"}):(0,m.jsxs)("p",{children:["Thought for ",t," seconds"]}),Kc=(0,k.memo)(({className:e,children:t,getThinkingMessage:n=Cx,...r})=>{const{isStreaming:i,isOpen:a,duration:s}=_x();return(0,m.jsx)(Tx,{className:me("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...r,children:t??(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(tu,{className:"size-4"}),n(i,s),(0,m.jsx)(iu,{className:me("size-4 transition-transform",a?"rotate-180":"rotate-0")})]})})}),Xc=(0,k.memo)(({className:e,children:t,...n})=>(0,m.jsx)(bx,{className:me("mt-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...n,children:(0,m.jsx)(Qi,{children:t})}));Qc.displayName="Reasoning";Kc.displayName="ReasoningTrigger";Xc.displayName="ReasoningContent";var Sx=({className:e,children:t,...n})=>(0,m.jsxs)(vu,{className:"w-full overflow-x-auto whitespace-nowrap",...n,children:[(0,m.jsx)("div",{className:me("flex w-max flex-nowrap items-center gap-2",e),children:t}),(0,m.jsx)(Iu,{className:"hidden",orientation:"horizontal"})]}),Nx=({suggestion:e,onClick:t,className:n,variant:r="outline",size:i="sm",children:a,...s})=>{const l=()=>{t?.(e)};return(0,m.jsx)(nr,{className:me("cursor-pointer rounded-full px-4",n),onClick:l,size:i,type:"button",variant:r,...s,children:a||e})},ey=pi({ChatSidebar:()=>vx}),Ix=({db:e,onRateLimitRefetch:t,onControllerReady:n})=>{const[r,i]=(0,k.useState)(""),[a,s]=(0,k.useState)(null),{openOverlay:l}=zs(),{pendingPrompt:o,consumePrompt:u}=wu(),{includeSchemaInAiContext:d,provider:h,model:f}=qs(),p=Vs(zr),E=Ys(),N=p.status[h],y=N?.state==="set"||N?.state==="locked",{rateLimit:_}=Ws({enabled:E&&h==="gemini"&&!y}),{remaining:C}=_??{remaining:0,limit:0},w=y||h==="gemini"&&C>0,{messages:R,sendMessage:O,isLoading:S,clear:$,stop:Y}=Lu({connection:Ru(`${Cu()}${Su.API_PREFIX}/chat`,()=>({headers:yu()})),body:{db:e,includeSchema:d},byok:zr,forwardedProps:{provider:h,model:f},onError:q=>s(q.message),onFinish:()=>{h==="gemini"&&!y&&t()}});(0,k.useEffect)(()=>{!o||S||!E||!w||(u(),O(o))},[w,u,E,S,o,O]),(0,k.useEffect)(()=>{n({clear:()=>{$(),i(""),s(null)},isLoading:S})},[$,S,n]);const W=q=>{const J=!!q.text,Q=!!q.files?.length;!(J||Q)||S||(s(null),O(q.text),i(""))},I=q=>{s(null),O(q),i("")},U=()=>{Y(),i("")},z=S?"streaming":"ready";return(0,m.jsxs)("div",{className:"relative flex size-full flex-col divide-y overflow-hidden",children:[(0,m.jsxs)(tx,{children:[(0,m.jsx)(nx,{children:R.length===0?(0,m.jsx)("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:(0,m.jsxs)("div",{className:"text-center space-y-2",children:[(0,m.jsx)("p",{className:"text-lg font-medium",children:"Start a new conversation"}),(0,m.jsx)("p",{className:"text-sm",children:"Ask me anything to get started"})]})}):(0,m.jsxs)(m.Fragment,{children:[R.map(q=>{const J=q.parts.filter(P=>P.type==="thinking"),Q=q.parts.reduce((P,V)=>V.type==="text"?P+(V.content??""):P,""),H=J.length>0;return(0,m.jsx)(Fs,{defaultBranch:0,children:(0,m.jsx)(Hs,{children:(0,m.jsx)(Ms,{from:q.role==="user"?"user":"assistant",children:(0,m.jsxs)("div",{children:[H&&q.role==="assistant"&&(0,m.jsxs)(Qc,{duration:0,children:[(0,m.jsx)(Kc,{}),(0,m.jsx)(Xc,{children:J.map(P=>P.content).join(`
|
|
132
|
-
`)})]}),(0,m.jsx)(Bs,{children:(0,m.jsx)(qc,{children:Q})})]})})})},q.id)}),S&&(0,m.jsx)(Fs,{defaultBranch:0,children:(0,m.jsx)(Hs,{children:(0,m.jsx)(Ms,{from:"assistant",children:(0,m.jsx)(Bs,{children:(0,m.jsx)(ix,{children:"Thinking..."})})})})})]})}),(0,m.jsx)(rx,{})]}),(0,m.jsxs)("div",{className:"grid shrink-0 gap-4 pt-3",children:[a&&(0,m.jsx)("div",{className:"mx-4 rounded-lg border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive",children:a}),!w&&(0,m.jsxs)("div",{className:"mx-4 rounded-lg border p-3 text-sm",children:[(0,m.jsx)("p",{className:"text-muted-foreground",children:h==="gemini"?"The hosted AI limit is exhausted. Add a personal Gemini key to continue.":`Add a ${h} API key to use this provider.`}),(0,m.jsx)(nr,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:()=>l("settings.app"),children:"Open settings"})]}),R.length===0&&w&&(0,m.jsx)(Sx,{className:"px-4",children:Ou.map(q=>(0,m.jsx)(Nx,{onClick:()=>I(q),suggestion:q,size:"lg",children:q},q))}),(0,m.jsx)("div",{className:"w-full px-4 pb-4",children:(0,m.jsxs)(dx,{globalDrop:!0,multiple:!0,onSubmit:W,children:[(0,m.jsx)(fx,{children:(0,m.jsx)(px,{onChange:q=>i(q.target.value),value:r,placeholder:"Type a message..."})}),(0,m.jsx)(mx,{children:(0,m.jsx)(gx,{className:"h-8!",status:z,onClick:S?U:void 0,disabled:!w})})]})})]})]})},vx=()=>{const{isOverlayOpen:e,closeOverlay:t}=zs(),{selectedDatabase:n}=Nu(),{includeSchemaInAiContext:r,provider:i,model:a}=qs(),s=Vs(zr),l=Ys(),o=s.status[i],u=o?.state==="set"||o?.state==="locked",{rateLimit:d,refetchRateLimit:h}=Ws({enabled:l&&i==="gemini"&&!u}),[f,p]=(0,k.useState)(null),E=(0,k.useRef)(N=>p(N));return(0,m.jsx)(_u,{title:"AI Assistant",cta:(0,m.jsxs)("div",{className:"flex items-center gap-2",children:[d&&!u&&(0,m.jsxs)(gu,{children:[(0,m.jsx)(Eu,{asChild:!0,children:(0,m.jsxs)("span",{className:"text-xs px-2 py-1 cursor-default text-muted-foreground",children:[d.remaining,"/",d.limit]})}),(0,m.jsx)(Tu,{side:"bottom",children:(0,m.jsxs)("p",{children:[d.remaining," messages remaining"]})})]}),n&&f&&(0,m.jsxs)(nr,{type:"button",variant:"outline",size:"lg",onClick:f.clear,disabled:f.isLoading,children:[(0,m.jsx)(nu,{className:"size-4 mr-1"}),"New Chat"]})]}),closeButton:!1,open:e("chat.assistant"),size:"max-w-2xl!",contentClassName:"p-0 flex flex-col h-[calc(100vh-4rem)] flex-1",onOpenChange:N=>{N||t("chat.assistant")},children:n?(0,m.jsx)(Ix,{db:n,onRateLimitRefetch:h,onControllerReady:E.current},`${n}:${r}:${i}:${a}`):(0,m.jsx)("div",{className:"flex items-center justify-center h-full text-muted-foreground p-8",children:(0,m.jsxs)("div",{className:"text-center space-y-2",children:[(0,m.jsx)("p",{className:"text-lg font-medium",children:"No database selected"}),(0,m.jsx)("p",{className:"text-sm",children:"Select a database from the sidebar to start chatting."})]})})})};export{vx as ChatSidebar,G_ as a,Fe as i,LA as n,Jx as r,ey as t};
|