@decocms/mesh 2.10.0 → 2.11.0
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/client/assets/{AlertCircle-BI-lv-P2.js → AlertCircle-C-YsmNug.js} +1 -1
- package/dist/client/assets/{ArrowLeft-WX776rGw.js → ArrowLeft-I0eE0ajz.js} +1 -1
- package/dist/client/assets/{Check-Dh23dmDM.js → Check-Bn7iaq_h.js} +1 -1
- package/dist/client/assets/{ChevronDown-CQl6wdMq.js → ChevronDown-CXsTFOR4.js} +1 -1
- package/dist/client/assets/{Clock-C2L66fjj.js → Clock-7YlOAEqw.js} +1 -1
- package/dist/client/assets/{Code01-BvYrq72o.js → Code01-Dp2-HwWV.js} +1 -1
- package/dist/client/assets/{Copy01-BX4_oHqx.js → Copy01-Cufxb7u1.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-9lU8MC-X.js → DotsHorizontal-Cq3m_A8z.js} +1 -1
- package/dist/client/assets/{DotsVertical-BBtotCm7.js → DotsVertical-BIpduKLf.js} +1 -1
- package/dist/client/assets/{File06-lv7rH_v1.js → File06-DD5RANl_.js} +1 -1
- package/dist/client/assets/{FilterLines-WZSp93Oe.js → FilterLines-1Ine1y4n.js} +1 -1
- package/dist/client/assets/{FlipBackward-CqqvNJYu.js → FlipBackward-DBqfxU3c.js} +1 -1
- package/dist/client/assets/{GitBranch01-DN-LFsG4.js → GitBranch01-BHo3ByP2.js} +1 -1
- package/dist/client/assets/{Grid01-bigl9l-5.js → Grid01-C578o4mm.js} +1 -1
- package/dist/client/assets/{Inbox01-BIZdM9VF.js → Inbox01-BtHWN2dX.js} +1 -1
- package/dist/client/assets/{InfoCircle-FggQ2WMl.js → InfoCircle-BkGKY7qc.js} +1 -1
- package/dist/client/assets/{Key01-BHIpjeh2.js → Key01-DYP1HQKa.js} +1 -1
- package/dist/client/assets/{LinkExternal01-YcVnQhq1.js → LinkExternal01-d5tCjGRk.js} +1 -1
- package/dist/client/assets/{Loading01-nz4zkIiQ.js → Loading01-BGeWv0Kv.js} +1 -1
- package/dist/client/assets/{Lock01-DJbaRRVq.js → Lock01-jWWo80rN.js} +1 -1
- package/dist/client/assets/{Play-Dy3YBriV.js → Play-B3EbuXEZ.js} +1 -1
- package/dist/client/assets/{Plus-DRzcJPy4.js → Plus-CgN71ZpK.js} +1 -1
- package/dist/client/assets/{SearchMd-CGgWiIHk.js → SearchMd-u2U3iAnY.js} +1 -1
- package/dist/client/assets/{Terminal-DDxodu0O.js → Terminal-Fj__rdxn.js} +1 -1
- package/dist/client/assets/{Trash01-Nn4emH5w.js → Trash01-Vutqn1RC.js} +1 -1
- package/dist/client/assets/{X-CSDtf13Z.js → X-P1RHfgBU.js} +1 -1
- package/dist/client/assets/{XClose-Da4Q_9Br.js → XClose-DeI9b46h.js} +1 -1
- package/dist/client/assets/{alert-dialog-BrdP9Xiy.js → alert-dialog-BApkfnBU.js} +1 -1
- package/dist/client/assets/{auth-BkX07Kdp.js → auth-B4yoGafc.js} +1 -1
- package/dist/client/assets/{auth-catchall-CgZMKj4U.js → auth-catchall-CbILVwsO.js} +1 -1
- package/dist/client/assets/{avatar-DVkpHhcq.js → avatar-HUmJyCrO.js} +1 -1
- package/dist/client/assets/{badge-DZOpuutl.js → badge-_9VZKl7s.js} +1 -1
- package/dist/client/assets/{card-VaGCmdRN.js → card-DUrBojml.js} +1 -1
- package/dist/client/assets/{checkbox-B6_pb64c.js → checkbox-y4VvHU-Y.js} +1 -1
- package/dist/client/assets/{collection-detail-BZTq36Jq.js → collection-detail-o5P4OEwm.js} +2 -2
- package/dist/client/assets/{collection-display-button-0kCgwjcX.js → collection-display-button-D_pspwv8.js} +1 -1
- package/dist/client/assets/{collection-header-C5jLEW4T.js → collection-header-DjAukiYw.js} +1 -1
- package/dist/client/assets/{collection-page-BxN-pfZ4.js → collection-page-DUwIO-4_.js} +1 -1
- package/dist/client/assets/{collection-search-DCk3URyd.js → collection-search-C8qrPxpe.js} +1 -1
- package/dist/client/assets/{collection-tab-BK4lXf-5.js → collection-tab-BtKR4Bs-.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DbtYisXO.js → collection-table-wrapper-m6-zCmZ8.js} +1 -1
- package/dist/client/assets/{connection-card-CtcQXchE.js → connection-card-Bho36DLV.js} +1 -1
- package/dist/client/assets/connection-detail-DzUkx3x6.js +1 -0
- package/dist/client/assets/{connections-BkTTX2-6.js → connections-CGjqBYcN.js} +1 -1
- package/dist/client/assets/constants-CDd5Bb9b.js +1 -0
- package/dist/client/assets/{create-organization-dialog-BcohdvN6.js → create-organization-dialog-DJCSaeq_.js} +1 -1
- package/dist/client/assets/{dialog-rGW8NOdv.js → dialog-DPjf1g07.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DEdU2p2E.js → dropdown-menu-JqpADJWR.js} +1 -1
- package/dist/client/assets/{empty-state-C6fFQCSt.js → empty-state-B1YgYZRX.js} +1 -1
- package/dist/client/assets/{env-vars-editor-DtIOMaFz.js → env-vars-editor-58M0X5HW.js} +1 -1
- package/dist/client/assets/{error-boundary-B28JvE1I.js → error-boundary-swyLIuj9.js} +1 -1
- package/dist/client/assets/{extract-connection-data-fJTZE6Hc.js → extract-connection-data-yHByD-hG.js} +1 -1
- package/dist/client/assets/{form-CE1tfcze.js → form-BNePwzri.js} +1 -1
- package/dist/client/assets/gateway-detail-7_rs5-Bk.js +1 -0
- package/dist/client/assets/gateways-LhzXTNdU.js +1 -0
- package/dist/client/assets/{home-lONkAboE.js → home-Dge_UN-5.js} +1 -1
- package/dist/client/assets/{index-CGbuv4sL.js → index-CZYkP-qE.js} +1 -1
- package/dist/client/assets/{index-Dc4mPG7D.js → index-D825aBGT.js} +2 -2
- package/dist/client/assets/{index-CJEYCkTv.js → index-Dd-uCtJP.js} +1 -1
- package/dist/client/assets/{index-DjBifmxL.js → index-DfsK7wxC.js} +31 -31
- package/dist/client/assets/{index-B-_GLG4a.js → index-sXi95TSr.js} +1 -1
- package/dist/client/assets/{input-CLQFaB_P.js → input-CUSLU-5Y.js} +1 -1
- package/dist/client/assets/{layout-D-qTqL0P.js → layout-DiLh4D4s.js} +1 -1
- package/dist/client/assets/{lazy-highlighter-CM_r6Qg6.js → lazy-highlighter-Bva2qxQ8.js} +1 -1
- package/dist/client/assets/{localstorage-keys-Csxol0-8.js → localstorage-keys-DCk__Bcu.js} +1 -1
- package/dist/client/assets/{login-CY0fBMtA.js → login-5v9kcVjq.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DwoWo555.js → mcp-oauth-2LWG2fNF.js} +1 -1
- package/dist/client/assets/{mcp-server-detail-BfkMNCXA.js → mcp-server-detail-Bl4-1OcQ.js} +1 -1
- package/dist/client/assets/{members-DlfrW4qm.js → members-DUjkcn9b.js} +1 -1
- package/dist/client/assets/{monaco-editor-CGmVJ7Sz.js → monaco-editor-CXJFCG3L.js} +1 -1
- package/dist/client/assets/{monitoring-8m7n1ABH.js → monitoring-BxS1M7G9.js} +5 -5
- package/dist/client/assets/{oauth-callback-C3UTt1IM.js → oauth-callback-D352dL7W.js} +1 -1
- package/dist/client/assets/{page-CjTfwiJs.js → page-DJ2XmEDk.js} +1 -1
- package/dist/client/assets/page-DlLPoWnp.js +35 -0
- package/dist/client/assets/{pin-to-sidebar-button-DmlmCu_p.js → pin-to-sidebar-button-CxO4Rtia.js} +1 -1
- package/dist/client/assets/{popover-Bt6Irkfs.js → popover-CiuXmEMm.js} +1 -1
- package/dist/client/assets/{project-context-provider-jIErvTKU.js → project-context-provider-Y7j1MLG3.js} +1 -1
- package/dist/client/assets/{resizable-BDACILOB.js → resizable-CpuhJlAj.js} +1 -1
- package/dist/client/assets/{resource-tabs-B9UXtdu9.js → resource-tabs-DzYdyOT8.js} +1 -1
- package/dist/client/assets/{select-CXOQrDyU.js → select-BiK6lA7A.js} +1 -1
- package/dist/client/assets/{settings-Cml1v0xs.js → settings-BydLLEEd.js} +1 -1
- package/dist/client/assets/shell-layout-hT1WnhFU.js +3 -0
- package/dist/client/assets/{spinner-C-rDsJGC.js → spinner-D8JOERWZ.js} +1 -1
- package/dist/client/assets/{switch-C2oVrx7C.js → switch-CHSRGx1X.js} +1 -1
- package/dist/client/assets/{textarea-DxDFaLzd.js → textarea-DA688jdJ.js} +1 -1
- package/dist/client/assets/{thread-history-popover-D_x2TXEl.js → thread-history-popover-d49eUsmE.js} +13 -13
- package/dist/client/assets/{tool-set-selector-B03cDU_f.js → tool-set-selector-qCxd45H-.js} +1 -1
- package/dist/client/assets/{tools-list-CCvCpz3e.js → tools-list-aRycV8Sk.js} +1 -1
- package/dist/client/assets/{use-binding-C_WCv3Kw.js → use-binding-pQGzNysE.js} +1 -1
- package/dist/client/assets/{use-connection-D1oWmd80.js → use-connection-CJ5nWy0c.js} +1 -1
- package/dist/client/assets/{use-connection-resources-DAy5w-Ms.js → use-connection-resources-CrBNfIuI.js} +1 -1
- package/dist/client/assets/use-gateway-Cov2sDNb.js +1 -0
- package/dist/client/assets/{use-gateway-system-prompt-B0FWJC8i.js → use-gateway-system-prompt-D3bv_TPR.js} +1 -1
- package/dist/client/assets/{use-list-state-D9IMsf4Z.js → use-list-state-CUahB2OC.js} +1 -1
- package/dist/client/assets/{use-mcp-BSK2ddKq.js → use-mcp-Wds2Jlc5.js} +1 -1
- package/dist/client/assets/{use-members-BrVgN1Nv.js → use-members-BlHxrgPJ.js} +1 -1
- package/dist/client/assets/{use-mobile-BmTi-FB3.js → use-mobile-DSucR6ge.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DPGpmRIO.js → use-organization-settings-zICyumVv.js} +1 -1
- package/dist/client/assets/{use-tool-call-B5UsmKnA.js → use-tool-call-CS4qR4o3.js} +1 -1
- package/dist/client/assets/useQuery-El_kGGDY.js +1 -0
- package/dist/client/assets/{value-Duay7dd7.js → value-BHNPJ9GX.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-Q_4Hio7O.js → view-mode-toggle-Do1cIl7g.js} +1 -1
- package/dist/client/assets/well-known-mcp-D13f-8h2.js +1 -0
- package/dist/client/assets/{workflow-C6xPZGlX.js → workflow-C_xTbZed.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +145 -145
- package/dist/server/migrate.js +129 -129
- package/dist/server/server.js +140 -140
- package/package.json +1 -1
- package/dist/client/assets/connection-detail-Dtnc6jAX.js +0 -1
- package/dist/client/assets/constants-D7HtiX2k.js +0 -1
- package/dist/client/assets/gateway-detail-DpvUxeca.js +0 -1
- package/dist/client/assets/gateways-DPTsKKk2.js +0 -1
- package/dist/client/assets/page-Cm8i9onu.js +0 -35
- package/dist/client/assets/shell-layout-BC-hIRVP.js +0 -3
- package/dist/client/assets/use-gateway-DEBoqh3W.js +0 -1
- package/dist/client/assets/useQuery-CjN7yze9.js +0 -1
- package/dist/client/assets/well-known-mcp-7PcWXInp.js +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/lazy-highlighter-
|
|
2
|
-
import{r as U,ag as Js,c as V,j as p,aU as Bt,s as ea,K as Me,p as ta,a0 as na,aV as Wo,ac as Go,ai as Qo,at as Ko,ad as $r,ae as Xo,af as Zo,aa as Jo,ah as el}from"./index-Dc4mPG7D.js";import{i as xt}from"./Check-Dh23dmDM.js";import{u as tl,i as ra}from"./use-gateway-DEBoqh3W.js";import{i as Yr}from"./SearchMd-CGgWiIHk.js";import{I as ia,U as nl,f as rl,c as il,u as sl}from"./use-connection-D1oWmd80.js";import{c as ae,u as Et,B as Qe,I as sa}from"./input-CLQFaB_P.js";import{u as Ct,c as qr,b as Vr,T as Wr}from"./project-context-provider-jIErvTKU.js";import{e as al}from"./well-known-mcp-7PcWXInp.js";import{i as aa}from"./AlertCircle-BI-lv-P2.js";import{i as ul}from"./error-boundary-B28JvE1I.js";import{i as ol}from"./X-CSDtf13Z.js";import{a as ll,i as ua,c as cl}from"./Grid01-bigl9l-5.js";import{T as fl}from"./textarea-DxDFaLzd.js";import{u as oa,L as la}from"./localstorage-keys-Csxol0-8.js";import{a as Gr}from"./Copy01-BX4_oHqx.js";import{i as dl}from"./Terminal-DDxodu0O.js";import{M as ca}from"./monaco-editor-CGmVJ7Sz.js";import{b as hl,c as ml,d as pl,A as gl,a as El,e as bl,g as Tl,f as xl}from"./alert-dialog-BrdP9Xiy.js";import{b as _l,a as Al,c as kl,S as Cl}from"./select-CXOQrDyU.js";import{u as Nl}from"./use-mobile-BmTi-FB3.js";import{i as Sl}from"./File06-lv7rH_v1.js";import{i as yl}from"./InfoCircle-FggQ2WMl.js";import{u as Il}from"./use-binding-C_WCv3Kw.js";const fa=({size:t=24,color:e="currentColor",...n})=>U.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},U.createElement("path",{d:"M17.115 15.358c-.27.306-.554.608-.851.905-4.296 4.296-9.678 5.88-12.021 3.536-1.607-1.606-1.368-4.641.325-7.775M6.89 8.725c.281-.32.578-.636.888-.947C12.074 3.482 17.456 1.9 19.8 4.243c1.608 1.607 1.367 4.645-.33 7.781m-3.206-4.246c4.296 4.296 5.88 9.678 3.536 12.021-2.343 2.343-7.725.76-12.02-3.535C3.483 11.968 1.9 6.586 4.244 4.243c2.343-2.343 7.725-.76 12.02 3.535ZM13 12a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"}));fa.displayName="Atom02";const da=({size:t=24,color:e="currentColor",...n})=>U.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},U.createElement("path",{d:"M15.938 15.938A7.001 7.001 0 0 0 15 2a7.001 7.001 0 0 0-6.938 6.062M16 15a7 7 0 1 1-14 0 7 7 0 0 1 14 0Z"}));da.displayName="Coins01";const ha=({size:t=24,color:e="currentColor",...n})=>U.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},U.createElement("path",{d:"M9 14 4 9m0 0 5-5M4 9h6.4c3.36 0 5.04 0 6.324.654a6 6 0 0 1 2.622 2.622C20 13.56 20 15.24 20 18.6V20"}));ha.displayName="CornerUpLeft";const ma=({size:t=24,color:e="currentColor",...n})=>U.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},U.createElement("path",{d:"M6 16a4 4 0 0 0 4 4h4a4 4 0 0 0 0-8h-4a4 4 0 0 1 0-8h4a4 4 0 0 1 4 4m-6-6v20"}));ma.displayName="CurrencyDollar";const pa=({size:t=24,color:e="currentColor",...n})=>U.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},U.createElement("path",{d:"m18 10-4-4M2.5 21.5l3.384-.376c.414-.046.62-.069.814-.131a2 2 0 0 0 .485-.234c.17-.111.317-.259.61-.553L21 7a2.828 2.828 0 1 0-4-4L3.794 16.206c-.294.294-.442.442-.553.611a2 2 0 0 0-.234.485c-.062.193-.085.4-.131.814L2.5 21.5Z"}));pa.displayName="Edit02";const ga=({size:t=24,color:e="currentColor",...n})=>U.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},U.createElement("path",{d:"M16.2 21H6.931c-.605 0-.908 0-1.049-.12a.5.5 0 0 1-.173-.42c.014-.183.228-.397.657-.826l8.503-8.503c.396-.396.594-.594.822-.668a1 1 0 0 1 .618 0c.228.074.426.272.822.668L21 15v1.2M16.2 21c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C21 18.72 21 17.88 21 16.2M16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4M10.5 8.5a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z"}));ga.displayName="Image01";const Ea=({size:t=24,color:e="currentColor",...n})=>U.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},U.createElement("path",{d:"M15 16.5V19c0 .932 0 1.398-.152 1.765a2 2 0 0 1-1.083 1.083C13.398 22 12.932 22 12 22c-.932 0-1.398 0-1.765-.152a2 2 0 0 1-1.083-1.083C9 20.398 9 19.932 9 19v-2.5m6 0c2.649-1.157 4.5-3.925 4.5-7a7.5 7.5 0 0 0-15 0c0 3.075 1.851 5.843 4.5 7m6 0H9"}));Ea.displayName="Lightbulb01";const ba=({size:t=24,color:e="currentColor",...n})=>U.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},U.createElement("path",{d:"m18 8 4 4m0 0-4 4m4-4H9m6-7.796A8.383 8.383 0 0 0 10.667 3C5.88 3 2 7.03 2 12s3.88 9 8.667 9A8.384 8.384 0 0 0 15 19.796"}));ba.displayName="LogOut04";const jn=({size:t=24,color:e="currentColor",...n})=>U.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},U.createElement("path",{d:"m6.5 13 .784 1.569c.266.53.399.796.576 1.026a3 3 0 0 0 .545.545c.23.177.495.31 1.026.575L11 17.5l-1.569.785c-.53.265-.796.398-1.026.575a3 3 0 0 0-.545.545c-.177.23-.31.495-.576 1.026L6.5 22l-.784-1.569c-.266-.53-.399-.796-.576-1.026a3 3 0 0 0-.545-.545c-.23-.177-.495-.31-1.026-.575L2 17.5l1.569-.785c.53-.265.796-.398 1.026-.575a3 3 0 0 0 .545-.545c.177-.23.31-.495.576-1.026L6.5 13ZM15 2l1.179 3.064c.282.734.423 1.1.642 1.409a3 3 0 0 0 .706.706c.309.22.675.36 1.409.642L22 9l-3.064 1.179c-.734.282-1.1.423-1.409.642a3 3 0 0 0-.706.706c-.22.309-.36.675-.642 1.409L15 16l-1.179-3.064c-.282-.734-.423-1.1-.642-1.409a3 3 0 0 0-.706-.706c-.309-.22-.675-.36-1.409-.642L8 9l3.064-1.179c.734-.282 1.1-.423 1.409-.642a3 3 0 0 0 .706-.706c.22-.309.36-.675.642-1.409L15 2Z"}));jn.displayName="Stars01";const Ta=({size:t=24,color:e="currentColor",...n})=>U.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},U.createElement("path",{d:"M3 7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8Z"}));Ta.displayName="Stop";const xa=({size:t=24,color:e="currentColor",...n})=>U.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},U.createElement("path",{d:"M16 8V5l3-3 1 2 2 1-3 3h-3Zm0 0-4 4m10 0c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2m5 10a5 5 0 1 1-5-5"}));xa.displayName="Target04";function Mi({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,i]=wl({defaultProp:e,onChange:n}),s=t!==void 0,a=s?t:r,u=Js(n),o=U.useCallback(l=>{if(s){const d=typeof l=="function"?l(t):l;d!==t&&u(d)}else i(l)},[s,t,i,u]);return[a,o]}function wl({defaultProp:t,onChange:e}){const n=U.useState(t),[r]=n,i=U.useRef(r),s=Js(e);return U.useEffect(()=>{i.current!==r&&(s(r),i.current=r)},[r,i,s]),n}function Ll(t){const e=V.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=p.jsx(Bt.Root,{"data-slot":"drawer",...n}),e[2]=n,e[3]=r):r=e[3],r}function Rl(t){const e=V.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=p.jsx(Bt.Trigger,{"data-slot":"drawer-trigger",...n}),e[2]=n,e[3]=r):r=e[3],r}function Ol(t){const e=V.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=p.jsx(Bt.Portal,{"data-slot":"drawer-portal",...n}),e[2]=n,e[3]=r):r=e[3],r}function Dl(t){const e=V.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let i;e[3]!==n?(i=ae("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",n),e[3]=n,e[4]=i):i=e[4];let s;return e[5]!==r||e[6]!==i?(s=p.jsx(Bt.Overlay,{"data-slot":"drawer-overlay",className:i,...r}),e[5]=r,e[6]=i,e[7]=s):s=e[7],s}function Pl(t){const e=V.c(12);let n,r,i;e[0]!==t?({className:r,children:n,...i}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=i):(n=e[1],r=e[2],i=e[3]);let s;e[4]===Symbol.for("react.memo_cache_sentinel")?(s=p.jsx(Dl,{}),e[4]=s):s=e[4];let a;e[5]!==r?(a=ae("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",r),e[5]=r,e[6]=a):a=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=p.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=u):u=e[7];let o;return e[8]!==n||e[9]!==i||e[10]!==a?(o=p.jsxs(Ol,{"data-slot":"drawer-portal",children:[s,p.jsxs(Bt.Content,{"data-slot":"drawer-content",className:a,...i,children:[u,n]})]}),e[8]=n,e[9]=i,e[10]=a,e[11]=o):o=e[11],o}function Ml(t){const e=V.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let i;e[3]!==n?(i=ae("flex flex-col gap-1.5 px-4 py-2",n),e[3]=n,e[4]=i):i=e[4];let s;return e[5]!==r||e[6]!==i?(s=p.jsx("div",{"data-slot":"drawer-header",className:i,...r}),e[5]=r,e[6]=i,e[7]=s):s=e[7],s}function vl(t){const e=V.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let i;e[3]!==n?(i=ae("text-foreground font-semibold",n),e[3]=n,e[4]=i):i=e[4];let s;return e[5]!==r||e[6]!==i?(s=p.jsx(Bt.Title,{"data-slot":"drawer-title",className:i,...r}),e[5]=r,e[6]=i,e[7]=s):s=e[7],s}function Bl(){const t=V.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=la.developerMode(),t[0]=e):e=t[0],oa(e,!1)}function _t(t){return new Promise((e,n)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>n(t.error)})}function Fl(t,e){let n;const r=()=>{if(n)return n;const i=indexedDB.open(t);return i.onupgradeneeded=()=>i.result.createObjectStore(e),n=_t(i),n.then(s=>{s.onclose=()=>n=void 0},()=>{}),n};return(i,s)=>r().then(a=>s(a.transaction(e,i).objectStore(e)))}let ir;function zn(){return ir||(ir=Fl("keyval-store","keyval")),ir}function Qr(t,e=zn()){return e("readonly",n=>_t(n.get(t)))}function en(t,e,n=zn()){return n("readwrite",r=>(r.put(e,t),_t(r.transaction)))}function _a(t,e=zn()){return e("readwrite",n=>(n.delete(t),_t(n.transaction)))}function Hl(t,e){return t.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue())},_t(t.transaction)}function Aa(t=zn()){return t("readonly",e=>{if(e.getAll&&e.getAllKeys)return Promise.all([_t(e.getAllKeys()),_t(e.getAll())]).then(([r,i])=>r.map((s,a)=>[s,i[a]]));const n=[];return t("readonly",r=>Hl(r,i=>n.push([i.key,i.value])).then(()=>n))})}async function Yb(t,e){const n=`${t}:threads:${e}`;return await Qr(n)??null}async function Ul(t){const e=`${t}:threads:`;return(await Aa()).filter(([i])=>typeof i=="string"&&i.startsWith(e)).map(([,i])=>i).filter(i=>!i.hidden).sort((i,s)=>String(s.updated_at).localeCompare(String(i.updated_at)))}function ka(t,e){const n=`${t}:messages:`;return Aa().then(r=>r.filter(([s])=>typeof s=="string"&&s.startsWith(n)).map(([,s])=>s).filter(s=>s.metadata?.thread_id===e||s.threadId===e).sort((s,a)=>{const u=s.metadata?.created_at||s.createdAt||"",o=a.metadata?.created_at||a.createdAt||"";return String(u).localeCompare(String(o))}))}function qb(t){const e=V.c(14),{locator:n}=Ct(),r=t?.gatewayId;let i;e[0]!==r||e[1]!==n?(i=Me.threads(n),e[0]=r,e[1]=n,e[2]=i):i=e[2];let s;e[3]!==r||e[4]!==n?(s=async()=>await Ul(n),e[3]=r,e[4]=n,e[5]=s):s=e[5];let a;e[6]!==i||e[7]!==s?(a={queryKey:i,queryFn:s,staleTime:3e4},e[6]=i,e[7]=s,e[8]=a):a=e[8];const{data:u,refetch:o}=ta(a);let l;e[9]!==u?(l=u??[],e[9]=u,e[10]=l):l=e[10];let f;return e[11]!==o||e[12]!==l?(f={threads:l,refetch:o},e[11]=o,e[12]=l,e[13]=f):f=e[13],f}function Vb(t){const e=V.c(11),{locator:n}=Ct();let r;e[0]!==n||e[1]!==t?(r=Me.threadMessages(n,t),e[0]=n,e[1]=t,e[2]=r):r=e[2];let i;e[3]!==n||e[4]!==t?(i=()=>ka(n,t),e[3]=n,e[4]=t,e[5]=i):i=e[5];let s;e[6]!==r||e[7]!==i?(s={queryKey:r,queryFn:i,staleTime:3e4},e[6]=r,e[7]=i,e[8]=s):s=e[8];const{data:a}=ta(s);let u;return e[9]!==a?(u=a??[],e[9]=a,e[10]=u):u=e[10],u}function Ca(){const t=V.c(28),{locator:e}=Ct(),n=ea();let r;t[0]!==e?(r=async C=>{const T=`${e}:threads:${C.id}`;return await en(T,C),C},t[0]=e,t[1]=r):r=t[1];let i;t[2]!==e||t[3]!==n?(i=C=>{n.invalidateQueries({queryKey:Me.threads(e)}),C.gatewayId&&n.invalidateQueries({queryKey:Me.gatewayThreads(e,C.gatewayId)})},t[2]=e,t[3]=n,t[4]=i):i=t[4];let s;t[5]!==r||t[6]!==i?(s={mutationFn:r,onSuccess:i},t[5]=r,t[6]=i,t[7]=s):s=t[7];const a=Et(s);let u;t[8]!==e?(u=async C=>{const{id:T,updates:S}=C,N=`${e}:threads:${T}`,L=await Qr(N);if(!L)throw new Error(`Thread ${T} not found`);const O={...L,...S};return await en(N,O),O},t[8]=e,t[9]=u):u=t[9];let o;t[10]!==e||t[11]!==n?(o=C=>{n.invalidateQueries({queryKey:Me.threads(e)}),n.invalidateQueries({queryKey:Me.thread(e,C.id)}),C.gatewayId&&n.invalidateQueries({queryKey:Me.gatewayThreads(e,C.gatewayId)})},t[10]=e,t[11]=n,t[12]=o):o=t[12];let l;t[13]!==u||t[14]!==o?(l={mutationFn:u,onSuccess:o},t[13]=u,t[14]=o,t[15]=l):l=t[15];const f=Et(l);let d;t[16]!==e?(d=async C=>{const T=`${e}:threads:${C}`;return await _a(T),C},t[16]=e,t[17]=d):d=t[17];let m;t[18]!==e||t[19]!==n?(m=()=>{n.invalidateQueries({queryKey:Me.threads(e)})},t[18]=e,t[19]=n,t[20]=m):m=t[20];let h;t[21]!==d||t[22]!==m?(h={mutationFn:d,onSuccess:m},t[21]=d,t[22]=m,t[23]=h):h=t[23];const g=Et(h);let k;return t[24]!==g||t[25]!==a||t[26]!==f?(k={insert:a,update:f,delete:g},t[24]=g,t[25]=a,t[26]=f,t[27]=k):k=t[27],k}function jl(){const t=V.c(37),{locator:e}=Ct(),n=ea();let r;t[0]!==e?(r=async L=>{const O=`${e}:messages:${L.id}`;return await en(O,L),L},t[0]=e,t[1]=r):r=t[1];let i;t[2]!==e||t[3]!==n?(i=L=>{const O=L.metadata?.thread_id||L.threadId;O&&n.invalidateQueries({queryKey:Me.threadMessages(e,O)}),n.invalidateQueries({queryKey:Me.messages(e)})},t[2]=e,t[3]=n,t[4]=i):i=t[4];let s;t[5]!==r||t[6]!==i?(s={mutationFn:r,onSuccess:i},t[5]=r,t[6]=i,t[7]=s):s=t[7];const a=Et(s);let u;t[8]!==e?(u=async L=>(await Promise.all(L.map(O=>{const y=`${e}:messages:${O.id}`;return en(y,O)})),L),t[8]=e,t[9]=u):u=t[9];let o;t[10]!==e||t[11]!==n?(o=L=>{const O=new Set;for(const y of L){const j=y.metadata?.thread_id||y.threadId;j&&O.add(j)}for(const y of O)n.invalidateQueries({queryKey:Me.threadMessages(e,y)});n.invalidateQueries({queryKey:Me.messages(e)})},t[10]=e,t[11]=n,t[12]=o):o=t[12];let l;t[13]!==u||t[14]!==o?(l={mutationFn:u,onSuccess:o},t[13]=u,t[14]=o,t[15]=l):l=t[15];const f=Et(l);let d;t[16]!==e?(d=async L=>{const{id:O,updates:y}=L,j=`${e}:messages:${O}`,Y=await Qr(j);if(!Y)throw new Error(`Message ${O} not found`);const q={...Y,...y};return await en(j,q),q},t[16]=e,t[17]=d):d=t[17];let m;t[18]!==e||t[19]!==n?(m=L=>{const O=L.metadata?.thread_id||L.threadId;O&&n.invalidateQueries({queryKey:Me.threadMessages(e,O)}),n.invalidateQueries({queryKey:Me.messages(e)})},t[18]=e,t[19]=n,t[20]=m):m=t[20];let h;t[21]!==d||t[22]!==m?(h={mutationFn:d,onSuccess:m},t[21]=d,t[22]=m,t[23]=h):h=t[23];const g=Et(h);let k;t[24]!==e?(k=async L=>{const O=`${e}:messages:${L}`;return await _a(O),L},t[24]=e,t[25]=k):k=t[25];let C;t[26]!==e||t[27]!==n?(C=()=>{n.invalidateQueries({queryKey:Me.messages(e)})},t[26]=e,t[27]=n,t[28]=C):C=t[28];let T;t[29]!==C||t[30]!==k?(T={mutationFn:k,onSuccess:C},t[29]=C,t[30]=k,t[31]=T):T=t[31];const S=Et(T);let N;return t[32]!==S||t[33]!==a||t[34]!==f||t[35]!==g?(N={insert:a,insertMany:f,update:g,delete:S},t[32]=S,t[33]=a,t[34]=f,t[35]=g,t[36]=N):N=t[36],N}const Na={inputValue:"",branchContext:null,pendingSubmit:!1};function zl(t,e){switch(e.type){case"SET_INPUT":return{...t,inputValue:e.payload};case"START_BRANCH":return{...t,branchContext:e.payload};case"CLEAR_BRANCH":return{...t,branchContext:null};case"SET_PENDING_SUBMIT":return{...t,pendingSubmit:e.payload};case"RESET":return Na;default:return t}}const Sa=U.createContext(null),ya=()=>crypto.randomUUID();function $l(t){const e=V.c(16),{children:n}=t,{locator:r}=Ct(),[i,s]=U.useReducer(zl,Na),a=Ca(),[u,o]=oa(la.threadManagerState(r)+":active-id",Yl);let l;e[0]!==o||e[1]!==a?(l=C=>{const T=C?.id||crypto.randomUUID(),S=new Date().toISOString(),N={id:T,title:C?.title||"",created_at:C?.created_at||S,updated_at:C?.updated_at||S,hidden:C?.hidden??!1,gatewayId:C?.gatewayId};return a.insert.mutate(N),o(T),N},e[0]=o,e[1]=a,e[2]=l):l=e[2];const f=l;let d;e[3]!==u||e[4]!==o||e[5]!==a?(d=C=>{a.update.mutate({id:C,updates:{hidden:!0,updated_at:new Date().toISOString()}}),u===C&&o(ya())},e[3]=u,e[4]=o,e[5]=a,e[6]=d):d=e[6];const m=d;let h;e[7]!==u||e[8]!==f||e[9]!==m||e[10]!==i||e[11]!==o?(h={interactionState:i,interactionDispatch:s,activeThreadId:u,createThread:f,setActiveThreadId:o,hideThread:m},e[7]=u,e[8]=f,e[9]=m,e[10]=i,e[11]=o,e[12]=h):h=e[12];const g=h;let k;return e[13]!==n||e[14]!==g?(k=p.jsx(Sa.Provider,{value:g,children:n}),e[13]=n,e[14]=g,e[15]=k):k=e[15],k}function Yl(t){return t||ya()}function ql(){const t=V.c(19),e=U.useContext(Sa);if(!e)throw new Error("useChat must be used within a ChatProvider");const{interactionState:n,interactionDispatch:r}=e;let i,s,a,u,o;t[0]!==r?(i=f=>r({type:"SET_INPUT",payload:f}),s=f=>r({type:"START_BRANCH",payload:f}),a=()=>r({type:"CLEAR_BRANCH"}),u=f=>r({type:"SET_PENDING_SUBMIT",payload:f}),o=()=>r({type:"RESET"}),t[0]=r,t[1]=i,t[2]=s,t[3]=a,t[4]=u,t[5]=o):(i=t[1],s=t[2],a=t[3],u=t[4],o=t[5]);let l;return t[6]!==e.activeThreadId||t[7]!==e.createThread||t[8]!==e.hideThread||t[9]!==e.setActiveThreadId||t[10]!==n.branchContext||t[11]!==n.inputValue||t[12]!==n.pendingSubmit||t[13]!==i||t[14]!==s||t[15]!==a||t[16]!==u||t[17]!==o?(l={inputValue:n.inputValue,branchContext:n.branchContext,pendingSubmit:n.pendingSubmit,setInputValue:i,startBranch:s,clearBranch:a,setPendingSubmit:u,reset:o,activeThreadId:e.activeThreadId,createThread:e.createThread,setActiveThreadId:e.setActiveThreadId,hideThread:e.hideThread},t[6]=e.activeThreadId,t[7]=e.createThread,t[8]=e.hideThread,t[9]=e.setActiveThreadId,t[10]=n.branchContext,t[11]=n.inputValue,t[12]=n.pendingSubmit,t[13]=i,t[14]=s,t[15]=a,t[16]=u,t[17]=o,t[18]=l):l=t[18],l}function Vl(t){const e=V.c(66),{value:n,onChange:r,onSubmit:i,onStop:s,disabled:a,isStreaming:u,placeholder:o,className:l,centered:f,contextContent:d,leftActions:m,rightActions:h,maxTextHeight:g,children:k}=t,C=o===void 0?"Ask anything or @ for context":o,T=g===void 0?"164px":g;let S;e[0]!==a||e[1]!==u||e[2]!==n?(S=!a&&!u&&n.trim().length>0,e[0]=a,e[1]=u,e[2]=n,e[3]=S):S=e[3];const N=S;let L;e[4]!==N||e[5]!==u||e[6]!==s||e[7]!==i?(L=be=>{be.preventDefault(),u&&s?s():N&&i()},e[4]=N,e[5]=u,e[6]=s,e[7]=i,e[8]=L):L=e[8];const O=L;let y;e[9]!==N||e[10]!==i?(y=be=>{be.key==="Enter"&&!be.shiftKey&&(be.preventDefault(),N&&i())},e[9]=N,e[10]=i,e[11]=y):y=e[11];const j=y;let Y;e[12]!==l?(Y=ae("w-full",l),e[12]=l,e[13]=Y):Y=e[13];let q;e[14]===Symbol.for("react.memo_cache_sentinel")?(q=ae("relative rounded-xl border border-border bg-background w-full min-h-[130px] flex flex-col"),e[14]=q):q=e[14];let I;e[15]!==d?(I=d&&p.jsx("div",{className:"mb-1",children:d}),e[15]=d,e[16]=I):I=e[16];let B;e[17]!==T?(B={maxHeight:T},e[17]=T,e[18]=B):B=e[18];let F;e[19]!==r?(F=be=>r(be.target.value),e[19]=r,e[20]=F):F=e[20];const G=a||u;let z;e[21]===Symbol.for("react.memo_cache_sentinel")?(z=ae("placeholder:text-muted-foreground resize-none focus-visible:ring-0 border-0 p-2 !text-[15px] min-h-[20px] w-full","rounded-none shadow-none"),e[21]=z):z=e[21];let M;e[22]===Symbol.for("react.memo_cache_sentinel")?(M={minHeight:"20px",height:"auto",overflow:"hidden"},e[22]=M):M=e[22];let W;e[23]!==j||e[24]!==C||e[25]!==F||e[26]!==G||e[27]!==n?(W=p.jsx(fl,{value:n,onChange:F,onKeyDown:j,placeholder:C,disabled:G,className:z,rows:1,style:M}),e[23]=j,e[24]=C,e[25]=F,e[26]=G,e[27]=n,e[28]=W):W=e[28];let K;e[29]!==B||e[30]!==W?(K=p.jsx("div",{className:"overflow-y-auto relative flex-1",style:B,children:W}),e[29]=B,e[30]=W,e[31]=K):K=e[31];let te;e[32]!==K||e[33]!==I?(te=p.jsxs("div",{className:"relative flex flex-col gap-2 p-2.5 flex-1",children:[I,K]}),e[32]=K,e[33]=I,e[34]=te):te=e[34];let J;e[35]!==k||e[36]!==m?(J=p.jsxs("div",{className:"flex items-center overflow-hidden gap-2 min-w-0",children:[m,k]}),e[35]=k,e[36]=m,e[37]=J):J=e[37];const A=u?"button":"submit";let Z;e[38]!==u||e[39]!==s?(Z=be=>{u&&(be.preventDefault(),be.stopPropagation(),s?.())},e[38]=u,e[39]=s,e[40]=Z):Z=e[40];const le=N||u?"default":"ghost",x=!N&&!u,ue=!N&&!u&&"bg-muted text-muted-foreground hover:bg-muted hover:text-muted-foreground cursor-not-allowed";let he;e[41]!==ue?(he=ae("size-8 rounded-full transition-all",ue),e[41]=ue,e[42]=he):he=e[42];const ce=u?"Stop generating":"Send message (Enter)";let ke;e[43]!==u?(ke=u?p.jsx(Ta,{size:20}):p.jsx(ll,{size:20}),e[43]=u,e[44]=ke):ke=e[44];let Ee;e[45]!==A||e[46]!==Z||e[47]!==le||e[48]!==x||e[49]!==he||e[50]!==ce||e[51]!==ke?(Ee=p.jsx(Qe,{type:A,onClick:Z,variant:le,size:"icon",disabled:x,className:he,title:ce,children:ke}),e[45]=A,e[46]=Z,e[47]=le,e[48]=x,e[49]=he,e[50]=ce,e[51]=ke,e[52]=Ee):Ee=e[52];let xe;e[53]!==h||e[54]!==Ee?(xe=p.jsxs("div",{className:"flex items-center gap-1",children:[h,Ee]}),e[53]=h,e[54]=Ee,e[55]=xe):xe=e[55];let me;e[56]!==J||e[57]!==xe?(me=p.jsxs("div",{className:"flex items-center justify-between p-2.5",children:[J,xe]}),e[56]=J,e[57]=xe,e[58]=me):me=e[58];let Ae;e[59]!==te||e[60]!==me?(Ae=p.jsxs("div",{className:q,children:[te,me]}),e[59]=te,e[60]=me,e[61]=Ae):Ae=e[61];let Ie;return e[62]!==O||e[63]!==Ae||e[64]!==Y?(Ie=p.jsx("form",{onSubmit:O,className:Y,children:Ae}),e[62]=O,e[63]=Ae,e[64]=Y,e[65]=Ie):Ie=e[65],Ie}function Wl(){const t=V.c(3),[e,n]=U.useState(!1);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=async a=>{await navigator.clipboard.writeText(a),n(!0),setTimeout(()=>n(!1),2e3)},t[0]=r):r=t[0];const i=r;let s;return t[1]!==e?(s={handleCopy:i,copied:e},t[1]=e,t[2]=s):s=t[2],s}function Kr(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Nt=Kr();function Ia(t){Nt=t}var tn={exec:()=>null};function fe(t,e=""){let n=typeof t=="string"?t:t.source;const r={replace:(i,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(Be.caret,"$1"),n=n.replace(i,a),r},getRegex:()=>new RegExp(n,e)};return r}var Be={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,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ 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,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},Gl=/^(?:[ \t]*(?:\n|$))+/,Ql=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Kl=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,pn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Xl=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Xr=/(?:[*+-]|\d{1,9}[.)])/,wa=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,La=fe(wa).replace(/bull/g,Xr).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(),Zl=fe(wa).replace(/bull/g,Xr).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(),Zr=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Jl=/^[^\n]+/,Jr=/(?!\s*\])(?:\\.|[^\[\]\\])+/,ec=fe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Jr).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),tc=fe(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Xr).getRegex(),$n="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",ei=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,nc=fe("^ {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",ei).replace("tag",$n).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ra=fe(Zr).replace("hr",pn).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[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$n).getRegex(),rc=fe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ra).getRegex(),ti={blockquote:rc,code:Ql,def:ec,fences:Kl,heading:Xl,hr:pn,html:nc,lheading:La,list:tc,newline:Gl,paragraph:Ra,table:tn,text:Jl},vi=fe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",pn).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[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$n).getRegex(),ic={...ti,lheading:Zl,table:vi,paragraph:fe(Zr).replace("hr",pn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",vi).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$n).getRegex()},sc={...ti,html:fe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ei).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:tn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:fe(Zr).replace("hr",pn).replace("heading",` *#{1,6} *[^
|
|
3
|
-
]`).replace("lheading",La).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/lazy-highlighter-Bva2qxQ8.js","assets/index-D825aBGT.js","assets/index-KJvlasGf.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as U,ag as ea,c as V,j as p,aU as vt,s as ta,K as Me,p as na,a0 as ra,aV as Wo,ac as Go,ai as Qo,at as Ko,ad as $r,ae as Xo,af as Zo,aa as Jo,ah as el}from"./index-D825aBGT.js";import{i as xt}from"./Check-Bn7iaq_h.js";import{u as tl,i as Yr}from"./use-gateway-Cov2sDNb.js";import{i as qr}from"./SearchMd-u2U3iAnY.js";import{I as ia,U as nl,f as rl,c as il,u as sl}from"./use-connection-CJ5nWy0c.js";import{c as ae,u as Et,B as Qe,I as sa}from"./input-CUSLU-5Y.js";import{i as aa}from"./AlertCircle-C-YsmNug.js";import{i as al}from"./error-boundary-swyLIuj9.js";import{i as ul}from"./X-P1RHfgBU.js";import{a as ol,i as ua,c as ll}from"./Grid01-C578o4mm.js";import{T as cl}from"./textarea-DA688jdJ.js";import{u as Bt,c as Vr,b as Wr,T as Gr}from"./project-context-provider-Y7j1MLG3.js";import{u as oa,L as la}from"./localstorage-keys-DCk__Bcu.js";import{a as Qr}from"./Copy01-Cufxb7u1.js";import{i as fl}from"./Terminal-Fj__rdxn.js";import{M as ca}from"./monaco-editor-CXJFCG3L.js";import{b as dl,c as hl,d as ml,A as pl,a as gl,e as El,g as bl,f as Tl}from"./alert-dialog-BApkfnBU.js";import{b as xl,a as _l,c as Al,S as kl}from"./select-BiK6lA7A.js";import{u as Cl}from"./use-mobile-DSucR6ge.js";import{i as Nl}from"./File06-DD5RANl_.js";import{i as Sl}from"./InfoCircle-BkGKY7qc.js";import{u as yl}from"./use-binding-pQGzNysE.js";const fa=({size:t=24,color:e="currentColor",...n})=>U.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},U.createElement("path",{d:"M17.115 15.358c-.27.306-.554.608-.851.905-4.296 4.296-9.678 5.88-12.021 3.536-1.607-1.606-1.368-4.641.325-7.775M6.89 8.725c.281-.32.578-.636.888-.947C12.074 3.482 17.456 1.9 19.8 4.243c1.608 1.607 1.367 4.645-.33 7.781m-3.206-4.246c4.296 4.296 5.88 9.678 3.536 12.021-2.343 2.343-7.725.76-12.02-3.535C3.483 11.968 1.9 6.586 4.244 4.243c2.343-2.343 7.725-.76 12.02 3.535ZM13 12a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"}));fa.displayName="Atom02";const da=({size:t=24,color:e="currentColor",...n})=>U.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},U.createElement("path",{d:"M15.938 15.938A7.001 7.001 0 0 0 15 2a7.001 7.001 0 0 0-6.938 6.062M16 15a7 7 0 1 1-14 0 7 7 0 0 1 14 0Z"}));da.displayName="Coins01";const ha=({size:t=24,color:e="currentColor",...n})=>U.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},U.createElement("path",{d:"M9 14 4 9m0 0 5-5M4 9h6.4c3.36 0 5.04 0 6.324.654a6 6 0 0 1 2.622 2.622C20 13.56 20 15.24 20 18.6V20"}));ha.displayName="CornerUpLeft";const ma=({size:t=24,color:e="currentColor",...n})=>U.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},U.createElement("path",{d:"M6 16a4 4 0 0 0 4 4h4a4 4 0 0 0 0-8h-4a4 4 0 0 1 0-8h4a4 4 0 0 1 4 4m-6-6v20"}));ma.displayName="CurrencyDollar";const pa=({size:t=24,color:e="currentColor",...n})=>U.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},U.createElement("path",{d:"m18 10-4-4M2.5 21.5l3.384-.376c.414-.046.62-.069.814-.131a2 2 0 0 0 .485-.234c.17-.111.317-.259.61-.553L21 7a2.828 2.828 0 1 0-4-4L3.794 16.206c-.294.294-.442.442-.553.611a2 2 0 0 0-.234.485c-.062.193-.085.4-.131.814L2.5 21.5Z"}));pa.displayName="Edit02";const ga=({size:t=24,color:e="currentColor",...n})=>U.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},U.createElement("path",{d:"M16.2 21H6.931c-.605 0-.908 0-1.049-.12a.5.5 0 0 1-.173-.42c.014-.183.228-.397.657-.826l8.503-8.503c.396-.396.594-.594.822-.668a1 1 0 0 1 .618 0c.228.074.426.272.822.668L21 15v1.2M16.2 21c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C21 18.72 21 17.88 21 16.2M16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4M10.5 8.5a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z"}));ga.displayName="Image01";const Ea=({size:t=24,color:e="currentColor",...n})=>U.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},U.createElement("path",{d:"M15 16.5V19c0 .932 0 1.398-.152 1.765a2 2 0 0 1-1.083 1.083C13.398 22 12.932 22 12 22c-.932 0-1.398 0-1.765-.152a2 2 0 0 1-1.083-1.083C9 20.398 9 19.932 9 19v-2.5m6 0c2.649-1.157 4.5-3.925 4.5-7a7.5 7.5 0 0 0-15 0c0 3.075 1.851 5.843 4.5 7m6 0H9"}));Ea.displayName="Lightbulb01";const ba=({size:t=24,color:e="currentColor",...n})=>U.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},U.createElement("path",{d:"m18 8 4 4m0 0-4 4m4-4H9m6-7.796A8.383 8.383 0 0 0 10.667 3C5.88 3 2 7.03 2 12s3.88 9 8.667 9A8.384 8.384 0 0 0 15 19.796"}));ba.displayName="LogOut04";const jn=({size:t=24,color:e="currentColor",...n})=>U.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},U.createElement("path",{d:"m6.5 13 .784 1.569c.266.53.399.796.576 1.026a3 3 0 0 0 .545.545c.23.177.495.31 1.026.575L11 17.5l-1.569.785c-.53.265-.796.398-1.026.575a3 3 0 0 0-.545.545c-.177.23-.31.495-.576 1.026L6.5 22l-.784-1.569c-.266-.53-.399-.796-.576-1.026a3 3 0 0 0-.545-.545c-.23-.177-.495-.31-1.026-.575L2 17.5l1.569-.785c.53-.265.796-.398 1.026-.575a3 3 0 0 0 .545-.545c.177-.23.31-.495.576-1.026L6.5 13ZM15 2l1.179 3.064c.282.734.423 1.1.642 1.409a3 3 0 0 0 .706.706c.309.22.675.36 1.409.642L22 9l-3.064 1.179c-.734.282-1.1.423-1.409.642a3 3 0 0 0-.706.706c-.22.309-.36.675-.642 1.409L15 16l-1.179-3.064c-.282-.734-.423-1.1-.642-1.409a3 3 0 0 0-.706-.706c-.309-.22-.675-.36-1.409-.642L8 9l3.064-1.179c.734-.282 1.1-.423 1.409-.642a3 3 0 0 0 .706-.706c.22-.309.36-.675.642-1.409L15 2Z"}));jn.displayName="Stars01";const Ta=({size:t=24,color:e="currentColor",...n})=>U.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},U.createElement("path",{d:"M3 7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8Z"}));Ta.displayName="Stop";const xa=({size:t=24,color:e="currentColor",...n})=>U.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},U.createElement("path",{d:"M16 8V5l3-3 1 2 2 1-3 3h-3Zm0 0-4 4m10 0c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2m5 10a5 5 0 1 1-5-5"}));xa.displayName="Target04";function vi({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,i]=Il({defaultProp:e,onChange:n}),s=t!==void 0,a=s?t:r,u=ea(n),o=U.useCallback(l=>{if(s){const d=typeof l=="function"?l(t):l;d!==t&&u(d)}else i(l)},[s,t,i,u]);return[a,o]}function Il({defaultProp:t,onChange:e}){const n=U.useState(t),[r]=n,i=U.useRef(r),s=ea(e);return U.useEffect(()=>{i.current!==r&&(s(r),i.current=r)},[r,i,s]),n}function wl(t){const e=V.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=p.jsx(vt.Root,{"data-slot":"drawer",...n}),e[2]=n,e[3]=r):r=e[3],r}function Ll(t){const e=V.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=p.jsx(vt.Trigger,{"data-slot":"drawer-trigger",...n}),e[2]=n,e[3]=r):r=e[3],r}function Rl(t){const e=V.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=p.jsx(vt.Portal,{"data-slot":"drawer-portal",...n}),e[2]=n,e[3]=r):r=e[3],r}function Ol(t){const e=V.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let i;e[3]!==n?(i=ae("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",n),e[3]=n,e[4]=i):i=e[4];let s;return e[5]!==r||e[6]!==i?(s=p.jsx(vt.Overlay,{"data-slot":"drawer-overlay",className:i,...r}),e[5]=r,e[6]=i,e[7]=s):s=e[7],s}function Dl(t){const e=V.c(12);let n,r,i;e[0]!==t?({className:r,children:n,...i}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=i):(n=e[1],r=e[2],i=e[3]);let s;e[4]===Symbol.for("react.memo_cache_sentinel")?(s=p.jsx(Ol,{}),e[4]=s):s=e[4];let a;e[5]!==r?(a=ae("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",r),e[5]=r,e[6]=a):a=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=p.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=u):u=e[7];let o;return e[8]!==n||e[9]!==i||e[10]!==a?(o=p.jsxs(Rl,{"data-slot":"drawer-portal",children:[s,p.jsxs(vt.Content,{"data-slot":"drawer-content",className:a,...i,children:[u,n]})]}),e[8]=n,e[9]=i,e[10]=a,e[11]=o):o=e[11],o}function Pl(t){const e=V.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let i;e[3]!==n?(i=ae("flex flex-col gap-1.5 px-4 py-2",n),e[3]=n,e[4]=i):i=e[4];let s;return e[5]!==r||e[6]!==i?(s=p.jsx("div",{"data-slot":"drawer-header",className:i,...r}),e[5]=r,e[6]=i,e[7]=s):s=e[7],s}function Ml(t){const e=V.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let i;e[3]!==n?(i=ae("text-foreground font-semibold",n),e[3]=n,e[4]=i):i=e[4];let s;return e[5]!==r||e[6]!==i?(s=p.jsx(vt.Title,{"data-slot":"drawer-title",className:i,...r}),e[5]=r,e[6]=i,e[7]=s):s=e[7],s}function vl(){const t=V.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=la.developerMode(),t[0]=e):e=t[0],oa(e,!1)}function _t(t){return new Promise((e,n)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>n(t.error)})}function Bl(t,e){let n;const r=()=>{if(n)return n;const i=indexedDB.open(t);return i.onupgradeneeded=()=>i.result.createObjectStore(e),n=_t(i),n.then(s=>{s.onclose=()=>n=void 0},()=>{}),n};return(i,s)=>r().then(a=>s(a.transaction(e,i).objectStore(e)))}let ir;function zn(){return ir||(ir=Bl("keyval-store","keyval")),ir}function Kr(t,e=zn()){return e("readonly",n=>_t(n.get(t)))}function en(t,e,n=zn()){return n("readwrite",r=>(r.put(e,t),_t(r.transaction)))}function _a(t,e=zn()){return e("readwrite",n=>(n.delete(t),_t(n.transaction)))}function Fl(t,e){return t.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue())},_t(t.transaction)}function Aa(t=zn()){return t("readonly",e=>{if(e.getAll&&e.getAllKeys)return Promise.all([_t(e.getAllKeys()),_t(e.getAll())]).then(([r,i])=>r.map((s,a)=>[s,i[a]]));const n=[];return t("readonly",r=>Fl(r,i=>n.push([i.key,i.value])).then(()=>n))})}async function $b(t,e){const n=`${t}:threads:${e}`;return await Kr(n)??null}async function Hl(t){const e=`${t}:threads:`;return(await Aa()).filter(([i])=>typeof i=="string"&&i.startsWith(e)).map(([,i])=>i).filter(i=>!i.hidden).sort((i,s)=>String(s.updated_at).localeCompare(String(i.updated_at)))}function ka(t,e){const n=`${t}:messages:`;return Aa().then(r=>r.filter(([s])=>typeof s=="string"&&s.startsWith(n)).map(([,s])=>s).filter(s=>s.metadata?.thread_id===e||s.threadId===e).sort((s,a)=>{const u=s.metadata?.created_at||s.createdAt||"",o=a.metadata?.created_at||a.createdAt||"";return String(u).localeCompare(String(o))}))}function Yb(t){const e=V.c(14),{locator:n}=Bt(),r=t?.gatewayId;let i;e[0]!==r||e[1]!==n?(i=Me.threads(n),e[0]=r,e[1]=n,e[2]=i):i=e[2];let s;e[3]!==r||e[4]!==n?(s=async()=>await Hl(n),e[3]=r,e[4]=n,e[5]=s):s=e[5];let a;e[6]!==i||e[7]!==s?(a={queryKey:i,queryFn:s,staleTime:3e4},e[6]=i,e[7]=s,e[8]=a):a=e[8];const{data:u,refetch:o}=na(a);let l;e[9]!==u?(l=u??[],e[9]=u,e[10]=l):l=e[10];let f;return e[11]!==o||e[12]!==l?(f={threads:l,refetch:o},e[11]=o,e[12]=l,e[13]=f):f=e[13],f}function qb(t){const e=V.c(11),{locator:n}=Bt();let r;e[0]!==n||e[1]!==t?(r=Me.threadMessages(n,t),e[0]=n,e[1]=t,e[2]=r):r=e[2];let i;e[3]!==n||e[4]!==t?(i=()=>ka(n,t),e[3]=n,e[4]=t,e[5]=i):i=e[5];let s;e[6]!==r||e[7]!==i?(s={queryKey:r,queryFn:i,staleTime:3e4},e[6]=r,e[7]=i,e[8]=s):s=e[8];const{data:a}=na(s);let u;return e[9]!==a?(u=a??[],e[9]=a,e[10]=u):u=e[10],u}function Ca(){const t=V.c(28),{locator:e}=Bt(),n=ta();let r;t[0]!==e?(r=async C=>{const T=`${e}:threads:${C.id}`;return await en(T,C),C},t[0]=e,t[1]=r):r=t[1];let i;t[2]!==e||t[3]!==n?(i=C=>{n.invalidateQueries({queryKey:Me.threads(e)}),C.gatewayId&&n.invalidateQueries({queryKey:Me.gatewayThreads(e,C.gatewayId)})},t[2]=e,t[3]=n,t[4]=i):i=t[4];let s;t[5]!==r||t[6]!==i?(s={mutationFn:r,onSuccess:i},t[5]=r,t[6]=i,t[7]=s):s=t[7];const a=Et(s);let u;t[8]!==e?(u=async C=>{const{id:T,updates:S}=C,N=`${e}:threads:${T}`,L=await Kr(N);if(!L)throw new Error(`Thread ${T} not found`);const O={...L,...S};return await en(N,O),O},t[8]=e,t[9]=u):u=t[9];let o;t[10]!==e||t[11]!==n?(o=C=>{n.invalidateQueries({queryKey:Me.threads(e)}),n.invalidateQueries({queryKey:Me.thread(e,C.id)}),C.gatewayId&&n.invalidateQueries({queryKey:Me.gatewayThreads(e,C.gatewayId)})},t[10]=e,t[11]=n,t[12]=o):o=t[12];let l;t[13]!==u||t[14]!==o?(l={mutationFn:u,onSuccess:o},t[13]=u,t[14]=o,t[15]=l):l=t[15];const f=Et(l);let d;t[16]!==e?(d=async C=>{const T=`${e}:threads:${C}`;return await _a(T),C},t[16]=e,t[17]=d):d=t[17];let m;t[18]!==e||t[19]!==n?(m=()=>{n.invalidateQueries({queryKey:Me.threads(e)})},t[18]=e,t[19]=n,t[20]=m):m=t[20];let h;t[21]!==d||t[22]!==m?(h={mutationFn:d,onSuccess:m},t[21]=d,t[22]=m,t[23]=h):h=t[23];const g=Et(h);let k;return t[24]!==g||t[25]!==a||t[26]!==f?(k={insert:a,update:f,delete:g},t[24]=g,t[25]=a,t[26]=f,t[27]=k):k=t[27],k}function Ul(){const t=V.c(37),{locator:e}=Bt(),n=ta();let r;t[0]!==e?(r=async L=>{const O=`${e}:messages:${L.id}`;return await en(O,L),L},t[0]=e,t[1]=r):r=t[1];let i;t[2]!==e||t[3]!==n?(i=L=>{const O=L.metadata?.thread_id||L.threadId;O&&n.invalidateQueries({queryKey:Me.threadMessages(e,O)}),n.invalidateQueries({queryKey:Me.messages(e)})},t[2]=e,t[3]=n,t[4]=i):i=t[4];let s;t[5]!==r||t[6]!==i?(s={mutationFn:r,onSuccess:i},t[5]=r,t[6]=i,t[7]=s):s=t[7];const a=Et(s);let u;t[8]!==e?(u=async L=>(await Promise.all(L.map(O=>{const y=`${e}:messages:${O.id}`;return en(y,O)})),L),t[8]=e,t[9]=u):u=t[9];let o;t[10]!==e||t[11]!==n?(o=L=>{const O=new Set;for(const y of L){const j=y.metadata?.thread_id||y.threadId;j&&O.add(j)}for(const y of O)n.invalidateQueries({queryKey:Me.threadMessages(e,y)});n.invalidateQueries({queryKey:Me.messages(e)})},t[10]=e,t[11]=n,t[12]=o):o=t[12];let l;t[13]!==u||t[14]!==o?(l={mutationFn:u,onSuccess:o},t[13]=u,t[14]=o,t[15]=l):l=t[15];const f=Et(l);let d;t[16]!==e?(d=async L=>{const{id:O,updates:y}=L,j=`${e}:messages:${O}`,Y=await Kr(j);if(!Y)throw new Error(`Message ${O} not found`);const q={...Y,...y};return await en(j,q),q},t[16]=e,t[17]=d):d=t[17];let m;t[18]!==e||t[19]!==n?(m=L=>{const O=L.metadata?.thread_id||L.threadId;O&&n.invalidateQueries({queryKey:Me.threadMessages(e,O)}),n.invalidateQueries({queryKey:Me.messages(e)})},t[18]=e,t[19]=n,t[20]=m):m=t[20];let h;t[21]!==d||t[22]!==m?(h={mutationFn:d,onSuccess:m},t[21]=d,t[22]=m,t[23]=h):h=t[23];const g=Et(h);let k;t[24]!==e?(k=async L=>{const O=`${e}:messages:${L}`;return await _a(O),L},t[24]=e,t[25]=k):k=t[25];let C;t[26]!==e||t[27]!==n?(C=()=>{n.invalidateQueries({queryKey:Me.messages(e)})},t[26]=e,t[27]=n,t[28]=C):C=t[28];let T;t[29]!==C||t[30]!==k?(T={mutationFn:k,onSuccess:C},t[29]=C,t[30]=k,t[31]=T):T=t[31];const S=Et(T);let N;return t[32]!==S||t[33]!==a||t[34]!==f||t[35]!==g?(N={insert:a,insertMany:f,update:g,delete:S},t[32]=S,t[33]=a,t[34]=f,t[35]=g,t[36]=N):N=t[36],N}const Na={inputValue:"",branchContext:null,pendingSubmit:!1};function jl(t,e){switch(e.type){case"SET_INPUT":return{...t,inputValue:e.payload};case"START_BRANCH":return{...t,branchContext:e.payload};case"CLEAR_BRANCH":return{...t,branchContext:null};case"SET_PENDING_SUBMIT":return{...t,pendingSubmit:e.payload};case"RESET":return Na;default:return t}}const Sa=U.createContext(null),ya=()=>crypto.randomUUID();function zl(t){const e=V.c(16),{children:n}=t,{locator:r}=Bt(),[i,s]=U.useReducer(jl,Na),a=Ca(),[u,o]=oa(la.threadManagerState(r)+":active-id",$l);let l;e[0]!==o||e[1]!==a?(l=C=>{const T=C?.id||crypto.randomUUID(),S=new Date().toISOString(),N={id:T,title:C?.title||"",created_at:C?.created_at||S,updated_at:C?.updated_at||S,hidden:C?.hidden??!1,gatewayId:C?.gatewayId};return a.insert.mutate(N),o(T),N},e[0]=o,e[1]=a,e[2]=l):l=e[2];const f=l;let d;e[3]!==u||e[4]!==o||e[5]!==a?(d=C=>{a.update.mutate({id:C,updates:{hidden:!0,updated_at:new Date().toISOString()}}),u===C&&o(ya())},e[3]=u,e[4]=o,e[5]=a,e[6]=d):d=e[6];const m=d;let h;e[7]!==u||e[8]!==f||e[9]!==m||e[10]!==i||e[11]!==o?(h={interactionState:i,interactionDispatch:s,activeThreadId:u,createThread:f,setActiveThreadId:o,hideThread:m},e[7]=u,e[8]=f,e[9]=m,e[10]=i,e[11]=o,e[12]=h):h=e[12];const g=h;let k;return e[13]!==n||e[14]!==g?(k=p.jsx(Sa.Provider,{value:g,children:n}),e[13]=n,e[14]=g,e[15]=k):k=e[15],k}function $l(t){return t||ya()}function Yl(){const t=V.c(19),e=U.useContext(Sa);if(!e)throw new Error("useChat must be used within a ChatProvider");const{interactionState:n,interactionDispatch:r}=e;let i,s,a,u,o;t[0]!==r?(i=f=>r({type:"SET_INPUT",payload:f}),s=f=>r({type:"START_BRANCH",payload:f}),a=()=>r({type:"CLEAR_BRANCH"}),u=f=>r({type:"SET_PENDING_SUBMIT",payload:f}),o=()=>r({type:"RESET"}),t[0]=r,t[1]=i,t[2]=s,t[3]=a,t[4]=u,t[5]=o):(i=t[1],s=t[2],a=t[3],u=t[4],o=t[5]);let l;return t[6]!==e.activeThreadId||t[7]!==e.createThread||t[8]!==e.hideThread||t[9]!==e.setActiveThreadId||t[10]!==n.branchContext||t[11]!==n.inputValue||t[12]!==n.pendingSubmit||t[13]!==i||t[14]!==s||t[15]!==a||t[16]!==u||t[17]!==o?(l={inputValue:n.inputValue,branchContext:n.branchContext,pendingSubmit:n.pendingSubmit,setInputValue:i,startBranch:s,clearBranch:a,setPendingSubmit:u,reset:o,activeThreadId:e.activeThreadId,createThread:e.createThread,setActiveThreadId:e.setActiveThreadId,hideThread:e.hideThread},t[6]=e.activeThreadId,t[7]=e.createThread,t[8]=e.hideThread,t[9]=e.setActiveThreadId,t[10]=n.branchContext,t[11]=n.inputValue,t[12]=n.pendingSubmit,t[13]=i,t[14]=s,t[15]=a,t[16]=u,t[17]=o,t[18]=l):l=t[18],l}function ql(t){const e=V.c(66),{value:n,onChange:r,onSubmit:i,onStop:s,disabled:a,isStreaming:u,placeholder:o,className:l,centered:f,contextContent:d,leftActions:m,rightActions:h,maxTextHeight:g,children:k}=t,C=o===void 0?"Ask anything or @ for context":o,T=g===void 0?"164px":g;let S;e[0]!==a||e[1]!==u||e[2]!==n?(S=!a&&!u&&n.trim().length>0,e[0]=a,e[1]=u,e[2]=n,e[3]=S):S=e[3];const N=S;let L;e[4]!==N||e[5]!==u||e[6]!==s||e[7]!==i?(L=be=>{be.preventDefault(),u&&s?s():N&&i()},e[4]=N,e[5]=u,e[6]=s,e[7]=i,e[8]=L):L=e[8];const O=L;let y;e[9]!==N||e[10]!==i?(y=be=>{be.key==="Enter"&&!be.shiftKey&&(be.preventDefault(),N&&i())},e[9]=N,e[10]=i,e[11]=y):y=e[11];const j=y;let Y;e[12]!==l?(Y=ae("w-full",l),e[12]=l,e[13]=Y):Y=e[13];let q;e[14]===Symbol.for("react.memo_cache_sentinel")?(q=ae("relative rounded-xl border border-border bg-background w-full min-h-[130px] flex flex-col"),e[14]=q):q=e[14];let I;e[15]!==d?(I=d&&p.jsx("div",{className:"mb-1",children:d}),e[15]=d,e[16]=I):I=e[16];let B;e[17]!==T?(B={maxHeight:T},e[17]=T,e[18]=B):B=e[18];let F;e[19]!==r?(F=be=>r(be.target.value),e[19]=r,e[20]=F):F=e[20];const G=a||u;let z;e[21]===Symbol.for("react.memo_cache_sentinel")?(z=ae("placeholder:text-muted-foreground resize-none focus-visible:ring-0 border-0 p-2 !text-[15px] min-h-[20px] w-full","rounded-none shadow-none"),e[21]=z):z=e[21];let M;e[22]===Symbol.for("react.memo_cache_sentinel")?(M={minHeight:"20px",height:"auto",overflow:"hidden"},e[22]=M):M=e[22];let W;e[23]!==j||e[24]!==C||e[25]!==F||e[26]!==G||e[27]!==n?(W=p.jsx(cl,{value:n,onChange:F,onKeyDown:j,placeholder:C,disabled:G,className:z,rows:1,style:M}),e[23]=j,e[24]=C,e[25]=F,e[26]=G,e[27]=n,e[28]=W):W=e[28];let K;e[29]!==B||e[30]!==W?(K=p.jsx("div",{className:"overflow-y-auto relative flex-1",style:B,children:W}),e[29]=B,e[30]=W,e[31]=K):K=e[31];let te;e[32]!==K||e[33]!==I?(te=p.jsxs("div",{className:"relative flex flex-col gap-2 p-2.5 flex-1",children:[I,K]}),e[32]=K,e[33]=I,e[34]=te):te=e[34];let J;e[35]!==k||e[36]!==m?(J=p.jsxs("div",{className:"flex items-center overflow-hidden gap-2 min-w-0",children:[m,k]}),e[35]=k,e[36]=m,e[37]=J):J=e[37];const A=u?"button":"submit";let Z;e[38]!==u||e[39]!==s?(Z=be=>{u&&(be.preventDefault(),be.stopPropagation(),s?.())},e[38]=u,e[39]=s,e[40]=Z):Z=e[40];const le=N||u?"default":"ghost",x=!N&&!u,ue=!N&&!u&&"bg-muted text-muted-foreground hover:bg-muted hover:text-muted-foreground cursor-not-allowed";let he;e[41]!==ue?(he=ae("size-8 rounded-full transition-all",ue),e[41]=ue,e[42]=he):he=e[42];const ce=u?"Stop generating":"Send message (Enter)";let ke;e[43]!==u?(ke=u?p.jsx(Ta,{size:20}):p.jsx(ol,{size:20}),e[43]=u,e[44]=ke):ke=e[44];let Ee;e[45]!==A||e[46]!==Z||e[47]!==le||e[48]!==x||e[49]!==he||e[50]!==ce||e[51]!==ke?(Ee=p.jsx(Qe,{type:A,onClick:Z,variant:le,size:"icon",disabled:x,className:he,title:ce,children:ke}),e[45]=A,e[46]=Z,e[47]=le,e[48]=x,e[49]=he,e[50]=ce,e[51]=ke,e[52]=Ee):Ee=e[52];let xe;e[53]!==h||e[54]!==Ee?(xe=p.jsxs("div",{className:"flex items-center gap-1",children:[h,Ee]}),e[53]=h,e[54]=Ee,e[55]=xe):xe=e[55];let me;e[56]!==J||e[57]!==xe?(me=p.jsxs("div",{className:"flex items-center justify-between p-2.5",children:[J,xe]}),e[56]=J,e[57]=xe,e[58]=me):me=e[58];let Ae;e[59]!==te||e[60]!==me?(Ae=p.jsxs("div",{className:q,children:[te,me]}),e[59]=te,e[60]=me,e[61]=Ae):Ae=e[61];let Ie;return e[62]!==O||e[63]!==Ae||e[64]!==Y?(Ie=p.jsx("form",{onSubmit:O,className:Y,children:Ae}),e[62]=O,e[63]=Ae,e[64]=Y,e[65]=Ie):Ie=e[65],Ie}function Vl(){const t=V.c(3),[e,n]=U.useState(!1);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=async a=>{await navigator.clipboard.writeText(a),n(!0),setTimeout(()=>n(!1),2e3)},t[0]=r):r=t[0];const i=r;let s;return t[1]!==e?(s={handleCopy:i,copied:e},t[1]=e,t[2]=s):s=t[2],s}function Xr(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ct=Xr();function Ia(t){Ct=t}var tn={exec:()=>null};function fe(t,e=""){let n=typeof t=="string"?t:t.source;const r={replace:(i,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(Be.caret,"$1"),n=n.replace(i,a),r},getRegex:()=>new RegExp(n,e)};return r}var Be={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,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ 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,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},Wl=/^(?:[ \t]*(?:\n|$))+/,Gl=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ql=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,pn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Kl=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Zr=/(?:[*+-]|\d{1,9}[.)])/,wa=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,La=fe(wa).replace(/bull/g,Zr).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(),Xl=fe(wa).replace(/bull/g,Zr).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(),Jr=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Zl=/^[^\n]+/,ei=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Jl=fe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ei).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ec=fe(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Zr).getRegex(),$n="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",ti=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,tc=fe("^ {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",ti).replace("tag",$n).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ra=fe(Jr).replace("hr",pn).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[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$n).getRegex(),nc=fe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ra).getRegex(),ni={blockquote:nc,code:Gl,def:Jl,fences:Ql,heading:Kl,hr:pn,html:tc,lheading:La,list:ec,newline:Wl,paragraph:Ra,table:tn,text:Zl},Bi=fe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",pn).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[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$n).getRegex(),rc={...ni,lheading:Xl,table:Bi,paragraph:fe(Jr).replace("hr",pn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Bi).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$n).getRegex()},ic={...ni,html:fe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ti).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:tn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:fe(Jr).replace("hr",pn).replace("heading",` *#{1,6} *[^
|
|
3
|
+
]`).replace("lheading",La).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},sc=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ac=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Oa=/^( {2,}|\\)\n(?!\s*$)/,uc=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Yn=/[\p{P}\p{S}]/u,ri=/[\s\p{P}\p{S}]/u,Da=/[^\s\p{P}\p{S}]/u,oc=fe(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ri).getRegex(),Pa=/(?!~)[\p{P}\p{S}]/u,lc=/(?!~)[\s\p{P}\p{S}]/u,cc=/(?:[^\s\p{P}\p{S}]|~)/u,fc=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Ma=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,dc=fe(Ma,"u").replace(/punct/g,Yn).getRegex(),hc=fe(Ma,"u").replace(/punct/g,Pa).getRegex(),va="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",mc=fe(va,"gu").replace(/notPunctSpace/g,Da).replace(/punctSpace/g,ri).replace(/punct/g,Yn).getRegex(),pc=fe(va,"gu").replace(/notPunctSpace/g,cc).replace(/punctSpace/g,lc).replace(/punct/g,Pa).getRegex(),gc=fe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Da).replace(/punctSpace/g,ri).replace(/punct/g,Yn).getRegex(),Ec=fe(/\\(punct)/,"gu").replace(/punct/g,Yn).getRegex(),bc=fe(/^<(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(),Tc=fe(ti).replace("(?:-->|$)","-->").getRegex(),xc=fe("^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",Tc).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),On=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,_c=fe(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",On).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Ba=fe(/^!?\[(label)\]\[(ref)\]/).replace("label",On).replace("ref",ei).getRegex(),Fa=fe(/^!?\[(ref)\](?:\[\])?/).replace("ref",ei).getRegex(),Ac=fe("reflink|nolink(?!\\()","g").replace("reflink",Ba).replace("nolink",Fa).getRegex(),ii={_backpedal:tn,anyPunctuation:Ec,autolink:bc,blockSkip:fc,br:Oa,code:ac,del:tn,emStrongLDelim:dc,emStrongRDelimAst:mc,emStrongRDelimUnd:gc,escape:sc,link:_c,nolink:Fa,punctuation:oc,reflink:Ba,reflinkSearch:Ac,tag:xc,text:uc,url:tn},kc={...ii,link:fe(/^!?\[(label)\]\((.*?)\)/).replace("label",On).getRegex(),reflink:fe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",On).getRegex()},Cr={...ii,emStrongRDelimAst:pc,emStrongLDelim:hc,url:fe(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").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~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Cc={...Cr,br:fe(Oa).replace("{2,}","*").getRegex(),text:fe(Cr.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},An={normal:ni,gfm:rc,pedantic:ic},qt={normal:ii,gfm:Cr,breaks:Cc,pedantic:kc},Nc={"&":"&","<":"<",">":">",'"':""","'":"'"},Fi=t=>Nc[t];function Xe(t,e){if(e){if(Be.escapeTest.test(t))return t.replace(Be.escapeReplace,Fi)}else if(Be.escapeTestNoEncode.test(t))return t.replace(Be.escapeReplaceNoEncode,Fi);return t}function Hi(t){try{t=encodeURI(t).replace(Be.percentDecode,"%")}catch{return null}return t}function Ui(t,e){const n=t.replace(Be.findPipe,(s,a,u)=>{let o=!1,l=a;for(;--l>=0&&u[l]==="\\";)o=!o;return o?"|":" |"}),r=n.split(Be.splitPipe);let i=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(Be.slashPipe,"|");return r}function Vt(t,e,n){const r=t.length;if(r===0)return"";let i=0;for(;i<r&&t.charAt(r-i-1)===e;)i++;return t.slice(0,r-i)}function Sc(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let r=0;r<t.length;r++)if(t[r]==="\\")r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return n>0?-2:-1}function ji(t,e,n,r,i){const s=e.href,a=e.title||null,u=t[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;const o={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:s,title:a,text:u,tokens:r.inlineTokens(u)};return r.state.inLink=!1,o}function yc(t,e,n){const r=t.match(n.other.indentCodeCompensation);if(r===null)return e;const i=r[1];return e.split(`
|
|
4
4
|
`).map(s=>{const a=s.match(n.other.beginningSpace);if(a===null)return s;const[u]=a;return u.length>=i.length?s.slice(i.length):s}).join(`
|
|
5
|
-
`)}var Dn=class{options;rules;lexer;constructor(t){this.options=t||
|
|
6
|
-
`)}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const n=e[0],r=
|
|
5
|
+
`)}var Dn=class{options;rules;lexer;constructor(t){this.options=t||Ct}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Vt(n,`
|
|
6
|
+
`)}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const n=e[0],r=yc(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){const r=Vt(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:Vt(e[0],`
|
|
7
7
|
`)}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){let n=Vt(e[0],`
|
|
8
8
|
`).split(`
|
|
9
9
|
`),r="",i="";const s=[];for(;n.length>0;){let a=!1;const u=[];let o;for(o=0;o<n.length;o++)if(this.rules.other.blockquoteStart.test(n[o]))u.push(n[o]),a=!0;else if(!a)u.push(n[o]);else break;n=n.slice(o);const l=u.join(`
|
|
@@ -22,9 +22,9 @@ ${f}`:f;const d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.block
|
|
|
22
22
|
`,1)[0];let j;if(m=y,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),j=m):j=m.replace(this.rules.other.tabCharGlobal," "),N.test(m)||L.test(m)||O.test(m)||T.test(m)||S.test(m))break;if(j.search(this.rules.other.nonSpaceChar)>=g||!m.trim())f+=`
|
|
23
23
|
`+j.slice(g);else{if(h||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||N.test(d)||L.test(d)||S.test(d))break;f+=`
|
|
24
24
|
`+m}!h&&!m.trim()&&(h=!0),l+=y+`
|
|
25
|
-
`,t=t.substring(y.length+1),d=j.slice(g)}}i.loose||(a?i.loose=!0:this.rules.other.doubleBlankLine.test(l)&&(a=!0));let k=null,C;this.options.gfm&&(k=this.rules.other.listIsTask.exec(f),k&&(C=k[0]!=="[ ] ",f=f.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:l,task:!!k,checked:C,loose:!1,text:f,tokens:[]}),i.raw+=l}const u=i.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let o=0;o<i.items.length;o++)if(this.lexer.state.top=!1,i.items[o].tokens=this.lexer.blockTokens(i.items[o].text,[]),!i.loose){const l=i.items[o].tokens.filter(d=>d.type==="space"),f=l.length>0&&l.some(d=>this.rules.other.anyLine.test(d.raw));i.loose=f}if(i.loose)for(let o=0;o<i.items.length;o++)i.items[o].loose=!0;return i}}html(t){const e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){const e=this.rules.block.def.exec(t);if(e){const n=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:e[0],href:r,title:i}}}table(t){const e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;const n=
|
|
26
|
-
`):[],s={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const a of r)this.rules.other.tableAlignRight.test(a)?s.align.push("right"):this.rules.other.tableAlignCenter.test(a)?s.align.push("center"):this.rules.other.tableAlignLeft.test(a)?s.align.push("left"):s.align.push(null);for(let a=0;a<n.length;a++)s.header.push({text:n[a],tokens:this.lexer.inline(n[a]),header:!0,align:s.align[a]});for(const a of i)s.rows.push(
|
|
27
|
-
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){const e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){const e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){const e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){const e=this.rules.inline.link.exec(t);if(e){const n=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;const s=Vt(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{const s=
|
|
25
|
+
`,t=t.substring(y.length+1),d=j.slice(g)}}i.loose||(a?i.loose=!0:this.rules.other.doubleBlankLine.test(l)&&(a=!0));let k=null,C;this.options.gfm&&(k=this.rules.other.listIsTask.exec(f),k&&(C=k[0]!=="[ ] ",f=f.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:l,task:!!k,checked:C,loose:!1,text:f,tokens:[]}),i.raw+=l}const u=i.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let o=0;o<i.items.length;o++)if(this.lexer.state.top=!1,i.items[o].tokens=this.lexer.blockTokens(i.items[o].text,[]),!i.loose){const l=i.items[o].tokens.filter(d=>d.type==="space"),f=l.length>0&&l.some(d=>this.rules.other.anyLine.test(d.raw));i.loose=f}if(i.loose)for(let o=0;o<i.items.length;o++)i.items[o].loose=!0;return i}}html(t){const e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){const e=this.rules.block.def.exec(t);if(e){const n=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:e[0],href:r,title:i}}}table(t){const e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;const n=Ui(e[1]),r=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
26
|
+
`):[],s={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const a of r)this.rules.other.tableAlignRight.test(a)?s.align.push("right"):this.rules.other.tableAlignCenter.test(a)?s.align.push("center"):this.rules.other.tableAlignLeft.test(a)?s.align.push("left"):s.align.push(null);for(let a=0;a<n.length;a++)s.header.push({text:n[a],tokens:this.lexer.inline(n[a]),header:!0,align:s.align[a]});for(const a of i)s.rows.push(Ui(a,s.header.length).map((u,o)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:s.align[o]})));return s}}lheading(t){const e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){const e=this.rules.block.paragraph.exec(t);if(e){const n=e[1].charAt(e[1].length-1)===`
|
|
27
|
+
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){const e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){const e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){const e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){const e=this.rules.inline.link.exec(t);if(e){const n=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;const s=Vt(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{const s=Sc(e[2],"()");if(s===-2)return;if(s>-1){const u=(e[0].indexOf("!")===0?5:4)+e[1].length+s;e[2]=e[2].substring(0,s),e[0]=e[0].substring(0,u).trim(),e[3]=""}}let r=e[2],i="";if(this.options.pedantic){const s=this.rules.other.pedanticHrefTitle.exec(r);s&&(r=s[1],i=s[3])}else i=e[3]?e[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)),ji(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){const r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[r.toLowerCase()];if(!i){const s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return ji(n,i,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let r=this.rules.inline.emStrongLDelim.exec(t);if(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const s=[...r[0]].length-1;let a,u,o=s,l=0;const f=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,e=e.slice(-1*t.length+s);(r=f.exec(e))!=null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(u=[...a].length,r[3]||r[4]){o+=u;continue}else if((r[5]||r[6])&&s%3&&!((s+u)%3)){l+=u;continue}if(o-=u,o>0)continue;u=Math.min(u,u+o+l);const d=[...r[0]][0].length,m=t.slice(0,s+r.index+d+u);if(Math.min(s,u)%2){const g=m.slice(1,-1);return{type:"em",raw:m,text:g,tokens:this.lexer.inlineTokens(g)}}const h=m.slice(2,-2);return{type:"strong",raw:m,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," ");const 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:e[0],text:n}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){const e=this.rules.inline.autolink.exec(t);if(e){let n,r;return e[2]==="@"?(n=e[1],r="mailto:"+n):(n=e[1],r=n),{type:"link",raw:e[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let n,r;if(e[2]==="@")n=e[0],r="mailto:"+n;else{let i;do i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(i!==e[0]);n=e[0],e[1]==="www."?r="http://"+e[0]:r=e[0]}return{type:"link",raw:e[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){const e=this.rules.inline.text.exec(t);if(e){const n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:n}}}},st=class Nr{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Ct,this.options.tokenizer=this.options.tokenizer||new Dn,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={other:Be,block:An.normal,inline:qt.normal};this.options.pedantic?(n.block=An.pedantic,n.inline=qt.pedantic):this.options.gfm&&(n.block=An.gfm,this.options.breaks?n.inline=qt.breaks:n.inline=qt.gfm),this.tokenizer.rules=n}static get rules(){return{block:An,inline:qt}}static lex(e,n){return new Nr(n).lex(e)}static lexInline(e,n){return new Nr(n).inlineTokens(e)}lex(e){e=e.replace(Be.carriageReturn,`
|
|
28
28
|
`),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){const r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],r=!1){for(this.options.pedantic&&(e=e.replace(Be.tabCharGlobal," ").replace(Be.spaceLine,""));e;){let i;if(this.options.extensions?.block?.some(a=>(i=a.call({lexer:this},e,n))?(e=e.substring(i.raw.length),n.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);const a=n.at(-1);i.raw.length===1&&a!==void 0?a.raw+=`
|
|
29
29
|
`:n.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);const a=n.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=`
|
|
30
30
|
`+i.raw,a.text+=`
|
|
@@ -34,7 +34,7 @@ ${f}`:f;const d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.block
|
|
|
34
34
|
`+i.raw,a.text+=`
|
|
35
35
|
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(i),r=s.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);const a=n.at(-1);a?.type==="text"?(a.raw+=`
|
|
36
36
|
`+i.raw,a.text+=`
|
|
37
|
-
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(i);continue}if(e){const a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){let r=e,i=null;if(this.tokens.links){const u=Object.keys(this.tokens.links);if(u.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)u.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);for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let s=!1,a="";for(;e;){s||(a=""),s=!1;let u;if(this.options.extensions?.inline?.some(l=>(u=l.call({lexer:this},e,n))?(e=e.substring(u.raw.length),n.push(u),!0):!1))continue;if(u=this.tokenizer.escape(e)){e=e.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.tag(e)){e=e.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.link(e)){e=e.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(u.raw.length);const l=n.at(-1);u.type==="text"&&l?.type==="text"?(l.raw+=u.raw,l.text+=u.text):n.push(u);continue}if(u=this.tokenizer.emStrong(e,r,a)){e=e.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.codespan(e)){e=e.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.br(e)){e=e.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.del(e)){e=e.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.autolink(e)){e=e.substring(u.raw.length),n.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(e))){e=e.substring(u.raw.length),n.push(u);continue}let o=e;if(this.options.extensions?.startInline){let l=1/0;const f=e.slice(1);let d;this.options.extensions.startInline.forEach(m=>{d=m.call({lexer:this},f),typeof d=="number"&&d>=0&&(l=Math.min(l,d))}),l<1/0&&l>=0&&(o=e.substring(0,l+1))}if(u=this.tokenizer.inlineText(o)){e=e.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(a=u.raw.slice(-1)),s=!0;const l=n.at(-1);l?.type==="text"?(l.raw+=u.raw,l.text+=u.text):n.push(u);continue}if(e){const l="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return n}},Pn=class{options;parser;constructor(t){this.options=t||
|
|
37
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(i);continue}if(e){const a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){let r=e,i=null;if(this.tokens.links){const u=Object.keys(this.tokens.links);if(u.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)u.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);for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let s=!1,a="";for(;e;){s||(a=""),s=!1;let u;if(this.options.extensions?.inline?.some(l=>(u=l.call({lexer:this},e,n))?(e=e.substring(u.raw.length),n.push(u),!0):!1))continue;if(u=this.tokenizer.escape(e)){e=e.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.tag(e)){e=e.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.link(e)){e=e.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(u.raw.length);const l=n.at(-1);u.type==="text"&&l?.type==="text"?(l.raw+=u.raw,l.text+=u.text):n.push(u);continue}if(u=this.tokenizer.emStrong(e,r,a)){e=e.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.codespan(e)){e=e.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.br(e)){e=e.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.del(e)){e=e.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.autolink(e)){e=e.substring(u.raw.length),n.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(e))){e=e.substring(u.raw.length),n.push(u);continue}let o=e;if(this.options.extensions?.startInline){let l=1/0;const f=e.slice(1);let d;this.options.extensions.startInline.forEach(m=>{d=m.call({lexer:this},f),typeof d=="number"&&d>=0&&(l=Math.min(l,d))}),l<1/0&&l>=0&&(o=e.substring(0,l+1))}if(u=this.tokenizer.inlineText(o)){e=e.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(a=u.raw.slice(-1)),s=!0;const l=n.at(-1);l?.type==="text"?(l.raw+=u.raw,l.text+=u.text):n.push(u);continue}if(e){const l="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return n}},Pn=class{options;parser;constructor(t){this.options=t||Ct}space(t){return""}code({text:t,lang:e,escaped:n}){const r=(e||"").match(Be.notSpaceStart)?.[0],i=t.replace(Be.endingNewline,"")+`
|
|
38
38
|
`;return r?'<pre><code class="language-'+Xe(r)+'">'+(n?i:Xe(i,!0))+`</code></pre>
|
|
39
39
|
`:"<pre><code>"+(n?i:Xe(i,!0))+`</code></pre>
|
|
40
40
|
`}blockquote({tokens:t}){return`<blockquote>
|
|
@@ -52,37 +52,37 @@ ${this.parser.parse(t)}</blockquote>
|
|
|
52
52
|
`}tablerow({text:t}){return`<tr>
|
|
53
53
|
${t}</tr>
|
|
54
54
|
`}tablecell(t){const e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>
|
|
55
|
-
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Xe(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:n}){const r=this.parser.parseInline(n),i=
|
|
56
|
-
`+this.renderer.text(u);n?r+=this.renderer.paragraph({type:"paragraph",raw:o,text:o,tokens:[{type:"text",raw:o,text:o,escaped:!0}]}):r+=o;continue}default:{const u='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return r}parseInline(e,n=this.renderer){let r="";for(let i=0;i<e.length;i++){const s=e[i];if(this.options.extensions?.renderers?.[s.type]){const u=this.options.extensions.renderers[s.type].call({parser:this},s);if(u!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){r+=u||"";continue}}const a=s;switch(a.type){case"escape":{r+=n.text(a);break}case"html":{r+=n.html(a);break}case"link":{r+=n.link(a);break}case"image":{r+=n.image(a);break}case"strong":{r+=n.strong(a);break}case"em":{r+=n.em(a);break}case"codespan":{r+=n.codespan(a);break}case"br":{r+=n.br(a);break}case"del":{r+=n.del(a);break}case"text":{r+=n.text(a);break}default:{const u='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return r}},In=class{options;block;constructor(t){this.options=t||
|
|
57
|
-
Please report this to https://github.com/markedjs/marked.`,t){const r="<p>An error occurred:</p><pre>"+Xe(n.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(n);throw n}}},At=new wc;function de(t,e){return At.parse(t,e)}de.options=de.setOptions=function(t){return At.setOptions(t),de.defaults=At.defaults,Ia(de.defaults),de};de.getDefaults=Kr;de.defaults=Nt;de.use=function(...t){return At.use(...t),de.defaults=At.defaults,Ia(de.defaults),de};de.walkTokens=function(t,e){return At.walkTokens(t,e)};de.parseInline=At.parseInline;de.Parser=at;de.parser=at.parse;de.Renderer=Pn;de.TextRenderer=ii;de.Lexer=st;de.lexer=st.lex;de.Tokenizer=Dn;de.Hooks=In;de.parse=de;de.options;de.setOptions;de.use;de.walkTokens;de.parseInline;at.parse;st.lex;function ji(t){const e=[],n=String(t||"");let r=n.indexOf(","),i=0,s=!1;for(;!s;){r===-1&&(r=n.length,s=!0);const a=n.slice(i,r).trim();(a||!s)&&e.push(a),i=r+1,r=n.indexOf(",",i)}return e}function Ha(t,e){const n={};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Lc=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Rc=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Oc={};function zi(t,e){return(Oc.jsx?Rc:Lc).test(t)}const Dc=/[ \t\n\f\r]/g;function Pc(t){return typeof t=="object"?t.type==="text"?$i(t.value):!1:$i(t)}function $i(t){return t.replace(Dc,"")===""}class gn{constructor(e,n,r){this.normal=n,this.property=e,r&&(this.space=r)}}gn.prototype.normal={};gn.prototype.property={};gn.prototype.space=void 0;function Ua(t,e){const n={},r={};for(const i of t)Object.assign(n,i.property),Object.assign(r,i.normal);return new gn(n,r,e)}function fn(t){return t.toLowerCase()}class je{constructor(e,n){this.attribute=n,this.property=e}}je.prototype.attribute="";je.prototype.booleanish=!1;je.prototype.boolean=!1;je.prototype.commaOrSpaceSeparated=!1;je.prototype.commaSeparated=!1;je.prototype.defined=!1;je.prototype.mustUseProperty=!1;je.prototype.number=!1;je.prototype.overloadedBoolean=!1;je.prototype.property="";je.prototype.spaceSeparated=!1;je.prototype.space=void 0;let Mc=0;const ee=St(),Ne=St(),yr=St(),H=St(),Te=St(),Dt=St(),$e=St();function St(){return 2**++Mc}const Ir=Object.freeze(Object.defineProperty({__proto__:null,boolean:ee,booleanish:Ne,commaOrSpaceSeparated:$e,commaSeparated:Dt,number:H,overloadedBoolean:yr,spaceSeparated:Te},Symbol.toStringTag,{value:"Module"})),sr=Object.keys(Ir);class si extends je{constructor(e,n,r,i){let s=-1;if(super(e,n),Yi(this,"space",i),typeof r=="number")for(;++s<sr.length;){const a=sr[s];Yi(this,sr[s],(r&Ir[a])===Ir[a])}}}si.prototype.defined=!0;function Yi(t,e,n){n&&(t[e]=n)}function Ft(t){const e={},n={};for(const[r,i]of Object.entries(t.properties)){const s=new si(r,t.transform(t.attributes||{},r),i,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),e[r]=s,n[fn(r)]=r,n[fn(s.attribute)]=r}return new gn(e,n,t.space)}const ja=Ft({properties:{ariaActiveDescendant:null,ariaAtomic:Ne,ariaAutoComplete:null,ariaBusy:Ne,ariaChecked:Ne,ariaColCount:H,ariaColIndex:H,ariaColSpan:H,ariaControls:Te,ariaCurrent:null,ariaDescribedBy:Te,ariaDetails:null,ariaDisabled:Ne,ariaDropEffect:Te,ariaErrorMessage:null,ariaExpanded:Ne,ariaFlowTo:Te,ariaGrabbed:Ne,ariaHasPopup:null,ariaHidden:Ne,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Te,ariaLevel:H,ariaLive:null,ariaModal:Ne,ariaMultiLine:Ne,ariaMultiSelectable:Ne,ariaOrientation:null,ariaOwns:Te,ariaPlaceholder:null,ariaPosInSet:H,ariaPressed:Ne,ariaReadOnly:Ne,ariaRelevant:null,ariaRequired:Ne,ariaRoleDescription:Te,ariaRowCount:H,ariaRowIndex:H,ariaRowSpan:H,ariaSelected:Ne,ariaSetSize:H,ariaSort:null,ariaValueMax:H,ariaValueMin:H,ariaValueNow:H,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function za(t,e){return e in t?t[e]:e}function $a(t,e){return za(t,e.toLowerCase())}const vc=Ft({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Dt,acceptCharset:Te,accessKey:Te,action:null,allow:null,allowFullScreen:ee,allowPaymentRequest:ee,allowUserMedia:ee,alt:null,as:null,async:ee,autoCapitalize:null,autoComplete:Te,autoFocus:ee,autoPlay:ee,blocking:Te,capture:null,charSet:null,checked:ee,cite:null,className:Te,cols:H,colSpan:null,content:null,contentEditable:Ne,controls:ee,controlsList:Te,coords:H|Dt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ee,defer:ee,dir:null,dirName:null,disabled:ee,download:yr,draggable:Ne,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ee,formTarget:null,headers:Te,height:H,hidden:yr,high:H,href:null,hrefLang:null,htmlFor:Te,httpEquiv:Te,id:null,imageSizes:null,imageSrcSet:null,inert:ee,inputMode:null,integrity:null,is:null,isMap:ee,itemId:null,itemProp:Te,itemRef:Te,itemScope:ee,itemType:Te,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ee,low:H,manifest:null,max:null,maxLength:H,media:null,method:null,min:null,minLength:H,multiple:ee,muted:ee,name:null,nonce:null,noModule:ee,noValidate:ee,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:ee,optimum:H,pattern:null,ping:Te,placeholder:null,playsInline:ee,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ee,referrerPolicy:null,rel:Te,required:ee,reversed:ee,rows:H,rowSpan:H,sandbox:Te,scope:null,scoped:ee,seamless:ee,selected:ee,shadowRootClonable:ee,shadowRootDelegatesFocus:ee,shadowRootMode:null,shape:null,size:H,sizes:null,slot:null,span:H,spellCheck:Ne,src:null,srcDoc:null,srcLang:null,srcSet:null,start:H,step:null,style:null,tabIndex:H,target:null,title:null,translate:null,type:null,typeMustMatch:ee,useMap:null,value:Ne,width:H,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Te,axis:null,background:null,bgColor:null,border:H,borderColor:null,bottomMargin:H,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ee,declare:ee,event:null,face:null,frame:null,frameBorder:null,hSpace:H,leftMargin:H,link:null,longDesc:null,lowSrc:null,marginHeight:H,marginWidth:H,noResize:ee,noHref:ee,noShade:ee,noWrap:ee,object:null,profile:null,prompt:null,rev:null,rightMargin:H,rules:null,scheme:null,scrolling:Ne,standby:null,summary:null,text:null,topMargin:H,valueType:null,version:null,vAlign:null,vLink:null,vSpace:H,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ee,disableRemotePlayback:ee,prefix:null,property:null,results:H,security:null,unselectable:null},space:"html",transform:$a}),Bc=Ft({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:$e,accentHeight:H,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:H,amplitude:H,arabicForm:null,ascent:H,attributeName:null,attributeType:null,azimuth:H,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:H,by:null,calcMode:null,capHeight:H,className:Te,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:H,diffuseConstant:H,direction:null,display:null,dur:null,divisor:H,dominantBaseline:null,download:ee,dx:null,dy:null,edgeMode:null,editable:null,elevation:H,enableBackground:null,end:null,event:null,exponent:H,externalResourcesRequired:null,fill:null,fillOpacity:H,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:Dt,g2:Dt,glyphName:Dt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:H,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:H,horizOriginX:H,horizOriginY:H,id:null,ideographic:H,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:H,k:H,k1:H,k2:H,k3:H,k4:H,kernelMatrix:$e,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:H,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:H,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:H,overlineThickness:H,paintOrder:null,panose1:null,path:null,pathLength:H,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Te,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:H,pointsAtY:H,pointsAtZ:H,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:$e,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:$e,rev:$e,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:$e,requiredFeatures:$e,requiredFonts:$e,requiredFormats:$e,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:H,specularExponent:H,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:H,strikethroughThickness:H,string:null,stroke:null,strokeDashArray:$e,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:H,strokeOpacity:H,strokeWidth:null,style:null,surfaceScale:H,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:$e,tabIndex:H,tableValues:null,target:null,targetX:H,targetY:H,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:$e,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:H,underlineThickness:H,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:H,values:null,vAlphabetic:H,vMathematical:H,vectorEffect:null,vHanging:H,vIdeographic:H,version:null,vertAdvY:H,vertOriginX:H,vertOriginY:H,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:H,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:za}),Ya=Ft({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}}),qa=Ft({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:$a}),Va=Ft({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),Fc={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"},Hc=/[A-Z]/g,qi=/-[a-z]/g,Uc=/^data[-\w.:]+$/i;function qn(t,e){const n=fn(e);let r=e,i=je;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Uc.test(e)){if(e.charAt(4)==="-"){const s=e.slice(5).replace(qi,zc);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=e.slice(4);if(!qi.test(s)){let a=s.replace(Hc,jc);a.charAt(0)!=="-"&&(a="-"+a),e="data"+a}}i=si}return new i(r,e)}function jc(t){return"-"+t.toLowerCase()}function zc(t){return t.charAt(1).toUpperCase()}const En=Ua([ja,vc,Ya,qa,Va],"html"),ht=Ua([ja,Bc,Ya,qa,Va],"svg");function Vi(t){const e=String(t||"").trim();return e?e.split(/[ \t\n\r\f]+/g):[]}function Wa(t){return t.join(" ").trim()}var wt={},ar,Wi;function $c(){if(Wi)return ar;Wi=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,u=/^\s+|\s+$/g,o=`
|
|
58
|
-
`,l="/",f="*",d="",m="comment",h="declaration";function g(C,T){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];T=T||{};var S=1,N=1;function L(z){var M=z.match(e);M&&(S+=M.length);var W=z.lastIndexOf(o);N=~W?z.length-W:N+z.length}function O(){var z={line:S,column:N};return function(M){return M.position=new y(z),q(),M}}function y(z){this.start=z,this.end={line:S,column:N},this.source=T.source}y.prototype.content=C;function j(z){var M=new Error(T.source+":"+S+":"+N+": "+z);if(M.reason=z,M.filename=T.source,M.line=S,M.column=N,M.source=C,!T.silent)throw M}function Y(z){var M=z.exec(C);if(M){var W=M[0];return L(W),C=C.slice(W.length),M}}function q(){Y(n)}function I(z){var M;for(z=z||[];M=B();)M!==!1&&z.push(M);return z}function B(){var z=O();if(!(l!=C.charAt(0)||f!=C.charAt(1))){for(var M=2;d!=C.charAt(M)&&(f!=C.charAt(M)||l!=C.charAt(M+1));)++M;if(M+=2,d===C.charAt(M-1))return j("End of comment missing");var W=C.slice(2,M-2);return N+=2,L(W),C=C.slice(M),N+=2,z({type:m,comment:W})}}function F(){var z=O(),M=Y(r);if(M){if(B(),!Y(i))return j("property missing ':'");var W=Y(s),K=z({type:h,property:k(M[0].replace(t,d)),value:W?k(W[0].replace(t,d)):d});return Y(a),K}}function G(){var z=[];I(z);for(var M;M=F();)M!==!1&&(z.push(M),I(z));return z}return q(),G()}function k(C){return C?C.replace(u,d):d}return ar=g,ar}var Gi;function Yc(){if(Gi)return wt;Gi=1;var t=wt&&wt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(wt,"__esModule",{value:!0}),wt.default=n;const e=t($c());function n(r,i){let s=null;if(!r||typeof r!="string")return s;const a=(0,e.default)(r),u=typeof i=="function";return a.forEach(o=>{if(o.type!=="declaration")return;const{property:l,value:f}=o;u?i(l,f,o):f&&(s=s||{},s[l]=f)}),s}return wt}var Wt={},Qi;function qc(){if(Qi)return Wt;Qi=1,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,e=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(l){return!l||n.test(l)||t.test(l)},a=function(l,f){return f.toUpperCase()},u=function(l,f){return"".concat(f,"-")},o=function(l,f){return f===void 0&&(f={}),s(l)?l:(l=l.toLowerCase(),f.reactCompat?l=l.replace(i,u):l=l.replace(r,u),l.replace(e,a))};return Wt.camelCase=o,Wt}var Gt,Ki;function Vc(){if(Ki)return Gt;Ki=1;var t=Gt&&Gt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},e=t(Yc()),n=qc();function r(i,s){var a={};return!i||typeof i!="string"||(0,e.default)(i,function(u,o){u&&o&&(a[(0,n.camelCase)(u,s)]=o)}),a}return r.default=r,Gt=r,Gt}var Wc=Vc();const Gc=na(Wc),Vn=Ga("end"),et=Ga("start");function Ga(t){return e;function e(n){const r=n&&n.position&&n.position[t]||{};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 Qc(t){const e=et(t),n=Vn(t);if(e&&n)return{start:e,end:n}}function nn(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?Xi(t.position):"start"in t||"end"in t?Xi(t):"line"in t||"column"in t?wr(t):""}function wr(t){return Zi(t&&t.line)+":"+Zi(t&&t.column)}function Xi(t){return wr(t&&t.start)+"-"+wr(t&&t.end)}function Zi(t){return t&&typeof t=="number"?t:1}class Oe extends Error{constructor(e,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},a=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof e=="string"?i=e:!s.cause&&e&&(a=!0,i=e.message,s.cause=e),!s.ruleId&&!s.source&&typeof r=="string"){const o=r.indexOf(":");o===-1?s.ruleId=r:(s.source=r.slice(0,o),s.ruleId=r.slice(o+1))}if(!s.place&&s.ancestors&&s.ancestors){const o=s.ancestors[s.ancestors.length-1];o&&(s.place=o.position)}const u=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=u?u.line:void 0,this.name=nn(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=a&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Oe.prototype.file="";Oe.prototype.name="";Oe.prototype.reason="";Oe.prototype.message="";Oe.prototype.stack="";Oe.prototype.column=void 0;Oe.prototype.line=void 0;Oe.prototype.ancestors=void 0;Oe.prototype.cause=void 0;Oe.prototype.fatal=void 0;Oe.prototype.place=void 0;Oe.prototype.ruleId=void 0;Oe.prototype.source=void 0;const ai={}.hasOwnProperty,Kc=new Map,Xc=/[A-Z]/g,Zc=new Set(["table","tbody","thead","tfoot","tr"]),Jc=new Set(["td","th"]),Qa="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function ef(t,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=e.filePath||void 0;let r;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=lf(n,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=of(n,e.jsx,e.jsxs)}const i={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:r,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?ht:En,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},s=Ka(i,t,void 0);return s&&typeof s!="string"?s:i.create(t,i.Fragment,{children:s||void 0},void 0)}function Ka(t,e,n){if(e.type==="element")return tf(t,e,n);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return nf(t,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return sf(t,e,n);if(e.type==="mdxjsEsm")return rf(t,e);if(e.type==="root")return af(t,e,n);if(e.type==="text")return uf(t,e)}function tf(t,e,n){const r=t.schema;let i=r;e.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=ht,t.schema=i),t.ancestors.push(e);const s=Za(t,e.tagName,!1),a=cf(t,e);let u=oi(t,e);return Zc.has(e.tagName)&&(u=u.filter(function(o){return typeof o=="string"?!Pc(o):!0})),Xa(t,a,s,e),ui(a,u),t.ancestors.pop(),t.schema=r,t.create(e,s,a,n)}function nf(t,e){if(e.data&&e.data.estree&&t.evaluater){const r=e.data.estree.body[0];return r.type,t.evaluater.evaluateExpression(r.expression)}dn(t,e.position)}function rf(t,e){if(e.data&&e.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(e.data.estree);dn(t,e.position)}function sf(t,e,n){const r=t.schema;let i=r;e.name==="svg"&&r.space==="html"&&(i=ht,t.schema=i),t.ancestors.push(e);const s=e.name===null?t.Fragment:Za(t,e.name,!0),a=ff(t,e),u=oi(t,e);return Xa(t,a,s,e),ui(a,u),t.ancestors.pop(),t.schema=r,t.create(e,s,a,n)}function af(t,e,n){const r={};return ui(r,oi(t,e)),t.create(e,t.Fragment,r,n)}function uf(t,e){return e.value}function Xa(t,e,n,r){typeof n!="string"&&n!==t.Fragment&&t.passNode&&(e.node=r)}function ui(t,e){if(e.length>0){const n=e.length>1?e:e[0];n&&(t.children=n)}}function of(t,e,n){return r;function r(i,s,a,u){const l=Array.isArray(a.children)?n:e;return u?l(s,a,u):l(s,a)}}function lf(t,e){return n;function n(r,i,s,a){const u=Array.isArray(s.children),o=et(r);return e(i,s,a,u,{columnNumber:o?o.column-1:void 0,fileName:t,lineNumber:o?o.line:void 0},void 0)}}function cf(t,e){const n={};let r,i;for(i in e.properties)if(i!=="children"&&ai.call(e.properties,i)){const s=df(t,i,e.properties[i]);if(s){const[a,u]=s;t.tableCellAlignToStyle&&a==="align"&&typeof u=="string"&&Jc.has(e.tagName)?r=u:n[a]=u}}if(r){const s=n.style||(n.style={});s[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function ff(t,e){const n={};for(const r of e.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&t.evaluater){const s=r.data.estree.body[0];s.type;const a=s.expression;a.type;const u=a.properties[0];u.type,Object.assign(n,t.evaluater.evaluateExpression(u.argument))}else dn(t,e.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&t.evaluater){const u=r.value.data.estree.body[0];u.type,s=t.evaluater.evaluateExpression(u.expression)}else dn(t,e.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function oi(t,e){const n=[];let r=-1;const i=t.passKeys?new Map:Kc;for(;++r<e.children.length;){const s=e.children[r];let a;if(t.passKeys){const o=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(o){const l=i.get(o)||0;a=o+"-"+l,i.set(o,l+1)}}const u=Ka(t,s,a);u!==void 0&&n.push(u)}return n}function df(t,e,n){const r=qn(t.schema,e);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Ha(n):Wa(n)),r.property==="style"){let i=typeof n=="object"?n:hf(t,String(n));return t.stylePropertyNameCase==="css"&&(i=mf(i)),["style",i]}return[t.elementAttributeNameCase==="react"&&r.space?Fc[r.property]||r.property:r.attribute,n]}}function hf(t,e){try{return Gc(e,{reactCompat:!0})}catch(n){if(t.ignoreInvalidStyle)return{};const r=n,i=new Oe("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=t.filePath||void 0,i.url=Qa+"#cannot-parse-style-attribute",i}}function Za(t,e,n){let r;if(!n)r={type:"Literal",value:e};else if(e.includes(".")){const i=e.split(".");let s=-1,a;for(;++s<i.length;){const u=zi(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};a=a?{type:"MemberExpression",object:a,property:u,computed:!!(s&&u.type==="Literal"),optional:!1}:u}r=a}else r=zi(e)&&!/^[a-z]/.test(e)?{type:"Identifier",name:e}:{type:"Literal",value:e};if(r.type==="Literal"){const i=r.value;return ai.call(t.components,i)?t.components[i]:i}if(t.evaluater)return t.evaluater.evaluateExpression(r);dn(t)}function dn(t,e){const n=new Oe("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:e,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=t.filePath||void 0,n.url=Qa+"#cannot-handle-mdx-estrees-without-createevaluater",n}function mf(t){const e={};let n;for(n in t)ai.call(t,n)&&(e[pf(n)]=t[n]);return e}function pf(t){let e=t.replace(Xc,gf);return e.slice(0,3)==="ms-"&&(e="-"+e),e}function gf(t){return"-"+t.toLowerCase()}const ur={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"]},Ef={};function li(t,e){const n=Ef,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Ja(t,r,i)}function Ja(t,e,n){if(bf(t)){if("value"in t)return t.type==="html"&&!n?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return Ji(t.children,e,n)}return Array.isArray(t)?Ji(t,e,n):""}function Ji(t,e,n){const r=[];let i=-1;for(;++i<t.length;)r[i]=Ja(t[i],e,n);return r.join("")}function bf(t){return!!(t&&typeof t=="object")}const es=document.createElement("i");function ci(t){const e="&"+t+";";es.innerHTML=e;const n=es.textContent;return n.charCodeAt(n.length-1)===59&&t!=="semi"||n===e?!1:n}function Ye(t,e,n,r){const i=t.length;let s=0,a;if(e<0?e=-e>i?0:i+e:e=e>i?i:e,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(e,n),t.splice(...a);else for(n&&t.splice(e,n);s<r.length;)a=r.slice(s,s+1e4),a.unshift(e,0),t.splice(...a),s+=1e4,e+=1e4}function qe(t,e){return t.length>0?(Ye(t,t.length,0,e),t):e}const ts={}.hasOwnProperty;function eu(t){const e={};let n=-1;for(;++n<t.length;)Tf(e,t[n]);return e}function Tf(t,e){let n;for(n in e){const i=(ts.call(t,n)?t[n]:void 0)||(t[n]={}),s=e[n];let a;if(s)for(a in s){ts.call(i,a)||(i[a]=[]);const u=s[a];xf(i[a],Array.isArray(u)?u:u?[u]:[])}}}function xf(t,e){let n=-1;const r=[];for(;++n<e.length;)(e[n].add==="after"?t:r).push(e[n]);Ye(t,0,0,r)}function tu(t,e){const n=Number.parseInt(t,e);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Ge(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ve=mt(/[A-Za-z]/),Re=mt(/[\dA-Za-z]/),_f=mt(/[#-'*+\--9=?A-Z^-~]/);function Mn(t){return t!==null&&(t<32||t===127)}const Lr=mt(/\d/),Af=mt(/[\dA-Fa-f]/),kf=mt(/[!-/:-@[-`{-~]/);function Q(t){return t!==null&&t<-2}function ge(t){return t!==null&&(t<0||t===32)}function re(t){return t===-2||t===-1||t===32}const Wn=mt(new RegExp("\\p{P}|\\p{S}","u")),kt=mt(/\s/);function mt(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function Ht(t){const e=[];let n=-1,r=0,i=0;for(;++n<t.length;){const s=t.charCodeAt(n);let a="";if(s===37&&Re(t.charCodeAt(n+1))&&Re(t.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(a=String.fromCharCode(s));else if(s>55295&&s<57344){const u=t.charCodeAt(n+1);s<56320&&u>56319&&u<57344?(a=String.fromCharCode(s,u),i=1):a="�"}else a=String.fromCharCode(s);a&&(e.push(t.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return e.join("")+t.slice(r)}function oe(t,e,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(o){return re(o)?(t.enter(n),u(o)):e(o)}function u(o){return re(o)&&s++<i?(t.consume(o),u):(t.exit(n),e(o))}}const Cf={tokenize:Nf};function Nf(t){const e=t.attempt(this.parser.constructs.contentInitial,r,i);let n;return e;function r(u){if(u===null){t.consume(u);return}return t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),oe(t,e,"linePrefix")}function i(u){return t.enter("paragraph"),s(u)}function s(u){const o=t.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=o),n=o,a(u)}function a(u){if(u===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(u);return}return Q(u)?(t.consume(u),t.exit("chunkText"),s):(t.consume(u),a)}}const Sf={tokenize:yf},ns={tokenize:If};function yf(t){const e=this,n=[];let r=0,i,s,a;return u;function u(N){if(r<n.length){const L=n[r];return e.containerState=L[1],t.attempt(L[0].continuation,o,l)(N)}return l(N)}function o(N){if(r++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,i&&S();const L=e.events.length;let O=L,y;for(;O--;)if(e.events[O][0]==="exit"&&e.events[O][1].type==="chunkFlow"){y=e.events[O][1].end;break}T(r);let j=L;for(;j<e.events.length;)e.events[j][1].end={...y},j++;return Ye(e.events,O+1,0,e.events.slice(L)),e.events.length=j,l(N)}return u(N)}function l(N){if(r===n.length){if(!i)return m(N);if(i.currentConstruct&&i.currentConstruct.concrete)return g(N);e.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(ns,f,d)(N)}function f(N){return i&&S(),T(r),m(N)}function d(N){return e.parser.lazy[e.now().line]=r!==n.length,a=e.now().offset,g(N)}function m(N){return e.containerState={},t.attempt(ns,h,g)(N)}function h(N){return r++,n.push([e.currentConstruct,e.containerState]),m(N)}function g(N){if(N===null){i&&S(),T(0),t.consume(N);return}return i=i||e.parser.flow(e.now()),t.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),k(N)}function k(N){if(N===null){C(t.exit("chunkFlow"),!0),T(0),t.consume(N);return}return Q(N)?(t.consume(N),C(t.exit("chunkFlow")),r=0,e.interrupt=void 0,u):(t.consume(N),k)}function C(N,L){const O=e.sliceStream(N);if(L&&O.push(null),N.previous=s,s&&(s.next=N),s=N,i.defineSkip(N.start),i.write(O),e.parser.lazy[N.start.line]){let y=i.events.length;for(;y--;)if(i.events[y][1].start.offset<a&&(!i.events[y][1].end||i.events[y][1].end.offset>a))return;const j=e.events.length;let Y=j,q,I;for(;Y--;)if(e.events[Y][0]==="exit"&&e.events[Y][1].type==="chunkFlow"){if(q){I=e.events[Y][1].end;break}q=!0}for(T(r),y=j;y<e.events.length;)e.events[y][1].end={...I},y++;Ye(e.events,Y+1,0,e.events.slice(j)),e.events.length=y}}function T(N){let L=n.length;for(;L-- >N;){const O=n[L];e.containerState=O[1],O[0].exit.call(e,t)}n.length=N}function S(){i.write([null]),s=void 0,i=void 0,e.containerState._closeFlow=void 0}}function If(t,e,n){return oe(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Pt(t){if(t===null||ge(t)||kt(t))return 1;if(Wn(t))return 2}function Gn(t,e,n){const r=[];let i=-1;for(;++i<t.length;){const s=t[i].resolveAll;s&&!r.includes(s)&&(e=s(e,n),r.push(s))}return e}const Rr={name:"attention",resolveAll:wf,tokenize:Lf};function wf(t,e){let n=-1,r,i,s,a,u,o,l,f;for(;++n<t.length;)if(t[n][0]==="enter"&&t[n][1].type==="attentionSequence"&&t[n][1]._close){for(r=n;r--;)if(t[r][0]==="exit"&&t[r][1].type==="attentionSequence"&&t[r][1]._open&&e.sliceSerialize(t[r][1]).charCodeAt(0)===e.sliceSerialize(t[n][1]).charCodeAt(0)){if((t[r][1]._close||t[n][1]._open)&&(t[n][1].end.offset-t[n][1].start.offset)%3&&!((t[r][1].end.offset-t[r][1].start.offset+t[n][1].end.offset-t[n][1].start.offset)%3))continue;o=t[r][1].end.offset-t[r][1].start.offset>1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;const d={...t[r][1].end},m={...t[n][1].start};rs(d,-o),rs(m,o),a={type:o>1?"strongSequence":"emphasisSequence",start:d,end:{...t[r][1].end}},u={type:o>1?"strongSequence":"emphasisSequence",start:{...t[n][1].start},end:m},s={type:o>1?"strongText":"emphasisText",start:{...t[r][1].end},end:{...t[n][1].start}},i={type:o>1?"strong":"emphasis",start:{...a.start},end:{...u.end}},t[r][1].end={...a.start},t[n][1].start={...u.end},l=[],t[r][1].end.offset-t[r][1].start.offset&&(l=qe(l,[["enter",t[r][1],e],["exit",t[r][1],e]])),l=qe(l,[["enter",i,e],["enter",a,e],["exit",a,e],["enter",s,e]]),l=qe(l,Gn(e.parser.constructs.insideSpan.null,t.slice(r+1,n),e)),l=qe(l,[["exit",s,e],["enter",u,e],["exit",u,e],["exit",i,e]]),t[n][1].end.offset-t[n][1].start.offset?(f=2,l=qe(l,[["enter",t[n][1],e],["exit",t[n][1],e]])):f=0,Ye(t,r-1,n-r+3,l),n=r+l.length-f-2;break}}for(n=-1;++n<t.length;)t[n][1].type==="attentionSequence"&&(t[n][1].type="data");return t}function Lf(t,e){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Pt(r);let s;return a;function a(o){return s=o,t.enter("attentionSequence"),u(o)}function u(o){if(o===s)return t.consume(o),u;const l=t.exit("attentionSequence"),f=Pt(o),d=!f||f===2&&i||n.includes(o),m=!i||i===2&&f||n.includes(r);return l._open=!!(s===42?d:d&&(i||!m)),l._close=!!(s===42?m:m&&(f||!d)),e(o)}}function rs(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}const Rf={name:"autolink",tokenize:Of};function Of(t,e,n){let r=0;return i;function i(h){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(h),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),s}function s(h){return ve(h)?(t.consume(h),a):h===64?n(h):l(h)}function a(h){return h===43||h===45||h===46||Re(h)?(r=1,u(h)):l(h)}function u(h){return h===58?(t.consume(h),r=0,o):(h===43||h===45||h===46||Re(h))&&r++<32?(t.consume(h),u):(r=0,l(h))}function o(h){return h===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(h),t.exit("autolinkMarker"),t.exit("autolink"),e):h===null||h===32||h===60||Mn(h)?n(h):(t.consume(h),o)}function l(h){return h===64?(t.consume(h),f):_f(h)?(t.consume(h),l):n(h)}function f(h){return Re(h)?d(h):n(h)}function d(h){return h===46?(t.consume(h),r=0,f):h===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(h),t.exit("autolinkMarker"),t.exit("autolink"),e):m(h)}function m(h){if((h===45||Re(h))&&r++<63){const g=h===45?m:d;return t.consume(h),g}return n(h)}}const bn={partial:!0,tokenize:Df};function Df(t,e,n){return r;function r(s){return re(s)?oe(t,i,"linePrefix")(s):i(s)}function i(s){return s===null||Q(s)?e(s):n(s)}}const nu={continuation:{tokenize:Mf},exit:vf,name:"blockQuote",tokenize:Pf};function Pf(t,e,n){const r=this;return i;function i(a){if(a===62){const u=r.containerState;return u.open||(t.enter("blockQuote",{_container:!0}),u.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(a),t.exit("blockQuoteMarker"),s}return n(a)}function s(a){return re(a)?(t.enter("blockQuotePrefixWhitespace"),t.consume(a),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(a))}}function Mf(t,e,n){const r=this;return i;function i(a){return re(a)?oe(t,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return t.attempt(nu,e,n)(a)}}function vf(t){t.exit("blockQuote")}const ru={name:"characterEscape",tokenize:Bf};function Bf(t,e,n){return r;function r(s){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(s),t.exit("escapeMarker"),i}function i(s){return kf(s)?(t.enter("characterEscapeValue"),t.consume(s),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):n(s)}}const iu={name:"characterReference",tokenize:Ff};function Ff(t,e,n){const r=this;let i=0,s,a;return u;function u(d){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(d),t.exit("characterReferenceMarker"),o}function o(d){return d===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(d),t.exit("characterReferenceMarkerNumeric"),l):(t.enter("characterReferenceValue"),s=31,a=Re,f(d))}function l(d){return d===88||d===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(d),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),s=6,a=Af,f):(t.enter("characterReferenceValue"),s=7,a=Lr,f(d))}function f(d){if(d===59&&i){const m=t.exit("characterReferenceValue");return a===Re&&!ci(r.sliceSerialize(m))?n(d):(t.enter("characterReferenceMarker"),t.consume(d),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return a(d)&&i++<s?(t.consume(d),f):n(d)}}const is={partial:!0,tokenize:Uf},ss={concrete:!0,name:"codeFenced",tokenize:Hf};function Hf(t,e,n){const r=this,i={partial:!0,tokenize:O};let s=0,a=0,u;return o;function o(y){return l(y)}function l(y){const j=r.events[r.events.length-1];return s=j&&j[1].type==="linePrefix"?j[2].sliceSerialize(j[1],!0).length:0,u=y,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),f(y)}function f(y){return y===u?(a++,t.consume(y),f):a<3?n(y):(t.exit("codeFencedFenceSequence"),re(y)?oe(t,d,"whitespace")(y):d(y))}function d(y){return y===null||Q(y)?(t.exit("codeFencedFence"),r.interrupt?e(y):t.check(is,k,L)(y)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||Q(y)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),d(y)):re(y)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),oe(t,h,"whitespace")(y)):y===96&&y===u?n(y):(t.consume(y),m)}function h(y){return y===null||Q(y)?d(y):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),g(y))}function g(y){return y===null||Q(y)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),d(y)):y===96&&y===u?n(y):(t.consume(y),g)}function k(y){return t.attempt(i,L,C)(y)}function C(y){return t.enter("lineEnding"),t.consume(y),t.exit("lineEnding"),T}function T(y){return s>0&&re(y)?oe(t,S,"linePrefix",s+1)(y):S(y)}function S(y){return y===null||Q(y)?t.check(is,k,L)(y):(t.enter("codeFlowValue"),N(y))}function N(y){return y===null||Q(y)?(t.exit("codeFlowValue"),S(y)):(t.consume(y),N)}function L(y){return t.exit("codeFenced"),e(y)}function O(y,j,Y){let q=0;return I;function I(M){return y.enter("lineEnding"),y.consume(M),y.exit("lineEnding"),B}function B(M){return y.enter("codeFencedFence"),re(M)?oe(y,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):F(M)}function F(M){return M===u?(y.enter("codeFencedFenceSequence"),G(M)):Y(M)}function G(M){return M===u?(q++,y.consume(M),G):q>=a?(y.exit("codeFencedFenceSequence"),re(M)?oe(y,z,"whitespace")(M):z(M)):Y(M)}function z(M){return M===null||Q(M)?(y.exit("codeFencedFence"),j(M)):Y(M)}}}function Uf(t,e,n){const r=this;return i;function i(a){return a===null?n(a):(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),s)}function s(a){return r.parser.lazy[r.now().line]?n(a):e(a)}}const or={name:"codeIndented",tokenize:zf},jf={partial:!0,tokenize:$f};function zf(t,e,n){const r=this;return i;function i(l){return t.enter("codeIndented"),oe(t,s,"linePrefix",5)(l)}function s(l){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?a(l):n(l)}function a(l){return l===null?o(l):Q(l)?t.attempt(jf,a,o)(l):(t.enter("codeFlowValue"),u(l))}function u(l){return l===null||Q(l)?(t.exit("codeFlowValue"),a(l)):(t.consume(l),u)}function o(l){return t.exit("codeIndented"),e(l)}}function $f(t,e,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):Q(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),i):oe(t,s,"linePrefix",5)(a)}function s(a){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?e(a):Q(a)?i(a):n(a)}}const Yf={name:"codeText",previous:Vf,resolve:qf,tokenize:Wf};function qf(t){let e=t.length-4,n=3,r,i;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(r=n;++r<e;)if(t[r][1].type==="codeTextData"){t[n][1].type="codeTextPadding",t[e][1].type="codeTextPadding",n+=2,e-=2;break}}for(r=n-1,e++;++r<=e;)i===void 0?r!==e&&t[r][1].type!=="lineEnding"&&(i=r):(r===e||t[r][1].type==="lineEnding")&&(t[i][1].type="codeTextData",r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),e-=r-i-2,r=i+2),i=void 0);return t}function Vf(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Wf(t,e,n){let r=0,i,s;return a;function a(d){return t.enter("codeText"),t.enter("codeTextSequence"),u(d)}function u(d){return d===96?(t.consume(d),r++,u):(t.exit("codeTextSequence"),o(d))}function o(d){return d===null?n(d):d===32?(t.enter("space"),t.consume(d),t.exit("space"),o):d===96?(s=t.enter("codeTextSequence"),i=0,f(d)):Q(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),o):(t.enter("codeTextData"),l(d))}function l(d){return d===null||d===32||d===96||Q(d)?(t.exit("codeTextData"),o(d)):(t.consume(d),l)}function f(d){return d===96?(t.consume(d),i++,f):i===r?(t.exit("codeTextSequence"),t.exit("codeText"),e(d)):(s.type="codeTextData",l(d))}}class Gf{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,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(e,r):e>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(e,n,r){const i=n||0;this.setCursor(Math.trunc(e));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Qt(this.left,r),s.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),Qt(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Qt(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 n=this.left.splice(e,Number.POSITIVE_INFINITY);Qt(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Qt(this.left,n.reverse())}}}function Qt(t,e){let n=0;if(e.length<1e4)t.push(...e);else for(;n<e.length;)t.push(...e.slice(n,n+1e4)),n+=1e4}function su(t){const e={};let n=-1,r,i,s,a,u,o,l;const f=new Gf(t);for(;++n<f.length;){for(;n in e;)n=e[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(o=r[1]._tokenizer.events,s=0,s<o.length&&o[s][1].type==="lineEndingBlank"&&(s+=2),s<o.length&&o[s][1].type==="content"))for(;++s<o.length&&o[s][1].type!=="content";)o[s][1].type==="chunkText"&&(o[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(e,Qf(f,n)),n=e[n],l=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(a=f.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=s);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},u=f.slice(i,n),u.unshift(r),f.splice(i,n-i+1,u))}}return Ye(t,0,Number.POSITIVE_INFINITY,f.slice(0)),!l}function Qf(t,e){const n=t.get(e)[1],r=t.get(e)[2];let i=e-1;const s=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const u=a.events,o=[],l={};let f,d,m=-1,h=n,g=0,k=0;const C=[k];for(;h;){for(;t.get(++i)[1]!==h;);s.push(i),h._tokenizer||(f=r.sliceStream(h),h.next||f.push(null),d&&a.defineSkip(h.start),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(f),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=h,h=h.next}for(h=n;++m<u.length;)u[m][0]==="exit"&&u[m-1][0]==="enter"&&u[m][1].type===u[m-1][1].type&&u[m][1].start.line!==u[m][1].end.line&&(k=m+1,C.push(k),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(a.events=[],h?(h._tokenizer=void 0,h.previous=void 0):C.pop(),m=C.length;m--;){const T=u.slice(C[m],C[m+1]),S=s.pop();o.push([S,S+T.length-1]),t.splice(S,2,T)}for(o.reverse(),m=-1;++m<o.length;)l[g+o[m][0]]=g+o[m][1],g+=o[m][1]-o[m][0]-1;return l}const Kf={resolve:Zf,tokenize:Jf},Xf={partial:!0,tokenize:ed};function Zf(t){return su(t),t}function Jf(t,e){let n;return r;function r(u){return t.enter("content"),n=t.enter("chunkContent",{contentType:"content"}),i(u)}function i(u){return u===null?s(u):Q(u)?t.check(Xf,a,s)(u):(t.consume(u),i)}function s(u){return t.exit("chunkContent"),t.exit("content"),e(u)}function a(u){return t.consume(u),t.exit("chunkContent"),n.next=t.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function ed(t,e,n){const r=this;return i;function i(a){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),oe(t,s,"linePrefix")}function s(a){if(a===null||Q(a))return n(a);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?e(a):t.interrupt(r.parser.constructs.flow,n,e)(a)}}function au(t,e,n,r,i,s,a,u,o){const l=o||Number.POSITIVE_INFINITY;let f=0;return d;function d(T){return T===60?(t.enter(r),t.enter(i),t.enter(s),t.consume(T),t.exit(s),m):T===null||T===32||T===41||Mn(T)?n(T):(t.enter(r),t.enter(a),t.enter(u),t.enter("chunkString",{contentType:"string"}),k(T))}function m(T){return T===62?(t.enter(s),t.consume(T),t.exit(s),t.exit(i),t.exit(r),e):(t.enter(u),t.enter("chunkString",{contentType:"string"}),h(T))}function h(T){return T===62?(t.exit("chunkString"),t.exit(u),m(T)):T===null||T===60||Q(T)?n(T):(t.consume(T),T===92?g:h)}function g(T){return T===60||T===62||T===92?(t.consume(T),h):h(T)}function k(T){return!f&&(T===null||T===41||ge(T))?(t.exit("chunkString"),t.exit(u),t.exit(a),t.exit(r),e(T)):f<l&&T===40?(t.consume(T),f++,k):T===41?(t.consume(T),f--,k):T===null||T===32||T===40||Mn(T)?n(T):(t.consume(T),T===92?C:k)}function C(T){return T===40||T===41||T===92?(t.consume(T),k):k(T)}}function uu(t,e,n,r,i,s){const a=this;let u=0,o;return l;function l(h){return t.enter(r),t.enter(i),t.consume(h),t.exit(i),t.enter(s),f}function f(h){return u>999||h===null||h===91||h===93&&!o||h===94&&!u&&"_hiddenFootnoteSupport"in a.parser.constructs?n(h):h===93?(t.exit(s),t.enter(i),t.consume(h),t.exit(i),t.exit(r),e):Q(h)?(t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),f):(t.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===null||h===91||h===93||Q(h)||u++>999?(t.exit("chunkString"),f(h)):(t.consume(h),o||(o=!re(h)),h===92?m:d)}function m(h){return h===91||h===92||h===93?(t.consume(h),u++,d):d(h)}}function ou(t,e,n,r,i,s){let a;return u;function u(m){return m===34||m===39||m===40?(t.enter(r),t.enter(i),t.consume(m),t.exit(i),a=m===40?41:m,o):n(m)}function o(m){return m===a?(t.enter(i),t.consume(m),t.exit(i),t.exit(r),e):(t.enter(s),l(m))}function l(m){return m===a?(t.exit(s),o(a)):m===null?n(m):Q(m)?(t.enter("lineEnding"),t.consume(m),t.exit("lineEnding"),oe(t,l,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===a||m===null||Q(m)?(t.exit("chunkString"),l(m)):(t.consume(m),m===92?d:f)}function d(m){return m===a||m===92?(t.consume(m),f):f(m)}}function rn(t,e){let n;return r;function r(i){return Q(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),n=!0,r):re(i)?oe(t,r,n?"linePrefix":"lineSuffix")(i):e(i)}}const td={name:"definition",tokenize:rd},nd={partial:!0,tokenize:id};function rd(t,e,n){const r=this;let i;return s;function s(h){return t.enter("definition"),a(h)}function a(h){return uu.call(r,t,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function u(h){return i=Ge(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(t.enter("definitionMarker"),t.consume(h),t.exit("definitionMarker"),o):n(h)}function o(h){return ge(h)?rn(t,l)(h):l(h)}function l(h){return au(t,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return t.attempt(nd,d,d)(h)}function d(h){return re(h)?oe(t,m,"whitespace")(h):m(h)}function m(h){return h===null||Q(h)?(t.exit("definition"),r.parser.defined.push(i),e(h)):n(h)}}function id(t,e,n){return r;function r(u){return ge(u)?rn(t,i)(u):n(u)}function i(u){return ou(t,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function s(u){return re(u)?oe(t,a,"whitespace")(u):a(u)}function a(u){return u===null||Q(u)?e(u):n(u)}}const sd={name:"hardBreakEscape",tokenize:ad};function ad(t,e,n){return r;function r(s){return t.enter("hardBreakEscape"),t.consume(s),i}function i(s){return Q(s)?(t.exit("hardBreakEscape"),e(s)):n(s)}}const ud={name:"headingAtx",resolve:od,tokenize:ld};function od(t,e){let n=t.length-2,r=3,i,s;return t[r][1].type==="whitespace"&&(r+=2),n-2>r&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&t[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:t[r][1].start,end:t[n][1].end},s={type:"chunkText",start:t[r][1].start,end:t[n][1].end,contentType:"text"},Ye(t,r,n-r+1,[["enter",i,e],["enter",s,e],["exit",s,e],["exit",i,e]])),t}function ld(t,e,n){let r=0;return i;function i(f){return t.enter("atxHeading"),s(f)}function s(f){return t.enter("atxHeadingSequence"),a(f)}function a(f){return f===35&&r++<6?(t.consume(f),a):f===null||ge(f)?(t.exit("atxHeadingSequence"),u(f)):n(f)}function u(f){return f===35?(t.enter("atxHeadingSequence"),o(f)):f===null||Q(f)?(t.exit("atxHeading"),e(f)):re(f)?oe(t,u,"whitespace")(f):(t.enter("atxHeadingText"),l(f))}function o(f){return f===35?(t.consume(f),o):(t.exit("atxHeadingSequence"),u(f))}function l(f){return f===null||f===35||ge(f)?(t.exit("atxHeadingText"),u(f)):(t.consume(f),l)}}const cd=["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"],as=["pre","script","style","textarea"],fd={concrete:!0,name:"htmlFlow",resolveTo:md,tokenize:pd},dd={partial:!0,tokenize:Ed},hd={partial:!0,tokenize:gd};function md(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function pd(t,e,n){const r=this;let i,s,a,u,o;return l;function l(x){return f(x)}function f(x){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(x),d}function d(x){return x===33?(t.consume(x),m):x===47?(t.consume(x),s=!0,k):x===63?(t.consume(x),i=3,r.interrupt?e:A):ve(x)?(t.consume(x),a=String.fromCharCode(x),C):n(x)}function m(x){return x===45?(t.consume(x),i=2,h):x===91?(t.consume(x),i=5,u=0,g):ve(x)?(t.consume(x),i=4,r.interrupt?e:A):n(x)}function h(x){return x===45?(t.consume(x),r.interrupt?e:A):n(x)}function g(x){const ue="CDATA[";return x===ue.charCodeAt(u++)?(t.consume(x),u===ue.length?r.interrupt?e:F:g):n(x)}function k(x){return ve(x)?(t.consume(x),a=String.fromCharCode(x),C):n(x)}function C(x){if(x===null||x===47||x===62||ge(x)){const ue=x===47,he=a.toLowerCase();return!ue&&!s&&as.includes(he)?(i=1,r.interrupt?e(x):F(x)):cd.includes(a.toLowerCase())?(i=6,ue?(t.consume(x),T):r.interrupt?e(x):F(x)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(x):s?S(x):N(x))}return x===45||Re(x)?(t.consume(x),a+=String.fromCharCode(x),C):n(x)}function T(x){return x===62?(t.consume(x),r.interrupt?e:F):n(x)}function S(x){return re(x)?(t.consume(x),S):I(x)}function N(x){return x===47?(t.consume(x),I):x===58||x===95||ve(x)?(t.consume(x),L):re(x)?(t.consume(x),N):I(x)}function L(x){return x===45||x===46||x===58||x===95||Re(x)?(t.consume(x),L):O(x)}function O(x){return x===61?(t.consume(x),y):re(x)?(t.consume(x),O):N(x)}function y(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(t.consume(x),o=x,j):re(x)?(t.consume(x),y):Y(x)}function j(x){return x===o?(t.consume(x),o=null,q):x===null||Q(x)?n(x):(t.consume(x),j)}function Y(x){return x===null||x===34||x===39||x===47||x===60||x===61||x===62||x===96||ge(x)?O(x):(t.consume(x),Y)}function q(x){return x===47||x===62||re(x)?N(x):n(x)}function I(x){return x===62?(t.consume(x),B):n(x)}function B(x){return x===null||Q(x)?F(x):re(x)?(t.consume(x),B):n(x)}function F(x){return x===45&&i===2?(t.consume(x),W):x===60&&i===1?(t.consume(x),K):x===62&&i===4?(t.consume(x),Z):x===63&&i===3?(t.consume(x),A):x===93&&i===5?(t.consume(x),J):Q(x)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check(dd,le,G)(x)):x===null||Q(x)?(t.exit("htmlFlowData"),G(x)):(t.consume(x),F)}function G(x){return t.check(hd,z,le)(x)}function z(x){return t.enter("lineEnding"),t.consume(x),t.exit("lineEnding"),M}function M(x){return x===null||Q(x)?G(x):(t.enter("htmlFlowData"),F(x))}function W(x){return x===45?(t.consume(x),A):F(x)}function K(x){return x===47?(t.consume(x),a="",te):F(x)}function te(x){if(x===62){const ue=a.toLowerCase();return as.includes(ue)?(t.consume(x),Z):F(x)}return ve(x)&&a.length<8?(t.consume(x),a+=String.fromCharCode(x),te):F(x)}function J(x){return x===93?(t.consume(x),A):F(x)}function A(x){return x===62?(t.consume(x),Z):x===45&&i===2?(t.consume(x),A):F(x)}function Z(x){return x===null||Q(x)?(t.exit("htmlFlowData"),le(x)):(t.consume(x),Z)}function le(x){return t.exit("htmlFlow"),e(x)}}function gd(t,e,n){const r=this;return i;function i(a){return Q(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),s):n(a)}function s(a){return r.parser.lazy[r.now().line]?n(a):e(a)}}function Ed(t,e,n){return r;function r(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(bn,e,n)}}const bd={name:"htmlText",tokenize:Td};function Td(t,e,n){const r=this;let i,s,a;return u;function u(A){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(A),o}function o(A){return A===33?(t.consume(A),l):A===47?(t.consume(A),O):A===63?(t.consume(A),N):ve(A)?(t.consume(A),Y):n(A)}function l(A){return A===45?(t.consume(A),f):A===91?(t.consume(A),s=0,g):ve(A)?(t.consume(A),S):n(A)}function f(A){return A===45?(t.consume(A),h):n(A)}function d(A){return A===null?n(A):A===45?(t.consume(A),m):Q(A)?(a=d,K(A)):(t.consume(A),d)}function m(A){return A===45?(t.consume(A),h):d(A)}function h(A){return A===62?W(A):A===45?m(A):d(A)}function g(A){const Z="CDATA[";return A===Z.charCodeAt(s++)?(t.consume(A),s===Z.length?k:g):n(A)}function k(A){return A===null?n(A):A===93?(t.consume(A),C):Q(A)?(a=k,K(A)):(t.consume(A),k)}function C(A){return A===93?(t.consume(A),T):k(A)}function T(A){return A===62?W(A):A===93?(t.consume(A),T):k(A)}function S(A){return A===null||A===62?W(A):Q(A)?(a=S,K(A)):(t.consume(A),S)}function N(A){return A===null?n(A):A===63?(t.consume(A),L):Q(A)?(a=N,K(A)):(t.consume(A),N)}function L(A){return A===62?W(A):N(A)}function O(A){return ve(A)?(t.consume(A),y):n(A)}function y(A){return A===45||Re(A)?(t.consume(A),y):j(A)}function j(A){return Q(A)?(a=j,K(A)):re(A)?(t.consume(A),j):W(A)}function Y(A){return A===45||Re(A)?(t.consume(A),Y):A===47||A===62||ge(A)?q(A):n(A)}function q(A){return A===47?(t.consume(A),W):A===58||A===95||ve(A)?(t.consume(A),I):Q(A)?(a=q,K(A)):re(A)?(t.consume(A),q):W(A)}function I(A){return A===45||A===46||A===58||A===95||Re(A)?(t.consume(A),I):B(A)}function B(A){return A===61?(t.consume(A),F):Q(A)?(a=B,K(A)):re(A)?(t.consume(A),B):q(A)}function F(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(t.consume(A),i=A,G):Q(A)?(a=F,K(A)):re(A)?(t.consume(A),F):(t.consume(A),z)}function G(A){return A===i?(t.consume(A),i=void 0,M):A===null?n(A):Q(A)?(a=G,K(A)):(t.consume(A),G)}function z(A){return A===null||A===34||A===39||A===60||A===61||A===96?n(A):A===47||A===62||ge(A)?q(A):(t.consume(A),z)}function M(A){return A===47||A===62||ge(A)?q(A):n(A)}function W(A){return A===62?(t.consume(A),t.exit("htmlTextData"),t.exit("htmlText"),e):n(A)}function K(A){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(A),t.exit("lineEnding"),te}function te(A){return re(A)?oe(t,J,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):J(A)}function J(A){return t.enter("htmlTextData"),a(A)}}const fi={name:"labelEnd",resolveAll:kd,resolveTo:Cd,tokenize:Nd},xd={tokenize:Sd},_d={tokenize:yd},Ad={tokenize:Id};function kd(t){let e=-1;const n=[];for(;++e<t.length;){const r=t[e][1];if(n.push(t[e]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",e+=i}}return t.length!==n.length&&Ye(t,0,t.length,n),t}function Cd(t,e){let n=t.length,r=0,i,s,a,u;for(;n--;)if(i=t[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;t[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(t[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const o={type:t[s][1].type==="labelLink"?"link":"image",start:{...t[s][1].start},end:{...t[t.length-1][1].end}},l={type:"label",start:{...t[s][1].start},end:{...t[a][1].end}},f={type:"labelText",start:{...t[s+r+2][1].end},end:{...t[a-2][1].start}};return u=[["enter",o,e],["enter",l,e]],u=qe(u,t.slice(s+1,s+r+3)),u=qe(u,[["enter",f,e]]),u=qe(u,Gn(e.parser.constructs.insideSpan.null,t.slice(s+r+4,a-3),e)),u=qe(u,[["exit",f,e],t[a-2],t[a-1],["exit",l,e]]),u=qe(u,t.slice(a+1)),u=qe(u,[["exit",o,e]]),Ye(t,s,t.length,u),t}function Nd(t,e,n){const r=this;let i=r.events.length,s,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return u;function u(m){return s?s._inactive?d(m):(a=r.parser.defined.includes(Ge(r.sliceSerialize({start:s.end,end:r.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(m),t.exit("labelMarker"),t.exit("labelEnd"),o):n(m)}function o(m){return m===40?t.attempt(xd,f,a?f:d)(m):m===91?t.attempt(_d,f,a?l:d)(m):a?f(m):d(m)}function l(m){return t.attempt(Ad,f,d)(m)}function f(m){return e(m)}function d(m){return s._balanced=!0,n(m)}}function Sd(t,e,n){return r;function r(d){return t.enter("resource"),t.enter("resourceMarker"),t.consume(d),t.exit("resourceMarker"),i}function i(d){return ge(d)?rn(t,s)(d):s(d)}function s(d){return d===41?f(d):au(t,a,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function a(d){return ge(d)?rn(t,o)(d):f(d)}function u(d){return n(d)}function o(d){return d===34||d===39||d===40?ou(t,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):f(d)}function l(d){return ge(d)?rn(t,f)(d):f(d)}function f(d){return d===41?(t.enter("resourceMarker"),t.consume(d),t.exit("resourceMarker"),t.exit("resource"),e):n(d)}}function yd(t,e,n){const r=this;return i;function i(u){return uu.call(r,t,s,a,"reference","referenceMarker","referenceString")(u)}function s(u){return r.parser.defined.includes(Ge(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?e(u):n(u)}function a(u){return n(u)}}function Id(t,e,n){return r;function r(s){return t.enter("reference"),t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),i}function i(s){return s===93?(t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),t.exit("reference"),e):n(s)}}const wd={name:"labelStartImage",resolveAll:fi.resolveAll,tokenize:Ld};function Ld(t,e,n){const r=this;return i;function i(u){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(u),t.exit("labelImageMarker"),s}function s(u){return u===91?(t.enter("labelMarker"),t.consume(u),t.exit("labelMarker"),t.exit("labelImage"),a):n(u)}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):e(u)}}const Rd={name:"labelStartLink",resolveAll:fi.resolveAll,tokenize:Od};function Od(t,e,n){const r=this;return i;function i(a){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(a),t.exit("labelMarker"),t.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):e(a)}}const lr={name:"lineEnding",tokenize:Dd};function Dd(t,e){return n;function n(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),oe(t,e,"linePrefix")}}const wn={name:"thematicBreak",tokenize:Pd};function Pd(t,e,n){let r=0,i;return s;function s(l){return t.enter("thematicBreak"),a(l)}function a(l){return i=l,u(l)}function u(l){return l===i?(t.enter("thematicBreakSequence"),o(l)):r>=3&&(l===null||Q(l))?(t.exit("thematicBreak"),e(l)):n(l)}function o(l){return l===i?(t.consume(l),r++,o):(t.exit("thematicBreakSequence"),re(l)?oe(t,u,"whitespace")(l):u(l))}}const Ue={continuation:{tokenize:Fd},exit:Ud,name:"list",tokenize:Bd},Md={partial:!0,tokenize:jd},vd={partial:!0,tokenize:Hd};function Bd(t,e,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return u;function u(h){const g=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Lr(h)){if(r.containerState.type||(r.containerState.type=g,t.enter(g,{_container:!0})),g==="listUnordered")return t.enter("listItemPrefix"),h===42||h===45?t.check(wn,n,l)(h):l(h);if(!r.interrupt||h===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),o(h)}return n(h)}function o(h){return Lr(h)&&++a<10?(t.consume(h),o):(!r.interrupt||a<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(t.exit("listItemValue"),l(h)):n(h)}function l(h){return t.enter("listItemMarker"),t.consume(h),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,t.check(bn,r.interrupt?n:f,t.attempt(Md,m,d))}function f(h){return r.containerState.initialBlankLine=!0,s++,m(h)}function d(h){return re(h)?(t.enter("listItemPrefixWhitespace"),t.consume(h),t.exit("listItemPrefixWhitespace"),m):n(h)}function m(h){return r.containerState.size=s+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(h)}}function Fd(t,e,n){const r=this;return r.containerState._closeFlow=void 0,t.check(bn,i,s);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,oe(t,e,"listItemIndent",r.containerState.size+1)(u)}function s(u){return r.containerState.furtherBlankLines||!re(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(vd,e,a)(u))}function a(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,oe(t,t.attempt(Ue,e,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function Hd(t,e,n){const r=this;return oe(t,i,"listItemIndent",r.containerState.size+1);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?e(s):n(s)}}function Ud(t){t.exit(this.containerState.type)}function jd(t,e,n){const r=this;return oe(t,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const a=r.events[r.events.length-1];return!re(s)&&a&&a[1].type==="listItemPrefixWhitespace"?e(s):n(s)}}const us={name:"setextUnderline",resolveTo:zd,tokenize:$d};function zd(t,e){let n=t.length,r,i,s;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){r=n;break}t[n][1].type==="paragraph"&&(i=n)}else t[n][1].type==="content"&&t.splice(n,1),!s&&t[n][1].type==="definition"&&(s=n);const a={type:"setextHeading",start:{...t[r][1].start},end:{...t[t.length-1][1].end}};return t[i][1].type="setextHeadingText",s?(t.splice(i,0,["enter",a,e]),t.splice(s+1,0,["exit",t[r][1],e]),t[r][1].end={...t[s][1].end}):t[r][1]=a,t.push(["exit",a,e]),t}function $d(t,e,n){const r=this;let i;return s;function s(l){let f=r.events.length,d;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){d=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(t.enter("setextHeadingLine"),i=l,a(l)):n(l)}function a(l){return t.enter("setextHeadingLineSequence"),u(l)}function u(l){return l===i?(t.consume(l),u):(t.exit("setextHeadingLineSequence"),re(l)?oe(t,o,"lineSuffix")(l):o(l))}function o(l){return l===null||Q(l)?(t.exit("setextHeadingLine"),e(l)):n(l)}}const Yd={tokenize:qd};function qd(t){const e=this,n=t.attempt(bn,r,t.attempt(this.parser.constructs.flowInitial,i,oe(t,t.attempt(this.parser.constructs.flow,i,t.attempt(Kf,i)),"linePrefix")));return n;function r(s){if(s===null){t.consume(s);return}return t.enter("lineEndingBlank"),t.consume(s),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function i(s){if(s===null){t.consume(s);return}return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),e.currentConstruct=void 0,n}}const Vd={resolveAll:cu()},Wd=lu("string"),Gd=lu("text");function lu(t){return{resolveAll:cu(t==="text"?Qd:void 0),tokenize:e};function e(n){const r=this,i=this.parser.constructs[t],s=n.attempt(i,a,u);return a;function a(f){return l(f)?s(f):u(f)}function u(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),o}function o(f){return l(f)?(n.exit("data"),s(f)):(n.consume(f),o)}function l(f){if(f===null)return!0;const d=i[f];let m=-1;if(d)for(;++m<d.length;){const h=d[m];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function cu(t){return e;function e(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return t?t(n,r):n}}function Qd(t,e){let n=0;for(;++n<=t.length;)if((n===t.length||t[n][1].type==="lineEnding")&&t[n-1][1].type==="data"){const r=t[n-1][1],i=e.sliceStream(r);let s=i.length,a=-1,u=0,o;for(;s--;){const l=i[s];if(typeof l=="string"){for(a=l.length;l.charCodeAt(a-1)===32;)u++,a--;if(a)break;a=-1}else if(l===-2)o=!0,u++;else if(l!==-1){s++;break}}if(e._contentTypeTextTrailing&&n===t.length&&(u=0),u){const l={type:n===t.length||o||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:r.start._bufferIndex+a,_index:r.start._index+s,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...l.start},r.start.offset===r.end.offset?Object.assign(r,l):(t.splice(n,0,["enter",l,e],["exit",l,e]),n+=2)}n++}return t}const Kd={42:Ue,43:Ue,45:Ue,48:Ue,49:Ue,50:Ue,51:Ue,52:Ue,53:Ue,54:Ue,55:Ue,56:Ue,57:Ue,62:nu},Xd={91:td},Zd={[-2]:or,[-1]:or,32:or},Jd={35:ud,42:wn,45:[us,wn],60:fd,61:us,95:wn,96:ss,126:ss},e0={38:iu,92:ru},t0={[-5]:lr,[-4]:lr,[-3]:lr,33:wd,38:iu,42:Rr,60:[Rf,bd],91:Rd,92:[sd,ru],93:fi,95:Rr,96:Yf},n0={null:[Rr,Vd]},r0={null:[42,95]},i0={null:[]},s0=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:r0,contentInitial:Xd,disable:i0,document:Kd,flow:Jd,flowInitial:Zd,insideSpan:n0,string:e0,text:t0},Symbol.toStringTag,{value:"Module"}));function a0(t,e,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},s=[];let a=[],u=[];const o={attempt:j(O),check:j(y),consume:S,enter:N,exit:L,interrupt:j(y,{interrupt:!0})},l={code:null,containerState:{},defineSkip:k,events:[],now:g,parser:t,previous:null,sliceSerialize:m,sliceStream:h,write:d};let f=e.tokenize.call(l,o);return e.resolveAll&&s.push(e),l;function d(B){return a=qe(a,B),C(),a[a.length-1]!==null?[]:(Y(e,0),l.events=Gn(s,l.events,l),l.events)}function m(B,F){return o0(h(B),F)}function h(B){return u0(a,B)}function g(){const{_bufferIndex:B,_index:F,line:G,column:z,offset:M}=r;return{_bufferIndex:B,_index:F,line:G,column:z,offset:M}}function k(B){i[B.line]=B.column,I()}function C(){let B;for(;r._index<a.length;){const F=a[r._index];if(typeof F=="string")for(B=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===B&&r._bufferIndex<F.length;)T(F.charCodeAt(r._bufferIndex));else T(F)}}function T(B){f=f(B)}function S(B){Q(B)?(r.line++,r.column=1,r.offset+=B===-3?2:1,I()):B!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=B}function N(B,F){const G=F||{};return G.type=B,G.start=g(),l.events.push(["enter",G,l]),u.push(G),G}function L(B){const F=u.pop();return F.end=g(),l.events.push(["exit",F,l]),F}function O(B,F){Y(B,F.from)}function y(B,F){F.restore()}function j(B,F){return G;function G(z,M,W){let K,te,J,A;return Array.isArray(z)?le(z):"tokenize"in z?le([z]):Z(z);function Z(ce){return ke;function ke(Ee){const xe=Ee!==null&&ce[Ee],me=Ee!==null&&ce.null,Ae=[...Array.isArray(xe)?xe:xe?[xe]:[],...Array.isArray(me)?me:me?[me]:[]];return le(Ae)(Ee)}}function le(ce){return K=ce,te=0,ce.length===0?W:x(ce[te])}function x(ce){return ke;function ke(Ee){return A=q(),J=ce,ce.partial||(l.currentConstruct=ce),ce.name&&l.parser.constructs.disable.null.includes(ce.name)?he():ce.tokenize.call(F?Object.assign(Object.create(l),F):l,o,ue,he)(Ee)}}function ue(ce){return B(J,A),M}function he(ce){return A.restore(),++te<K.length?x(K[te]):W}}}function Y(B,F){B.resolveAll&&!s.includes(B)&&s.push(B),B.resolve&&Ye(l.events,F,l.events.length-F,B.resolve(l.events.slice(F),l)),B.resolveTo&&(l.events=B.resolveTo(l.events,l))}function q(){const B=g(),F=l.previous,G=l.currentConstruct,z=l.events.length,M=Array.from(u);return{from:z,restore:W};function W(){r=B,l.previous=F,l.currentConstruct=G,l.events.length=z,u=M,I()}}function I(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function u0(t,e){const n=e.start._index,r=e.start._bufferIndex,i=e.end._index,s=e.end._bufferIndex;let a;if(n===i)a=[t[n].slice(r,s)];else{if(a=t.slice(n,i),r>-1){const u=a[0];typeof u=="string"?a[0]=u.slice(r):a.shift()}s>0&&a.push(t[i].slice(0,s))}return a}function o0(t,e){let n=-1;const r=[];let i;for(;++n<t.length;){const s=t[n];let a;if(typeof s=="string")a=s;else switch(s){case-5:{a="\r";break}case-4:{a=`
|
|
55
|
+
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Xe(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:n}){const r=this.parser.parseInline(n),i=Hi(t);if(i===null)return r;t=i;let s='<a href="'+t+'"';return e&&(s+=' title="'+Xe(e)+'"'),s+=">"+r+"</a>",s}image({href:t,title:e,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));const i=Hi(t);if(i===null)return Xe(n);t=i;let s=`<img src="${t}" alt="${n}"`;return e&&(s+=` title="${Xe(e)}"`),s+=">",s}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Xe(t.text)}},si=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},at=class Sr{options;renderer;textRenderer;constructor(e){this.options=e||Ct,this.options.renderer=this.options.renderer||new Pn,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new si}static parse(e,n){return new Sr(n).parse(e)}static parseInline(e,n){return new Sr(n).parseInline(e)}parse(e,n=!0){let r="";for(let i=0;i<e.length;i++){const s=e[i];if(this.options.extensions?.renderers?.[s.type]){const u=s,o=this.options.extensions.renderers[u.type].call({parser:this},u);if(o!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(u.type)){r+=o||"";continue}}const a=s;switch(a.type){case"space":{r+=this.renderer.space(a);continue}case"hr":{r+=this.renderer.hr(a);continue}case"heading":{r+=this.renderer.heading(a);continue}case"code":{r+=this.renderer.code(a);continue}case"table":{r+=this.renderer.table(a);continue}case"blockquote":{r+=this.renderer.blockquote(a);continue}case"list":{r+=this.renderer.list(a);continue}case"html":{r+=this.renderer.html(a);continue}case"paragraph":{r+=this.renderer.paragraph(a);continue}case"text":{let u=a,o=this.renderer.text(u);for(;i+1<e.length&&e[i+1].type==="text";)u=e[++i],o+=`
|
|
56
|
+
`+this.renderer.text(u);n?r+=this.renderer.paragraph({type:"paragraph",raw:o,text:o,tokens:[{type:"text",raw:o,text:o,escaped:!0}]}):r+=o;continue}default:{const u='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return r}parseInline(e,n=this.renderer){let r="";for(let i=0;i<e.length;i++){const s=e[i];if(this.options.extensions?.renderers?.[s.type]){const u=this.options.extensions.renderers[s.type].call({parser:this},s);if(u!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){r+=u||"";continue}}const a=s;switch(a.type){case"escape":{r+=n.text(a);break}case"html":{r+=n.html(a);break}case"link":{r+=n.link(a);break}case"image":{r+=n.image(a);break}case"strong":{r+=n.strong(a);break}case"em":{r+=n.em(a);break}case"codespan":{r+=n.codespan(a);break}case"br":{r+=n.br(a);break}case"del":{r+=n.del(a);break}case"text":{r+=n.text(a);break}default:{const u='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return r}},In=class{options;block;constructor(t){this.options=t||Ct}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?st.lex:st.lexInline}provideParser(){return this.block?at.parse:at.parseInline}},Ic=class{defaults=Xr();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=at;Renderer=Pn;TextRenderer=si;Lexer=st;Tokenizer=Dn;Hooks=In;constructor(...t){this.use(...t)}walkTokens(t,e){let n=[];for(const r of t)switch(n=n.concat(e.call(this,r)),r.type){case"table":{const i=r;for(const s of i.header)n=n.concat(this.walkTokens(s.tokens,e));for(const s of i.rows)for(const a of s)n=n.concat(this.walkTokens(a.tokens,e));break}case"list":{const i=r;n=n.concat(this.walkTokens(i.items,e));break}default:{const i=r;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(s=>{const a=i[s].flat(1/0);n=n.concat(this.walkTokens(a,e))}):i.tokens&&(n=n.concat(this.walkTokens(i.tokens,e)))}}return n}use(...t){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{const 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){const s=e.renderers[i.name];s?e.renderers[i.name]=function(...a){let u=i.renderer.apply(this,a);return u===!1&&(u=s.apply(this,a)),u}:e.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'");const s=e[i.level];s?s.unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),r.extensions=e),n.renderer){const i=this.defaults.renderer||new Pn(this.defaults);for(const s in n.renderer){if(!(s in i))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;const a=s,u=n.renderer[a],o=i[a];i[a]=(...l)=>{let f=u.apply(i,l);return f===!1&&(f=o.apply(i,l)),f||""}}r.renderer=i}if(n.tokenizer){const i=this.defaults.tokenizer||new Dn(this.defaults);for(const s in n.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;const a=s,u=n.tokenizer[a],o=i[a];i[a]=(...l)=>{let f=u.apply(i,l);return f===!1&&(f=o.apply(i,l)),f}}r.tokenizer=i}if(n.hooks){const i=this.defaults.hooks||new In;for(const s in n.hooks){if(!(s in i))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;const a=s,u=n.hooks[a],o=i[a];In.passThroughHooks.has(s)?i[a]=l=>{if(this.defaults.async)return Promise.resolve(u.call(i,l)).then(d=>o.call(i,d));const f=u.call(i,l);return o.call(i,f)}:i[a]=(...l)=>{let f=u.apply(i,l);return f===!1&&(f=o.apply(i,l)),f}}r.hooks=i}if(n.walkTokens){const i=this.defaults.walkTokens,s=n.walkTokens;r.walkTokens=function(a){let u=[];return u.push(s.call(this,a)),i&&(u=u.concat(i.call(this,a))),u}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return st.lex(t,e??this.defaults)}parser(t,e){return at.parse(t,e??this.defaults)}parseMarkdown(t){return(n,r)=>{const i={...r},s={...this.defaults,...i},a=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&i.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 n>"u"||n===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));s.hooks&&(s.hooks.options=s,s.hooks.block=t);const u=s.hooks?s.hooks.provideLexer():t?st.lex:st.lexInline,o=s.hooks?s.hooks.provideParser():t?at.parse:at.parseInline;if(s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(n):n).then(l=>u(l,s)).then(l=>s.hooks?s.hooks.processAllTokens(l):l).then(l=>s.walkTokens?Promise.all(this.walkTokens(l,s.walkTokens)).then(()=>l):l).then(l=>o(l,s)).then(l=>s.hooks?s.hooks.postprocess(l):l).catch(a);try{s.hooks&&(n=s.hooks.preprocess(n));let l=u(n,s);s.hooks&&(l=s.hooks.processAllTokens(l)),s.walkTokens&&this.walkTokens(l,s.walkTokens);let f=o(l,s);return s.hooks&&(f=s.hooks.postprocess(f)),f}catch(l){return a(l)}}}onError(t,e){return n=>{if(n.message+=`
|
|
57
|
+
Please report this to https://github.com/markedjs/marked.`,t){const r="<p>An error occurred:</p><pre>"+Xe(n.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(n);throw n}}},At=new Ic;function de(t,e){return At.parse(t,e)}de.options=de.setOptions=function(t){return At.setOptions(t),de.defaults=At.defaults,Ia(de.defaults),de};de.getDefaults=Xr;de.defaults=Ct;de.use=function(...t){return At.use(...t),de.defaults=At.defaults,Ia(de.defaults),de};de.walkTokens=function(t,e){return At.walkTokens(t,e)};de.parseInline=At.parseInline;de.Parser=at;de.parser=at.parse;de.Renderer=Pn;de.TextRenderer=si;de.Lexer=st;de.lexer=st.lex;de.Tokenizer=Dn;de.Hooks=In;de.parse=de;de.options;de.setOptions;de.use;de.walkTokens;de.parseInline;at.parse;st.lex;function zi(t){const e=[],n=String(t||"");let r=n.indexOf(","),i=0,s=!1;for(;!s;){r===-1&&(r=n.length,s=!0);const a=n.slice(i,r).trim();(a||!s)&&e.push(a),i=r+1,r=n.indexOf(",",i)}return e}function Ha(t,e){const n={};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const wc=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Lc=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Rc={};function $i(t,e){return(Rc.jsx?Lc:wc).test(t)}const Oc=/[ \t\n\f\r]/g;function Dc(t){return typeof t=="object"?t.type==="text"?Yi(t.value):!1:Yi(t)}function Yi(t){return t.replace(Oc,"")===""}class gn{constructor(e,n,r){this.normal=n,this.property=e,r&&(this.space=r)}}gn.prototype.normal={};gn.prototype.property={};gn.prototype.space=void 0;function Ua(t,e){const n={},r={};for(const i of t)Object.assign(n,i.property),Object.assign(r,i.normal);return new gn(n,r,e)}function fn(t){return t.toLowerCase()}class je{constructor(e,n){this.attribute=n,this.property=e}}je.prototype.attribute="";je.prototype.booleanish=!1;je.prototype.boolean=!1;je.prototype.commaOrSpaceSeparated=!1;je.prototype.commaSeparated=!1;je.prototype.defined=!1;je.prototype.mustUseProperty=!1;je.prototype.number=!1;je.prototype.overloadedBoolean=!1;je.prototype.property="";je.prototype.spaceSeparated=!1;je.prototype.space=void 0;let Pc=0;const ee=Nt(),Ne=Nt(),yr=Nt(),H=Nt(),Te=Nt(),Ot=Nt(),$e=Nt();function Nt(){return 2**++Pc}const Ir=Object.freeze(Object.defineProperty({__proto__:null,boolean:ee,booleanish:Ne,commaOrSpaceSeparated:$e,commaSeparated:Ot,number:H,overloadedBoolean:yr,spaceSeparated:Te},Symbol.toStringTag,{value:"Module"})),sr=Object.keys(Ir);class ai extends je{constructor(e,n,r,i){let s=-1;if(super(e,n),qi(this,"space",i),typeof r=="number")for(;++s<sr.length;){const a=sr[s];qi(this,sr[s],(r&Ir[a])===Ir[a])}}}ai.prototype.defined=!0;function qi(t,e,n){n&&(t[e]=n)}function Ft(t){const e={},n={};for(const[r,i]of Object.entries(t.properties)){const s=new ai(r,t.transform(t.attributes||{},r),i,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),e[r]=s,n[fn(r)]=r,n[fn(s.attribute)]=r}return new gn(e,n,t.space)}const ja=Ft({properties:{ariaActiveDescendant:null,ariaAtomic:Ne,ariaAutoComplete:null,ariaBusy:Ne,ariaChecked:Ne,ariaColCount:H,ariaColIndex:H,ariaColSpan:H,ariaControls:Te,ariaCurrent:null,ariaDescribedBy:Te,ariaDetails:null,ariaDisabled:Ne,ariaDropEffect:Te,ariaErrorMessage:null,ariaExpanded:Ne,ariaFlowTo:Te,ariaGrabbed:Ne,ariaHasPopup:null,ariaHidden:Ne,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Te,ariaLevel:H,ariaLive:null,ariaModal:Ne,ariaMultiLine:Ne,ariaMultiSelectable:Ne,ariaOrientation:null,ariaOwns:Te,ariaPlaceholder:null,ariaPosInSet:H,ariaPressed:Ne,ariaReadOnly:Ne,ariaRelevant:null,ariaRequired:Ne,ariaRoleDescription:Te,ariaRowCount:H,ariaRowIndex:H,ariaRowSpan:H,ariaSelected:Ne,ariaSetSize:H,ariaSort:null,ariaValueMax:H,ariaValueMin:H,ariaValueNow:H,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function za(t,e){return e in t?t[e]:e}function $a(t,e){return za(t,e.toLowerCase())}const Mc=Ft({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ot,acceptCharset:Te,accessKey:Te,action:null,allow:null,allowFullScreen:ee,allowPaymentRequest:ee,allowUserMedia:ee,alt:null,as:null,async:ee,autoCapitalize:null,autoComplete:Te,autoFocus:ee,autoPlay:ee,blocking:Te,capture:null,charSet:null,checked:ee,cite:null,className:Te,cols:H,colSpan:null,content:null,contentEditable:Ne,controls:ee,controlsList:Te,coords:H|Ot,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ee,defer:ee,dir:null,dirName:null,disabled:ee,download:yr,draggable:Ne,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ee,formTarget:null,headers:Te,height:H,hidden:yr,high:H,href:null,hrefLang:null,htmlFor:Te,httpEquiv:Te,id:null,imageSizes:null,imageSrcSet:null,inert:ee,inputMode:null,integrity:null,is:null,isMap:ee,itemId:null,itemProp:Te,itemRef:Te,itemScope:ee,itemType:Te,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ee,low:H,manifest:null,max:null,maxLength:H,media:null,method:null,min:null,minLength:H,multiple:ee,muted:ee,name:null,nonce:null,noModule:ee,noValidate:ee,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:ee,optimum:H,pattern:null,ping:Te,placeholder:null,playsInline:ee,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ee,referrerPolicy:null,rel:Te,required:ee,reversed:ee,rows:H,rowSpan:H,sandbox:Te,scope:null,scoped:ee,seamless:ee,selected:ee,shadowRootClonable:ee,shadowRootDelegatesFocus:ee,shadowRootMode:null,shape:null,size:H,sizes:null,slot:null,span:H,spellCheck:Ne,src:null,srcDoc:null,srcLang:null,srcSet:null,start:H,step:null,style:null,tabIndex:H,target:null,title:null,translate:null,type:null,typeMustMatch:ee,useMap:null,value:Ne,width:H,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Te,axis:null,background:null,bgColor:null,border:H,borderColor:null,bottomMargin:H,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ee,declare:ee,event:null,face:null,frame:null,frameBorder:null,hSpace:H,leftMargin:H,link:null,longDesc:null,lowSrc:null,marginHeight:H,marginWidth:H,noResize:ee,noHref:ee,noShade:ee,noWrap:ee,object:null,profile:null,prompt:null,rev:null,rightMargin:H,rules:null,scheme:null,scrolling:Ne,standby:null,summary:null,text:null,topMargin:H,valueType:null,version:null,vAlign:null,vLink:null,vSpace:H,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ee,disableRemotePlayback:ee,prefix:null,property:null,results:H,security:null,unselectable:null},space:"html",transform:$a}),vc=Ft({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:$e,accentHeight:H,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:H,amplitude:H,arabicForm:null,ascent:H,attributeName:null,attributeType:null,azimuth:H,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:H,by:null,calcMode:null,capHeight:H,className:Te,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:H,diffuseConstant:H,direction:null,display:null,dur:null,divisor:H,dominantBaseline:null,download:ee,dx:null,dy:null,edgeMode:null,editable:null,elevation:H,enableBackground:null,end:null,event:null,exponent:H,externalResourcesRequired:null,fill:null,fillOpacity:H,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ot,g2:Ot,glyphName:Ot,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:H,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:H,horizOriginX:H,horizOriginY:H,id:null,ideographic:H,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:H,k:H,k1:H,k2:H,k3:H,k4:H,kernelMatrix:$e,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:H,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:H,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:H,overlineThickness:H,paintOrder:null,panose1:null,path:null,pathLength:H,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Te,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:H,pointsAtY:H,pointsAtZ:H,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:$e,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:$e,rev:$e,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:$e,requiredFeatures:$e,requiredFonts:$e,requiredFormats:$e,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:H,specularExponent:H,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:H,strikethroughThickness:H,string:null,stroke:null,strokeDashArray:$e,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:H,strokeOpacity:H,strokeWidth:null,style:null,surfaceScale:H,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:$e,tabIndex:H,tableValues:null,target:null,targetX:H,targetY:H,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:$e,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:H,underlineThickness:H,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:H,values:null,vAlphabetic:H,vMathematical:H,vectorEffect:null,vHanging:H,vIdeographic:H,version:null,vertAdvY:H,vertOriginX:H,vertOriginY:H,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:H,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:za}),Ya=Ft({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}}),qa=Ft({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:$a}),Va=Ft({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),Bc={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"},Fc=/[A-Z]/g,Vi=/-[a-z]/g,Hc=/^data[-\w.:]+$/i;function qn(t,e){const n=fn(e);let r=e,i=je;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Hc.test(e)){if(e.charAt(4)==="-"){const s=e.slice(5).replace(Vi,jc);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=e.slice(4);if(!Vi.test(s)){let a=s.replace(Fc,Uc);a.charAt(0)!=="-"&&(a="-"+a),e="data"+a}}i=ai}return new i(r,e)}function Uc(t){return"-"+t.toLowerCase()}function jc(t){return t.charAt(1).toUpperCase()}const En=Ua([ja,Mc,Ya,qa,Va],"html"),ht=Ua([ja,vc,Ya,qa,Va],"svg");function Wi(t){const e=String(t||"").trim();return e?e.split(/[ \t\n\r\f]+/g):[]}function Wa(t){return t.join(" ").trim()}var It={},ar,Gi;function zc(){if(Gi)return ar;Gi=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,u=/^\s+|\s+$/g,o=`
|
|
58
|
+
`,l="/",f="*",d="",m="comment",h="declaration";function g(C,T){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];T=T||{};var S=1,N=1;function L(z){var M=z.match(e);M&&(S+=M.length);var W=z.lastIndexOf(o);N=~W?z.length-W:N+z.length}function O(){var z={line:S,column:N};return function(M){return M.position=new y(z),q(),M}}function y(z){this.start=z,this.end={line:S,column:N},this.source=T.source}y.prototype.content=C;function j(z){var M=new Error(T.source+":"+S+":"+N+": "+z);if(M.reason=z,M.filename=T.source,M.line=S,M.column=N,M.source=C,!T.silent)throw M}function Y(z){var M=z.exec(C);if(M){var W=M[0];return L(W),C=C.slice(W.length),M}}function q(){Y(n)}function I(z){var M;for(z=z||[];M=B();)M!==!1&&z.push(M);return z}function B(){var z=O();if(!(l!=C.charAt(0)||f!=C.charAt(1))){for(var M=2;d!=C.charAt(M)&&(f!=C.charAt(M)||l!=C.charAt(M+1));)++M;if(M+=2,d===C.charAt(M-1))return j("End of comment missing");var W=C.slice(2,M-2);return N+=2,L(W),C=C.slice(M),N+=2,z({type:m,comment:W})}}function F(){var z=O(),M=Y(r);if(M){if(B(),!Y(i))return j("property missing ':'");var W=Y(s),K=z({type:h,property:k(M[0].replace(t,d)),value:W?k(W[0].replace(t,d)):d});return Y(a),K}}function G(){var z=[];I(z);for(var M;M=F();)M!==!1&&(z.push(M),I(z));return z}return q(),G()}function k(C){return C?C.replace(u,d):d}return ar=g,ar}var Qi;function $c(){if(Qi)return It;Qi=1;var t=It&&It.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(It,"__esModule",{value:!0}),It.default=n;const e=t(zc());function n(r,i){let s=null;if(!r||typeof r!="string")return s;const a=(0,e.default)(r),u=typeof i=="function";return a.forEach(o=>{if(o.type!=="declaration")return;const{property:l,value:f}=o;u?i(l,f,o):f&&(s=s||{},s[l]=f)}),s}return It}var Wt={},Ki;function Yc(){if(Ki)return Wt;Ki=1,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,e=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(l){return!l||n.test(l)||t.test(l)},a=function(l,f){return f.toUpperCase()},u=function(l,f){return"".concat(f,"-")},o=function(l,f){return f===void 0&&(f={}),s(l)?l:(l=l.toLowerCase(),f.reactCompat?l=l.replace(i,u):l=l.replace(r,u),l.replace(e,a))};return Wt.camelCase=o,Wt}var Gt,Xi;function qc(){if(Xi)return Gt;Xi=1;var t=Gt&&Gt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},e=t($c()),n=Yc();function r(i,s){var a={};return!i||typeof i!="string"||(0,e.default)(i,function(u,o){u&&o&&(a[(0,n.camelCase)(u,s)]=o)}),a}return r.default=r,Gt=r,Gt}var Vc=qc();const Wc=ra(Vc),Vn=Ga("end"),et=Ga("start");function Ga(t){return e;function e(n){const r=n&&n.position&&n.position[t]||{};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 Gc(t){const e=et(t),n=Vn(t);if(e&&n)return{start:e,end:n}}function nn(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?Zi(t.position):"start"in t||"end"in t?Zi(t):"line"in t||"column"in t?wr(t):""}function wr(t){return Ji(t&&t.line)+":"+Ji(t&&t.column)}function Zi(t){return wr(t&&t.start)+"-"+wr(t&&t.end)}function Ji(t){return t&&typeof t=="number"?t:1}class Oe extends Error{constructor(e,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},a=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof e=="string"?i=e:!s.cause&&e&&(a=!0,i=e.message,s.cause=e),!s.ruleId&&!s.source&&typeof r=="string"){const o=r.indexOf(":");o===-1?s.ruleId=r:(s.source=r.slice(0,o),s.ruleId=r.slice(o+1))}if(!s.place&&s.ancestors&&s.ancestors){const o=s.ancestors[s.ancestors.length-1];o&&(s.place=o.position)}const u=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=u?u.line:void 0,this.name=nn(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=a&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Oe.prototype.file="";Oe.prototype.name="";Oe.prototype.reason="";Oe.prototype.message="";Oe.prototype.stack="";Oe.prototype.column=void 0;Oe.prototype.line=void 0;Oe.prototype.ancestors=void 0;Oe.prototype.cause=void 0;Oe.prototype.fatal=void 0;Oe.prototype.place=void 0;Oe.prototype.ruleId=void 0;Oe.prototype.source=void 0;const ui={}.hasOwnProperty,Qc=new Map,Kc=/[A-Z]/g,Xc=new Set(["table","tbody","thead","tfoot","tr"]),Zc=new Set(["td","th"]),Qa="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Jc(t,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=e.filePath||void 0;let r;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=of(n,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=uf(n,e.jsx,e.jsxs)}const i={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:r,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?ht:En,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},s=Ka(i,t,void 0);return s&&typeof s!="string"?s:i.create(t,i.Fragment,{children:s||void 0},void 0)}function Ka(t,e,n){if(e.type==="element")return ef(t,e,n);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return tf(t,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return rf(t,e,n);if(e.type==="mdxjsEsm")return nf(t,e);if(e.type==="root")return sf(t,e,n);if(e.type==="text")return af(t,e)}function ef(t,e,n){const r=t.schema;let i=r;e.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=ht,t.schema=i),t.ancestors.push(e);const s=Za(t,e.tagName,!1),a=lf(t,e);let u=li(t,e);return Xc.has(e.tagName)&&(u=u.filter(function(o){return typeof o=="string"?!Dc(o):!0})),Xa(t,a,s,e),oi(a,u),t.ancestors.pop(),t.schema=r,t.create(e,s,a,n)}function tf(t,e){if(e.data&&e.data.estree&&t.evaluater){const r=e.data.estree.body[0];return r.type,t.evaluater.evaluateExpression(r.expression)}dn(t,e.position)}function nf(t,e){if(e.data&&e.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(e.data.estree);dn(t,e.position)}function rf(t,e,n){const r=t.schema;let i=r;e.name==="svg"&&r.space==="html"&&(i=ht,t.schema=i),t.ancestors.push(e);const s=e.name===null?t.Fragment:Za(t,e.name,!0),a=cf(t,e),u=li(t,e);return Xa(t,a,s,e),oi(a,u),t.ancestors.pop(),t.schema=r,t.create(e,s,a,n)}function sf(t,e,n){const r={};return oi(r,li(t,e)),t.create(e,t.Fragment,r,n)}function af(t,e){return e.value}function Xa(t,e,n,r){typeof n!="string"&&n!==t.Fragment&&t.passNode&&(e.node=r)}function oi(t,e){if(e.length>0){const n=e.length>1?e:e[0];n&&(t.children=n)}}function uf(t,e,n){return r;function r(i,s,a,u){const l=Array.isArray(a.children)?n:e;return u?l(s,a,u):l(s,a)}}function of(t,e){return n;function n(r,i,s,a){const u=Array.isArray(s.children),o=et(r);return e(i,s,a,u,{columnNumber:o?o.column-1:void 0,fileName:t,lineNumber:o?o.line:void 0},void 0)}}function lf(t,e){const n={};let r,i;for(i in e.properties)if(i!=="children"&&ui.call(e.properties,i)){const s=ff(t,i,e.properties[i]);if(s){const[a,u]=s;t.tableCellAlignToStyle&&a==="align"&&typeof u=="string"&&Zc.has(e.tagName)?r=u:n[a]=u}}if(r){const s=n.style||(n.style={});s[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function cf(t,e){const n={};for(const r of e.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&t.evaluater){const s=r.data.estree.body[0];s.type;const a=s.expression;a.type;const u=a.properties[0];u.type,Object.assign(n,t.evaluater.evaluateExpression(u.argument))}else dn(t,e.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&t.evaluater){const u=r.value.data.estree.body[0];u.type,s=t.evaluater.evaluateExpression(u.expression)}else dn(t,e.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function li(t,e){const n=[];let r=-1;const i=t.passKeys?new Map:Qc;for(;++r<e.children.length;){const s=e.children[r];let a;if(t.passKeys){const o=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(o){const l=i.get(o)||0;a=o+"-"+l,i.set(o,l+1)}}const u=Ka(t,s,a);u!==void 0&&n.push(u)}return n}function ff(t,e,n){const r=qn(t.schema,e);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Ha(n):Wa(n)),r.property==="style"){let i=typeof n=="object"?n:df(t,String(n));return t.stylePropertyNameCase==="css"&&(i=hf(i)),["style",i]}return[t.elementAttributeNameCase==="react"&&r.space?Bc[r.property]||r.property:r.attribute,n]}}function df(t,e){try{return Wc(e,{reactCompat:!0})}catch(n){if(t.ignoreInvalidStyle)return{};const r=n,i=new Oe("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=t.filePath||void 0,i.url=Qa+"#cannot-parse-style-attribute",i}}function Za(t,e,n){let r;if(!n)r={type:"Literal",value:e};else if(e.includes(".")){const i=e.split(".");let s=-1,a;for(;++s<i.length;){const u=$i(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};a=a?{type:"MemberExpression",object:a,property:u,computed:!!(s&&u.type==="Literal"),optional:!1}:u}r=a}else r=$i(e)&&!/^[a-z]/.test(e)?{type:"Identifier",name:e}:{type:"Literal",value:e};if(r.type==="Literal"){const i=r.value;return ui.call(t.components,i)?t.components[i]:i}if(t.evaluater)return t.evaluater.evaluateExpression(r);dn(t)}function dn(t,e){const n=new Oe("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:e,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=t.filePath||void 0,n.url=Qa+"#cannot-handle-mdx-estrees-without-createevaluater",n}function hf(t){const e={};let n;for(n in t)ui.call(t,n)&&(e[mf(n)]=t[n]);return e}function mf(t){let e=t.replace(Kc,pf);return e.slice(0,3)==="ms-"&&(e="-"+e),e}function pf(t){return"-"+t.toLowerCase()}const ur={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"]},gf={};function ci(t,e){const n=gf,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Ja(t,r,i)}function Ja(t,e,n){if(Ef(t)){if("value"in t)return t.type==="html"&&!n?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return es(t.children,e,n)}return Array.isArray(t)?es(t,e,n):""}function es(t,e,n){const r=[];let i=-1;for(;++i<t.length;)r[i]=Ja(t[i],e,n);return r.join("")}function Ef(t){return!!(t&&typeof t=="object")}const ts=document.createElement("i");function fi(t){const e="&"+t+";";ts.innerHTML=e;const n=ts.textContent;return n.charCodeAt(n.length-1)===59&&t!=="semi"||n===e?!1:n}function Ye(t,e,n,r){const i=t.length;let s=0,a;if(e<0?e=-e>i?0:i+e:e=e>i?i:e,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(e,n),t.splice(...a);else for(n&&t.splice(e,n);s<r.length;)a=r.slice(s,s+1e4),a.unshift(e,0),t.splice(...a),s+=1e4,e+=1e4}function qe(t,e){return t.length>0?(Ye(t,t.length,0,e),t):e}const ns={}.hasOwnProperty;function eu(t){const e={};let n=-1;for(;++n<t.length;)bf(e,t[n]);return e}function bf(t,e){let n;for(n in e){const i=(ns.call(t,n)?t[n]:void 0)||(t[n]={}),s=e[n];let a;if(s)for(a in s){ns.call(i,a)||(i[a]=[]);const u=s[a];Tf(i[a],Array.isArray(u)?u:u?[u]:[])}}}function Tf(t,e){let n=-1;const r=[];for(;++n<e.length;)(e[n].add==="after"?t:r).push(e[n]);Ye(t,0,0,r)}function tu(t,e){const n=Number.parseInt(t,e);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Ge(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ve=mt(/[A-Za-z]/),Re=mt(/[\dA-Za-z]/),xf=mt(/[#-'*+\--9=?A-Z^-~]/);function Mn(t){return t!==null&&(t<32||t===127)}const Lr=mt(/\d/),_f=mt(/[\dA-Fa-f]/),Af=mt(/[!-/:-@[-`{-~]/);function Q(t){return t!==null&&t<-2}function ge(t){return t!==null&&(t<0||t===32)}function re(t){return t===-2||t===-1||t===32}const Wn=mt(new RegExp("\\p{P}|\\p{S}","u")),kt=mt(/\s/);function mt(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function Ht(t){const e=[];let n=-1,r=0,i=0;for(;++n<t.length;){const s=t.charCodeAt(n);let a="";if(s===37&&Re(t.charCodeAt(n+1))&&Re(t.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(a=String.fromCharCode(s));else if(s>55295&&s<57344){const u=t.charCodeAt(n+1);s<56320&&u>56319&&u<57344?(a=String.fromCharCode(s,u),i=1):a="�"}else a=String.fromCharCode(s);a&&(e.push(t.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return e.join("")+t.slice(r)}function oe(t,e,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(o){return re(o)?(t.enter(n),u(o)):e(o)}function u(o){return re(o)&&s++<i?(t.consume(o),u):(t.exit(n),e(o))}}const kf={tokenize:Cf};function Cf(t){const e=t.attempt(this.parser.constructs.contentInitial,r,i);let n;return e;function r(u){if(u===null){t.consume(u);return}return t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),oe(t,e,"linePrefix")}function i(u){return t.enter("paragraph"),s(u)}function s(u){const o=t.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=o),n=o,a(u)}function a(u){if(u===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(u);return}return Q(u)?(t.consume(u),t.exit("chunkText"),s):(t.consume(u),a)}}const Nf={tokenize:Sf},rs={tokenize:yf};function Sf(t){const e=this,n=[];let r=0,i,s,a;return u;function u(N){if(r<n.length){const L=n[r];return e.containerState=L[1],t.attempt(L[0].continuation,o,l)(N)}return l(N)}function o(N){if(r++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,i&&S();const L=e.events.length;let O=L,y;for(;O--;)if(e.events[O][0]==="exit"&&e.events[O][1].type==="chunkFlow"){y=e.events[O][1].end;break}T(r);let j=L;for(;j<e.events.length;)e.events[j][1].end={...y},j++;return Ye(e.events,O+1,0,e.events.slice(L)),e.events.length=j,l(N)}return u(N)}function l(N){if(r===n.length){if(!i)return m(N);if(i.currentConstruct&&i.currentConstruct.concrete)return g(N);e.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(rs,f,d)(N)}function f(N){return i&&S(),T(r),m(N)}function d(N){return e.parser.lazy[e.now().line]=r!==n.length,a=e.now().offset,g(N)}function m(N){return e.containerState={},t.attempt(rs,h,g)(N)}function h(N){return r++,n.push([e.currentConstruct,e.containerState]),m(N)}function g(N){if(N===null){i&&S(),T(0),t.consume(N);return}return i=i||e.parser.flow(e.now()),t.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),k(N)}function k(N){if(N===null){C(t.exit("chunkFlow"),!0),T(0),t.consume(N);return}return Q(N)?(t.consume(N),C(t.exit("chunkFlow")),r=0,e.interrupt=void 0,u):(t.consume(N),k)}function C(N,L){const O=e.sliceStream(N);if(L&&O.push(null),N.previous=s,s&&(s.next=N),s=N,i.defineSkip(N.start),i.write(O),e.parser.lazy[N.start.line]){let y=i.events.length;for(;y--;)if(i.events[y][1].start.offset<a&&(!i.events[y][1].end||i.events[y][1].end.offset>a))return;const j=e.events.length;let Y=j,q,I;for(;Y--;)if(e.events[Y][0]==="exit"&&e.events[Y][1].type==="chunkFlow"){if(q){I=e.events[Y][1].end;break}q=!0}for(T(r),y=j;y<e.events.length;)e.events[y][1].end={...I},y++;Ye(e.events,Y+1,0,e.events.slice(j)),e.events.length=y}}function T(N){let L=n.length;for(;L-- >N;){const O=n[L];e.containerState=O[1],O[0].exit.call(e,t)}n.length=N}function S(){i.write([null]),s=void 0,i=void 0,e.containerState._closeFlow=void 0}}function yf(t,e,n){return oe(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Dt(t){if(t===null||ge(t)||kt(t))return 1;if(Wn(t))return 2}function Gn(t,e,n){const r=[];let i=-1;for(;++i<t.length;){const s=t[i].resolveAll;s&&!r.includes(s)&&(e=s(e,n),r.push(s))}return e}const Rr={name:"attention",resolveAll:If,tokenize:wf};function If(t,e){let n=-1,r,i,s,a,u,o,l,f;for(;++n<t.length;)if(t[n][0]==="enter"&&t[n][1].type==="attentionSequence"&&t[n][1]._close){for(r=n;r--;)if(t[r][0]==="exit"&&t[r][1].type==="attentionSequence"&&t[r][1]._open&&e.sliceSerialize(t[r][1]).charCodeAt(0)===e.sliceSerialize(t[n][1]).charCodeAt(0)){if((t[r][1]._close||t[n][1]._open)&&(t[n][1].end.offset-t[n][1].start.offset)%3&&!((t[r][1].end.offset-t[r][1].start.offset+t[n][1].end.offset-t[n][1].start.offset)%3))continue;o=t[r][1].end.offset-t[r][1].start.offset>1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;const d={...t[r][1].end},m={...t[n][1].start};is(d,-o),is(m,o),a={type:o>1?"strongSequence":"emphasisSequence",start:d,end:{...t[r][1].end}},u={type:o>1?"strongSequence":"emphasisSequence",start:{...t[n][1].start},end:m},s={type:o>1?"strongText":"emphasisText",start:{...t[r][1].end},end:{...t[n][1].start}},i={type:o>1?"strong":"emphasis",start:{...a.start},end:{...u.end}},t[r][1].end={...a.start},t[n][1].start={...u.end},l=[],t[r][1].end.offset-t[r][1].start.offset&&(l=qe(l,[["enter",t[r][1],e],["exit",t[r][1],e]])),l=qe(l,[["enter",i,e],["enter",a,e],["exit",a,e],["enter",s,e]]),l=qe(l,Gn(e.parser.constructs.insideSpan.null,t.slice(r+1,n),e)),l=qe(l,[["exit",s,e],["enter",u,e],["exit",u,e],["exit",i,e]]),t[n][1].end.offset-t[n][1].start.offset?(f=2,l=qe(l,[["enter",t[n][1],e],["exit",t[n][1],e]])):f=0,Ye(t,r-1,n-r+3,l),n=r+l.length-f-2;break}}for(n=-1;++n<t.length;)t[n][1].type==="attentionSequence"&&(t[n][1].type="data");return t}function wf(t,e){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Dt(r);let s;return a;function a(o){return s=o,t.enter("attentionSequence"),u(o)}function u(o){if(o===s)return t.consume(o),u;const l=t.exit("attentionSequence"),f=Dt(o),d=!f||f===2&&i||n.includes(o),m=!i||i===2&&f||n.includes(r);return l._open=!!(s===42?d:d&&(i||!m)),l._close=!!(s===42?m:m&&(f||!d)),e(o)}}function is(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}const Lf={name:"autolink",tokenize:Rf};function Rf(t,e,n){let r=0;return i;function i(h){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(h),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),s}function s(h){return ve(h)?(t.consume(h),a):h===64?n(h):l(h)}function a(h){return h===43||h===45||h===46||Re(h)?(r=1,u(h)):l(h)}function u(h){return h===58?(t.consume(h),r=0,o):(h===43||h===45||h===46||Re(h))&&r++<32?(t.consume(h),u):(r=0,l(h))}function o(h){return h===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(h),t.exit("autolinkMarker"),t.exit("autolink"),e):h===null||h===32||h===60||Mn(h)?n(h):(t.consume(h),o)}function l(h){return h===64?(t.consume(h),f):xf(h)?(t.consume(h),l):n(h)}function f(h){return Re(h)?d(h):n(h)}function d(h){return h===46?(t.consume(h),r=0,f):h===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(h),t.exit("autolinkMarker"),t.exit("autolink"),e):m(h)}function m(h){if((h===45||Re(h))&&r++<63){const g=h===45?m:d;return t.consume(h),g}return n(h)}}const bn={partial:!0,tokenize:Of};function Of(t,e,n){return r;function r(s){return re(s)?oe(t,i,"linePrefix")(s):i(s)}function i(s){return s===null||Q(s)?e(s):n(s)}}const nu={continuation:{tokenize:Pf},exit:Mf,name:"blockQuote",tokenize:Df};function Df(t,e,n){const r=this;return i;function i(a){if(a===62){const u=r.containerState;return u.open||(t.enter("blockQuote",{_container:!0}),u.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(a),t.exit("blockQuoteMarker"),s}return n(a)}function s(a){return re(a)?(t.enter("blockQuotePrefixWhitespace"),t.consume(a),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(a))}}function Pf(t,e,n){const r=this;return i;function i(a){return re(a)?oe(t,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return t.attempt(nu,e,n)(a)}}function Mf(t){t.exit("blockQuote")}const ru={name:"characterEscape",tokenize:vf};function vf(t,e,n){return r;function r(s){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(s),t.exit("escapeMarker"),i}function i(s){return Af(s)?(t.enter("characterEscapeValue"),t.consume(s),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):n(s)}}const iu={name:"characterReference",tokenize:Bf};function Bf(t,e,n){const r=this;let i=0,s,a;return u;function u(d){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(d),t.exit("characterReferenceMarker"),o}function o(d){return d===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(d),t.exit("characterReferenceMarkerNumeric"),l):(t.enter("characterReferenceValue"),s=31,a=Re,f(d))}function l(d){return d===88||d===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(d),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),s=6,a=_f,f):(t.enter("characterReferenceValue"),s=7,a=Lr,f(d))}function f(d){if(d===59&&i){const m=t.exit("characterReferenceValue");return a===Re&&!fi(r.sliceSerialize(m))?n(d):(t.enter("characterReferenceMarker"),t.consume(d),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return a(d)&&i++<s?(t.consume(d),f):n(d)}}const ss={partial:!0,tokenize:Hf},as={concrete:!0,name:"codeFenced",tokenize:Ff};function Ff(t,e,n){const r=this,i={partial:!0,tokenize:O};let s=0,a=0,u;return o;function o(y){return l(y)}function l(y){const j=r.events[r.events.length-1];return s=j&&j[1].type==="linePrefix"?j[2].sliceSerialize(j[1],!0).length:0,u=y,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),f(y)}function f(y){return y===u?(a++,t.consume(y),f):a<3?n(y):(t.exit("codeFencedFenceSequence"),re(y)?oe(t,d,"whitespace")(y):d(y))}function d(y){return y===null||Q(y)?(t.exit("codeFencedFence"),r.interrupt?e(y):t.check(ss,k,L)(y)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||Q(y)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),d(y)):re(y)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),oe(t,h,"whitespace")(y)):y===96&&y===u?n(y):(t.consume(y),m)}function h(y){return y===null||Q(y)?d(y):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),g(y))}function g(y){return y===null||Q(y)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),d(y)):y===96&&y===u?n(y):(t.consume(y),g)}function k(y){return t.attempt(i,L,C)(y)}function C(y){return t.enter("lineEnding"),t.consume(y),t.exit("lineEnding"),T}function T(y){return s>0&&re(y)?oe(t,S,"linePrefix",s+1)(y):S(y)}function S(y){return y===null||Q(y)?t.check(ss,k,L)(y):(t.enter("codeFlowValue"),N(y))}function N(y){return y===null||Q(y)?(t.exit("codeFlowValue"),S(y)):(t.consume(y),N)}function L(y){return t.exit("codeFenced"),e(y)}function O(y,j,Y){let q=0;return I;function I(M){return y.enter("lineEnding"),y.consume(M),y.exit("lineEnding"),B}function B(M){return y.enter("codeFencedFence"),re(M)?oe(y,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):F(M)}function F(M){return M===u?(y.enter("codeFencedFenceSequence"),G(M)):Y(M)}function G(M){return M===u?(q++,y.consume(M),G):q>=a?(y.exit("codeFencedFenceSequence"),re(M)?oe(y,z,"whitespace")(M):z(M)):Y(M)}function z(M){return M===null||Q(M)?(y.exit("codeFencedFence"),j(M)):Y(M)}}}function Hf(t,e,n){const r=this;return i;function i(a){return a===null?n(a):(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),s)}function s(a){return r.parser.lazy[r.now().line]?n(a):e(a)}}const or={name:"codeIndented",tokenize:jf},Uf={partial:!0,tokenize:zf};function jf(t,e,n){const r=this;return i;function i(l){return t.enter("codeIndented"),oe(t,s,"linePrefix",5)(l)}function s(l){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?a(l):n(l)}function a(l){return l===null?o(l):Q(l)?t.attempt(Uf,a,o)(l):(t.enter("codeFlowValue"),u(l))}function u(l){return l===null||Q(l)?(t.exit("codeFlowValue"),a(l)):(t.consume(l),u)}function o(l){return t.exit("codeIndented"),e(l)}}function zf(t,e,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):Q(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),i):oe(t,s,"linePrefix",5)(a)}function s(a){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?e(a):Q(a)?i(a):n(a)}}const $f={name:"codeText",previous:qf,resolve:Yf,tokenize:Vf};function Yf(t){let e=t.length-4,n=3,r,i;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(r=n;++r<e;)if(t[r][1].type==="codeTextData"){t[n][1].type="codeTextPadding",t[e][1].type="codeTextPadding",n+=2,e-=2;break}}for(r=n-1,e++;++r<=e;)i===void 0?r!==e&&t[r][1].type!=="lineEnding"&&(i=r):(r===e||t[r][1].type==="lineEnding")&&(t[i][1].type="codeTextData",r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),e-=r-i-2,r=i+2),i=void 0);return t}function qf(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Vf(t,e,n){let r=0,i,s;return a;function a(d){return t.enter("codeText"),t.enter("codeTextSequence"),u(d)}function u(d){return d===96?(t.consume(d),r++,u):(t.exit("codeTextSequence"),o(d))}function o(d){return d===null?n(d):d===32?(t.enter("space"),t.consume(d),t.exit("space"),o):d===96?(s=t.enter("codeTextSequence"),i=0,f(d)):Q(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),o):(t.enter("codeTextData"),l(d))}function l(d){return d===null||d===32||d===96||Q(d)?(t.exit("codeTextData"),o(d)):(t.consume(d),l)}function f(d){return d===96?(t.consume(d),i++,f):i===r?(t.exit("codeTextSequence"),t.exit("codeText"),e(d)):(s.type="codeTextData",l(d))}}class Wf{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,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(e,r):e>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(e,n,r){const i=n||0;this.setCursor(Math.trunc(e));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Qt(this.left,r),s.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),Qt(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Qt(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 n=this.left.splice(e,Number.POSITIVE_INFINITY);Qt(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Qt(this.left,n.reverse())}}}function Qt(t,e){let n=0;if(e.length<1e4)t.push(...e);else for(;n<e.length;)t.push(...e.slice(n,n+1e4)),n+=1e4}function su(t){const e={};let n=-1,r,i,s,a,u,o,l;const f=new Wf(t);for(;++n<f.length;){for(;n in e;)n=e[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(o=r[1]._tokenizer.events,s=0,s<o.length&&o[s][1].type==="lineEndingBlank"&&(s+=2),s<o.length&&o[s][1].type==="content"))for(;++s<o.length&&o[s][1].type!=="content";)o[s][1].type==="chunkText"&&(o[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(e,Gf(f,n)),n=e[n],l=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(a=f.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=s);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},u=f.slice(i,n),u.unshift(r),f.splice(i,n-i+1,u))}}return Ye(t,0,Number.POSITIVE_INFINITY,f.slice(0)),!l}function Gf(t,e){const n=t.get(e)[1],r=t.get(e)[2];let i=e-1;const s=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const u=a.events,o=[],l={};let f,d,m=-1,h=n,g=0,k=0;const C=[k];for(;h;){for(;t.get(++i)[1]!==h;);s.push(i),h._tokenizer||(f=r.sliceStream(h),h.next||f.push(null),d&&a.defineSkip(h.start),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(f),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=h,h=h.next}for(h=n;++m<u.length;)u[m][0]==="exit"&&u[m-1][0]==="enter"&&u[m][1].type===u[m-1][1].type&&u[m][1].start.line!==u[m][1].end.line&&(k=m+1,C.push(k),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(a.events=[],h?(h._tokenizer=void 0,h.previous=void 0):C.pop(),m=C.length;m--;){const T=u.slice(C[m],C[m+1]),S=s.pop();o.push([S,S+T.length-1]),t.splice(S,2,T)}for(o.reverse(),m=-1;++m<o.length;)l[g+o[m][0]]=g+o[m][1],g+=o[m][1]-o[m][0]-1;return l}const Qf={resolve:Xf,tokenize:Zf},Kf={partial:!0,tokenize:Jf};function Xf(t){return su(t),t}function Zf(t,e){let n;return r;function r(u){return t.enter("content"),n=t.enter("chunkContent",{contentType:"content"}),i(u)}function i(u){return u===null?s(u):Q(u)?t.check(Kf,a,s)(u):(t.consume(u),i)}function s(u){return t.exit("chunkContent"),t.exit("content"),e(u)}function a(u){return t.consume(u),t.exit("chunkContent"),n.next=t.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Jf(t,e,n){const r=this;return i;function i(a){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),oe(t,s,"linePrefix")}function s(a){if(a===null||Q(a))return n(a);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?e(a):t.interrupt(r.parser.constructs.flow,n,e)(a)}}function au(t,e,n,r,i,s,a,u,o){const l=o||Number.POSITIVE_INFINITY;let f=0;return d;function d(T){return T===60?(t.enter(r),t.enter(i),t.enter(s),t.consume(T),t.exit(s),m):T===null||T===32||T===41||Mn(T)?n(T):(t.enter(r),t.enter(a),t.enter(u),t.enter("chunkString",{contentType:"string"}),k(T))}function m(T){return T===62?(t.enter(s),t.consume(T),t.exit(s),t.exit(i),t.exit(r),e):(t.enter(u),t.enter("chunkString",{contentType:"string"}),h(T))}function h(T){return T===62?(t.exit("chunkString"),t.exit(u),m(T)):T===null||T===60||Q(T)?n(T):(t.consume(T),T===92?g:h)}function g(T){return T===60||T===62||T===92?(t.consume(T),h):h(T)}function k(T){return!f&&(T===null||T===41||ge(T))?(t.exit("chunkString"),t.exit(u),t.exit(a),t.exit(r),e(T)):f<l&&T===40?(t.consume(T),f++,k):T===41?(t.consume(T),f--,k):T===null||T===32||T===40||Mn(T)?n(T):(t.consume(T),T===92?C:k)}function C(T){return T===40||T===41||T===92?(t.consume(T),k):k(T)}}function uu(t,e,n,r,i,s){const a=this;let u=0,o;return l;function l(h){return t.enter(r),t.enter(i),t.consume(h),t.exit(i),t.enter(s),f}function f(h){return u>999||h===null||h===91||h===93&&!o||h===94&&!u&&"_hiddenFootnoteSupport"in a.parser.constructs?n(h):h===93?(t.exit(s),t.enter(i),t.consume(h),t.exit(i),t.exit(r),e):Q(h)?(t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),f):(t.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===null||h===91||h===93||Q(h)||u++>999?(t.exit("chunkString"),f(h)):(t.consume(h),o||(o=!re(h)),h===92?m:d)}function m(h){return h===91||h===92||h===93?(t.consume(h),u++,d):d(h)}}function ou(t,e,n,r,i,s){let a;return u;function u(m){return m===34||m===39||m===40?(t.enter(r),t.enter(i),t.consume(m),t.exit(i),a=m===40?41:m,o):n(m)}function o(m){return m===a?(t.enter(i),t.consume(m),t.exit(i),t.exit(r),e):(t.enter(s),l(m))}function l(m){return m===a?(t.exit(s),o(a)):m===null?n(m):Q(m)?(t.enter("lineEnding"),t.consume(m),t.exit("lineEnding"),oe(t,l,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===a||m===null||Q(m)?(t.exit("chunkString"),l(m)):(t.consume(m),m===92?d:f)}function d(m){return m===a||m===92?(t.consume(m),f):f(m)}}function rn(t,e){let n;return r;function r(i){return Q(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),n=!0,r):re(i)?oe(t,r,n?"linePrefix":"lineSuffix")(i):e(i)}}const ed={name:"definition",tokenize:nd},td={partial:!0,tokenize:rd};function nd(t,e,n){const r=this;let i;return s;function s(h){return t.enter("definition"),a(h)}function a(h){return uu.call(r,t,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function u(h){return i=Ge(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(t.enter("definitionMarker"),t.consume(h),t.exit("definitionMarker"),o):n(h)}function o(h){return ge(h)?rn(t,l)(h):l(h)}function l(h){return au(t,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return t.attempt(td,d,d)(h)}function d(h){return re(h)?oe(t,m,"whitespace")(h):m(h)}function m(h){return h===null||Q(h)?(t.exit("definition"),r.parser.defined.push(i),e(h)):n(h)}}function rd(t,e,n){return r;function r(u){return ge(u)?rn(t,i)(u):n(u)}function i(u){return ou(t,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function s(u){return re(u)?oe(t,a,"whitespace")(u):a(u)}function a(u){return u===null||Q(u)?e(u):n(u)}}const id={name:"hardBreakEscape",tokenize:sd};function sd(t,e,n){return r;function r(s){return t.enter("hardBreakEscape"),t.consume(s),i}function i(s){return Q(s)?(t.exit("hardBreakEscape"),e(s)):n(s)}}const ad={name:"headingAtx",resolve:ud,tokenize:od};function ud(t,e){let n=t.length-2,r=3,i,s;return t[r][1].type==="whitespace"&&(r+=2),n-2>r&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&t[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:t[r][1].start,end:t[n][1].end},s={type:"chunkText",start:t[r][1].start,end:t[n][1].end,contentType:"text"},Ye(t,r,n-r+1,[["enter",i,e],["enter",s,e],["exit",s,e],["exit",i,e]])),t}function od(t,e,n){let r=0;return i;function i(f){return t.enter("atxHeading"),s(f)}function s(f){return t.enter("atxHeadingSequence"),a(f)}function a(f){return f===35&&r++<6?(t.consume(f),a):f===null||ge(f)?(t.exit("atxHeadingSequence"),u(f)):n(f)}function u(f){return f===35?(t.enter("atxHeadingSequence"),o(f)):f===null||Q(f)?(t.exit("atxHeading"),e(f)):re(f)?oe(t,u,"whitespace")(f):(t.enter("atxHeadingText"),l(f))}function o(f){return f===35?(t.consume(f),o):(t.exit("atxHeadingSequence"),u(f))}function l(f){return f===null||f===35||ge(f)?(t.exit("atxHeadingText"),u(f)):(t.consume(f),l)}}const ld=["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"],us=["pre","script","style","textarea"],cd={concrete:!0,name:"htmlFlow",resolveTo:hd,tokenize:md},fd={partial:!0,tokenize:gd},dd={partial:!0,tokenize:pd};function hd(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function md(t,e,n){const r=this;let i,s,a,u,o;return l;function l(x){return f(x)}function f(x){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(x),d}function d(x){return x===33?(t.consume(x),m):x===47?(t.consume(x),s=!0,k):x===63?(t.consume(x),i=3,r.interrupt?e:A):ve(x)?(t.consume(x),a=String.fromCharCode(x),C):n(x)}function m(x){return x===45?(t.consume(x),i=2,h):x===91?(t.consume(x),i=5,u=0,g):ve(x)?(t.consume(x),i=4,r.interrupt?e:A):n(x)}function h(x){return x===45?(t.consume(x),r.interrupt?e:A):n(x)}function g(x){const ue="CDATA[";return x===ue.charCodeAt(u++)?(t.consume(x),u===ue.length?r.interrupt?e:F:g):n(x)}function k(x){return ve(x)?(t.consume(x),a=String.fromCharCode(x),C):n(x)}function C(x){if(x===null||x===47||x===62||ge(x)){const ue=x===47,he=a.toLowerCase();return!ue&&!s&&us.includes(he)?(i=1,r.interrupt?e(x):F(x)):ld.includes(a.toLowerCase())?(i=6,ue?(t.consume(x),T):r.interrupt?e(x):F(x)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(x):s?S(x):N(x))}return x===45||Re(x)?(t.consume(x),a+=String.fromCharCode(x),C):n(x)}function T(x){return x===62?(t.consume(x),r.interrupt?e:F):n(x)}function S(x){return re(x)?(t.consume(x),S):I(x)}function N(x){return x===47?(t.consume(x),I):x===58||x===95||ve(x)?(t.consume(x),L):re(x)?(t.consume(x),N):I(x)}function L(x){return x===45||x===46||x===58||x===95||Re(x)?(t.consume(x),L):O(x)}function O(x){return x===61?(t.consume(x),y):re(x)?(t.consume(x),O):N(x)}function y(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(t.consume(x),o=x,j):re(x)?(t.consume(x),y):Y(x)}function j(x){return x===o?(t.consume(x),o=null,q):x===null||Q(x)?n(x):(t.consume(x),j)}function Y(x){return x===null||x===34||x===39||x===47||x===60||x===61||x===62||x===96||ge(x)?O(x):(t.consume(x),Y)}function q(x){return x===47||x===62||re(x)?N(x):n(x)}function I(x){return x===62?(t.consume(x),B):n(x)}function B(x){return x===null||Q(x)?F(x):re(x)?(t.consume(x),B):n(x)}function F(x){return x===45&&i===2?(t.consume(x),W):x===60&&i===1?(t.consume(x),K):x===62&&i===4?(t.consume(x),Z):x===63&&i===3?(t.consume(x),A):x===93&&i===5?(t.consume(x),J):Q(x)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check(fd,le,G)(x)):x===null||Q(x)?(t.exit("htmlFlowData"),G(x)):(t.consume(x),F)}function G(x){return t.check(dd,z,le)(x)}function z(x){return t.enter("lineEnding"),t.consume(x),t.exit("lineEnding"),M}function M(x){return x===null||Q(x)?G(x):(t.enter("htmlFlowData"),F(x))}function W(x){return x===45?(t.consume(x),A):F(x)}function K(x){return x===47?(t.consume(x),a="",te):F(x)}function te(x){if(x===62){const ue=a.toLowerCase();return us.includes(ue)?(t.consume(x),Z):F(x)}return ve(x)&&a.length<8?(t.consume(x),a+=String.fromCharCode(x),te):F(x)}function J(x){return x===93?(t.consume(x),A):F(x)}function A(x){return x===62?(t.consume(x),Z):x===45&&i===2?(t.consume(x),A):F(x)}function Z(x){return x===null||Q(x)?(t.exit("htmlFlowData"),le(x)):(t.consume(x),Z)}function le(x){return t.exit("htmlFlow"),e(x)}}function pd(t,e,n){const r=this;return i;function i(a){return Q(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),s):n(a)}function s(a){return r.parser.lazy[r.now().line]?n(a):e(a)}}function gd(t,e,n){return r;function r(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(bn,e,n)}}const Ed={name:"htmlText",tokenize:bd};function bd(t,e,n){const r=this;let i,s,a;return u;function u(A){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(A),o}function o(A){return A===33?(t.consume(A),l):A===47?(t.consume(A),O):A===63?(t.consume(A),N):ve(A)?(t.consume(A),Y):n(A)}function l(A){return A===45?(t.consume(A),f):A===91?(t.consume(A),s=0,g):ve(A)?(t.consume(A),S):n(A)}function f(A){return A===45?(t.consume(A),h):n(A)}function d(A){return A===null?n(A):A===45?(t.consume(A),m):Q(A)?(a=d,K(A)):(t.consume(A),d)}function m(A){return A===45?(t.consume(A),h):d(A)}function h(A){return A===62?W(A):A===45?m(A):d(A)}function g(A){const Z="CDATA[";return A===Z.charCodeAt(s++)?(t.consume(A),s===Z.length?k:g):n(A)}function k(A){return A===null?n(A):A===93?(t.consume(A),C):Q(A)?(a=k,K(A)):(t.consume(A),k)}function C(A){return A===93?(t.consume(A),T):k(A)}function T(A){return A===62?W(A):A===93?(t.consume(A),T):k(A)}function S(A){return A===null||A===62?W(A):Q(A)?(a=S,K(A)):(t.consume(A),S)}function N(A){return A===null?n(A):A===63?(t.consume(A),L):Q(A)?(a=N,K(A)):(t.consume(A),N)}function L(A){return A===62?W(A):N(A)}function O(A){return ve(A)?(t.consume(A),y):n(A)}function y(A){return A===45||Re(A)?(t.consume(A),y):j(A)}function j(A){return Q(A)?(a=j,K(A)):re(A)?(t.consume(A),j):W(A)}function Y(A){return A===45||Re(A)?(t.consume(A),Y):A===47||A===62||ge(A)?q(A):n(A)}function q(A){return A===47?(t.consume(A),W):A===58||A===95||ve(A)?(t.consume(A),I):Q(A)?(a=q,K(A)):re(A)?(t.consume(A),q):W(A)}function I(A){return A===45||A===46||A===58||A===95||Re(A)?(t.consume(A),I):B(A)}function B(A){return A===61?(t.consume(A),F):Q(A)?(a=B,K(A)):re(A)?(t.consume(A),B):q(A)}function F(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(t.consume(A),i=A,G):Q(A)?(a=F,K(A)):re(A)?(t.consume(A),F):(t.consume(A),z)}function G(A){return A===i?(t.consume(A),i=void 0,M):A===null?n(A):Q(A)?(a=G,K(A)):(t.consume(A),G)}function z(A){return A===null||A===34||A===39||A===60||A===61||A===96?n(A):A===47||A===62||ge(A)?q(A):(t.consume(A),z)}function M(A){return A===47||A===62||ge(A)?q(A):n(A)}function W(A){return A===62?(t.consume(A),t.exit("htmlTextData"),t.exit("htmlText"),e):n(A)}function K(A){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(A),t.exit("lineEnding"),te}function te(A){return re(A)?oe(t,J,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):J(A)}function J(A){return t.enter("htmlTextData"),a(A)}}const di={name:"labelEnd",resolveAll:Ad,resolveTo:kd,tokenize:Cd},Td={tokenize:Nd},xd={tokenize:Sd},_d={tokenize:yd};function Ad(t){let e=-1;const n=[];for(;++e<t.length;){const r=t[e][1];if(n.push(t[e]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",e+=i}}return t.length!==n.length&&Ye(t,0,t.length,n),t}function kd(t,e){let n=t.length,r=0,i,s,a,u;for(;n--;)if(i=t[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;t[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(t[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const o={type:t[s][1].type==="labelLink"?"link":"image",start:{...t[s][1].start},end:{...t[t.length-1][1].end}},l={type:"label",start:{...t[s][1].start},end:{...t[a][1].end}},f={type:"labelText",start:{...t[s+r+2][1].end},end:{...t[a-2][1].start}};return u=[["enter",o,e],["enter",l,e]],u=qe(u,t.slice(s+1,s+r+3)),u=qe(u,[["enter",f,e]]),u=qe(u,Gn(e.parser.constructs.insideSpan.null,t.slice(s+r+4,a-3),e)),u=qe(u,[["exit",f,e],t[a-2],t[a-1],["exit",l,e]]),u=qe(u,t.slice(a+1)),u=qe(u,[["exit",o,e]]),Ye(t,s,t.length,u),t}function Cd(t,e,n){const r=this;let i=r.events.length,s,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return u;function u(m){return s?s._inactive?d(m):(a=r.parser.defined.includes(Ge(r.sliceSerialize({start:s.end,end:r.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(m),t.exit("labelMarker"),t.exit("labelEnd"),o):n(m)}function o(m){return m===40?t.attempt(Td,f,a?f:d)(m):m===91?t.attempt(xd,f,a?l:d)(m):a?f(m):d(m)}function l(m){return t.attempt(_d,f,d)(m)}function f(m){return e(m)}function d(m){return s._balanced=!0,n(m)}}function Nd(t,e,n){return r;function r(d){return t.enter("resource"),t.enter("resourceMarker"),t.consume(d),t.exit("resourceMarker"),i}function i(d){return ge(d)?rn(t,s)(d):s(d)}function s(d){return d===41?f(d):au(t,a,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function a(d){return ge(d)?rn(t,o)(d):f(d)}function u(d){return n(d)}function o(d){return d===34||d===39||d===40?ou(t,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):f(d)}function l(d){return ge(d)?rn(t,f)(d):f(d)}function f(d){return d===41?(t.enter("resourceMarker"),t.consume(d),t.exit("resourceMarker"),t.exit("resource"),e):n(d)}}function Sd(t,e,n){const r=this;return i;function i(u){return uu.call(r,t,s,a,"reference","referenceMarker","referenceString")(u)}function s(u){return r.parser.defined.includes(Ge(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?e(u):n(u)}function a(u){return n(u)}}function yd(t,e,n){return r;function r(s){return t.enter("reference"),t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),i}function i(s){return s===93?(t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),t.exit("reference"),e):n(s)}}const Id={name:"labelStartImage",resolveAll:di.resolveAll,tokenize:wd};function wd(t,e,n){const r=this;return i;function i(u){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(u),t.exit("labelImageMarker"),s}function s(u){return u===91?(t.enter("labelMarker"),t.consume(u),t.exit("labelMarker"),t.exit("labelImage"),a):n(u)}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):e(u)}}const Ld={name:"labelStartLink",resolveAll:di.resolveAll,tokenize:Rd};function Rd(t,e,n){const r=this;return i;function i(a){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(a),t.exit("labelMarker"),t.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):e(a)}}const lr={name:"lineEnding",tokenize:Od};function Od(t,e){return n;function n(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),oe(t,e,"linePrefix")}}const wn={name:"thematicBreak",tokenize:Dd};function Dd(t,e,n){let r=0,i;return s;function s(l){return t.enter("thematicBreak"),a(l)}function a(l){return i=l,u(l)}function u(l){return l===i?(t.enter("thematicBreakSequence"),o(l)):r>=3&&(l===null||Q(l))?(t.exit("thematicBreak"),e(l)):n(l)}function o(l){return l===i?(t.consume(l),r++,o):(t.exit("thematicBreakSequence"),re(l)?oe(t,u,"whitespace")(l):u(l))}}const Ue={continuation:{tokenize:Bd},exit:Hd,name:"list",tokenize:vd},Pd={partial:!0,tokenize:Ud},Md={partial:!0,tokenize:Fd};function vd(t,e,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return u;function u(h){const g=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Lr(h)){if(r.containerState.type||(r.containerState.type=g,t.enter(g,{_container:!0})),g==="listUnordered")return t.enter("listItemPrefix"),h===42||h===45?t.check(wn,n,l)(h):l(h);if(!r.interrupt||h===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),o(h)}return n(h)}function o(h){return Lr(h)&&++a<10?(t.consume(h),o):(!r.interrupt||a<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(t.exit("listItemValue"),l(h)):n(h)}function l(h){return t.enter("listItemMarker"),t.consume(h),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,t.check(bn,r.interrupt?n:f,t.attempt(Pd,m,d))}function f(h){return r.containerState.initialBlankLine=!0,s++,m(h)}function d(h){return re(h)?(t.enter("listItemPrefixWhitespace"),t.consume(h),t.exit("listItemPrefixWhitespace"),m):n(h)}function m(h){return r.containerState.size=s+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(h)}}function Bd(t,e,n){const r=this;return r.containerState._closeFlow=void 0,t.check(bn,i,s);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,oe(t,e,"listItemIndent",r.containerState.size+1)(u)}function s(u){return r.containerState.furtherBlankLines||!re(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(Md,e,a)(u))}function a(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,oe(t,t.attempt(Ue,e,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function Fd(t,e,n){const r=this;return oe(t,i,"listItemIndent",r.containerState.size+1);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?e(s):n(s)}}function Hd(t){t.exit(this.containerState.type)}function Ud(t,e,n){const r=this;return oe(t,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const a=r.events[r.events.length-1];return!re(s)&&a&&a[1].type==="listItemPrefixWhitespace"?e(s):n(s)}}const os={name:"setextUnderline",resolveTo:jd,tokenize:zd};function jd(t,e){let n=t.length,r,i,s;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){r=n;break}t[n][1].type==="paragraph"&&(i=n)}else t[n][1].type==="content"&&t.splice(n,1),!s&&t[n][1].type==="definition"&&(s=n);const a={type:"setextHeading",start:{...t[r][1].start},end:{...t[t.length-1][1].end}};return t[i][1].type="setextHeadingText",s?(t.splice(i,0,["enter",a,e]),t.splice(s+1,0,["exit",t[r][1],e]),t[r][1].end={...t[s][1].end}):t[r][1]=a,t.push(["exit",a,e]),t}function zd(t,e,n){const r=this;let i;return s;function s(l){let f=r.events.length,d;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){d=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(t.enter("setextHeadingLine"),i=l,a(l)):n(l)}function a(l){return t.enter("setextHeadingLineSequence"),u(l)}function u(l){return l===i?(t.consume(l),u):(t.exit("setextHeadingLineSequence"),re(l)?oe(t,o,"lineSuffix")(l):o(l))}function o(l){return l===null||Q(l)?(t.exit("setextHeadingLine"),e(l)):n(l)}}const $d={tokenize:Yd};function Yd(t){const e=this,n=t.attempt(bn,r,t.attempt(this.parser.constructs.flowInitial,i,oe(t,t.attempt(this.parser.constructs.flow,i,t.attempt(Qf,i)),"linePrefix")));return n;function r(s){if(s===null){t.consume(s);return}return t.enter("lineEndingBlank"),t.consume(s),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function i(s){if(s===null){t.consume(s);return}return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),e.currentConstruct=void 0,n}}const qd={resolveAll:cu()},Vd=lu("string"),Wd=lu("text");function lu(t){return{resolveAll:cu(t==="text"?Gd:void 0),tokenize:e};function e(n){const r=this,i=this.parser.constructs[t],s=n.attempt(i,a,u);return a;function a(f){return l(f)?s(f):u(f)}function u(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),o}function o(f){return l(f)?(n.exit("data"),s(f)):(n.consume(f),o)}function l(f){if(f===null)return!0;const d=i[f];let m=-1;if(d)for(;++m<d.length;){const h=d[m];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function cu(t){return e;function e(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return t?t(n,r):n}}function Gd(t,e){let n=0;for(;++n<=t.length;)if((n===t.length||t[n][1].type==="lineEnding")&&t[n-1][1].type==="data"){const r=t[n-1][1],i=e.sliceStream(r);let s=i.length,a=-1,u=0,o;for(;s--;){const l=i[s];if(typeof l=="string"){for(a=l.length;l.charCodeAt(a-1)===32;)u++,a--;if(a)break;a=-1}else if(l===-2)o=!0,u++;else if(l!==-1){s++;break}}if(e._contentTypeTextTrailing&&n===t.length&&(u=0),u){const l={type:n===t.length||o||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:r.start._bufferIndex+a,_index:r.start._index+s,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...l.start},r.start.offset===r.end.offset?Object.assign(r,l):(t.splice(n,0,["enter",l,e],["exit",l,e]),n+=2)}n++}return t}const Qd={42:Ue,43:Ue,45:Ue,48:Ue,49:Ue,50:Ue,51:Ue,52:Ue,53:Ue,54:Ue,55:Ue,56:Ue,57:Ue,62:nu},Kd={91:ed},Xd={[-2]:or,[-1]:or,32:or},Zd={35:ad,42:wn,45:[os,wn],60:cd,61:os,95:wn,96:as,126:as},Jd={38:iu,92:ru},e0={[-5]:lr,[-4]:lr,[-3]:lr,33:Id,38:iu,42:Rr,60:[Lf,Ed],91:Ld,92:[id,ru],93:di,95:Rr,96:$f},t0={null:[Rr,qd]},n0={null:[42,95]},r0={null:[]},i0=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:n0,contentInitial:Kd,disable:r0,document:Qd,flow:Zd,flowInitial:Xd,insideSpan:t0,string:Jd,text:e0},Symbol.toStringTag,{value:"Module"}));function s0(t,e,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},s=[];let a=[],u=[];const o={attempt:j(O),check:j(y),consume:S,enter:N,exit:L,interrupt:j(y,{interrupt:!0})},l={code:null,containerState:{},defineSkip:k,events:[],now:g,parser:t,previous:null,sliceSerialize:m,sliceStream:h,write:d};let f=e.tokenize.call(l,o);return e.resolveAll&&s.push(e),l;function d(B){return a=qe(a,B),C(),a[a.length-1]!==null?[]:(Y(e,0),l.events=Gn(s,l.events,l),l.events)}function m(B,F){return u0(h(B),F)}function h(B){return a0(a,B)}function g(){const{_bufferIndex:B,_index:F,line:G,column:z,offset:M}=r;return{_bufferIndex:B,_index:F,line:G,column:z,offset:M}}function k(B){i[B.line]=B.column,I()}function C(){let B;for(;r._index<a.length;){const F=a[r._index];if(typeof F=="string")for(B=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===B&&r._bufferIndex<F.length;)T(F.charCodeAt(r._bufferIndex));else T(F)}}function T(B){f=f(B)}function S(B){Q(B)?(r.line++,r.column=1,r.offset+=B===-3?2:1,I()):B!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=B}function N(B,F){const G=F||{};return G.type=B,G.start=g(),l.events.push(["enter",G,l]),u.push(G),G}function L(B){const F=u.pop();return F.end=g(),l.events.push(["exit",F,l]),F}function O(B,F){Y(B,F.from)}function y(B,F){F.restore()}function j(B,F){return G;function G(z,M,W){let K,te,J,A;return Array.isArray(z)?le(z):"tokenize"in z?le([z]):Z(z);function Z(ce){return ke;function ke(Ee){const xe=Ee!==null&&ce[Ee],me=Ee!==null&&ce.null,Ae=[...Array.isArray(xe)?xe:xe?[xe]:[],...Array.isArray(me)?me:me?[me]:[]];return le(Ae)(Ee)}}function le(ce){return K=ce,te=0,ce.length===0?W:x(ce[te])}function x(ce){return ke;function ke(Ee){return A=q(),J=ce,ce.partial||(l.currentConstruct=ce),ce.name&&l.parser.constructs.disable.null.includes(ce.name)?he():ce.tokenize.call(F?Object.assign(Object.create(l),F):l,o,ue,he)(Ee)}}function ue(ce){return B(J,A),M}function he(ce){return A.restore(),++te<K.length?x(K[te]):W}}}function Y(B,F){B.resolveAll&&!s.includes(B)&&s.push(B),B.resolve&&Ye(l.events,F,l.events.length-F,B.resolve(l.events.slice(F),l)),B.resolveTo&&(l.events=B.resolveTo(l.events,l))}function q(){const B=g(),F=l.previous,G=l.currentConstruct,z=l.events.length,M=Array.from(u);return{from:z,restore:W};function W(){r=B,l.previous=F,l.currentConstruct=G,l.events.length=z,u=M,I()}}function I(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function a0(t,e){const n=e.start._index,r=e.start._bufferIndex,i=e.end._index,s=e.end._bufferIndex;let a;if(n===i)a=[t[n].slice(r,s)];else{if(a=t.slice(n,i),r>-1){const u=a[0];typeof u=="string"?a[0]=u.slice(r):a.shift()}s>0&&a.push(t[i].slice(0,s))}return a}function u0(t,e){let n=-1;const r=[];let i;for(;++n<t.length;){const s=t[n];let a;if(typeof s=="string")a=s;else switch(s){case-5:{a="\r";break}case-4:{a=`
|
|
59
59
|
`;break}case-3:{a=`\r
|
|
60
|
-
`;break}case-2:{a=e?" ":" ";break}case-1:{if(!e&&i)continue;a=" ";break}default:a=String.fromCharCode(s)}i=s===-2,r.push(a)}return r.join("")}function l0(t){const r={constructs:eu([s0,...(t||{}).extensions||[]]),content:i(Cf),defined:[],document:i(Sf),flow:i(Yd),lazy:{},string:i(Wd),text:i(Gd)};return r;function i(s){return a;function a(u){return a0(r,s,u)}}}function c0(t){for(;!su(t););return t}const os=/[\0\t\n\r]/g;function f0(){let t=1,e="",n=!0,r;return i;function i(s,a,u){const o=[];let l,f,d,m,h;for(s=e+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),d=0,e="",n&&(s.charCodeAt(0)===65279&&d++,n=void 0);d<s.length;){if(os.lastIndex=d,l=os.exec(s),m=l&&l.index!==void 0?l.index:s.length,h=s.charCodeAt(m),!l){e=s.slice(d);break}if(h===10&&d===m&&r)o.push(-3),r=void 0;else switch(r&&(o.push(-5),r=void 0),d<m&&(o.push(s.slice(d,m)),t+=m-d),h){case 0:{o.push(65533),t++;break}case 9:{for(f=Math.ceil(t/4)*4,o.push(-2);t++<f;)o.push(-1);break}case 10:{o.push(-4),t=1;break}default:r=!0,t=1}d=m+1}return u&&(r&&o.push(-5),e&&o.push(e),o.push(null)),o}}const d0=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function h0(t){return t.replace(d0,m0)}function m0(t,e,n){if(e)return e;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return tu(n.slice(s?2:1),s?16:10)}return ci(n)||t}const fu={}.hasOwnProperty;function p0(t,e,n){return typeof e!="string"&&(n=e,e=void 0),g0(n)(c0(l0(n).document().write(f0()(t,e,!0))))}function g0(t){const e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(ot),autolinkProtocol:q,autolinkEmail:q,atxHeading:s(Le),blockQuote:s(me),characterEscape:q,characterReference:q,codeFenced:s(Ae),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(Ae,a),codeText:s(Ie,a),codeTextData:q,data:q,codeFlowValue:q,definition:s(be),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(Pe),hardBreakEscape:s(Fe),hardBreakTrailing:s(Fe),htmlFlow:s(ie,a),htmlFlowData:q,htmlText:s(ie,a),htmlTextData:q,image:s(we),label:a,link:s(ot),listItem:s(zo),listItemValue:m,listOrdered:s(Pi,d),listUnordered:s(Pi),paragraph:s($o),reference:x,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(Le),strong:s(Yo),thematicBreak:s(Vo)},exit:{atxHeading:o(),atxHeadingSequence:O,autolink:o(),autolinkEmail:xe,autolinkProtocol:Ee,blockQuote:o(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:he,characterReferenceMarkerNumeric:he,characterReferenceValue:ce,characterReference:ke,codeFenced:o(C),codeFencedFence:k,codeFencedFenceInfo:h,codeFencedFenceMeta:g,codeFlowValue:I,codeIndented:o(T),codeText:o(M),codeTextData:I,data:I,definition:o(),definitionDestinationString:L,definitionLabelString:S,definitionTitleString:N,emphasis:o(),hardBreakEscape:o(F),hardBreakTrailing:o(F),htmlFlow:o(G),htmlFlowData:I,htmlText:o(z),htmlTextData:I,image:o(K),label:J,labelText:te,lineEnding:B,link:o(W),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:ue,resourceDestinationString:A,resourceTitleString:Z,resource:le,setextHeading:o(Y),setextHeadingLineSequence:j,setextHeadingText:y,strong:o(),thematicBreak:o()}};du(e,(t||{}).mdastExtensions||[]);const n={};return r;function r(D){let $={type:"root",children:[]};const X={stack:[$],tokenStack:[],config:e,enter:u,exit:l,buffer:a,resume:f,data:n},se=[];let pe=-1;for(;++pe<D.length;)if(D[pe][1].type==="listOrdered"||D[pe][1].type==="listUnordered")if(D[pe][0]==="enter")se.push(pe);else{const We=se.pop();pe=i(D,We,pe)}for(pe=-1;++pe<D.length;){const We=e[D[pe][0]];fu.call(We,D[pe][1].type)&&We[D[pe][1].type].call(Object.assign({sliceSerialize:D[pe][2].sliceSerialize},X),D[pe][1])}if(X.tokenStack.length>0){const We=X.tokenStack[X.tokenStack.length-1];(We[1]||ls).call(X,void 0,We[0])}for($.position={start:lt(D.length>0?D[0][1].start:{line:1,column:1,offset:0}),end:lt(D.length>0?D[D.length-2][1].end:{line:1,column:1,offset:0})},pe=-1;++pe<e.transforms.length;)$=e.transforms[pe]($)||$;return $}function i(D,$,X){let se=$-1,pe=-1,We=!1,pt,nt,$t,Yt;for(;++se<=X;){const ze=D[se];switch(ze[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ze[0]==="enter"?pe++:pe--,Yt=void 0;break}case"lineEndingBlank":{ze[0]==="enter"&&(pt&&!Yt&&!pe&&!$t&&($t=se),Yt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Yt=void 0}if(!pe&&ze[0]==="enter"&&ze[1].type==="listItemPrefix"||pe===-1&&ze[0]==="exit"&&(ze[1].type==="listUnordered"||ze[1].type==="listOrdered")){if(pt){let It=se;for(nt=void 0;It--;){const rt=D[It];if(rt[1].type==="lineEnding"||rt[1].type==="lineEndingBlank"){if(rt[0]==="exit")continue;nt&&(D[nt][1].type="lineEndingBlank",We=!0),rt[1].type="lineEnding",nt=It}else if(!(rt[1].type==="linePrefix"||rt[1].type==="blockQuotePrefix"||rt[1].type==="blockQuotePrefixWhitespace"||rt[1].type==="blockQuoteMarker"||rt[1].type==="listItemIndent"))break}$t&&(!nt||$t<nt)&&(pt._spread=!0),pt.end=Object.assign({},nt?D[nt][1].start:ze[1].end),D.splice(nt||se,0,["exit",pt,ze[2]]),se++,X++}if(ze[1].type==="listItemPrefix"){const It={type:"listItem",_spread:!1,start:Object.assign({},ze[1].start),end:void 0};pt=It,D.splice(se,0,["enter",It,ze[2]]),se++,X++,$t=void 0,Yt=!0}}}return D[$][1]._spread=We,X}function s(D,$){return X;function X(se){u.call(this,D(se),se),$&&$.call(this,se)}}function a(){this.stack.push({type:"fragment",children:[]})}function u(D,$,X){this.stack[this.stack.length-1].children.push(D),this.stack.push(D),this.tokenStack.push([$,X||void 0]),D.position={start:lt($.start),end:void 0}}function o(D){return $;function $(X){D&&D.call(this,X),l.call(this,X)}}function l(D,$){const X=this.stack.pop(),se=this.tokenStack.pop();if(se)se[0].type!==D.type&&($?$.call(this,D,se[0]):(se[1]||ls).call(this,D,se[0]));else throw new Error("Cannot close `"+D.type+"` ("+nn({start:D.start,end:D.end})+"): it’s not open");X.position.end=lt(D.end)}function f(){return li(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function m(D){if(this.data.expectingFirstListItemValue){const $=this.stack[this.stack.length-2];$.start=Number.parseInt(this.sliceSerialize(D),10),this.data.expectingFirstListItemValue=void 0}}function h(){const D=this.resume(),$=this.stack[this.stack.length-1];$.lang=D}function g(){const D=this.resume(),$=this.stack[this.stack.length-1];$.meta=D}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const D=this.resume(),$=this.stack[this.stack.length-1];$.value=D.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function T(){const D=this.resume(),$=this.stack[this.stack.length-1];$.value=D.replace(/(\r?\n|\r)$/g,"")}function S(D){const $=this.resume(),X=this.stack[this.stack.length-1];X.label=$,X.identifier=Ge(this.sliceSerialize(D)).toLowerCase()}function N(){const D=this.resume(),$=this.stack[this.stack.length-1];$.title=D}function L(){const D=this.resume(),$=this.stack[this.stack.length-1];$.url=D}function O(D){const $=this.stack[this.stack.length-1];if(!$.depth){const X=this.sliceSerialize(D).length;$.depth=X}}function y(){this.data.setextHeadingSlurpLineEnding=!0}function j(D){const $=this.stack[this.stack.length-1];$.depth=this.sliceSerialize(D).codePointAt(0)===61?1:2}function Y(){this.data.setextHeadingSlurpLineEnding=void 0}function q(D){const X=this.stack[this.stack.length-1].children;let se=X[X.length-1];(!se||se.type!=="text")&&(se=qo(),se.position={start:lt(D.start),end:void 0},X.push(se)),this.stack.push(se)}function I(D){const $=this.stack.pop();$.value+=this.sliceSerialize(D),$.position.end=lt(D.end)}function B(D){const $=this.stack[this.stack.length-1];if(this.data.atHardBreak){const X=$.children[$.children.length-1];X.position.end=lt(D.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes($.type)&&(q.call(this,D),I.call(this,D))}function F(){this.data.atHardBreak=!0}function G(){const D=this.resume(),$=this.stack[this.stack.length-1];$.value=D}function z(){const D=this.resume(),$=this.stack[this.stack.length-1];$.value=D}function M(){const D=this.resume(),$=this.stack[this.stack.length-1];$.value=D}function W(){const D=this.stack[this.stack.length-1];if(this.data.inReference){const $=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=$,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function K(){const D=this.stack[this.stack.length-1];if(this.data.inReference){const $=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=$,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function te(D){const $=this.sliceSerialize(D),X=this.stack[this.stack.length-2];X.label=h0($),X.identifier=Ge($).toLowerCase()}function J(){const D=this.stack[this.stack.length-1],$=this.resume(),X=this.stack[this.stack.length-1];if(this.data.inReference=!0,X.type==="link"){const se=D.children;X.children=se}else X.alt=$}function A(){const D=this.resume(),$=this.stack[this.stack.length-1];$.url=D}function Z(){const D=this.resume(),$=this.stack[this.stack.length-1];$.title=D}function le(){this.data.inReference=void 0}function x(){this.data.referenceType="collapsed"}function ue(D){const $=this.resume(),X=this.stack[this.stack.length-1];X.label=$,X.identifier=Ge(this.sliceSerialize(D)).toLowerCase(),this.data.referenceType="full"}function he(D){this.data.characterReferenceType=D.type}function ce(D){const $=this.sliceSerialize(D),X=this.data.characterReferenceType;let se;X?(se=tu($,X==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):se=ci($);const pe=this.stack[this.stack.length-1];pe.value+=se}function ke(D){const $=this.stack.pop();$.position.end=lt(D.end)}function Ee(D){I.call(this,D);const $=this.stack[this.stack.length-1];$.url=this.sliceSerialize(D)}function xe(D){I.call(this,D);const $=this.stack[this.stack.length-1];$.url="mailto:"+this.sliceSerialize(D)}function me(){return{type:"blockquote",children:[]}}function Ae(){return{type:"code",lang:null,meta:null,value:""}}function Ie(){return{type:"inlineCode",value:""}}function be(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Pe(){return{type:"emphasis",children:[]}}function Le(){return{type:"heading",depth:0,children:[]}}function Fe(){return{type:"break"}}function ie(){return{type:"html",value:""}}function we(){return{type:"image",title:null,url:"",alt:null}}function ot(){return{type:"link",title:null,url:"",children:[]}}function Pi(D){return{type:"list",ordered:D.type==="listOrdered",start:null,spread:D._spread,children:[]}}function zo(D){return{type:"listItem",spread:D._spread,checked:null,children:[]}}function $o(){return{type:"paragraph",children:[]}}function Yo(){return{type:"strong",children:[]}}function qo(){return{type:"text",value:""}}function Vo(){return{type:"thematicBreak"}}}function lt(t){return{line:t.line,column:t.column,offset:t.offset}}function du(t,e){let n=-1;for(;++n<e.length;){const r=e[n];Array.isArray(r)?du(t,r):E0(t,r)}}function E0(t,e){let n;for(n in e)if(fu.call(e,n))switch(n){case"canContainEols":{const r=e[n];r&&t[n].push(...r);break}case"transforms":{const r=e[n];r&&t[n].push(...r);break}case"enter":case"exit":{const r=e[n];r&&Object.assign(t[n],r);break}}}function ls(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+nn({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+nn({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+nn({start:e.start,end:e.end})+") is still open")}function b0(t){const e=this;e.parser=n;function n(r){return p0(r,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}function T0(t,e){const n={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(e),!0)};return t.patch(e,n),t.applyData(e,n)}function x0(t,e){const n={type:"element",tagName:"br",properties:{},children:[]};return t.patch(e,n),[t.applyData(e,n),{type:"text",value:`
|
|
61
|
-
`}]}function
|
|
62
|
-
`:"",r={},i=e.lang?e.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return e.meta&&(s.data={meta:e.meta}),t.patch(e,s),s=t.applyData(e,s),s={type:"element",tagName:"pre",properties:{},children:[s]},t.patch(e,s),s}function
|
|
60
|
+
`;break}case-2:{a=e?" ":" ";break}case-1:{if(!e&&i)continue;a=" ";break}default:a=String.fromCharCode(s)}i=s===-2,r.push(a)}return r.join("")}function o0(t){const r={constructs:eu([i0,...(t||{}).extensions||[]]),content:i(kf),defined:[],document:i(Nf),flow:i($d),lazy:{},string:i(Vd),text:i(Wd)};return r;function i(s){return a;function a(u){return s0(r,s,u)}}}function l0(t){for(;!su(t););return t}const ls=/[\0\t\n\r]/g;function c0(){let t=1,e="",n=!0,r;return i;function i(s,a,u){const o=[];let l,f,d,m,h;for(s=e+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),d=0,e="",n&&(s.charCodeAt(0)===65279&&d++,n=void 0);d<s.length;){if(ls.lastIndex=d,l=ls.exec(s),m=l&&l.index!==void 0?l.index:s.length,h=s.charCodeAt(m),!l){e=s.slice(d);break}if(h===10&&d===m&&r)o.push(-3),r=void 0;else switch(r&&(o.push(-5),r=void 0),d<m&&(o.push(s.slice(d,m)),t+=m-d),h){case 0:{o.push(65533),t++;break}case 9:{for(f=Math.ceil(t/4)*4,o.push(-2);t++<f;)o.push(-1);break}case 10:{o.push(-4),t=1;break}default:r=!0,t=1}d=m+1}return u&&(r&&o.push(-5),e&&o.push(e),o.push(null)),o}}const f0=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function d0(t){return t.replace(f0,h0)}function h0(t,e,n){if(e)return e;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return tu(n.slice(s?2:1),s?16:10)}return fi(n)||t}const fu={}.hasOwnProperty;function m0(t,e,n){return typeof e!="string"&&(n=e,e=void 0),p0(n)(l0(o0(n).document().write(c0()(t,e,!0))))}function p0(t){const e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(ot),autolinkProtocol:q,autolinkEmail:q,atxHeading:s(Le),blockQuote:s(me),characterEscape:q,characterReference:q,codeFenced:s(Ae),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(Ae,a),codeText:s(Ie,a),codeTextData:q,data:q,codeFlowValue:q,definition:s(be),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(Pe),hardBreakEscape:s(Fe),hardBreakTrailing:s(Fe),htmlFlow:s(ie,a),htmlFlowData:q,htmlText:s(ie,a),htmlTextData:q,image:s(we),label:a,link:s(ot),listItem:s(zo),listItemValue:m,listOrdered:s(Mi,d),listUnordered:s(Mi),paragraph:s($o),reference:x,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(Le),strong:s(Yo),thematicBreak:s(Vo)},exit:{atxHeading:o(),atxHeadingSequence:O,autolink:o(),autolinkEmail:xe,autolinkProtocol:Ee,blockQuote:o(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:he,characterReferenceMarkerNumeric:he,characterReferenceValue:ce,characterReference:ke,codeFenced:o(C),codeFencedFence:k,codeFencedFenceInfo:h,codeFencedFenceMeta:g,codeFlowValue:I,codeIndented:o(T),codeText:o(M),codeTextData:I,data:I,definition:o(),definitionDestinationString:L,definitionLabelString:S,definitionTitleString:N,emphasis:o(),hardBreakEscape:o(F),hardBreakTrailing:o(F),htmlFlow:o(G),htmlFlowData:I,htmlText:o(z),htmlTextData:I,image:o(K),label:J,labelText:te,lineEnding:B,link:o(W),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:ue,resourceDestinationString:A,resourceTitleString:Z,resource:le,setextHeading:o(Y),setextHeadingLineSequence:j,setextHeadingText:y,strong:o(),thematicBreak:o()}};du(e,(t||{}).mdastExtensions||[]);const n={};return r;function r(D){let $={type:"root",children:[]};const X={stack:[$],tokenStack:[],config:e,enter:u,exit:l,buffer:a,resume:f,data:n},se=[];let pe=-1;for(;++pe<D.length;)if(D[pe][1].type==="listOrdered"||D[pe][1].type==="listUnordered")if(D[pe][0]==="enter")se.push(pe);else{const We=se.pop();pe=i(D,We,pe)}for(pe=-1;++pe<D.length;){const We=e[D[pe][0]];fu.call(We,D[pe][1].type)&&We[D[pe][1].type].call(Object.assign({sliceSerialize:D[pe][2].sliceSerialize},X),D[pe][1])}if(X.tokenStack.length>0){const We=X.tokenStack[X.tokenStack.length-1];(We[1]||cs).call(X,void 0,We[0])}for($.position={start:lt(D.length>0?D[0][1].start:{line:1,column:1,offset:0}),end:lt(D.length>0?D[D.length-2][1].end:{line:1,column:1,offset:0})},pe=-1;++pe<e.transforms.length;)$=e.transforms[pe]($)||$;return $}function i(D,$,X){let se=$-1,pe=-1,We=!1,pt,nt,$t,Yt;for(;++se<=X;){const ze=D[se];switch(ze[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ze[0]==="enter"?pe++:pe--,Yt=void 0;break}case"lineEndingBlank":{ze[0]==="enter"&&(pt&&!Yt&&!pe&&!$t&&($t=se),Yt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Yt=void 0}if(!pe&&ze[0]==="enter"&&ze[1].type==="listItemPrefix"||pe===-1&&ze[0]==="exit"&&(ze[1].type==="listUnordered"||ze[1].type==="listOrdered")){if(pt){let yt=se;for(nt=void 0;yt--;){const rt=D[yt];if(rt[1].type==="lineEnding"||rt[1].type==="lineEndingBlank"){if(rt[0]==="exit")continue;nt&&(D[nt][1].type="lineEndingBlank",We=!0),rt[1].type="lineEnding",nt=yt}else if(!(rt[1].type==="linePrefix"||rt[1].type==="blockQuotePrefix"||rt[1].type==="blockQuotePrefixWhitespace"||rt[1].type==="blockQuoteMarker"||rt[1].type==="listItemIndent"))break}$t&&(!nt||$t<nt)&&(pt._spread=!0),pt.end=Object.assign({},nt?D[nt][1].start:ze[1].end),D.splice(nt||se,0,["exit",pt,ze[2]]),se++,X++}if(ze[1].type==="listItemPrefix"){const yt={type:"listItem",_spread:!1,start:Object.assign({},ze[1].start),end:void 0};pt=yt,D.splice(se,0,["enter",yt,ze[2]]),se++,X++,$t=void 0,Yt=!0}}}return D[$][1]._spread=We,X}function s(D,$){return X;function X(se){u.call(this,D(se),se),$&&$.call(this,se)}}function a(){this.stack.push({type:"fragment",children:[]})}function u(D,$,X){this.stack[this.stack.length-1].children.push(D),this.stack.push(D),this.tokenStack.push([$,X||void 0]),D.position={start:lt($.start),end:void 0}}function o(D){return $;function $(X){D&&D.call(this,X),l.call(this,X)}}function l(D,$){const X=this.stack.pop(),se=this.tokenStack.pop();if(se)se[0].type!==D.type&&($?$.call(this,D,se[0]):(se[1]||cs).call(this,D,se[0]));else throw new Error("Cannot close `"+D.type+"` ("+nn({start:D.start,end:D.end})+"): it’s not open");X.position.end=lt(D.end)}function f(){return ci(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function m(D){if(this.data.expectingFirstListItemValue){const $=this.stack[this.stack.length-2];$.start=Number.parseInt(this.sliceSerialize(D),10),this.data.expectingFirstListItemValue=void 0}}function h(){const D=this.resume(),$=this.stack[this.stack.length-1];$.lang=D}function g(){const D=this.resume(),$=this.stack[this.stack.length-1];$.meta=D}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const D=this.resume(),$=this.stack[this.stack.length-1];$.value=D.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function T(){const D=this.resume(),$=this.stack[this.stack.length-1];$.value=D.replace(/(\r?\n|\r)$/g,"")}function S(D){const $=this.resume(),X=this.stack[this.stack.length-1];X.label=$,X.identifier=Ge(this.sliceSerialize(D)).toLowerCase()}function N(){const D=this.resume(),$=this.stack[this.stack.length-1];$.title=D}function L(){const D=this.resume(),$=this.stack[this.stack.length-1];$.url=D}function O(D){const $=this.stack[this.stack.length-1];if(!$.depth){const X=this.sliceSerialize(D).length;$.depth=X}}function y(){this.data.setextHeadingSlurpLineEnding=!0}function j(D){const $=this.stack[this.stack.length-1];$.depth=this.sliceSerialize(D).codePointAt(0)===61?1:2}function Y(){this.data.setextHeadingSlurpLineEnding=void 0}function q(D){const X=this.stack[this.stack.length-1].children;let se=X[X.length-1];(!se||se.type!=="text")&&(se=qo(),se.position={start:lt(D.start),end:void 0},X.push(se)),this.stack.push(se)}function I(D){const $=this.stack.pop();$.value+=this.sliceSerialize(D),$.position.end=lt(D.end)}function B(D){const $=this.stack[this.stack.length-1];if(this.data.atHardBreak){const X=$.children[$.children.length-1];X.position.end=lt(D.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes($.type)&&(q.call(this,D),I.call(this,D))}function F(){this.data.atHardBreak=!0}function G(){const D=this.resume(),$=this.stack[this.stack.length-1];$.value=D}function z(){const D=this.resume(),$=this.stack[this.stack.length-1];$.value=D}function M(){const D=this.resume(),$=this.stack[this.stack.length-1];$.value=D}function W(){const D=this.stack[this.stack.length-1];if(this.data.inReference){const $=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=$,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function K(){const D=this.stack[this.stack.length-1];if(this.data.inReference){const $=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=$,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function te(D){const $=this.sliceSerialize(D),X=this.stack[this.stack.length-2];X.label=d0($),X.identifier=Ge($).toLowerCase()}function J(){const D=this.stack[this.stack.length-1],$=this.resume(),X=this.stack[this.stack.length-1];if(this.data.inReference=!0,X.type==="link"){const se=D.children;X.children=se}else X.alt=$}function A(){const D=this.resume(),$=this.stack[this.stack.length-1];$.url=D}function Z(){const D=this.resume(),$=this.stack[this.stack.length-1];$.title=D}function le(){this.data.inReference=void 0}function x(){this.data.referenceType="collapsed"}function ue(D){const $=this.resume(),X=this.stack[this.stack.length-1];X.label=$,X.identifier=Ge(this.sliceSerialize(D)).toLowerCase(),this.data.referenceType="full"}function he(D){this.data.characterReferenceType=D.type}function ce(D){const $=this.sliceSerialize(D),X=this.data.characterReferenceType;let se;X?(se=tu($,X==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):se=fi($);const pe=this.stack[this.stack.length-1];pe.value+=se}function ke(D){const $=this.stack.pop();$.position.end=lt(D.end)}function Ee(D){I.call(this,D);const $=this.stack[this.stack.length-1];$.url=this.sliceSerialize(D)}function xe(D){I.call(this,D);const $=this.stack[this.stack.length-1];$.url="mailto:"+this.sliceSerialize(D)}function me(){return{type:"blockquote",children:[]}}function Ae(){return{type:"code",lang:null,meta:null,value:""}}function Ie(){return{type:"inlineCode",value:""}}function be(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Pe(){return{type:"emphasis",children:[]}}function Le(){return{type:"heading",depth:0,children:[]}}function Fe(){return{type:"break"}}function ie(){return{type:"html",value:""}}function we(){return{type:"image",title:null,url:"",alt:null}}function ot(){return{type:"link",title:null,url:"",children:[]}}function Mi(D){return{type:"list",ordered:D.type==="listOrdered",start:null,spread:D._spread,children:[]}}function zo(D){return{type:"listItem",spread:D._spread,checked:null,children:[]}}function $o(){return{type:"paragraph",children:[]}}function Yo(){return{type:"strong",children:[]}}function qo(){return{type:"text",value:""}}function Vo(){return{type:"thematicBreak"}}}function lt(t){return{line:t.line,column:t.column,offset:t.offset}}function du(t,e){let n=-1;for(;++n<e.length;){const r=e[n];Array.isArray(r)?du(t,r):g0(t,r)}}function g0(t,e){let n;for(n in e)if(fu.call(e,n))switch(n){case"canContainEols":{const r=e[n];r&&t[n].push(...r);break}case"transforms":{const r=e[n];r&&t[n].push(...r);break}case"enter":case"exit":{const r=e[n];r&&Object.assign(t[n],r);break}}}function cs(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+nn({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+nn({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+nn({start:e.start,end:e.end})+") is still open")}function E0(t){const e=this;e.parser=n;function n(r){return m0(r,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}function b0(t,e){const n={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(e),!0)};return t.patch(e,n),t.applyData(e,n)}function T0(t,e){const n={type:"element",tagName:"br",properties:{},children:[]};return t.patch(e,n),[t.applyData(e,n),{type:"text",value:`
|
|
61
|
+
`}]}function x0(t,e){const n=e.value?e.value+`
|
|
62
|
+
`:"",r={},i=e.lang?e.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return e.meta&&(s.data={meta:e.meta}),t.patch(e,s),s=t.applyData(e,s),s={type:"element",tagName:"pre",properties:{},children:[s]},t.patch(e,s),s}function _0(t,e){const n={type:"element",tagName:"del",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function A0(t,e){const n={type:"element",tagName:"em",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function k0(t,e){const n=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=String(e.identifier).toUpperCase(),i=Ht(r.toLowerCase()),s=t.footnoteOrder.indexOf(r);let a,u=t.footnoteCounts.get(r);u===void 0?(u=0,t.footnoteOrder.push(r),a=t.footnoteOrder.length):a=s+1,u+=1,t.footnoteCounts.set(r,u);const o={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};t.patch(e,o);const l={type:"element",tagName:"sup",properties:{},children:[o]};return t.patch(e,l),t.applyData(e,l)}function C0(t,e){const n={type:"element",tagName:"h"+e.depth,properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function N0(t,e){if(t.options.allowDangerousHtml){const n={type:"raw",value:e.value};return t.patch(e,n),t.applyData(e,n)}}function hu(t,e){const n=e.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+r}];const i=t.all(e),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function S0(t,e){const n=String(e.identifier).toUpperCase(),r=t.definitionById.get(n);if(!r)return hu(t,e);const i={src:Ht(r.url||""),alt:e.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return t.patch(e,s),t.applyData(e,s)}function y0(t,e){const n={src:Ht(e.url)};e.alt!==null&&e.alt!==void 0&&(n.alt=e.alt),e.title!==null&&e.title!==void 0&&(n.title=e.title);const r={type:"element",tagName:"img",properties:n,children:[]};return t.patch(e,r),t.applyData(e,r)}function I0(t,e){const n={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};t.patch(e,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return t.patch(e,r),t.applyData(e,r)}function w0(t,e){const n=String(e.identifier).toUpperCase(),r=t.definitionById.get(n);if(!r)return hu(t,e);const i={href:Ht(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:t.all(e)};return t.patch(e,s),t.applyData(e,s)}function L0(t,e){const n={href:Ht(e.url)};e.title!==null&&e.title!==void 0&&(n.title=e.title);const r={type:"element",tagName:"a",properties:n,children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function R0(t,e,n){const r=t.all(e),i=n?O0(n):mu(e),s={},a=[];if(typeof e.checked=="boolean"){const f=r[0];let d;f&&f.type==="element"&&f.tagName==="p"?d=f:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const f=r[u];(i||u!==0||f.type!=="element"||f.tagName!=="p")&&a.push({type:"text",value:`
|
|
63
63
|
`}),f.type==="element"&&f.tagName==="p"&&!i?a.push(...f.children):a.push(f)}const o=r[r.length-1];o&&(i||o.type!=="element"||o.tagName!=="p")&&a.push({type:"text",value:`
|
|
64
|
-
`});const l={type:"element",tagName:"li",properties:s,children:a};return t.patch(e,l),t.applyData(e,l)}function
|
|
64
|
+
`});const l={type:"element",tagName:"li",properties:s,children:a};return t.patch(e,l),t.applyData(e,l)}function O0(t){let e=!1;if(t.type==="list"){e=t.spread||!1;const n=t.children;let r=-1;for(;!e&&++r<n.length;)e=mu(n[r])}return e}function mu(t){const e=t.spread;return e??t.children.length>1}function D0(t,e){const n={},r=t.all(e);let i=-1;for(typeof e.start=="number"&&e.start!==1&&(n.start=e.start);++i<r.length;){const a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:e.ordered?"ol":"ul",properties:n,children:t.wrap(r,!0)};return t.patch(e,s),t.applyData(e,s)}function P0(t,e){const n={type:"element",tagName:"p",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function M0(t,e){const n={type:"root",children:t.wrap(t.all(e))};return t.patch(e,n),t.applyData(e,n)}function v0(t,e){const n={type:"element",tagName:"strong",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function B0(t,e){const n=t.all(e),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:t.wrap([r],!0)};t.patch(e.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:t.wrap(n,!0)},u=et(e.children[1]),o=Vn(e.children[e.children.length-1]);u&&o&&(a.position={start:u,end:o}),i.push(a)}const s={type:"element",tagName:"table",properties:{},children:t.wrap(i,!0)};return t.patch(e,s),t.applyData(e,s)}function F0(t,e,n){const r=n?n.children:void 0,s=(r?r.indexOf(e):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,u=a?a.length:e.children.length;let o=-1;const l=[];for(;++o<u;){const d=e.children[o],m={},h=a?a[o]:void 0;h&&(m.align=h);let g={type:"element",tagName:s,properties:m,children:[]};d&&(g.children=t.all(d),t.patch(d,g),g=t.applyData(d,g)),l.push(g)}const f={type:"element",tagName:"tr",properties:{},children:t.wrap(l,!0)};return t.patch(e,f),t.applyData(e,f)}function H0(t,e){const n={type:"element",tagName:"td",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}const fs=9,ds=32;function U0(t){const e=String(t),n=/\r?\n|\r/g;let r=n.exec(e),i=0;const s=[];for(;r;)s.push(hs(e.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(e);return s.push(hs(e.slice(i),i>0,!1)),s.join("")}function hs(t,e,n){let r=0,i=t.length;if(e){let s=t.codePointAt(r);for(;s===fs||s===ds;)r++,s=t.codePointAt(r)}if(n){let s=t.codePointAt(i-1);for(;s===fs||s===ds;)i--,s=t.codePointAt(i-1)}return i>r?t.slice(r,i):""}function j0(t,e){const n={type:"text",value:U0(String(e.value))};return t.patch(e,n),t.applyData(e,n)}function z0(t,e){const n={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,n),t.applyData(e,n)}const $0={blockquote:b0,break:T0,code:x0,delete:_0,emphasis:A0,footnoteReference:k0,heading:C0,html:N0,imageReference:S0,image:y0,inlineCode:I0,linkReference:w0,link:L0,listItem:R0,list:D0,paragraph:P0,root:M0,strong:v0,table:B0,tableCell:H0,tableRow:F0,text:j0,thematicBreak:z0,toml:kn,yaml:kn,definition:kn,footnoteDefinition:kn};function kn(){}const pu=-1,Qn=0,sn=1,vn=2,hi=3,mi=4,pi=5,gi=6,gu=7,Eu=8,ms=typeof self=="object"?self:globalThis,Y0=(t,e)=>{const n=(i,s)=>(t.set(s,i),i),r=i=>{if(t.has(i))return t.get(i);const[s,a]=e[i];switch(s){case Qn:case pu:return n(a,i);case sn:{const u=n([],i);for(const o of a)u.push(r(o));return u}case vn:{const u=n({},i);for(const[o,l]of a)u[r(o)]=r(l);return u}case hi:return n(new Date(a),i);case mi:{const{source:u,flags:o}=a;return n(new RegExp(u,o),i)}case pi:{const u=n(new Map,i);for(const[o,l]of a)u.set(r(o),r(l));return u}case gi:{const u=n(new Set,i);for(const o of a)u.add(r(o));return u}case gu:{const{name:u,message:o}=a;return n(new ms[u](o),i)}case Eu:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:u}=new Uint8Array(a);return n(new DataView(u),a)}}return n(new ms[s](a),i)};return r},ps=t=>Y0(new Map,t)(0),wt="",{toString:q0}={},{keys:V0}=Object,Kt=t=>{const e=typeof t;if(e!=="object"||!t)return[Qn,e];const n=q0.call(t).slice(8,-1);switch(n){case"Array":return[sn,wt];case"Object":return[vn,wt];case"Date":return[hi,wt];case"RegExp":return[mi,wt];case"Map":return[pi,wt];case"Set":return[gi,wt];case"DataView":return[sn,n]}return n.includes("Array")?[sn,n]:n.includes("Error")?[gu,n]:[vn,n]},Cn=([t,e])=>t===Qn&&(e==="function"||e==="symbol"),W0=(t,e,n,r)=>{const i=(a,u)=>{const o=r.push(a)-1;return n.set(u,o),o},s=a=>{if(n.has(a))return n.get(a);let[u,o]=Kt(a);switch(u){case Qn:{let f=a;switch(o){case"bigint":u=Eu,f=a.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+o);f=null;break;case"undefined":return i([pu],a)}return i([u,f],a)}case sn:{if(o){let m=a;return o==="DataView"?m=new Uint8Array(a.buffer):o==="ArrayBuffer"&&(m=new Uint8Array(a)),i([o,[...m]],a)}const f=[],d=i([u,f],a);for(const m of a)f.push(s(m));return d}case vn:{if(o)switch(o){case"BigInt":return i([o,a.toString()],a);case"Boolean":case"Number":case"String":return i([o,a.valueOf()],a)}if(e&&"toJSON"in a)return s(a.toJSON());const f=[],d=i([u,f],a);for(const m of V0(a))(t||!Cn(Kt(a[m])))&&f.push([s(m),s(a[m])]);return d}case hi:return i([u,a.toISOString()],a);case mi:{const{source:f,flags:d}=a;return i([u,{source:f,flags:d}],a)}case pi:{const f=[],d=i([u,f],a);for(const[m,h]of a)(t||!(Cn(Kt(m))||Cn(Kt(h))))&&f.push([s(m),s(h)]);return d}case gi:{const f=[],d=i([u,f],a);for(const m of a)(t||!Cn(Kt(m)))&&f.push(s(m));return d}}const{message:l}=a;return i([u,{name:o,message:l}],a)};return s},gs=(t,{json:e,lossy:n}={})=>{const r=[];return W0(!(e||n),!!e,new Map,r)(t),r},Pt=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?ps(gs(t,e)):structuredClone(t):(t,e)=>ps(gs(t,e));function G0(t,e){const n=[{type:"text",value:"↩"}];return e>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),n}function Q0(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}function K0(t){const e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",n=t.options.footnoteBackContent||G0,r=t.options.footnoteBackLabel||Q0,i=t.options.footnoteLabel||"Footnotes",s=t.options.footnoteLabelTagName||"h2",a=t.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let o=-1;for(;++o<t.footnoteOrder.length;){const l=t.footnoteById.get(t.footnoteOrder[o]);if(!l)continue;const f=t.all(l),d=String(l.identifier).toUpperCase(),m=Ht(d.toLowerCase());let h=0;const g=[],k=t.footnoteCounts.get(d);for(;k!==void 0&&++h<=k;){g.length>0&&g.push({type:"text",value:" "});let S=typeof n=="string"?n:n(o,h);typeof S=="string"&&(S={type:"text",value:S}),g.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+m+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(o,h),className:["data-footnote-backref"]},children:Array.isArray(S)?S:[S]})}const C=f[f.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const S=C.children[C.children.length-1];S&&S.type==="text"?S.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...g)}else f.push(...g);const T={type:"element",tagName:"li",properties:{id:e+"fn-"+m},children:t.wrap(f,!0)};t.patch(l,T),u.push(T)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Pt(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
65
65
|
`},{type:"element",tagName:"ol",properties:{},children:t.wrap(u,!0)},{type:"text",value:`
|
|
66
|
-
`}]}}const Kn=(function(t){if(t==null)return
|
|
66
|
+
`}]}}const Kn=(function(t){if(t==null)return eh;if(typeof t=="function")return Xn(t);if(typeof t=="object")return Array.isArray(t)?X0(t):Z0(t);if(typeof t=="string")return J0(t);throw new Error("Expected function, string, or object as test")});function X0(t){const e=[];let n=-1;for(;++n<t.length;)e[n]=Kn(t[n]);return Xn(r);function r(...i){let s=-1;for(;++s<e.length;)if(e[s].apply(this,i))return!0;return!1}}function Z0(t){const e=t;return Xn(n);function n(r){const i=r;let s;for(s in t)if(i[s]!==e[s])return!1;return!0}}function J0(t){return Xn(e);function e(n){return n&&n.type===t}}function Xn(t){return e;function e(n,r,i){return!!(th(n)&&t.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function eh(){return!0}function th(t){return t!==null&&typeof t=="object"&&"type"in t}const bu=[],nh=!0,Or=!1,rh="skip";function Tu(t,e,n,r){let i;typeof e=="function"&&typeof n!="function"?(r=n,n=e):i=e;const s=Kn(i),a=r?-1:1;u(t,void 0,[])();function u(o,l,f){const d=o&&typeof o=="object"?o:{};if(typeof d.type=="string"){const h=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(o.type+(h?"<"+h+">":""))+")"})}return m;function m(){let h=bu,g,k,C;if((!e||s(o,l,f[f.length-1]||void 0))&&(h=ih(n(o,f)),h[0]===Or))return h;if("children"in o&&o.children){const T=o;if(T.children&&h[0]!==rh)for(k=(r?T.children.length:-1)+a,C=f.concat(T);k>-1&&k<T.children.length;){const S=T.children[k];if(g=u(S,k,C)(),g[0]===Or)return g;k=typeof g[1]=="number"?g[1]:k+a}}return h}}}function ih(t){return Array.isArray(t)?t:typeof t=="number"?[nh,t]:t==null?bu:[t]}function Zn(t,e,n,r){let i,s,a;typeof e=="function"&&typeof n!="function"?(s=void 0,a=e,i=n):(s=e,a=n,i=r),Tu(t,s,u,i);function u(o,l){const f=l[l.length-1],d=f?f.children.indexOf(o):void 0;return a(o,d,f)}}const Dr={}.hasOwnProperty,sh={};function ah(t,e){const n=e||sh,r=new Map,i=new Map,s=new Map,a={...$0,...n.handlers},u={all:l,applyData:oh,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:a,one:o,options:n,patch:uh,wrap:ch};return Zn(t,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const d=f.type==="definition"?r:i,m=String(f.identifier).toUpperCase();d.has(m)||d.set(m,f)}}),u;function o(f,d){const m=f.type,h=u.handlers[m];if(Dr.call(u.handlers,m)&&h)return h(u,f,d);if(u.options.passThrough&&u.options.passThrough.includes(m)){if("children"in f){const{children:k,...C}=f,T=Pt(C);return T.children=u.all(f),T}return Pt(f)}return(u.options.unknownHandler||lh)(u,f,d)}function l(f){const d=[];if("children"in f){const m=f.children;let h=-1;for(;++h<m.length;){const g=u.one(m[h],f);if(g){if(h&&m[h-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=Es(g.value)),!Array.isArray(g)&&g.type==="element")){const k=g.children[0];k&&k.type==="text"&&(k.value=Es(k.value))}Array.isArray(g)?d.push(...g):d.push(g)}}}return d}}function uh(t,e){t.position&&(e.position=Gc(t))}function oh(t,e){let n=e;if(t&&t.data){const r=t.data.hName,i=t.data.hChildren,s=t.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&s&&Object.assign(n.properties,Pt(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function lh(t,e){const n=e.data||{},r="value"in e&&!(Dr.call(n,"hProperties")||Dr.call(n,"hChildren"))?{type:"text",value:e.value}:{type:"element",tagName:"div",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function ch(t,e){const n=[];let r=-1;for(e&&n.push({type:"text",value:`
|
|
67
67
|
`});++r<t.length;)r&&n.push({type:"text",value:`
|
|
68
68
|
`}),n.push(t[r]);return e&&t.length>0&&n.push({type:"text",value:`
|
|
69
|
-
`}),n}function
|
|
70
|
-
`},i),s}function dh(t,e){return t&&"run"in t?async function(n,r){const i=Es(n,{file:r,...e});await t.run(i,r)}:function(n,r){return Es(n,{file:r,...t||e})}}function bs(t){if(t)throw t}var cr,Ts;function hh(){if(Ts)return cr;Ts=1;var t=Object.prototype.hasOwnProperty,e=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(l){return typeof Array.isArray=="function"?Array.isArray(l):e.call(l)==="[object Array]"},s=function(l){if(!l||e.call(l)!=="[object Object]")return!1;var f=t.call(l,"constructor"),d=l.constructor&&l.constructor.prototype&&t.call(l.constructor.prototype,"isPrototypeOf");if(l.constructor&&!f&&!d)return!1;var m;for(m in l);return typeof m>"u"||t.call(l,m)},a=function(l,f){n&&f.name==="__proto__"?n(l,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):l[f.name]=f.newValue},u=function(l,f){if(f==="__proto__")if(t.call(l,f)){if(r)return r(l,f).value}else return;return l[f]};return cr=function o(){var l,f,d,m,h,g,k=arguments[0],C=1,T=arguments.length,S=!1;for(typeof k=="boolean"&&(S=k,k=arguments[1]||{},C=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});C<T;++C)if(l=arguments[C],l!=null)for(f in l)d=u(k,f),m=u(l,f),k!==m&&(S&&m&&(s(m)||(h=i(m)))?(h?(h=!1,g=d&&i(d)?d:[]):g=d&&s(d)?d:{},a(k,{name:f,newValue:o(S,g,m)})):typeof m<"u"&&a(k,{name:f,newValue:m}));return k},cr}var mh=hh();const fr=na(mh);function Pr(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function ph(){const t=[],e={run:n,use:r};return e;function n(...i){let s=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);u(null,...i);function u(o,...l){const f=t[++s];let d=-1;if(o){a(o);return}for(;++d<i.length;)(l[d]===null||l[d]===void 0)&&(l[d]=i[d]);i=l,f?gh(f,u)(...l):a(null,...l)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return t.push(i),e}}function gh(t,e){let n;return r;function r(...a){const u=t.length>a.length;let o;u&&a.push(i);try{o=t.apply(this,a)}catch(l){const f=l;if(u&&n)throw f;return i(f)}u||(o&&o.then&&typeof o.then=="function"?o.then(s,i):o instanceof Error?i(o):s(o))}function i(a,...u){n||(n=!0,e(a,...u))}function s(a){i(null,a)}}const Ze={basename:Eh,dirname:bh,extname:Th,join:xh,sep:"/"};function Eh(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');Tn(t);let n=0,r=-1,i=t.length,s;if(e===void 0||e.length===0||e.length>t.length){for(;i--;)if(t.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":t.slice(n,r)}if(e===t)return"";let a=-1,u=e.length-1;for(;i--;)if(t.codePointAt(i)===47){if(s){n=i+1;break}}else a<0&&(s=!0,a=i+1),u>-1&&(t.codePointAt(i)===e.codePointAt(u--)?u<0&&(r=i):(u=-1,r=a));return n===r?r=a:r<0&&(r=t.length),t.slice(n,r)}function bh(t){if(Tn(t),t.length===0)return".";let e=-1,n=t.length,r;for(;--n;)if(t.codePointAt(n)===47){if(r){e=n;break}}else r||(r=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function Th(t){Tn(t);let e=t.length,n=-1,r=0,i=-1,s=0,a;for(;e--;){const u=t.codePointAt(e);if(u===47){if(a){r=e+1;break}continue}n<0&&(a=!0,n=e+1),u===46?i<0?i=e:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":t.slice(i,n)}function xh(...t){let e=-1,n;for(;++e<t.length;)Tn(t[e]),t[e]&&(n=n===void 0?t[e]:n+"/"+t[e]);return n===void 0?".":_h(n)}function _h(t){Tn(t);const e=t.codePointAt(0)===47;let n=Ah(t,!e);return n.length===0&&!e&&(n="."),n.length>0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function Ah(t,e){let n="",r=0,i=-1,s=0,a=-1,u,o;for(;++a<=t.length;){if(a<t.length)u=t.codePointAt(a);else{if(u===47)break;u=47}if(u===47){if(!(i===a-1||s===1))if(i!==a-1&&s===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=a,s=0;continue}}else if(n.length>0){n="",r=0,i=a,s=0;continue}}e&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+t.slice(i+1,a):n=t.slice(i+1,a),r=a-i-1;i=a,s=0}else u===46&&s>-1?s++:s=-1}return n}function Tn(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const kh={cwd:Ch};function Ch(){return"/"}function Mr(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function Nh(t){if(typeof t=="string")t=new URL(t);else if(!Mr(t)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return Sh(t)}function Sh(t){if(t.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 e=t.pathname;let n=-1;for(;++n<e.length;)if(e.codePointAt(n)===37&&e.codePointAt(n+1)===50){const r=e.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(e)}const dr=["history","path","basename","stem","extname","dirname"];class xu{constructor(e){let n;e?Mr(e)?n={path:e}:typeof e=="string"||yh(e)?n={value:e}:n=e:n={},this.cwd="cwd"in n?"":kh.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<dr.length;){const s=dr[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)dr.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Ze.basename(this.path):void 0}set basename(e){mr(e,"basename"),hr(e,"basename"),this.path=Ze.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?Ze.dirname(this.path):void 0}set dirname(e){xs(this.basename,"dirname"),this.path=Ze.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?Ze.extname(this.path):void 0}set extname(e){if(hr(e,"extname"),xs(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=Ze.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Mr(e)&&(e=Nh(e)),mr(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?Ze.basename(this.path,this.extname):void 0}set stem(e){mr(e,"stem"),hr(e,"stem"),this.path=Ze.join(this.dirname||"",e+(this.extname||""))}fail(e,n,r){const i=this.message(e,n,r);throw i.fatal=!0,i}info(e,n,r){const i=this.message(e,n,r);return i.fatal=void 0,i}message(e,n,r){const i=new Oe(e,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}}function hr(t,e){if(t&&t.includes(Ze.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+Ze.sep+"`")}function mr(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function xs(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function yh(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const Ih=(function(t){const r=this.constructor.prototype,i=r[t],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s}),wh={}.hasOwnProperty;class gi extends Ih{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=ph()}copy(){const e=new gi;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];e.use(...r)}return e.data(fr(!0,{},this.namespace)),e}data(e,n){return typeof e=="string"?arguments.length===2?(Er("data",this.frozen),this.namespace[e]=n,this):wh.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Er("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=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(e,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const n=Nn(e),r=this.parser||this.Parser;return pr("parse",r),r(String(n),n)}process(e,n){const r=this;return this.freeze(),pr("process",this.parser||this.Parser),gr("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,a){const u=Nn(e),o=r.parse(u);r.run(o,u,function(f,d,m){if(f||!d||!m)return l(f);const h=d,g=r.stringify(h,m);Oh(g)?m.value=g:m.result=g,l(f,m)});function l(f,d){f||!d?a(f):s?s(d):n(void 0,d)}}}processSync(e){let n=!1,r;return this.freeze(),pr("processSync",this.parser||this.Parser),gr("processSync",this.compiler||this.Compiler),this.process(e,i),As("processSync","process",n),r;function i(s,a){n=!0,bs(s),r=a}}run(e,n,r){_s(e),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(a,u){const o=Nn(n);i.run(e,o,l);function l(f,d,m){const h=d||e;f?u(f):a?a(h):r(void 0,h,m)}}}runSync(e,n){let r=!1,i;return this.run(e,n,s),As("runSync","run",r),i;function s(a,u){bs(a),i=u,r=!0}}stringify(e,n){this.freeze();const r=Nn(n),i=this.compiler||this.Compiler;return gr("stringify",i),_s(e),i(e,r)}use(e,...n){const r=this.attachers,i=this.namespace;if(Er("use",this.frozen),e!=null)if(typeof e=="function")o(e,n);else if(typeof e=="object")Array.isArray(e)?u(e):a(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function s(l){if(typeof l=="function")o(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[f,...d]=l;o(f,d)}else a(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function a(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");u(l.plugins),l.settings&&(i.settings=fr(!0,i.settings,l.settings))}function u(l){let f=-1;if(l!=null)if(Array.isArray(l))for(;++f<l.length;){const d=l[f];s(d)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function o(l,f){let d=-1,m=-1;for(;++d<r.length;)if(r[d][0]===l){m=d;break}if(m===-1)r.push([l,...f]);else if(f.length>0){let[h,...g]=f;const k=r[m][1];Pr(k)&&Pr(h)&&(h=fr(!0,k,h)),r[m]=[l,h,...g]}}}}const Lh=new gi().freeze();function pr(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function gr(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function Er(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function _s(t){if(!Pr(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function As(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function Nn(t){return Rh(t)?t:new xu(t)}function Rh(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function Oh(t){return typeof t=="string"||Dh(t)}function Dh(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const Ph="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ks=[],Cs={allowDangerousHtml:!0},Mh=/^(https?|ircs?|mailto|xmpp)$/i,vh=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Bh(t){const e=Fh(t),n=Hh(t);return Uh(e.runSync(e.parse(n),n),t)}function Fh(t){const e=t.rehypePlugins||ks,n=t.remarkPlugins||ks,r=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...Cs}:Cs;return Lh().use(b0).use(n).use(dh,r).use(e)}function Hh(t){const e=t.children||"",n=new xu;return typeof e=="string"&&(n.value=e),n}function Uh(t,e){const n=e.allowedElements,r=e.allowElement,i=e.components,s=e.disallowedElements,a=e.skipHtml,u=e.unwrapDisallowed,o=e.urlTransform||jh;for(const f of vh)Object.hasOwn(e,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+Ph+f.id,void 0);return e.className&&(t={type:"element",tagName:"div",properties:{className:e.className},children:t.type==="root"?t.children:[t]}),Zn(t,l),ef(t,{Fragment:p.Fragment,components:i,ignoreInvalidStyle:!0,jsx:p.jsx,jsxs:p.jsxs,passKeys:!0,passNode:!0});function l(f,d,m){if(f.type==="raw"&&m&&typeof d=="number")return a?m.children.splice(d,1):m.children[d]={type:"text",value:f.value},d;if(f.type==="element"){let h;for(h in ur)if(Object.hasOwn(ur,h)&&Object.hasOwn(f.properties,h)){const g=f.properties[h],k=ur[h];(k===null||k.includes(f.tagName))&&(f.properties[h]=o(String(g||""),h,f))}}if(f.type==="element"){let h=n?!n.includes(f.tagName):s?s.includes(f.tagName):!1;if(!h&&r&&typeof d=="number"&&(h=!r(f,d,m)),h&&m&&typeof d=="number")return u&&f.children?m.children.splice(d,1,...f.children):m.children.splice(d,1),d}}}function jh(t){const e=t.indexOf(":"),n=t.indexOf("?"),r=t.indexOf("#"),i=t.indexOf("/");return e===-1||i!==-1&&e>i||n!==-1&&e>n||r!==-1&&e>r||Mh.test(t.slice(0,e))?t:""}const Ns=/[#.]/g;function zh(t,e){const n=t||"",r={};let i=0,s,a;for(;i<n.length;){Ns.lastIndex=i;const u=Ns.exec(n),o=n.slice(i,u?u.index:n.length);o&&(s?s==="#"?r.id=o:Array.isArray(r.className)?r.className.push(o):r.className=[o]:a=o,i+=o.length),u&&(s=u[0],i++)}return{type:"element",tagName:a||e||"div",properties:r,children:[]}}function _u(t,e,n){const r=n?Vh(n):void 0;function i(s,a,...u){let o;if(s==null){o={type:"root",children:[]};const l=a;u.unshift(l)}else{o=zh(s,e);const l=o.tagName.toLowerCase(),f=r?r.get(l):void 0;if(o.tagName=f||l,$h(a))u.unshift(a);else for(const[d,m]of Object.entries(a))Yh(t,o.properties,d,m)}for(const l of u)vr(o.children,l);return o.type==="element"&&o.tagName==="template"&&(o.content={type:"root",children:o.children},o.children=[]),o}return i}function $h(t){if(t===null||typeof t!="object"||Array.isArray(t))return!0;if(typeof t.type!="string")return!1;const e=t,n=Object.keys(t);for(const r of n){const i=e[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const s=i;for(const a of s)if(typeof a!="number"&&typeof a!="string")return!0}}return!!("children"in t&&Array.isArray(t.children))}function Yh(t,e,n,r){const i=qn(t,n);let s;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;s=r}else typeof r=="boolean"?s=r:typeof r=="string"?i.spaceSeparated?s=Vi(r):i.commaSeparated?s=ji(r):i.commaOrSpaceSeparated?s=Vi(ji(r).join(" ")):s=Ss(i,i.property,r):Array.isArray(r)?s=[...r]:s=i.property==="style"?qh(r):String(r);if(Array.isArray(s)){const a=[];for(const u of s)a.push(Ss(i,i.property,u));s=a}i.property==="className"&&Array.isArray(e.className)&&(s=e.className.concat(s)),e[i.property]=s}}function vr(t,e){if(e!=null)if(typeof e=="number"||typeof e=="string")t.push({type:"text",value:String(e)});else if(Array.isArray(e))for(const n of e)vr(t,n);else if(typeof e=="object"&&"type"in e)e.type==="root"?vr(t,e.children):t.push(e);else throw new Error("Expected node, nodes, or string, got `"+e+"`")}function Ss(t,e,n){if(typeof n=="string"){if(t.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((t.boolean||t.overloadedBoolean)&&(n===""||fn(n)===fn(e)))return!0}return n}function qh(t){const e=[];for(const[n,r]of Object.entries(t))e.push([n,r].join(": "));return e.join("; ")}function Vh(t){const e=new Map;for(const n of t)e.set(n.toLowerCase(),n);return e}const Wh=["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"],Gh=_u(En,"div"),Qh=_u(ht,"g",Wh);function Kh(t){const e=String(t),n=[];return{toOffset:i,toPoint:r};function r(s){if(typeof s=="number"&&s>-1&&s<=e.length){let a=0;for(;;){let u=n[a];if(u===void 0){const o=ys(e,n[a-1]);u=o===-1?e.length+1:o+1,n[a]=u}if(u>s)return{line:a+1,column:s-(a>0?n[a-1]:0)+1,offset:s};a++}}}function i(s){if(s&&typeof s.line=="number"&&typeof s.column=="number"&&!Number.isNaN(s.line)&&!Number.isNaN(s.column)){for(;n.length<s.line;){const u=n[n.length-1],o=ys(e,u),l=o===-1?e.length+1:o+1;if(u===l)break;n.push(l)}const a=(s.line>1?n[s.line-2]:0)+s.column-1;if(a<n[s.line-1])return a}}}function ys(t,e){const n=t.indexOf("\r",e),r=t.indexOf(`
|
|
71
|
-
`,e);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const bt={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Au={}.hasOwnProperty,Xh=Object.prototype;function Zh(t,e){const n=e||{};return Ei({file:n.file||void 0,location:!1,schema:n.space==="svg"?ht:En,verbose:n.verbose||!1},t)}function Ei(t,e){let n;switch(e.nodeName){case"#comment":{const r=e;return n={type:"comment",value:r.data},Ln(t,r,n),n}case"#document":case"#document-fragment":{const r=e,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:ku(t,e.childNodes),data:{quirksMode:i}},t.file&&t.location){const s=String(t.file),a=Kh(s),u=a.toPoint(0),o=a.toPoint(s.length);n.position={start:u,end:o}}return n}case"#documentType":{const r=e;return n={type:"doctype"},Ln(t,r,n),n}case"#text":{const r=e;return n={type:"text",value:r.value},Ln(t,r,n),n}default:return n=Jh(t,e),n}}function ku(t,e){let n=-1;const r=[];for(;++n<e.length;){const i=Ei(t,e[n]);r.push(i)}return r}function Jh(t,e){const n=t.schema;t.schema=e.namespaceURI===bt.svg?ht:En;let r=-1;const i={};for(;++r<e.attrs.length;){const u=e.attrs[r],o=(u.prefix?u.prefix+":":"")+u.name;Au.call(Xh,o)||(i[o]=u.value)}const a=(t.schema.space==="svg"?Qh:Gh)(e.tagName,i,ku(t,e.childNodes));if(Ln(t,e,a),a.tagName==="template"){const u=e,o=u.sourceCodeLocation,l=o&&o.startTag&&Ot(o.startTag),f=o&&o.endTag&&Ot(o.endTag),d=Ei(t,u.content);l&&f&&t.file&&(d.position={start:l.end,end:f.start}),a.content=d}return t.schema=n,a}function Ln(t,e,n){if("sourceCodeLocation"in e&&e.sourceCodeLocation&&t.file){const r=em(t,n,e.sourceCodeLocation);r&&(t.location=!0,n.position=r)}}function em(t,e,n){const r=Ot(n);if(e.type==="element"){const i=e.children[e.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),t.verbose){const s={};let a;if(n.attrs)for(a in n.attrs)Au.call(n.attrs,a)&&(s[qn(t.schema,a).property]=Ot(n.attrs[a]));n.startTag;const u=Ot(n.startTag),o=n.endTag?Ot(n.endTag):void 0,l={opening:u};o&&(l.closing=o),l.properties=s,e.data={position:l}}}return r}function Ot(t){const e=Is({line:t.startLine,column:t.startCol,offset:t.startOffset}),n=Is({line:t.endLine,column:t.endCol,offset:t.endOffset});return e||n?{start:e,end:n}:void 0}function Is(t){return t.line&&t.column?t:void 0}const ws={}.hasOwnProperty;function Cu(t,e){const n=e||{};function r(i,...s){let a=r.invalid;const u=r.handlers;if(i&&ws.call(i,t)){const o=String(i[t]);a=ws.call(u,o)?u[o]:r.unknown}if(a)return a.call(this,i,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const tm={},nm={}.hasOwnProperty,Nu=Cu("type",{handlers:{root:im,element:lm,text:um,comment:om,doctype:am}});function rm(t,e){const r=(e||tm).space;return Nu(t,r==="svg"?ht:En)}function im(t,e){const n={nodeName:"#document",mode:(t.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=bi(t.children,n,e),Ut(t,n),n}function sm(t,e){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=bi(t.children,n,e),Ut(t,n),n}function am(t){const e={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ut(t,e),e}function um(t){const e={nodeName:"#text",value:t.value,parentNode:null};return Ut(t,e),e}function om(t){const e={nodeName:"#comment",data:t.value,parentNode:null};return Ut(t,e),e}function lm(t,e){const n=e;let r=n;t.type==="element"&&t.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=ht);const i=[];let s;if(t.properties){for(s in t.properties)if(s!=="children"&&nm.call(t.properties,s)){const o=cm(r,s,t.properties[s]);o&&i.push(o)}}const a=r.space,u={nodeName:t.tagName,tagName:t.tagName,attrs:i,namespaceURI:bt[a],childNodes:[],parentNode:null};return u.childNodes=bi(t.children,u,r),Ut(t,u),t.tagName==="template"&&t.content&&(u.content=sm(t.content,r)),u}function cm(t,e,n){const r=qn(t,e);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?Ha(n):Wa(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const s=i.name.indexOf(":");s<0?i.prefix="":(i.name=i.name.slice(s+1),i.prefix=r.attribute.slice(0,s)),i.namespace=bt[r.space]}return i}function bi(t,e,n){let r=-1;const i=[];if(t)for(;++r<t.length;){const s=Nu(t[r],n);s.parentNode=e,i.push(s)}return i}function Ut(t,e){const n=t.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,e.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})}const fm=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],dm=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),_e="�";var E;(function(t){t[t.EOF=-1]="EOF",t[t.NULL=0]="NULL",t[t.TABULATION=9]="TABULATION",t[t.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",t[t.LINE_FEED=10]="LINE_FEED",t[t.FORM_FEED=12]="FORM_FEED",t[t.SPACE=32]="SPACE",t[t.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",t[t.QUOTATION_MARK=34]="QUOTATION_MARK",t[t.AMPERSAND=38]="AMPERSAND",t[t.APOSTROPHE=39]="APOSTROPHE",t[t.HYPHEN_MINUS=45]="HYPHEN_MINUS",t[t.SOLIDUS=47]="SOLIDUS",t[t.DIGIT_0=48]="DIGIT_0",t[t.DIGIT_9=57]="DIGIT_9",t[t.SEMICOLON=59]="SEMICOLON",t[t.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",t[t.EQUALS_SIGN=61]="EQUALS_SIGN",t[t.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",t[t.QUESTION_MARK=63]="QUESTION_MARK",t[t.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",t[t.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",t[t.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",t[t.GRAVE_ACCENT=96]="GRAVE_ACCENT",t[t.LATIN_SMALL_A=97]="LATIN_SMALL_A",t[t.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(E||(E={}));const He={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Su(t){return t>=55296&&t<=57343}function hm(t){return t>=56320&&t<=57343}function mm(t,e){return(t-55296)*1024+9216+e}function yu(t){return t!==32&&t!==10&&t!==13&&t!==9&&t!==12&&t>=1&&t<=31||t>=127&&t<=159}function Iu(t){return t>=64976&&t<=65007||dm.has(t)}var R;(function(t){t.controlCharacterInInputStream="control-character-in-input-stream",t.noncharacterInInputStream="noncharacter-in-input-stream",t.surrogateInInputStream="surrogate-in-input-stream",t.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",t.endTagWithAttributes="end-tag-with-attributes",t.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",t.unexpectedSolidusInTag="unexpected-solidus-in-tag",t.unexpectedNullCharacter="unexpected-null-character",t.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",t.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",t.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",t.missingEndTagName="missing-end-tag-name",t.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",t.unknownNamedCharacterReference="unknown-named-character-reference",t.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",t.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",t.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",t.eofBeforeTagName="eof-before-tag-name",t.eofInTag="eof-in-tag",t.missingAttributeValue="missing-attribute-value",t.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",t.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",t.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",t.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",t.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",t.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",t.missingDoctypePublicIdentifier="missing-doctype-public-identifier",t.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",t.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",t.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",t.cdataInHtmlContent="cdata-in-html-content",t.incorrectlyOpenedComment="incorrectly-opened-comment",t.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",t.eofInDoctype="eof-in-doctype",t.nestedComment="nested-comment",t.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",t.eofInComment="eof-in-comment",t.incorrectlyClosedComment="incorrectly-closed-comment",t.eofInCdata="eof-in-cdata",t.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",t.nullCharacterReference="null-character-reference",t.surrogateCharacterReference="surrogate-character-reference",t.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",t.controlCharacterReference="control-character-reference",t.noncharacterCharacterReference="noncharacter-character-reference",t.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",t.missingDoctypeName="missing-doctype-name",t.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",t.duplicateAttribute="duplicate-attribute",t.nonConformingDoctype="non-conforming-doctype",t.missingDoctype="missing-doctype",t.misplacedDoctype="misplaced-doctype",t.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",t.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",t.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",t.openElementsLeftAfterEof="open-elements-left-after-eof",t.abandonedHeadElementChild="abandoned-head-element-child",t.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",t.nestedNoscriptInHead="nested-noscript-in-head",t.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(R||(R={}));const pm=65536;class gm{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=pm,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,n){const{line:r,col:i,offset:s}=this,a=i+n,u=s+n;return{code:e,startLine:r,endLine:r,startCol:a,endCol:a,startOffset:u,endOffset:u}}_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 n=this.html.charCodeAt(this.pos+1);if(hm(n))return this.pos++,this._addGap(),mm(e,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,E.EOF;return this._err(R.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,n){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,n){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(e,this.pos);for(let r=0;r<e.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==e.charCodeAt(r))return!1;return!0}peek(e){const n=this.pos+e;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,E.EOF;const r=this.html.charCodeAt(n);return r===E.CARRIAGE_RETURN?E.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,E.EOF;let e=this.html.charCodeAt(this.pos);return e===E.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,E.LINE_FEED):e===E.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Su(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===E.LINE_FEED||e===E.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){yu(e)?this._err(R.controlCharacterInInputStream):Iu(e)&&this._err(R.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var ne;(function(t){t[t.CHARACTER=0]="CHARACTER",t[t.NULL_CHARACTER=1]="NULL_CHARACTER",t[t.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",t[t.START_TAG=3]="START_TAG",t[t.END_TAG=4]="END_TAG",t[t.COMMENT=5]="COMMENT",t[t.DOCTYPE=6]="DOCTYPE",t[t.EOF=7]="EOF",t[t.HIBERNATION=8]="HIBERNATION"})(ne||(ne={}));function wu(t,e){for(let n=t.attrs.length-1;n>=0;n--)if(t.attrs[n].name===e)return t.attrs[n].value;return null}const Em=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(t=>t.charCodeAt(0))),bm=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function Tm(t){var e;return t>=55296&&t<=57343||t>1114111?65533:(e=bm.get(t))!==null&&e!==void 0?e:t}var ye;(function(t){t[t.NUM=35]="NUM",t[t.SEMI=59]="SEMI",t[t.EQUALS=61]="EQUALS",t[t.ZERO=48]="ZERO",t[t.NINE=57]="NINE",t[t.LOWER_A=97]="LOWER_A",t[t.LOWER_F=102]="LOWER_F",t[t.LOWER_X=120]="LOWER_X",t[t.LOWER_Z=122]="LOWER_Z",t[t.UPPER_A=65]="UPPER_A",t[t.UPPER_F=70]="UPPER_F",t[t.UPPER_Z=90]="UPPER_Z"})(ye||(ye={}));const xm=32;var dt;(function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"})(dt||(dt={}));function Br(t){return t>=ye.ZERO&&t<=ye.NINE}function _m(t){return t>=ye.UPPER_A&&t<=ye.UPPER_F||t>=ye.LOWER_A&&t<=ye.LOWER_F}function Am(t){return t>=ye.UPPER_A&&t<=ye.UPPER_Z||t>=ye.LOWER_A&&t<=ye.LOWER_Z||Br(t)}function km(t){return t===ye.EQUALS||Am(t)}var Se;(function(t){t[t.EntityStart=0]="EntityStart",t[t.NumericStart=1]="NumericStart",t[t.NumericDecimal=2]="NumericDecimal",t[t.NumericHex=3]="NumericHex",t[t.NamedEntity=4]="NamedEntity"})(Se||(Se={}));var it;(function(t){t[t.Legacy=0]="Legacy",t[t.Strict=1]="Strict",t[t.Attribute=2]="Attribute"})(it||(it={}));class Cm{constructor(e,n,r){this.decodeTree=e,this.emitCodePoint=n,this.errors=r,this.state=Se.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=it.Strict}startEntity(e){this.decodeMode=e,this.state=Se.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,n){switch(this.state){case Se.EntityStart:return e.charCodeAt(n)===ye.NUM?(this.state=Se.NumericStart,this.consumed+=1,this.stateNumericStart(e,n+1)):(this.state=Se.NamedEntity,this.stateNamedEntity(e,n));case Se.NumericStart:return this.stateNumericStart(e,n);case Se.NumericDecimal:return this.stateNumericDecimal(e,n);case Se.NumericHex:return this.stateNumericHex(e,n);case Se.NamedEntity:return this.stateNamedEntity(e,n)}}stateNumericStart(e,n){return n>=e.length?-1:(e.charCodeAt(n)|xm)===ye.LOWER_X?(this.state=Se.NumericHex,this.consumed+=1,this.stateNumericHex(e,n+1)):(this.state=Se.NumericDecimal,this.stateNumericDecimal(e,n))}addToNumericResult(e,n,r,i){if(n!==r){const s=r-n;this.result=this.result*Math.pow(i,s)+Number.parseInt(e.substr(n,s),i),this.consumed+=s}}stateNumericHex(e,n){const r=n;for(;n<e.length;){const i=e.charCodeAt(n);if(Br(i)||_m(i))n+=1;else return this.addToNumericResult(e,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(e,r,n,16),-1}stateNumericDecimal(e,n){const r=n;for(;n<e.length;){const i=e.charCodeAt(n);if(Br(i))n+=1;else return this.addToNumericResult(e,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(e,r,n,10),-1}emitNumericEntity(e,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===ye.SEMI)this.consumed+=1;else if(this.decodeMode===it.Strict)return 0;return this.emitCodePoint(Tm(this.result),this.consumed),this.errors&&(e!==ye.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,n){const{decodeTree:r}=this;let i=r[this.treeIndex],s=(i&dt.VALUE_LENGTH)>>14;for(;n<e.length;n++,this.excess++){const a=e.charCodeAt(n);if(this.treeIndex=Nm(r,i,this.treeIndex+Math.max(1,s),a),this.treeIndex<0)return this.result===0||this.decodeMode===it.Attribute&&(s===0||km(a))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],s=(i&dt.VALUE_LENGTH)>>14,s!==0){if(a===ye.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==it.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:n,decodeTree:r}=this,i=(r[n]&dt.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[e]&~dt.VALUE_LENGTH:i[e+1],r),n===3&&this.emitCodePoint(i[e+2],r),r}end(){var e;switch(this.state){case Se.NamedEntity:return this.result!==0&&(this.decodeMode!==it.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Se.NumericDecimal:return this.emitNumericEntity(0,2);case Se.NumericHex:return this.emitNumericEntity(0,3);case Se.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Se.EntityStart:return 0}}}function Nm(t,e,n,r){const i=(e&dt.BRANCH_LENGTH)>>7,s=e&dt.JUMP_TABLE;if(i===0)return s!==0&&r===s?n:-1;if(s){const o=r-s;return o<0||o>=i?-1:t[n+o]-1}let a=n,u=a+i-1;for(;a<=u;){const o=a+u>>>1,l=t[o];if(l<r)a=o+1;else if(l>r)u=o-1;else return t[o+i]}return-1}var P;(function(t){t.HTML="http://www.w3.org/1999/xhtml",t.MATHML="http://www.w3.org/1998/Math/MathML",t.SVG="http://www.w3.org/2000/svg",t.XLINK="http://www.w3.org/1999/xlink",t.XML="http://www.w3.org/XML/1998/namespace",t.XMLNS="http://www.w3.org/2000/xmlns/"})(P||(P={}));var Tt;(function(t){t.TYPE="type",t.ACTION="action",t.ENCODING="encoding",t.PROMPT="prompt",t.NAME="name",t.COLOR="color",t.FACE="face",t.SIZE="size"})(Tt||(Tt={}));var Ve;(function(t){t.NO_QUIRKS="no-quirks",t.QUIRKS="quirks",t.LIMITED_QUIRKS="limited-quirks"})(Ve||(Ve={}));var w;(function(t){t.A="a",t.ADDRESS="address",t.ANNOTATION_XML="annotation-xml",t.APPLET="applet",t.AREA="area",t.ARTICLE="article",t.ASIDE="aside",t.B="b",t.BASE="base",t.BASEFONT="basefont",t.BGSOUND="bgsound",t.BIG="big",t.BLOCKQUOTE="blockquote",t.BODY="body",t.BR="br",t.BUTTON="button",t.CAPTION="caption",t.CENTER="center",t.CODE="code",t.COL="col",t.COLGROUP="colgroup",t.DD="dd",t.DESC="desc",t.DETAILS="details",t.DIALOG="dialog",t.DIR="dir",t.DIV="div",t.DL="dl",t.DT="dt",t.EM="em",t.EMBED="embed",t.FIELDSET="fieldset",t.FIGCAPTION="figcaption",t.FIGURE="figure",t.FONT="font",t.FOOTER="footer",t.FOREIGN_OBJECT="foreignObject",t.FORM="form",t.FRAME="frame",t.FRAMESET="frameset",t.H1="h1",t.H2="h2",t.H3="h3",t.H4="h4",t.H5="h5",t.H6="h6",t.HEAD="head",t.HEADER="header",t.HGROUP="hgroup",t.HR="hr",t.HTML="html",t.I="i",t.IMG="img",t.IMAGE="image",t.INPUT="input",t.IFRAME="iframe",t.KEYGEN="keygen",t.LABEL="label",t.LI="li",t.LINK="link",t.LISTING="listing",t.MAIN="main",t.MALIGNMARK="malignmark",t.MARQUEE="marquee",t.MATH="math",t.MENU="menu",t.META="meta",t.MGLYPH="mglyph",t.MI="mi",t.MO="mo",t.MN="mn",t.MS="ms",t.MTEXT="mtext",t.NAV="nav",t.NOBR="nobr",t.NOFRAMES="noframes",t.NOEMBED="noembed",t.NOSCRIPT="noscript",t.OBJECT="object",t.OL="ol",t.OPTGROUP="optgroup",t.OPTION="option",t.P="p",t.PARAM="param",t.PLAINTEXT="plaintext",t.PRE="pre",t.RB="rb",t.RP="rp",t.RT="rt",t.RTC="rtc",t.RUBY="ruby",t.S="s",t.SCRIPT="script",t.SEARCH="search",t.SECTION="section",t.SELECT="select",t.SOURCE="source",t.SMALL="small",t.SPAN="span",t.STRIKE="strike",t.STRONG="strong",t.STYLE="style",t.SUB="sub",t.SUMMARY="summary",t.SUP="sup",t.TABLE="table",t.TBODY="tbody",t.TEMPLATE="template",t.TEXTAREA="textarea",t.TFOOT="tfoot",t.TD="td",t.TH="th",t.THEAD="thead",t.TITLE="title",t.TR="tr",t.TRACK="track",t.TT="tt",t.U="u",t.UL="ul",t.SVG="svg",t.VAR="var",t.WBR="wbr",t.XMP="xmp"})(w||(w={}));var c;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.A=1]="A",t[t.ADDRESS=2]="ADDRESS",t[t.ANNOTATION_XML=3]="ANNOTATION_XML",t[t.APPLET=4]="APPLET",t[t.AREA=5]="AREA",t[t.ARTICLE=6]="ARTICLE",t[t.ASIDE=7]="ASIDE",t[t.B=8]="B",t[t.BASE=9]="BASE",t[t.BASEFONT=10]="BASEFONT",t[t.BGSOUND=11]="BGSOUND",t[t.BIG=12]="BIG",t[t.BLOCKQUOTE=13]="BLOCKQUOTE",t[t.BODY=14]="BODY",t[t.BR=15]="BR",t[t.BUTTON=16]="BUTTON",t[t.CAPTION=17]="CAPTION",t[t.CENTER=18]="CENTER",t[t.CODE=19]="CODE",t[t.COL=20]="COL",t[t.COLGROUP=21]="COLGROUP",t[t.DD=22]="DD",t[t.DESC=23]="DESC",t[t.DETAILS=24]="DETAILS",t[t.DIALOG=25]="DIALOG",t[t.DIR=26]="DIR",t[t.DIV=27]="DIV",t[t.DL=28]="DL",t[t.DT=29]="DT",t[t.EM=30]="EM",t[t.EMBED=31]="EMBED",t[t.FIELDSET=32]="FIELDSET",t[t.FIGCAPTION=33]="FIGCAPTION",t[t.FIGURE=34]="FIGURE",t[t.FONT=35]="FONT",t[t.FOOTER=36]="FOOTER",t[t.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",t[t.FORM=38]="FORM",t[t.FRAME=39]="FRAME",t[t.FRAMESET=40]="FRAMESET",t[t.H1=41]="H1",t[t.H2=42]="H2",t[t.H3=43]="H3",t[t.H4=44]="H4",t[t.H5=45]="H5",t[t.H6=46]="H6",t[t.HEAD=47]="HEAD",t[t.HEADER=48]="HEADER",t[t.HGROUP=49]="HGROUP",t[t.HR=50]="HR",t[t.HTML=51]="HTML",t[t.I=52]="I",t[t.IMG=53]="IMG",t[t.IMAGE=54]="IMAGE",t[t.INPUT=55]="INPUT",t[t.IFRAME=56]="IFRAME",t[t.KEYGEN=57]="KEYGEN",t[t.LABEL=58]="LABEL",t[t.LI=59]="LI",t[t.LINK=60]="LINK",t[t.LISTING=61]="LISTING",t[t.MAIN=62]="MAIN",t[t.MALIGNMARK=63]="MALIGNMARK",t[t.MARQUEE=64]="MARQUEE",t[t.MATH=65]="MATH",t[t.MENU=66]="MENU",t[t.META=67]="META",t[t.MGLYPH=68]="MGLYPH",t[t.MI=69]="MI",t[t.MO=70]="MO",t[t.MN=71]="MN",t[t.MS=72]="MS",t[t.MTEXT=73]="MTEXT",t[t.NAV=74]="NAV",t[t.NOBR=75]="NOBR",t[t.NOFRAMES=76]="NOFRAMES",t[t.NOEMBED=77]="NOEMBED",t[t.NOSCRIPT=78]="NOSCRIPT",t[t.OBJECT=79]="OBJECT",t[t.OL=80]="OL",t[t.OPTGROUP=81]="OPTGROUP",t[t.OPTION=82]="OPTION",t[t.P=83]="P",t[t.PARAM=84]="PARAM",t[t.PLAINTEXT=85]="PLAINTEXT",t[t.PRE=86]="PRE",t[t.RB=87]="RB",t[t.RP=88]="RP",t[t.RT=89]="RT",t[t.RTC=90]="RTC",t[t.RUBY=91]="RUBY",t[t.S=92]="S",t[t.SCRIPT=93]="SCRIPT",t[t.SEARCH=94]="SEARCH",t[t.SECTION=95]="SECTION",t[t.SELECT=96]="SELECT",t[t.SOURCE=97]="SOURCE",t[t.SMALL=98]="SMALL",t[t.SPAN=99]="SPAN",t[t.STRIKE=100]="STRIKE",t[t.STRONG=101]="STRONG",t[t.STYLE=102]="STYLE",t[t.SUB=103]="SUB",t[t.SUMMARY=104]="SUMMARY",t[t.SUP=105]="SUP",t[t.TABLE=106]="TABLE",t[t.TBODY=107]="TBODY",t[t.TEMPLATE=108]="TEMPLATE",t[t.TEXTAREA=109]="TEXTAREA",t[t.TFOOT=110]="TFOOT",t[t.TD=111]="TD",t[t.TH=112]="TH",t[t.THEAD=113]="THEAD",t[t.TITLE=114]="TITLE",t[t.TR=115]="TR",t[t.TRACK=116]="TRACK",t[t.TT=117]="TT",t[t.U=118]="U",t[t.UL=119]="UL",t[t.SVG=120]="SVG",t[t.VAR=121]="VAR",t[t.WBR=122]="WBR",t[t.XMP=123]="XMP"})(c||(c={}));const Sm=new Map([[w.A,c.A],[w.ADDRESS,c.ADDRESS],[w.ANNOTATION_XML,c.ANNOTATION_XML],[w.APPLET,c.APPLET],[w.AREA,c.AREA],[w.ARTICLE,c.ARTICLE],[w.ASIDE,c.ASIDE],[w.B,c.B],[w.BASE,c.BASE],[w.BASEFONT,c.BASEFONT],[w.BGSOUND,c.BGSOUND],[w.BIG,c.BIG],[w.BLOCKQUOTE,c.BLOCKQUOTE],[w.BODY,c.BODY],[w.BR,c.BR],[w.BUTTON,c.BUTTON],[w.CAPTION,c.CAPTION],[w.CENTER,c.CENTER],[w.CODE,c.CODE],[w.COL,c.COL],[w.COLGROUP,c.COLGROUP],[w.DD,c.DD],[w.DESC,c.DESC],[w.DETAILS,c.DETAILS],[w.DIALOG,c.DIALOG],[w.DIR,c.DIR],[w.DIV,c.DIV],[w.DL,c.DL],[w.DT,c.DT],[w.EM,c.EM],[w.EMBED,c.EMBED],[w.FIELDSET,c.FIELDSET],[w.FIGCAPTION,c.FIGCAPTION],[w.FIGURE,c.FIGURE],[w.FONT,c.FONT],[w.FOOTER,c.FOOTER],[w.FOREIGN_OBJECT,c.FOREIGN_OBJECT],[w.FORM,c.FORM],[w.FRAME,c.FRAME],[w.FRAMESET,c.FRAMESET],[w.H1,c.H1],[w.H2,c.H2],[w.H3,c.H3],[w.H4,c.H4],[w.H5,c.H5],[w.H6,c.H6],[w.HEAD,c.HEAD],[w.HEADER,c.HEADER],[w.HGROUP,c.HGROUP],[w.HR,c.HR],[w.HTML,c.HTML],[w.I,c.I],[w.IMG,c.IMG],[w.IMAGE,c.IMAGE],[w.INPUT,c.INPUT],[w.IFRAME,c.IFRAME],[w.KEYGEN,c.KEYGEN],[w.LABEL,c.LABEL],[w.LI,c.LI],[w.LINK,c.LINK],[w.LISTING,c.LISTING],[w.MAIN,c.MAIN],[w.MALIGNMARK,c.MALIGNMARK],[w.MARQUEE,c.MARQUEE],[w.MATH,c.MATH],[w.MENU,c.MENU],[w.META,c.META],[w.MGLYPH,c.MGLYPH],[w.MI,c.MI],[w.MO,c.MO],[w.MN,c.MN],[w.MS,c.MS],[w.MTEXT,c.MTEXT],[w.NAV,c.NAV],[w.NOBR,c.NOBR],[w.NOFRAMES,c.NOFRAMES],[w.NOEMBED,c.NOEMBED],[w.NOSCRIPT,c.NOSCRIPT],[w.OBJECT,c.OBJECT],[w.OL,c.OL],[w.OPTGROUP,c.OPTGROUP],[w.OPTION,c.OPTION],[w.P,c.P],[w.PARAM,c.PARAM],[w.PLAINTEXT,c.PLAINTEXT],[w.PRE,c.PRE],[w.RB,c.RB],[w.RP,c.RP],[w.RT,c.RT],[w.RTC,c.RTC],[w.RUBY,c.RUBY],[w.S,c.S],[w.SCRIPT,c.SCRIPT],[w.SEARCH,c.SEARCH],[w.SECTION,c.SECTION],[w.SELECT,c.SELECT],[w.SOURCE,c.SOURCE],[w.SMALL,c.SMALL],[w.SPAN,c.SPAN],[w.STRIKE,c.STRIKE],[w.STRONG,c.STRONG],[w.STYLE,c.STYLE],[w.SUB,c.SUB],[w.SUMMARY,c.SUMMARY],[w.SUP,c.SUP],[w.TABLE,c.TABLE],[w.TBODY,c.TBODY],[w.TEMPLATE,c.TEMPLATE],[w.TEXTAREA,c.TEXTAREA],[w.TFOOT,c.TFOOT],[w.TD,c.TD],[w.TH,c.TH],[w.THEAD,c.THEAD],[w.TITLE,c.TITLE],[w.TR,c.TR],[w.TRACK,c.TRACK],[w.TT,c.TT],[w.U,c.U],[w.UL,c.UL],[w.SVG,c.SVG],[w.VAR,c.VAR],[w.WBR,c.WBR],[w.XMP,c.XMP]]);function jt(t){var e;return(e=Sm.get(t))!==null&&e!==void 0?e:c.UNKNOWN}const v=c,ym={[P.HTML]:new Set([v.ADDRESS,v.APPLET,v.AREA,v.ARTICLE,v.ASIDE,v.BASE,v.BASEFONT,v.BGSOUND,v.BLOCKQUOTE,v.BODY,v.BR,v.BUTTON,v.CAPTION,v.CENTER,v.COL,v.COLGROUP,v.DD,v.DETAILS,v.DIR,v.DIV,v.DL,v.DT,v.EMBED,v.FIELDSET,v.FIGCAPTION,v.FIGURE,v.FOOTER,v.FORM,v.FRAME,v.FRAMESET,v.H1,v.H2,v.H3,v.H4,v.H5,v.H6,v.HEAD,v.HEADER,v.HGROUP,v.HR,v.HTML,v.IFRAME,v.IMG,v.INPUT,v.LI,v.LINK,v.LISTING,v.MAIN,v.MARQUEE,v.MENU,v.META,v.NAV,v.NOEMBED,v.NOFRAMES,v.NOSCRIPT,v.OBJECT,v.OL,v.P,v.PARAM,v.PLAINTEXT,v.PRE,v.SCRIPT,v.SECTION,v.SELECT,v.SOURCE,v.STYLE,v.SUMMARY,v.TABLE,v.TBODY,v.TD,v.TEMPLATE,v.TEXTAREA,v.TFOOT,v.TH,v.THEAD,v.TITLE,v.TR,v.TRACK,v.UL,v.WBR,v.XMP]),[P.MATHML]:new Set([v.MI,v.MO,v.MN,v.MS,v.MTEXT,v.ANNOTATION_XML]),[P.SVG]:new Set([v.TITLE,v.FOREIGN_OBJECT,v.DESC]),[P.XLINK]:new Set,[P.XML]:new Set,[P.XMLNS]:new Set},Fr=new Set([v.H1,v.H2,v.H3,v.H4,v.H5,v.H6]);w.STYLE,w.SCRIPT,w.XMP,w.IFRAME,w.NOEMBED,w.NOFRAMES,w.PLAINTEXT;var b;(function(t){t[t.DATA=0]="DATA",t[t.RCDATA=1]="RCDATA",t[t.RAWTEXT=2]="RAWTEXT",t[t.SCRIPT_DATA=3]="SCRIPT_DATA",t[t.PLAINTEXT=4]="PLAINTEXT",t[t.TAG_OPEN=5]="TAG_OPEN",t[t.END_TAG_OPEN=6]="END_TAG_OPEN",t[t.TAG_NAME=7]="TAG_NAME",t[t.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",t[t.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",t[t.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",t[t.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",t[t.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",t[t.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",t[t.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",t[t.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",t[t.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",t[t.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",t[t.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",t[t.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",t[t.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",t[t.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",t[t.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",t[t.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",t[t.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",t[t.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",t[t.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",t[t.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",t[t.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",t[t.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",t[t.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",t[t.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",t[t.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",t[t.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",t[t.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",t[t.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",t[t.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",t[t.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",t[t.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",t[t.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",t[t.BOGUS_COMMENT=40]="BOGUS_COMMENT",t[t.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",t[t.COMMENT_START=42]="COMMENT_START",t[t.COMMENT_START_DASH=43]="COMMENT_START_DASH",t[t.COMMENT=44]="COMMENT",t[t.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",t[t.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",t[t.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",t[t.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",t[t.COMMENT_END_DASH=49]="COMMENT_END_DASH",t[t.COMMENT_END=50]="COMMENT_END",t[t.COMMENT_END_BANG=51]="COMMENT_END_BANG",t[t.DOCTYPE=52]="DOCTYPE",t[t.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",t[t.DOCTYPE_NAME=54]="DOCTYPE_NAME",t[t.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",t[t.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",t[t.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",t[t.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",t[t.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",t[t.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",t[t.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",t[t.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",t[t.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",t[t.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",t[t.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",t[t.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",t[t.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",t[t.CDATA_SECTION=68]="CDATA_SECTION",t[t.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",t[t.CDATA_SECTION_END=70]="CDATA_SECTION_END",t[t.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",t[t.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(b||(b={}));const Ce={DATA:b.DATA,RCDATA:b.RCDATA,RAWTEXT:b.RAWTEXT,SCRIPT_DATA:b.SCRIPT_DATA,PLAINTEXT:b.PLAINTEXT,CDATA_SECTION:b.CDATA_SECTION};function Im(t){return t>=E.DIGIT_0&&t<=E.DIGIT_9}function Jt(t){return t>=E.LATIN_CAPITAL_A&&t<=E.LATIN_CAPITAL_Z}function wm(t){return t>=E.LATIN_SMALL_A&&t<=E.LATIN_SMALL_Z}function ct(t){return wm(t)||Jt(t)}function Ls(t){return ct(t)||Im(t)}function Sn(t){return t+32}function Lu(t){return t===E.SPACE||t===E.LINE_FEED||t===E.TABULATION||t===E.FORM_FEED}function Rs(t){return Lu(t)||t===E.SOLIDUS||t===E.GREATER_THAN_SIGN}function Lm(t){return t===E.NULL?R.nullCharacterReference:t>1114111?R.characterReferenceOutsideUnicodeRange:Su(t)?R.surrogateCharacterReference:Iu(t)?R.noncharacterCharacterReference:yu(t)||t===E.CARRIAGE_RETURN?R.controlCharacterReference:null}class Rm{constructor(e,n){this.options=e,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=b.DATA,this.returnState=b.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new gm(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Cm(Em,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(R.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(R.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=Lm(r);i&&this._err(i,1)}}:void 0)}_err(e,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.call(r,this.preprocessor.getError(e,n))}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,n,r){this.active=!0,this.preprocessor.write(e,n),this._runParsingLoop(),this.paused||r?.()}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 n=0;n<e;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,n){return this.preprocessor.startsWith(e,n)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:ne.START_TAG,tagName:"",tagID:c.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:ne.END_TAG,tagName:"",tagID:c.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:ne.COMMENT,data:"",location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:ne.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,n){this.currentCharacterToken={type:e,chars:n,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e,n;const r=this.currentToken;if(wu(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(e=(n=r.location).attrs)!==null&&e!==void 0?e:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(R.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=jt(e.tagName),e.type===ne.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(R.endTagWithAttributes),e.selfClosing&&this._err(R.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 ne.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case ne.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case ne.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}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:ne.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,n)}_emitCodePoint(e){const n=Lu(e)?ne.WHITESPACE_CHARACTER:e===E.NULL?ne.NULL_CHARACTER:ne.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(ne.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=b.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?it.Attribute:it.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===b.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===b.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===b.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case b.DATA:{this._stateData(e);break}case b.RCDATA:{this._stateRcdata(e);break}case b.RAWTEXT:{this._stateRawtext(e);break}case b.SCRIPT_DATA:{this._stateScriptData(e);break}case b.PLAINTEXT:{this._statePlaintext(e);break}case b.TAG_OPEN:{this._stateTagOpen(e);break}case b.END_TAG_OPEN:{this._stateEndTagOpen(e);break}case b.TAG_NAME:{this._stateTagName(e);break}case b.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(e);break}case b.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(e);break}case b.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(e);break}case b.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(e);break}case b.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(e);break}case b.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(e);break}case b.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(e);break}case b.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(e);break}case b.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(e);break}case b.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(e);break}case b.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(e);break}case b.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(e);break}case b.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(e);break}case b.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(e);break}case b.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(e);break}case b.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(e);break}case b.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(e);break}case b.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(e);break}case b.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(e);break}case b.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(e);break}case b.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(e);break}case b.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(e);break}case b.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(e);break}case b.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(e);break}case b.ATTRIBUTE_NAME:{this._stateAttributeName(e);break}case b.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(e);break}case b.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(e);break}case b.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(e);break}case b.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(e);break}case b.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(e);break}case b.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(e);break}case b.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(e);break}case b.BOGUS_COMMENT:{this._stateBogusComment(e);break}case b.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(e);break}case b.COMMENT_START:{this._stateCommentStart(e);break}case b.COMMENT_START_DASH:{this._stateCommentStartDash(e);break}case b.COMMENT:{this._stateComment(e);break}case b.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(e);break}case b.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(e);break}case b.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(e);break}case b.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(e);break}case b.COMMENT_END_DASH:{this._stateCommentEndDash(e);break}case b.COMMENT_END:{this._stateCommentEnd(e);break}case b.COMMENT_END_BANG:{this._stateCommentEndBang(e);break}case b.DOCTYPE:{this._stateDoctype(e);break}case b.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(e);break}case b.DOCTYPE_NAME:{this._stateDoctypeName(e);break}case b.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(e);break}case b.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(e);break}case b.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(e);break}case b.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(e);break}case b.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(e);break}case b.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(e);break}case b.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break}case b.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(e);break}case b.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(e);break}case b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(e);break}case b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(e);break}case b.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(e);break}case b.BOGUS_DOCTYPE:{this._stateBogusDoctype(e);break}case b.CDATA_SECTION:{this._stateCdataSection(e);break}case b.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(e);break}case b.CDATA_SECTION_END:{this._stateCdataSectionEnd(e);break}case b.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case b.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(e);break}default:throw new Error("Unknown state")}}_stateData(e){switch(e){case E.LESS_THAN_SIGN:{this.state=b.TAG_OPEN;break}case E.AMPERSAND:{this._startCharacterReference();break}case E.NULL:{this._err(R.unexpectedNullCharacter),this._emitCodePoint(e);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case E.AMPERSAND:{this._startCharacterReference();break}case E.LESS_THAN_SIGN:{this.state=b.RCDATA_LESS_THAN_SIGN;break}case E.NULL:{this._err(R.unexpectedNullCharacter),this._emitChars(_e);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case E.LESS_THAN_SIGN:{this.state=b.RAWTEXT_LESS_THAN_SIGN;break}case E.NULL:{this._err(R.unexpectedNullCharacter),this._emitChars(_e);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case E.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_LESS_THAN_SIGN;break}case E.NULL:{this._err(R.unexpectedNullCharacter),this._emitChars(_e);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case E.NULL:{this._err(R.unexpectedNullCharacter),this._emitChars(_e);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateTagOpen(e){if(ct(e))this._createStartTagToken(),this.state=b.TAG_NAME,this._stateTagName(e);else switch(e){case E.EXCLAMATION_MARK:{this.state=b.MARKUP_DECLARATION_OPEN;break}case E.SOLIDUS:{this.state=b.END_TAG_OPEN;break}case E.QUESTION_MARK:{this._err(R.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=b.BOGUS_COMMENT,this._stateBogusComment(e);break}case E.EOF:{this._err(R.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(R.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=b.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(ct(e))this._createEndTagToken(),this.state=b.TAG_NAME,this._stateTagName(e);else switch(e){case E.GREATER_THAN_SIGN:{this._err(R.missingEndTagName),this.state=b.DATA;break}case E.EOF:{this._err(R.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(R.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=b.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){const n=this.currentToken;switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=b.BEFORE_ATTRIBUTE_NAME;break}case E.SOLIDUS:{this.state=b.SELF_CLOSING_START_TAG;break}case E.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentTagToken();break}case E.NULL:{this._err(R.unexpectedNullCharacter),n.tagName+=_e;break}case E.EOF:{this._err(R.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Jt(e)?Sn(e):e)}}_stateRcdataLessThanSign(e){e===E.SOLIDUS?this.state=b.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=b.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){ct(e)?(this.state=b.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars("</"),this.state=b.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=b.BEFORE_ATTRIBUTE_NAME,!1;case E.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=b.SELF_CLOSING_START_TAG,!1;case E.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=b.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=b.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===E.SOLIDUS?this.state=b.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=b.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){ct(e)?(this.state=b.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars("</"),this.state=b.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=b.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case E.SOLIDUS:{this.state=b.SCRIPT_DATA_END_TAG_OPEN;break}case E.EXCLAMATION_MARK:{this.state=b.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=b.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){ct(e)?(this.state=b.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars("</"),this.state=b.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=b.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===E.HYPHEN_MINUS?(this.state=b.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=b.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===E.HYPHEN_MINUS?(this.state=b.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=b.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case E.HYPHEN_MINUS:{this.state=b.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case E.NULL:{this._err(R.unexpectedNullCharacter),this._emitChars(_e);break}case E.EOF:{this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case E.HYPHEN_MINUS:{this.state=b.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case E.NULL:{this._err(R.unexpectedNullCharacter),this.state=b.SCRIPT_DATA_ESCAPED,this._emitChars(_e);break}case E.EOF:{this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=b.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case E.HYPHEN_MINUS:{this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case E.GREATER_THAN_SIGN:{this.state=b.SCRIPT_DATA,this._emitChars(">");break}case E.NULL:{this._err(R.unexpectedNullCharacter),this.state=b.SCRIPT_DATA_ESCAPED,this._emitChars(_e);break}case E.EOF:{this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=b.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===E.SOLIDUS?this.state=b.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:ct(e)?(this._emitChars("<"),this.state=b.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=b.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){ct(e)?(this.state=b.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("</"),this.state=b.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=b.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(He.SCRIPT,!1)&&Rs(this.preprocessor.peek(He.SCRIPT.length))){this._emitCodePoint(e);for(let n=0;n<He.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=b.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case E.HYPHEN_MINUS:{this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case E.NULL:{this._err(R.unexpectedNullCharacter),this._emitChars(_e);break}case E.EOF:{this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case E.HYPHEN_MINUS:{this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case E.NULL:{this._err(R.unexpectedNullCharacter),this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(_e);break}case E.EOF:{this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case E.HYPHEN_MINUS:{this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case E.GREATER_THAN_SIGN:{this.state=b.SCRIPT_DATA,this._emitChars(">");break}case E.NULL:{this._err(R.unexpectedNullCharacter),this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(_e);break}case E.EOF:{this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===E.SOLIDUS?(this.state=b.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(He.SCRIPT,!1)&&Rs(this.preprocessor.peek(He.SCRIPT.length))){this._emitCodePoint(e);for(let n=0;n<He.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=b.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.SOLIDUS:case E.GREATER_THAN_SIGN:case E.EOF:{this.state=b.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break}case E.EQUALS_SIGN:{this._err(R.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=b.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=b.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:case E.SOLIDUS:case E.GREATER_THAN_SIGN:case E.EOF:{this._leaveAttrName(),this.state=b.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break}case E.EQUALS_SIGN:{this._leaveAttrName(),this.state=b.BEFORE_ATTRIBUTE_VALUE;break}case E.QUOTATION_MARK:case E.APOSTROPHE:case E.LESS_THAN_SIGN:{this._err(R.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break}case E.NULL:{this._err(R.unexpectedNullCharacter),this.currentAttr.name+=_e;break}default:this.currentAttr.name+=String.fromCodePoint(Jt(e)?Sn(e):e)}}_stateAfterAttributeName(e){switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.SOLIDUS:{this.state=b.SELF_CLOSING_START_TAG;break}case E.EQUALS_SIGN:{this.state=b.BEFORE_ATTRIBUTE_VALUE;break}case E.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentTagToken();break}case E.EOF:{this._err(R.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=b.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.QUOTATION_MARK:{this.state=b.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case E.APOSTROPHE:{this.state=b.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case E.GREATER_THAN_SIGN:{this._err(R.missingAttributeValue),this.state=b.DATA,this.emitCurrentTagToken();break}default:this.state=b.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case E.QUOTATION_MARK:{this.state=b.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case E.AMPERSAND:{this._startCharacterReference();break}case E.NULL:{this._err(R.unexpectedNullCharacter),this.currentAttr.value+=_e;break}case E.EOF:{this._err(R.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case E.APOSTROPHE:{this.state=b.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case E.AMPERSAND:{this._startCharacterReference();break}case E.NULL:{this._err(R.unexpectedNullCharacter),this.currentAttr.value+=_e;break}case E.EOF:{this._err(R.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this._leaveAttrValue(),this.state=b.BEFORE_ATTRIBUTE_NAME;break}case E.AMPERSAND:{this._startCharacterReference();break}case E.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=b.DATA,this.emitCurrentTagToken();break}case E.NULL:{this._err(R.unexpectedNullCharacter),this.currentAttr.value+=_e;break}case E.QUOTATION_MARK:case E.APOSTROPHE:case E.LESS_THAN_SIGN:case E.EQUALS_SIGN:case E.GRAVE_ACCENT:{this._err(R.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break}case E.EOF:{this._err(R.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this._leaveAttrValue(),this.state=b.BEFORE_ATTRIBUTE_NAME;break}case E.SOLIDUS:{this._leaveAttrValue(),this.state=b.SELF_CLOSING_START_TAG;break}case E.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=b.DATA,this.emitCurrentTagToken();break}case E.EOF:{this._err(R.eofInTag),this._emitEOFToken();break}default:this._err(R.missingWhitespaceBetweenAttributes),this.state=b.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case E.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=b.DATA,this.emitCurrentTagToken();break}case E.EOF:{this._err(R.eofInTag),this._emitEOFToken();break}default:this._err(R.unexpectedSolidusInTag),this.state=b.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){const n=this.currentToken;switch(e){case E.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentComment(n);break}case E.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case E.NULL:{this._err(R.unexpectedNullCharacter),n.data+=_e;break}default:n.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(He.DASH_DASH,!0)?(this._createCommentToken(He.DASH_DASH.length+1),this.state=b.COMMENT_START):this._consumeSequenceIfMatch(He.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(He.DOCTYPE.length+1),this.state=b.DOCTYPE):this._consumeSequenceIfMatch(He.CDATA_START,!0)?this.inForeignNode?this.state=b.CDATA_SECTION:(this._err(R.cdataInHtmlContent),this._createCommentToken(He.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=b.BOGUS_COMMENT):this._ensureHibernation()||(this._err(R.incorrectlyOpenedComment),this._createCommentToken(2),this.state=b.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case E.HYPHEN_MINUS:{this.state=b.COMMENT_START_DASH;break}case E.GREATER_THAN_SIGN:{this._err(R.abruptClosingOfEmptyComment),this.state=b.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=b.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){const n=this.currentToken;switch(e){case E.HYPHEN_MINUS:{this.state=b.COMMENT_END;break}case E.GREATER_THAN_SIGN:{this._err(R.abruptClosingOfEmptyComment),this.state=b.DATA,this.emitCurrentComment(n);break}case E.EOF:{this._err(R.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=b.COMMENT,this._stateComment(e)}}_stateComment(e){const n=this.currentToken;switch(e){case E.HYPHEN_MINUS:{this.state=b.COMMENT_END_DASH;break}case E.LESS_THAN_SIGN:{n.data+="<",this.state=b.COMMENT_LESS_THAN_SIGN;break}case E.NULL:{this._err(R.unexpectedNullCharacter),n.data+=_e;break}case E.EOF:{this._err(R.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){const n=this.currentToken;switch(e){case E.EXCLAMATION_MARK:{n.data+="!",this.state=b.COMMENT_LESS_THAN_SIGN_BANG;break}case E.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=b.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===E.HYPHEN_MINUS?this.state=b.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=b.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===E.HYPHEN_MINUS?this.state=b.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=b.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==E.GREATER_THAN_SIGN&&e!==E.EOF&&this._err(R.nestedComment),this.state=b.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){const n=this.currentToken;switch(e){case E.HYPHEN_MINUS:{this.state=b.COMMENT_END;break}case E.EOF:{this._err(R.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=b.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){const n=this.currentToken;switch(e){case E.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentComment(n);break}case E.EXCLAMATION_MARK:{this.state=b.COMMENT_END_BANG;break}case E.HYPHEN_MINUS:{n.data+="-";break}case E.EOF:{this._err(R.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=b.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){const n=this.currentToken;switch(e){case E.HYPHEN_MINUS:{n.data+="--!",this.state=b.COMMENT_END_DASH;break}case E.GREATER_THAN_SIGN:{this._err(R.incorrectlyClosedComment),this.state=b.DATA,this.emitCurrentComment(n);break}case E.EOF:{this._err(R.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=b.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=b.BEFORE_DOCTYPE_NAME;break}case E.GREATER_THAN_SIGN:{this.state=b.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break}case E.EOF:{this._err(R.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(R.missingWhitespaceBeforeDoctypeName),this.state=b.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(Jt(e))this._createDoctypeToken(String.fromCharCode(Sn(e))),this.state=b.DOCTYPE_NAME;else switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.NULL:{this._err(R.unexpectedNullCharacter),this._createDoctypeToken(_e),this.state=b.DOCTYPE_NAME;break}case E.GREATER_THAN_SIGN:{this._err(R.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=b.DATA;break}case E.EOF:{this._err(R.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=b.DOCTYPE_NAME}}_stateDoctypeName(e){const n=this.currentToken;switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=b.AFTER_DOCTYPE_NAME;break}case E.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentDoctype(n);break}case E.NULL:{this._err(R.unexpectedNullCharacter),n.name+=_e;break}case E.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Jt(e)?Sn(e):e)}}_stateAfterDoctypeName(e){const n=this.currentToken;switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentDoctype(n);break}case E.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(He.PUBLIC,!1)?this.state=b.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(He.SYSTEM,!1)?this.state=b.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(R.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){const n=this.currentToken;switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=b.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case E.QUOTATION_MARK:{this._err(R.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=b.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{this._err(R.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=b.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case E.GREATER_THAN_SIGN:{this._err(R.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=b.DATA,this.emitCurrentDoctype(n);break}case E.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(R.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){const n=this.currentToken;switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.QUOTATION_MARK:{n.publicId="",this.state=b.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{n.publicId="",this.state=b.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case E.GREATER_THAN_SIGN:{this._err(R.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=b.DATA,this.emitCurrentDoctype(n);break}case E.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(R.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){const n=this.currentToken;switch(e){case E.QUOTATION_MARK:{this.state=b.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case E.NULL:{this._err(R.unexpectedNullCharacter),n.publicId+=_e;break}case E.GREATER_THAN_SIGN:{this._err(R.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=b.DATA;break}case E.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){const n=this.currentToken;switch(e){case E.APOSTROPHE:{this.state=b.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case E.NULL:{this._err(R.unexpectedNullCharacter),n.publicId+=_e;break}case E.GREATER_THAN_SIGN:{this._err(R.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=b.DATA;break}case E.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){const n=this.currentToken;switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=b.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case E.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentDoctype(n);break}case E.QUOTATION_MARK:{this._err(R.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{this._err(R.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case E.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(R.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){const n=this.currentToken;switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=b.DATA;break}case E.QUOTATION_MARK:{n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case E.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(R.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){const n=this.currentToken;switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=b.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case E.QUOTATION_MARK:{this._err(R.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{this._err(R.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case E.GREATER_THAN_SIGN:{this._err(R.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.DATA,this.emitCurrentDoctype(n);break}case E.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(R.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){const n=this.currentToken;switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.QUOTATION_MARK:{n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case E.GREATER_THAN_SIGN:{this._err(R.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.DATA,this.emitCurrentDoctype(n);break}case E.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(R.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){const n=this.currentToken;switch(e){case E.QUOTATION_MARK:{this.state=b.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case E.NULL:{this._err(R.unexpectedNullCharacter),n.systemId+=_e;break}case E.GREATER_THAN_SIGN:{this._err(R.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=b.DATA;break}case E.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){const n=this.currentToken;switch(e){case E.APOSTROPHE:{this.state=b.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case E.NULL:{this._err(R.unexpectedNullCharacter),n.systemId+=_e;break}case E.GREATER_THAN_SIGN:{this._err(R.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=b.DATA;break}case E.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){const n=this.currentToken;switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=b.DATA;break}case E.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(R.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){const n=this.currentToken;switch(e){case E.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=b.DATA;break}case E.NULL:{this._err(R.unexpectedNullCharacter);break}case E.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(e){switch(e){case E.RIGHT_SQUARE_BRACKET:{this.state=b.CDATA_SECTION_BRACKET;break}case E.EOF:{this._err(R.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===E.RIGHT_SQUARE_BRACKET?this.state=b.CDATA_SECTION_END:(this._emitChars("]"),this.state=b.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case E.GREATER_THAN_SIGN:{this.state=b.DATA;break}case E.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=b.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(E.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Ls(this.preprocessor.peek(1))?b.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){Ls(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===E.SEMICOLON&&this._err(R.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}}const Ru=new Set([c.DD,c.DT,c.LI,c.OPTGROUP,c.OPTION,c.P,c.RB,c.RP,c.RT,c.RTC]),Os=new Set([...Ru,c.CAPTION,c.COLGROUP,c.TBODY,c.TD,c.TFOOT,c.TH,c.THEAD,c.TR]),Bn=new Set([c.APPLET,c.CAPTION,c.HTML,c.MARQUEE,c.OBJECT,c.TABLE,c.TD,c.TEMPLATE,c.TH]),Om=new Set([...Bn,c.OL,c.UL]),Dm=new Set([...Bn,c.BUTTON]),Ds=new Set([c.ANNOTATION_XML,c.MI,c.MN,c.MO,c.MS,c.MTEXT]),Ps=new Set([c.DESC,c.FOREIGN_OBJECT,c.TITLE]),Pm=new Set([c.TR,c.TEMPLATE,c.HTML]),Mm=new Set([c.TBODY,c.TFOOT,c.THEAD,c.TEMPLATE,c.HTML]),vm=new Set([c.TABLE,c.TEMPLATE,c.HTML]),Bm=new Set([c.TD,c.TH]);class Fm{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,n,r){this.treeAdapter=n,this.handler=r,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)===P.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,n){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,n,!0)}pop(){const e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,n){const r=this._indexOf(e);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(e,n,r){const i=this._indexOf(e)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(e){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(e,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==P.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(e){for(;this.stackTop>=e;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<e)}}popUntilElementPopped(e){const n=this._indexOf(e);this.shortenToLength(Math.max(n,0))}popUntilPopped(e,n){const r=this._indexOfTagNames(e,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Fr,P.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Bm,P.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,n){for(let r=this.stackTop;r>=0;r--)if(e.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(e,n){const r=this._indexOfTagNames(e,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(vm,P.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Mm,P.HTML)}clearBackToTableRowContext(){this.clearBackTo(Pm,P.HTML)}remove(e){const n=this._indexOf(e);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,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 n=this._indexOf(e)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===c.HTML}hasInDynamicScope(e,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case P.HTML:{if(i===e)return!0;if(n.has(i))return!1;break}case P.SVG:{if(Ps.has(i))return!1;break}case P.MATHML:{if(Ds.has(i))return!1;break}}}return!0}hasInScope(e){return this.hasInDynamicScope(e,Bn)}hasInListItemScope(e){return this.hasInDynamicScope(e,Om)}hasInButtonScope(e){return this.hasInDynamicScope(e,Dm)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const n=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case P.HTML:{if(Fr.has(n))return!0;if(Bn.has(n))return!1;break}case P.SVG:{if(Ps.has(n))return!1;break}case P.MATHML:{if(Ds.has(n))return!1;break}}}return!0}hasInTableScope(e){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===P.HTML)switch(this.tagIDs[n]){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])===P.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 n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===P.HTML)switch(this.tagIDs[n]){case e:return!0;case c.OPTION:case c.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Ru.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Os.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&Os.has(this.currentTagId);)this.pop()}}const br=3;var Je;(function(t){t[t.Marker=0]="Marker",t[t.Element=1]="Element"})(Je||(Je={}));const Ms={type:Je.Marker};class Hm{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,n){const r=[],i=n.length,s=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let u=0;u<this.entries.length;u++){const o=this.entries[u];if(o.type===Je.Marker)break;const{element:l}=o;if(this.treeAdapter.getTagName(l)===s&&this.treeAdapter.getNamespaceURI(l)===a){const f=this.treeAdapter.getAttrList(l);f.length===i&&r.push({idx:u,attrs:f})}}return r}_ensureNoahArkCondition(e){if(this.entries.length<br)return;const n=this.treeAdapter.getAttrList(e),r=this._getNoahArkConditionCandidates(e,n);if(r.length<br)return;const i=new Map(n.map(a=>[a.name,a.value]));let s=0;for(let a=0;a<r.length;a++){const u=r[a];u.attrs.every(o=>i.get(o.name)===o.value)&&(s+=1,s>=br&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(Ms)}pushElement(e,n){this._ensureNoahArkCondition(e),this.entries.unshift({type:Je.Element,element:e,token:n})}insertElementAfterBookmark(e,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Je.Element,element:e,token:n})}removeEntry(e){const n=this.entries.indexOf(e);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const e=this.entries.indexOf(Ms);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){const n=this.entries.find(r=>r.type===Je.Marker||this.treeAdapter.getTagName(r.element)===e);return n&&n.type===Je.Element?n:null}getElementEntry(e){return this.entries.find(n=>n.type===Je.Element&&n.element===e)}}const ft={createDocument(){return{nodeName:"#document",mode:Ve.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(t,e,n){return{nodeName:t,tagName:t,attrs:n,namespaceURI:e,childNodes:[],parentNode:null}},createCommentNode(t){return{nodeName:"#comment",data:t,parentNode:null}},createTextNode(t){return{nodeName:"#text",value:t,parentNode:null}},appendChild(t,e){t.childNodes.push(e),e.parentNode=t},insertBefore(t,e,n){const r=t.childNodes.indexOf(n);t.childNodes.splice(r,0,e),e.parentNode=t},setTemplateContent(t,e){t.content=e},getTemplateContent(t){return t.content},setDocumentType(t,e,n,r){const i=t.childNodes.find(s=>s.nodeName==="#documentType");if(i)i.name=e,i.publicId=n,i.systemId=r;else{const s={nodeName:"#documentType",name:e,publicId:n,systemId:r,parentNode:null};ft.appendChild(t,s)}},setDocumentMode(t,e){t.mode=e},getDocumentMode(t){return t.mode},detachNode(t){if(t.parentNode){const e=t.parentNode.childNodes.indexOf(t);t.parentNode.childNodes.splice(e,1),t.parentNode=null}},insertText(t,e){if(t.childNodes.length>0){const n=t.childNodes[t.childNodes.length-1];if(ft.isTextNode(n)){n.value+=e;return}}ft.appendChild(t,ft.createTextNode(e))},insertTextBefore(t,e,n){const r=t.childNodes[t.childNodes.indexOf(n)-1];r&&ft.isTextNode(r)?r.value+=e:ft.insertBefore(t,ft.createTextNode(e),n)},adoptAttributes(t,e){const n=new Set(t.attrs.map(r=>r.name));for(let r=0;r<e.length;r++)n.has(e[r].name)||t.attrs.push(e[r])},getFirstChild(t){return t.childNodes[0]},getChildNodes(t){return t.childNodes},getParentNode(t){return t.parentNode},getAttrList(t){return t.attrs},getTagName(t){return t.tagName},getNamespaceURI(t){return t.namespaceURI},getTextNodeContent(t){return t.value},getCommentNodeContent(t){return t.data},getDocumentTypeNodeName(t){return t.name},getDocumentTypeNodePublicId(t){return t.publicId},getDocumentTypeNodeSystemId(t){return t.systemId},isTextNode(t){return t.nodeName==="#text"},isCommentNode(t){return t.nodeName==="#comment"},isDocumentTypeNode(t){return t.nodeName==="#documentType"},isElementNode(t){return Object.prototype.hasOwnProperty.call(t,"tagName")},setNodeSourceCodeLocation(t,e){t.sourceCodeLocation=e},getNodeSourceCodeLocation(t){return t.sourceCodeLocation},updateNodeSourceCodeLocation(t,e){t.sourceCodeLocation={...t.sourceCodeLocation,...e}}},Ou="html",Um="about:legacy-compat",jm="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Du=["+//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//"],zm=[...Du,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],$m=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Pu=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Ym=[...Pu,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function vs(t,e){return e.some(n=>t.startsWith(n))}function qm(t){return t.name===Ou&&t.publicId===null&&(t.systemId===null||t.systemId===Um)}function Vm(t){if(t.name!==Ou)return Ve.QUIRKS;const{systemId:e}=t;if(e&&e.toLowerCase()===jm)return Ve.QUIRKS;let{publicId:n}=t;if(n!==null){if(n=n.toLowerCase(),$m.has(n))return Ve.QUIRKS;let r=e===null?zm:Du;if(vs(n,r))return Ve.QUIRKS;if(r=e===null?Pu:Ym,vs(n,r))return Ve.LIMITED_QUIRKS}return Ve.NO_QUIRKS}const Bs={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Wm="definitionurl",Gm="definitionURL",Qm=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(t=>[t.toLowerCase(),t])),Km=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:P.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:P.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:P.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:P.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:P.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:P.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:P.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:P.XML}],["xml:space",{prefix:"xml",name:"space",namespace:P.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:P.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:P.XMLNS}]]),Xm=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(t=>[t.toLowerCase(),t])),Zm=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 Jm(t){const e=t.tagID;return e===c.FONT&&t.attrs.some(({name:r})=>r===Tt.COLOR||r===Tt.SIZE||r===Tt.FACE)||Zm.has(e)}function Mu(t){for(let e=0;e<t.attrs.length;e++)if(t.attrs[e].name===Wm){t.attrs[e].name=Gm;break}}function vu(t){for(let e=0;e<t.attrs.length;e++){const n=Qm.get(t.attrs[e].name);n!=null&&(t.attrs[e].name=n)}}function Ti(t){for(let e=0;e<t.attrs.length;e++){const n=Km.get(t.attrs[e].name);n&&(t.attrs[e].prefix=n.prefix,t.attrs[e].name=n.name,t.attrs[e].namespace=n.namespace)}}function e1(t){const e=Xm.get(t.tagName);e!=null&&(t.tagName=e,t.tagID=jt(t.tagName))}function t1(t,e){return e===P.MATHML&&(t===c.MI||t===c.MO||t===c.MN||t===c.MS||t===c.MTEXT)}function n1(t,e,n){if(e===P.MATHML&&t===c.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Tt.ENCODING){const i=n[r].value.toLowerCase();return i===Bs.TEXT_HTML||i===Bs.APPLICATION_XML}}return e===P.SVG&&(t===c.FOREIGN_OBJECT||t===c.DESC||t===c.TITLE)}function r1(t,e,n,r){return(!r||r===P.HTML)&&n1(t,e,n)||(!r||r===P.MATHML)&&t1(t,e)}const i1="hidden",s1=8,a1=3;var _;(function(t){t[t.INITIAL=0]="INITIAL",t[t.BEFORE_HTML=1]="BEFORE_HTML",t[t.BEFORE_HEAD=2]="BEFORE_HEAD",t[t.IN_HEAD=3]="IN_HEAD",t[t.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",t[t.AFTER_HEAD=5]="AFTER_HEAD",t[t.IN_BODY=6]="IN_BODY",t[t.TEXT=7]="TEXT",t[t.IN_TABLE=8]="IN_TABLE",t[t.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",t[t.IN_CAPTION=10]="IN_CAPTION",t[t.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",t[t.IN_TABLE_BODY=12]="IN_TABLE_BODY",t[t.IN_ROW=13]="IN_ROW",t[t.IN_CELL=14]="IN_CELL",t[t.IN_SELECT=15]="IN_SELECT",t[t.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",t[t.IN_TEMPLATE=17]="IN_TEMPLATE",t[t.AFTER_BODY=18]="AFTER_BODY",t[t.IN_FRAMESET=19]="IN_FRAMESET",t[t.AFTER_FRAMESET=20]="AFTER_FRAMESET",t[t.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",t[t.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(_||(_={}));const u1={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Bu=new Set([c.TABLE,c.TBODY,c.TFOOT,c.THEAD,c.TR]),Fs={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:ft,onParseError:null};class Hs{constructor(e,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=_.INITIAL,this.originalInsertionMode=_.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={...Fs,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new Rm(this.options,this),this.activeFormattingElements=new Hm(this.treeAdapter),this.fragmentContextID=r?jt(this.treeAdapter.getTagName(r)):c.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new Fm(this.document,this.treeAdapter,this)}static parse(e,n){const r=new this(n);return r.tokenizer.write(e,!0),r.document}static getFragmentParser(e,n){const r={...Fs,...n};e??(e=r.treeAdapter.createElement(w.TEMPLATE,P.HTML,[]));const i=r.treeAdapter.createElement("documentmock",P.HTML,[]),s=new this(r,i,e);return s.fragmentContextID===c.TEMPLATE&&s.tmplInsertionModeStack.unshift(_.IN_TEMPLATE),s._initTokenizerForFragmentParsing(),s._insertFakeRootElement(),s._resetInsertionMode(),s._findFormInFragmentContext(),s}getFragment(){const e=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,n),n}_err(e,n,r){var i;if(!this.onParseError)return;const s=(i=e.location)!==null&&i!==void 0?i:u1,a={code:n,startLine:s.startLine,startCol:s.startCol,startOffset:s.startOffset,endLine:r?s.startLine:s.endLine,endCol:r?s.startCol:s.endCol,endOffset:r?s.startOffset:s.endOffset};this.onParseError(a)}onItemPush(e,n,r){var i,s;(s=(i=this.treeAdapter).onItemPush)===null||s===void 0||s.call(i,e),r&&this.openElements.stackTop>0&&this._setContextModes(e,n)}onItemPop(e,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,e,this.openElements.current),n){let s,a;this.openElements.stackTop===0&&this.fragmentContext?(s=this.fragmentContext,a=this.fragmentContextID):{current:s,currentTagId:a}=this.openElements,this._setContextModes(s,a)}}_setContextModes(e,n){const r=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===P.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&e!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,e)}_switchToTextParsing(e,n){this._insertElement(e,P.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=_.TEXT}switchToPlaintextParsing(){this.insertionMode=_.TEXT,this.originalInsertionMode=_.IN_BODY,this.tokenizer.state=Ce.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)===w.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==P.HTML))switch(this.fragmentContextID){case c.TITLE:case c.TEXTAREA:{this.tokenizer.state=Ce.RCDATA;break}case c.STYLE:case c.XMP:case c.IFRAME:case c.NOEMBED:case c.NOFRAMES:case c.NOSCRIPT:{this.tokenizer.state=Ce.RAWTEXT;break}case c.SCRIPT:{this.tokenizer.state=Ce.SCRIPT_DATA;break}case c.PLAINTEXT:{this.tokenizer.state=Ce.PLAINTEXT;break}}}_setDocumentType(e){const n=e.name||"",r=e.publicId||"",i=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),e.location){const a=this.treeAdapter.getChildNodes(this.document).find(u=>this.treeAdapter.isDocumentTypeNode(u));a&&this.treeAdapter.setNodeSourceCodeLocation(a,e.location)}}_attachElementToTree(e,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(e,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,e)}}_appendElement(e,n){const r=this.treeAdapter.createElement(e.tagName,n,e.attrs);this._attachElementToTree(r,e.location)}_insertElement(e,n){const r=this.treeAdapter.createElement(e.tagName,n,e.attrs);this._attachElementToTree(r,e.location),this.openElements.push(r,e.tagID)}_insertFakeElement(e,n){const r=this.treeAdapter.createElement(e,P.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(e){const n=this.treeAdapter.createElement(e.tagName,P.HTML,e.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(w.HTML,P.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,c.HTML)}_appendCommentNode(e,n){const r=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,e.location)}_insertCharacters(e){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,e.chars,r):this.treeAdapter.insertText(n,e.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,e.chars)),!e.location)return;const i=this.treeAdapter.getChildNodes(n),s=r?i.lastIndexOf(r):i.length,a=i[s-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){const{endLine:o,endCol:l,endOffset:f}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:o,endCol:l,endOffset:f})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,e.location)}_adoptNodes(e,n){for(let r=this.treeAdapter.getFirstChild(e);r;r=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(e,n){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&n.location){const r=n.location,i=this.treeAdapter.getTagName(e),s=n.type===ne.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,s)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,e.tagID===c.SVG&&this.treeAdapter.getTagName(n)===w.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===P.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===c.MGLYPH||e.tagID===c.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,P.HTML)}_processToken(e){switch(e.type){case ne.CHARACTER:{this.onCharacter(e);break}case ne.NULL_CHARACTER:{this.onNullCharacter(e);break}case ne.COMMENT:{this.onComment(e);break}case ne.DOCTYPE:{this.onDoctype(e);break}case ne.START_TAG:{this._processStartTag(e);break}case ne.END_TAG:{this.onEndTag(e);break}case ne.EOF:{this.onEof(e);break}case ne.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(e);break}}}_isIntegrationPoint(e,n,r){const i=this.treeAdapter.getNamespaceURI(n),s=this.treeAdapter.getAttrList(n);return r1(e,i,s,r)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.entries.length;if(e){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===Je.Marker||this.openElements.contains(i.element)),r=n===-1?e-1:n-1;for(let i=r;i>=0;i--){const s=this.activeFormattingElements.entries[i];this._insertElement(s.token,this.treeAdapter.getNamespaceURI(s.element)),s.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=_.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=_.IN_ROW;return}case c.TBODY:case c.THEAD:case c.TFOOT:{this.insertionMode=_.IN_TABLE_BODY;return}case c.CAPTION:{this.insertionMode=_.IN_CAPTION;return}case c.COLGROUP:{this.insertionMode=_.IN_COLUMN_GROUP;return}case c.TABLE:{this.insertionMode=_.IN_TABLE;return}case c.BODY:{this.insertionMode=_.IN_BODY;return}case c.FRAMESET:{this.insertionMode=_.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?_.AFTER_HEAD:_.BEFORE_HEAD;return}case c.TD:case c.TH:{if(e>0){this.insertionMode=_.IN_CELL;return}break}case c.HEAD:{if(e>0){this.insertionMode=_.IN_HEAD;return}break}}this.insertionMode=_.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let n=e-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===c.TEMPLATE)break;if(r===c.TABLE){this.insertionMode=_.IN_SELECT_IN_TABLE;return}}this.insertionMode=_.IN_SELECT}_isElementCausesFosterParenting(e){return Bu.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 n=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case c.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===P.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case c.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,e,n.beforeElement):this.treeAdapter.appendChild(n.parent,e)}_isSpecialElement(e,n){const r=this.treeAdapter.getNamespaceURI(e);return ym[r].has(n)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Bp(this,e);return}switch(this.insertionMode){case _.INITIAL:{Xt(this,e);break}case _.BEFORE_HTML:{an(this,e);break}case _.BEFORE_HEAD:{un(this,e);break}case _.IN_HEAD:{on(this,e);break}case _.IN_HEAD_NO_SCRIPT:{ln(this,e);break}case _.AFTER_HEAD:{cn(this,e);break}case _.IN_BODY:case _.IN_CAPTION:case _.IN_CELL:case _.IN_TEMPLATE:{Hu(this,e);break}case _.TEXT:case _.IN_SELECT:case _.IN_SELECT_IN_TABLE:{this._insertCharacters(e);break}case _.IN_TABLE:case _.IN_TABLE_BODY:case _.IN_ROW:{Tr(this,e);break}case _.IN_TABLE_TEXT:{qu(this,e);break}case _.IN_COLUMN_GROUP:{Fn(this,e);break}case _.AFTER_BODY:{Hn(this,e);break}case _.AFTER_AFTER_BODY:{Rn(this,e);break}}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){vp(this,e);return}switch(this.insertionMode){case _.INITIAL:{Xt(this,e);break}case _.BEFORE_HTML:{an(this,e);break}case _.BEFORE_HEAD:{un(this,e);break}case _.IN_HEAD:{on(this,e);break}case _.IN_HEAD_NO_SCRIPT:{ln(this,e);break}case _.AFTER_HEAD:{cn(this,e);break}case _.TEXT:{this._insertCharacters(e);break}case _.IN_TABLE:case _.IN_TABLE_BODY:case _.IN_ROW:{Tr(this,e);break}case _.IN_COLUMN_GROUP:{Fn(this,e);break}case _.AFTER_BODY:{Hn(this,e);break}case _.AFTER_AFTER_BODY:{Rn(this,e);break}}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){Hr(this,e);return}switch(this.insertionMode){case _.INITIAL:case _.BEFORE_HTML:case _.BEFORE_HEAD:case _.IN_HEAD:case _.IN_HEAD_NO_SCRIPT:case _.AFTER_HEAD:case _.IN_BODY:case _.IN_TABLE:case _.IN_CAPTION:case _.IN_COLUMN_GROUP:case _.IN_TABLE_BODY:case _.IN_ROW:case _.IN_CELL:case _.IN_SELECT:case _.IN_SELECT_IN_TABLE:case _.IN_TEMPLATE:case _.IN_FRAMESET:case _.AFTER_FRAMESET:{Hr(this,e);break}case _.IN_TABLE_TEXT:{Zt(this,e);break}case _.AFTER_BODY:{m1(this,e);break}case _.AFTER_AFTER_BODY:case _.AFTER_AFTER_FRAMESET:{p1(this,e);break}}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case _.INITIAL:{g1(this,e);break}case _.BEFORE_HEAD:case _.IN_HEAD:case _.IN_HEAD_NO_SCRIPT:case _.AFTER_HEAD:{this._err(e,R.misplacedDoctype);break}case _.IN_TABLE_TEXT:{Zt(this,e);break}}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,R.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?Fp(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case _.INITIAL:{Xt(this,e);break}case _.BEFORE_HTML:{E1(this,e);break}case _.BEFORE_HEAD:{T1(this,e);break}case _.IN_HEAD:{Ke(this,e);break}case _.IN_HEAD_NO_SCRIPT:{A1(this,e);break}case _.AFTER_HEAD:{C1(this,e);break}case _.IN_BODY:{De(this,e);break}case _.IN_TABLE:{vt(this,e);break}case _.IN_TABLE_TEXT:{Zt(this,e);break}case _.IN_CAPTION:{xp(this,e);break}case _.IN_COLUMN_GROUP:{Ai(this,e);break}case _.IN_TABLE_BODY:{tr(this,e);break}case _.IN_ROW:{nr(this,e);break}case _.IN_CELL:{kp(this,e);break}case _.IN_SELECT:{Gu(this,e);break}case _.IN_SELECT_IN_TABLE:{Np(this,e);break}case _.IN_TEMPLATE:{yp(this,e);break}case _.AFTER_BODY:{wp(this,e);break}case _.IN_FRAMESET:{Lp(this,e);break}case _.AFTER_FRAMESET:{Op(this,e);break}case _.AFTER_AFTER_BODY:{Pp(this,e);break}case _.AFTER_AFTER_FRAMESET:{Mp(this,e);break}}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?Hp(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case _.INITIAL:{Xt(this,e);break}case _.BEFORE_HTML:{b1(this,e);break}case _.BEFORE_HEAD:{x1(this,e);break}case _.IN_HEAD:{_1(this,e);break}case _.IN_HEAD_NO_SCRIPT:{k1(this,e);break}case _.AFTER_HEAD:{N1(this,e);break}case _.IN_BODY:{er(this,e);break}case _.TEXT:{cp(this,e);break}case _.IN_TABLE:{hn(this,e);break}case _.IN_TABLE_TEXT:{Zt(this,e);break}case _.IN_CAPTION:{_p(this,e);break}case _.IN_COLUMN_GROUP:{Ap(this,e);break}case _.IN_TABLE_BODY:{Ur(this,e);break}case _.IN_ROW:{Wu(this,e);break}case _.IN_CELL:{Cp(this,e);break}case _.IN_SELECT:{Qu(this,e);break}case _.IN_SELECT_IN_TABLE:{Sp(this,e);break}case _.IN_TEMPLATE:{Ip(this,e);break}case _.AFTER_BODY:{Xu(this,e);break}case _.IN_FRAMESET:{Rp(this,e);break}case _.AFTER_FRAMESET:{Dp(this,e);break}case _.AFTER_AFTER_BODY:{Rn(this,e);break}}}onEof(e){switch(this.insertionMode){case _.INITIAL:{Xt(this,e);break}case _.BEFORE_HTML:{an(this,e);break}case _.BEFORE_HEAD:{un(this,e);break}case _.IN_HEAD:{on(this,e);break}case _.IN_HEAD_NO_SCRIPT:{ln(this,e);break}case _.AFTER_HEAD:{cn(this,e);break}case _.IN_BODY:case _.IN_TABLE:case _.IN_CAPTION:case _.IN_COLUMN_GROUP:case _.IN_TABLE_BODY:case _.IN_ROW:case _.IN_CELL:case _.IN_SELECT:case _.IN_SELECT_IN_TABLE:{$u(this,e);break}case _.TEXT:{fp(this,e);break}case _.IN_TABLE_TEXT:{Zt(this,e);break}case _.IN_TEMPLATE:{Ku(this,e);break}case _.AFTER_BODY:case _.IN_FRAMESET:case _.AFTER_FRAMESET:case _.AFTER_AFTER_BODY:case _.AFTER_AFTER_FRAMESET:{_i(this,e);break}}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===E.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 _.IN_HEAD:case _.IN_HEAD_NO_SCRIPT:case _.AFTER_HEAD:case _.TEXT:case _.IN_COLUMN_GROUP:case _.IN_SELECT:case _.IN_SELECT_IN_TABLE:case _.IN_FRAMESET:case _.AFTER_FRAMESET:{this._insertCharacters(e);break}case _.IN_BODY:case _.IN_CAPTION:case _.IN_CELL:case _.IN_TEMPLATE:case _.AFTER_BODY:case _.AFTER_AFTER_BODY:case _.AFTER_AFTER_FRAMESET:{Fu(this,e);break}case _.IN_TABLE:case _.IN_TABLE_BODY:case _.IN_ROW:{Tr(this,e);break}case _.IN_TABLE_TEXT:{Yu(this,e);break}}}}function o1(t,e){let n=t.activeFormattingElements.getElementEntryInScopeWithTagName(e.tagName);return n?t.openElements.contains(n.element)?t.openElements.hasInScope(e.tagID)||(n=null):(t.activeFormattingElements.removeEntry(n),n=null):zu(t,e),n}function l1(t,e){let n=null,r=t.openElements.stackTop;for(;r>=0;r--){const i=t.openElements.items[r];if(i===e.element)break;t._isSpecialElement(i,t.openElements.tagIDs[r])&&(n=i)}return n||(t.openElements.shortenToLength(Math.max(r,0)),t.activeFormattingElements.removeEntry(e)),n}function c1(t,e,n){let r=e,i=t.openElements.getCommonAncestor(e);for(let s=0,a=i;a!==n;s++,a=i){i=t.openElements.getCommonAncestor(a);const u=t.activeFormattingElements.getElementEntry(a),o=u&&s>=a1;!u||o?(o&&t.activeFormattingElements.removeEntry(u),t.openElements.remove(a)):(a=f1(t,u),r===e&&(t.activeFormattingElements.bookmark=u),t.treeAdapter.detachNode(r),t.treeAdapter.appendChild(a,r),r=a)}return r}function f1(t,e){const n=t.treeAdapter.getNamespaceURI(e.element),r=t.treeAdapter.createElement(e.token.tagName,n,e.token.attrs);return t.openElements.replace(e.element,r),e.element=r,r}function d1(t,e,n){const r=t.treeAdapter.getTagName(e),i=jt(r);if(t._isElementCausesFosterParenting(i))t._fosterParentElement(n);else{const s=t.treeAdapter.getNamespaceURI(e);i===c.TEMPLATE&&s===P.HTML&&(e=t.treeAdapter.getTemplateContent(e)),t.treeAdapter.appendChild(e,n)}}function h1(t,e,n){const r=t.treeAdapter.getNamespaceURI(n.element),{token:i}=n,s=t.treeAdapter.createElement(i.tagName,r,i.attrs);t._adoptNodes(e,s),t.treeAdapter.appendChild(e,s),t.activeFormattingElements.insertElementAfterBookmark(s,i),t.activeFormattingElements.removeEntry(n),t.openElements.remove(n.element),t.openElements.insertAfter(e,s,i.tagID)}function xi(t,e){for(let n=0;n<s1;n++){const r=o1(t,e);if(!r)break;const i=l1(t,r);if(!i)break;t.activeFormattingElements.bookmark=r;const s=c1(t,i,r.element),a=t.openElements.getCommonAncestor(r.element);t.treeAdapter.detachNode(s),a&&d1(t,a,s),h1(t,i,r)}}function Hr(t,e){t._appendCommentNode(e,t.openElements.currentTmplContentOrNode)}function m1(t,e){t._appendCommentNode(e,t.openElements.items[0])}function p1(t,e){t._appendCommentNode(e,t.document)}function _i(t,e){if(t.stopped=!0,e.location){const n=t.fragmentContext?0:2;for(let r=t.openElements.stackTop;r>=n;r--)t._setEndLocation(t.openElements.items[r],e);if(!t.fragmentContext&&t.openElements.stackTop>=0){const r=t.openElements.items[0],i=t.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(t._setEndLocation(r,e),t.openElements.stackTop>=1)){const s=t.openElements.items[1],a=t.treeAdapter.getNodeSourceCodeLocation(s);a&&!a.endTag&&t._setEndLocation(s,e)}}}}function g1(t,e){t._setDocumentType(e);const n=e.forceQuirks?Ve.QUIRKS:Vm(e);qm(e)||t._err(e,R.nonConformingDoctype),t.treeAdapter.setDocumentMode(t.document,n),t.insertionMode=_.BEFORE_HTML}function Xt(t,e){t._err(e,R.missingDoctype,!0),t.treeAdapter.setDocumentMode(t.document,Ve.QUIRKS),t.insertionMode=_.BEFORE_HTML,t._processToken(e)}function E1(t,e){e.tagID===c.HTML?(t._insertElement(e,P.HTML),t.insertionMode=_.BEFORE_HEAD):an(t,e)}function b1(t,e){const n=e.tagID;(n===c.HTML||n===c.HEAD||n===c.BODY||n===c.BR)&&an(t,e)}function an(t,e){t._insertFakeRootElement(),t.insertionMode=_.BEFORE_HEAD,t._processToken(e)}function T1(t,e){switch(e.tagID){case c.HTML:{De(t,e);break}case c.HEAD:{t._insertElement(e,P.HTML),t.headElement=t.openElements.current,t.insertionMode=_.IN_HEAD;break}default:un(t,e)}}function x1(t,e){const n=e.tagID;n===c.HEAD||n===c.BODY||n===c.HTML||n===c.BR?un(t,e):t._err(e,R.endTagWithoutMatchingOpenElement)}function un(t,e){t._insertFakeElement(w.HEAD,c.HEAD),t.headElement=t.openElements.current,t.insertionMode=_.IN_HEAD,t._processToken(e)}function Ke(t,e){switch(e.tagID){case c.HTML:{De(t,e);break}case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:{t._appendElement(e,P.HTML),e.ackSelfClosing=!0;break}case c.TITLE:{t._switchToTextParsing(e,Ce.RCDATA);break}case c.NOSCRIPT:{t.options.scriptingEnabled?t._switchToTextParsing(e,Ce.RAWTEXT):(t._insertElement(e,P.HTML),t.insertionMode=_.IN_HEAD_NO_SCRIPT);break}case c.NOFRAMES:case c.STYLE:{t._switchToTextParsing(e,Ce.RAWTEXT);break}case c.SCRIPT:{t._switchToTextParsing(e,Ce.SCRIPT_DATA);break}case c.TEMPLATE:{t._insertTemplate(e),t.activeFormattingElements.insertMarker(),t.framesetOk=!1,t.insertionMode=_.IN_TEMPLATE,t.tmplInsertionModeStack.unshift(_.IN_TEMPLATE);break}case c.HEAD:{t._err(e,R.misplacedStartTagForHeadElement);break}default:on(t,e)}}function _1(t,e){switch(e.tagID){case c.HEAD:{t.openElements.pop(),t.insertionMode=_.AFTER_HEAD;break}case c.BODY:case c.BR:case c.HTML:{on(t,e);break}case c.TEMPLATE:{yt(t,e);break}default:t._err(e,R.endTagWithoutMatchingOpenElement)}}function yt(t,e){t.openElements.tmplCount>0?(t.openElements.generateImpliedEndTagsThoroughly(),t.openElements.currentTagId!==c.TEMPLATE&&t._err(e,R.closingOfElementWithOpenChildElements),t.openElements.popUntilTagNamePopped(c.TEMPLATE),t.activeFormattingElements.clearToLastMarker(),t.tmplInsertionModeStack.shift(),t._resetInsertionMode()):t._err(e,R.endTagWithoutMatchingOpenElement)}function on(t,e){t.openElements.pop(),t.insertionMode=_.AFTER_HEAD,t._processToken(e)}function A1(t,e){switch(e.tagID){case c.HTML:{De(t,e);break}case c.BASEFONT:case c.BGSOUND:case c.HEAD:case c.LINK:case c.META:case c.NOFRAMES:case c.STYLE:{Ke(t,e);break}case c.NOSCRIPT:{t._err(e,R.nestedNoscriptInHead);break}default:ln(t,e)}}function k1(t,e){switch(e.tagID){case c.NOSCRIPT:{t.openElements.pop(),t.insertionMode=_.IN_HEAD;break}case c.BR:{ln(t,e);break}default:t._err(e,R.endTagWithoutMatchingOpenElement)}}function ln(t,e){const n=e.type===ne.EOF?R.openElementsLeftAfterEof:R.disallowedContentInNoscriptInHead;t._err(e,n),t.openElements.pop(),t.insertionMode=_.IN_HEAD,t._processToken(e)}function C1(t,e){switch(e.tagID){case c.HTML:{De(t,e);break}case c.BODY:{t._insertElement(e,P.HTML),t.framesetOk=!1,t.insertionMode=_.IN_BODY;break}case c.FRAMESET:{t._insertElement(e,P.HTML),t.insertionMode=_.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:{t._err(e,R.abandonedHeadElementChild),t.openElements.push(t.headElement,c.HEAD),Ke(t,e),t.openElements.remove(t.headElement);break}case c.HEAD:{t._err(e,R.misplacedStartTagForHeadElement);break}default:cn(t,e)}}function N1(t,e){switch(e.tagID){case c.BODY:case c.HTML:case c.BR:{cn(t,e);break}case c.TEMPLATE:{yt(t,e);break}default:t._err(e,R.endTagWithoutMatchingOpenElement)}}function cn(t,e){t._insertFakeElement(w.BODY,c.BODY),t.insertionMode=_.IN_BODY,Jn(t,e)}function Jn(t,e){switch(e.type){case ne.CHARACTER:{Hu(t,e);break}case ne.WHITESPACE_CHARACTER:{Fu(t,e);break}case ne.COMMENT:{Hr(t,e);break}case ne.START_TAG:{De(t,e);break}case ne.END_TAG:{er(t,e);break}case ne.EOF:{$u(t,e);break}}}function Fu(t,e){t._reconstructActiveFormattingElements(),t._insertCharacters(e)}function Hu(t,e){t._reconstructActiveFormattingElements(),t._insertCharacters(e),t.framesetOk=!1}function S1(t,e){t.openElements.tmplCount===0&&t.treeAdapter.adoptAttributes(t.openElements.items[0],e.attrs)}function y1(t,e){const n=t.openElements.tryPeekProperlyNestedBodyElement();n&&t.openElements.tmplCount===0&&(t.framesetOk=!1,t.treeAdapter.adoptAttributes(n,e.attrs))}function I1(t,e){const n=t.openElements.tryPeekProperlyNestedBodyElement();t.framesetOk&&n&&(t.treeAdapter.detachNode(n),t.openElements.popAllUpToHtmlElement(),t._insertElement(e,P.HTML),t.insertionMode=_.IN_FRAMESET)}function w1(t,e){t.openElements.hasInButtonScope(c.P)&&t._closePElement(),t._insertElement(e,P.HTML)}function L1(t,e){t.openElements.hasInButtonScope(c.P)&&t._closePElement(),t.openElements.currentTagId!==void 0&&Fr.has(t.openElements.currentTagId)&&t.openElements.pop(),t._insertElement(e,P.HTML)}function R1(t,e){t.openElements.hasInButtonScope(c.P)&&t._closePElement(),t._insertElement(e,P.HTML),t.skipNextNewLine=!0,t.framesetOk=!1}function O1(t,e){const n=t.openElements.tmplCount>0;(!t.formElement||n)&&(t.openElements.hasInButtonScope(c.P)&&t._closePElement(),t._insertElement(e,P.HTML),n||(t.formElement=t.openElements.current))}function D1(t,e){t.framesetOk=!1;const n=e.tagID;for(let r=t.openElements.stackTop;r>=0;r--){const i=t.openElements.tagIDs[r];if(n===c.LI&&i===c.LI||(n===c.DD||n===c.DT)&&(i===c.DD||i===c.DT)){t.openElements.generateImpliedEndTagsWithExclusion(i),t.openElements.popUntilTagNamePopped(i);break}if(i!==c.ADDRESS&&i!==c.DIV&&i!==c.P&&t._isSpecialElement(t.openElements.items[r],i))break}t.openElements.hasInButtonScope(c.P)&&t._closePElement(),t._insertElement(e,P.HTML)}function P1(t,e){t.openElements.hasInButtonScope(c.P)&&t._closePElement(),t._insertElement(e,P.HTML),t.tokenizer.state=Ce.PLAINTEXT}function M1(t,e){t.openElements.hasInScope(c.BUTTON)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(c.BUTTON)),t._reconstructActiveFormattingElements(),t._insertElement(e,P.HTML),t.framesetOk=!1}function v1(t,e){const n=t.activeFormattingElements.getElementEntryInScopeWithTagName(w.A);n&&(xi(t,e),t.openElements.remove(n.element),t.activeFormattingElements.removeEntry(n)),t._reconstructActiveFormattingElements(),t._insertElement(e,P.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function B1(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,P.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function F1(t,e){t._reconstructActiveFormattingElements(),t.openElements.hasInScope(c.NOBR)&&(xi(t,e),t._reconstructActiveFormattingElements()),t._insertElement(e,P.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function H1(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,P.HTML),t.activeFormattingElements.insertMarker(),t.framesetOk=!1}function U1(t,e){t.treeAdapter.getDocumentMode(t.document)!==Ve.QUIRKS&&t.openElements.hasInButtonScope(c.P)&&t._closePElement(),t._insertElement(e,P.HTML),t.framesetOk=!1,t.insertionMode=_.IN_TABLE}function Uu(t,e){t._reconstructActiveFormattingElements(),t._appendElement(e,P.HTML),t.framesetOk=!1,e.ackSelfClosing=!0}function ju(t){const e=wu(t,Tt.TYPE);return e!=null&&e.toLowerCase()===i1}function j1(t,e){t._reconstructActiveFormattingElements(),t._appendElement(e,P.HTML),ju(e)||(t.framesetOk=!1),e.ackSelfClosing=!0}function z1(t,e){t._appendElement(e,P.HTML),e.ackSelfClosing=!0}function $1(t,e){t.openElements.hasInButtonScope(c.P)&&t._closePElement(),t._appendElement(e,P.HTML),t.framesetOk=!1,e.ackSelfClosing=!0}function Y1(t,e){e.tagName=w.IMG,e.tagID=c.IMG,Uu(t,e)}function q1(t,e){t._insertElement(e,P.HTML),t.skipNextNewLine=!0,t.tokenizer.state=Ce.RCDATA,t.originalInsertionMode=t.insertionMode,t.framesetOk=!1,t.insertionMode=_.TEXT}function V1(t,e){t.openElements.hasInButtonScope(c.P)&&t._closePElement(),t._reconstructActiveFormattingElements(),t.framesetOk=!1,t._switchToTextParsing(e,Ce.RAWTEXT)}function W1(t,e){t.framesetOk=!1,t._switchToTextParsing(e,Ce.RAWTEXT)}function Us(t,e){t._switchToTextParsing(e,Ce.RAWTEXT)}function G1(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,P.HTML),t.framesetOk=!1,t.insertionMode=t.insertionMode===_.IN_TABLE||t.insertionMode===_.IN_CAPTION||t.insertionMode===_.IN_TABLE_BODY||t.insertionMode===_.IN_ROW||t.insertionMode===_.IN_CELL?_.IN_SELECT_IN_TABLE:_.IN_SELECT}function Q1(t,e){t.openElements.currentTagId===c.OPTION&&t.openElements.pop(),t._reconstructActiveFormattingElements(),t._insertElement(e,P.HTML)}function K1(t,e){t.openElements.hasInScope(c.RUBY)&&t.openElements.generateImpliedEndTags(),t._insertElement(e,P.HTML)}function X1(t,e){t.openElements.hasInScope(c.RUBY)&&t.openElements.generateImpliedEndTagsWithExclusion(c.RTC),t._insertElement(e,P.HTML)}function Z1(t,e){t._reconstructActiveFormattingElements(),Mu(e),Ti(e),e.selfClosing?t._appendElement(e,P.MATHML):t._insertElement(e,P.MATHML),e.ackSelfClosing=!0}function J1(t,e){t._reconstructActiveFormattingElements(),vu(e),Ti(e),e.selfClosing?t._appendElement(e,P.SVG):t._insertElement(e,P.SVG),e.ackSelfClosing=!0}function js(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,P.HTML)}function De(t,e){switch(e.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:{B1(t,e);break}case c.A:{v1(t,e);break}case c.H1:case c.H2:case c.H3:case c.H4:case c.H5:case c.H6:{L1(t,e);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:{w1(t,e);break}case c.LI:case c.DD:case c.DT:{D1(t,e);break}case c.BR:case c.IMG:case c.WBR:case c.AREA:case c.EMBED:case c.KEYGEN:{Uu(t,e);break}case c.HR:{$1(t,e);break}case c.RB:case c.RTC:{K1(t,e);break}case c.RT:case c.RP:{X1(t,e);break}case c.PRE:case c.LISTING:{R1(t,e);break}case c.XMP:{V1(t,e);break}case c.SVG:{J1(t,e);break}case c.HTML:{S1(t,e);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:{Ke(t,e);break}case c.BODY:{y1(t,e);break}case c.FORM:{O1(t,e);break}case c.NOBR:{F1(t,e);break}case c.MATH:{Z1(t,e);break}case c.TABLE:{U1(t,e);break}case c.INPUT:{j1(t,e);break}case c.PARAM:case c.TRACK:case c.SOURCE:{z1(t,e);break}case c.IMAGE:{Y1(t,e);break}case c.BUTTON:{M1(t,e);break}case c.APPLET:case c.OBJECT:case c.MARQUEE:{H1(t,e);break}case c.IFRAME:{W1(t,e);break}case c.SELECT:{G1(t,e);break}case c.OPTION:case c.OPTGROUP:{Q1(t,e);break}case c.NOEMBED:case c.NOFRAMES:{Us(t,e);break}case c.FRAMESET:{I1(t,e);break}case c.TEXTAREA:{q1(t,e);break}case c.NOSCRIPT:{t.options.scriptingEnabled?Us(t,e):js(t,e);break}case c.PLAINTEXT:{P1(t,e);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:js(t,e)}}function ep(t,e){if(t.openElements.hasInScope(c.BODY)&&(t.insertionMode=_.AFTER_BODY,t.options.sourceCodeLocationInfo)){const n=t.openElements.tryPeekProperlyNestedBodyElement();n&&t._setEndLocation(n,e)}}function tp(t,e){t.openElements.hasInScope(c.BODY)&&(t.insertionMode=_.AFTER_BODY,Xu(t,e))}function np(t,e){const n=e.tagID;t.openElements.hasInScope(n)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(n))}function rp(t){const e=t.openElements.tmplCount>0,{formElement:n}=t;e||(t.formElement=null),(n||e)&&t.openElements.hasInScope(c.FORM)&&(t.openElements.generateImpliedEndTags(),e?t.openElements.popUntilTagNamePopped(c.FORM):n&&t.openElements.remove(n))}function ip(t){t.openElements.hasInButtonScope(c.P)||t._insertFakeElement(w.P,c.P),t._closePElement()}function sp(t){t.openElements.hasInListItemScope(c.LI)&&(t.openElements.generateImpliedEndTagsWithExclusion(c.LI),t.openElements.popUntilTagNamePopped(c.LI))}function ap(t,e){const n=e.tagID;t.openElements.hasInScope(n)&&(t.openElements.generateImpliedEndTagsWithExclusion(n),t.openElements.popUntilTagNamePopped(n))}function up(t){t.openElements.hasNumberedHeaderInScope()&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilNumberedHeaderPopped())}function op(t,e){const n=e.tagID;t.openElements.hasInScope(n)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(n),t.activeFormattingElements.clearToLastMarker())}function lp(t){t._reconstructActiveFormattingElements(),t._insertFakeElement(w.BR,c.BR),t.openElements.pop(),t.framesetOk=!1}function zu(t,e){const n=e.tagName,r=e.tagID;for(let i=t.openElements.stackTop;i>0;i--){const s=t.openElements.items[i],a=t.openElements.tagIDs[i];if(r===a&&(r!==c.UNKNOWN||t.treeAdapter.getTagName(s)===n)){t.openElements.generateImpliedEndTagsWithExclusion(r),t.openElements.stackTop>=i&&t.openElements.shortenToLength(i);break}if(t._isSpecialElement(s,a))break}}function er(t,e){switch(e.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:{xi(t,e);break}case c.P:{ip(t);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:{np(t,e);break}case c.LI:{sp(t);break}case c.DD:case c.DT:{ap(t,e);break}case c.H1:case c.H2:case c.H3:case c.H4:case c.H5:case c.H6:{up(t);break}case c.BR:{lp(t);break}case c.BODY:{ep(t,e);break}case c.HTML:{tp(t,e);break}case c.FORM:{rp(t);break}case c.APPLET:case c.OBJECT:case c.MARQUEE:{op(t,e);break}case c.TEMPLATE:{yt(t,e);break}default:zu(t,e)}}function $u(t,e){t.tmplInsertionModeStack.length>0?Ku(t,e):_i(t,e)}function cp(t,e){var n;e.tagID===c.SCRIPT&&((n=t.scriptHandler)===null||n===void 0||n.call(t,t.openElements.current)),t.openElements.pop(),t.insertionMode=t.originalInsertionMode}function fp(t,e){t._err(e,R.eofInElementThatCanContainOnlyText),t.openElements.pop(),t.insertionMode=t.originalInsertionMode,t.onEof(e)}function Tr(t,e){if(t.openElements.currentTagId!==void 0&&Bu.has(t.openElements.currentTagId))switch(t.pendingCharacterTokens.length=0,t.hasNonWhitespacePendingCharacterToken=!1,t.originalInsertionMode=t.insertionMode,t.insertionMode=_.IN_TABLE_TEXT,e.type){case ne.CHARACTER:{qu(t,e);break}case ne.WHITESPACE_CHARACTER:{Yu(t,e);break}}else xn(t,e)}function dp(t,e){t.openElements.clearBackToTableContext(),t.activeFormattingElements.insertMarker(),t._insertElement(e,P.HTML),t.insertionMode=_.IN_CAPTION}function hp(t,e){t.openElements.clearBackToTableContext(),t._insertElement(e,P.HTML),t.insertionMode=_.IN_COLUMN_GROUP}function mp(t,e){t.openElements.clearBackToTableContext(),t._insertFakeElement(w.COLGROUP,c.COLGROUP),t.insertionMode=_.IN_COLUMN_GROUP,Ai(t,e)}function pp(t,e){t.openElements.clearBackToTableContext(),t._insertElement(e,P.HTML),t.insertionMode=_.IN_TABLE_BODY}function gp(t,e){t.openElements.clearBackToTableContext(),t._insertFakeElement(w.TBODY,c.TBODY),t.insertionMode=_.IN_TABLE_BODY,tr(t,e)}function Ep(t,e){t.openElements.hasInTableScope(c.TABLE)&&(t.openElements.popUntilTagNamePopped(c.TABLE),t._resetInsertionMode(),t._processStartTag(e))}function bp(t,e){ju(e)?t._appendElement(e,P.HTML):xn(t,e),e.ackSelfClosing=!0}function Tp(t,e){!t.formElement&&t.openElements.tmplCount===0&&(t._insertElement(e,P.HTML),t.formElement=t.openElements.current,t.openElements.pop())}function vt(t,e){switch(e.tagID){case c.TD:case c.TH:case c.TR:{gp(t,e);break}case c.STYLE:case c.SCRIPT:case c.TEMPLATE:{Ke(t,e);break}case c.COL:{mp(t,e);break}case c.FORM:{Tp(t,e);break}case c.TABLE:{Ep(t,e);break}case c.TBODY:case c.TFOOT:case c.THEAD:{pp(t,e);break}case c.INPUT:{bp(t,e);break}case c.CAPTION:{dp(t,e);break}case c.COLGROUP:{hp(t,e);break}default:xn(t,e)}}function hn(t,e){switch(e.tagID){case c.TABLE:{t.openElements.hasInTableScope(c.TABLE)&&(t.openElements.popUntilTagNamePopped(c.TABLE),t._resetInsertionMode());break}case c.TEMPLATE:{yt(t,e);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(t,e)}}function xn(t,e){const n=t.fosterParentingEnabled;t.fosterParentingEnabled=!0,Jn(t,e),t.fosterParentingEnabled=n}function Yu(t,e){t.pendingCharacterTokens.push(e)}function qu(t,e){t.pendingCharacterTokens.push(e),t.hasNonWhitespacePendingCharacterToken=!0}function Zt(t,e){let n=0;if(t.hasNonWhitespacePendingCharacterToken)for(;n<t.pendingCharacterTokens.length;n++)xn(t,t.pendingCharacterTokens[n]);else for(;n<t.pendingCharacterTokens.length;n++)t._insertCharacters(t.pendingCharacterTokens[n]);t.insertionMode=t.originalInsertionMode,t._processToken(e)}const Vu=new Set([c.CAPTION,c.COL,c.COLGROUP,c.TBODY,c.TD,c.TFOOT,c.TH,c.THEAD,c.TR]);function xp(t,e){const n=e.tagID;Vu.has(n)?t.openElements.hasInTableScope(c.CAPTION)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(c.CAPTION),t.activeFormattingElements.clearToLastMarker(),t.insertionMode=_.IN_TABLE,vt(t,e)):De(t,e)}function _p(t,e){const n=e.tagID;switch(n){case c.CAPTION:case c.TABLE:{t.openElements.hasInTableScope(c.CAPTION)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(c.CAPTION),t.activeFormattingElements.clearToLastMarker(),t.insertionMode=_.IN_TABLE,n===c.TABLE&&hn(t,e));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:er(t,e)}}function Ai(t,e){switch(e.tagID){case c.HTML:{De(t,e);break}case c.COL:{t._appendElement(e,P.HTML),e.ackSelfClosing=!0;break}case c.TEMPLATE:{Ke(t,e);break}default:Fn(t,e)}}function Ap(t,e){switch(e.tagID){case c.COLGROUP:{t.openElements.currentTagId===c.COLGROUP&&(t.openElements.pop(),t.insertionMode=_.IN_TABLE);break}case c.TEMPLATE:{yt(t,e);break}case c.COL:break;default:Fn(t,e)}}function Fn(t,e){t.openElements.currentTagId===c.COLGROUP&&(t.openElements.pop(),t.insertionMode=_.IN_TABLE,t._processToken(e))}function tr(t,e){switch(e.tagID){case c.TR:{t.openElements.clearBackToTableBodyContext(),t._insertElement(e,P.HTML),t.insertionMode=_.IN_ROW;break}case c.TH:case c.TD:{t.openElements.clearBackToTableBodyContext(),t._insertFakeElement(w.TR,c.TR),t.insertionMode=_.IN_ROW,nr(t,e);break}case c.CAPTION:case c.COL:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:{t.openElements.hasTableBodyContextInTableScope()&&(t.openElements.clearBackToTableBodyContext(),t.openElements.pop(),t.insertionMode=_.IN_TABLE,vt(t,e));break}default:vt(t,e)}}function Ur(t,e){const n=e.tagID;switch(e.tagID){case c.TBODY:case c.TFOOT:case c.THEAD:{t.openElements.hasInTableScope(n)&&(t.openElements.clearBackToTableBodyContext(),t.openElements.pop(),t.insertionMode=_.IN_TABLE);break}case c.TABLE:{t.openElements.hasTableBodyContextInTableScope()&&(t.openElements.clearBackToTableBodyContext(),t.openElements.pop(),t.insertionMode=_.IN_TABLE,hn(t,e));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:hn(t,e)}}function nr(t,e){switch(e.tagID){case c.TH:case c.TD:{t.openElements.clearBackToTableRowContext(),t._insertElement(e,P.HTML),t.insertionMode=_.IN_CELL,t.activeFormattingElements.insertMarker();break}case c.CAPTION:case c.COL:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:case c.TR:{t.openElements.hasInTableScope(c.TR)&&(t.openElements.clearBackToTableRowContext(),t.openElements.pop(),t.insertionMode=_.IN_TABLE_BODY,tr(t,e));break}default:vt(t,e)}}function Wu(t,e){switch(e.tagID){case c.TR:{t.openElements.hasInTableScope(c.TR)&&(t.openElements.clearBackToTableRowContext(),t.openElements.pop(),t.insertionMode=_.IN_TABLE_BODY);break}case c.TABLE:{t.openElements.hasInTableScope(c.TR)&&(t.openElements.clearBackToTableRowContext(),t.openElements.pop(),t.insertionMode=_.IN_TABLE_BODY,Ur(t,e));break}case c.TBODY:case c.TFOOT:case c.THEAD:{(t.openElements.hasInTableScope(e.tagID)||t.openElements.hasInTableScope(c.TR))&&(t.openElements.clearBackToTableRowContext(),t.openElements.pop(),t.insertionMode=_.IN_TABLE_BODY,Ur(t,e));break}case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:case c.TD:case c.TH:break;default:hn(t,e)}}function kp(t,e){const n=e.tagID;Vu.has(n)?(t.openElements.hasInTableScope(c.TD)||t.openElements.hasInTableScope(c.TH))&&(t._closeTableCell(),nr(t,e)):De(t,e)}function Cp(t,e){const n=e.tagID;switch(n){case c.TD:case c.TH:{t.openElements.hasInTableScope(n)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(n),t.activeFormattingElements.clearToLastMarker(),t.insertionMode=_.IN_ROW);break}case c.TABLE:case c.TBODY:case c.TFOOT:case c.THEAD:case c.TR:{t.openElements.hasInTableScope(n)&&(t._closeTableCell(),Wu(t,e));break}case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:break;default:er(t,e)}}function Gu(t,e){switch(e.tagID){case c.HTML:{De(t,e);break}case c.OPTION:{t.openElements.currentTagId===c.OPTION&&t.openElements.pop(),t._insertElement(e,P.HTML);break}case c.OPTGROUP:{t.openElements.currentTagId===c.OPTION&&t.openElements.pop(),t.openElements.currentTagId===c.OPTGROUP&&t.openElements.pop(),t._insertElement(e,P.HTML);break}case c.HR:{t.openElements.currentTagId===c.OPTION&&t.openElements.pop(),t.openElements.currentTagId===c.OPTGROUP&&t.openElements.pop(),t._appendElement(e,P.HTML),e.ackSelfClosing=!0;break}case c.INPUT:case c.KEYGEN:case c.TEXTAREA:case c.SELECT:{t.openElements.hasInSelectScope(c.SELECT)&&(t.openElements.popUntilTagNamePopped(c.SELECT),t._resetInsertionMode(),e.tagID!==c.SELECT&&t._processStartTag(e));break}case c.SCRIPT:case c.TEMPLATE:{Ke(t,e);break}}}function Qu(t,e){switch(e.tagID){case c.OPTGROUP:{t.openElements.stackTop>0&&t.openElements.currentTagId===c.OPTION&&t.openElements.tagIDs[t.openElements.stackTop-1]===c.OPTGROUP&&t.openElements.pop(),t.openElements.currentTagId===c.OPTGROUP&&t.openElements.pop();break}case c.OPTION:{t.openElements.currentTagId===c.OPTION&&t.openElements.pop();break}case c.SELECT:{t.openElements.hasInSelectScope(c.SELECT)&&(t.openElements.popUntilTagNamePopped(c.SELECT),t._resetInsertionMode());break}case c.TEMPLATE:{yt(t,e);break}}}function Np(t,e){const n=e.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?(t.openElements.popUntilTagNamePopped(c.SELECT),t._resetInsertionMode(),t._processStartTag(e)):Gu(t,e)}function Sp(t,e){const n=e.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?t.openElements.hasInTableScope(n)&&(t.openElements.popUntilTagNamePopped(c.SELECT),t._resetInsertionMode(),t.onEndTag(e)):Qu(t,e)}function yp(t,e){switch(e.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:{Ke(t,e);break}case c.CAPTION:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:{t.tmplInsertionModeStack[0]=_.IN_TABLE,t.insertionMode=_.IN_TABLE,vt(t,e);break}case c.COL:{t.tmplInsertionModeStack[0]=_.IN_COLUMN_GROUP,t.insertionMode=_.IN_COLUMN_GROUP,Ai(t,e);break}case c.TR:{t.tmplInsertionModeStack[0]=_.IN_TABLE_BODY,t.insertionMode=_.IN_TABLE_BODY,tr(t,e);break}case c.TD:case c.TH:{t.tmplInsertionModeStack[0]=_.IN_ROW,t.insertionMode=_.IN_ROW,nr(t,e);break}default:t.tmplInsertionModeStack[0]=_.IN_BODY,t.insertionMode=_.IN_BODY,De(t,e)}}function Ip(t,e){e.tagID===c.TEMPLATE&&yt(t,e)}function Ku(t,e){t.openElements.tmplCount>0?(t.openElements.popUntilTagNamePopped(c.TEMPLATE),t.activeFormattingElements.clearToLastMarker(),t.tmplInsertionModeStack.shift(),t._resetInsertionMode(),t.onEof(e)):_i(t,e)}function wp(t,e){e.tagID===c.HTML?De(t,e):Hn(t,e)}function Xu(t,e){var n;if(e.tagID===c.HTML){if(t.fragmentContext||(t.insertionMode=_.AFTER_AFTER_BODY),t.options.sourceCodeLocationInfo&&t.openElements.tagIDs[0]===c.HTML){t._setEndLocation(t.openElements.items[0],e);const r=t.openElements.items[1];r&&!(!((n=t.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&t._setEndLocation(r,e)}}else Hn(t,e)}function Hn(t,e){t.insertionMode=_.IN_BODY,Jn(t,e)}function Lp(t,e){switch(e.tagID){case c.HTML:{De(t,e);break}case c.FRAMESET:{t._insertElement(e,P.HTML);break}case c.FRAME:{t._appendElement(e,P.HTML),e.ackSelfClosing=!0;break}case c.NOFRAMES:{Ke(t,e);break}}}function Rp(t,e){e.tagID===c.FRAMESET&&!t.openElements.isRootHtmlElementCurrent()&&(t.openElements.pop(),!t.fragmentContext&&t.openElements.currentTagId!==c.FRAMESET&&(t.insertionMode=_.AFTER_FRAMESET))}function Op(t,e){switch(e.tagID){case c.HTML:{De(t,e);break}case c.NOFRAMES:{Ke(t,e);break}}}function Dp(t,e){e.tagID===c.HTML&&(t.insertionMode=_.AFTER_AFTER_FRAMESET)}function Pp(t,e){e.tagID===c.HTML?De(t,e):Rn(t,e)}function Rn(t,e){t.insertionMode=_.IN_BODY,Jn(t,e)}function Mp(t,e){switch(e.tagID){case c.HTML:{De(t,e);break}case c.NOFRAMES:{Ke(t,e);break}}}function vp(t,e){e.chars=_e,t._insertCharacters(e)}function Bp(t,e){t._insertCharacters(e),t.framesetOk=!1}function Zu(t){for(;t.treeAdapter.getNamespaceURI(t.openElements.current)!==P.HTML&&t.openElements.currentTagId!==void 0&&!t._isIntegrationPoint(t.openElements.currentTagId,t.openElements.current);)t.openElements.pop()}function Fp(t,e){if(Jm(e))Zu(t),t._startTagOutsideForeignContent(e);else{const n=t._getAdjustedCurrentElement(),r=t.treeAdapter.getNamespaceURI(n);r===P.MATHML?Mu(e):r===P.SVG&&(e1(e),vu(e)),Ti(e),e.selfClosing?t._appendElement(e,r):t._insertElement(e,r),e.ackSelfClosing=!0}}function Hp(t,e){if(e.tagID===c.P||e.tagID===c.BR){Zu(t),t._endTagOutsideForeignContent(e);return}for(let n=t.openElements.stackTop;n>0;n--){const r=t.openElements.items[n];if(t.treeAdapter.getNamespaceURI(r)===P.HTML){t._endTagOutsideForeignContent(e);break}const i=t.treeAdapter.getTagName(r);if(i.toLowerCase()===e.tagName){e.tagName=i,t.openElements.shortenToLength(n);break}}}w.AREA,w.BASE,w.BASEFONT,w.BGSOUND,w.BR,w.COL,w.EMBED,w.FRAME,w.HR,w.IMG,w.INPUT,w.KEYGEN,w.LINK,w.META,w.PARAM,w.SOURCE,w.TRACK,w.WBR;const Up=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,jp=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),zs={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Ju(t,e){const n=Xp(t),r=Cu("type",{handlers:{root:zp,element:$p,text:Yp,comment:to,doctype:qp,raw:Wp},unknown:Gp}),i={parser:n?new Hs(zs):Hs.getFragmentParser(void 0,zs),handle(u){r(u,i)},stitches:!1,options:e||{}};r(t,i),zt(i,et());const s=n?i.parser.document:i.parser.getFragment(),a=Zh(s,{file:i.options.file});return i.stitches&&Zn(a,"comment",function(u,o,l){const f=u;if(f.value.stitch&&l&&o!==void 0){const d=l.children;return d[o]=f.value.stitch,o}}),a.type==="root"&&a.children.length===1&&a.children[0].type===t.type?a.children[0]:a}function eo(t,e){let n=-1;if(t)for(;++n<t.length;)e.handle(t[n])}function zp(t,e){eo(t.children,e)}function $p(t,e){Qp(t,e),eo(t.children,e),Kp(t,e)}function Yp(t,e){e.parser.tokenizer.state>4&&(e.parser.tokenizer.state=0);const n={type:ne.CHARACTER,chars:t.value,location:_n(t)};zt(e,et(t)),e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)}function qp(t,e){const n={type:ne.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:_n(t)};zt(e,et(t)),e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)}function Vp(t,e){e.stitches=!0;const n=Zp(t);if("children"in t&&"children"in n){const r=Ju({type:"root",children:t.children},e.options);n.children=r.children}to({type:"comment",value:{stitch:n}},e)}function to(t,e){const n=t.value,r={type:ne.COMMENT,data:n,location:_n(t)};zt(e,et(t)),e.parser.currentToken=r,e.parser._processToken(e.parser.currentToken)}function Wp(t,e){if(e.parser.tokenizer.preprocessor.html="",e.parser.tokenizer.preprocessor.pos=-1,e.parser.tokenizer.preprocessor.lastGapPos=-2,e.parser.tokenizer.preprocessor.gapStack=[],e.parser.tokenizer.preprocessor.skipNextNewLine=!1,e.parser.tokenizer.preprocessor.lastChunkWritten=!1,e.parser.tokenizer.preprocessor.endOfChunkHit=!1,e.parser.tokenizer.preprocessor.isEol=!1,no(e,et(t)),e.parser.tokenizer.write(e.options.tagfilter?t.value.replace(Up,"<$1$2"):t.value,!1),e.parser.tokenizer._runParsingLoop(),e.parser.tokenizer.state===72||e.parser.tokenizer.state===78){e.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=e.parser.tokenizer._consume();e.parser.tokenizer._callState(n)}}function Gp(t,e){const n=t;if(e.options.passThrough&&e.options.passThrough.includes(n.type))Vp(n,e);else{let r="";throw jp.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 zt(t,e){no(t,e);const n=t.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=t.parser.tokenizer.preprocessor.line,n.location.endCol=t.parser.tokenizer.preprocessor.col+1,n.location.endOffset=t.parser.tokenizer.preprocessor.offset+1,t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)),t.parser.tokenizer.paused=!1,t.parser.tokenizer.inLoop=!1,t.parser.tokenizer.active=!1,t.parser.tokenizer.returnState=Ce.DATA,t.parser.tokenizer.charRefCode=-1,t.parser.tokenizer.consumedAfterSnapshot=-1,t.parser.tokenizer.currentLocation=null,t.parser.tokenizer.currentCharacterToken=null,t.parser.tokenizer.currentToken=null,t.parser.tokenizer.currentAttr={name:"",value:""}}function no(t,e){if(e&&e.offset!==void 0){const n={startLine:e.line,startCol:e.column,startOffset:e.offset,endLine:-1,endCol:-1,endOffset:-1};t.parser.tokenizer.preprocessor.lineStartPos=-e.column+1,t.parser.tokenizer.preprocessor.droppedBufferSize=e.offset,t.parser.tokenizer.preprocessor.line=e.line,t.parser.tokenizer.currentLocation=n}}function Qp(t,e){const n=t.tagName.toLowerCase();if(e.parser.tokenizer.state===Ce.PLAINTEXT)return;zt(e,et(t));const r=e.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:bt.html;i===bt.html&&n==="svg"&&(i=bt.svg);const s=rm({...t,children:[]},{space:i===bt.svg?"svg":"html"}),a={type:ne.START_TAG,tagName:n,tagID:jt(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in s?s.attrs:[],location:_n(t)};e.parser.currentToken=a,e.parser._processToken(e.parser.currentToken),e.parser.tokenizer.lastStartTagName=n}function Kp(t,e){const n=t.tagName.toLowerCase();if(!e.parser.tokenizer.inForeignNode&&fm.includes(n)||e.parser.tokenizer.state===Ce.PLAINTEXT)return;zt(e,Vn(t));const r={type:ne.END_TAG,tagName:n,tagID:jt(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:_n(t)};e.parser.currentToken=r,e.parser._processToken(e.parser.currentToken),n===e.parser.tokenizer.lastStartTagName&&(e.parser.tokenizer.state===Ce.RCDATA||e.parser.tokenizer.state===Ce.RAWTEXT||e.parser.tokenizer.state===Ce.SCRIPT_DATA)&&(e.parser.tokenizer.state=Ce.DATA)}function Xp(t){const e=t.type==="root"?t.children[0]:t;return!!(e&&(e.type==="doctype"||e.type==="element"&&e.tagName.toLowerCase()==="html"))}function _n(t){const e=et(t)||{line:void 0,column:void 0,offset:void 0},n=Vn(t)||{line:void 0,column:void 0,offset:void 0};return{startLine:e.line,startCol:e.column,startOffset:e.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function Zp(t){return"children"in t?Mt({...t,children:[]}):Mt(t)}function Jp(t){return function(e,n){return Ju(e,{...t,file:n})}}function $s(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(e);for(;i!==-1;)r++,i=n.indexOf(e,i+e.length);return r}function eg(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function tg(t,e,n){const i=Kn((n||{}).ignore||[]),s=ng(e);let a=-1;for(;++a<s.length;)Tu(t,"text",u);function u(l,f){let d=-1,m;for(;++d<f.length;){const h=f[d],g=m?m.children:void 0;if(i(h,g?g.indexOf(h):void 0,m))return;m=h}if(m)return o(l,f)}function o(l,f){const d=f[f.length-1],m=s[a][0],h=s[a][1];let g=0;const C=d.children.indexOf(l);let T=!1,S=[];m.lastIndex=0;let N=m.exec(l.value);for(;N;){const L=N.index,O={index:N.index,input:N.input,stack:[...f,l]};let y=h(...N,O);if(typeof y=="string"&&(y=y.length>0?{type:"text",value:y}:void 0),y===!1?m.lastIndex=L+1:(g!==L&&S.push({type:"text",value:l.value.slice(g,L)}),Array.isArray(y)?S.push(...y):y&&S.push(y),g=L+N[0].length,T=!0),!m.global)break;N=m.exec(l.value)}return T?(g<l.value.length&&S.push({type:"text",value:l.value.slice(g)}),d.children.splice(C,1,...S)):S=[l],C+S.length}}function ng(t){const e=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!t[0]||Array.isArray(t[0])?t:[t];let r=-1;for(;++r<n.length;){const i=n[r];e.push([rg(i[0]),ig(i[1])])}return e}function rg(t){return typeof t=="string"?new RegExp(eg(t),"g"):t}function ig(t){return typeof t=="function"?t:function(){return t}}const xr="phrasing",_r=["autolink","link","image","label"];function sg(){return{transforms:[dg],enter:{literalAutolink:ug,literalAutolinkEmail:Ar,literalAutolinkHttp:Ar,literalAutolinkWww:Ar},exit:{literalAutolink:fg,literalAutolinkEmail:cg,literalAutolinkHttp:og,literalAutolinkWww:lg}}}function ag(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:xr,notInConstruct:_r},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:xr,notInConstruct:_r},{character:":",before:"[ps]",after:"\\/",inConstruct:xr,notInConstruct:_r}]}}function ug(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function Ar(t){this.config.enter.autolinkProtocol.call(this,t)}function og(t){this.config.exit.autolinkProtocol.call(this,t)}function lg(t){this.config.exit.data.call(this,t);const e=this.stack[this.stack.length-1];e.type,e.url="http://"+this.sliceSerialize(t)}function cg(t){this.config.exit.autolinkEmail.call(this,t)}function fg(t){this.exit(t)}function dg(t){tg(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,hg],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),mg]],{ignore:["link","linkReference"]})}function hg(t,e,n,r,i){let s="";if(!ro(i)||(/^w/i.test(e)&&(n=e+n,e="",s="http://"),!pg(n)))return!1;const a=gg(n+r);if(!a[0])return!1;const u={type:"link",title:null,url:s+e+a[0],children:[{type:"text",value:e+a[0]}]};return a[1]?[u,{type:"text",value:a[1]}]:u}function mg(t,e,n,r){return!ro(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+n,children:[{type:"text",value:e+"@"+n}]}}function pg(t){const e=t.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}function gg(t){const e=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let n=e[0],r=n.indexOf(")");const i=$s(t,"(");let s=$s(t,")");for(;r!==-1&&i>s;)t+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[t,n]}function ro(t,e){const n=t.input.charCodeAt(t.index-1);return(t.index===0||kt(n)||Wn(n))&&(!e||n!==47)}io.peek=Ng;function Eg(){this.buffer()}function bg(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function Tg(){this.buffer()}function xg(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function _g(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ge(this.sliceSerialize(t)).toLowerCase(),n.label=e}function Ag(t){this.exit(t)}function kg(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ge(this.sliceSerialize(t)).toLowerCase(),n.label=e}function Cg(t){this.exit(t)}function Ng(){return"["}function io(t,e,n,r){const i=n.createTracker(r);let s=i.move("[^");const a=n.enter("footnoteReference"),u=n.enter("reference");return s+=i.move(n.safe(n.associationId(t),{after:"]",before:s})),u(),a(),s+=i.move("]"),s}function Sg(){return{enter:{gfmFootnoteCallString:Eg,gfmFootnoteCall:bg,gfmFootnoteDefinitionLabelString:Tg,gfmFootnoteDefinition:xg},exit:{gfmFootnoteCallString:_g,gfmFootnoteCall:Ag,gfmFootnoteDefinitionLabelString:kg,gfmFootnoteDefinition:Cg}}}function yg(t){let e=!1;return t&&t.firstLineBlank&&(e=!0),{handlers:{footnoteDefinition:n,footnoteReference:io},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,a){const u=s.createTracker(a);let o=u.move("[^");const l=s.enter("footnoteDefinition"),f=s.enter("label");return o+=u.move(s.safe(s.associationId(r),{before:o,after:"]"})),f(),o+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),o+=u.move((e?`
|
|
72
|
-
`:" ")+s.indentLines(s.containerFlow(r,u.current()),e?so:
|
|
73
|
-
`)}function
|
|
74
|
-
`&&
|
|
75
|
-
`}function
|
|
69
|
+
`}),n}function Es(t){let e=0,n=t.charCodeAt(e);for(;n===9||n===32;)e++,n=t.charCodeAt(e);return t.slice(e)}function bs(t,e){const n=ah(t,e),r=n.one(t,void 0),i=K0(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
|
|
70
|
+
`},i),s}function fh(t,e){return t&&"run"in t?async function(n,r){const i=bs(n,{file:r,...e});await t.run(i,r)}:function(n,r){return bs(n,{file:r,...t||e})}}function Ts(t){if(t)throw t}var cr,xs;function dh(){if(xs)return cr;xs=1;var t=Object.prototype.hasOwnProperty,e=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(l){return typeof Array.isArray=="function"?Array.isArray(l):e.call(l)==="[object Array]"},s=function(l){if(!l||e.call(l)!=="[object Object]")return!1;var f=t.call(l,"constructor"),d=l.constructor&&l.constructor.prototype&&t.call(l.constructor.prototype,"isPrototypeOf");if(l.constructor&&!f&&!d)return!1;var m;for(m in l);return typeof m>"u"||t.call(l,m)},a=function(l,f){n&&f.name==="__proto__"?n(l,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):l[f.name]=f.newValue},u=function(l,f){if(f==="__proto__")if(t.call(l,f)){if(r)return r(l,f).value}else return;return l[f]};return cr=function o(){var l,f,d,m,h,g,k=arguments[0],C=1,T=arguments.length,S=!1;for(typeof k=="boolean"&&(S=k,k=arguments[1]||{},C=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});C<T;++C)if(l=arguments[C],l!=null)for(f in l)d=u(k,f),m=u(l,f),k!==m&&(S&&m&&(s(m)||(h=i(m)))?(h?(h=!1,g=d&&i(d)?d:[]):g=d&&s(d)?d:{},a(k,{name:f,newValue:o(S,g,m)})):typeof m<"u"&&a(k,{name:f,newValue:m}));return k},cr}var hh=dh();const fr=ra(hh);function Pr(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function mh(){const t=[],e={run:n,use:r};return e;function n(...i){let s=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);u(null,...i);function u(o,...l){const f=t[++s];let d=-1;if(o){a(o);return}for(;++d<i.length;)(l[d]===null||l[d]===void 0)&&(l[d]=i[d]);i=l,f?ph(f,u)(...l):a(null,...l)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return t.push(i),e}}function ph(t,e){let n;return r;function r(...a){const u=t.length>a.length;let o;u&&a.push(i);try{o=t.apply(this,a)}catch(l){const f=l;if(u&&n)throw f;return i(f)}u||(o&&o.then&&typeof o.then=="function"?o.then(s,i):o instanceof Error?i(o):s(o))}function i(a,...u){n||(n=!0,e(a,...u))}function s(a){i(null,a)}}const Ze={basename:gh,dirname:Eh,extname:bh,join:Th,sep:"/"};function gh(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');Tn(t);let n=0,r=-1,i=t.length,s;if(e===void 0||e.length===0||e.length>t.length){for(;i--;)if(t.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":t.slice(n,r)}if(e===t)return"";let a=-1,u=e.length-1;for(;i--;)if(t.codePointAt(i)===47){if(s){n=i+1;break}}else a<0&&(s=!0,a=i+1),u>-1&&(t.codePointAt(i)===e.codePointAt(u--)?u<0&&(r=i):(u=-1,r=a));return n===r?r=a:r<0&&(r=t.length),t.slice(n,r)}function Eh(t){if(Tn(t),t.length===0)return".";let e=-1,n=t.length,r;for(;--n;)if(t.codePointAt(n)===47){if(r){e=n;break}}else r||(r=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function bh(t){Tn(t);let e=t.length,n=-1,r=0,i=-1,s=0,a;for(;e--;){const u=t.codePointAt(e);if(u===47){if(a){r=e+1;break}continue}n<0&&(a=!0,n=e+1),u===46?i<0?i=e:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":t.slice(i,n)}function Th(...t){let e=-1,n;for(;++e<t.length;)Tn(t[e]),t[e]&&(n=n===void 0?t[e]:n+"/"+t[e]);return n===void 0?".":xh(n)}function xh(t){Tn(t);const e=t.codePointAt(0)===47;let n=_h(t,!e);return n.length===0&&!e&&(n="."),n.length>0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function _h(t,e){let n="",r=0,i=-1,s=0,a=-1,u,o;for(;++a<=t.length;){if(a<t.length)u=t.codePointAt(a);else{if(u===47)break;u=47}if(u===47){if(!(i===a-1||s===1))if(i!==a-1&&s===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=a,s=0;continue}}else if(n.length>0){n="",r=0,i=a,s=0;continue}}e&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+t.slice(i+1,a):n=t.slice(i+1,a),r=a-i-1;i=a,s=0}else u===46&&s>-1?s++:s=-1}return n}function Tn(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const Ah={cwd:kh};function kh(){return"/"}function Mr(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function Ch(t){if(typeof t=="string")t=new URL(t);else if(!Mr(t)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return Nh(t)}function Nh(t){if(t.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 e=t.pathname;let n=-1;for(;++n<e.length;)if(e.codePointAt(n)===37&&e.codePointAt(n+1)===50){const r=e.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(e)}const dr=["history","path","basename","stem","extname","dirname"];class xu{constructor(e){let n;e?Mr(e)?n={path:e}:typeof e=="string"||Sh(e)?n={value:e}:n=e:n={},this.cwd="cwd"in n?"":Ah.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<dr.length;){const s=dr[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)dr.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Ze.basename(this.path):void 0}set basename(e){mr(e,"basename"),hr(e,"basename"),this.path=Ze.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?Ze.dirname(this.path):void 0}set dirname(e){_s(this.basename,"dirname"),this.path=Ze.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?Ze.extname(this.path):void 0}set extname(e){if(hr(e,"extname"),_s(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=Ze.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Mr(e)&&(e=Ch(e)),mr(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?Ze.basename(this.path,this.extname):void 0}set stem(e){mr(e,"stem"),hr(e,"stem"),this.path=Ze.join(this.dirname||"",e+(this.extname||""))}fail(e,n,r){const i=this.message(e,n,r);throw i.fatal=!0,i}info(e,n,r){const i=this.message(e,n,r);return i.fatal=void 0,i}message(e,n,r){const i=new Oe(e,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}}function hr(t,e){if(t&&t.includes(Ze.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+Ze.sep+"`")}function mr(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function _s(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function Sh(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const yh=(function(t){const r=this.constructor.prototype,i=r[t],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s}),Ih={}.hasOwnProperty;class Ei extends yh{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=mh()}copy(){const e=new Ei;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];e.use(...r)}return e.data(fr(!0,{},this.namespace)),e}data(e,n){return typeof e=="string"?arguments.length===2?(Er("data",this.frozen),this.namespace[e]=n,this):Ih.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Er("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=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(e,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const n=Nn(e),r=this.parser||this.Parser;return pr("parse",r),r(String(n),n)}process(e,n){const r=this;return this.freeze(),pr("process",this.parser||this.Parser),gr("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,a){const u=Nn(e),o=r.parse(u);r.run(o,u,function(f,d,m){if(f||!d||!m)return l(f);const h=d,g=r.stringify(h,m);Rh(g)?m.value=g:m.result=g,l(f,m)});function l(f,d){f||!d?a(f):s?s(d):n(void 0,d)}}}processSync(e){let n=!1,r;return this.freeze(),pr("processSync",this.parser||this.Parser),gr("processSync",this.compiler||this.Compiler),this.process(e,i),ks("processSync","process",n),r;function i(s,a){n=!0,Ts(s),r=a}}run(e,n,r){As(e),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(a,u){const o=Nn(n);i.run(e,o,l);function l(f,d,m){const h=d||e;f?u(f):a?a(h):r(void 0,h,m)}}}runSync(e,n){let r=!1,i;return this.run(e,n,s),ks("runSync","run",r),i;function s(a,u){Ts(a),i=u,r=!0}}stringify(e,n){this.freeze();const r=Nn(n),i=this.compiler||this.Compiler;return gr("stringify",i),As(e),i(e,r)}use(e,...n){const r=this.attachers,i=this.namespace;if(Er("use",this.frozen),e!=null)if(typeof e=="function")o(e,n);else if(typeof e=="object")Array.isArray(e)?u(e):a(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function s(l){if(typeof l=="function")o(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[f,...d]=l;o(f,d)}else a(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function a(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");u(l.plugins),l.settings&&(i.settings=fr(!0,i.settings,l.settings))}function u(l){let f=-1;if(l!=null)if(Array.isArray(l))for(;++f<l.length;){const d=l[f];s(d)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function o(l,f){let d=-1,m=-1;for(;++d<r.length;)if(r[d][0]===l){m=d;break}if(m===-1)r.push([l,...f]);else if(f.length>0){let[h,...g]=f;const k=r[m][1];Pr(k)&&Pr(h)&&(h=fr(!0,k,h)),r[m]=[l,h,...g]}}}}const wh=new Ei().freeze();function pr(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function gr(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function Er(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function As(t){if(!Pr(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function ks(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function Nn(t){return Lh(t)?t:new xu(t)}function Lh(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function Rh(t){return typeof t=="string"||Oh(t)}function Oh(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const Dh="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Cs=[],Ns={allowDangerousHtml:!0},Ph=/^(https?|ircs?|mailto|xmpp)$/i,Mh=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function vh(t){const e=Bh(t),n=Fh(t);return Hh(e.runSync(e.parse(n),n),t)}function Bh(t){const e=t.rehypePlugins||Cs,n=t.remarkPlugins||Cs,r=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...Ns}:Ns;return wh().use(E0).use(n).use(fh,r).use(e)}function Fh(t){const e=t.children||"",n=new xu;return typeof e=="string"&&(n.value=e),n}function Hh(t,e){const n=e.allowedElements,r=e.allowElement,i=e.components,s=e.disallowedElements,a=e.skipHtml,u=e.unwrapDisallowed,o=e.urlTransform||Uh;for(const f of Mh)Object.hasOwn(e,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+Dh+f.id,void 0);return e.className&&(t={type:"element",tagName:"div",properties:{className:e.className},children:t.type==="root"?t.children:[t]}),Zn(t,l),Jc(t,{Fragment:p.Fragment,components:i,ignoreInvalidStyle:!0,jsx:p.jsx,jsxs:p.jsxs,passKeys:!0,passNode:!0});function l(f,d,m){if(f.type==="raw"&&m&&typeof d=="number")return a?m.children.splice(d,1):m.children[d]={type:"text",value:f.value},d;if(f.type==="element"){let h;for(h in ur)if(Object.hasOwn(ur,h)&&Object.hasOwn(f.properties,h)){const g=f.properties[h],k=ur[h];(k===null||k.includes(f.tagName))&&(f.properties[h]=o(String(g||""),h,f))}}if(f.type==="element"){let h=n?!n.includes(f.tagName):s?s.includes(f.tagName):!1;if(!h&&r&&typeof d=="number"&&(h=!r(f,d,m)),h&&m&&typeof d=="number")return u&&f.children?m.children.splice(d,1,...f.children):m.children.splice(d,1),d}}}function Uh(t){const e=t.indexOf(":"),n=t.indexOf("?"),r=t.indexOf("#"),i=t.indexOf("/");return e===-1||i!==-1&&e>i||n!==-1&&e>n||r!==-1&&e>r||Ph.test(t.slice(0,e))?t:""}const Ss=/[#.]/g;function jh(t,e){const n=t||"",r={};let i=0,s,a;for(;i<n.length;){Ss.lastIndex=i;const u=Ss.exec(n),o=n.slice(i,u?u.index:n.length);o&&(s?s==="#"?r.id=o:Array.isArray(r.className)?r.className.push(o):r.className=[o]:a=o,i+=o.length),u&&(s=u[0],i++)}return{type:"element",tagName:a||e||"div",properties:r,children:[]}}function _u(t,e,n){const r=n?qh(n):void 0;function i(s,a,...u){let o;if(s==null){o={type:"root",children:[]};const l=a;u.unshift(l)}else{o=jh(s,e);const l=o.tagName.toLowerCase(),f=r?r.get(l):void 0;if(o.tagName=f||l,zh(a))u.unshift(a);else for(const[d,m]of Object.entries(a))$h(t,o.properties,d,m)}for(const l of u)vr(o.children,l);return o.type==="element"&&o.tagName==="template"&&(o.content={type:"root",children:o.children},o.children=[]),o}return i}function zh(t){if(t===null||typeof t!="object"||Array.isArray(t))return!0;if(typeof t.type!="string")return!1;const e=t,n=Object.keys(t);for(const r of n){const i=e[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const s=i;for(const a of s)if(typeof a!="number"&&typeof a!="string")return!0}}return!!("children"in t&&Array.isArray(t.children))}function $h(t,e,n,r){const i=qn(t,n);let s;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;s=r}else typeof r=="boolean"?s=r:typeof r=="string"?i.spaceSeparated?s=Wi(r):i.commaSeparated?s=zi(r):i.commaOrSpaceSeparated?s=Wi(zi(r).join(" ")):s=ys(i,i.property,r):Array.isArray(r)?s=[...r]:s=i.property==="style"?Yh(r):String(r);if(Array.isArray(s)){const a=[];for(const u of s)a.push(ys(i,i.property,u));s=a}i.property==="className"&&Array.isArray(e.className)&&(s=e.className.concat(s)),e[i.property]=s}}function vr(t,e){if(e!=null)if(typeof e=="number"||typeof e=="string")t.push({type:"text",value:String(e)});else if(Array.isArray(e))for(const n of e)vr(t,n);else if(typeof e=="object"&&"type"in e)e.type==="root"?vr(t,e.children):t.push(e);else throw new Error("Expected node, nodes, or string, got `"+e+"`")}function ys(t,e,n){if(typeof n=="string"){if(t.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((t.boolean||t.overloadedBoolean)&&(n===""||fn(n)===fn(e)))return!0}return n}function Yh(t){const e=[];for(const[n,r]of Object.entries(t))e.push([n,r].join(": "));return e.join("; ")}function qh(t){const e=new Map;for(const n of t)e.set(n.toLowerCase(),n);return e}const Vh=["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"],Wh=_u(En,"div"),Gh=_u(ht,"g",Vh);function Qh(t){const e=String(t),n=[];return{toOffset:i,toPoint:r};function r(s){if(typeof s=="number"&&s>-1&&s<=e.length){let a=0;for(;;){let u=n[a];if(u===void 0){const o=Is(e,n[a-1]);u=o===-1?e.length+1:o+1,n[a]=u}if(u>s)return{line:a+1,column:s-(a>0?n[a-1]:0)+1,offset:s};a++}}}function i(s){if(s&&typeof s.line=="number"&&typeof s.column=="number"&&!Number.isNaN(s.line)&&!Number.isNaN(s.column)){for(;n.length<s.line;){const u=n[n.length-1],o=Is(e,u),l=o===-1?e.length+1:o+1;if(u===l)break;n.push(l)}const a=(s.line>1?n[s.line-2]:0)+s.column-1;if(a<n[s.line-1])return a}}}function Is(t,e){const n=t.indexOf("\r",e),r=t.indexOf(`
|
|
71
|
+
`,e);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const bt={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Au={}.hasOwnProperty,Kh=Object.prototype;function Xh(t,e){const n=e||{};return bi({file:n.file||void 0,location:!1,schema:n.space==="svg"?ht:En,verbose:n.verbose||!1},t)}function bi(t,e){let n;switch(e.nodeName){case"#comment":{const r=e;return n={type:"comment",value:r.data},Ln(t,r,n),n}case"#document":case"#document-fragment":{const r=e,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:ku(t,e.childNodes),data:{quirksMode:i}},t.file&&t.location){const s=String(t.file),a=Qh(s),u=a.toPoint(0),o=a.toPoint(s.length);n.position={start:u,end:o}}return n}case"#documentType":{const r=e;return n={type:"doctype"},Ln(t,r,n),n}case"#text":{const r=e;return n={type:"text",value:r.value},Ln(t,r,n),n}default:return n=Zh(t,e),n}}function ku(t,e){let n=-1;const r=[];for(;++n<e.length;){const i=bi(t,e[n]);r.push(i)}return r}function Zh(t,e){const n=t.schema;t.schema=e.namespaceURI===bt.svg?ht:En;let r=-1;const i={};for(;++r<e.attrs.length;){const u=e.attrs[r],o=(u.prefix?u.prefix+":":"")+u.name;Au.call(Kh,o)||(i[o]=u.value)}const a=(t.schema.space==="svg"?Gh:Wh)(e.tagName,i,ku(t,e.childNodes));if(Ln(t,e,a),a.tagName==="template"){const u=e,o=u.sourceCodeLocation,l=o&&o.startTag&&Rt(o.startTag),f=o&&o.endTag&&Rt(o.endTag),d=bi(t,u.content);l&&f&&t.file&&(d.position={start:l.end,end:f.start}),a.content=d}return t.schema=n,a}function Ln(t,e,n){if("sourceCodeLocation"in e&&e.sourceCodeLocation&&t.file){const r=Jh(t,n,e.sourceCodeLocation);r&&(t.location=!0,n.position=r)}}function Jh(t,e,n){const r=Rt(n);if(e.type==="element"){const i=e.children[e.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),t.verbose){const s={};let a;if(n.attrs)for(a in n.attrs)Au.call(n.attrs,a)&&(s[qn(t.schema,a).property]=Rt(n.attrs[a]));n.startTag;const u=Rt(n.startTag),o=n.endTag?Rt(n.endTag):void 0,l={opening:u};o&&(l.closing=o),l.properties=s,e.data={position:l}}}return r}function Rt(t){const e=ws({line:t.startLine,column:t.startCol,offset:t.startOffset}),n=ws({line:t.endLine,column:t.endCol,offset:t.endOffset});return e||n?{start:e,end:n}:void 0}function ws(t){return t.line&&t.column?t:void 0}const Ls={}.hasOwnProperty;function Cu(t,e){const n=e||{};function r(i,...s){let a=r.invalid;const u=r.handlers;if(i&&Ls.call(i,t)){const o=String(i[t]);a=Ls.call(u,o)?u[o]:r.unknown}if(a)return a.call(this,i,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const em={},tm={}.hasOwnProperty,Nu=Cu("type",{handlers:{root:rm,element:om,text:am,comment:um,doctype:sm}});function nm(t,e){const r=(e||em).space;return Nu(t,r==="svg"?ht:En)}function rm(t,e){const n={nodeName:"#document",mode:(t.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Ti(t.children,n,e),Ut(t,n),n}function im(t,e){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Ti(t.children,n,e),Ut(t,n),n}function sm(t){const e={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ut(t,e),e}function am(t){const e={nodeName:"#text",value:t.value,parentNode:null};return Ut(t,e),e}function um(t){const e={nodeName:"#comment",data:t.value,parentNode:null};return Ut(t,e),e}function om(t,e){const n=e;let r=n;t.type==="element"&&t.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=ht);const i=[];let s;if(t.properties){for(s in t.properties)if(s!=="children"&&tm.call(t.properties,s)){const o=lm(r,s,t.properties[s]);o&&i.push(o)}}const a=r.space,u={nodeName:t.tagName,tagName:t.tagName,attrs:i,namespaceURI:bt[a],childNodes:[],parentNode:null};return u.childNodes=Ti(t.children,u,r),Ut(t,u),t.tagName==="template"&&t.content&&(u.content=im(t.content,r)),u}function lm(t,e,n){const r=qn(t,e);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?Ha(n):Wa(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const s=i.name.indexOf(":");s<0?i.prefix="":(i.name=i.name.slice(s+1),i.prefix=r.attribute.slice(0,s)),i.namespace=bt[r.space]}return i}function Ti(t,e,n){let r=-1;const i=[];if(t)for(;++r<t.length;){const s=Nu(t[r],n);s.parentNode=e,i.push(s)}return i}function Ut(t,e){const n=t.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,e.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})}const cm=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],fm=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),_e="�";var E;(function(t){t[t.EOF=-1]="EOF",t[t.NULL=0]="NULL",t[t.TABULATION=9]="TABULATION",t[t.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",t[t.LINE_FEED=10]="LINE_FEED",t[t.FORM_FEED=12]="FORM_FEED",t[t.SPACE=32]="SPACE",t[t.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",t[t.QUOTATION_MARK=34]="QUOTATION_MARK",t[t.AMPERSAND=38]="AMPERSAND",t[t.APOSTROPHE=39]="APOSTROPHE",t[t.HYPHEN_MINUS=45]="HYPHEN_MINUS",t[t.SOLIDUS=47]="SOLIDUS",t[t.DIGIT_0=48]="DIGIT_0",t[t.DIGIT_9=57]="DIGIT_9",t[t.SEMICOLON=59]="SEMICOLON",t[t.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",t[t.EQUALS_SIGN=61]="EQUALS_SIGN",t[t.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",t[t.QUESTION_MARK=63]="QUESTION_MARK",t[t.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",t[t.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",t[t.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",t[t.GRAVE_ACCENT=96]="GRAVE_ACCENT",t[t.LATIN_SMALL_A=97]="LATIN_SMALL_A",t[t.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(E||(E={}));const He={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Su(t){return t>=55296&&t<=57343}function dm(t){return t>=56320&&t<=57343}function hm(t,e){return(t-55296)*1024+9216+e}function yu(t){return t!==32&&t!==10&&t!==13&&t!==9&&t!==12&&t>=1&&t<=31||t>=127&&t<=159}function Iu(t){return t>=64976&&t<=65007||fm.has(t)}var R;(function(t){t.controlCharacterInInputStream="control-character-in-input-stream",t.noncharacterInInputStream="noncharacter-in-input-stream",t.surrogateInInputStream="surrogate-in-input-stream",t.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",t.endTagWithAttributes="end-tag-with-attributes",t.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",t.unexpectedSolidusInTag="unexpected-solidus-in-tag",t.unexpectedNullCharacter="unexpected-null-character",t.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",t.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",t.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",t.missingEndTagName="missing-end-tag-name",t.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",t.unknownNamedCharacterReference="unknown-named-character-reference",t.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",t.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",t.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",t.eofBeforeTagName="eof-before-tag-name",t.eofInTag="eof-in-tag",t.missingAttributeValue="missing-attribute-value",t.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",t.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",t.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",t.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",t.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",t.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",t.missingDoctypePublicIdentifier="missing-doctype-public-identifier",t.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",t.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",t.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",t.cdataInHtmlContent="cdata-in-html-content",t.incorrectlyOpenedComment="incorrectly-opened-comment",t.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",t.eofInDoctype="eof-in-doctype",t.nestedComment="nested-comment",t.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",t.eofInComment="eof-in-comment",t.incorrectlyClosedComment="incorrectly-closed-comment",t.eofInCdata="eof-in-cdata",t.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",t.nullCharacterReference="null-character-reference",t.surrogateCharacterReference="surrogate-character-reference",t.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",t.controlCharacterReference="control-character-reference",t.noncharacterCharacterReference="noncharacter-character-reference",t.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",t.missingDoctypeName="missing-doctype-name",t.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",t.duplicateAttribute="duplicate-attribute",t.nonConformingDoctype="non-conforming-doctype",t.missingDoctype="missing-doctype",t.misplacedDoctype="misplaced-doctype",t.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",t.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",t.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",t.openElementsLeftAfterEof="open-elements-left-after-eof",t.abandonedHeadElementChild="abandoned-head-element-child",t.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",t.nestedNoscriptInHead="nested-noscript-in-head",t.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(R||(R={}));const mm=65536;class pm{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=mm,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,n){const{line:r,col:i,offset:s}=this,a=i+n,u=s+n;return{code:e,startLine:r,endLine:r,startCol:a,endCol:a,startOffset:u,endOffset:u}}_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 n=this.html.charCodeAt(this.pos+1);if(dm(n))return this.pos++,this._addGap(),hm(e,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,E.EOF;return this._err(R.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,n){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,n){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(e,this.pos);for(let r=0;r<e.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==e.charCodeAt(r))return!1;return!0}peek(e){const n=this.pos+e;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,E.EOF;const r=this.html.charCodeAt(n);return r===E.CARRIAGE_RETURN?E.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,E.EOF;let e=this.html.charCodeAt(this.pos);return e===E.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,E.LINE_FEED):e===E.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Su(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===E.LINE_FEED||e===E.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){yu(e)?this._err(R.controlCharacterInInputStream):Iu(e)&&this._err(R.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var ne;(function(t){t[t.CHARACTER=0]="CHARACTER",t[t.NULL_CHARACTER=1]="NULL_CHARACTER",t[t.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",t[t.START_TAG=3]="START_TAG",t[t.END_TAG=4]="END_TAG",t[t.COMMENT=5]="COMMENT",t[t.DOCTYPE=6]="DOCTYPE",t[t.EOF=7]="EOF",t[t.HIBERNATION=8]="HIBERNATION"})(ne||(ne={}));function wu(t,e){for(let n=t.attrs.length-1;n>=0;n--)if(t.attrs[n].name===e)return t.attrs[n].value;return null}const gm=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(t=>t.charCodeAt(0))),Em=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function bm(t){var e;return t>=55296&&t<=57343||t>1114111?65533:(e=Em.get(t))!==null&&e!==void 0?e:t}var ye;(function(t){t[t.NUM=35]="NUM",t[t.SEMI=59]="SEMI",t[t.EQUALS=61]="EQUALS",t[t.ZERO=48]="ZERO",t[t.NINE=57]="NINE",t[t.LOWER_A=97]="LOWER_A",t[t.LOWER_F=102]="LOWER_F",t[t.LOWER_X=120]="LOWER_X",t[t.LOWER_Z=122]="LOWER_Z",t[t.UPPER_A=65]="UPPER_A",t[t.UPPER_F=70]="UPPER_F",t[t.UPPER_Z=90]="UPPER_Z"})(ye||(ye={}));const Tm=32;var dt;(function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"})(dt||(dt={}));function Br(t){return t>=ye.ZERO&&t<=ye.NINE}function xm(t){return t>=ye.UPPER_A&&t<=ye.UPPER_F||t>=ye.LOWER_A&&t<=ye.LOWER_F}function _m(t){return t>=ye.UPPER_A&&t<=ye.UPPER_Z||t>=ye.LOWER_A&&t<=ye.LOWER_Z||Br(t)}function Am(t){return t===ye.EQUALS||_m(t)}var Se;(function(t){t[t.EntityStart=0]="EntityStart",t[t.NumericStart=1]="NumericStart",t[t.NumericDecimal=2]="NumericDecimal",t[t.NumericHex=3]="NumericHex",t[t.NamedEntity=4]="NamedEntity"})(Se||(Se={}));var it;(function(t){t[t.Legacy=0]="Legacy",t[t.Strict=1]="Strict",t[t.Attribute=2]="Attribute"})(it||(it={}));class km{constructor(e,n,r){this.decodeTree=e,this.emitCodePoint=n,this.errors=r,this.state=Se.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=it.Strict}startEntity(e){this.decodeMode=e,this.state=Se.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,n){switch(this.state){case Se.EntityStart:return e.charCodeAt(n)===ye.NUM?(this.state=Se.NumericStart,this.consumed+=1,this.stateNumericStart(e,n+1)):(this.state=Se.NamedEntity,this.stateNamedEntity(e,n));case Se.NumericStart:return this.stateNumericStart(e,n);case Se.NumericDecimal:return this.stateNumericDecimal(e,n);case Se.NumericHex:return this.stateNumericHex(e,n);case Se.NamedEntity:return this.stateNamedEntity(e,n)}}stateNumericStart(e,n){return n>=e.length?-1:(e.charCodeAt(n)|Tm)===ye.LOWER_X?(this.state=Se.NumericHex,this.consumed+=1,this.stateNumericHex(e,n+1)):(this.state=Se.NumericDecimal,this.stateNumericDecimal(e,n))}addToNumericResult(e,n,r,i){if(n!==r){const s=r-n;this.result=this.result*Math.pow(i,s)+Number.parseInt(e.substr(n,s),i),this.consumed+=s}}stateNumericHex(e,n){const r=n;for(;n<e.length;){const i=e.charCodeAt(n);if(Br(i)||xm(i))n+=1;else return this.addToNumericResult(e,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(e,r,n,16),-1}stateNumericDecimal(e,n){const r=n;for(;n<e.length;){const i=e.charCodeAt(n);if(Br(i))n+=1;else return this.addToNumericResult(e,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(e,r,n,10),-1}emitNumericEntity(e,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===ye.SEMI)this.consumed+=1;else if(this.decodeMode===it.Strict)return 0;return this.emitCodePoint(bm(this.result),this.consumed),this.errors&&(e!==ye.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,n){const{decodeTree:r}=this;let i=r[this.treeIndex],s=(i&dt.VALUE_LENGTH)>>14;for(;n<e.length;n++,this.excess++){const a=e.charCodeAt(n);if(this.treeIndex=Cm(r,i,this.treeIndex+Math.max(1,s),a),this.treeIndex<0)return this.result===0||this.decodeMode===it.Attribute&&(s===0||Am(a))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],s=(i&dt.VALUE_LENGTH)>>14,s!==0){if(a===ye.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==it.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:n,decodeTree:r}=this,i=(r[n]&dt.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[e]&~dt.VALUE_LENGTH:i[e+1],r),n===3&&this.emitCodePoint(i[e+2],r),r}end(){var e;switch(this.state){case Se.NamedEntity:return this.result!==0&&(this.decodeMode!==it.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Se.NumericDecimal:return this.emitNumericEntity(0,2);case Se.NumericHex:return this.emitNumericEntity(0,3);case Se.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Se.EntityStart:return 0}}}function Cm(t,e,n,r){const i=(e&dt.BRANCH_LENGTH)>>7,s=e&dt.JUMP_TABLE;if(i===0)return s!==0&&r===s?n:-1;if(s){const o=r-s;return o<0||o>=i?-1:t[n+o]-1}let a=n,u=a+i-1;for(;a<=u;){const o=a+u>>>1,l=t[o];if(l<r)a=o+1;else if(l>r)u=o-1;else return t[o+i]}return-1}var P;(function(t){t.HTML="http://www.w3.org/1999/xhtml",t.MATHML="http://www.w3.org/1998/Math/MathML",t.SVG="http://www.w3.org/2000/svg",t.XLINK="http://www.w3.org/1999/xlink",t.XML="http://www.w3.org/XML/1998/namespace",t.XMLNS="http://www.w3.org/2000/xmlns/"})(P||(P={}));var Tt;(function(t){t.TYPE="type",t.ACTION="action",t.ENCODING="encoding",t.PROMPT="prompt",t.NAME="name",t.COLOR="color",t.FACE="face",t.SIZE="size"})(Tt||(Tt={}));var Ve;(function(t){t.NO_QUIRKS="no-quirks",t.QUIRKS="quirks",t.LIMITED_QUIRKS="limited-quirks"})(Ve||(Ve={}));var w;(function(t){t.A="a",t.ADDRESS="address",t.ANNOTATION_XML="annotation-xml",t.APPLET="applet",t.AREA="area",t.ARTICLE="article",t.ASIDE="aside",t.B="b",t.BASE="base",t.BASEFONT="basefont",t.BGSOUND="bgsound",t.BIG="big",t.BLOCKQUOTE="blockquote",t.BODY="body",t.BR="br",t.BUTTON="button",t.CAPTION="caption",t.CENTER="center",t.CODE="code",t.COL="col",t.COLGROUP="colgroup",t.DD="dd",t.DESC="desc",t.DETAILS="details",t.DIALOG="dialog",t.DIR="dir",t.DIV="div",t.DL="dl",t.DT="dt",t.EM="em",t.EMBED="embed",t.FIELDSET="fieldset",t.FIGCAPTION="figcaption",t.FIGURE="figure",t.FONT="font",t.FOOTER="footer",t.FOREIGN_OBJECT="foreignObject",t.FORM="form",t.FRAME="frame",t.FRAMESET="frameset",t.H1="h1",t.H2="h2",t.H3="h3",t.H4="h4",t.H5="h5",t.H6="h6",t.HEAD="head",t.HEADER="header",t.HGROUP="hgroup",t.HR="hr",t.HTML="html",t.I="i",t.IMG="img",t.IMAGE="image",t.INPUT="input",t.IFRAME="iframe",t.KEYGEN="keygen",t.LABEL="label",t.LI="li",t.LINK="link",t.LISTING="listing",t.MAIN="main",t.MALIGNMARK="malignmark",t.MARQUEE="marquee",t.MATH="math",t.MENU="menu",t.META="meta",t.MGLYPH="mglyph",t.MI="mi",t.MO="mo",t.MN="mn",t.MS="ms",t.MTEXT="mtext",t.NAV="nav",t.NOBR="nobr",t.NOFRAMES="noframes",t.NOEMBED="noembed",t.NOSCRIPT="noscript",t.OBJECT="object",t.OL="ol",t.OPTGROUP="optgroup",t.OPTION="option",t.P="p",t.PARAM="param",t.PLAINTEXT="plaintext",t.PRE="pre",t.RB="rb",t.RP="rp",t.RT="rt",t.RTC="rtc",t.RUBY="ruby",t.S="s",t.SCRIPT="script",t.SEARCH="search",t.SECTION="section",t.SELECT="select",t.SOURCE="source",t.SMALL="small",t.SPAN="span",t.STRIKE="strike",t.STRONG="strong",t.STYLE="style",t.SUB="sub",t.SUMMARY="summary",t.SUP="sup",t.TABLE="table",t.TBODY="tbody",t.TEMPLATE="template",t.TEXTAREA="textarea",t.TFOOT="tfoot",t.TD="td",t.TH="th",t.THEAD="thead",t.TITLE="title",t.TR="tr",t.TRACK="track",t.TT="tt",t.U="u",t.UL="ul",t.SVG="svg",t.VAR="var",t.WBR="wbr",t.XMP="xmp"})(w||(w={}));var c;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.A=1]="A",t[t.ADDRESS=2]="ADDRESS",t[t.ANNOTATION_XML=3]="ANNOTATION_XML",t[t.APPLET=4]="APPLET",t[t.AREA=5]="AREA",t[t.ARTICLE=6]="ARTICLE",t[t.ASIDE=7]="ASIDE",t[t.B=8]="B",t[t.BASE=9]="BASE",t[t.BASEFONT=10]="BASEFONT",t[t.BGSOUND=11]="BGSOUND",t[t.BIG=12]="BIG",t[t.BLOCKQUOTE=13]="BLOCKQUOTE",t[t.BODY=14]="BODY",t[t.BR=15]="BR",t[t.BUTTON=16]="BUTTON",t[t.CAPTION=17]="CAPTION",t[t.CENTER=18]="CENTER",t[t.CODE=19]="CODE",t[t.COL=20]="COL",t[t.COLGROUP=21]="COLGROUP",t[t.DD=22]="DD",t[t.DESC=23]="DESC",t[t.DETAILS=24]="DETAILS",t[t.DIALOG=25]="DIALOG",t[t.DIR=26]="DIR",t[t.DIV=27]="DIV",t[t.DL=28]="DL",t[t.DT=29]="DT",t[t.EM=30]="EM",t[t.EMBED=31]="EMBED",t[t.FIELDSET=32]="FIELDSET",t[t.FIGCAPTION=33]="FIGCAPTION",t[t.FIGURE=34]="FIGURE",t[t.FONT=35]="FONT",t[t.FOOTER=36]="FOOTER",t[t.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",t[t.FORM=38]="FORM",t[t.FRAME=39]="FRAME",t[t.FRAMESET=40]="FRAMESET",t[t.H1=41]="H1",t[t.H2=42]="H2",t[t.H3=43]="H3",t[t.H4=44]="H4",t[t.H5=45]="H5",t[t.H6=46]="H6",t[t.HEAD=47]="HEAD",t[t.HEADER=48]="HEADER",t[t.HGROUP=49]="HGROUP",t[t.HR=50]="HR",t[t.HTML=51]="HTML",t[t.I=52]="I",t[t.IMG=53]="IMG",t[t.IMAGE=54]="IMAGE",t[t.INPUT=55]="INPUT",t[t.IFRAME=56]="IFRAME",t[t.KEYGEN=57]="KEYGEN",t[t.LABEL=58]="LABEL",t[t.LI=59]="LI",t[t.LINK=60]="LINK",t[t.LISTING=61]="LISTING",t[t.MAIN=62]="MAIN",t[t.MALIGNMARK=63]="MALIGNMARK",t[t.MARQUEE=64]="MARQUEE",t[t.MATH=65]="MATH",t[t.MENU=66]="MENU",t[t.META=67]="META",t[t.MGLYPH=68]="MGLYPH",t[t.MI=69]="MI",t[t.MO=70]="MO",t[t.MN=71]="MN",t[t.MS=72]="MS",t[t.MTEXT=73]="MTEXT",t[t.NAV=74]="NAV",t[t.NOBR=75]="NOBR",t[t.NOFRAMES=76]="NOFRAMES",t[t.NOEMBED=77]="NOEMBED",t[t.NOSCRIPT=78]="NOSCRIPT",t[t.OBJECT=79]="OBJECT",t[t.OL=80]="OL",t[t.OPTGROUP=81]="OPTGROUP",t[t.OPTION=82]="OPTION",t[t.P=83]="P",t[t.PARAM=84]="PARAM",t[t.PLAINTEXT=85]="PLAINTEXT",t[t.PRE=86]="PRE",t[t.RB=87]="RB",t[t.RP=88]="RP",t[t.RT=89]="RT",t[t.RTC=90]="RTC",t[t.RUBY=91]="RUBY",t[t.S=92]="S",t[t.SCRIPT=93]="SCRIPT",t[t.SEARCH=94]="SEARCH",t[t.SECTION=95]="SECTION",t[t.SELECT=96]="SELECT",t[t.SOURCE=97]="SOURCE",t[t.SMALL=98]="SMALL",t[t.SPAN=99]="SPAN",t[t.STRIKE=100]="STRIKE",t[t.STRONG=101]="STRONG",t[t.STYLE=102]="STYLE",t[t.SUB=103]="SUB",t[t.SUMMARY=104]="SUMMARY",t[t.SUP=105]="SUP",t[t.TABLE=106]="TABLE",t[t.TBODY=107]="TBODY",t[t.TEMPLATE=108]="TEMPLATE",t[t.TEXTAREA=109]="TEXTAREA",t[t.TFOOT=110]="TFOOT",t[t.TD=111]="TD",t[t.TH=112]="TH",t[t.THEAD=113]="THEAD",t[t.TITLE=114]="TITLE",t[t.TR=115]="TR",t[t.TRACK=116]="TRACK",t[t.TT=117]="TT",t[t.U=118]="U",t[t.UL=119]="UL",t[t.SVG=120]="SVG",t[t.VAR=121]="VAR",t[t.WBR=122]="WBR",t[t.XMP=123]="XMP"})(c||(c={}));const Nm=new Map([[w.A,c.A],[w.ADDRESS,c.ADDRESS],[w.ANNOTATION_XML,c.ANNOTATION_XML],[w.APPLET,c.APPLET],[w.AREA,c.AREA],[w.ARTICLE,c.ARTICLE],[w.ASIDE,c.ASIDE],[w.B,c.B],[w.BASE,c.BASE],[w.BASEFONT,c.BASEFONT],[w.BGSOUND,c.BGSOUND],[w.BIG,c.BIG],[w.BLOCKQUOTE,c.BLOCKQUOTE],[w.BODY,c.BODY],[w.BR,c.BR],[w.BUTTON,c.BUTTON],[w.CAPTION,c.CAPTION],[w.CENTER,c.CENTER],[w.CODE,c.CODE],[w.COL,c.COL],[w.COLGROUP,c.COLGROUP],[w.DD,c.DD],[w.DESC,c.DESC],[w.DETAILS,c.DETAILS],[w.DIALOG,c.DIALOG],[w.DIR,c.DIR],[w.DIV,c.DIV],[w.DL,c.DL],[w.DT,c.DT],[w.EM,c.EM],[w.EMBED,c.EMBED],[w.FIELDSET,c.FIELDSET],[w.FIGCAPTION,c.FIGCAPTION],[w.FIGURE,c.FIGURE],[w.FONT,c.FONT],[w.FOOTER,c.FOOTER],[w.FOREIGN_OBJECT,c.FOREIGN_OBJECT],[w.FORM,c.FORM],[w.FRAME,c.FRAME],[w.FRAMESET,c.FRAMESET],[w.H1,c.H1],[w.H2,c.H2],[w.H3,c.H3],[w.H4,c.H4],[w.H5,c.H5],[w.H6,c.H6],[w.HEAD,c.HEAD],[w.HEADER,c.HEADER],[w.HGROUP,c.HGROUP],[w.HR,c.HR],[w.HTML,c.HTML],[w.I,c.I],[w.IMG,c.IMG],[w.IMAGE,c.IMAGE],[w.INPUT,c.INPUT],[w.IFRAME,c.IFRAME],[w.KEYGEN,c.KEYGEN],[w.LABEL,c.LABEL],[w.LI,c.LI],[w.LINK,c.LINK],[w.LISTING,c.LISTING],[w.MAIN,c.MAIN],[w.MALIGNMARK,c.MALIGNMARK],[w.MARQUEE,c.MARQUEE],[w.MATH,c.MATH],[w.MENU,c.MENU],[w.META,c.META],[w.MGLYPH,c.MGLYPH],[w.MI,c.MI],[w.MO,c.MO],[w.MN,c.MN],[w.MS,c.MS],[w.MTEXT,c.MTEXT],[w.NAV,c.NAV],[w.NOBR,c.NOBR],[w.NOFRAMES,c.NOFRAMES],[w.NOEMBED,c.NOEMBED],[w.NOSCRIPT,c.NOSCRIPT],[w.OBJECT,c.OBJECT],[w.OL,c.OL],[w.OPTGROUP,c.OPTGROUP],[w.OPTION,c.OPTION],[w.P,c.P],[w.PARAM,c.PARAM],[w.PLAINTEXT,c.PLAINTEXT],[w.PRE,c.PRE],[w.RB,c.RB],[w.RP,c.RP],[w.RT,c.RT],[w.RTC,c.RTC],[w.RUBY,c.RUBY],[w.S,c.S],[w.SCRIPT,c.SCRIPT],[w.SEARCH,c.SEARCH],[w.SECTION,c.SECTION],[w.SELECT,c.SELECT],[w.SOURCE,c.SOURCE],[w.SMALL,c.SMALL],[w.SPAN,c.SPAN],[w.STRIKE,c.STRIKE],[w.STRONG,c.STRONG],[w.STYLE,c.STYLE],[w.SUB,c.SUB],[w.SUMMARY,c.SUMMARY],[w.SUP,c.SUP],[w.TABLE,c.TABLE],[w.TBODY,c.TBODY],[w.TEMPLATE,c.TEMPLATE],[w.TEXTAREA,c.TEXTAREA],[w.TFOOT,c.TFOOT],[w.TD,c.TD],[w.TH,c.TH],[w.THEAD,c.THEAD],[w.TITLE,c.TITLE],[w.TR,c.TR],[w.TRACK,c.TRACK],[w.TT,c.TT],[w.U,c.U],[w.UL,c.UL],[w.SVG,c.SVG],[w.VAR,c.VAR],[w.WBR,c.WBR],[w.XMP,c.XMP]]);function jt(t){var e;return(e=Nm.get(t))!==null&&e!==void 0?e:c.UNKNOWN}const v=c,Sm={[P.HTML]:new Set([v.ADDRESS,v.APPLET,v.AREA,v.ARTICLE,v.ASIDE,v.BASE,v.BASEFONT,v.BGSOUND,v.BLOCKQUOTE,v.BODY,v.BR,v.BUTTON,v.CAPTION,v.CENTER,v.COL,v.COLGROUP,v.DD,v.DETAILS,v.DIR,v.DIV,v.DL,v.DT,v.EMBED,v.FIELDSET,v.FIGCAPTION,v.FIGURE,v.FOOTER,v.FORM,v.FRAME,v.FRAMESET,v.H1,v.H2,v.H3,v.H4,v.H5,v.H6,v.HEAD,v.HEADER,v.HGROUP,v.HR,v.HTML,v.IFRAME,v.IMG,v.INPUT,v.LI,v.LINK,v.LISTING,v.MAIN,v.MARQUEE,v.MENU,v.META,v.NAV,v.NOEMBED,v.NOFRAMES,v.NOSCRIPT,v.OBJECT,v.OL,v.P,v.PARAM,v.PLAINTEXT,v.PRE,v.SCRIPT,v.SECTION,v.SELECT,v.SOURCE,v.STYLE,v.SUMMARY,v.TABLE,v.TBODY,v.TD,v.TEMPLATE,v.TEXTAREA,v.TFOOT,v.TH,v.THEAD,v.TITLE,v.TR,v.TRACK,v.UL,v.WBR,v.XMP]),[P.MATHML]:new Set([v.MI,v.MO,v.MN,v.MS,v.MTEXT,v.ANNOTATION_XML]),[P.SVG]:new Set([v.TITLE,v.FOREIGN_OBJECT,v.DESC]),[P.XLINK]:new Set,[P.XML]:new Set,[P.XMLNS]:new Set},Fr=new Set([v.H1,v.H2,v.H3,v.H4,v.H5,v.H6]);w.STYLE,w.SCRIPT,w.XMP,w.IFRAME,w.NOEMBED,w.NOFRAMES,w.PLAINTEXT;var b;(function(t){t[t.DATA=0]="DATA",t[t.RCDATA=1]="RCDATA",t[t.RAWTEXT=2]="RAWTEXT",t[t.SCRIPT_DATA=3]="SCRIPT_DATA",t[t.PLAINTEXT=4]="PLAINTEXT",t[t.TAG_OPEN=5]="TAG_OPEN",t[t.END_TAG_OPEN=6]="END_TAG_OPEN",t[t.TAG_NAME=7]="TAG_NAME",t[t.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",t[t.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",t[t.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",t[t.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",t[t.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",t[t.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",t[t.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",t[t.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",t[t.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",t[t.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",t[t.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",t[t.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",t[t.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",t[t.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",t[t.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",t[t.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",t[t.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",t[t.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",t[t.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",t[t.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",t[t.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",t[t.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",t[t.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",t[t.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",t[t.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",t[t.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",t[t.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",t[t.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",t[t.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",t[t.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",t[t.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",t[t.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",t[t.BOGUS_COMMENT=40]="BOGUS_COMMENT",t[t.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",t[t.COMMENT_START=42]="COMMENT_START",t[t.COMMENT_START_DASH=43]="COMMENT_START_DASH",t[t.COMMENT=44]="COMMENT",t[t.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",t[t.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",t[t.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",t[t.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",t[t.COMMENT_END_DASH=49]="COMMENT_END_DASH",t[t.COMMENT_END=50]="COMMENT_END",t[t.COMMENT_END_BANG=51]="COMMENT_END_BANG",t[t.DOCTYPE=52]="DOCTYPE",t[t.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",t[t.DOCTYPE_NAME=54]="DOCTYPE_NAME",t[t.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",t[t.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",t[t.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",t[t.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",t[t.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",t[t.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",t[t.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",t[t.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",t[t.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",t[t.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",t[t.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",t[t.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",t[t.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",t[t.CDATA_SECTION=68]="CDATA_SECTION",t[t.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",t[t.CDATA_SECTION_END=70]="CDATA_SECTION_END",t[t.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",t[t.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(b||(b={}));const Ce={DATA:b.DATA,RCDATA:b.RCDATA,RAWTEXT:b.RAWTEXT,SCRIPT_DATA:b.SCRIPT_DATA,PLAINTEXT:b.PLAINTEXT,CDATA_SECTION:b.CDATA_SECTION};function ym(t){return t>=E.DIGIT_0&&t<=E.DIGIT_9}function Jt(t){return t>=E.LATIN_CAPITAL_A&&t<=E.LATIN_CAPITAL_Z}function Im(t){return t>=E.LATIN_SMALL_A&&t<=E.LATIN_SMALL_Z}function ct(t){return Im(t)||Jt(t)}function Rs(t){return ct(t)||ym(t)}function Sn(t){return t+32}function Lu(t){return t===E.SPACE||t===E.LINE_FEED||t===E.TABULATION||t===E.FORM_FEED}function Os(t){return Lu(t)||t===E.SOLIDUS||t===E.GREATER_THAN_SIGN}function wm(t){return t===E.NULL?R.nullCharacterReference:t>1114111?R.characterReferenceOutsideUnicodeRange:Su(t)?R.surrogateCharacterReference:Iu(t)?R.noncharacterCharacterReference:yu(t)||t===E.CARRIAGE_RETURN?R.controlCharacterReference:null}class Lm{constructor(e,n){this.options=e,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=b.DATA,this.returnState=b.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new pm(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new km(gm,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(R.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(R.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=wm(r);i&&this._err(i,1)}}:void 0)}_err(e,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.call(r,this.preprocessor.getError(e,n))}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,n,r){this.active=!0,this.preprocessor.write(e,n),this._runParsingLoop(),this.paused||r?.()}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 n=0;n<e;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,n){return this.preprocessor.startsWith(e,n)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:ne.START_TAG,tagName:"",tagID:c.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:ne.END_TAG,tagName:"",tagID:c.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:ne.COMMENT,data:"",location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:ne.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,n){this.currentCharacterToken={type:e,chars:n,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e,n;const r=this.currentToken;if(wu(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(e=(n=r.location).attrs)!==null&&e!==void 0?e:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(R.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=jt(e.tagName),e.type===ne.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(R.endTagWithAttributes),e.selfClosing&&this._err(R.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 ne.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case ne.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case ne.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}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:ne.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,n)}_emitCodePoint(e){const n=Lu(e)?ne.WHITESPACE_CHARACTER:e===E.NULL?ne.NULL_CHARACTER:ne.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(ne.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=b.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?it.Attribute:it.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===b.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===b.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===b.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case b.DATA:{this._stateData(e);break}case b.RCDATA:{this._stateRcdata(e);break}case b.RAWTEXT:{this._stateRawtext(e);break}case b.SCRIPT_DATA:{this._stateScriptData(e);break}case b.PLAINTEXT:{this._statePlaintext(e);break}case b.TAG_OPEN:{this._stateTagOpen(e);break}case b.END_TAG_OPEN:{this._stateEndTagOpen(e);break}case b.TAG_NAME:{this._stateTagName(e);break}case b.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(e);break}case b.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(e);break}case b.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(e);break}case b.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(e);break}case b.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(e);break}case b.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(e);break}case b.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(e);break}case b.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(e);break}case b.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(e);break}case b.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(e);break}case b.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(e);break}case b.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(e);break}case b.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(e);break}case b.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(e);break}case b.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(e);break}case b.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(e);break}case b.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(e);break}case b.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(e);break}case b.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(e);break}case b.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(e);break}case b.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(e);break}case b.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(e);break}case b.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(e);break}case b.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(e);break}case b.ATTRIBUTE_NAME:{this._stateAttributeName(e);break}case b.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(e);break}case b.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(e);break}case b.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(e);break}case b.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(e);break}case b.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(e);break}case b.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(e);break}case b.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(e);break}case b.BOGUS_COMMENT:{this._stateBogusComment(e);break}case b.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(e);break}case b.COMMENT_START:{this._stateCommentStart(e);break}case b.COMMENT_START_DASH:{this._stateCommentStartDash(e);break}case b.COMMENT:{this._stateComment(e);break}case b.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(e);break}case b.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(e);break}case b.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(e);break}case b.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(e);break}case b.COMMENT_END_DASH:{this._stateCommentEndDash(e);break}case b.COMMENT_END:{this._stateCommentEnd(e);break}case b.COMMENT_END_BANG:{this._stateCommentEndBang(e);break}case b.DOCTYPE:{this._stateDoctype(e);break}case b.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(e);break}case b.DOCTYPE_NAME:{this._stateDoctypeName(e);break}case b.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(e);break}case b.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(e);break}case b.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(e);break}case b.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(e);break}case b.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(e);break}case b.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(e);break}case b.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break}case b.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(e);break}case b.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(e);break}case b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(e);break}case b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(e);break}case b.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(e);break}case b.BOGUS_DOCTYPE:{this._stateBogusDoctype(e);break}case b.CDATA_SECTION:{this._stateCdataSection(e);break}case b.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(e);break}case b.CDATA_SECTION_END:{this._stateCdataSectionEnd(e);break}case b.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case b.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(e);break}default:throw new Error("Unknown state")}}_stateData(e){switch(e){case E.LESS_THAN_SIGN:{this.state=b.TAG_OPEN;break}case E.AMPERSAND:{this._startCharacterReference();break}case E.NULL:{this._err(R.unexpectedNullCharacter),this._emitCodePoint(e);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case E.AMPERSAND:{this._startCharacterReference();break}case E.LESS_THAN_SIGN:{this.state=b.RCDATA_LESS_THAN_SIGN;break}case E.NULL:{this._err(R.unexpectedNullCharacter),this._emitChars(_e);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case E.LESS_THAN_SIGN:{this.state=b.RAWTEXT_LESS_THAN_SIGN;break}case E.NULL:{this._err(R.unexpectedNullCharacter),this._emitChars(_e);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case E.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_LESS_THAN_SIGN;break}case E.NULL:{this._err(R.unexpectedNullCharacter),this._emitChars(_e);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case E.NULL:{this._err(R.unexpectedNullCharacter),this._emitChars(_e);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateTagOpen(e){if(ct(e))this._createStartTagToken(),this.state=b.TAG_NAME,this._stateTagName(e);else switch(e){case E.EXCLAMATION_MARK:{this.state=b.MARKUP_DECLARATION_OPEN;break}case E.SOLIDUS:{this.state=b.END_TAG_OPEN;break}case E.QUESTION_MARK:{this._err(R.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=b.BOGUS_COMMENT,this._stateBogusComment(e);break}case E.EOF:{this._err(R.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(R.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=b.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(ct(e))this._createEndTagToken(),this.state=b.TAG_NAME,this._stateTagName(e);else switch(e){case E.GREATER_THAN_SIGN:{this._err(R.missingEndTagName),this.state=b.DATA;break}case E.EOF:{this._err(R.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(R.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=b.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){const n=this.currentToken;switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=b.BEFORE_ATTRIBUTE_NAME;break}case E.SOLIDUS:{this.state=b.SELF_CLOSING_START_TAG;break}case E.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentTagToken();break}case E.NULL:{this._err(R.unexpectedNullCharacter),n.tagName+=_e;break}case E.EOF:{this._err(R.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Jt(e)?Sn(e):e)}}_stateRcdataLessThanSign(e){e===E.SOLIDUS?this.state=b.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=b.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){ct(e)?(this.state=b.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars("</"),this.state=b.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=b.BEFORE_ATTRIBUTE_NAME,!1;case E.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=b.SELF_CLOSING_START_TAG,!1;case E.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=b.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=b.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===E.SOLIDUS?this.state=b.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=b.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){ct(e)?(this.state=b.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars("</"),this.state=b.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=b.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case E.SOLIDUS:{this.state=b.SCRIPT_DATA_END_TAG_OPEN;break}case E.EXCLAMATION_MARK:{this.state=b.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=b.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){ct(e)?(this.state=b.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars("</"),this.state=b.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=b.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===E.HYPHEN_MINUS?(this.state=b.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=b.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===E.HYPHEN_MINUS?(this.state=b.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=b.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case E.HYPHEN_MINUS:{this.state=b.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case E.NULL:{this._err(R.unexpectedNullCharacter),this._emitChars(_e);break}case E.EOF:{this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case E.HYPHEN_MINUS:{this.state=b.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case E.NULL:{this._err(R.unexpectedNullCharacter),this.state=b.SCRIPT_DATA_ESCAPED,this._emitChars(_e);break}case E.EOF:{this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=b.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case E.HYPHEN_MINUS:{this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case E.GREATER_THAN_SIGN:{this.state=b.SCRIPT_DATA,this._emitChars(">");break}case E.NULL:{this._err(R.unexpectedNullCharacter),this.state=b.SCRIPT_DATA_ESCAPED,this._emitChars(_e);break}case E.EOF:{this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=b.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===E.SOLIDUS?this.state=b.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:ct(e)?(this._emitChars("<"),this.state=b.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=b.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){ct(e)?(this.state=b.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("</"),this.state=b.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=b.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(He.SCRIPT,!1)&&Os(this.preprocessor.peek(He.SCRIPT.length))){this._emitCodePoint(e);for(let n=0;n<He.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=b.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case E.HYPHEN_MINUS:{this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case E.NULL:{this._err(R.unexpectedNullCharacter),this._emitChars(_e);break}case E.EOF:{this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case E.HYPHEN_MINUS:{this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case E.NULL:{this._err(R.unexpectedNullCharacter),this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(_e);break}case E.EOF:{this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case E.HYPHEN_MINUS:{this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case E.GREATER_THAN_SIGN:{this.state=b.SCRIPT_DATA,this._emitChars(">");break}case E.NULL:{this._err(R.unexpectedNullCharacter),this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(_e);break}case E.EOF:{this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===E.SOLIDUS?(this.state=b.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(He.SCRIPT,!1)&&Os(this.preprocessor.peek(He.SCRIPT.length))){this._emitCodePoint(e);for(let n=0;n<He.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=b.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.SOLIDUS:case E.GREATER_THAN_SIGN:case E.EOF:{this.state=b.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break}case E.EQUALS_SIGN:{this._err(R.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=b.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=b.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:case E.SOLIDUS:case E.GREATER_THAN_SIGN:case E.EOF:{this._leaveAttrName(),this.state=b.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break}case E.EQUALS_SIGN:{this._leaveAttrName(),this.state=b.BEFORE_ATTRIBUTE_VALUE;break}case E.QUOTATION_MARK:case E.APOSTROPHE:case E.LESS_THAN_SIGN:{this._err(R.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break}case E.NULL:{this._err(R.unexpectedNullCharacter),this.currentAttr.name+=_e;break}default:this.currentAttr.name+=String.fromCodePoint(Jt(e)?Sn(e):e)}}_stateAfterAttributeName(e){switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.SOLIDUS:{this.state=b.SELF_CLOSING_START_TAG;break}case E.EQUALS_SIGN:{this.state=b.BEFORE_ATTRIBUTE_VALUE;break}case E.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentTagToken();break}case E.EOF:{this._err(R.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=b.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.QUOTATION_MARK:{this.state=b.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case E.APOSTROPHE:{this.state=b.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case E.GREATER_THAN_SIGN:{this._err(R.missingAttributeValue),this.state=b.DATA,this.emitCurrentTagToken();break}default:this.state=b.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case E.QUOTATION_MARK:{this.state=b.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case E.AMPERSAND:{this._startCharacterReference();break}case E.NULL:{this._err(R.unexpectedNullCharacter),this.currentAttr.value+=_e;break}case E.EOF:{this._err(R.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case E.APOSTROPHE:{this.state=b.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case E.AMPERSAND:{this._startCharacterReference();break}case E.NULL:{this._err(R.unexpectedNullCharacter),this.currentAttr.value+=_e;break}case E.EOF:{this._err(R.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this._leaveAttrValue(),this.state=b.BEFORE_ATTRIBUTE_NAME;break}case E.AMPERSAND:{this._startCharacterReference();break}case E.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=b.DATA,this.emitCurrentTagToken();break}case E.NULL:{this._err(R.unexpectedNullCharacter),this.currentAttr.value+=_e;break}case E.QUOTATION_MARK:case E.APOSTROPHE:case E.LESS_THAN_SIGN:case E.EQUALS_SIGN:case E.GRAVE_ACCENT:{this._err(R.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break}case E.EOF:{this._err(R.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this._leaveAttrValue(),this.state=b.BEFORE_ATTRIBUTE_NAME;break}case E.SOLIDUS:{this._leaveAttrValue(),this.state=b.SELF_CLOSING_START_TAG;break}case E.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=b.DATA,this.emitCurrentTagToken();break}case E.EOF:{this._err(R.eofInTag),this._emitEOFToken();break}default:this._err(R.missingWhitespaceBetweenAttributes),this.state=b.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case E.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=b.DATA,this.emitCurrentTagToken();break}case E.EOF:{this._err(R.eofInTag),this._emitEOFToken();break}default:this._err(R.unexpectedSolidusInTag),this.state=b.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){const n=this.currentToken;switch(e){case E.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentComment(n);break}case E.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case E.NULL:{this._err(R.unexpectedNullCharacter),n.data+=_e;break}default:n.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(He.DASH_DASH,!0)?(this._createCommentToken(He.DASH_DASH.length+1),this.state=b.COMMENT_START):this._consumeSequenceIfMatch(He.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(He.DOCTYPE.length+1),this.state=b.DOCTYPE):this._consumeSequenceIfMatch(He.CDATA_START,!0)?this.inForeignNode?this.state=b.CDATA_SECTION:(this._err(R.cdataInHtmlContent),this._createCommentToken(He.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=b.BOGUS_COMMENT):this._ensureHibernation()||(this._err(R.incorrectlyOpenedComment),this._createCommentToken(2),this.state=b.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case E.HYPHEN_MINUS:{this.state=b.COMMENT_START_DASH;break}case E.GREATER_THAN_SIGN:{this._err(R.abruptClosingOfEmptyComment),this.state=b.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=b.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){const n=this.currentToken;switch(e){case E.HYPHEN_MINUS:{this.state=b.COMMENT_END;break}case E.GREATER_THAN_SIGN:{this._err(R.abruptClosingOfEmptyComment),this.state=b.DATA,this.emitCurrentComment(n);break}case E.EOF:{this._err(R.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=b.COMMENT,this._stateComment(e)}}_stateComment(e){const n=this.currentToken;switch(e){case E.HYPHEN_MINUS:{this.state=b.COMMENT_END_DASH;break}case E.LESS_THAN_SIGN:{n.data+="<",this.state=b.COMMENT_LESS_THAN_SIGN;break}case E.NULL:{this._err(R.unexpectedNullCharacter),n.data+=_e;break}case E.EOF:{this._err(R.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){const n=this.currentToken;switch(e){case E.EXCLAMATION_MARK:{n.data+="!",this.state=b.COMMENT_LESS_THAN_SIGN_BANG;break}case E.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=b.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===E.HYPHEN_MINUS?this.state=b.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=b.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===E.HYPHEN_MINUS?this.state=b.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=b.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==E.GREATER_THAN_SIGN&&e!==E.EOF&&this._err(R.nestedComment),this.state=b.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){const n=this.currentToken;switch(e){case E.HYPHEN_MINUS:{this.state=b.COMMENT_END;break}case E.EOF:{this._err(R.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=b.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){const n=this.currentToken;switch(e){case E.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentComment(n);break}case E.EXCLAMATION_MARK:{this.state=b.COMMENT_END_BANG;break}case E.HYPHEN_MINUS:{n.data+="-";break}case E.EOF:{this._err(R.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=b.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){const n=this.currentToken;switch(e){case E.HYPHEN_MINUS:{n.data+="--!",this.state=b.COMMENT_END_DASH;break}case E.GREATER_THAN_SIGN:{this._err(R.incorrectlyClosedComment),this.state=b.DATA,this.emitCurrentComment(n);break}case E.EOF:{this._err(R.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=b.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=b.BEFORE_DOCTYPE_NAME;break}case E.GREATER_THAN_SIGN:{this.state=b.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break}case E.EOF:{this._err(R.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(R.missingWhitespaceBeforeDoctypeName),this.state=b.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(Jt(e))this._createDoctypeToken(String.fromCharCode(Sn(e))),this.state=b.DOCTYPE_NAME;else switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.NULL:{this._err(R.unexpectedNullCharacter),this._createDoctypeToken(_e),this.state=b.DOCTYPE_NAME;break}case E.GREATER_THAN_SIGN:{this._err(R.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=b.DATA;break}case E.EOF:{this._err(R.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=b.DOCTYPE_NAME}}_stateDoctypeName(e){const n=this.currentToken;switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=b.AFTER_DOCTYPE_NAME;break}case E.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentDoctype(n);break}case E.NULL:{this._err(R.unexpectedNullCharacter),n.name+=_e;break}case E.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Jt(e)?Sn(e):e)}}_stateAfterDoctypeName(e){const n=this.currentToken;switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentDoctype(n);break}case E.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(He.PUBLIC,!1)?this.state=b.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(He.SYSTEM,!1)?this.state=b.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(R.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){const n=this.currentToken;switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=b.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case E.QUOTATION_MARK:{this._err(R.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=b.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{this._err(R.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=b.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case E.GREATER_THAN_SIGN:{this._err(R.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=b.DATA,this.emitCurrentDoctype(n);break}case E.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(R.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){const n=this.currentToken;switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.QUOTATION_MARK:{n.publicId="",this.state=b.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{n.publicId="",this.state=b.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case E.GREATER_THAN_SIGN:{this._err(R.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=b.DATA,this.emitCurrentDoctype(n);break}case E.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(R.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){const n=this.currentToken;switch(e){case E.QUOTATION_MARK:{this.state=b.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case E.NULL:{this._err(R.unexpectedNullCharacter),n.publicId+=_e;break}case E.GREATER_THAN_SIGN:{this._err(R.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=b.DATA;break}case E.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){const n=this.currentToken;switch(e){case E.APOSTROPHE:{this.state=b.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case E.NULL:{this._err(R.unexpectedNullCharacter),n.publicId+=_e;break}case E.GREATER_THAN_SIGN:{this._err(R.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=b.DATA;break}case E.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){const n=this.currentToken;switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=b.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case E.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentDoctype(n);break}case E.QUOTATION_MARK:{this._err(R.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{this._err(R.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case E.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(R.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){const n=this.currentToken;switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=b.DATA;break}case E.QUOTATION_MARK:{n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case E.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(R.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){const n=this.currentToken;switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=b.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case E.QUOTATION_MARK:{this._err(R.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{this._err(R.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case E.GREATER_THAN_SIGN:{this._err(R.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.DATA,this.emitCurrentDoctype(n);break}case E.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(R.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){const n=this.currentToken;switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.QUOTATION_MARK:{n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case E.GREATER_THAN_SIGN:{this._err(R.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.DATA,this.emitCurrentDoctype(n);break}case E.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(R.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){const n=this.currentToken;switch(e){case E.QUOTATION_MARK:{this.state=b.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case E.NULL:{this._err(R.unexpectedNullCharacter),n.systemId+=_e;break}case E.GREATER_THAN_SIGN:{this._err(R.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=b.DATA;break}case E.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){const n=this.currentToken;switch(e){case E.APOSTROPHE:{this.state=b.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case E.NULL:{this._err(R.unexpectedNullCharacter),n.systemId+=_e;break}case E.GREATER_THAN_SIGN:{this._err(R.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=b.DATA;break}case E.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){const n=this.currentToken;switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=b.DATA;break}case E.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(R.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){const n=this.currentToken;switch(e){case E.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=b.DATA;break}case E.NULL:{this._err(R.unexpectedNullCharacter);break}case E.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(e){switch(e){case E.RIGHT_SQUARE_BRACKET:{this.state=b.CDATA_SECTION_BRACKET;break}case E.EOF:{this._err(R.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===E.RIGHT_SQUARE_BRACKET?this.state=b.CDATA_SECTION_END:(this._emitChars("]"),this.state=b.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case E.GREATER_THAN_SIGN:{this.state=b.DATA;break}case E.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=b.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(E.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Rs(this.preprocessor.peek(1))?b.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){Rs(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===E.SEMICOLON&&this._err(R.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}}const Ru=new Set([c.DD,c.DT,c.LI,c.OPTGROUP,c.OPTION,c.P,c.RB,c.RP,c.RT,c.RTC]),Ds=new Set([...Ru,c.CAPTION,c.COLGROUP,c.TBODY,c.TD,c.TFOOT,c.TH,c.THEAD,c.TR]),Bn=new Set([c.APPLET,c.CAPTION,c.HTML,c.MARQUEE,c.OBJECT,c.TABLE,c.TD,c.TEMPLATE,c.TH]),Rm=new Set([...Bn,c.OL,c.UL]),Om=new Set([...Bn,c.BUTTON]),Ps=new Set([c.ANNOTATION_XML,c.MI,c.MN,c.MO,c.MS,c.MTEXT]),Ms=new Set([c.DESC,c.FOREIGN_OBJECT,c.TITLE]),Dm=new Set([c.TR,c.TEMPLATE,c.HTML]),Pm=new Set([c.TBODY,c.TFOOT,c.THEAD,c.TEMPLATE,c.HTML]),Mm=new Set([c.TABLE,c.TEMPLATE,c.HTML]),vm=new Set([c.TD,c.TH]);class Bm{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,n,r){this.treeAdapter=n,this.handler=r,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)===P.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,n){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,n,!0)}pop(){const e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,n){const r=this._indexOf(e);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(e,n,r){const i=this._indexOf(e)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(e){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(e,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==P.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(e){for(;this.stackTop>=e;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<e)}}popUntilElementPopped(e){const n=this._indexOf(e);this.shortenToLength(Math.max(n,0))}popUntilPopped(e,n){const r=this._indexOfTagNames(e,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Fr,P.HTML)}popUntilTableCellPopped(){this.popUntilPopped(vm,P.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,n){for(let r=this.stackTop;r>=0;r--)if(e.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(e,n){const r=this._indexOfTagNames(e,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(Mm,P.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Pm,P.HTML)}clearBackToTableRowContext(){this.clearBackTo(Dm,P.HTML)}remove(e){const n=this._indexOf(e);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,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 n=this._indexOf(e)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===c.HTML}hasInDynamicScope(e,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case P.HTML:{if(i===e)return!0;if(n.has(i))return!1;break}case P.SVG:{if(Ms.has(i))return!1;break}case P.MATHML:{if(Ps.has(i))return!1;break}}}return!0}hasInScope(e){return this.hasInDynamicScope(e,Bn)}hasInListItemScope(e){return this.hasInDynamicScope(e,Rm)}hasInButtonScope(e){return this.hasInDynamicScope(e,Om)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const n=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case P.HTML:{if(Fr.has(n))return!0;if(Bn.has(n))return!1;break}case P.SVG:{if(Ms.has(n))return!1;break}case P.MATHML:{if(Ps.has(n))return!1;break}}}return!0}hasInTableScope(e){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===P.HTML)switch(this.tagIDs[n]){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])===P.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 n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===P.HTML)switch(this.tagIDs[n]){case e:return!0;case c.OPTION:case c.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Ru.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Ds.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&Ds.has(this.currentTagId);)this.pop()}}const br=3;var Je;(function(t){t[t.Marker=0]="Marker",t[t.Element=1]="Element"})(Je||(Je={}));const vs={type:Je.Marker};class Fm{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,n){const r=[],i=n.length,s=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let u=0;u<this.entries.length;u++){const o=this.entries[u];if(o.type===Je.Marker)break;const{element:l}=o;if(this.treeAdapter.getTagName(l)===s&&this.treeAdapter.getNamespaceURI(l)===a){const f=this.treeAdapter.getAttrList(l);f.length===i&&r.push({idx:u,attrs:f})}}return r}_ensureNoahArkCondition(e){if(this.entries.length<br)return;const n=this.treeAdapter.getAttrList(e),r=this._getNoahArkConditionCandidates(e,n);if(r.length<br)return;const i=new Map(n.map(a=>[a.name,a.value]));let s=0;for(let a=0;a<r.length;a++){const u=r[a];u.attrs.every(o=>i.get(o.name)===o.value)&&(s+=1,s>=br&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(vs)}pushElement(e,n){this._ensureNoahArkCondition(e),this.entries.unshift({type:Je.Element,element:e,token:n})}insertElementAfterBookmark(e,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Je.Element,element:e,token:n})}removeEntry(e){const n=this.entries.indexOf(e);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const e=this.entries.indexOf(vs);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){const n=this.entries.find(r=>r.type===Je.Marker||this.treeAdapter.getTagName(r.element)===e);return n&&n.type===Je.Element?n:null}getElementEntry(e){return this.entries.find(n=>n.type===Je.Element&&n.element===e)}}const ft={createDocument(){return{nodeName:"#document",mode:Ve.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(t,e,n){return{nodeName:t,tagName:t,attrs:n,namespaceURI:e,childNodes:[],parentNode:null}},createCommentNode(t){return{nodeName:"#comment",data:t,parentNode:null}},createTextNode(t){return{nodeName:"#text",value:t,parentNode:null}},appendChild(t,e){t.childNodes.push(e),e.parentNode=t},insertBefore(t,e,n){const r=t.childNodes.indexOf(n);t.childNodes.splice(r,0,e),e.parentNode=t},setTemplateContent(t,e){t.content=e},getTemplateContent(t){return t.content},setDocumentType(t,e,n,r){const i=t.childNodes.find(s=>s.nodeName==="#documentType");if(i)i.name=e,i.publicId=n,i.systemId=r;else{const s={nodeName:"#documentType",name:e,publicId:n,systemId:r,parentNode:null};ft.appendChild(t,s)}},setDocumentMode(t,e){t.mode=e},getDocumentMode(t){return t.mode},detachNode(t){if(t.parentNode){const e=t.parentNode.childNodes.indexOf(t);t.parentNode.childNodes.splice(e,1),t.parentNode=null}},insertText(t,e){if(t.childNodes.length>0){const n=t.childNodes[t.childNodes.length-1];if(ft.isTextNode(n)){n.value+=e;return}}ft.appendChild(t,ft.createTextNode(e))},insertTextBefore(t,e,n){const r=t.childNodes[t.childNodes.indexOf(n)-1];r&&ft.isTextNode(r)?r.value+=e:ft.insertBefore(t,ft.createTextNode(e),n)},adoptAttributes(t,e){const n=new Set(t.attrs.map(r=>r.name));for(let r=0;r<e.length;r++)n.has(e[r].name)||t.attrs.push(e[r])},getFirstChild(t){return t.childNodes[0]},getChildNodes(t){return t.childNodes},getParentNode(t){return t.parentNode},getAttrList(t){return t.attrs},getTagName(t){return t.tagName},getNamespaceURI(t){return t.namespaceURI},getTextNodeContent(t){return t.value},getCommentNodeContent(t){return t.data},getDocumentTypeNodeName(t){return t.name},getDocumentTypeNodePublicId(t){return t.publicId},getDocumentTypeNodeSystemId(t){return t.systemId},isTextNode(t){return t.nodeName==="#text"},isCommentNode(t){return t.nodeName==="#comment"},isDocumentTypeNode(t){return t.nodeName==="#documentType"},isElementNode(t){return Object.prototype.hasOwnProperty.call(t,"tagName")},setNodeSourceCodeLocation(t,e){t.sourceCodeLocation=e},getNodeSourceCodeLocation(t){return t.sourceCodeLocation},updateNodeSourceCodeLocation(t,e){t.sourceCodeLocation={...t.sourceCodeLocation,...e}}},Ou="html",Hm="about:legacy-compat",Um="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Du=["+//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//"],jm=[...Du,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],zm=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Pu=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],$m=[...Pu,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Bs(t,e){return e.some(n=>t.startsWith(n))}function Ym(t){return t.name===Ou&&t.publicId===null&&(t.systemId===null||t.systemId===Hm)}function qm(t){if(t.name!==Ou)return Ve.QUIRKS;const{systemId:e}=t;if(e&&e.toLowerCase()===Um)return Ve.QUIRKS;let{publicId:n}=t;if(n!==null){if(n=n.toLowerCase(),zm.has(n))return Ve.QUIRKS;let r=e===null?jm:Du;if(Bs(n,r))return Ve.QUIRKS;if(r=e===null?Pu:$m,Bs(n,r))return Ve.LIMITED_QUIRKS}return Ve.NO_QUIRKS}const Fs={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Vm="definitionurl",Wm="definitionURL",Gm=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(t=>[t.toLowerCase(),t])),Qm=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:P.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:P.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:P.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:P.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:P.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:P.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:P.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:P.XML}],["xml:space",{prefix:"xml",name:"space",namespace:P.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:P.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:P.XMLNS}]]),Km=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(t=>[t.toLowerCase(),t])),Xm=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 Zm(t){const e=t.tagID;return e===c.FONT&&t.attrs.some(({name:r})=>r===Tt.COLOR||r===Tt.SIZE||r===Tt.FACE)||Xm.has(e)}function Mu(t){for(let e=0;e<t.attrs.length;e++)if(t.attrs[e].name===Vm){t.attrs[e].name=Wm;break}}function vu(t){for(let e=0;e<t.attrs.length;e++){const n=Gm.get(t.attrs[e].name);n!=null&&(t.attrs[e].name=n)}}function xi(t){for(let e=0;e<t.attrs.length;e++){const n=Qm.get(t.attrs[e].name);n&&(t.attrs[e].prefix=n.prefix,t.attrs[e].name=n.name,t.attrs[e].namespace=n.namespace)}}function Jm(t){const e=Km.get(t.tagName);e!=null&&(t.tagName=e,t.tagID=jt(t.tagName))}function e1(t,e){return e===P.MATHML&&(t===c.MI||t===c.MO||t===c.MN||t===c.MS||t===c.MTEXT)}function t1(t,e,n){if(e===P.MATHML&&t===c.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Tt.ENCODING){const i=n[r].value.toLowerCase();return i===Fs.TEXT_HTML||i===Fs.APPLICATION_XML}}return e===P.SVG&&(t===c.FOREIGN_OBJECT||t===c.DESC||t===c.TITLE)}function n1(t,e,n,r){return(!r||r===P.HTML)&&t1(t,e,n)||(!r||r===P.MATHML)&&e1(t,e)}const r1="hidden",i1=8,s1=3;var _;(function(t){t[t.INITIAL=0]="INITIAL",t[t.BEFORE_HTML=1]="BEFORE_HTML",t[t.BEFORE_HEAD=2]="BEFORE_HEAD",t[t.IN_HEAD=3]="IN_HEAD",t[t.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",t[t.AFTER_HEAD=5]="AFTER_HEAD",t[t.IN_BODY=6]="IN_BODY",t[t.TEXT=7]="TEXT",t[t.IN_TABLE=8]="IN_TABLE",t[t.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",t[t.IN_CAPTION=10]="IN_CAPTION",t[t.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",t[t.IN_TABLE_BODY=12]="IN_TABLE_BODY",t[t.IN_ROW=13]="IN_ROW",t[t.IN_CELL=14]="IN_CELL",t[t.IN_SELECT=15]="IN_SELECT",t[t.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",t[t.IN_TEMPLATE=17]="IN_TEMPLATE",t[t.AFTER_BODY=18]="AFTER_BODY",t[t.IN_FRAMESET=19]="IN_FRAMESET",t[t.AFTER_FRAMESET=20]="AFTER_FRAMESET",t[t.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",t[t.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(_||(_={}));const a1={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Bu=new Set([c.TABLE,c.TBODY,c.TFOOT,c.THEAD,c.TR]),Hs={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:ft,onParseError:null};class Us{constructor(e,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=_.INITIAL,this.originalInsertionMode=_.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={...Hs,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new Lm(this.options,this),this.activeFormattingElements=new Fm(this.treeAdapter),this.fragmentContextID=r?jt(this.treeAdapter.getTagName(r)):c.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new Bm(this.document,this.treeAdapter,this)}static parse(e,n){const r=new this(n);return r.tokenizer.write(e,!0),r.document}static getFragmentParser(e,n){const r={...Hs,...n};e??(e=r.treeAdapter.createElement(w.TEMPLATE,P.HTML,[]));const i=r.treeAdapter.createElement("documentmock",P.HTML,[]),s=new this(r,i,e);return s.fragmentContextID===c.TEMPLATE&&s.tmplInsertionModeStack.unshift(_.IN_TEMPLATE),s._initTokenizerForFragmentParsing(),s._insertFakeRootElement(),s._resetInsertionMode(),s._findFormInFragmentContext(),s}getFragment(){const e=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,n),n}_err(e,n,r){var i;if(!this.onParseError)return;const s=(i=e.location)!==null&&i!==void 0?i:a1,a={code:n,startLine:s.startLine,startCol:s.startCol,startOffset:s.startOffset,endLine:r?s.startLine:s.endLine,endCol:r?s.startCol:s.endCol,endOffset:r?s.startOffset:s.endOffset};this.onParseError(a)}onItemPush(e,n,r){var i,s;(s=(i=this.treeAdapter).onItemPush)===null||s===void 0||s.call(i,e),r&&this.openElements.stackTop>0&&this._setContextModes(e,n)}onItemPop(e,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,e,this.openElements.current),n){let s,a;this.openElements.stackTop===0&&this.fragmentContext?(s=this.fragmentContext,a=this.fragmentContextID):{current:s,currentTagId:a}=this.openElements,this._setContextModes(s,a)}}_setContextModes(e,n){const r=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===P.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&e!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,e)}_switchToTextParsing(e,n){this._insertElement(e,P.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=_.TEXT}switchToPlaintextParsing(){this.insertionMode=_.TEXT,this.originalInsertionMode=_.IN_BODY,this.tokenizer.state=Ce.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)===w.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==P.HTML))switch(this.fragmentContextID){case c.TITLE:case c.TEXTAREA:{this.tokenizer.state=Ce.RCDATA;break}case c.STYLE:case c.XMP:case c.IFRAME:case c.NOEMBED:case c.NOFRAMES:case c.NOSCRIPT:{this.tokenizer.state=Ce.RAWTEXT;break}case c.SCRIPT:{this.tokenizer.state=Ce.SCRIPT_DATA;break}case c.PLAINTEXT:{this.tokenizer.state=Ce.PLAINTEXT;break}}}_setDocumentType(e){const n=e.name||"",r=e.publicId||"",i=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),e.location){const a=this.treeAdapter.getChildNodes(this.document).find(u=>this.treeAdapter.isDocumentTypeNode(u));a&&this.treeAdapter.setNodeSourceCodeLocation(a,e.location)}}_attachElementToTree(e,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(e,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,e)}}_appendElement(e,n){const r=this.treeAdapter.createElement(e.tagName,n,e.attrs);this._attachElementToTree(r,e.location)}_insertElement(e,n){const r=this.treeAdapter.createElement(e.tagName,n,e.attrs);this._attachElementToTree(r,e.location),this.openElements.push(r,e.tagID)}_insertFakeElement(e,n){const r=this.treeAdapter.createElement(e,P.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(e){const n=this.treeAdapter.createElement(e.tagName,P.HTML,e.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(w.HTML,P.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,c.HTML)}_appendCommentNode(e,n){const r=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,e.location)}_insertCharacters(e){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,e.chars,r):this.treeAdapter.insertText(n,e.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,e.chars)),!e.location)return;const i=this.treeAdapter.getChildNodes(n),s=r?i.lastIndexOf(r):i.length,a=i[s-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){const{endLine:o,endCol:l,endOffset:f}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:o,endCol:l,endOffset:f})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,e.location)}_adoptNodes(e,n){for(let r=this.treeAdapter.getFirstChild(e);r;r=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(e,n){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&n.location){const r=n.location,i=this.treeAdapter.getTagName(e),s=n.type===ne.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,s)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,e.tagID===c.SVG&&this.treeAdapter.getTagName(n)===w.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===P.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===c.MGLYPH||e.tagID===c.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,P.HTML)}_processToken(e){switch(e.type){case ne.CHARACTER:{this.onCharacter(e);break}case ne.NULL_CHARACTER:{this.onNullCharacter(e);break}case ne.COMMENT:{this.onComment(e);break}case ne.DOCTYPE:{this.onDoctype(e);break}case ne.START_TAG:{this._processStartTag(e);break}case ne.END_TAG:{this.onEndTag(e);break}case ne.EOF:{this.onEof(e);break}case ne.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(e);break}}}_isIntegrationPoint(e,n,r){const i=this.treeAdapter.getNamespaceURI(n),s=this.treeAdapter.getAttrList(n);return n1(e,i,s,r)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.entries.length;if(e){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===Je.Marker||this.openElements.contains(i.element)),r=n===-1?e-1:n-1;for(let i=r;i>=0;i--){const s=this.activeFormattingElements.entries[i];this._insertElement(s.token,this.treeAdapter.getNamespaceURI(s.element)),s.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=_.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=_.IN_ROW;return}case c.TBODY:case c.THEAD:case c.TFOOT:{this.insertionMode=_.IN_TABLE_BODY;return}case c.CAPTION:{this.insertionMode=_.IN_CAPTION;return}case c.COLGROUP:{this.insertionMode=_.IN_COLUMN_GROUP;return}case c.TABLE:{this.insertionMode=_.IN_TABLE;return}case c.BODY:{this.insertionMode=_.IN_BODY;return}case c.FRAMESET:{this.insertionMode=_.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?_.AFTER_HEAD:_.BEFORE_HEAD;return}case c.TD:case c.TH:{if(e>0){this.insertionMode=_.IN_CELL;return}break}case c.HEAD:{if(e>0){this.insertionMode=_.IN_HEAD;return}break}}this.insertionMode=_.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let n=e-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===c.TEMPLATE)break;if(r===c.TABLE){this.insertionMode=_.IN_SELECT_IN_TABLE;return}}this.insertionMode=_.IN_SELECT}_isElementCausesFosterParenting(e){return Bu.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 n=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case c.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===P.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case c.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,e,n.beforeElement):this.treeAdapter.appendChild(n.parent,e)}_isSpecialElement(e,n){const r=this.treeAdapter.getNamespaceURI(e);return Sm[r].has(n)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){vp(this,e);return}switch(this.insertionMode){case _.INITIAL:{Xt(this,e);break}case _.BEFORE_HTML:{an(this,e);break}case _.BEFORE_HEAD:{un(this,e);break}case _.IN_HEAD:{on(this,e);break}case _.IN_HEAD_NO_SCRIPT:{ln(this,e);break}case _.AFTER_HEAD:{cn(this,e);break}case _.IN_BODY:case _.IN_CAPTION:case _.IN_CELL:case _.IN_TEMPLATE:{Hu(this,e);break}case _.TEXT:case _.IN_SELECT:case _.IN_SELECT_IN_TABLE:{this._insertCharacters(e);break}case _.IN_TABLE:case _.IN_TABLE_BODY:case _.IN_ROW:{Tr(this,e);break}case _.IN_TABLE_TEXT:{qu(this,e);break}case _.IN_COLUMN_GROUP:{Fn(this,e);break}case _.AFTER_BODY:{Hn(this,e);break}case _.AFTER_AFTER_BODY:{Rn(this,e);break}}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Mp(this,e);return}switch(this.insertionMode){case _.INITIAL:{Xt(this,e);break}case _.BEFORE_HTML:{an(this,e);break}case _.BEFORE_HEAD:{un(this,e);break}case _.IN_HEAD:{on(this,e);break}case _.IN_HEAD_NO_SCRIPT:{ln(this,e);break}case _.AFTER_HEAD:{cn(this,e);break}case _.TEXT:{this._insertCharacters(e);break}case _.IN_TABLE:case _.IN_TABLE_BODY:case _.IN_ROW:{Tr(this,e);break}case _.IN_COLUMN_GROUP:{Fn(this,e);break}case _.AFTER_BODY:{Hn(this,e);break}case _.AFTER_AFTER_BODY:{Rn(this,e);break}}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){Hr(this,e);return}switch(this.insertionMode){case _.INITIAL:case _.BEFORE_HTML:case _.BEFORE_HEAD:case _.IN_HEAD:case _.IN_HEAD_NO_SCRIPT:case _.AFTER_HEAD:case _.IN_BODY:case _.IN_TABLE:case _.IN_CAPTION:case _.IN_COLUMN_GROUP:case _.IN_TABLE_BODY:case _.IN_ROW:case _.IN_CELL:case _.IN_SELECT:case _.IN_SELECT_IN_TABLE:case _.IN_TEMPLATE:case _.IN_FRAMESET:case _.AFTER_FRAMESET:{Hr(this,e);break}case _.IN_TABLE_TEXT:{Zt(this,e);break}case _.AFTER_BODY:{h1(this,e);break}case _.AFTER_AFTER_BODY:case _.AFTER_AFTER_FRAMESET:{m1(this,e);break}}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case _.INITIAL:{p1(this,e);break}case _.BEFORE_HEAD:case _.IN_HEAD:case _.IN_HEAD_NO_SCRIPT:case _.AFTER_HEAD:{this._err(e,R.misplacedDoctype);break}case _.IN_TABLE_TEXT:{Zt(this,e);break}}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,R.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?Bp(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case _.INITIAL:{Xt(this,e);break}case _.BEFORE_HTML:{g1(this,e);break}case _.BEFORE_HEAD:{b1(this,e);break}case _.IN_HEAD:{Ke(this,e);break}case _.IN_HEAD_NO_SCRIPT:{_1(this,e);break}case _.AFTER_HEAD:{k1(this,e);break}case _.IN_BODY:{De(this,e);break}case _.IN_TABLE:{Mt(this,e);break}case _.IN_TABLE_TEXT:{Zt(this,e);break}case _.IN_CAPTION:{Tp(this,e);break}case _.IN_COLUMN_GROUP:{ki(this,e);break}case _.IN_TABLE_BODY:{tr(this,e);break}case _.IN_ROW:{nr(this,e);break}case _.IN_CELL:{Ap(this,e);break}case _.IN_SELECT:{Gu(this,e);break}case _.IN_SELECT_IN_TABLE:{Cp(this,e);break}case _.IN_TEMPLATE:{Sp(this,e);break}case _.AFTER_BODY:{Ip(this,e);break}case _.IN_FRAMESET:{wp(this,e);break}case _.AFTER_FRAMESET:{Rp(this,e);break}case _.AFTER_AFTER_BODY:{Dp(this,e);break}case _.AFTER_AFTER_FRAMESET:{Pp(this,e);break}}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?Fp(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case _.INITIAL:{Xt(this,e);break}case _.BEFORE_HTML:{E1(this,e);break}case _.BEFORE_HEAD:{T1(this,e);break}case _.IN_HEAD:{x1(this,e);break}case _.IN_HEAD_NO_SCRIPT:{A1(this,e);break}case _.AFTER_HEAD:{C1(this,e);break}case _.IN_BODY:{er(this,e);break}case _.TEXT:{lp(this,e);break}case _.IN_TABLE:{hn(this,e);break}case _.IN_TABLE_TEXT:{Zt(this,e);break}case _.IN_CAPTION:{xp(this,e);break}case _.IN_COLUMN_GROUP:{_p(this,e);break}case _.IN_TABLE_BODY:{Ur(this,e);break}case _.IN_ROW:{Wu(this,e);break}case _.IN_CELL:{kp(this,e);break}case _.IN_SELECT:{Qu(this,e);break}case _.IN_SELECT_IN_TABLE:{Np(this,e);break}case _.IN_TEMPLATE:{yp(this,e);break}case _.AFTER_BODY:{Xu(this,e);break}case _.IN_FRAMESET:{Lp(this,e);break}case _.AFTER_FRAMESET:{Op(this,e);break}case _.AFTER_AFTER_BODY:{Rn(this,e);break}}}onEof(e){switch(this.insertionMode){case _.INITIAL:{Xt(this,e);break}case _.BEFORE_HTML:{an(this,e);break}case _.BEFORE_HEAD:{un(this,e);break}case _.IN_HEAD:{on(this,e);break}case _.IN_HEAD_NO_SCRIPT:{ln(this,e);break}case _.AFTER_HEAD:{cn(this,e);break}case _.IN_BODY:case _.IN_TABLE:case _.IN_CAPTION:case _.IN_COLUMN_GROUP:case _.IN_TABLE_BODY:case _.IN_ROW:case _.IN_CELL:case _.IN_SELECT:case _.IN_SELECT_IN_TABLE:{$u(this,e);break}case _.TEXT:{cp(this,e);break}case _.IN_TABLE_TEXT:{Zt(this,e);break}case _.IN_TEMPLATE:{Ku(this,e);break}case _.AFTER_BODY:case _.IN_FRAMESET:case _.AFTER_FRAMESET:case _.AFTER_AFTER_BODY:case _.AFTER_AFTER_FRAMESET:{Ai(this,e);break}}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===E.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 _.IN_HEAD:case _.IN_HEAD_NO_SCRIPT:case _.AFTER_HEAD:case _.TEXT:case _.IN_COLUMN_GROUP:case _.IN_SELECT:case _.IN_SELECT_IN_TABLE:case _.IN_FRAMESET:case _.AFTER_FRAMESET:{this._insertCharacters(e);break}case _.IN_BODY:case _.IN_CAPTION:case _.IN_CELL:case _.IN_TEMPLATE:case _.AFTER_BODY:case _.AFTER_AFTER_BODY:case _.AFTER_AFTER_FRAMESET:{Fu(this,e);break}case _.IN_TABLE:case _.IN_TABLE_BODY:case _.IN_ROW:{Tr(this,e);break}case _.IN_TABLE_TEXT:{Yu(this,e);break}}}}function u1(t,e){let n=t.activeFormattingElements.getElementEntryInScopeWithTagName(e.tagName);return n?t.openElements.contains(n.element)?t.openElements.hasInScope(e.tagID)||(n=null):(t.activeFormattingElements.removeEntry(n),n=null):zu(t,e),n}function o1(t,e){let n=null,r=t.openElements.stackTop;for(;r>=0;r--){const i=t.openElements.items[r];if(i===e.element)break;t._isSpecialElement(i,t.openElements.tagIDs[r])&&(n=i)}return n||(t.openElements.shortenToLength(Math.max(r,0)),t.activeFormattingElements.removeEntry(e)),n}function l1(t,e,n){let r=e,i=t.openElements.getCommonAncestor(e);for(let s=0,a=i;a!==n;s++,a=i){i=t.openElements.getCommonAncestor(a);const u=t.activeFormattingElements.getElementEntry(a),o=u&&s>=s1;!u||o?(o&&t.activeFormattingElements.removeEntry(u),t.openElements.remove(a)):(a=c1(t,u),r===e&&(t.activeFormattingElements.bookmark=u),t.treeAdapter.detachNode(r),t.treeAdapter.appendChild(a,r),r=a)}return r}function c1(t,e){const n=t.treeAdapter.getNamespaceURI(e.element),r=t.treeAdapter.createElement(e.token.tagName,n,e.token.attrs);return t.openElements.replace(e.element,r),e.element=r,r}function f1(t,e,n){const r=t.treeAdapter.getTagName(e),i=jt(r);if(t._isElementCausesFosterParenting(i))t._fosterParentElement(n);else{const s=t.treeAdapter.getNamespaceURI(e);i===c.TEMPLATE&&s===P.HTML&&(e=t.treeAdapter.getTemplateContent(e)),t.treeAdapter.appendChild(e,n)}}function d1(t,e,n){const r=t.treeAdapter.getNamespaceURI(n.element),{token:i}=n,s=t.treeAdapter.createElement(i.tagName,r,i.attrs);t._adoptNodes(e,s),t.treeAdapter.appendChild(e,s),t.activeFormattingElements.insertElementAfterBookmark(s,i),t.activeFormattingElements.removeEntry(n),t.openElements.remove(n.element),t.openElements.insertAfter(e,s,i.tagID)}function _i(t,e){for(let n=0;n<i1;n++){const r=u1(t,e);if(!r)break;const i=o1(t,r);if(!i)break;t.activeFormattingElements.bookmark=r;const s=l1(t,i,r.element),a=t.openElements.getCommonAncestor(r.element);t.treeAdapter.detachNode(s),a&&f1(t,a,s),d1(t,i,r)}}function Hr(t,e){t._appendCommentNode(e,t.openElements.currentTmplContentOrNode)}function h1(t,e){t._appendCommentNode(e,t.openElements.items[0])}function m1(t,e){t._appendCommentNode(e,t.document)}function Ai(t,e){if(t.stopped=!0,e.location){const n=t.fragmentContext?0:2;for(let r=t.openElements.stackTop;r>=n;r--)t._setEndLocation(t.openElements.items[r],e);if(!t.fragmentContext&&t.openElements.stackTop>=0){const r=t.openElements.items[0],i=t.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(t._setEndLocation(r,e),t.openElements.stackTop>=1)){const s=t.openElements.items[1],a=t.treeAdapter.getNodeSourceCodeLocation(s);a&&!a.endTag&&t._setEndLocation(s,e)}}}}function p1(t,e){t._setDocumentType(e);const n=e.forceQuirks?Ve.QUIRKS:qm(e);Ym(e)||t._err(e,R.nonConformingDoctype),t.treeAdapter.setDocumentMode(t.document,n),t.insertionMode=_.BEFORE_HTML}function Xt(t,e){t._err(e,R.missingDoctype,!0),t.treeAdapter.setDocumentMode(t.document,Ve.QUIRKS),t.insertionMode=_.BEFORE_HTML,t._processToken(e)}function g1(t,e){e.tagID===c.HTML?(t._insertElement(e,P.HTML),t.insertionMode=_.BEFORE_HEAD):an(t,e)}function E1(t,e){const n=e.tagID;(n===c.HTML||n===c.HEAD||n===c.BODY||n===c.BR)&&an(t,e)}function an(t,e){t._insertFakeRootElement(),t.insertionMode=_.BEFORE_HEAD,t._processToken(e)}function b1(t,e){switch(e.tagID){case c.HTML:{De(t,e);break}case c.HEAD:{t._insertElement(e,P.HTML),t.headElement=t.openElements.current,t.insertionMode=_.IN_HEAD;break}default:un(t,e)}}function T1(t,e){const n=e.tagID;n===c.HEAD||n===c.BODY||n===c.HTML||n===c.BR?un(t,e):t._err(e,R.endTagWithoutMatchingOpenElement)}function un(t,e){t._insertFakeElement(w.HEAD,c.HEAD),t.headElement=t.openElements.current,t.insertionMode=_.IN_HEAD,t._processToken(e)}function Ke(t,e){switch(e.tagID){case c.HTML:{De(t,e);break}case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:{t._appendElement(e,P.HTML),e.ackSelfClosing=!0;break}case c.TITLE:{t._switchToTextParsing(e,Ce.RCDATA);break}case c.NOSCRIPT:{t.options.scriptingEnabled?t._switchToTextParsing(e,Ce.RAWTEXT):(t._insertElement(e,P.HTML),t.insertionMode=_.IN_HEAD_NO_SCRIPT);break}case c.NOFRAMES:case c.STYLE:{t._switchToTextParsing(e,Ce.RAWTEXT);break}case c.SCRIPT:{t._switchToTextParsing(e,Ce.SCRIPT_DATA);break}case c.TEMPLATE:{t._insertTemplate(e),t.activeFormattingElements.insertMarker(),t.framesetOk=!1,t.insertionMode=_.IN_TEMPLATE,t.tmplInsertionModeStack.unshift(_.IN_TEMPLATE);break}case c.HEAD:{t._err(e,R.misplacedStartTagForHeadElement);break}default:on(t,e)}}function x1(t,e){switch(e.tagID){case c.HEAD:{t.openElements.pop(),t.insertionMode=_.AFTER_HEAD;break}case c.BODY:case c.BR:case c.HTML:{on(t,e);break}case c.TEMPLATE:{St(t,e);break}default:t._err(e,R.endTagWithoutMatchingOpenElement)}}function St(t,e){t.openElements.tmplCount>0?(t.openElements.generateImpliedEndTagsThoroughly(),t.openElements.currentTagId!==c.TEMPLATE&&t._err(e,R.closingOfElementWithOpenChildElements),t.openElements.popUntilTagNamePopped(c.TEMPLATE),t.activeFormattingElements.clearToLastMarker(),t.tmplInsertionModeStack.shift(),t._resetInsertionMode()):t._err(e,R.endTagWithoutMatchingOpenElement)}function on(t,e){t.openElements.pop(),t.insertionMode=_.AFTER_HEAD,t._processToken(e)}function _1(t,e){switch(e.tagID){case c.HTML:{De(t,e);break}case c.BASEFONT:case c.BGSOUND:case c.HEAD:case c.LINK:case c.META:case c.NOFRAMES:case c.STYLE:{Ke(t,e);break}case c.NOSCRIPT:{t._err(e,R.nestedNoscriptInHead);break}default:ln(t,e)}}function A1(t,e){switch(e.tagID){case c.NOSCRIPT:{t.openElements.pop(),t.insertionMode=_.IN_HEAD;break}case c.BR:{ln(t,e);break}default:t._err(e,R.endTagWithoutMatchingOpenElement)}}function ln(t,e){const n=e.type===ne.EOF?R.openElementsLeftAfterEof:R.disallowedContentInNoscriptInHead;t._err(e,n),t.openElements.pop(),t.insertionMode=_.IN_HEAD,t._processToken(e)}function k1(t,e){switch(e.tagID){case c.HTML:{De(t,e);break}case c.BODY:{t._insertElement(e,P.HTML),t.framesetOk=!1,t.insertionMode=_.IN_BODY;break}case c.FRAMESET:{t._insertElement(e,P.HTML),t.insertionMode=_.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:{t._err(e,R.abandonedHeadElementChild),t.openElements.push(t.headElement,c.HEAD),Ke(t,e),t.openElements.remove(t.headElement);break}case c.HEAD:{t._err(e,R.misplacedStartTagForHeadElement);break}default:cn(t,e)}}function C1(t,e){switch(e.tagID){case c.BODY:case c.HTML:case c.BR:{cn(t,e);break}case c.TEMPLATE:{St(t,e);break}default:t._err(e,R.endTagWithoutMatchingOpenElement)}}function cn(t,e){t._insertFakeElement(w.BODY,c.BODY),t.insertionMode=_.IN_BODY,Jn(t,e)}function Jn(t,e){switch(e.type){case ne.CHARACTER:{Hu(t,e);break}case ne.WHITESPACE_CHARACTER:{Fu(t,e);break}case ne.COMMENT:{Hr(t,e);break}case ne.START_TAG:{De(t,e);break}case ne.END_TAG:{er(t,e);break}case ne.EOF:{$u(t,e);break}}}function Fu(t,e){t._reconstructActiveFormattingElements(),t._insertCharacters(e)}function Hu(t,e){t._reconstructActiveFormattingElements(),t._insertCharacters(e),t.framesetOk=!1}function N1(t,e){t.openElements.tmplCount===0&&t.treeAdapter.adoptAttributes(t.openElements.items[0],e.attrs)}function S1(t,e){const n=t.openElements.tryPeekProperlyNestedBodyElement();n&&t.openElements.tmplCount===0&&(t.framesetOk=!1,t.treeAdapter.adoptAttributes(n,e.attrs))}function y1(t,e){const n=t.openElements.tryPeekProperlyNestedBodyElement();t.framesetOk&&n&&(t.treeAdapter.detachNode(n),t.openElements.popAllUpToHtmlElement(),t._insertElement(e,P.HTML),t.insertionMode=_.IN_FRAMESET)}function I1(t,e){t.openElements.hasInButtonScope(c.P)&&t._closePElement(),t._insertElement(e,P.HTML)}function w1(t,e){t.openElements.hasInButtonScope(c.P)&&t._closePElement(),t.openElements.currentTagId!==void 0&&Fr.has(t.openElements.currentTagId)&&t.openElements.pop(),t._insertElement(e,P.HTML)}function L1(t,e){t.openElements.hasInButtonScope(c.P)&&t._closePElement(),t._insertElement(e,P.HTML),t.skipNextNewLine=!0,t.framesetOk=!1}function R1(t,e){const n=t.openElements.tmplCount>0;(!t.formElement||n)&&(t.openElements.hasInButtonScope(c.P)&&t._closePElement(),t._insertElement(e,P.HTML),n||(t.formElement=t.openElements.current))}function O1(t,e){t.framesetOk=!1;const n=e.tagID;for(let r=t.openElements.stackTop;r>=0;r--){const i=t.openElements.tagIDs[r];if(n===c.LI&&i===c.LI||(n===c.DD||n===c.DT)&&(i===c.DD||i===c.DT)){t.openElements.generateImpliedEndTagsWithExclusion(i),t.openElements.popUntilTagNamePopped(i);break}if(i!==c.ADDRESS&&i!==c.DIV&&i!==c.P&&t._isSpecialElement(t.openElements.items[r],i))break}t.openElements.hasInButtonScope(c.P)&&t._closePElement(),t._insertElement(e,P.HTML)}function D1(t,e){t.openElements.hasInButtonScope(c.P)&&t._closePElement(),t._insertElement(e,P.HTML),t.tokenizer.state=Ce.PLAINTEXT}function P1(t,e){t.openElements.hasInScope(c.BUTTON)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(c.BUTTON)),t._reconstructActiveFormattingElements(),t._insertElement(e,P.HTML),t.framesetOk=!1}function M1(t,e){const n=t.activeFormattingElements.getElementEntryInScopeWithTagName(w.A);n&&(_i(t,e),t.openElements.remove(n.element),t.activeFormattingElements.removeEntry(n)),t._reconstructActiveFormattingElements(),t._insertElement(e,P.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function v1(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,P.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function B1(t,e){t._reconstructActiveFormattingElements(),t.openElements.hasInScope(c.NOBR)&&(_i(t,e),t._reconstructActiveFormattingElements()),t._insertElement(e,P.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function F1(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,P.HTML),t.activeFormattingElements.insertMarker(),t.framesetOk=!1}function H1(t,e){t.treeAdapter.getDocumentMode(t.document)!==Ve.QUIRKS&&t.openElements.hasInButtonScope(c.P)&&t._closePElement(),t._insertElement(e,P.HTML),t.framesetOk=!1,t.insertionMode=_.IN_TABLE}function Uu(t,e){t._reconstructActiveFormattingElements(),t._appendElement(e,P.HTML),t.framesetOk=!1,e.ackSelfClosing=!0}function ju(t){const e=wu(t,Tt.TYPE);return e!=null&&e.toLowerCase()===r1}function U1(t,e){t._reconstructActiveFormattingElements(),t._appendElement(e,P.HTML),ju(e)||(t.framesetOk=!1),e.ackSelfClosing=!0}function j1(t,e){t._appendElement(e,P.HTML),e.ackSelfClosing=!0}function z1(t,e){t.openElements.hasInButtonScope(c.P)&&t._closePElement(),t._appendElement(e,P.HTML),t.framesetOk=!1,e.ackSelfClosing=!0}function $1(t,e){e.tagName=w.IMG,e.tagID=c.IMG,Uu(t,e)}function Y1(t,e){t._insertElement(e,P.HTML),t.skipNextNewLine=!0,t.tokenizer.state=Ce.RCDATA,t.originalInsertionMode=t.insertionMode,t.framesetOk=!1,t.insertionMode=_.TEXT}function q1(t,e){t.openElements.hasInButtonScope(c.P)&&t._closePElement(),t._reconstructActiveFormattingElements(),t.framesetOk=!1,t._switchToTextParsing(e,Ce.RAWTEXT)}function V1(t,e){t.framesetOk=!1,t._switchToTextParsing(e,Ce.RAWTEXT)}function js(t,e){t._switchToTextParsing(e,Ce.RAWTEXT)}function W1(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,P.HTML),t.framesetOk=!1,t.insertionMode=t.insertionMode===_.IN_TABLE||t.insertionMode===_.IN_CAPTION||t.insertionMode===_.IN_TABLE_BODY||t.insertionMode===_.IN_ROW||t.insertionMode===_.IN_CELL?_.IN_SELECT_IN_TABLE:_.IN_SELECT}function G1(t,e){t.openElements.currentTagId===c.OPTION&&t.openElements.pop(),t._reconstructActiveFormattingElements(),t._insertElement(e,P.HTML)}function Q1(t,e){t.openElements.hasInScope(c.RUBY)&&t.openElements.generateImpliedEndTags(),t._insertElement(e,P.HTML)}function K1(t,e){t.openElements.hasInScope(c.RUBY)&&t.openElements.generateImpliedEndTagsWithExclusion(c.RTC),t._insertElement(e,P.HTML)}function X1(t,e){t._reconstructActiveFormattingElements(),Mu(e),xi(e),e.selfClosing?t._appendElement(e,P.MATHML):t._insertElement(e,P.MATHML),e.ackSelfClosing=!0}function Z1(t,e){t._reconstructActiveFormattingElements(),vu(e),xi(e),e.selfClosing?t._appendElement(e,P.SVG):t._insertElement(e,P.SVG),e.ackSelfClosing=!0}function zs(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,P.HTML)}function De(t,e){switch(e.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:{v1(t,e);break}case c.A:{M1(t,e);break}case c.H1:case c.H2:case c.H3:case c.H4:case c.H5:case c.H6:{w1(t,e);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:{I1(t,e);break}case c.LI:case c.DD:case c.DT:{O1(t,e);break}case c.BR:case c.IMG:case c.WBR:case c.AREA:case c.EMBED:case c.KEYGEN:{Uu(t,e);break}case c.HR:{z1(t,e);break}case c.RB:case c.RTC:{Q1(t,e);break}case c.RT:case c.RP:{K1(t,e);break}case c.PRE:case c.LISTING:{L1(t,e);break}case c.XMP:{q1(t,e);break}case c.SVG:{Z1(t,e);break}case c.HTML:{N1(t,e);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:{Ke(t,e);break}case c.BODY:{S1(t,e);break}case c.FORM:{R1(t,e);break}case c.NOBR:{B1(t,e);break}case c.MATH:{X1(t,e);break}case c.TABLE:{H1(t,e);break}case c.INPUT:{U1(t,e);break}case c.PARAM:case c.TRACK:case c.SOURCE:{j1(t,e);break}case c.IMAGE:{$1(t,e);break}case c.BUTTON:{P1(t,e);break}case c.APPLET:case c.OBJECT:case c.MARQUEE:{F1(t,e);break}case c.IFRAME:{V1(t,e);break}case c.SELECT:{W1(t,e);break}case c.OPTION:case c.OPTGROUP:{G1(t,e);break}case c.NOEMBED:case c.NOFRAMES:{js(t,e);break}case c.FRAMESET:{y1(t,e);break}case c.TEXTAREA:{Y1(t,e);break}case c.NOSCRIPT:{t.options.scriptingEnabled?js(t,e):zs(t,e);break}case c.PLAINTEXT:{D1(t,e);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:zs(t,e)}}function J1(t,e){if(t.openElements.hasInScope(c.BODY)&&(t.insertionMode=_.AFTER_BODY,t.options.sourceCodeLocationInfo)){const n=t.openElements.tryPeekProperlyNestedBodyElement();n&&t._setEndLocation(n,e)}}function ep(t,e){t.openElements.hasInScope(c.BODY)&&(t.insertionMode=_.AFTER_BODY,Xu(t,e))}function tp(t,e){const n=e.tagID;t.openElements.hasInScope(n)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(n))}function np(t){const e=t.openElements.tmplCount>0,{formElement:n}=t;e||(t.formElement=null),(n||e)&&t.openElements.hasInScope(c.FORM)&&(t.openElements.generateImpliedEndTags(),e?t.openElements.popUntilTagNamePopped(c.FORM):n&&t.openElements.remove(n))}function rp(t){t.openElements.hasInButtonScope(c.P)||t._insertFakeElement(w.P,c.P),t._closePElement()}function ip(t){t.openElements.hasInListItemScope(c.LI)&&(t.openElements.generateImpliedEndTagsWithExclusion(c.LI),t.openElements.popUntilTagNamePopped(c.LI))}function sp(t,e){const n=e.tagID;t.openElements.hasInScope(n)&&(t.openElements.generateImpliedEndTagsWithExclusion(n),t.openElements.popUntilTagNamePopped(n))}function ap(t){t.openElements.hasNumberedHeaderInScope()&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilNumberedHeaderPopped())}function up(t,e){const n=e.tagID;t.openElements.hasInScope(n)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(n),t.activeFormattingElements.clearToLastMarker())}function op(t){t._reconstructActiveFormattingElements(),t._insertFakeElement(w.BR,c.BR),t.openElements.pop(),t.framesetOk=!1}function zu(t,e){const n=e.tagName,r=e.tagID;for(let i=t.openElements.stackTop;i>0;i--){const s=t.openElements.items[i],a=t.openElements.tagIDs[i];if(r===a&&(r!==c.UNKNOWN||t.treeAdapter.getTagName(s)===n)){t.openElements.generateImpliedEndTagsWithExclusion(r),t.openElements.stackTop>=i&&t.openElements.shortenToLength(i);break}if(t._isSpecialElement(s,a))break}}function er(t,e){switch(e.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:{_i(t,e);break}case c.P:{rp(t);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:{tp(t,e);break}case c.LI:{ip(t);break}case c.DD:case c.DT:{sp(t,e);break}case c.H1:case c.H2:case c.H3:case c.H4:case c.H5:case c.H6:{ap(t);break}case c.BR:{op(t);break}case c.BODY:{J1(t,e);break}case c.HTML:{ep(t,e);break}case c.FORM:{np(t);break}case c.APPLET:case c.OBJECT:case c.MARQUEE:{up(t,e);break}case c.TEMPLATE:{St(t,e);break}default:zu(t,e)}}function $u(t,e){t.tmplInsertionModeStack.length>0?Ku(t,e):Ai(t,e)}function lp(t,e){var n;e.tagID===c.SCRIPT&&((n=t.scriptHandler)===null||n===void 0||n.call(t,t.openElements.current)),t.openElements.pop(),t.insertionMode=t.originalInsertionMode}function cp(t,e){t._err(e,R.eofInElementThatCanContainOnlyText),t.openElements.pop(),t.insertionMode=t.originalInsertionMode,t.onEof(e)}function Tr(t,e){if(t.openElements.currentTagId!==void 0&&Bu.has(t.openElements.currentTagId))switch(t.pendingCharacterTokens.length=0,t.hasNonWhitespacePendingCharacterToken=!1,t.originalInsertionMode=t.insertionMode,t.insertionMode=_.IN_TABLE_TEXT,e.type){case ne.CHARACTER:{qu(t,e);break}case ne.WHITESPACE_CHARACTER:{Yu(t,e);break}}else xn(t,e)}function fp(t,e){t.openElements.clearBackToTableContext(),t.activeFormattingElements.insertMarker(),t._insertElement(e,P.HTML),t.insertionMode=_.IN_CAPTION}function dp(t,e){t.openElements.clearBackToTableContext(),t._insertElement(e,P.HTML),t.insertionMode=_.IN_COLUMN_GROUP}function hp(t,e){t.openElements.clearBackToTableContext(),t._insertFakeElement(w.COLGROUP,c.COLGROUP),t.insertionMode=_.IN_COLUMN_GROUP,ki(t,e)}function mp(t,e){t.openElements.clearBackToTableContext(),t._insertElement(e,P.HTML),t.insertionMode=_.IN_TABLE_BODY}function pp(t,e){t.openElements.clearBackToTableContext(),t._insertFakeElement(w.TBODY,c.TBODY),t.insertionMode=_.IN_TABLE_BODY,tr(t,e)}function gp(t,e){t.openElements.hasInTableScope(c.TABLE)&&(t.openElements.popUntilTagNamePopped(c.TABLE),t._resetInsertionMode(),t._processStartTag(e))}function Ep(t,e){ju(e)?t._appendElement(e,P.HTML):xn(t,e),e.ackSelfClosing=!0}function bp(t,e){!t.formElement&&t.openElements.tmplCount===0&&(t._insertElement(e,P.HTML),t.formElement=t.openElements.current,t.openElements.pop())}function Mt(t,e){switch(e.tagID){case c.TD:case c.TH:case c.TR:{pp(t,e);break}case c.STYLE:case c.SCRIPT:case c.TEMPLATE:{Ke(t,e);break}case c.COL:{hp(t,e);break}case c.FORM:{bp(t,e);break}case c.TABLE:{gp(t,e);break}case c.TBODY:case c.TFOOT:case c.THEAD:{mp(t,e);break}case c.INPUT:{Ep(t,e);break}case c.CAPTION:{fp(t,e);break}case c.COLGROUP:{dp(t,e);break}default:xn(t,e)}}function hn(t,e){switch(e.tagID){case c.TABLE:{t.openElements.hasInTableScope(c.TABLE)&&(t.openElements.popUntilTagNamePopped(c.TABLE),t._resetInsertionMode());break}case c.TEMPLATE:{St(t,e);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(t,e)}}function xn(t,e){const n=t.fosterParentingEnabled;t.fosterParentingEnabled=!0,Jn(t,e),t.fosterParentingEnabled=n}function Yu(t,e){t.pendingCharacterTokens.push(e)}function qu(t,e){t.pendingCharacterTokens.push(e),t.hasNonWhitespacePendingCharacterToken=!0}function Zt(t,e){let n=0;if(t.hasNonWhitespacePendingCharacterToken)for(;n<t.pendingCharacterTokens.length;n++)xn(t,t.pendingCharacterTokens[n]);else for(;n<t.pendingCharacterTokens.length;n++)t._insertCharacters(t.pendingCharacterTokens[n]);t.insertionMode=t.originalInsertionMode,t._processToken(e)}const Vu=new Set([c.CAPTION,c.COL,c.COLGROUP,c.TBODY,c.TD,c.TFOOT,c.TH,c.THEAD,c.TR]);function Tp(t,e){const n=e.tagID;Vu.has(n)?t.openElements.hasInTableScope(c.CAPTION)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(c.CAPTION),t.activeFormattingElements.clearToLastMarker(),t.insertionMode=_.IN_TABLE,Mt(t,e)):De(t,e)}function xp(t,e){const n=e.tagID;switch(n){case c.CAPTION:case c.TABLE:{t.openElements.hasInTableScope(c.CAPTION)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(c.CAPTION),t.activeFormattingElements.clearToLastMarker(),t.insertionMode=_.IN_TABLE,n===c.TABLE&&hn(t,e));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:er(t,e)}}function ki(t,e){switch(e.tagID){case c.HTML:{De(t,e);break}case c.COL:{t._appendElement(e,P.HTML),e.ackSelfClosing=!0;break}case c.TEMPLATE:{Ke(t,e);break}default:Fn(t,e)}}function _p(t,e){switch(e.tagID){case c.COLGROUP:{t.openElements.currentTagId===c.COLGROUP&&(t.openElements.pop(),t.insertionMode=_.IN_TABLE);break}case c.TEMPLATE:{St(t,e);break}case c.COL:break;default:Fn(t,e)}}function Fn(t,e){t.openElements.currentTagId===c.COLGROUP&&(t.openElements.pop(),t.insertionMode=_.IN_TABLE,t._processToken(e))}function tr(t,e){switch(e.tagID){case c.TR:{t.openElements.clearBackToTableBodyContext(),t._insertElement(e,P.HTML),t.insertionMode=_.IN_ROW;break}case c.TH:case c.TD:{t.openElements.clearBackToTableBodyContext(),t._insertFakeElement(w.TR,c.TR),t.insertionMode=_.IN_ROW,nr(t,e);break}case c.CAPTION:case c.COL:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:{t.openElements.hasTableBodyContextInTableScope()&&(t.openElements.clearBackToTableBodyContext(),t.openElements.pop(),t.insertionMode=_.IN_TABLE,Mt(t,e));break}default:Mt(t,e)}}function Ur(t,e){const n=e.tagID;switch(e.tagID){case c.TBODY:case c.TFOOT:case c.THEAD:{t.openElements.hasInTableScope(n)&&(t.openElements.clearBackToTableBodyContext(),t.openElements.pop(),t.insertionMode=_.IN_TABLE);break}case c.TABLE:{t.openElements.hasTableBodyContextInTableScope()&&(t.openElements.clearBackToTableBodyContext(),t.openElements.pop(),t.insertionMode=_.IN_TABLE,hn(t,e));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:hn(t,e)}}function nr(t,e){switch(e.tagID){case c.TH:case c.TD:{t.openElements.clearBackToTableRowContext(),t._insertElement(e,P.HTML),t.insertionMode=_.IN_CELL,t.activeFormattingElements.insertMarker();break}case c.CAPTION:case c.COL:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:case c.TR:{t.openElements.hasInTableScope(c.TR)&&(t.openElements.clearBackToTableRowContext(),t.openElements.pop(),t.insertionMode=_.IN_TABLE_BODY,tr(t,e));break}default:Mt(t,e)}}function Wu(t,e){switch(e.tagID){case c.TR:{t.openElements.hasInTableScope(c.TR)&&(t.openElements.clearBackToTableRowContext(),t.openElements.pop(),t.insertionMode=_.IN_TABLE_BODY);break}case c.TABLE:{t.openElements.hasInTableScope(c.TR)&&(t.openElements.clearBackToTableRowContext(),t.openElements.pop(),t.insertionMode=_.IN_TABLE_BODY,Ur(t,e));break}case c.TBODY:case c.TFOOT:case c.THEAD:{(t.openElements.hasInTableScope(e.tagID)||t.openElements.hasInTableScope(c.TR))&&(t.openElements.clearBackToTableRowContext(),t.openElements.pop(),t.insertionMode=_.IN_TABLE_BODY,Ur(t,e));break}case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:case c.TD:case c.TH:break;default:hn(t,e)}}function Ap(t,e){const n=e.tagID;Vu.has(n)?(t.openElements.hasInTableScope(c.TD)||t.openElements.hasInTableScope(c.TH))&&(t._closeTableCell(),nr(t,e)):De(t,e)}function kp(t,e){const n=e.tagID;switch(n){case c.TD:case c.TH:{t.openElements.hasInTableScope(n)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(n),t.activeFormattingElements.clearToLastMarker(),t.insertionMode=_.IN_ROW);break}case c.TABLE:case c.TBODY:case c.TFOOT:case c.THEAD:case c.TR:{t.openElements.hasInTableScope(n)&&(t._closeTableCell(),Wu(t,e));break}case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:break;default:er(t,e)}}function Gu(t,e){switch(e.tagID){case c.HTML:{De(t,e);break}case c.OPTION:{t.openElements.currentTagId===c.OPTION&&t.openElements.pop(),t._insertElement(e,P.HTML);break}case c.OPTGROUP:{t.openElements.currentTagId===c.OPTION&&t.openElements.pop(),t.openElements.currentTagId===c.OPTGROUP&&t.openElements.pop(),t._insertElement(e,P.HTML);break}case c.HR:{t.openElements.currentTagId===c.OPTION&&t.openElements.pop(),t.openElements.currentTagId===c.OPTGROUP&&t.openElements.pop(),t._appendElement(e,P.HTML),e.ackSelfClosing=!0;break}case c.INPUT:case c.KEYGEN:case c.TEXTAREA:case c.SELECT:{t.openElements.hasInSelectScope(c.SELECT)&&(t.openElements.popUntilTagNamePopped(c.SELECT),t._resetInsertionMode(),e.tagID!==c.SELECT&&t._processStartTag(e));break}case c.SCRIPT:case c.TEMPLATE:{Ke(t,e);break}}}function Qu(t,e){switch(e.tagID){case c.OPTGROUP:{t.openElements.stackTop>0&&t.openElements.currentTagId===c.OPTION&&t.openElements.tagIDs[t.openElements.stackTop-1]===c.OPTGROUP&&t.openElements.pop(),t.openElements.currentTagId===c.OPTGROUP&&t.openElements.pop();break}case c.OPTION:{t.openElements.currentTagId===c.OPTION&&t.openElements.pop();break}case c.SELECT:{t.openElements.hasInSelectScope(c.SELECT)&&(t.openElements.popUntilTagNamePopped(c.SELECT),t._resetInsertionMode());break}case c.TEMPLATE:{St(t,e);break}}}function Cp(t,e){const n=e.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?(t.openElements.popUntilTagNamePopped(c.SELECT),t._resetInsertionMode(),t._processStartTag(e)):Gu(t,e)}function Np(t,e){const n=e.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?t.openElements.hasInTableScope(n)&&(t.openElements.popUntilTagNamePopped(c.SELECT),t._resetInsertionMode(),t.onEndTag(e)):Qu(t,e)}function Sp(t,e){switch(e.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:{Ke(t,e);break}case c.CAPTION:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:{t.tmplInsertionModeStack[0]=_.IN_TABLE,t.insertionMode=_.IN_TABLE,Mt(t,e);break}case c.COL:{t.tmplInsertionModeStack[0]=_.IN_COLUMN_GROUP,t.insertionMode=_.IN_COLUMN_GROUP,ki(t,e);break}case c.TR:{t.tmplInsertionModeStack[0]=_.IN_TABLE_BODY,t.insertionMode=_.IN_TABLE_BODY,tr(t,e);break}case c.TD:case c.TH:{t.tmplInsertionModeStack[0]=_.IN_ROW,t.insertionMode=_.IN_ROW,nr(t,e);break}default:t.tmplInsertionModeStack[0]=_.IN_BODY,t.insertionMode=_.IN_BODY,De(t,e)}}function yp(t,e){e.tagID===c.TEMPLATE&&St(t,e)}function Ku(t,e){t.openElements.tmplCount>0?(t.openElements.popUntilTagNamePopped(c.TEMPLATE),t.activeFormattingElements.clearToLastMarker(),t.tmplInsertionModeStack.shift(),t._resetInsertionMode(),t.onEof(e)):Ai(t,e)}function Ip(t,e){e.tagID===c.HTML?De(t,e):Hn(t,e)}function Xu(t,e){var n;if(e.tagID===c.HTML){if(t.fragmentContext||(t.insertionMode=_.AFTER_AFTER_BODY),t.options.sourceCodeLocationInfo&&t.openElements.tagIDs[0]===c.HTML){t._setEndLocation(t.openElements.items[0],e);const r=t.openElements.items[1];r&&!(!((n=t.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&t._setEndLocation(r,e)}}else Hn(t,e)}function Hn(t,e){t.insertionMode=_.IN_BODY,Jn(t,e)}function wp(t,e){switch(e.tagID){case c.HTML:{De(t,e);break}case c.FRAMESET:{t._insertElement(e,P.HTML);break}case c.FRAME:{t._appendElement(e,P.HTML),e.ackSelfClosing=!0;break}case c.NOFRAMES:{Ke(t,e);break}}}function Lp(t,e){e.tagID===c.FRAMESET&&!t.openElements.isRootHtmlElementCurrent()&&(t.openElements.pop(),!t.fragmentContext&&t.openElements.currentTagId!==c.FRAMESET&&(t.insertionMode=_.AFTER_FRAMESET))}function Rp(t,e){switch(e.tagID){case c.HTML:{De(t,e);break}case c.NOFRAMES:{Ke(t,e);break}}}function Op(t,e){e.tagID===c.HTML&&(t.insertionMode=_.AFTER_AFTER_FRAMESET)}function Dp(t,e){e.tagID===c.HTML?De(t,e):Rn(t,e)}function Rn(t,e){t.insertionMode=_.IN_BODY,Jn(t,e)}function Pp(t,e){switch(e.tagID){case c.HTML:{De(t,e);break}case c.NOFRAMES:{Ke(t,e);break}}}function Mp(t,e){e.chars=_e,t._insertCharacters(e)}function vp(t,e){t._insertCharacters(e),t.framesetOk=!1}function Zu(t){for(;t.treeAdapter.getNamespaceURI(t.openElements.current)!==P.HTML&&t.openElements.currentTagId!==void 0&&!t._isIntegrationPoint(t.openElements.currentTagId,t.openElements.current);)t.openElements.pop()}function Bp(t,e){if(Zm(e))Zu(t),t._startTagOutsideForeignContent(e);else{const n=t._getAdjustedCurrentElement(),r=t.treeAdapter.getNamespaceURI(n);r===P.MATHML?Mu(e):r===P.SVG&&(Jm(e),vu(e)),xi(e),e.selfClosing?t._appendElement(e,r):t._insertElement(e,r),e.ackSelfClosing=!0}}function Fp(t,e){if(e.tagID===c.P||e.tagID===c.BR){Zu(t),t._endTagOutsideForeignContent(e);return}for(let n=t.openElements.stackTop;n>0;n--){const r=t.openElements.items[n];if(t.treeAdapter.getNamespaceURI(r)===P.HTML){t._endTagOutsideForeignContent(e);break}const i=t.treeAdapter.getTagName(r);if(i.toLowerCase()===e.tagName){e.tagName=i,t.openElements.shortenToLength(n);break}}}w.AREA,w.BASE,w.BASEFONT,w.BGSOUND,w.BR,w.COL,w.EMBED,w.FRAME,w.HR,w.IMG,w.INPUT,w.KEYGEN,w.LINK,w.META,w.PARAM,w.SOURCE,w.TRACK,w.WBR;const Hp=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,Up=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),$s={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Ju(t,e){const n=Kp(t),r=Cu("type",{handlers:{root:jp,element:zp,text:$p,comment:to,doctype:Yp,raw:Vp},unknown:Wp}),i={parser:n?new Us($s):Us.getFragmentParser(void 0,$s),handle(u){r(u,i)},stitches:!1,options:e||{}};r(t,i),zt(i,et());const s=n?i.parser.document:i.parser.getFragment(),a=Xh(s,{file:i.options.file});return i.stitches&&Zn(a,"comment",function(u,o,l){const f=u;if(f.value.stitch&&l&&o!==void 0){const d=l.children;return d[o]=f.value.stitch,o}}),a.type==="root"&&a.children.length===1&&a.children[0].type===t.type?a.children[0]:a}function eo(t,e){let n=-1;if(t)for(;++n<t.length;)e.handle(t[n])}function jp(t,e){eo(t.children,e)}function zp(t,e){Gp(t,e),eo(t.children,e),Qp(t,e)}function $p(t,e){e.parser.tokenizer.state>4&&(e.parser.tokenizer.state=0);const n={type:ne.CHARACTER,chars:t.value,location:_n(t)};zt(e,et(t)),e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)}function Yp(t,e){const n={type:ne.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:_n(t)};zt(e,et(t)),e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)}function qp(t,e){e.stitches=!0;const n=Xp(t);if("children"in t&&"children"in n){const r=Ju({type:"root",children:t.children},e.options);n.children=r.children}to({type:"comment",value:{stitch:n}},e)}function to(t,e){const n=t.value,r={type:ne.COMMENT,data:n,location:_n(t)};zt(e,et(t)),e.parser.currentToken=r,e.parser._processToken(e.parser.currentToken)}function Vp(t,e){if(e.parser.tokenizer.preprocessor.html="",e.parser.tokenizer.preprocessor.pos=-1,e.parser.tokenizer.preprocessor.lastGapPos=-2,e.parser.tokenizer.preprocessor.gapStack=[],e.parser.tokenizer.preprocessor.skipNextNewLine=!1,e.parser.tokenizer.preprocessor.lastChunkWritten=!1,e.parser.tokenizer.preprocessor.endOfChunkHit=!1,e.parser.tokenizer.preprocessor.isEol=!1,no(e,et(t)),e.parser.tokenizer.write(e.options.tagfilter?t.value.replace(Hp,"<$1$2"):t.value,!1),e.parser.tokenizer._runParsingLoop(),e.parser.tokenizer.state===72||e.parser.tokenizer.state===78){e.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=e.parser.tokenizer._consume();e.parser.tokenizer._callState(n)}}function Wp(t,e){const n=t;if(e.options.passThrough&&e.options.passThrough.includes(n.type))qp(n,e);else{let r="";throw Up.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 zt(t,e){no(t,e);const n=t.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=t.parser.tokenizer.preprocessor.line,n.location.endCol=t.parser.tokenizer.preprocessor.col+1,n.location.endOffset=t.parser.tokenizer.preprocessor.offset+1,t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)),t.parser.tokenizer.paused=!1,t.parser.tokenizer.inLoop=!1,t.parser.tokenizer.active=!1,t.parser.tokenizer.returnState=Ce.DATA,t.parser.tokenizer.charRefCode=-1,t.parser.tokenizer.consumedAfterSnapshot=-1,t.parser.tokenizer.currentLocation=null,t.parser.tokenizer.currentCharacterToken=null,t.parser.tokenizer.currentToken=null,t.parser.tokenizer.currentAttr={name:"",value:""}}function no(t,e){if(e&&e.offset!==void 0){const n={startLine:e.line,startCol:e.column,startOffset:e.offset,endLine:-1,endCol:-1,endOffset:-1};t.parser.tokenizer.preprocessor.lineStartPos=-e.column+1,t.parser.tokenizer.preprocessor.droppedBufferSize=e.offset,t.parser.tokenizer.preprocessor.line=e.line,t.parser.tokenizer.currentLocation=n}}function Gp(t,e){const n=t.tagName.toLowerCase();if(e.parser.tokenizer.state===Ce.PLAINTEXT)return;zt(e,et(t));const r=e.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:bt.html;i===bt.html&&n==="svg"&&(i=bt.svg);const s=nm({...t,children:[]},{space:i===bt.svg?"svg":"html"}),a={type:ne.START_TAG,tagName:n,tagID:jt(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in s?s.attrs:[],location:_n(t)};e.parser.currentToken=a,e.parser._processToken(e.parser.currentToken),e.parser.tokenizer.lastStartTagName=n}function Qp(t,e){const n=t.tagName.toLowerCase();if(!e.parser.tokenizer.inForeignNode&&cm.includes(n)||e.parser.tokenizer.state===Ce.PLAINTEXT)return;zt(e,Vn(t));const r={type:ne.END_TAG,tagName:n,tagID:jt(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:_n(t)};e.parser.currentToken=r,e.parser._processToken(e.parser.currentToken),n===e.parser.tokenizer.lastStartTagName&&(e.parser.tokenizer.state===Ce.RCDATA||e.parser.tokenizer.state===Ce.RAWTEXT||e.parser.tokenizer.state===Ce.SCRIPT_DATA)&&(e.parser.tokenizer.state=Ce.DATA)}function Kp(t){const e=t.type==="root"?t.children[0]:t;return!!(e&&(e.type==="doctype"||e.type==="element"&&e.tagName.toLowerCase()==="html"))}function _n(t){const e=et(t)||{line:void 0,column:void 0,offset:void 0},n=Vn(t)||{line:void 0,column:void 0,offset:void 0};return{startLine:e.line,startCol:e.column,startOffset:e.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function Xp(t){return"children"in t?Pt({...t,children:[]}):Pt(t)}function Zp(t){return function(e,n){return Ju(e,{...t,file:n})}}function Ys(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(e);for(;i!==-1;)r++,i=n.indexOf(e,i+e.length);return r}function Jp(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function eg(t,e,n){const i=Kn((n||{}).ignore||[]),s=tg(e);let a=-1;for(;++a<s.length;)Tu(t,"text",u);function u(l,f){let d=-1,m;for(;++d<f.length;){const h=f[d],g=m?m.children:void 0;if(i(h,g?g.indexOf(h):void 0,m))return;m=h}if(m)return o(l,f)}function o(l,f){const d=f[f.length-1],m=s[a][0],h=s[a][1];let g=0;const C=d.children.indexOf(l);let T=!1,S=[];m.lastIndex=0;let N=m.exec(l.value);for(;N;){const L=N.index,O={index:N.index,input:N.input,stack:[...f,l]};let y=h(...N,O);if(typeof y=="string"&&(y=y.length>0?{type:"text",value:y}:void 0),y===!1?m.lastIndex=L+1:(g!==L&&S.push({type:"text",value:l.value.slice(g,L)}),Array.isArray(y)?S.push(...y):y&&S.push(y),g=L+N[0].length,T=!0),!m.global)break;N=m.exec(l.value)}return T?(g<l.value.length&&S.push({type:"text",value:l.value.slice(g)}),d.children.splice(C,1,...S)):S=[l],C+S.length}}function tg(t){const e=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!t[0]||Array.isArray(t[0])?t:[t];let r=-1;for(;++r<n.length;){const i=n[r];e.push([ng(i[0]),rg(i[1])])}return e}function ng(t){return typeof t=="string"?new RegExp(Jp(t),"g"):t}function rg(t){return typeof t=="function"?t:function(){return t}}const xr="phrasing",_r=["autolink","link","image","label"];function ig(){return{transforms:[fg],enter:{literalAutolink:ag,literalAutolinkEmail:Ar,literalAutolinkHttp:Ar,literalAutolinkWww:Ar},exit:{literalAutolink:cg,literalAutolinkEmail:lg,literalAutolinkHttp:ug,literalAutolinkWww:og}}}function sg(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:xr,notInConstruct:_r},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:xr,notInConstruct:_r},{character:":",before:"[ps]",after:"\\/",inConstruct:xr,notInConstruct:_r}]}}function ag(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function Ar(t){this.config.enter.autolinkProtocol.call(this,t)}function ug(t){this.config.exit.autolinkProtocol.call(this,t)}function og(t){this.config.exit.data.call(this,t);const e=this.stack[this.stack.length-1];e.type,e.url="http://"+this.sliceSerialize(t)}function lg(t){this.config.exit.autolinkEmail.call(this,t)}function cg(t){this.exit(t)}function fg(t){eg(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,dg],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),hg]],{ignore:["link","linkReference"]})}function dg(t,e,n,r,i){let s="";if(!ro(i)||(/^w/i.test(e)&&(n=e+n,e="",s="http://"),!mg(n)))return!1;const a=pg(n+r);if(!a[0])return!1;const u={type:"link",title:null,url:s+e+a[0],children:[{type:"text",value:e+a[0]}]};return a[1]?[u,{type:"text",value:a[1]}]:u}function hg(t,e,n,r){return!ro(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+n,children:[{type:"text",value:e+"@"+n}]}}function mg(t){const e=t.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}function pg(t){const e=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let n=e[0],r=n.indexOf(")");const i=Ys(t,"(");let s=Ys(t,")");for(;r!==-1&&i>s;)t+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[t,n]}function ro(t,e){const n=t.input.charCodeAt(t.index-1);return(t.index===0||kt(n)||Wn(n))&&(!e||n!==47)}io.peek=Cg;function gg(){this.buffer()}function Eg(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function bg(){this.buffer()}function Tg(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function xg(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ge(this.sliceSerialize(t)).toLowerCase(),n.label=e}function _g(t){this.exit(t)}function Ag(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ge(this.sliceSerialize(t)).toLowerCase(),n.label=e}function kg(t){this.exit(t)}function Cg(){return"["}function io(t,e,n,r){const i=n.createTracker(r);let s=i.move("[^");const a=n.enter("footnoteReference"),u=n.enter("reference");return s+=i.move(n.safe(n.associationId(t),{after:"]",before:s})),u(),a(),s+=i.move("]"),s}function Ng(){return{enter:{gfmFootnoteCallString:gg,gfmFootnoteCall:Eg,gfmFootnoteDefinitionLabelString:bg,gfmFootnoteDefinition:Tg},exit:{gfmFootnoteCallString:xg,gfmFootnoteCall:_g,gfmFootnoteDefinitionLabelString:Ag,gfmFootnoteDefinition:kg}}}function Sg(t){let e=!1;return t&&t.firstLineBlank&&(e=!0),{handlers:{footnoteDefinition:n,footnoteReference:io},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,a){const u=s.createTracker(a);let o=u.move("[^");const l=s.enter("footnoteDefinition"),f=s.enter("label");return o+=u.move(s.safe(s.associationId(r),{before:o,after:"]"})),f(),o+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),o+=u.move((e?`
|
|
72
|
+
`:" ")+s.indentLines(s.containerFlow(r,u.current()),e?so:yg))),l(),o}}function yg(t,e,n){return e===0?t:so(t,e,n)}function so(t,e,n){return(n?"":" ")+t}const Ig=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ao.peek=Dg;function wg(){return{canContainEols:["delete"],enter:{strikethrough:Rg},exit:{strikethrough:Og}}}function Lg(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Ig}],handlers:{delete:ao}}}function Rg(t){this.enter({type:"delete",children:[]},t)}function Og(t){this.exit(t)}function ao(t,e,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(t,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),s(),a}function Dg(){return"~"}function Pg(t){return t.length}function Mg(t,e){const n=e||{},r=(n.align||[]).concat(),i=n.stringLength||Pg,s=[],a=[],u=[],o=[];let l=0,f=-1;for(;++f<t.length;){const k=[],C=[];let T=-1;for(t[f].length>l&&(l=t[f].length);++T<t[f].length;){const S=vg(t[f][T]);if(n.alignDelimiters!==!1){const N=i(S);C[T]=N,(o[T]===void 0||N>o[T])&&(o[T]=N)}k.push(S)}a[f]=k,u[f]=C}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<l;)s[d]=qs(r[d]);else{const k=qs(r);for(;++d<l;)s[d]=k}d=-1;const m=[],h=[];for(;++d<l;){const k=s[d];let C="",T="";k===99?(C=":",T=":"):k===108?C=":":k===114&&(T=":");let S=n.alignDelimiters===!1?1:Math.max(1,o[d]-C.length-T.length);const N=C+"-".repeat(S)+T;n.alignDelimiters!==!1&&(S=C.length+S+T.length,S>o[d]&&(o[d]=S),h[d]=S),m[d]=N}a.splice(1,0,m),u.splice(1,0,h),f=-1;const g=[];for(;++f<a.length;){const k=a[f],C=u[f];d=-1;const T=[];for(;++d<l;){const S=k[d]||"";let N="",L="";if(n.alignDelimiters!==!1){const O=o[d]-(C[d]||0),y=s[d];y===114?N=" ".repeat(O):y===99?O%2?(N=" ".repeat(O/2+.5),L=" ".repeat(O/2-.5)):(N=" ".repeat(O/2),L=N):L=" ".repeat(O)}n.delimiterStart!==!1&&!d&&T.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&S==="")&&(n.delimiterStart!==!1||d)&&T.push(" "),n.alignDelimiters!==!1&&T.push(N),T.push(S),n.alignDelimiters!==!1&&T.push(L),n.padding!==!1&&T.push(" "),(n.delimiterEnd!==!1||d!==l-1)&&T.push("|")}g.push(n.delimiterEnd===!1?T.join("").replace(/ +$/,""):T.join(""))}return g.join(`
|
|
73
|
+
`)}function vg(t){return t==null?"":String(t)}function qs(t){const e=typeof t=="string"?t.codePointAt(0):0;return e===67||e===99?99:e===76||e===108?108:e===82||e===114?114:0}function Bg(t,e,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const a=n.indentLines(n.containerFlow(t,s.current()),Fg);return i(),a}function Fg(t,e,n){return">"+(n?"":" ")+t}function Hg(t,e){return Vs(t,e.inConstruct,!0)&&!Vs(t,e.notInConstruct,!1)}function Vs(t,e,n){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return n;let r=-1;for(;++r<e.length;)if(t.includes(e[r]))return!0;return!1}function Ws(t,e,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
74
|
+
`&&Hg(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
75
|
+
`}function Ug(t,e){const n=String(t);let r=n.indexOf(e),i=r,s=0,a=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>a&&(a=s):s=1,i=r+e.length,r=n.indexOf(e,i);return a}function jg(t,e){return!!(e.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function zg(t){const e=t.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function $g(t,e,n,r){const i=zg(n),s=t.value||"",a=i==="`"?"GraveAccent":"Tilde";if(jg(t,n)){const d=n.enter("codeIndented"),m=n.indentLines(s,Yg);return d(),m}const u=n.createTracker(r),o=i.repeat(Math.max(Ug(s,i)+1,3)),l=n.enter("codeFenced");let f=u.move(o);if(t.lang){const d=n.enter(`codeFencedLang${a}`);f+=u.move(n.safe(t.lang,{before:f,after:" ",encode:["`"],...u.current()})),d()}if(t.lang&&t.meta){const d=n.enter(`codeFencedMeta${a}`);f+=u.move(" "),f+=u.move(n.safe(t.meta,{before:f,after:`
|
|
76
76
|
`,encode:["`"],...u.current()})),d()}return f+=u.move(`
|
|
77
77
|
`),s&&(f+=u.move(s+`
|
|
78
|
-
`)),f+=u.move(o),l(),f}function
|
|
79
|
-
`,...o.current()}))),u(),t.title&&(u=n.enter(`title${s}`),l+=o.move(" "+i),l+=o.move(n.safe(t.title,{before:l,after:i,...o.current()})),l+=o.move(i),u()),a(),l}function
|
|
78
|
+
`)),f+=u.move(o),l(),f}function Yg(t,e,n){return(n?"":" ")+t}function Ci(t){const e=t.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function qg(t,e,n,r){const i=Ci(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("definition");let u=n.enter("label");const o=n.createTracker(r);let l=o.move("[");return l+=o.move(n.safe(n.associationId(t),{before:l,after:"]",...o.current()})),l+=o.move("]: "),u(),!t.url||/[\0- \u007F]/.test(t.url)?(u=n.enter("destinationLiteral"),l+=o.move("<"),l+=o.move(n.safe(t.url,{before:l,after:">",...o.current()})),l+=o.move(">")):(u=n.enter("destinationRaw"),l+=o.move(n.safe(t.url,{before:l,after:t.title?" ":`
|
|
79
|
+
`,...o.current()}))),u(),t.title&&(u=n.enter(`title${s}`),l+=o.move(" "+i),l+=o.move(n.safe(t.title,{before:l,after:i,...o.current()})),l+=o.move(i),u()),a(),l}function Vg(t){const e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}function mn(t){return"&#x"+t.toString(16).toUpperCase()+";"}function Un(t,e,n){const r=Dt(t),i=Dt(e);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}}uo.peek=Wg;function uo(t,e,n,r){const i=Vg(n),s=n.enter("emphasis"),a=n.createTracker(r),u=a.move(i);let o=a.move(n.containerPhrasing(t,{after:i,before:u,...a.current()}));const l=o.charCodeAt(0),f=Un(r.before.charCodeAt(r.before.length-1),l,i);f.inside&&(o=mn(l)+o.slice(1));const d=o.charCodeAt(o.length-1),m=Un(r.after.charCodeAt(0),d,i);m.inside&&(o=o.slice(0,-1)+mn(d));const h=a.move(i);return s(),n.attentionEncodeSurroundingInfo={after:m.outside,before:f.outside},u+o+h}function Wg(t,e,n){return n.options.emphasis||"*"}function Gg(t,e){let n=!1;return Zn(t,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Or}),!!((!t.depth||t.depth<3)&&ci(t)&&(e.options.setext||n))}function Qg(t,e,n,r){const i=Math.max(Math.min(6,t.depth||1),1),s=n.createTracker(r);if(Gg(t,n)){const f=n.enter("headingSetext"),d=n.enter("phrasing"),m=n.containerPhrasing(t,{...s.current(),before:`
|
|
80
80
|
`,after:`
|
|
81
81
|
`});return d(),f(),m+`
|
|
82
82
|
`+(i===1?"=":"-").repeat(m.length-(Math.max(m.lastIndexOf("\r"),m.lastIndexOf(`
|
|
83
83
|
`))+1))}const a="#".repeat(i),u=n.enter("headingAtx"),o=n.enter("phrasing");s.move(a+" ");let l=n.containerPhrasing(t,{before:"# ",after:`
|
|
84
|
-
`,...s.current()});return/^[\t ]/.test(l)&&(l=mn(l.charCodeAt(0))+l.slice(1)),l=l?a+" "+l:a,n.options.closeAtx&&(l+=" "+a),o(),u(),l}oo.peek=
|
|
84
|
+
`,...s.current()});return/^[\t ]/.test(l)&&(l=mn(l.charCodeAt(0))+l.slice(1)),l=l?a+" "+l:a,n.options.closeAtx&&(l+=" "+a),o(),u(),l}oo.peek=Kg;function oo(t){return t.value||""}function Kg(){return"<"}lo.peek=Xg;function lo(t,e,n,r){const i=Ci(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let u=n.enter("label");const o=n.createTracker(r);let l=o.move("![");return l+=o.move(n.safe(t.alt,{before:l,after:"]",...o.current()})),l+=o.move("]("),u(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(u=n.enter("destinationLiteral"),l+=o.move("<"),l+=o.move(n.safe(t.url,{before:l,after:">",...o.current()})),l+=o.move(">")):(u=n.enter("destinationRaw"),l+=o.move(n.safe(t.url,{before:l,after:t.title?" ":")",...o.current()}))),u(),t.title&&(u=n.enter(`title${s}`),l+=o.move(" "+i),l+=o.move(n.safe(t.title,{before:l,after:i,...o.current()})),l+=o.move(i),u()),l+=o.move(")"),a(),l}function Xg(){return"!"}co.peek=Zg;function co(t,e,n,r){const i=t.referenceType,s=n.enter("imageReference");let a=n.enter("label");const u=n.createTracker(r);let o=u.move("![");const l=n.safe(t.alt,{before:o,after:"]",...u.current()});o+=u.move(l+"]["),a();const f=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(t),{before:o,after:"]",...u.current()});return a(),n.stack=f,s(),i==="full"||!l||l!==d?o+=u.move(d+"]"):i==="shortcut"?o=o.slice(0,-1):o+=u.move("]"),o}function Zg(){return"!"}fo.peek=Jg;function fo(t,e,n){let r=t.value||"",i="`",s=-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+" ");++s<n.unsafe.length;){const a=n.unsafe[s],u=n.compilePattern(a);let o;if(a.atBreak)for(;o=u.exec(r);){let l=o.index;r.charCodeAt(l)===10&&r.charCodeAt(l-1)===13&&l--,r=r.slice(0,l)+" "+r.slice(o.index+1)}}return i+r+i}function Jg(){return"`"}function ho(t,e){const n=ci(t);return!!(!e.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(n===t.url||"mailto:"+n===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}mo.peek=e2;function mo(t,e,n,r){const i=Ci(n),s=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let u,o;if(ho(t,n)){const f=n.stack;n.stack=[],u=n.enter("autolink");let d=a.move("<");return d+=a.move(n.containerPhrasing(t,{before:d,after:">",...a.current()})),d+=a.move(">"),u(),n.stack=f,d}u=n.enter("link"),o=n.enter("label");let l=a.move("[");return l+=a.move(n.containerPhrasing(t,{before:l,after:"](",...a.current()})),l+=a.move("]("),o(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(o=n.enter("destinationLiteral"),l+=a.move("<"),l+=a.move(n.safe(t.url,{before:l,after:">",...a.current()})),l+=a.move(">")):(o=n.enter("destinationRaw"),l+=a.move(n.safe(t.url,{before:l,after:t.title?" ":")",...a.current()}))),o(),t.title&&(o=n.enter(`title${s}`),l+=a.move(" "+i),l+=a.move(n.safe(t.title,{before:l,after:i,...a.current()})),l+=a.move(i),o()),l+=a.move(")"),u(),l}function e2(t,e,n){return ho(t,n)?"<":"["}po.peek=t2;function po(t,e,n,r){const i=t.referenceType,s=n.enter("linkReference");let a=n.enter("label");const u=n.createTracker(r);let o=u.move("[");const l=n.containerPhrasing(t,{before:o,after:"]",...u.current()});o+=u.move(l+"]["),a();const f=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(t),{before:o,after:"]",...u.current()});return a(),n.stack=f,s(),i==="full"||!l||l!==d?o+=u.move(d+"]"):i==="shortcut"?o=o.slice(0,-1):o+=u.move("]"),o}function t2(){return"["}function Ni(t){const e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function n2(t){const e=Ni(t),n=t.options.bulletOther;if(!n)return e==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+n+"`) to be different");return n}function r2(t){const e=t.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function go(t){const e=t.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function i2(t,e,n,r){const i=n.enter("list"),s=n.bulletCurrent;let a=t.ordered?r2(n):Ni(n);const u=t.ordered?a==="."?")":".":n2(n);let o=e&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!t.ordered){const f=t.children?t.children[0]:void 0;if((a==="*"||a==="-")&&f&&(!f.children||!f.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),go(n)===a&&f){let d=-1;for(;++d<t.children.length;){const m=t.children[d];if(m&&m.type==="listItem"&&m.children&&m.children[0]&&m.children[0].type==="thematicBreak"){o=!0;break}}}}o&&(a=u),n.bulletCurrent=a;const l=n.containerFlow(t,r);return n.bulletLastUsed=a,n.bulletCurrent=s,i(),l}function s2(t){const e=t.options.listItemIndent||"one";if(e!=="tab"&&e!=="one"&&e!=="mixed")throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return e}function a2(t,e,n,r){const i=s2(n);let s=n.bulletCurrent||Ni(n);e&&e.type==="list"&&e.ordered&&(s=(typeof e.start=="number"&&e.start>-1?e.start:1)+(n.options.incrementListMarker===!1?0:e.children.indexOf(t))+s);let a=s.length+1;(i==="tab"||i==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(a=Math.ceil(a/4)*4);const u=n.createTracker(r);u.move(s+" ".repeat(a-s.length)),u.shift(a);const o=n.enter("listItem"),l=n.indentLines(n.containerFlow(t,u.current()),f);return o(),l;function f(d,m,h){return m?(h?"":" ".repeat(a))+d:(h?s:s+" ".repeat(a-s.length))+d}}function u2(t,e,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),a=n.containerPhrasing(t,r);return s(),i(),a}const o2=Kn(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function l2(t,e,n,r){return(t.children.some(function(a){return o2(a)})?n.containerPhrasing:n.containerFlow).call(n,t,r)}function c2(t){const e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}Eo.peek=f2;function Eo(t,e,n,r){const i=c2(n),s=n.enter("strong"),a=n.createTracker(r),u=a.move(i+i);let o=a.move(n.containerPhrasing(t,{after:i,before:u,...a.current()}));const l=o.charCodeAt(0),f=Un(r.before.charCodeAt(r.before.length-1),l,i);f.inside&&(o=mn(l)+o.slice(1));const d=o.charCodeAt(o.length-1),m=Un(r.after.charCodeAt(0),d,i);m.inside&&(o=o.slice(0,-1)+mn(d));const h=a.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:m.outside,before:f.outside},u+o+h}function f2(t,e,n){return n.options.strong||"*"}function d2(t,e,n,r){return n.safe(t.value,r)}function h2(t){const e=t.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function m2(t,e,n){const r=(go(n)+(n.options.ruleSpaces?" ":"")).repeat(h2(n));return n.options.ruleSpaces?r.slice(0,-1):r}const bo={blockquote:Bg,break:Ws,code:$g,definition:qg,emphasis:uo,hardBreak:Ws,heading:Qg,html:oo,image:lo,imageReference:co,inlineCode:fo,link:mo,linkReference:po,list:i2,listItem:a2,paragraph:u2,root:l2,strong:Eo,text:d2,thematicBreak:m2};function p2(){return{enter:{table:g2,tableData:Gs,tableHeader:Gs,tableRow:b2},exit:{codeText:T2,table:E2,tableData:kr,tableHeader:kr,tableRow:kr}}}function g2(t){const e=t._align;this.enter({type:"table",align:e.map(function(n){return n==="none"?null:n}),children:[]},t),this.data.inTable=!0}function E2(t){this.exit(t),this.data.inTable=void 0}function b2(t){this.enter({type:"tableRow",children:[]},t)}function kr(t){this.exit(t)}function Gs(t){this.enter({type:"tableCell",children:[]},t)}function T2(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,x2));const n=this.stack[this.stack.length-1];n.type,n.value=e,this.exit(t)}function x2(t,e){return e==="|"?e:t}function _2(t){const e=t||{},n=e.tableCellPadding,r=e.tablePipeAlign,i=e.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
85
85
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:m,table:a,tableCell:o,tableRow:u}};function a(h,g,k,C){return l(f(h,k,C),h.align)}function u(h,g,k,C){const T=d(h,k,C),S=l([T]);return S.slice(0,S.indexOf(`
|
|
86
|
-
`))}function o(h,g,k,C){const T=k.enter("tableCell"),S=k.enter("phrasing"),N=k.containerPhrasing(h,{...C,before:s,after:s});return S(),T(),N}function l(h,g){return vg(h,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function f(h,g,k){const C=h.children;let T=-1;const S=[],N=g.enter("table");for(;++T<C.length;)S[T]=d(C[T],g,k);return N(),S}function d(h,g,k){const C=h.children;let T=-1;const S=[],N=g.enter("tableRow");for(;++T<C.length;)S[T]=o(C[T],h,g,k);return N(),S}function m(h,g,k){let C=bo.inlineCode(h,g,k);return k.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function k2(){return{exit:{taskListCheckValueChecked:Gs,taskListCheckValueUnchecked:Gs,paragraph:N2}}}function C2(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:S2}}}function Gs(t){const e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function N2(t){const e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=e.children;let s=-1,a;for(;++s<i.length;){const u=i[s];if(u.type==="paragraph"){a=u;break}}a===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(t)}function S2(t,e,n,r){const i=t.children[0],s=typeof t.checked=="boolean"&&i&&i.type==="paragraph",a="["+(t.checked?"x":" ")+"] ",u=n.createTracker(r);s&&u.move(a);let o=bo.listItem(t,e,n,{...r,...u.current()});return s&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),o;function l(f){return f+a}}function y2(){return[sg(),Sg(),Lg(),g2(),k2()]}function I2(t){return{extensions:[ag(),yg(t),Rg(),A2(t),C2()]}}const w2={tokenize:M2,partial:!0},To={tokenize:v2,partial:!0},xo={tokenize:B2,partial:!0},_o={tokenize:F2,partial:!0},L2={tokenize:H2,partial:!0},Ao={name:"wwwAutolink",tokenize:D2,previous:Co},ko={name:"protocolAutolink",tokenize:P2,previous:No},ut={name:"emailAutolink",tokenize:O2,previous:So},tt={};function R2(){return{text:tt}}let gt=48;for(;gt<123;)tt[gt]=ut,gt++,gt===58?gt=65:gt===91&&(gt=97);tt[43]=ut;tt[45]=ut;tt[46]=ut;tt[95]=ut;tt[72]=[ut,ko];tt[104]=[ut,ko];tt[87]=[ut,Ao];tt[119]=[ut,Ao];function O2(t,e,n){const r=this;let i,s;return a;function a(d){return!jr(d)||!So.call(r,r.previous)||Ni(r.events)?n(d):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),u(d))}function u(d){return jr(d)?(t.consume(d),u):d===64?(t.consume(d),o):n(d)}function o(d){return d===46?t.check(L2,f,l)(d):d===45||d===95||Re(d)?(s=!0,t.consume(d),o):f(d)}function l(d){return t.consume(d),i=!0,o}function f(d){return s&&i&&ve(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(d)):n(d)}}function D2(t,e,n){const r=this;return i;function i(a){return a!==87&&a!==119||!Co.call(r,r.previous)||Ni(r.events)?n(a):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(w2,t.attempt(To,t.attempt(xo,s),n),n)(a))}function s(a){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(a)}}function P2(t,e,n){const r=this;let i="",s=!1;return a;function a(d){return(d===72||d===104)&&No.call(r,r.previous)&&!Ni(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),t.consume(d),u):n(d)}function u(d){if(ve(d)&&i.length<5)return i+=String.fromCodePoint(d),t.consume(d),u;if(d===58){const m=i.toLowerCase();if(m==="http"||m==="https")return t.consume(d),o}return n(d)}function o(d){return d===47?(t.consume(d),s?l:(s=!0,o)):n(d)}function l(d){return d===null||Mn(d)||ge(d)||kt(d)||Wn(d)?n(d):t.attempt(To,t.attempt(xo,f),n)(d)}function f(d){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(d)}}function M2(t,e,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,t.consume(a),i):a===46&&r===3?(t.consume(a),s):n(a)}function s(a){return a===null?n(a):e(a)}}function v2(t,e,n){let r,i,s;return a;function a(l){return l===46||l===95?t.check(_o,o,u)(l):l===null||ge(l)||kt(l)||l!==45&&Wn(l)?o(l):(s=!0,t.consume(l),a)}function u(l){return l===95?r=!0:(i=r,r=void 0),t.consume(l),a}function o(l){return i||r||!s?n(l):e(l)}}function B2(t,e){let n=0,r=0;return i;function i(a){return a===40?(n++,t.consume(a),i):a===41&&r<n?s(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?t.check(_o,e,s)(a):a===null||ge(a)||kt(a)?e(a):(t.consume(a),i)}function s(a){return a===41&&r++,t.consume(a),i}}function F2(t,e,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(t.consume(u),r):u===38?(t.consume(u),s):u===93?(t.consume(u),i):u===60||u===null||ge(u)||kt(u)?e(u):n(u)}function i(u){return u===null||u===40||u===91||ge(u)||kt(u)?e(u):r(u)}function s(u){return ve(u)?a(u):n(u)}function a(u){return u===59?(t.consume(u),r):ve(u)?(t.consume(u),a):n(u)}}function H2(t,e,n){return r;function r(s){return t.consume(s),i}function i(s){return Re(s)?n(s):e(s)}}function Co(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||ge(t)}function No(t){return!ve(t)}function So(t){return!(t===47||jr(t))}function jr(t){return t===43||t===45||t===46||t===95||Re(t)}function Ni(t){let e=t.length,n=!1;for(;e--;){const r=t[e][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return t.length>0&&!n&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const U2={tokenize:G2,partial:!0};function j2(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:q2,continuation:{tokenize:V2},exit:W2}},text:{91:{name:"gfmFootnoteCall",tokenize:Y2},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:z2,resolveTo:$2}}}}function z2(t,e,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const o=r.events[i][1];if(o.type==="labelImage"){a=o;break}if(o.type==="gfmFootnoteCall"||o.type==="labelLink"||o.type==="label"||o.type==="image"||o.type==="link")break}return u;function u(o){if(!a||!a._balanced)return n(o);const l=Ge(r.sliceSerialize({start:a.end,end:r.now()}));return l.codePointAt(0)!==94||!s.includes(l.slice(1))?n(o):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(o),t.exit("gfmFootnoteCallLabelMarker"),e(o))}}function $2(t,e){let n=t.length;for(;n--;)if(t[n][1].type==="labelImage"&&t[n][0]==="enter"){t[n][1];break}t[n+1][1].type="data",t[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},t[n+3][1].start),end:Object.assign({},t[t.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},t[n+3][1].end),end:Object.assign({},t[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},t[t.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},u=[t[n+1],t[n+2],["enter",r,e],t[n+3],t[n+4],["enter",i,e],["exit",i,e],["enter",s,e],["enter",a,e],["exit",a,e],["exit",s,e],t[t.length-2],t[t.length-1],["exit",r,e]];return t.splice(n,t.length-n+1,...u),t}function Y2(t,e,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,a;return u;function u(d){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(d),t.exit("gfmFootnoteCallLabelMarker"),o}function o(d){return d!==94?n(d):(t.enter("gfmFootnoteCallMarker"),t.consume(d),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",l)}function l(d){if(s>999||d===93&&!a||d===null||d===91||ge(d))return n(d);if(d===93){t.exit("chunkString");const m=t.exit("gfmFootnoteCallString");return i.includes(Ge(r.sliceSerialize(m)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(d),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):n(d)}return ge(d)||(a=!0),s++,t.consume(d),d===92?f:l}function f(d){return d===91||d===92||d===93?(t.consume(d),s++,l):l(d)}}function q2(t,e,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,a=0,u;return o;function o(g){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(g),t.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(g){return g===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(g),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",f):n(g)}function f(g){if(a>999||g===93&&!u||g===null||g===91||ge(g))return n(g);if(g===93){t.exit("chunkString");const k=t.exit("gfmFootnoteDefinitionLabelString");return s=Ge(r.sliceSerialize(k)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(g),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),m}return ge(g)||(u=!0),a++,t.consume(g),g===92?d:f}function d(g){return g===91||g===92||g===93?(t.consume(g),a++,f):f(g)}function m(g){return g===58?(t.enter("definitionMarker"),t.consume(g),t.exit("definitionMarker"),i.includes(s)||i.push(s),oe(t,h,"gfmFootnoteDefinitionWhitespace")):n(g)}function h(g){return e(g)}}function V2(t,e,n){return t.check(bn,e,t.attempt(U2,e,n))}function W2(t){t.exit("gfmFootnoteDefinition")}function G2(t,e,n){const r=this;return oe(t,i,"gfmFootnoteDefinitionIndent",5);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?e(s):n(s)}}function Q2(t){let n=(t||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,u){let o=-1;for(;++o<a.length;)if(a[o][0]==="enter"&&a[o][1].type==="strikethroughSequenceTemporary"&&a[o][1]._close){let l=o;for(;l--;)if(a[l][0]==="exit"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._open&&a[o][1].end.offset-a[o][1].start.offset===a[l][1].end.offset-a[l][1].start.offset){a[o][1].type="strikethroughSequence",a[l][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},a[l][1].start),end:Object.assign({},a[o][1].end)},d={type:"strikethroughText",start:Object.assign({},a[l][1].end),end:Object.assign({},a[o][1].start)},m=[["enter",f,u],["enter",a[l][1],u],["exit",a[l][1],u],["enter",d,u]],h=u.parser.constructs.insideSpan.null;h&&Ye(m,m.length,0,Gn(h,a.slice(l+1,o),u)),Ye(m,m.length,0,[["exit",d,u],["enter",a[o][1],u],["exit",a[o][1],u],["exit",f,u]]),Ye(a,l-1,o-l+3,m),o=l+m.length-2;break}}for(o=-1;++o<a.length;)a[o][1].type==="strikethroughSequenceTemporary"&&(a[o][1].type="data");return a}function s(a,u,o){const l=this.previous,f=this.events;let d=0;return m;function m(g){return l===126&&f[f.length-1][1].type!=="characterEscape"?o(g):(a.enter("strikethroughSequenceTemporary"),h(g))}function h(g){const k=Pt(l);if(g===126)return d>1?o(g):(a.consume(g),d++,h);if(d<2&&!n)return o(g);const C=a.exit("strikethroughSequenceTemporary"),T=Pt(g);return C._open=!T||T===2&&!!k,C._close=!k||k===2&&!!T,u(g)}}}class K2{constructor(){this.map=[]}add(e,n,r){X2(this,e,n,r)}consume(e){if(this.map.sort(function(s,a){return s[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(e.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),e.length=this.map[n][0];r.push(e.slice()),e.length=0;let i=r.pop();for(;i;){for(const s of i)e.push(s);i=r.pop()}this.map.length=0}}function X2(t,e,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<t.map.length;){if(t.map[i][0]===e){t.map[i][1]+=n,t.map[i][2].push(...r);return}i+=1}t.map.push([e,n,r])}}function Z2(t,e){let n=!1;const r=[];for(;e<t.length;){const i=t[e];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);e+=1}return r}function J2(){return{flow:{null:{name:"table",tokenize:eE,resolveAll:tE}}}}function eE(t,e,n){const r=this;let i=0,s=0,a;return u;function u(I){let B=r.events.length-1;for(;B>-1;){const z=r.events[B][1].type;if(z==="lineEnding"||z==="linePrefix")B--;else break}const F=B>-1?r.events[B][1].type:null,G=F==="tableHead"||F==="tableRow"?y:o;return G===y&&r.parser.lazy[r.now().line]?n(I):G(I)}function o(I){return t.enter("tableHead"),t.enter("tableRow"),l(I)}function l(I){return I===124||(a=!0,s+=1),f(I)}function f(I){return I===null?n(I):Q(I)?s>1?(s=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(I),t.exit("lineEnding"),h):n(I):re(I)?oe(t,f,"whitespace")(I):(s+=1,a&&(a=!1,i+=1),I===124?(t.enter("tableCellDivider"),t.consume(I),t.exit("tableCellDivider"),a=!0,f):(t.enter("data"),d(I)))}function d(I){return I===null||I===124||ge(I)?(t.exit("data"),f(I)):(t.consume(I),I===92?m:d)}function m(I){return I===92||I===124?(t.consume(I),d):d(I)}function h(I){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(I):(t.enter("tableDelimiterRow"),a=!1,re(I)?oe(t,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):g(I))}function g(I){return I===45||I===58?C(I):I===124?(a=!0,t.enter("tableCellDivider"),t.consume(I),t.exit("tableCellDivider"),k):O(I)}function k(I){return re(I)?oe(t,C,"whitespace")(I):C(I)}function C(I){return I===58?(s+=1,a=!0,t.enter("tableDelimiterMarker"),t.consume(I),t.exit("tableDelimiterMarker"),T):I===45?(s+=1,T(I)):I===null||Q(I)?L(I):O(I)}function T(I){return I===45?(t.enter("tableDelimiterFiller"),S(I)):O(I)}function S(I){return I===45?(t.consume(I),S):I===58?(a=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(I),t.exit("tableDelimiterMarker"),N):(t.exit("tableDelimiterFiller"),N(I))}function N(I){return re(I)?oe(t,L,"whitespace")(I):L(I)}function L(I){return I===124?g(I):I===null||Q(I)?!a||i!==s?O(I):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(I)):O(I)}function O(I){return n(I)}function y(I){return t.enter("tableRow"),j(I)}function j(I){return I===124?(t.enter("tableCellDivider"),t.consume(I),t.exit("tableCellDivider"),j):I===null||Q(I)?(t.exit("tableRow"),e(I)):re(I)?oe(t,j,"whitespace")(I):(t.enter("data"),Y(I))}function Y(I){return I===null||I===124||ge(I)?(t.exit("data"),j(I)):(t.consume(I),I===92?q:Y)}function q(I){return I===92||I===124?(t.consume(I),Y):Y(I)}}function tE(t,e){let n=-1,r=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],u=!1,o=0,l,f,d;const m=new K2;for(;++n<t.length;){const h=t[n],g=h[1];h[0]==="enter"?g.type==="tableHead"?(u=!1,o!==0&&(Qs(m,e,o,l,f),f=void 0,o=0),l={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},m.add(n,0,[["enter",l,e]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,d=void 0,s=[0,0,0,0],a=[0,n+1,0,0],u&&(u=!1,f={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},m.add(n,0,[["enter",f,e]])),i=g.type==="tableDelimiterRow"?2:f?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],d=yn(m,e,s,i,void 0,d),s=[0,0,0,0]),a[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(a[0]=a[1],d=yn(m,e,s,i,void 0,d)),s=a,a=[s[1],n,0,0])):g.type==="tableHead"?(u=!0,o=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(o=n,s[1]!==0?(a[0]=a[1],d=yn(m,e,s,i,n,d)):a[1]!==0&&(d=yn(m,e,a,i,n,d)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(a[3]=n)}for(o!==0&&Qs(m,e,o,l,f),m.consume(e.events),n=-1;++n<e.events.length;){const h=e.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=Z2(e.events,n))}return t}function yn(t,e,n,r,i,s){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(s.end=Object.assign({},Rt(e.events,n[0])),t.add(n[0],0,[["exit",s,e]]));const o=Rt(e.events,n[1]);if(s={type:a,start:Object.assign({},o),end:Object.assign({},o)},t.add(n[1],0,[["enter",s,e]]),n[2]!==0){const l=Rt(e.events,n[2]),f=Rt(e.events,n[3]),d={type:u,start:Object.assign({},l),end:Object.assign({},f)};if(t.add(n[2],0,[["enter",d,e]]),r!==2){const m=e.events[n[2]],h=e.events[n[3]];if(m[1].end=Object.assign({},h[1].end),m[1].type="chunkText",m[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,k=n[3]-n[2]-1;t.add(g,k,[])}}t.add(n[3]+1,0,[["exit",d,e]])}return i!==void 0&&(s.end=Object.assign({},Rt(e.events,i)),t.add(i,0,[["exit",s,e]]),s=void 0),s}function Qs(t,e,n,r,i){const s=[],a=Rt(e.events,n);i&&(i.end=Object.assign({},a),s.push(["exit",i,e])),r.end=Object.assign({},a),s.push(["exit",r,e]),t.add(n+1,0,s)}function Rt(t,e){const n=t[e],r=n[0]==="enter"?"start":"end";return n[1][r]}const nE={name:"tasklistCheck",tokenize:iE};function rE(){return{text:{91:nE}}}function iE(t,e,n){const r=this;return i;function i(o){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(o):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(o),t.exit("taskListCheckMarker"),s)}function s(o){return ge(o)?(t.enter("taskListCheckValueUnchecked"),t.consume(o),t.exit("taskListCheckValueUnchecked"),a):o===88||o===120?(t.enter("taskListCheckValueChecked"),t.consume(o),t.exit("taskListCheckValueChecked"),a):n(o)}function a(o){return o===93?(t.enter("taskListCheckMarker"),t.consume(o),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),u):n(o)}function u(o){return Q(o)?e(o):re(o)?t.check({tokenize:sE},e,n)(o):n(o)}}function sE(t,e,n){return oe(t,r,"whitespace");function r(i){return i===null?n(i):e(i)}}function aE(t){return eu([R2(),j2(),Q2(t),J2(),rE()])}const uE={};function oE(t){const e=this,n=t||uE,r=e.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(aE(n)),s.push(y2()),a.push(I2(n))}const lE=U.lazy(()=>Wo(()=>import("./lazy-highlighter-CM_r6Qg6.js"),__vite__mapDeps([0,1,2])));function yo(){const t=V.c(3),[e,n]=U.useState(!1);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=async a=>{await navigator.clipboard.writeText(a),n(!0),setTimeout(()=>n(!1),2e3)},t[0]=r):r=t[0];const i=r;let s;return t[1]!==e?(s={handleCopy:i,copied:e},t[1]=e,t[2]=s):s=t[2],s}function cE(){const t=V.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=[85,70],t[0]=e):e=t[0];const n=e;let r;return t[1]===Symbol.for("react.memo_cache_sentinel")?(r=p.jsx("div",{className:"p-4 font-mono text-sm",style:{background:"#2d2d2d",borderRadius:"0 0 0.5rem 0.5rem",overflow:"auto",minHeight:"4rem"},children:n.map(fE)}),t[1]=r):r=t[1],r}function fE(t,e){return p.jsxs("div",{className:"flex gap-2 items-center my-1",children:[e>2&&e<7&&p.jsx("div",{className:"w-4 h-4 rounded-sm opacity-40 animate-pulse",style:{background:"rgba(128, 128, 128, 0.3)",animationDelay:`${e*.1}s`}}),e%4===0&&p.jsx("div",{className:"h-4 rounded animate-pulse",style:{width:"3rem",background:"rgba(128, 128, 128, 0.3)",animationDelay:`${e*.12}s`}}),e%3===1&&p.jsx("div",{className:"h-4 rounded animate-pulse",style:{width:"2.5rem",background:"rgba(128, 128, 128, 0.3)",animationDelay:`${e*.14}s`}}),p.jsx("div",{className:"h-4 rounded animate-pulse",style:{width:`${t}%`,background:"rgba(255, 255, 255, 0.1)",animationDelay:`${e*.1}s`}}),e%5===2&&p.jsx("div",{className:"h-4 rounded animate-pulse",style:{width:"4rem",background:"rgba(128, 128, 128, 0.3)",animationDelay:`${e*.16}s`}})]},e)}function dE(t){const e=V.c(12),n=U.useRef(null),{handleCopy:r,copied:i}=yo(),s=hE;let a;e[0]!==r?(a=async()=>{const m=s(n.current);await r(m)},e[0]=r,e[1]=a):a=e[1];const u=a;let o;e[2]!==i?(o=i?p.jsx(xt,{size:12}):p.jsx(Gr,{size:12}),e[2]=i,e[3]=o):o=e[3];let l;e[4]!==u||e[5]!==o?(l=p.jsx("div",{className:"flex justify-end items-center",children:p.jsxs(Qe,{variant:"ghost",onClick:u,"aria-label":"Copy as CSV",className:"text-muted-foreground hover:text-foreground h-6 text-[10px]",type:"button",children:["Copy as CSV",o]})}),e[4]=u,e[5]=o,e[6]=l):l=e[6];let f;e[7]!==t?(f=p.jsx("div",{className:"overflow-x-auto mb-4 rounded-lg border border-border",children:p.jsx("table",{ref:n,...t,className:"min-w-full border-collapse text-sm",children:t.children})}),e[7]=t,e[8]=f):f=e[8];let d;return e[9]!==l||e[10]!==f?(d=p.jsxs(p.Fragment,{children:[l,f]}),e[9]=l,e[10]=f,e[11]=d):d=e[11],d}function hE(t){return t?Array.from(t.querySelectorAll("tr")).map(mE).join(`
|
|
87
|
-
`):""}function mE(t){return Array.from(t.querySelectorAll("th,td")).map(pE).join(",")}function pE(t){let e=t.textContent||"";return e=e.replace(/"/g,'""'),e.search(/([",\n])/g)>=0&&(e=`"${e}"`),e}const gE=[oE],EE=[Jp],bE={p:t=>p.jsx("p",{...t,className:"leading-relaxed text-[15px] mb-2 last:mb-0"}),strong:t=>p.jsx("strong",{...t,className:"font-bold"}),em:t=>p.jsx("em",{...t,className:"italic"}),a:t=>p.jsx("a",{...t,target:"_blank",rel:"noopener noreferrer",className:"text-primary-dark hover:underline break-all font-medium"}),ul:t=>p.jsx("ul",{...t,className:"list-disc ml-6 my-4 space-y-2"}),ol:t=>p.jsx("ol",{...t,className:"list-decimal ml-6 my-4 space-y-2"}),li:t=>p.jsx("li",{...t,className:"leading-relaxed text-[15px]"}),code:t=>p.jsx("code",{...t,className:"px-1 py-0.5 bg-muted rounded text-[15px] font-mono break-all"}),pre:t=>p.jsx("pre",{...t,className:"flex w-full min-w-0 my-4 bg-muted rounded overflow-hidden",children:p.jsx("code",{className:"flex-1 min-w-0 p-4 text-[15px] font-mono whitespace-pre overflow-x-auto",children:t.children})}),table:t=>p.jsx(dE,{...t}),thead:t=>p.jsx("thead",{...t,className:"bg-muted",children:t.children}),tr:t=>p.jsx("tr",{...t,className:"even:bg-muted/50 border-b border-border last:border-0"}),th:t=>p.jsx("th",{...t,className:"px-4 py-2 text-left font-semibold text-muted-foreground border-b border-border"}),td:t=>p.jsx("td",{...t,className:"px-4 py-2 border-b border-border"})},Io=U.memo(t=>{const e=V.c(2),{content:n}=t;let r;return e[0]!==n?(r=p.jsx(Bh,{remarkPlugins:gE,rehypePlugins:EE,components:bE,children:n}),e[0]=n,e[1]=r):r=e[1],r},(t,e)=>t.content===e.content);function TE(t){const e=V.c(20),{language:n,content:r}=t,{handleCopy:i,copied:s}=yo(),a=n||"text";let u;e[0]!==a?(u=p.jsx("span",{className:"text-xs font-mono uppercase text-muted-foreground tracking-widest select-none",children:a}),e[0]=a,e[1]=u):u=e[1];let o;e[2]!==r||e[3]!==i?(o=()=>i(r),e[2]=r,e[3]=i,e[4]=o):o=e[4];let l;e[5]!==s?(l=s?p.jsx(xt,{size:14}):p.jsx(Gr,{size:14}),e[5]=s,e[6]=l):l=e[6];let f;e[7]!==o||e[8]!==l?(f=p.jsx(Qe,{size:"icon",variant:"ghost",onClick:o,"aria-label":"Copy code",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:l}),e[7]=o,e[8]=l,e[9]=f):f=e[9];let d;e[10]!==u||e[11]!==f?(d=p.jsxs("div",{className:"flex items-center justify-between p-1 pl-4 bg-muted border-b border-border",children:[u,f]}),e[10]=u,e[11]=f,e[12]=d):d=e[12];let m;e[13]===Symbol.for("react.memo_cache_sentinel")?(m=p.jsx(cE,{}),e[13]=m):m=e[13];let h;e[14]!==r||e[15]!==n?(h=p.jsx(U.Suspense,{fallback:m,children:p.jsx(lE,{language:n,content:r})}),e[14]=r,e[15]=n,e[16]=h):h=e[16];let g;return e[17]!==d||e[18]!==h?(g=p.jsxs("div",{className:"my-4 rounded-lg bg-muted overflow-hidden border border-border grid min-w-0",children:[d,h]}),e[17]=d,e[18]=h,e[19]=g):g=e[19],g}Io.displayName="MemoizedMarkdownBlock";const Si=t=>{const e=V.c(7),{id:n,text:r}=t;let i;e[0]!==r?(i=de.lexer(r),e[0]=r,e[1]=i):i=e[1];const s=i;let a;if(e[2]!==s||e[3]!==n){let u;e[5]!==n?(u=(o,l)=>o.type==="code"?p.jsx(TE,{language:o.lang,content:o.text},`${n}-block_${l}`):p.jsx(Io,{content:o.raw},`${n}-block_${l}`),e[5]=n,e[6]=u):u=e[6],a=s.map(u),e[2]=s,e[3]=n,e[4]=a}else a=e[4];return a};Si.displayName="MemoizedMarkdown";function wo(t){const e=V.c(18),{id:n,part:r,copyable:i,extraActions:s,hasToolCallAfter:a}=t,u=i===void 0?!1:i,o=a===void 0?!1:a,{handleCopy:l}=Wl(),[f,d]=U.useState(!1);let m;e[0]!==l||e[1]!==r.text?(m=async()=>{await l(r.text),d(!0),setTimeout(()=>d(!1),2e3)},e[0]=l,e[1]=r.text,e[2]=m):m=e[2];const h=m,g=u&&s,k=g||s,C=!o&&"mb-2";let T;e[3]!==C?(T=ae("group/part relative",C),e[3]=C,e[4]=T):T=e[4];let S;e[5]!==n||e[6]!==r.text?(S=p.jsx(Si,{id:n,text:r.text}),e[5]=n,e[6]=r.text,e[7]=S):S=e[7];let N;e[8]!==s||e[9]!==h||e[10]!==f||e[11]!==k||e[12]!==g?(N=k&&p.jsx("div",{className:"flex w-full items-center text-xs text-muted-foreground opacity-0 pointer-events-none transition-all duration-200 group-hover/part:opacity-100 group-hover/part:pointer-events-auto mt-2",children:p.jsxs("div",{className:"flex items-center gap-1",children:[g&&p.jsx(Qe,{onClick:h,variant:"ghost",size:"sm",className:"text-muted-foreground hover:text-foreground size-6 whitespace-nowrap",children:f?p.jsx(xt,{size:12}):p.jsx(Gr,{size:12})}),s]})}),e[8]=s,e[9]=h,e[10]=f,e[11]=k,e[12]=g,e[13]=N):N=e[13];let L;return e[14]!==T||e[15]!==S||e[16]!==N?(L=p.jsxs("div",{className:T,children:[S,N]}),e[14]=T,e[15]=S,e[16]=N,e[17]=L):L=e[17],L}function xE(t){const e=V.c(4),{output:n}=t;let r;if(e[0]!==n){const a=JSON.stringify(n,null,2);r=a.length>2e3?a.slice(0,2e3)+"...[TRUNCATED]":a,e[0]=n,e[1]=r}else r=e[1];const i=r;let s;return e[2]!==i?(s=p.jsx("div",{className:"h-full",children:p.jsx(ca,{code:i,language:"json",height:"100%",readOnly:!0})}),e[2]=i,e[3]=s):s=e[3],s}var rr="Collapsible",[_E,Wb]=Go(rr),[AE,yi]=_E(rr),Lo=U.forwardRef((t,e)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:s,onOpenChange:a,...u}=t,[o,l]=Qo({prop:r,defaultProp:i??!1,onChange:a,caller:rr});return p.jsx(AE,{scope:n,disabled:s,contentId:Ko(),open:o,onOpenToggle:U.useCallback(()=>l(f=>!f),[l]),children:p.jsx($r.div,{"data-state":Ri(o),"data-disabled":s?"":void 0,...u,ref:e})})});Lo.displayName=rr;var Ro="CollapsibleTrigger",Ii=U.forwardRef((t,e)=>{const{__scopeCollapsible:n,...r}=t,i=yi(Ro,n);return p.jsx($r.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":Ri(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:e,onClick:Zo(t.onClick,i.onOpenToggle)})});Ii.displayName=Ro;var wi="CollapsibleContent",Li=U.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=yi(wi,t.__scopeCollapsible);return p.jsx(Xo,{present:n||i.open,children:({present:s})=>p.jsx(kE,{...r,ref:e,present:s})})});Li.displayName=wi;var kE=U.forwardRef((t,e)=>{const{__scopeCollapsible:n,present:r,children:i,...s}=t,a=yi(wi,n),[u,o]=U.useState(r),l=U.useRef(null),f=Jo(e,l),d=U.useRef(0),m=d.current,h=U.useRef(0),g=h.current,k=a.open||u,C=U.useRef(k),T=U.useRef(void 0);return U.useEffect(()=>{const S=requestAnimationFrame(()=>C.current=!1);return()=>cancelAnimationFrame(S)},[]),el(()=>{const S=l.current;if(S){T.current=T.current||{transitionDuration:S.style.transitionDuration,animationName:S.style.animationName},S.style.transitionDuration="0s",S.style.animationName="none";const N=S.getBoundingClientRect();d.current=N.height,h.current=N.width,C.current||(S.style.transitionDuration=T.current.transitionDuration,S.style.animationName=T.current.animationName),o(r)}},[a.open,r]),p.jsx($r.div,{"data-state":Ri(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!k,...s,ref:f,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...t.style},children:k&&i})});function Ri(t){return t?"open":"closed"}var CE=Lo,Gb=Ii,Qb=Li;function NE(t){const e=V.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=p.jsx(CE,{"data-slot":"collapsible",...n}),e[2]=n,e[3]=r):r=e[3],r}function SE(t){const e=V.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=p.jsx(Ii,{"data-slot":"collapsible-trigger",...n}),e[2]=n,e[3]=r):r=e[3],r}function yE(t){const e=V.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=p.jsx(Li,{"data-slot":"collapsible-content",...n}),e[2]=n,e[3]=r):r=e[3],r}function IE(t){return t.split(/[_-]/).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" ")}function Ks(t){const e=V.c(70),{part:n,isFirstInSequence:r,isLastInSequence:i,hasNextToolCall:s}=t,a=r===void 0?!1:r,u=i===void 0?!1:i,o=s===void 0?!1:s,{state:l}=n;let f;e[0]!==n?(f="toolName"in n?n.toolName:n.type.replace("tool-",""),e[0]=n,e[1]=f):f=e[1];const d=f;let m;e[2]!==d?(m=IE(d),e[2]=d,e[3]=m):m=e[3];const h=m,[g,k]=U.useState(!1),[C]=Bl(),T=(l==="input-streaming"||l==="input-available"||l==="output-available")&&!!n.input,S=l==="output-available",N=l==="output-error";if(!C){const he=l==="input-streaming"||l==="input-available",ce=l==="output-available",ke=l==="output-error",Ee=a&&"mt-2",xe=u&&"mb-2";let me;e[4]!==Ee||e[5]!==xe?(me=ae("flex items-center gap-1.5 py-2 opacity-75 relative",Ee,xe),e[4]=Ee,e[5]=xe,e[6]=me):me=e[6];let Ae;e[7]===Symbol.for("react.memo_cache_sentinel")?(Ae=p.jsx(fa,{className:"size-4 text-muted-foreground shrink-0"}),e[7]=Ae):Ae=e[7];let Ie;e[8]!==o?(Ie=o&&p.jsx("div",{className:"absolute left-1/2 top-full w-px bg-border -translate-x-1/2",style:{height:"calc(100% + 1rem)"}}),e[8]=o,e[9]=Ie):Ie=e[9];let be;e[10]!==Ie?(be=p.jsxs("div",{className:"relative shrink-0 flex items-center",children:[Ae,Ie]}),e[10]=Ie,e[11]=be):be=e[11];let Pe;e[12]!==h||e[13]!==he?(Pe=he&&p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"text-muted-foreground shimmer",children:"Calling"})," ",p.jsxs("span",{className:"text-muted-foreground/75 shimmer",children:[h,"..."]})]}),e[12]=h,e[13]=he,e[14]=Pe):Pe=e[14];let Le;e[15]!==h||e[16]!==ce?(Le=ce&&p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"text-muted-foreground",children:"Called"})," ",p.jsx("span",{className:"text-muted-foreground/75",children:h})]}),e[15]=h,e[16]=ce,e[17]=Le):Le=e[17];let Fe;e[18]!==h||e[19]!==ke?(Fe=ke&&p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"text-destructive/90",children:"Error calling"})," ",p.jsx("span",{className:"text-destructive/75",children:h})]}),e[18]=h,e[19]=ke,e[20]=Fe):Fe=e[20];let ie;e[21]!==Pe||e[22]!==Le||e[23]!==Fe?(ie=p.jsxs("span",{className:"text-[15px]",children:[Pe,Le,Fe]}),e[21]=Pe,e[22]=Le,e[23]=Fe,e[24]=ie):ie=e[24];let we;return e[25]!==be||e[26]!==ie||e[27]!==me?(we=p.jsxs("div",{className:me,children:[be,ie]}),e[25]=be,e[26]=ie,e[27]=me,e[28]=we):we=e[28],we}let L;e[29]!==l?(L=l==="output-error"?p.jsx(aa,{className:"size-4 text-destructive shrink-0"}):p.jsx(dl,{className:ae("size-4 text-muted-foreground shrink-0",(l==="input-streaming"||l==="input-available")&&"shimmer")}),e[29]=l,e[30]=L):L=e[30];const O=l==="output-error"&&"text-destructive/90",y=(l==="input-streaming"||l==="input-available")&&"shimmer";let j;e[31]!==O||e[32]!==y?(j=ae("text-[15px] font-medium text-muted-foreground truncate",O,y),e[31]=O,e[32]=y,e[33]=j):j=e[33];const Y=l==="input-streaming"&&`Streaming ${d} arguments`,q=l==="input-available"&&`Calling ${d}`,I=l==="output-available"&&`Called ${d}`,B=l==="output-error"&&`Error calling ${d}`;let F;e[34]!==Y||e[35]!==q||e[36]!==I||e[37]!==B||e[38]!==j?(F=p.jsxs("span",{className:j,children:[Y,q,I,B]}),e[34]=Y,e[35]=q,e[36]=I,e[37]=B,e[38]=j,e[39]=F):F=e[39];let G;e[40]!==F||e[41]!==L?(G=p.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[L,F]}),e[40]=F,e[41]=L,e[42]=G):G=e[42];const z=g&&"rotate-90";let M;e[43]!==z?(M=ae("size-4 text-muted-foreground transition-transform duration-200",z),e[43]=z,e[44]=M):M=e[44];let W;e[45]!==M?(W=p.jsx("div",{className:"flex items-center gap-2 shrink-0",children:p.jsx(ua,{className:M})}),e[45]=M,e[46]=W):W=e[46];let K;e[47]!==G||e[48]!==W?(K=p.jsxs(SE,{className:"flex items-center gap-2 w-full cursor-pointer p-3 hover:bg-accent/50 transition-colors",children:[G,W]}),e[47]=G,e[48]=W,e[49]=K):K=e[49];let te;e[50]===Symbol.for("react.memo_cache_sentinel")?(te=p.jsx("div",{className:"w-4 relative shrink-0",children:p.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-0.25 bg-border"})}),e[50]=te):te=e[50];let J;e[51]!==n.input||e[52]!==T?(J=T&&p.jsxs("div",{className:"flex flex-col gap-0.5",children:[p.jsx("div",{className:"px-1 h-5 flex items-center",children:p.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Input"})}),p.jsx("div",{className:"border border-border rounded-lg p-2 h-full max-h-[200px]",children:p.jsx(ca,{code:JSON.stringify(n.input,null,2),language:"json",foldOnMount:!0,height:"100%",readOnly:!0})})]}),e[51]=n.input,e[52]=T,e[53]=J):J=e[53];let A;e[54]!==n.output||e[55]!==S?(A=S&&p.jsxs("div",{className:"flex flex-col gap-0.5",children:[p.jsx("div",{className:"px-1 h-5 flex items-center",children:p.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Output"})}),p.jsx("div",{className:"border border-border rounded-lg max-h-[200px] overflow-auto p-2 h-full",children:p.jsx(xE,{output:n.output})})]}),e[54]=n.output,e[55]=S,e[56]=A):A=e[56];let Z;e[57]!==n||e[58]!==N?(Z=N&&p.jsxs("div",{className:"flex flex-col gap-0.5",children:[p.jsx("div",{className:"px-1 h-5 flex items-center",children:p.jsx("span",{className:"text-xs font-medium text-destructive/90",children:"Error"})}),p.jsx("div",{className:"border border-destructive/20 rounded-lg max-h-[200px] overflow-auto p-2 bg-destructive/10",children:p.jsx("pre",{className:"text-xs font-mono text-destructive whitespace-pre-wrap wrap-break-word",children:"errorText"in n&&typeof n.errorText=="string"?n.errorText:"An unknown error occurred"})})]}),e[57]=n,e[58]=N,e[59]=Z):Z=e[59];let le;e[60]!==J||e[61]!==A||e[62]!==Z?(le=p.jsx(yE,{className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",children:p.jsxs("div",{className:"flex ml-[7px] px-3 pb-3",children:[te,p.jsxs("div",{className:"flex flex-col gap-4 flex-1 min-w-0 pt-2",children:[J,A,Z]})]})}),e[60]=J,e[61]=A,e[62]=Z,e[63]=le):le=e[63];let x;e[64]!==K||e[65]!==le?(x=p.jsxs("div",{className:"border border-border/75 rounded-lg flex flex-col bg-background w-full min-w-0 overflow-hidden",children:[K,le]}),e[64]=K,e[65]=le,e[66]=x):x=e[66];let ue;return e[67]!==g||e[68]!==x?(ue=p.jsx("div",{className:"flex flex-col my-4 w-full min-w-0",children:p.jsx(NE,{open:g,onOpenChange:k,children:x})}),e[67]=g,e[68]=x,e[69]=ue):ue=e[69],ue}const wE={openrouter:t=>{const e=t?.openrouter;return typeof e=="object"&&e!==null&&"usage"in e&&typeof e.usage=="object"&&e.usage!==null&&"cost"in e.usage&&typeof e.usage.cost=="number"?e.usage.cost:null}};function LE(t){if(!t?.providerMetadata)return null;for(const e of Object.values(wE)){const n=e(t.providerMetadata);if(n!==null)return n}return null}function RE(t){return t.reduce((e,n)=>{const r=n.metadata?.usage;return r?{inputTokens:e.inputTokens+(r.inputTokens??0),outputTokens:e.outputTokens+(r.outputTokens??0),totalTokens:e.totalTokens+(r.totalTokens??0),cost:e.cost+(LE(r)??0)}:e},{inputTokens:0,outputTokens:0,totalTokens:0,cost:0})}function OE(t){const e=V.c(38),{messages:n}=t;let r,i,s,a,u,o,l,f,d,m,h,g;if(e[0]!==n){g=Symbol.for("react.early_return_sentinel");e:{const L=RE(n);if(!L){g=null;break e}const{totalTokens:O,inputTokens:y,outputTokens:j,cost:Y}=L;if(s=Y,!O&&!y&&!j){g=null;break e}i=qr;let q;e[13]===Symbol.for("react.memo_cache_sentinel")?(q=p.jsx(da,{size:12}),e[13]=q):q=e[13];const I=p.jsxs(Qe,{variant:"ghost",size:"sm",className:"text-muted-foreground hover:text-foreground pl-1! h-6 gap-1 whitespace-nowrap",children:[q,p.jsx("span",{className:"text-[10px] font-mono tabular-nums",children:O.toLocaleString()})]});e[14]!==I?(h=p.jsx(Vr,{asChild:!0,children:I}),e[14]=I,e[15]=h):h=e[15],r=Wr,d="top",m="font-mono text-[11px]",u="grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",e[16]===Symbol.for("react.memo_cache_sentinel")?(o=p.jsx("span",{className:"text-muted",children:"in"}),e[16]=o):o=e[16],l=p.jsx("span",{children:y.toLocaleString()}),e[17]===Symbol.for("react.memo_cache_sentinel")?(f=p.jsx("span",{className:"text-muted",children:"out"}),e[17]=f):f=e[17],a=j.toLocaleString()}e[0]=n,e[1]=r,e[2]=i,e[3]=s,e[4]=a,e[5]=u,e[6]=o,e[7]=l,e[8]=f,e[9]=d,e[10]=m,e[11]=h,e[12]=g}else r=e[1],i=e[2],s=e[3],a=e[4],u=e[5],o=e[6],l=e[7],f=e[8],d=e[9],m=e[10],h=e[11],g=e[12];if(g!==Symbol.for("react.early_return_sentinel"))return g;let k;e[18]!==a?(k=p.jsx("span",{children:a}),e[18]=a,e[19]=k):k=e[19];let C;e[20]!==s?(C=s>0&&p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"text-muted",children:"cost"}),p.jsxs("span",{children:["$",s.toFixed(4)]})]}),e[20]=s,e[21]=C):C=e[21];let T;e[22]!==k||e[23]!==C||e[24]!==u||e[25]!==o||e[26]!==l||e[27]!==f?(T=p.jsxs("div",{className:u,children:[o,l,f,k,C]}),e[22]=k,e[23]=C,e[24]=u,e[25]=o,e[26]=l,e[27]=f,e[28]=T):T=e[28];let S;e[29]!==r||e[30]!==T||e[31]!==d||e[32]!==m?(S=p.jsx(r,{side:d,className:m,children:T}),e[29]=r,e[30]=T,e[31]=d,e[32]=m,e[33]=S):S=e[33];let N;return e[34]!==i||e[35]!==S||e[36]!==h?(N=p.jsxs(i,{children:[h,S]}),e[34]=i,e[35]=S,e[36]=h,e[37]=N):N=e[37],N}const DE={planning:{icon:p.jsx(xa,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:"Planning next moves"},thinking:{icon:p.jsx(jn,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:"Thinking"}},PE=1200;function ME(){const t=V.c(7),[e,n]=U.useState("planning");let r,i;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>{const o=setTimeout(()=>{n("thinking")},PE);return()=>{clearTimeout(o)}},i=[],t[0]=r,t[1]=i):(r=t[0],i=t[1]),U.useEffect(r,i);const s=DE[e];let a;t[2]!==s.label?(a=p.jsxs("span",{className:"text-[15px] text-muted-foreground shimmer",children:[s.label,"..."]}),t[2]=s.label,t[3]=a):a=t[3];let u;return t[4]!==s.icon||t[5]!==a?(u=p.jsx("div",{className:"flex items-center gap-1.5 py-2 opacity-60",children:p.jsxs("span",{className:"flex items-center gap-1.5",children:[s.icon,a]})}),t[4]=s.icon,t[5]=a,t[6]=u):u=t[6],u}function vE(t){const e=V.c(10),{duration:n,parts:r,id:i}=t,s=n/1e3;let a;e[0]!==s?(a=s.toFixed(1),e[0]=s,e[1]=a):a=e[1];const u=a,[o,l]=U.useState(!1),[f,d]=U.useState(!1);let m;if(e[2]!==i||e[3]!==f||e[4]!==o||e[5]!==r||e[6]!==u){const h=r.filter(FE),g=h.some(BE),k=g||f;let C,T;e[8]===Symbol.for("react.memo_cache_sentinel")?(C=()=>l(!0),T=()=>l(!1),e[8]=C,e[9]=T):(C=e[8],T=e[9]),m=p.jsxs("div",{className:"flex flex-col mb-2",children:[p.jsx("button",{type:"button",onClick:()=>!g&&d(!f),onMouseEnter:C,onMouseLeave:T,className:ae("flex items-center gap-1.5 py-2 opacity-60 transition-opacity",!g&&"cursor-pointer hover:opacity-100",g&&"cursor-default"),children:p.jsxs("span",{className:"flex items-center gap-1.5",children:[g?p.jsx(jn,{className:"text-muted-foreground shrink-0 shimmer",size:14}):o?p.jsx(ua,{className:ae("text-muted-foreground transition-transform shrink-0",f&&"rotate-90"),size:14}):p.jsx(Ea,{className:"text-muted-foreground shrink-0",size:14}),p.jsx("span",{className:ae("text-[15px] text-muted-foreground",g&&"shimmer"),children:g?"Thinking...":`Thought for ${u}s`})]})}),k&&p.jsx("div",{className:"ml-[6px] border-l-2 pl-4 mt-1 mb-2 max-h-[300px] overflow-y-auto",children:h.map((S,N)=>p.jsx("div",{className:"text-muted-foreground markdown-sm pb-2",children:p.jsx(Si,{id:`${i}-reasoning-${N}`,text:S.text})},`${i}-reasoning-${N}`))})]}),e[2]=i,e[3]=f,e[4]=o,e[5]=r,e[6]=u,e[7]=m}else m=e[7];return m}function BE(t){return t.state==="streaming"}function FE(t){return t.type==="reasoning"}function HE(t){const e=V.c(17),{part:n,id:r,usageStats:i,isFollowedByToolCall:s,isFirstToolCallInSequence:a,isLastToolCallInSequence:u,hasNextToolCall:o}=t;switch(n.type){case"dynamic-tool":{let l;return e[0]!==o||e[1]!==r||e[2]!==a||e[3]!==u||e[4]!==n?(l=p.jsx(Ks,{part:n,id:r,isFirstInSequence:a,isLastInSequence:u,hasNextToolCall:o}),e[0]=o,e[1]=r,e[2]=a,e[3]=u,e[4]=n,e[5]=l):l=e[5],l}case"text":{let l;return e[6]!==r||e[7]!==s||e[8]!==n||e[9]!==i?(l=p.jsx(wo,{id:r,part:n,extraActions:i,copyable:!0,hasToolCallAfter:s}),e[6]=r,e[7]=s,e[8]=n,e[9]=i,e[10]=l):l=e[10],l}case"reasoning":return null;case"step-start":case"file":case"source-url":case"source-document":return null;default:if(n.type.startsWith("tool-")){const l=n;let f;return e[11]!==o||e[12]!==r||e[13]!==a||e[14]!==u||e[15]!==l?(f=p.jsx(Ks,{part:l,id:r,isFirstInSequence:a,isLastInSequence:u,hasNextToolCall:o}),e[11]=o,e[12]=r,e[13]=a,e[14]=u,e[15]=l,e[16]=f):f=e[16],f}}throw new Error(`Unknown part type: ${n.type}`)}function UE(t){const e=V.c(32),{message:n,status:r,className:i}=t,{id:s,parts:a}=n,l=r==="streaming"||r==="submitted",f=U.useRef(null);let d;e[0]!==s?(d=()=>{const z=localStorage.getItem(`msg-duration-${s}`);return z?Number(z):null},e[0]=s,e[1]=d):d=e[1];const[m,h]=U.useState(d);let g,k;e[2]!==l?(g=()=>{l&&f.current===null&&(f.current=Date.now())},k=[l],e[2]=l,e[3]=g,e[4]=k):(g=e[3],k=e[4]),U.useEffect(g,k);let C,T;e[5]!==m||e[6]!==s||e[7]!==a.length?(C=()=>{if(a.length>0&&m===null&&f.current!==null){const z=Date.now()-f.current;h(z),localStorage.setItem(`msg-duration-${s}`,z.toString())}},T=[a.length,m,s],e[5]=m,e[6]=s,e[7]=a.length,e[8]=C,e[9]=T):(C=e[8],T=e[9]),U.useEffect(C,T);const S=a.length>0;let N;e[10]!==a?(N=a.some(zE),e[10]=a,e[11]=N):N=e[11];const L=N;let O;e[12]!==l||e[13]!==a?(O=l&&a.some(jE),e[12]=l,e[13]=a,e[14]=O):O=e[14];const j=S&&(L||O)&&m!==null;let Y;e[15]!==n?(Y=p.jsx(OE,{messages:[n]}),e[15]=n,e[16]=Y):Y=e[16];const q=Y;let I;e[17]!==i?(I=ae("w-full min-w-0 group relative flex items-start gap-4 px-4 z-20 text-foreground flex-row",i),e[17]=i,e[18]=I):I=e[18];let B;e[19]!==m||e[20]!==S||e[21]!==s||e[22]!==l||e[23]!==a||e[24]!==j||e[25]!==q?(B=S?p.jsxs(p.Fragment,{children:[j&&p.jsx(vE,{duration:m,parts:a,id:s}),a.map((z,M)=>{const W=a[M+1],K=a[M-1],te=W&&(W.type==="dynamic-tool"||W.type.startsWith("tool-")),J=z.type==="dynamic-tool"||z.type.startsWith("tool-"),A=K&&(K.type==="dynamic-tool"||K.type.startsWith("tool-")),Z=W&&(W.type==="dynamic-tool"||W.type.startsWith("tool-")),le=J&&!A,x=J&&!Z,ue=J&&Z;return p.jsx(HE,{part:z,id:s,usageStats:M===a.length-1?q:void 0,isFollowedByToolCall:te,isFirstToolCallInSequence:le,isLastToolCallInSequence:x,hasNextToolCall:ue},`${s}-${M}`)})]}):l?p.jsx(ME,{}):null,e[19]=m,e[20]=S,e[21]=s,e[22]=l,e[23]=a,e[24]=j,e[25]=q,e[26]=B):B=e[26];let F;e[27]!==B?(F=p.jsx("div",{className:"flex flex-col min-w-0 w-full items-start",children:p.jsx("div",{className:"w-full min-w-0 not-only:rounded-2xl text-[15px] wrap-break-word overflow-wrap-anywhere bg-transparent",children:B})}),e[27]=B,e[28]=F):F=e[28];let G;return e[29]!==F||e[30]!==I?(G=p.jsx("div",{className:I,children:F}),e[29]=F,e[30]=I,e[31]=G):G=e[31],G}function jE(t){return t.type==="reasoning"&&t.state==="streaming"}function zE(t){return t.type==="reasoning"}const Oo=U.createContext(null);function Do(t){const e=V.c(2),{children:n}=t;let r;return e[0]!==n?(r=p.jsx(p.Fragment,{children:n}),e[0]=n,e[1]=r):r=e[1],r}function $E(t){const e=[];for(let n=0;n<t.length;n++){const r=t[n];if(!U.isValidElement(r))continue;if(r.props?.message?.role==="assistant"){const s=t[n-1],a=U.isValidElement(s)&&s.props?.message?.role,u=s&&U.isValidElement(s)&&a==="user"?s:null;e.push({user:u,assistant:r})}}return e}function YE(t){const e=V.c(27),{children:n,className:r,minHeightOffset:i}=t,s=U.useRef(null);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=[],e[0]=a):a=e[0];const u=U.useRef(a);let o,l,f,d,m,h,g;if(e[1]!==n||e[2]!==r||e[3]!==i){const S=U.Children.toArray(n),N=S[S.length-1];l=N&&U.isValidElement(N)&&N.type===Do?N:null;const L=l?S.slice(0,-1):S,O=$E(L);let y;e[11]===Symbol.for("react.memo_cache_sentinel")?(y=Y=>{const q=u.current[Y];if(q&&s.current){const I=s.current.offsetTop,B=q.offsetTop;s.current.scrollTo({top:B-I,behavior:"smooth"})}},e[11]=y):y=e[11];const j=y;o=Oo.Provider,e[12]===Symbol.for("react.memo_cache_sentinel")?(g={scrollToPair:j},e[12]=g):g=e[12],m=s,e[13]!==r?(h=ae("w-full min-w-0 max-w-full overflow-y-auto h-full overflow-x-hidden",r),e[13]=r,e[14]=h):h=e[14],f="flex flex-col min-w-0 max-w-2xl mx-auto w-full",d=O.map((Y,q)=>{const I=q===O.length-1;return p.jsxs("div",{ref:B=>{u.current[q]=B},className:"flex flex-col pb-2",style:I&&i?{minHeight:`calc(100vh - ${i}px)`}:void 0,children:[p.jsx("div",{className:"sticky top-0 z-50 bg-background w-full h-4"}),p.jsx("div",{className:"sticky mb-3 top-4 z-50",children:Y.user&&U.isValidElement(Y.user)?U.cloneElement(Y.user,{pairIndex:q}):Y.user}),Y.assistant]},q)}),e[1]=n,e[2]=r,e[3]=i,e[4]=o,e[5]=l,e[6]=f,e[7]=d,e[8]=m,e[9]=h,e[10]=g}else o=e[4],l=e[5],f=e[6],d=e[7],m=e[8],h=e[9],g=e[10];let k;e[15]!==l||e[16]!==f||e[17]!==d?(k=p.jsxs("div",{className:f,children:[d,l]}),e[15]=l,e[16]=f,e[17]=d,e[18]=k):k=e[18];let C;e[19]!==m||e[20]!==h||e[21]!==k?(C=p.jsx("div",{ref:m,className:h,children:k}),e[19]=m,e[20]=h,e[21]=k,e[22]=C):C=e[22];let T;return e[23]!==o||e[24]!==g||e[25]!==C?(T=p.jsx(o,{value:g,children:C}),e[23]=o,e[24]=g,e[25]=C,e[26]=T):T=e[26],T}function qE(t){const e=V.c(5),{locator:n}=Ct(),r=jl(),i=Ca();let s;return e[0]!==n||e[1]!==r||e[2]!==t||e[3]!==i?(s=async(u,o,l)=>{const f=await ka(n,l),d=f.findIndex(C=>C.id===u);if(d===-1){console.warn(`[branch] Message ${u} not found in thread ${l}`);return}const m=f.slice(0,d).filter(VE),h=crypto.randomUUID(),g=new Date().toISOString(),k={id:h,title:"",created_at:g,updated_at:g,hidden:!1};if(await i.insert.mutateAsync(k),m.length>0){const C=m.map(T=>({...T,id:crypto.randomUUID(),metadata:{...T.metadata,thread_id:h,created_at:T.metadata?.created_at||g}}));await r.insertMany.mutateAsync(C)}t(h)},e[0]=n,e[1]=r,e[2]=t,e[3]=i,e[4]=s):s=e[4],s}function VE(t){return t.role!=="system"}function WE(t){const e=V.c(18),{messageId:n,parts:r}=t,[i,s]=U.useState(!1),{setInputValue:a,startBranch:u,setActiveThreadId:o,activeThreadId:l}=ql(),f=qE(o);let d;e[0]!==r?(d=r.filter(QE).map(GE).join(`
|
|
88
|
-
`),e[0]=r,e[1]=d):d=e[1];const m=d;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=y=>{y.stopPropagation(),s(!0)},e[2]=h):h=e[2];const g=h;let k;e[3]!==l||e[4]!==f||e[5]!==n||e[6]!==m||e[7]!==a||e[8]!==u?(k=async()=>{await f(n,m,l),a(m),u({originalThreadId:l,originalMessageId:n,originalMessageText:m}),s(!1)},e[3]=l,e[4]=f,e[5]=n,e[6]=m,e[7]=a,e[8]=u,e[9]=k):k=e[9];const C=k;let T;e[10]===Symbol.for("react.memo_cache_sentinel")?(T=p.jsx("div",{className:"flex justify-center items-end px-2 pb-1",children:p.jsxs(qr,{children:[p.jsx(Vr,{asChild:!0,children:p.jsx(Qe,{onClick:g,variant:"ghost",size:"xs",className:"opacity-0 group-hover:opacity-100 hover:bg-gray-200/70 rounded-md transition-opacity text-muted-foreground hover:text-foreground aspect-square w-6 h-6 p-0",children:p.jsx(pa,{size:16,className:"p-0.5"})})}),p.jsx(Wr,{side:"bottom",children:"Edit message"})]})}),e[10]=T):T=e[10];let S;e[11]===Symbol.for("react.memo_cache_sentinel")?(S=p.jsxs(hl,{children:[p.jsx(ml,{children:"Edit message?"}),p.jsx(pl,{children:"This will create a new conversation branch from this point. The original conversation will remain unchanged."})]}),e[11]=S):S=e[11];let N;e[12]===Symbol.for("react.memo_cache_sentinel")?(N=p.jsx(gl,{children:"Cancel"}),e[12]=N):N=e[12];let L;e[13]!==C?(L=p.jsxs(El,{children:[S,p.jsxs(bl,{children:[N,p.jsx(Tl,{onClick:C,children:"Confirm"})]})]}),e[13]=C,e[14]=L):L=e[14];let O;return e[15]!==i||e[16]!==L?(O=p.jsxs(p.Fragment,{children:[T,p.jsx(xl,{open:i,onOpenChange:s,children:L})]}),e[15]=i,e[16]=L,e[17]=O):O=e[17],O}function GE(t){return t.text}function QE(t){return t.type==="text"}function KE(t){const e=V.c(29),{message:n,className:r,pairIndex:i}=t,{id:s,parts:a}=n,u=U.useContext(Oo),[o,l]=U.useState(!1);if(!a||a.length===0)return null;let f;e[0]!==u||e[1]!==i?(f=()=>{l(!0),i!==void 0&&u?.scrollToPair(i)},e[0]=u,e[1]=i,e[2]=f):f=e[2];const d=f;let m;e[3]!==r?(m=ae("message-block w-full min-w-0 group relative flex items-start gap-4 px-2.5 text-foreground flex-row-reverse",r),e[3]=r,e[4]=m):m=e[4];let h,g;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=()=>l(!0),g=()=>l(!1),e[5]=h,e[6]=g):(h=e[5],g=e[6]);const k=o?"overflow-auto opacity-100":"overflow-hidden opacity-99 mask-b-from-1%";let C;e[7]!==k?(C=ae("z-10 px-4 py-2 transition-opacity max-h-[120px] flex-1",k),e[7]=k,e[8]=C):C=e[8];let T;if(e[9]!==s||e[10]!==a){let j;e[12]!==s?(j=(Y,q)=>Y.type==="text"?p.jsx(wo,{id:s,part:Y},`${s}-${q}`):null,e[12]=s,e[13]=j):j=e[13],T=a.map(j),e[9]=s,e[10]=a,e[11]=T}else T=e[11];let S;e[14]!==T?(S=p.jsx("div",{children:T}),e[14]=T,e[15]=S):S=e[15];let N;e[16]!==C||e[17]!==S?(N=p.jsx("div",{className:C,children:S}),e[16]=C,e[17]=S,e[18]=N):N=e[18];let L;e[19]!==s||e[20]!==a?(L=p.jsx(WE,{messageId:s,parts:a}),e[19]=s,e[20]=a,e[21]=L):L=e[21];let O;e[22]!==d||e[23]!==L||e[24]!==N?(O=p.jsxs("div",{tabIndex:0,onClick:d,onFocus:h,onBlur:g,className:"w-full border min-w-0 shadow-xs rounded-lg text-[0.9375rem] wrap-break-word overflow-wrap-anywhere bg-background cursor-pointer transition-colors relative flex outline-none",children:[N,L]}),e[22]=d,e[23]=L,e[24]=N,e[25]=O):O=e[25];let y;return e[26]!==O||e[27]!==m?(y=p.jsx(p.Fragment,{children:p.jsx("div",{className:m,children:O})}),e[26]=O,e[27]=m,e[28]=y):y=e[28],y}const Po=U.createContext({isMobile:!1,setValue:()=>{}}),Oi=()=>U.useContext(Po),Mo=t=>{const e=V.c(37);let n,r,i,s,a,u,o,l;e[0]!==t?({children:n,defaultOpen:r,open:u,onOpenChange:s,defaultValue:i,value:l,onValueChange:a,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=s,e[5]=a,e[6]=u,e[7]=o,e[8]=l):(n=e[1],r=e[2],i=e[3],s=e[4],a=e[5],u=e[6],o=e[7],l=e[8]);const f=Nl(),d=r??!1;let m;e[9]!==s||e[10]!==u||e[11]!==d?(m={prop:u,defaultProp:d,onChange:s},e[9]=s,e[10]=u,e[11]=d,e[12]=m):m=e[12];const[h,g]=Mi(m);let k;e[13]!==i||e[14]!==a||e[15]!==l?(k={prop:l,defaultProp:i,onChange:a},e[13]=i,e[14]=a,e[15]=l,e[16]=k):k=e[16];const[C,T]=Mi(k);let S;e[17]!==T?(S=Y=>{Y&&T(Y)},e[17]=T,e[18]=S):S=e[18];const N=S;let L;e[19]!==f||e[20]!==N?(L={isMobile:f,setValue:N},e[19]=f,e[20]=N,e[21]=L):L=e[21];let O;e[22]!==n||e[23]!==h||e[24]!==o||e[25]!==g?(O=p.jsx(Ll,{open:h,onOpenChange:g,...o,children:n}),e[22]=n,e[23]=h,e[24]=o,e[25]=g,e[26]=O):O=e[26];let y;e[27]!==h||e[28]!==o||e[29]!==g||e[30]!==N||e[31]!==O||e[32]!==C?(y=p.jsx(Cl,{open:h,onOpenChange:g,value:C,onValueChange:N,...o,children:O}),e[27]=h,e[28]=o,e[29]=g,e[30]=N,e[31]=O,e[32]=C,e[33]=y):y=e[33];let j;return e[34]!==L||e[35]!==y?(j=p.jsx(Po.Provider,{value:L,children:y}),e[34]=L,e[35]=y,e[36]=j):j=e[36],j},vo=t=>{const{children:e,title:n,headerActions:r,...i}=t,{isMobile:s}=Oi(),{className:a,...u}=i;return s?p.jsxs(Pl,{...u,children:[p.jsxs(Ml,{className:ae(r?"flex flex-row items-center justify-between":"hidden"),children:[p.jsx(vl,{children:n}),r]}),p.jsx("div",{className:ae("flex flex-col gap-2 p-2 py-4",a),children:e})]}):p.jsx(kl,{...i,children:e})},Bo=t=>{const e=V.c(7);let n,r;e[0]!==t?({children:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);const{isMobile:i}=Oi();let s;return e[3]!==n||e[4]!==i||e[5]!==r?(s=i?p.jsx(Rl,{asChild:!0,children:p.jsx(Qe,{variant:"outline",...r,children:n})}):p.jsx(Al,{...r,children:n}),e[3]=n,e[4]=i,e[5]=r,e[6]=s):s=e[6],s},Fo=t=>{const e=V.c(7);let n,r;e[0]!==t?({children:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);const{isMobile:i}=Oi();let s;return e[3]!==n||e[4]!==i||e[5]!==r?(s=i?p.jsx("span",{...r,children:n}):p.jsx(_l,{...r,children:n}),e[3]=n,e[4]=i,e[5]=r,e[6]=s):s=e[6],s};function XE(){const t=V.c(7),{org:e}=Ct(),n=tl();let r;t[0]!==e.id?(r=al(e.id),t[0]=e.id,t[1]=r):r=t[1];const i=r;let s;t[2]!==n?(s=n??[],t[2]=n,t[3]=s):s=t[3];let a;return t[4]!==i||t[5]!==s?(a=[i,...s],t[4]=i,t[5]=s,t[6]=a):a=t[6],a}function ZE(t){const e=V.c(24),{gateway:n,isSelected:r}=t,i=r&&"bg-accent";let s;e[0]!==i?(s=ae("flex items-start gap-3 py-3 px-3 hover:bg-accent cursor-pointer rounded-lg",i),e[0]=i,e[1]=s):s=e[1];let a;e[2]!==n.fallbackIcon?(a=n.fallbackIcon??p.jsx(ra,{}),e[2]=n.fallbackIcon,e[3]=a):a=e[3];let u;e[4]!==n.icon||e[5]!==n.title||e[6]!==a?(u=p.jsx(ia,{icon:n.icon,name:n.title,size:"sm",fallbackIcon:a,className:"size-10"}),e[4]=n.icon,e[5]=n.title,e[6]=a,e[7]=u):u=e[7];let o;e[8]!==n.title?(o=p.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:n.title}),e[8]=n.title,e[9]=o):o=e[9];let l;e[10]!==r?(l=r&&p.jsx(xt,{size:16,className:"text-foreground shrink-0"}),e[10]=r,e[11]=l):l=e[11];let f;e[12]!==o||e[13]!==l?(f=p.jsxs("div",{className:"flex items-center justify-between",children:[o,l]}),e[12]=o,e[13]=l,e[14]=f):f=e[14];let d;e[15]!==n.description?(d=n.description&&p.jsx("p",{className:"text-xs text-muted-foreground line-clamp-1 leading-relaxed",children:n.description}),e[15]=n.description,e[16]=d):d=e[16];let m;e[17]!==f||e[18]!==d?(m=p.jsxs("div",{className:"flex flex-col flex-1 min-w-0 gap-0.5",children:[f,d]}),e[17]=f,e[18]=d,e[19]=m):m=e[19];let h;return e[20]!==s||e[21]!==u||e[22]!==m?(h=p.jsxs("div",{className:s,children:[u,m]}),e[20]=s,e[21]=u,e[22]=m,e[23]=h):h=e[23],h}function JE(t){const e=V.c(12),{gateway:n}=t;if(!n){let u;return e[0]===Symbol.for("react.memo_cache_sentinel")?(u=p.jsx("span",{className:"text-sm text-muted-foreground",children:"Select agent"}),e[0]=u):u=e[0],u}let r;e[1]!==n.fallbackIcon?(r=n.fallbackIcon??p.jsx(ra,{}),e[1]=n.fallbackIcon,e[2]=r):r=e[2];let i;e[3]!==n.icon||e[4]!==n.title||e[5]!==r?(i=p.jsx(ia,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:r,className:"w-5! h-5! min-w-5! shrink-0 rounded-sm"}),e[3]=n.icon,e[4]=n.title,e[5]=r,e[6]=i):i=e[6];let s;e[7]!==n.title?(s=p.jsx("span",{className:"text-sm text-muted-foreground group-hover:text-foreground transition-colors truncate min-w-0 max-w-[200px] hidden sm:inline-block",children:n.title}),e[7]=n.title,e[8]=s):s=e[8];let a;return e[9]!==i||e[10]!==s?(a=p.jsxs("div",{className:"flex items-center gap-2 min-w-0 max-w-full",children:[i,s]}),e[9]=i,e[10]=s,e[11]=a):a=e[11],a}function Kb(t){const e=V.c(47),{selectedGatewayId:n,onGatewayChange:r,variant:i,className:s,placeholder:a}=t,u=i===void 0?"bordered":i,o=a===void 0?"Select Agent":a,[l,f]=U.useState(!1),[d,m]=U.useState(""),h=U.useRef(null),g=XE();let k,C;e[0]!==l?(k=()=>{l&&setTimeout(()=>{h.current?.focus()},0)},C=[l],e[0]=l,e[1]=k,e[2]=C):(k=e[1],C=e[2]),U.useEffect(k,C);let T;if(e[3]!==g||e[4]!==n){let x;e[6]!==n?(x=ue=>ue.id===n,e[6]=n,e[7]=x):x=e[7],T=g.find(x),e[3]=g,e[4]=n,e[5]=T}else T=e[5];const S=T;let N;e:{if(!d.trim()){N=g;break e}let x;if(e[8]!==g||e[9]!==d){const ue=d.toLowerCase();x=g.filter(he=>he.title.toLowerCase().includes(ue)||he.description?.toLowerCase().includes(ue)),e[8]=g,e[9]=d,e[10]=x}else x=e[10];N=x}const L=N;let O;e[11]!==r?(O=x=>{r(x),m(""),f(!1)},e[11]=r,e[12]=O):O=e[12];const y=O;let j;e[13]===Symbol.for("react.memo_cache_sentinel")?(j=x=>{f(x),x||m("")},e[13]=j):j=e[13];const Y=j;console.log({placeholder:o,selectedGatewayId:n,filteredGateways:L});const q=n||"",I=u==="borderless"&&"border-0 md:border-none";let B;e[14]!==s||e[15]!==I?(B=ae("text-sm hover:bg-accent rounded-lg py-0.5 px-1 gap-1 shadow-none cursor-pointer group focus-visible:ring-0 focus-visible:ring-offset-0 min-w-0 max-w-full",I,s),e[14]=s,e[15]=I,e[16]=B):B=e[16];let F;e[17]!==S?(F=p.jsx(JE,{gateway:S}),e[17]=S,e[18]=F):F=e[18];let G;e[19]!==o||e[20]!==F?(G=p.jsx(Fo,{placeholder:o,className:"min-w-0 max-w-full",children:F}),e[19]=o,e[20]=F,e[21]=G):G=e[21];let z;e[22]!==B||e[23]!==G?(z=p.jsx(Bo,{size:"sm",className:B,children:G}),e[22]=B,e[23]=G,e[24]=z):z=e[24];let M;e[25]===Symbol.for("react.memo_cache_sentinel")?(M=p.jsx(Yr,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none"}),e[25]=M):M=e[25];let W;e[26]===Symbol.for("react.memo_cache_sentinel")?(W=x=>m(x.target.value),e[26]=W):W=e[26];let K;e[27]!==d?(K=p.jsx("div",{className:"border-b px-4 py-3 bg-background/95 backdrop-blur sticky top-0 z-10",children:p.jsxs("div",{className:"relative",children:[M,p.jsx(sa,{ref:h,type:"text",placeholder:"Search for an agent...",value:d,onChange:W,className:"pl-9 h-9 text-sm border-0 focus-visible:ring-0 focus-visible:ring-offset-0 shadow-none"})]})}),e[27]=d,e[28]=K):K=e[28];let te;e[29]!==L||e[30]!==y||e[31]!==n?(te=L.length>0?L.map(x=>p.jsx("div",{onClick:()=>y(x.id),className:"outline-none",children:p.jsx(ZE,{gateway:x,isSelected:x.id===n})},x.id)):p.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"No agents found"}),e[29]=L,e[30]=y,e[31]=n,e[32]=te):te=e[32];let J;e[33]!==te?(J=p.jsx("div",{className:"overflow-y-auto p-2 flex flex-col gap-1",children:te}),e[33]=te,e[34]=J):J=e[34];let A;e[35]!==K||e[36]!==J?(A=p.jsxs("div",{className:"flex flex-col max-h-[300px]",children:[K,J]}),e[35]=K,e[36]=J,e[37]=A):A=e[37];let Z;e[38]!==o||e[39]!==A?(Z=p.jsx(vo,{title:o,className:"w-full md:w-[400px] p-0",side:"bottom",children:A}),e[38]=o,e[39]=A,e[40]=Z):Z=e[40];let le;return e[41]!==y||e[42]!==l||e[43]!==z||e[44]!==Z||e[45]!==q?(le=p.jsxs(Mo,{open:l,onOpenChange:Y,value:q,onValueChange:y,children:[z,Z]}),e[41]=y,e[42]=l,e[43]=z,e[44]=Z,e[45]=q,e[46]=le):le=e[46],le}function eb(t,e){const n=V.c(4);let r;n[0]!==e?(r=e===void 0?{}:e,n[0]=e,n[1]=r):r=n[1];const i=r,s=t??nl;let a;return n[2]!==s?(a=il(s),n[2]=s,n[3]=a):a=n[3],rl(s,"LLM",a,i)}const tb=["x-ai/grok-code-fast-1","anthropic/claude-sonnet-4.5","google/gemini-2.5-flash","xiaomi/mimo-v2-flash:free","google/gemini-3-flash-preview","deepseek/deepseek-v3.2","anthropic/claude-opus-4.5","x-ai/grok-4.1-fast","google/gemini-2.5-flash-lite","google/gemini-2.0-flash-001"],zr=new Map;tb.forEach((t,e)=>{zr.set(t,e)});function nb(){const t=V.c(9),e=sl();let n;t[0]!==e?(n={connections:e,binding:"LLMS"},t[0]=e,t[1]=n):n=t[1];const[r]=Il(n);let i;t[2]===Symbol.for("react.memo_cache_sentinel")?(i={pageSize:999},t[2]=i):i=t[2];const s=eb(r?.id,i);if(!s||!r){let o;return t[3]===Symbol.for("react.memo_cache_sentinel")?(o=[],t[3]=o):o=t[3],o}let a;if(t[4]!==r||t[5]!==s){let o;t[7]!==r?(o=l=>({...l,name:l.title,contextWindow:l.limits?.contextWindow,outputLimit:l.limits?.maxOutputTokens,inputCost:l.costs?.input,outputCost:l.costs?.output,provider:l.provider,connectionId:r.id,connectionName:r.title}),t[7]=r,t[8]=o):o=t[8],a=s.filter(ib).map(o).sort(rb),t[4]=r,t[5]=s,t[6]=a}else a=t[6];return a}function rb(t,e){const n=zr.get(t.id),r=zr.get(e.id);return n!==void 0&&r!==void 0?n-r:n!==void 0?-1:r!==void 0?1:t.name.localeCompare(e.name)}function ib(t){return t.limits?.contextWindow&&t.limits?.maxOutputTokens}const sb={reasoning:{icon:p.jsx(jn,{className:"size-4"}),bg:"bg-purple-100",text:"text-purple-700",label:"Reasoning"},"image-upload":{icon:p.jsx(ga,{className:"size-4"}),bg:"bg-teal-100",text:"text-teal-700",label:"Can analyze images"},"file-upload":{icon:p.jsx(Sl,{className:"size-4"}),bg:"bg-blue-100",text:"text-blue-700",label:"Can analyze files"},"web-search":{icon:p.jsx(Yr,{className:"size-4"}),bg:"bg-amber-100",text:"text-amber-700",label:"Can search the web to answer questions"}},Ho=U.memo(function(e){const n=V.c(11),{capability:r}=e,i=sb[r];let s;n[0]!==r||n[1]!==i?(s=i||{icon:p.jsx(xt,{className:"size-4"}),bg:"bg-slate-200",text:"text-slate-700",label:r},n[0]=r,n[1]=i,n[2]=s):s=n[2];const a=s,u=`flex items-center justify-center h-6 w-6 rounded-sm ${a.bg} ${a.text}`;let o;n[3]!==a.icon||n[4]!==u?(o=p.jsx(Vr,{asChild:!0,children:p.jsx("div",{className:u,children:a.icon})}),n[3]=a.icon,n[4]=u,n[5]=o):o=n[5];let l;n[6]!==a.label?(l=p.jsx(Wr,{children:p.jsx("p",{children:a.label})}),n[6]=a.label,n[7]=l):l=n[7];let f;return n[8]!==o||n[9]!==l?(f=p.jsxs(qr,{children:[o,l]}),n[8]=o,n[9]=l,n[10]=f):f=n[10],f}),Xs=U.memo(function(e){const n=V.c(54),{model:r,compact:i}=e,s=i===void 0?!1:i;if(!r){let T;return n[0]===Symbol.for("react.memo_cache_sentinel")?(T=p.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground text-sm",children:"Hover to preview"}),n[0]=T):T=n[0],T}const a=r.contextWindow||r.inputCost||r.outputCost||r.outputLimit;if(!a&&!s){let T;n[1]!==r.logo||n[2]!==r.name?(T=r.logo&&p.jsx("img",{src:r.logo,className:"w-6 h-6",alt:r.name}),n[1]=r.logo,n[2]=r.name,n[3]=T):T=n[3];let S;n[4]!==r.name?(S=p.jsx("p",{className:"text-lg font-medium leading-7",children:r.name}),n[4]=r.name,n[5]=S):S=n[5];let N;n[6]!==T||n[7]!==S?(N=p.jsxs("div",{className:"flex items-center gap-3 py-2 px-0",children:[T,S]}),n[6]=T,n[7]=S,n[8]=N):N=n[8];let L;n[9]!==r.description?(L=r.description&&p.jsx("p",{className:"text-sm text-muted-foreground",children:r.description}),n[9]=r.description,n[10]=L):L=n[10];let O;return n[11]!==N||n[12]!==L?(O=p.jsxs("div",{className:"flex flex-col gap-3 py-1 px-1.5",children:[N,L]}),n[11]=N,n[12]=L,n[13]=O):O=n[13],O}if(!a&&s)return null;if(s){let T;n[14]!==r.contextWindow?(T=r.contextWindow&&p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("span",{className:"text-muted-foreground",children:"Context"}),p.jsxs("span",{className:"text-foreground font-medium",children:[r.contextWindow.toLocaleString()," tokens"]})]}),n[14]=r.contextWindow,n[15]=T):T=n[15];let S;n[16]!==r.inputCost?(S=r.inputCost&&p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("span",{className:"text-muted-foreground",children:"Input cost"}),p.jsxs("span",{className:"text-foreground font-medium",children:["$",r.inputCost.toFixed(2)," / 1M"]})]}),n[16]=r.inputCost,n[17]=S):S=n[17];let N;n[18]!==r.outputCost?(N=r.outputCost&&p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("span",{className:"text-muted-foreground",children:"Output cost"}),p.jsxs("span",{className:"text-foreground font-medium",children:["$",r.outputCost.toFixed(2)," / 1M"]})]}),n[18]=r.outputCost,n[19]=N):N=n[19];let L;n[20]!==r.outputLimit?(L=r.outputLimit&&p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("span",{className:"text-muted-foreground",children:"Output limit"}),p.jsxs("span",{className:"text-foreground font-medium",children:[r.outputLimit.toLocaleString()," tokens"]})]}),n[20]=r.outputLimit,n[21]=L):L=n[21];let O;return n[22]!==T||n[23]!==S||n[24]!==N||n[25]!==L?(O=p.jsxs("div",{className:"flex flex-col gap-2.5 pt-3 pb-3 px-3 rounded-b-lg text-xs",children:[T,S,N,L]}),n[22]=T,n[23]=S,n[24]=N,n[25]=L,n[26]=O):O=n[26],O}let u;n[27]!==r.logo||n[28]!==r.name?(u=r.logo&&p.jsx("img",{src:r.logo,className:"w-6 h-6",alt:r.name}),n[27]=r.logo,n[28]=r.name,n[29]=u):u=n[29];let o;n[30]!==r.name?(o=p.jsx("p",{className:"text-lg font-medium leading-7",children:r.name}),n[30]=r.name,n[31]=o):o=n[31];let l;n[32]!==u||n[33]!==o?(l=p.jsxs("div",{className:"flex items-center gap-3",children:[u,o]}),n[32]=u,n[33]=o,n[34]=l):l=n[34];let f;n[35]!==r.capabilities?(f=r.capabilities&&r.capabilities.length>0&&p.jsx("div",{className:"flex items-center gap-2",children:r.capabilities.map(ob)}),n[35]=r.capabilities,n[36]=f):f=n[36];let d;n[37]!==l||n[38]!==f?(d=p.jsxs("div",{className:"flex flex-col gap-3 py-2 px-0",children:[l,f]}),n[37]=l,n[38]=f,n[39]=d):d=n[39];let m;n[40]!==r.contextWindow?(m=r.contextWindow&&p.jsxs("div",{className:"flex flex-col gap-1.5",children:[p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx(cl,{className:"w-3.5 h-3.5 text-muted-foreground"}),p.jsx("p",{className:"text-sm text-foreground",children:"Context window"})]}),p.jsxs("p",{className:"text-sm text-muted-foreground",children:[r.contextWindow.toLocaleString()," tokens"]})]}),n[40]=r.contextWindow,n[41]=m):m=n[41];let h;n[42]!==r.inputCost||n[43]!==r.outputCost?(h=(r.inputCost||r.outputCost)&&p.jsxs("div",{className:"flex flex-col gap-1.5",children:[p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx(ma,{className:"w-3.5 h-3.5 text-muted-foreground"}),p.jsx("p",{className:"text-sm text-foreground",children:"Costs"})]}),p.jsxs("div",{className:"flex flex-col gap-0.5",children:[r.inputCost!==null&&r.inputCost!==void 0&&p.jsxs("p",{className:"text-sm text-muted-foreground",children:["$",r.inputCost.toFixed(2)," / 1M tokens (input)"]}),r.outputCost!==null&&r.outputCost!==void 0&&p.jsxs("p",{className:"text-sm text-muted-foreground",children:["$",r.outputCost.toFixed(2)," / 1M tokens (output)"]})]})]}),n[42]=r.inputCost,n[43]=r.outputCost,n[44]=h):h=n[44];let g;n[45]!==r.outputLimit?(g=r.outputLimit&&p.jsxs("div",{className:"flex flex-col gap-1.5",children:[p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx(ba,{className:"w-4.5 h-4.5 text-muted-foreground/70"}),p.jsx("p",{className:"text-sm text-foreground",children:"Output limit"})]}),p.jsxs("p",{className:"text-sm text-muted-foreground",children:[r.outputLimit.toLocaleString()," token limit"]})]}),n[45]=r.outputLimit,n[46]=g):g=n[46];let k;n[47]!==m||n[48]!==h||n[49]!==g?(k=p.jsxs("div",{className:"flex flex-col gap-4",children:[m,h,g]}),n[47]=m,n[48]=h,n[49]=g,n[50]=k):k=n[50];let C;return n[51]!==k||n[52]!==d?(C=p.jsxs("div",{className:"flex flex-col gap-3 py-1 px-1.5",children:[d,k]}),n[51]=k,n[52]=d,n[53]=C):C=n[53],C}),ab=U.memo(function(e){const n=V.c(27),{model:r,onHover:i,isSelected:s,hasExpandedInfo:a}=e,u=a?"rounded-t-lg":"rounded-lg";let o;n[0]!==u?(o=ae("flex items-center gap-2 h-10 py-4 px-3 hover:bg-accent cursor-pointer",u),n[0]=u,n[1]=o):o=n[1];let l;n[2]!==r||n[3]!==i?(l=()=>i(r),n[2]=r,n[3]=i,n[4]=l):l=n[4];let f;n[5]!==r.logo||n[6]!==r.name?(f=r.logo&&p.jsx("img",{src:r.logo,className:"w-5 h-5 shrink-0",alt:r.name}),n[5]=r.logo,n[6]=r.name,n[7]=f):f=n[7];let d;n[8]!==r.name?(d=p.jsx("span",{className:"text-sm text-foreground",children:r.name}),n[8]=r.name,n[9]=d):d=n[9];let m;n[10]!==a||n[11]!==r.capabilities?(m=a&&r.capabilities&&r.capabilities.length>0&&p.jsx("div",{className:"md:hidden flex items-center gap-1.5 ml-auto",children:r.capabilities.map(lb)}),n[10]=a,n[11]=r.capabilities,n[12]=m):m=n[12];let h;n[13]!==a||n[14]!==s?(h=s&&!a&&p.jsx(xt,{className:"w-4 h-4 text-foreground ml-auto"}),n[13]=a,n[14]=s,n[15]=h):h=n[15];let g;n[16]!==a||n[17]!==s?(g=s&&a&&p.jsx(xt,{className:"w-4 h-4 text-foreground ml-2 shrink-0"}),n[16]=a,n[17]=s,n[18]=g):g=n[18];let k;return n[19]!==o||n[20]!==l||n[21]!==f||n[22]!==d||n[23]!==m||n[24]!==h||n[25]!==g?(k=p.jsxs("div",{className:o,onMouseEnter:l,children:[f,d,m,h,g]}),n[19]=o,n[20]=l,n[21]=f,n[22]=d,n[23]=m,n[24]=h,n[25]=g,n[26]=k):k=n[26],k});function ub(t){const e=V.c(9),{model:n}=t;if(!n){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=p.jsx("span",{className:"text-sm text-muted-foreground",children:"Select model"}),e[0]=a):a=e[0],a}let r;e[1]!==n.logo||e[2]!==n.name?(r=n.logo&&p.jsx("img",{src:n.logo,className:"w-5 h-5 shrink-0 rounded-sm",alt:n.name}),e[1]=n.logo,e[2]=n.name,e[3]=r):r=e[3];let i;e[4]!==n.name?(i=p.jsx("span",{className:"text-sm text-muted-foreground group-hover:text-foreground transition-colors truncate min-w-0 max-w-[200px] hidden sm:inline-block",children:n.name}),e[4]=n.name,e[5]=i):i=e[5];let s;return e[6]!==r||e[7]!==i?(s=p.jsxs("div",{className:"flex items-center gap-2 min-w-0 max-w-full",children:[r,i]}),e[6]=r,e[7]=i,e[8]=s):s=e[8],s}function Xb(t){const e=V.c(67),{selectedModel:n,onModelChange:r,variant:i,className:s,placeholder:a}=t,u=i===void 0?"borderless":i,o=a===void 0?"Select model":a,[l,f]=U.useState(!1),[d,m]=U.useState(null),[h,g]=U.useState(!1),[k,C]=U.useState(""),T=U.useRef(null),S=nb();let N,L;e[0]!==l?(N=()=>{l&&setTimeout(()=>{T.current?.focus()},0)},L=[l],e[0]=l,e[1]=N,e[2]=L):(N=e[1],L=e[2]),U.useEffect(N,L);let O;e[3]!==S||e[4]!==n?(O=n?S.find(ie=>ie.id===n.id&&ie.connectionId===n.connectionId)?.id:void 0,e[3]=S,e[4]=n,e[5]=O):O=e[5];const y=O;let j;if(e[6]!==S||e[7]!==y){let ie;e[9]!==y?(ie=we=>we.id===y,e[9]=y,e[10]=ie):ie=e[10],j=S.find(ie),e[6]=S,e[7]=y,e[8]=j}else j=e[8];const Y=j;let q;e:{if(!k.trim()){q=S;break e}let ie;if(e[11]!==S||e[12]!==k){const we=k.toLowerCase();ie=S.filter(ot=>ot.name.toLowerCase().includes(we)||ot.provider?.toLowerCase().includes(we)||ot.description?.toLowerCase().includes(we)),e[11]=S,e[12]=k,e[13]=ie}else ie=e[13];q=ie}const I=q;let B;e[14]!==S||e[15]!==r?(B=ie=>{const we=S.find(ot=>ot.id===ie);we&&(r({id:we.id,connectionId:we.connectionId,provider:we.provider??void 0}),C(""),f(!1))},e[14]=S,e[15]=r,e[16]=B):B=e[16];const F=B;let G;e[17]===Symbol.for("react.memo_cache_sentinel")?(G=ie=>{f(ie),ie||C("")},e[17]=G):G=e[17];const z=G;if(S.length===0)return null;const M=y||"",W=u==="borderless"&&"md:border-none";let K;e[18]!==s||e[19]!==W?(K=ae("text-sm hover:bg-accent rounded-lg py-0.5 px-1 gap-1 shadow-none cursor-pointer border-0 group focus-visible:ring-0 focus-visible:ring-offset-0 min-w-0 max-w-full",W,s),e[18]=s,e[19]=W,e[20]=K):K=e[20];let te;e[21]!==Y?(te=p.jsx(ub,{model:Y}),e[21]=Y,e[22]=te):te=e[22];let J;e[23]!==o||e[24]!==te?(J=p.jsx(Fo,{placeholder:o,className:"min-w-0 max-w-full",children:te}),e[23]=o,e[24]=te,e[25]=J):J=e[25];let A;e[26]!==K||e[27]!==J?(A=p.jsx(Bo,{size:"sm",className:K,children:J}),e[26]=K,e[27]=J,e[28]=A):A=e[28];let Z;e[29]!==h?(Z=()=>g(!h),e[29]=h,e[30]=Z):Z=e[30];const le=h?"text-foreground":"text-muted-foreground";let x;e[31]!==le?(x=ae("w-5 h-5 transition-colors",le),e[31]=le,e[32]=x):x=e[32];let ue;e[33]!==x?(ue=p.jsx(yl,{className:x}),e[33]=x,e[34]=ue):ue=e[34];let he;e[35]!==Z||e[36]!==ue?(he=p.jsx("button",{type:"button",onClick:Z,className:"md:hidden flex items-center justify-center h-8 w-8 rounded-lg hover:bg-accent transition-colors","aria-label":"Toggle model info",children:ue}),e[35]=Z,e[36]=ue,e[37]=he):he=e[37];let ce;e[38]===Symbol.for("react.memo_cache_sentinel")?(ce=p.jsx(Yr,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none"}),e[38]=ce):ce=e[38];let ke;e[39]===Symbol.for("react.memo_cache_sentinel")?(ke=ie=>C(ie.target.value),e[39]=ke):ke=e[39];let Ee;e[40]!==k?(Ee=p.jsx("div",{className:"border-b px-4 py-3 bg-background/95 backdrop-blur sticky top-0 z-10",children:p.jsxs("div",{className:"relative",children:[ce,p.jsx(sa,{ref:T,type:"text",placeholder:"Search for a model...",value:k,onChange:ke,className:"pl-9 h-9 text-sm border-0 focus-visible:ring-0 focus-visible:ring-offset-0 shadow-none"})]})}),e[40]=k,e[41]=Ee):Ee=e[41];let xe;e[42]!==I||e[43]!==F||e[44]!==y||e[45]!==h?(xe=I.length>0?I.map(ie=>p.jsxs("div",{onClick:()=>F(ie.id),className:ae("rounded-lg mb-1",ie.id===y&&"bg-accent"),children:[p.jsx(ab,{model:ie,onHover:m,isSelected:ie.id===y,hasExpandedInfo:h}),h&&p.jsx("div",{className:"md:hidden",children:p.jsx(Xs,{model:ie,compact:!0})})]},ie.id)):p.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"No models found"}),e[42]=I,e[43]=F,e[44]=y,e[45]=h,e[46]=xe):xe=e[46];let me;e[47]!==xe?(me=p.jsx("div",{className:"flex-1 overflow-y-auto px-0.5",children:xe}),e[47]=xe,e[48]=me):me=e[48];let Ae;e[49]!==Ee||e[50]!==me?(Ae=p.jsxs("div",{className:"flex-1 flex flex-col md:border-r",children:[Ee,me]}),e[49]=Ee,e[50]=me,e[51]=Ae):Ae=e[51];const Ie=d||Y||null;let be;e[52]!==Ie?(be=p.jsx("div",{className:"hidden md:block md:w-[300px] p-3",children:p.jsx(Xs,{model:Ie})}),e[52]=Ie,e[53]=be):be=e[53];let Pe;e[54]!==Ae||e[55]!==be?(Pe=p.jsxs("div",{className:"flex flex-col md:flex-row h-[350px]",children:[Ae,be]}),e[54]=Ae,e[55]=be,e[56]=Pe):Pe=e[56];let Le;e[57]!==o||e[58]!==he||e[59]!==Pe?(Le=p.jsx(vo,{title:o,className:"w-full md:w-auto md:min-w-[600px] [&_button[aria-label='Scroll down']]:!hidden [&_button[aria-label='Scroll up']]:!hidden",headerActions:he,children:Pe}),e[57]=o,e[58]=he,e[59]=Pe,e[60]=Le):Le=e[60];let Fe;return e[61]!==F||e[62]!==l||e[63]!==M||e[64]!==A||e[65]!==Le?(Fe=p.jsxs(Mo,{open:l,onOpenChange:z,value:M,onValueChange:F,children:[A,Le]}),e[61]=F,e[62]=l,e[63]=M,e[64]=A,e[65]=Le,e[66]=Fe):Fe=e[66],Fe}function ob(t){return p.jsx(Ho,{capability:t},t)}function lb(t){return p.jsx(Ho,{capability:t},t)}function cb({messageCount:t,sentinelRef:e}){const n=U.useRef(t),r=U.useRef(0);t>n.current&&r.current!==t&&queueMicrotask(()=>{e.current?.scrollIntoView({behavior:"smooth",block:"start"}),r.current=t}),n.current=t}function Zs(t,e){const n=U.Children.toArray(t);for(const r of n)if(U.isValidElement(r)&&r.type===e)return r;return null}function fb(t){const e=V.c(5),{className:n,children:r}=t;let i;e[0]!==n?(i=ae("flex flex-col h-full w-full bg-sidebar transform-[translateZ(0)]",n),e[0]=n,e[1]=i):i=e[1];let s;return e[2]!==r||e[3]!==i?(s=p.jsx("div",{className:i,children:r}),e[2]=r,e[3]=i,e[4]=s):s=e[4],s}function db(t){const e=V.c(11),{children:n}=t;let r;e[0]!==n?(r=Zs(n,Uo),e[0]=n,e[1]=r):r=e[1];const i=r;let s;e[2]!==n?(s=Zs(n,jo),e[2]=n,e[3]=s):s=e[3];const a=s,u=i?.props.children;let o;e[4]!==u?(o=p.jsx("div",{className:"flex items-center gap-2",children:u}),e[4]=u,e[5]=o):o=e[5];const l=a?.props.children;let f;e[6]!==l?(f=p.jsx("div",{className:"flex items-center gap-1",children:l}),e[6]=l,e[7]=f):f=e[7];let d;return e[8]!==o||e[9]!==f?(d=p.jsxs("div",{className:"flex h-12 items-center justify-between border-b border-border px-4 flex-none",children:[o,f]}),e[8]=o,e[9]=f,e[10]=d):d=e[10],d}function Uo(t){const e=V.c(2),{children:n}=t;let r;return e[0]!==n?(r=p.jsx(p.Fragment,{children:n}),e[0]=n,e[1]=r):r=e[1],r}function jo(t){const e=V.c(2),{children:n}=t;let r;return e[0]!==n?(r=p.jsx(p.Fragment,{children:n}),e[0]=n,e[1]=r):r=e[1],r}function hb(t){const e=V.c(5),{children:n,className:r}=t;let i;e[0]!==r?(i=ae("flex-1 min-h-0 overflow-y-auto",r),e[0]=r,e[1]=i):i=e[1];let s;return e[2]!==n||e[3]!==i?(s=p.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=s):s=e[4],s}function mb(t){const e=V.c(2),{children:n}=t;let r;return e[0]!==n?(r=p.jsx("div",{className:"h-full w-full flex items-center justify-center max-w-2xl mx-auto",children:n}),e[0]=n,e[1]=r):r=e[1],r}function pb(t){const e=V.c(12),{messages:n,status:r,minHeightOffset:i}=t,s=i===void 0?240:i,a=U.useRef(null);let u;e[0]!==n.length?(u={messageCount:n.length,sentinelRef:a},e[0]=n.length,e[1]=u):u=e[1],cb(u);let o;if(e[2]!==n||e[3]!==r){let d;e[5]!==n.length||e[6]!==r?(d=(m,h)=>m.role==="user"?p.jsx(KE,{message:m},m.id):m.role==="assistant"?p.jsx(UE,{message:m,status:h===n.length-1?r:void 0},m.id):null,e[5]=n.length,e[6]=r,e[7]=d):d=e[7],o=n.map(d),e[2]=n,e[3]=r,e[4]=o}else o=e[4];let l;e[8]===Symbol.for("react.memo_cache_sentinel")?(l=p.jsx(Do,{children:p.jsx("div",{ref:a,className:"h-0"})}),e[8]=l):l=e[8];let f;return e[9]!==s||e[10]!==o?(f=p.jsxs(YE,{minHeightOffset:s,children:[o,l]}),e[9]=s,e[10]=o,e[11]=f):f=e[11],f}function gb(t){const e=V.c(5),{children:n,className:r}=t;let i;e[0]!==r?(i=ae("flex-none w-full mx-auto p-2","max-w-2xl min-w-0",r),e[0]=r,e[1]=i):i=e[1];let s;return e[2]!==n||e[3]!==i?(s=p.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=s):s=e[4],s}function Di(t){const e=V.c(24),{title:n,description:r,icon:i,variant:s,onDismiss:a,children:u}=t,o=s===void 0?"default":s;let l,f,d,m,h;if(e[0]!==u||e[1]!==r||e[2]!==i||e[3]!==n||e[4]!==o){const N={default:{container:"border-muted-foreground/30 bg-muted/50 hover:bg-muted transition-colors",icon:"text-muted-foreground",title:"text-muted-foreground",description:"text-muted-foreground/70"},danger:{container:"border-destructive/30 bg-destructive/5",icon:"text-destructive",title:"text-destructive font-medium",description:"text-muted-foreground"},warning:{container:"border-amber-500/30 bg-amber-500/5",icon:"text-amber-600 dark:text-amber-500",title:"text-amber-600 dark:text-amber-500 font-medium",description:"text-muted-foreground"}}[o];m=ae("flex items-start gap-2 px-3 py-2.5 rounded-lg border border-dashed text-sm w-full",N.container),h=i&&p.jsx("div",{className:ae("mt-0.5 shrink-0",N.icon),children:i}),l="flex-1 min-w-0",f=n&&p.jsx("div",{className:ae("text-xs mb-1",N.title),children:n}),d=r&&p.jsx("div",{className:ae("text-xs line-clamp-2",N.description,u?"mb-2":""),children:r}),e[0]=u,e[1]=r,e[2]=i,e[3]=n,e[4]=o,e[5]=l,e[6]=f,e[7]=d,e[8]=m,e[9]=h}else l=e[5],f=e[6],d=e[7],m=e[8],h=e[9];let g;e[10]!==u?(g=u&&p.jsx("div",{className:"flex gap-2",children:u}),e[10]=u,e[11]=g):g=e[11];let k;e[12]!==l||e[13]!==f||e[14]!==d||e[15]!==g?(k=p.jsxs("div",{className:l,children:[f,d,g]}),e[12]=l,e[13]=f,e[14]=d,e[15]=g,e[16]=k):k=e[16];let C;e[17]!==a?(C=a&&p.jsx("button",{type:"button",onClick:a,className:"text-muted-foreground hover:text-foreground transition-colors shrink-0",title:"Dismiss",children:p.jsx(ol,{size:14})}),e[17]=a,e[18]=C):C=e[18];let T;return e[19]!==m||e[20]!==h||e[21]!==k||e[22]!==C?(T=p.jsxs("div",{className:m,children:[h,k,C]}),e[19]=m,e[20]=h,e[21]=k,e[22]=C,e[23]=T):T=e[23],T}function Eb(t){const e=V.c(10),{branchContext:n,clearBranchContext:r,onGoToOriginalMessage:i,setInputValue:s}=t;if(!n)return null;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=p.jsx(ha,{size:14}),e[0]=a):a=e[0];let u;e[1]!==r||e[2]!==s?(u=()=>{r(),s("")},e[1]=r,e[2]=s,e[3]=u):u=e[3];let o;e[4]!==i?(o=p.jsx(Qe,{size:"sm",variant:"outline",onClick:i,className:"h-7 text-xs",children:"View original"}),e[4]=i,e[5]=o):o=e[5];let l;return e[6]!==n.originalMessageText||e[7]!==u||e[8]!==o?(l=p.jsx(Di,{variant:"default",title:"Editing message (click to view original)",description:n.originalMessageText,icon:a,onDismiss:u,children:o}),e[6]=n.originalMessageText,e[7]=u,e[8]=o,e[9]=l):l=e[9],l}function bb(t){const e=V.c(8),{error:n,onFixInChat:r,onDismiss:i}=t;if(!n)return null;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=p.jsx(aa,{size:16}),e[0]=s):s=e[0];let a;e[1]!==r?(a=p.jsx(Qe,{size:"sm",variant:"outline",onClick:r,className:"h-7 text-xs",children:"Fix in chat"}),e[1]=r,e[2]=a):a=e[2];let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=p.jsx(Qe,{size:"sm",variant:"outline",disabled:!0,className:"h-7 text-xs",children:"Report"}),e[3]=u):u=e[3];let o;return e[4]!==n.message||e[5]!==i||e[6]!==a?(o=p.jsxs(Di,{variant:"danger",title:"Error occurred",description:n.message,icon:s,onDismiss:i,children:[a,u]}),e[4]=n.message,e[5]=i,e[6]=a,e[7]=o):o=e[7],o}function Tb(t){const e=V.c(7),{finishReason:n,onContinue:r,onDismiss:i}=t;if(!n||n==="stop")return null;const a=xb(n);let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=p.jsx(ul,{size:16}),e[0]=u):u=e[0];let o;e[1]!==r?(o=p.jsx(Qe,{size:"sm",variant:"outline",onClick:r,className:"h-7 text-xs",children:"Continue"}),e[1]=r,e[2]=o):o=e[2];let l;return e[3]!==i||e[4]!==a||e[5]!==o?(l=p.jsx(Di,{variant:"warning",title:"Response incomplete",description:a,icon:u,onDismiss:i,children:o}),e[3]=i,e[4]=a,e[5]=o,e[6]=l):l=e[6],l}function xb(t){switch(t){case"length":return"Response reached the model's output limit. Different models have different limits. Try switching models or asking it to continue.";case"content-filter":return"Response was filtered due to content policy.";case"tool-calls":return"Response paused after tool execution to prevent infinite loops and save costs. Click continue to keep working.";default:return`Response stopped unexpectedly: ${t}`}}const Zb=Object.assign(fb,{Header:Object.assign(db,{Left:Uo,Right:jo}),Main:hb,Messages:pb,EmptyState:mb,Footer:gb,Input:Vl,BranchPreview:Eb,ErrorBanner:bb,FinishReasonWarning:Tb,Provider:$l});export{Zb as C,Rl as D,Kb as G,Xb as M,CE as R,Gb as T,OE as U,Pl as a,Ml as b,vl as c,Ll as d,Bl as e,ql as f,qb as g,XE as h,nb as i,$l as j,Vl as k,Ca as l,jl as m,Vb as n,Yb as o,Ta as p,Wb as q,Qb as r,Mi as u};
|
|
86
|
+
`))}function o(h,g,k,C){const T=k.enter("tableCell"),S=k.enter("phrasing"),N=k.containerPhrasing(h,{...C,before:s,after:s});return S(),T(),N}function l(h,g){return Mg(h,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function f(h,g,k){const C=h.children;let T=-1;const S=[],N=g.enter("table");for(;++T<C.length;)S[T]=d(C[T],g,k);return N(),S}function d(h,g,k){const C=h.children;let T=-1;const S=[],N=g.enter("tableRow");for(;++T<C.length;)S[T]=o(C[T],h,g,k);return N(),S}function m(h,g,k){let C=bo.inlineCode(h,g,k);return k.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function A2(){return{exit:{taskListCheckValueChecked:Qs,taskListCheckValueUnchecked:Qs,paragraph:C2}}}function k2(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:N2}}}function Qs(t){const e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function C2(t){const e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=e.children;let s=-1,a;for(;++s<i.length;){const u=i[s];if(u.type==="paragraph"){a=u;break}}a===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(t)}function N2(t,e,n,r){const i=t.children[0],s=typeof t.checked=="boolean"&&i&&i.type==="paragraph",a="["+(t.checked?"x":" ")+"] ",u=n.createTracker(r);s&&u.move(a);let o=bo.listItem(t,e,n,{...r,...u.current()});return s&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),o;function l(f){return f+a}}function S2(){return[ig(),Ng(),wg(),p2(),A2()]}function y2(t){return{extensions:[sg(),Sg(t),Lg(),_2(t),k2()]}}const I2={tokenize:P2,partial:!0},To={tokenize:M2,partial:!0},xo={tokenize:v2,partial:!0},_o={tokenize:B2,partial:!0},w2={tokenize:F2,partial:!0},Ao={name:"wwwAutolink",tokenize:O2,previous:Co},ko={name:"protocolAutolink",tokenize:D2,previous:No},ut={name:"emailAutolink",tokenize:R2,previous:So},tt={};function L2(){return{text:tt}}let gt=48;for(;gt<123;)tt[gt]=ut,gt++,gt===58?gt=65:gt===91&&(gt=97);tt[43]=ut;tt[45]=ut;tt[46]=ut;tt[95]=ut;tt[72]=[ut,ko];tt[104]=[ut,ko];tt[87]=[ut,Ao];tt[119]=[ut,Ao];function R2(t,e,n){const r=this;let i,s;return a;function a(d){return!jr(d)||!So.call(r,r.previous)||Si(r.events)?n(d):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),u(d))}function u(d){return jr(d)?(t.consume(d),u):d===64?(t.consume(d),o):n(d)}function o(d){return d===46?t.check(w2,f,l)(d):d===45||d===95||Re(d)?(s=!0,t.consume(d),o):f(d)}function l(d){return t.consume(d),i=!0,o}function f(d){return s&&i&&ve(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(d)):n(d)}}function O2(t,e,n){const r=this;return i;function i(a){return a!==87&&a!==119||!Co.call(r,r.previous)||Si(r.events)?n(a):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(I2,t.attempt(To,t.attempt(xo,s),n),n)(a))}function s(a){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(a)}}function D2(t,e,n){const r=this;let i="",s=!1;return a;function a(d){return(d===72||d===104)&&No.call(r,r.previous)&&!Si(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),t.consume(d),u):n(d)}function u(d){if(ve(d)&&i.length<5)return i+=String.fromCodePoint(d),t.consume(d),u;if(d===58){const m=i.toLowerCase();if(m==="http"||m==="https")return t.consume(d),o}return n(d)}function o(d){return d===47?(t.consume(d),s?l:(s=!0,o)):n(d)}function l(d){return d===null||Mn(d)||ge(d)||kt(d)||Wn(d)?n(d):t.attempt(To,t.attempt(xo,f),n)(d)}function f(d){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(d)}}function P2(t,e,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,t.consume(a),i):a===46&&r===3?(t.consume(a),s):n(a)}function s(a){return a===null?n(a):e(a)}}function M2(t,e,n){let r,i,s;return a;function a(l){return l===46||l===95?t.check(_o,o,u)(l):l===null||ge(l)||kt(l)||l!==45&&Wn(l)?o(l):(s=!0,t.consume(l),a)}function u(l){return l===95?r=!0:(i=r,r=void 0),t.consume(l),a}function o(l){return i||r||!s?n(l):e(l)}}function v2(t,e){let n=0,r=0;return i;function i(a){return a===40?(n++,t.consume(a),i):a===41&&r<n?s(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?t.check(_o,e,s)(a):a===null||ge(a)||kt(a)?e(a):(t.consume(a),i)}function s(a){return a===41&&r++,t.consume(a),i}}function B2(t,e,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(t.consume(u),r):u===38?(t.consume(u),s):u===93?(t.consume(u),i):u===60||u===null||ge(u)||kt(u)?e(u):n(u)}function i(u){return u===null||u===40||u===91||ge(u)||kt(u)?e(u):r(u)}function s(u){return ve(u)?a(u):n(u)}function a(u){return u===59?(t.consume(u),r):ve(u)?(t.consume(u),a):n(u)}}function F2(t,e,n){return r;function r(s){return t.consume(s),i}function i(s){return Re(s)?n(s):e(s)}}function Co(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||ge(t)}function No(t){return!ve(t)}function So(t){return!(t===47||jr(t))}function jr(t){return t===43||t===45||t===46||t===95||Re(t)}function Si(t){let e=t.length,n=!1;for(;e--;){const r=t[e][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return t.length>0&&!n&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const H2={tokenize:W2,partial:!0};function U2(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Y2,continuation:{tokenize:q2},exit:V2}},text:{91:{name:"gfmFootnoteCall",tokenize:$2},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:j2,resolveTo:z2}}}}function j2(t,e,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const o=r.events[i][1];if(o.type==="labelImage"){a=o;break}if(o.type==="gfmFootnoteCall"||o.type==="labelLink"||o.type==="label"||o.type==="image"||o.type==="link")break}return u;function u(o){if(!a||!a._balanced)return n(o);const l=Ge(r.sliceSerialize({start:a.end,end:r.now()}));return l.codePointAt(0)!==94||!s.includes(l.slice(1))?n(o):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(o),t.exit("gfmFootnoteCallLabelMarker"),e(o))}}function z2(t,e){let n=t.length;for(;n--;)if(t[n][1].type==="labelImage"&&t[n][0]==="enter"){t[n][1];break}t[n+1][1].type="data",t[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},t[n+3][1].start),end:Object.assign({},t[t.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},t[n+3][1].end),end:Object.assign({},t[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},t[t.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},u=[t[n+1],t[n+2],["enter",r,e],t[n+3],t[n+4],["enter",i,e],["exit",i,e],["enter",s,e],["enter",a,e],["exit",a,e],["exit",s,e],t[t.length-2],t[t.length-1],["exit",r,e]];return t.splice(n,t.length-n+1,...u),t}function $2(t,e,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,a;return u;function u(d){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(d),t.exit("gfmFootnoteCallLabelMarker"),o}function o(d){return d!==94?n(d):(t.enter("gfmFootnoteCallMarker"),t.consume(d),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",l)}function l(d){if(s>999||d===93&&!a||d===null||d===91||ge(d))return n(d);if(d===93){t.exit("chunkString");const m=t.exit("gfmFootnoteCallString");return i.includes(Ge(r.sliceSerialize(m)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(d),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):n(d)}return ge(d)||(a=!0),s++,t.consume(d),d===92?f:l}function f(d){return d===91||d===92||d===93?(t.consume(d),s++,l):l(d)}}function Y2(t,e,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,a=0,u;return o;function o(g){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(g),t.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(g){return g===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(g),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",f):n(g)}function f(g){if(a>999||g===93&&!u||g===null||g===91||ge(g))return n(g);if(g===93){t.exit("chunkString");const k=t.exit("gfmFootnoteDefinitionLabelString");return s=Ge(r.sliceSerialize(k)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(g),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),m}return ge(g)||(u=!0),a++,t.consume(g),g===92?d:f}function d(g){return g===91||g===92||g===93?(t.consume(g),a++,f):f(g)}function m(g){return g===58?(t.enter("definitionMarker"),t.consume(g),t.exit("definitionMarker"),i.includes(s)||i.push(s),oe(t,h,"gfmFootnoteDefinitionWhitespace")):n(g)}function h(g){return e(g)}}function q2(t,e,n){return t.check(bn,e,t.attempt(H2,e,n))}function V2(t){t.exit("gfmFootnoteDefinition")}function W2(t,e,n){const r=this;return oe(t,i,"gfmFootnoteDefinitionIndent",5);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?e(s):n(s)}}function G2(t){let n=(t||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,u){let o=-1;for(;++o<a.length;)if(a[o][0]==="enter"&&a[o][1].type==="strikethroughSequenceTemporary"&&a[o][1]._close){let l=o;for(;l--;)if(a[l][0]==="exit"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._open&&a[o][1].end.offset-a[o][1].start.offset===a[l][1].end.offset-a[l][1].start.offset){a[o][1].type="strikethroughSequence",a[l][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},a[l][1].start),end:Object.assign({},a[o][1].end)},d={type:"strikethroughText",start:Object.assign({},a[l][1].end),end:Object.assign({},a[o][1].start)},m=[["enter",f,u],["enter",a[l][1],u],["exit",a[l][1],u],["enter",d,u]],h=u.parser.constructs.insideSpan.null;h&&Ye(m,m.length,0,Gn(h,a.slice(l+1,o),u)),Ye(m,m.length,0,[["exit",d,u],["enter",a[o][1],u],["exit",a[o][1],u],["exit",f,u]]),Ye(a,l-1,o-l+3,m),o=l+m.length-2;break}}for(o=-1;++o<a.length;)a[o][1].type==="strikethroughSequenceTemporary"&&(a[o][1].type="data");return a}function s(a,u,o){const l=this.previous,f=this.events;let d=0;return m;function m(g){return l===126&&f[f.length-1][1].type!=="characterEscape"?o(g):(a.enter("strikethroughSequenceTemporary"),h(g))}function h(g){const k=Dt(l);if(g===126)return d>1?o(g):(a.consume(g),d++,h);if(d<2&&!n)return o(g);const C=a.exit("strikethroughSequenceTemporary"),T=Dt(g);return C._open=!T||T===2&&!!k,C._close=!k||k===2&&!!T,u(g)}}}class Q2{constructor(){this.map=[]}add(e,n,r){K2(this,e,n,r)}consume(e){if(this.map.sort(function(s,a){return s[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(e.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),e.length=this.map[n][0];r.push(e.slice()),e.length=0;let i=r.pop();for(;i;){for(const s of i)e.push(s);i=r.pop()}this.map.length=0}}function K2(t,e,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<t.map.length;){if(t.map[i][0]===e){t.map[i][1]+=n,t.map[i][2].push(...r);return}i+=1}t.map.push([e,n,r])}}function X2(t,e){let n=!1;const r=[];for(;e<t.length;){const i=t[e];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);e+=1}return r}function Z2(){return{flow:{null:{name:"table",tokenize:J2,resolveAll:eE}}}}function J2(t,e,n){const r=this;let i=0,s=0,a;return u;function u(I){let B=r.events.length-1;for(;B>-1;){const z=r.events[B][1].type;if(z==="lineEnding"||z==="linePrefix")B--;else break}const F=B>-1?r.events[B][1].type:null,G=F==="tableHead"||F==="tableRow"?y:o;return G===y&&r.parser.lazy[r.now().line]?n(I):G(I)}function o(I){return t.enter("tableHead"),t.enter("tableRow"),l(I)}function l(I){return I===124||(a=!0,s+=1),f(I)}function f(I){return I===null?n(I):Q(I)?s>1?(s=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(I),t.exit("lineEnding"),h):n(I):re(I)?oe(t,f,"whitespace")(I):(s+=1,a&&(a=!1,i+=1),I===124?(t.enter("tableCellDivider"),t.consume(I),t.exit("tableCellDivider"),a=!0,f):(t.enter("data"),d(I)))}function d(I){return I===null||I===124||ge(I)?(t.exit("data"),f(I)):(t.consume(I),I===92?m:d)}function m(I){return I===92||I===124?(t.consume(I),d):d(I)}function h(I){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(I):(t.enter("tableDelimiterRow"),a=!1,re(I)?oe(t,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):g(I))}function g(I){return I===45||I===58?C(I):I===124?(a=!0,t.enter("tableCellDivider"),t.consume(I),t.exit("tableCellDivider"),k):O(I)}function k(I){return re(I)?oe(t,C,"whitespace")(I):C(I)}function C(I){return I===58?(s+=1,a=!0,t.enter("tableDelimiterMarker"),t.consume(I),t.exit("tableDelimiterMarker"),T):I===45?(s+=1,T(I)):I===null||Q(I)?L(I):O(I)}function T(I){return I===45?(t.enter("tableDelimiterFiller"),S(I)):O(I)}function S(I){return I===45?(t.consume(I),S):I===58?(a=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(I),t.exit("tableDelimiterMarker"),N):(t.exit("tableDelimiterFiller"),N(I))}function N(I){return re(I)?oe(t,L,"whitespace")(I):L(I)}function L(I){return I===124?g(I):I===null||Q(I)?!a||i!==s?O(I):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(I)):O(I)}function O(I){return n(I)}function y(I){return t.enter("tableRow"),j(I)}function j(I){return I===124?(t.enter("tableCellDivider"),t.consume(I),t.exit("tableCellDivider"),j):I===null||Q(I)?(t.exit("tableRow"),e(I)):re(I)?oe(t,j,"whitespace")(I):(t.enter("data"),Y(I))}function Y(I){return I===null||I===124||ge(I)?(t.exit("data"),j(I)):(t.consume(I),I===92?q:Y)}function q(I){return I===92||I===124?(t.consume(I),Y):Y(I)}}function eE(t,e){let n=-1,r=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],u=!1,o=0,l,f,d;const m=new Q2;for(;++n<t.length;){const h=t[n],g=h[1];h[0]==="enter"?g.type==="tableHead"?(u=!1,o!==0&&(Ks(m,e,o,l,f),f=void 0,o=0),l={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},m.add(n,0,[["enter",l,e]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,d=void 0,s=[0,0,0,0],a=[0,n+1,0,0],u&&(u=!1,f={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},m.add(n,0,[["enter",f,e]])),i=g.type==="tableDelimiterRow"?2:f?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],d=yn(m,e,s,i,void 0,d),s=[0,0,0,0]),a[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(a[0]=a[1],d=yn(m,e,s,i,void 0,d)),s=a,a=[s[1],n,0,0])):g.type==="tableHead"?(u=!0,o=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(o=n,s[1]!==0?(a[0]=a[1],d=yn(m,e,s,i,n,d)):a[1]!==0&&(d=yn(m,e,a,i,n,d)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(a[3]=n)}for(o!==0&&Ks(m,e,o,l,f),m.consume(e.events),n=-1;++n<e.events.length;){const h=e.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=X2(e.events,n))}return t}function yn(t,e,n,r,i,s){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(s.end=Object.assign({},Lt(e.events,n[0])),t.add(n[0],0,[["exit",s,e]]));const o=Lt(e.events,n[1]);if(s={type:a,start:Object.assign({},o),end:Object.assign({},o)},t.add(n[1],0,[["enter",s,e]]),n[2]!==0){const l=Lt(e.events,n[2]),f=Lt(e.events,n[3]),d={type:u,start:Object.assign({},l),end:Object.assign({},f)};if(t.add(n[2],0,[["enter",d,e]]),r!==2){const m=e.events[n[2]],h=e.events[n[3]];if(m[1].end=Object.assign({},h[1].end),m[1].type="chunkText",m[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,k=n[3]-n[2]-1;t.add(g,k,[])}}t.add(n[3]+1,0,[["exit",d,e]])}return i!==void 0&&(s.end=Object.assign({},Lt(e.events,i)),t.add(i,0,[["exit",s,e]]),s=void 0),s}function Ks(t,e,n,r,i){const s=[],a=Lt(e.events,n);i&&(i.end=Object.assign({},a),s.push(["exit",i,e])),r.end=Object.assign({},a),s.push(["exit",r,e]),t.add(n+1,0,s)}function Lt(t,e){const n=t[e],r=n[0]==="enter"?"start":"end";return n[1][r]}const tE={name:"tasklistCheck",tokenize:rE};function nE(){return{text:{91:tE}}}function rE(t,e,n){const r=this;return i;function i(o){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(o):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(o),t.exit("taskListCheckMarker"),s)}function s(o){return ge(o)?(t.enter("taskListCheckValueUnchecked"),t.consume(o),t.exit("taskListCheckValueUnchecked"),a):o===88||o===120?(t.enter("taskListCheckValueChecked"),t.consume(o),t.exit("taskListCheckValueChecked"),a):n(o)}function a(o){return o===93?(t.enter("taskListCheckMarker"),t.consume(o),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),u):n(o)}function u(o){return Q(o)?e(o):re(o)?t.check({tokenize:iE},e,n)(o):n(o)}}function iE(t,e,n){return oe(t,r,"whitespace");function r(i){return i===null?n(i):e(i)}}function sE(t){return eu([L2(),U2(),G2(t),Z2(),nE()])}const aE={};function uE(t){const e=this,n=t||aE,r=e.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(sE(n)),s.push(S2()),a.push(y2(n))}const oE=U.lazy(()=>Wo(()=>import("./lazy-highlighter-Bva2qxQ8.js"),__vite__mapDeps([0,1,2])));function yo(){const t=V.c(3),[e,n]=U.useState(!1);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=async a=>{await navigator.clipboard.writeText(a),n(!0),setTimeout(()=>n(!1),2e3)},t[0]=r):r=t[0];const i=r;let s;return t[1]!==e?(s={handleCopy:i,copied:e},t[1]=e,t[2]=s):s=t[2],s}function lE(){const t=V.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=[85,70],t[0]=e):e=t[0];const n=e;let r;return t[1]===Symbol.for("react.memo_cache_sentinel")?(r=p.jsx("div",{className:"p-4 font-mono text-sm",style:{background:"#2d2d2d",borderRadius:"0 0 0.5rem 0.5rem",overflow:"auto",minHeight:"4rem"},children:n.map(cE)}),t[1]=r):r=t[1],r}function cE(t,e){return p.jsxs("div",{className:"flex gap-2 items-center my-1",children:[e>2&&e<7&&p.jsx("div",{className:"w-4 h-4 rounded-sm opacity-40 animate-pulse",style:{background:"rgba(128, 128, 128, 0.3)",animationDelay:`${e*.1}s`}}),e%4===0&&p.jsx("div",{className:"h-4 rounded animate-pulse",style:{width:"3rem",background:"rgba(128, 128, 128, 0.3)",animationDelay:`${e*.12}s`}}),e%3===1&&p.jsx("div",{className:"h-4 rounded animate-pulse",style:{width:"2.5rem",background:"rgba(128, 128, 128, 0.3)",animationDelay:`${e*.14}s`}}),p.jsx("div",{className:"h-4 rounded animate-pulse",style:{width:`${t}%`,background:"rgba(255, 255, 255, 0.1)",animationDelay:`${e*.1}s`}}),e%5===2&&p.jsx("div",{className:"h-4 rounded animate-pulse",style:{width:"4rem",background:"rgba(128, 128, 128, 0.3)",animationDelay:`${e*.16}s`}})]},e)}function fE(t){const e=V.c(12),n=U.useRef(null),{handleCopy:r,copied:i}=yo(),s=dE;let a;e[0]!==r?(a=async()=>{const m=s(n.current);await r(m)},e[0]=r,e[1]=a):a=e[1];const u=a;let o;e[2]!==i?(o=i?p.jsx(xt,{size:12}):p.jsx(Qr,{size:12}),e[2]=i,e[3]=o):o=e[3];let l;e[4]!==u||e[5]!==o?(l=p.jsx("div",{className:"flex justify-end items-center",children:p.jsxs(Qe,{variant:"ghost",onClick:u,"aria-label":"Copy as CSV",className:"text-muted-foreground hover:text-foreground h-6 text-[10px]",type:"button",children:["Copy as CSV",o]})}),e[4]=u,e[5]=o,e[6]=l):l=e[6];let f;e[7]!==t?(f=p.jsx("div",{className:"overflow-x-auto mb-4 rounded-lg border border-border",children:p.jsx("table",{ref:n,...t,className:"min-w-full border-collapse text-sm",children:t.children})}),e[7]=t,e[8]=f):f=e[8];let d;return e[9]!==l||e[10]!==f?(d=p.jsxs(p.Fragment,{children:[l,f]}),e[9]=l,e[10]=f,e[11]=d):d=e[11],d}function dE(t){return t?Array.from(t.querySelectorAll("tr")).map(hE).join(`
|
|
87
|
+
`):""}function hE(t){return Array.from(t.querySelectorAll("th,td")).map(mE).join(",")}function mE(t){let e=t.textContent||"";return e=e.replace(/"/g,'""'),e.search(/([",\n])/g)>=0&&(e=`"${e}"`),e}const pE=[uE],gE=[Zp],EE={p:t=>p.jsx("p",{...t,className:"leading-relaxed text-[15px] mb-2 last:mb-0"}),strong:t=>p.jsx("strong",{...t,className:"font-bold"}),em:t=>p.jsx("em",{...t,className:"italic"}),a:t=>p.jsx("a",{...t,target:"_blank",rel:"noopener noreferrer",className:"text-primary-dark hover:underline break-all font-medium"}),ul:t=>p.jsx("ul",{...t,className:"list-disc ml-6 my-4 space-y-2"}),ol:t=>p.jsx("ol",{...t,className:"list-decimal ml-6 my-4 space-y-2"}),li:t=>p.jsx("li",{...t,className:"leading-relaxed text-[15px]"}),code:t=>p.jsx("code",{...t,className:"px-1 py-0.5 bg-muted rounded text-[15px] font-mono break-all"}),pre:t=>p.jsx("pre",{...t,className:"flex w-full min-w-0 my-4 bg-muted rounded overflow-hidden",children:p.jsx("code",{className:"flex-1 min-w-0 p-4 text-[15px] font-mono whitespace-pre overflow-x-auto",children:t.children})}),table:t=>p.jsx(fE,{...t}),thead:t=>p.jsx("thead",{...t,className:"bg-muted",children:t.children}),tr:t=>p.jsx("tr",{...t,className:"even:bg-muted/50 border-b border-border last:border-0"}),th:t=>p.jsx("th",{...t,className:"px-4 py-2 text-left font-semibold text-muted-foreground border-b border-border"}),td:t=>p.jsx("td",{...t,className:"px-4 py-2 border-b border-border"})},Io=U.memo(t=>{const e=V.c(2),{content:n}=t;let r;return e[0]!==n?(r=p.jsx(vh,{remarkPlugins:pE,rehypePlugins:gE,components:EE,children:n}),e[0]=n,e[1]=r):r=e[1],r},(t,e)=>t.content===e.content);function bE(t){const e=V.c(20),{language:n,content:r}=t,{handleCopy:i,copied:s}=yo(),a=n||"text";let u;e[0]!==a?(u=p.jsx("span",{className:"text-xs font-mono uppercase text-muted-foreground tracking-widest select-none",children:a}),e[0]=a,e[1]=u):u=e[1];let o;e[2]!==r||e[3]!==i?(o=()=>i(r),e[2]=r,e[3]=i,e[4]=o):o=e[4];let l;e[5]!==s?(l=s?p.jsx(xt,{size:14}):p.jsx(Qr,{size:14}),e[5]=s,e[6]=l):l=e[6];let f;e[7]!==o||e[8]!==l?(f=p.jsx(Qe,{size:"icon",variant:"ghost",onClick:o,"aria-label":"Copy code",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:l}),e[7]=o,e[8]=l,e[9]=f):f=e[9];let d;e[10]!==u||e[11]!==f?(d=p.jsxs("div",{className:"flex items-center justify-between p-1 pl-4 bg-muted border-b border-border",children:[u,f]}),e[10]=u,e[11]=f,e[12]=d):d=e[12];let m;e[13]===Symbol.for("react.memo_cache_sentinel")?(m=p.jsx(lE,{}),e[13]=m):m=e[13];let h;e[14]!==r||e[15]!==n?(h=p.jsx(U.Suspense,{fallback:m,children:p.jsx(oE,{language:n,content:r})}),e[14]=r,e[15]=n,e[16]=h):h=e[16];let g;return e[17]!==d||e[18]!==h?(g=p.jsxs("div",{className:"my-4 rounded-lg bg-muted overflow-hidden border border-border grid min-w-0",children:[d,h]}),e[17]=d,e[18]=h,e[19]=g):g=e[19],g}Io.displayName="MemoizedMarkdownBlock";const yi=t=>{const e=V.c(7),{id:n,text:r}=t;let i;e[0]!==r?(i=de.lexer(r),e[0]=r,e[1]=i):i=e[1];const s=i;let a;if(e[2]!==s||e[3]!==n){let u;e[5]!==n?(u=(o,l)=>o.type==="code"?p.jsx(bE,{language:o.lang,content:o.text},`${n}-block_${l}`):p.jsx(Io,{content:o.raw},`${n}-block_${l}`),e[5]=n,e[6]=u):u=e[6],a=s.map(u),e[2]=s,e[3]=n,e[4]=a}else a=e[4];return a};yi.displayName="MemoizedMarkdown";function wo(t){const e=V.c(18),{id:n,part:r,copyable:i,extraActions:s,hasToolCallAfter:a}=t,u=i===void 0?!1:i,o=a===void 0?!1:a,{handleCopy:l}=Vl(),[f,d]=U.useState(!1);let m;e[0]!==l||e[1]!==r.text?(m=async()=>{await l(r.text),d(!0),setTimeout(()=>d(!1),2e3)},e[0]=l,e[1]=r.text,e[2]=m):m=e[2];const h=m,g=u&&s,k=g||s,C=!o&&"mb-2";let T;e[3]!==C?(T=ae("group/part relative",C),e[3]=C,e[4]=T):T=e[4];let S;e[5]!==n||e[6]!==r.text?(S=p.jsx(yi,{id:n,text:r.text}),e[5]=n,e[6]=r.text,e[7]=S):S=e[7];let N;e[8]!==s||e[9]!==h||e[10]!==f||e[11]!==k||e[12]!==g?(N=k&&p.jsx("div",{className:"flex w-full items-center text-xs text-muted-foreground opacity-0 pointer-events-none transition-all duration-200 group-hover/part:opacity-100 group-hover/part:pointer-events-auto mt-2",children:p.jsxs("div",{className:"flex items-center gap-1",children:[g&&p.jsx(Qe,{onClick:h,variant:"ghost",size:"sm",className:"text-muted-foreground hover:text-foreground size-6 whitespace-nowrap",children:f?p.jsx(xt,{size:12}):p.jsx(Qr,{size:12})}),s]})}),e[8]=s,e[9]=h,e[10]=f,e[11]=k,e[12]=g,e[13]=N):N=e[13];let L;return e[14]!==T||e[15]!==S||e[16]!==N?(L=p.jsxs("div",{className:T,children:[S,N]}),e[14]=T,e[15]=S,e[16]=N,e[17]=L):L=e[17],L}function TE(t){const e=V.c(4),{output:n}=t;let r;if(e[0]!==n){const a=JSON.stringify(n,null,2);r=a.length>2e3?a.slice(0,2e3)+"...[TRUNCATED]":a,e[0]=n,e[1]=r}else r=e[1];const i=r;let s;return e[2]!==i?(s=p.jsx("div",{className:"h-full",children:p.jsx(ca,{code:i,language:"json",height:"100%",readOnly:!0})}),e[2]=i,e[3]=s):s=e[3],s}var rr="Collapsible",[xE,Vb]=Go(rr),[_E,Ii]=xE(rr),Lo=U.forwardRef((t,e)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:s,onOpenChange:a,...u}=t,[o,l]=Qo({prop:r,defaultProp:i??!1,onChange:a,caller:rr});return p.jsx(_E,{scope:n,disabled:s,contentId:Ko(),open:o,onOpenToggle:U.useCallback(()=>l(f=>!f),[l]),children:p.jsx($r.div,{"data-state":Oi(o),"data-disabled":s?"":void 0,...u,ref:e})})});Lo.displayName=rr;var Ro="CollapsibleTrigger",wi=U.forwardRef((t,e)=>{const{__scopeCollapsible:n,...r}=t,i=Ii(Ro,n);return p.jsx($r.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":Oi(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:e,onClick:Zo(t.onClick,i.onOpenToggle)})});wi.displayName=Ro;var Li="CollapsibleContent",Ri=U.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=Ii(Li,t.__scopeCollapsible);return p.jsx(Xo,{present:n||i.open,children:({present:s})=>p.jsx(AE,{...r,ref:e,present:s})})});Ri.displayName=Li;var AE=U.forwardRef((t,e)=>{const{__scopeCollapsible:n,present:r,children:i,...s}=t,a=Ii(Li,n),[u,o]=U.useState(r),l=U.useRef(null),f=Jo(e,l),d=U.useRef(0),m=d.current,h=U.useRef(0),g=h.current,k=a.open||u,C=U.useRef(k),T=U.useRef(void 0);return U.useEffect(()=>{const S=requestAnimationFrame(()=>C.current=!1);return()=>cancelAnimationFrame(S)},[]),el(()=>{const S=l.current;if(S){T.current=T.current||{transitionDuration:S.style.transitionDuration,animationName:S.style.animationName},S.style.transitionDuration="0s",S.style.animationName="none";const N=S.getBoundingClientRect();d.current=N.height,h.current=N.width,C.current||(S.style.transitionDuration=T.current.transitionDuration,S.style.animationName=T.current.animationName),o(r)}},[a.open,r]),p.jsx($r.div,{"data-state":Oi(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!k,...s,ref:f,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...t.style},children:k&&i})});function Oi(t){return t?"open":"closed"}var kE=Lo,Wb=wi,Gb=Ri;function CE(t){const e=V.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=p.jsx(kE,{"data-slot":"collapsible",...n}),e[2]=n,e[3]=r):r=e[3],r}function NE(t){const e=V.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=p.jsx(wi,{"data-slot":"collapsible-trigger",...n}),e[2]=n,e[3]=r):r=e[3],r}function SE(t){const e=V.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=p.jsx(Ri,{"data-slot":"collapsible-content",...n}),e[2]=n,e[3]=r):r=e[3],r}function yE(t){return t.split(/[_-]/).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" ")}function Xs(t){const e=V.c(70),{part:n,isFirstInSequence:r,isLastInSequence:i,hasNextToolCall:s}=t,a=r===void 0?!1:r,u=i===void 0?!1:i,o=s===void 0?!1:s,{state:l}=n;let f;e[0]!==n?(f="toolName"in n?n.toolName:n.type.replace("tool-",""),e[0]=n,e[1]=f):f=e[1];const d=f;let m;e[2]!==d?(m=yE(d),e[2]=d,e[3]=m):m=e[3];const h=m,[g,k]=U.useState(!1),[C]=vl(),T=(l==="input-streaming"||l==="input-available"||l==="output-available")&&!!n.input,S=l==="output-available",N=l==="output-error";if(!C){const he=l==="input-streaming"||l==="input-available",ce=l==="output-available",ke=l==="output-error",Ee=a&&"mt-2",xe=u&&"mb-2";let me;e[4]!==Ee||e[5]!==xe?(me=ae("flex items-center gap-1.5 py-2 opacity-75 relative",Ee,xe),e[4]=Ee,e[5]=xe,e[6]=me):me=e[6];let Ae;e[7]===Symbol.for("react.memo_cache_sentinel")?(Ae=p.jsx(fa,{className:"size-4 text-muted-foreground shrink-0"}),e[7]=Ae):Ae=e[7];let Ie;e[8]!==o?(Ie=o&&p.jsx("div",{className:"absolute left-1/2 top-full w-px bg-border -translate-x-1/2",style:{height:"calc(100% + 1rem)"}}),e[8]=o,e[9]=Ie):Ie=e[9];let be;e[10]!==Ie?(be=p.jsxs("div",{className:"relative shrink-0 flex items-center",children:[Ae,Ie]}),e[10]=Ie,e[11]=be):be=e[11];let Pe;e[12]!==h||e[13]!==he?(Pe=he&&p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"text-muted-foreground shimmer",children:"Calling"})," ",p.jsxs("span",{className:"text-muted-foreground/75 shimmer",children:[h,"..."]})]}),e[12]=h,e[13]=he,e[14]=Pe):Pe=e[14];let Le;e[15]!==h||e[16]!==ce?(Le=ce&&p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"text-muted-foreground",children:"Called"})," ",p.jsx("span",{className:"text-muted-foreground/75",children:h})]}),e[15]=h,e[16]=ce,e[17]=Le):Le=e[17];let Fe;e[18]!==h||e[19]!==ke?(Fe=ke&&p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"text-destructive/90",children:"Error calling"})," ",p.jsx("span",{className:"text-destructive/75",children:h})]}),e[18]=h,e[19]=ke,e[20]=Fe):Fe=e[20];let ie;e[21]!==Pe||e[22]!==Le||e[23]!==Fe?(ie=p.jsxs("span",{className:"text-[15px]",children:[Pe,Le,Fe]}),e[21]=Pe,e[22]=Le,e[23]=Fe,e[24]=ie):ie=e[24];let we;return e[25]!==be||e[26]!==ie||e[27]!==me?(we=p.jsxs("div",{className:me,children:[be,ie]}),e[25]=be,e[26]=ie,e[27]=me,e[28]=we):we=e[28],we}let L;e[29]!==l?(L=l==="output-error"?p.jsx(aa,{className:"size-4 text-destructive shrink-0"}):p.jsx(fl,{className:ae("size-4 text-muted-foreground shrink-0",(l==="input-streaming"||l==="input-available")&&"shimmer")}),e[29]=l,e[30]=L):L=e[30];const O=l==="output-error"&&"text-destructive/90",y=(l==="input-streaming"||l==="input-available")&&"shimmer";let j;e[31]!==O||e[32]!==y?(j=ae("text-[15px] font-medium text-muted-foreground truncate",O,y),e[31]=O,e[32]=y,e[33]=j):j=e[33];const Y=l==="input-streaming"&&`Streaming ${d} arguments`,q=l==="input-available"&&`Calling ${d}`,I=l==="output-available"&&`Called ${d}`,B=l==="output-error"&&`Error calling ${d}`;let F;e[34]!==Y||e[35]!==q||e[36]!==I||e[37]!==B||e[38]!==j?(F=p.jsxs("span",{className:j,children:[Y,q,I,B]}),e[34]=Y,e[35]=q,e[36]=I,e[37]=B,e[38]=j,e[39]=F):F=e[39];let G;e[40]!==F||e[41]!==L?(G=p.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[L,F]}),e[40]=F,e[41]=L,e[42]=G):G=e[42];const z=g&&"rotate-90";let M;e[43]!==z?(M=ae("size-4 text-muted-foreground transition-transform duration-200",z),e[43]=z,e[44]=M):M=e[44];let W;e[45]!==M?(W=p.jsx("div",{className:"flex items-center gap-2 shrink-0",children:p.jsx(ua,{className:M})}),e[45]=M,e[46]=W):W=e[46];let K;e[47]!==G||e[48]!==W?(K=p.jsxs(NE,{className:"flex items-center gap-2 w-full cursor-pointer p-3 hover:bg-accent/50 transition-colors",children:[G,W]}),e[47]=G,e[48]=W,e[49]=K):K=e[49];let te;e[50]===Symbol.for("react.memo_cache_sentinel")?(te=p.jsx("div",{className:"w-4 relative shrink-0",children:p.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-0.25 bg-border"})}),e[50]=te):te=e[50];let J;e[51]!==n.input||e[52]!==T?(J=T&&p.jsxs("div",{className:"flex flex-col gap-0.5",children:[p.jsx("div",{className:"px-1 h-5 flex items-center",children:p.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Input"})}),p.jsx("div",{className:"border border-border rounded-lg p-2 h-full max-h-[200px]",children:p.jsx(ca,{code:JSON.stringify(n.input,null,2),language:"json",foldOnMount:!0,height:"100%",readOnly:!0})})]}),e[51]=n.input,e[52]=T,e[53]=J):J=e[53];let A;e[54]!==n.output||e[55]!==S?(A=S&&p.jsxs("div",{className:"flex flex-col gap-0.5",children:[p.jsx("div",{className:"px-1 h-5 flex items-center",children:p.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Output"})}),p.jsx("div",{className:"border border-border rounded-lg max-h-[200px] overflow-auto p-2 h-full",children:p.jsx(TE,{output:n.output})})]}),e[54]=n.output,e[55]=S,e[56]=A):A=e[56];let Z;e[57]!==n||e[58]!==N?(Z=N&&p.jsxs("div",{className:"flex flex-col gap-0.5",children:[p.jsx("div",{className:"px-1 h-5 flex items-center",children:p.jsx("span",{className:"text-xs font-medium text-destructive/90",children:"Error"})}),p.jsx("div",{className:"border border-destructive/20 rounded-lg max-h-[200px] overflow-auto p-2 bg-destructive/10",children:p.jsx("pre",{className:"text-xs font-mono text-destructive whitespace-pre-wrap wrap-break-word",children:"errorText"in n&&typeof n.errorText=="string"?n.errorText:"An unknown error occurred"})})]}),e[57]=n,e[58]=N,e[59]=Z):Z=e[59];let le;e[60]!==J||e[61]!==A||e[62]!==Z?(le=p.jsx(SE,{className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",children:p.jsxs("div",{className:"flex ml-[7px] px-3 pb-3",children:[te,p.jsxs("div",{className:"flex flex-col gap-4 flex-1 min-w-0 pt-2",children:[J,A,Z]})]})}),e[60]=J,e[61]=A,e[62]=Z,e[63]=le):le=e[63];let x;e[64]!==K||e[65]!==le?(x=p.jsxs("div",{className:"border border-border/75 rounded-lg flex flex-col bg-background w-full min-w-0 overflow-hidden",children:[K,le]}),e[64]=K,e[65]=le,e[66]=x):x=e[66];let ue;return e[67]!==g||e[68]!==x?(ue=p.jsx("div",{className:"flex flex-col my-4 w-full min-w-0",children:p.jsx(CE,{open:g,onOpenChange:k,children:x})}),e[67]=g,e[68]=x,e[69]=ue):ue=e[69],ue}const IE={openrouter:t=>{const e=t?.openrouter;return typeof e=="object"&&e!==null&&"usage"in e&&typeof e.usage=="object"&&e.usage!==null&&"cost"in e.usage&&typeof e.usage.cost=="number"?e.usage.cost:null}};function wE(t){if(!t?.providerMetadata)return null;for(const e of Object.values(IE)){const n=e(t.providerMetadata);if(n!==null)return n}return null}function LE(t){return t.reduce((e,n)=>{const r=n.metadata?.usage;return r?{inputTokens:e.inputTokens+(r.inputTokens??0),outputTokens:e.outputTokens+(r.outputTokens??0),totalTokens:e.totalTokens+(r.totalTokens??0),cost:e.cost+(wE(r)??0)}:e},{inputTokens:0,outputTokens:0,totalTokens:0,cost:0})}function RE(t){const e=V.c(38),{messages:n}=t;let r,i,s,a,u,o,l,f,d,m,h,g;if(e[0]!==n){g=Symbol.for("react.early_return_sentinel");e:{const L=LE(n);if(!L){g=null;break e}const{totalTokens:O,inputTokens:y,outputTokens:j,cost:Y}=L;if(s=Y,!O&&!y&&!j){g=null;break e}i=Vr;let q;e[13]===Symbol.for("react.memo_cache_sentinel")?(q=p.jsx(da,{size:12}),e[13]=q):q=e[13];const I=p.jsxs(Qe,{variant:"ghost",size:"sm",className:"text-muted-foreground hover:text-foreground pl-1! h-6 gap-1 whitespace-nowrap",children:[q,p.jsx("span",{className:"text-[10px] font-mono tabular-nums",children:O.toLocaleString()})]});e[14]!==I?(h=p.jsx(Wr,{asChild:!0,children:I}),e[14]=I,e[15]=h):h=e[15],r=Gr,d="top",m="font-mono text-[11px]",u="grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",e[16]===Symbol.for("react.memo_cache_sentinel")?(o=p.jsx("span",{className:"text-muted",children:"in"}),e[16]=o):o=e[16],l=p.jsx("span",{children:y.toLocaleString()}),e[17]===Symbol.for("react.memo_cache_sentinel")?(f=p.jsx("span",{className:"text-muted",children:"out"}),e[17]=f):f=e[17],a=j.toLocaleString()}e[0]=n,e[1]=r,e[2]=i,e[3]=s,e[4]=a,e[5]=u,e[6]=o,e[7]=l,e[8]=f,e[9]=d,e[10]=m,e[11]=h,e[12]=g}else r=e[1],i=e[2],s=e[3],a=e[4],u=e[5],o=e[6],l=e[7],f=e[8],d=e[9],m=e[10],h=e[11],g=e[12];if(g!==Symbol.for("react.early_return_sentinel"))return g;let k;e[18]!==a?(k=p.jsx("span",{children:a}),e[18]=a,e[19]=k):k=e[19];let C;e[20]!==s?(C=s>0&&p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"text-muted",children:"cost"}),p.jsxs("span",{children:["$",s.toFixed(4)]})]}),e[20]=s,e[21]=C):C=e[21];let T;e[22]!==k||e[23]!==C||e[24]!==u||e[25]!==o||e[26]!==l||e[27]!==f?(T=p.jsxs("div",{className:u,children:[o,l,f,k,C]}),e[22]=k,e[23]=C,e[24]=u,e[25]=o,e[26]=l,e[27]=f,e[28]=T):T=e[28];let S;e[29]!==r||e[30]!==T||e[31]!==d||e[32]!==m?(S=p.jsx(r,{side:d,className:m,children:T}),e[29]=r,e[30]=T,e[31]=d,e[32]=m,e[33]=S):S=e[33];let N;return e[34]!==i||e[35]!==S||e[36]!==h?(N=p.jsxs(i,{children:[h,S]}),e[34]=i,e[35]=S,e[36]=h,e[37]=N):N=e[37],N}const OE={planning:{icon:p.jsx(xa,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:"Planning next moves"},thinking:{icon:p.jsx(jn,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:"Thinking"}},DE=1200;function PE(){const t=V.c(7),[e,n]=U.useState("planning");let r,i;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>{const o=setTimeout(()=>{n("thinking")},DE);return()=>{clearTimeout(o)}},i=[],t[0]=r,t[1]=i):(r=t[0],i=t[1]),U.useEffect(r,i);const s=OE[e];let a;t[2]!==s.label?(a=p.jsxs("span",{className:"text-[15px] text-muted-foreground shimmer",children:[s.label,"..."]}),t[2]=s.label,t[3]=a):a=t[3];let u;return t[4]!==s.icon||t[5]!==a?(u=p.jsx("div",{className:"flex items-center gap-1.5 py-2 opacity-60",children:p.jsxs("span",{className:"flex items-center gap-1.5",children:[s.icon,a]})}),t[4]=s.icon,t[5]=a,t[6]=u):u=t[6],u}function ME(t){const e=V.c(10),{duration:n,parts:r,id:i}=t,s=n/1e3;let a;e[0]!==s?(a=s.toFixed(1),e[0]=s,e[1]=a):a=e[1];const u=a,[o,l]=U.useState(!1),[f,d]=U.useState(!1);let m;if(e[2]!==i||e[3]!==f||e[4]!==o||e[5]!==r||e[6]!==u){const h=r.filter(BE),g=h.some(vE),k=g||f;let C,T;e[8]===Symbol.for("react.memo_cache_sentinel")?(C=()=>l(!0),T=()=>l(!1),e[8]=C,e[9]=T):(C=e[8],T=e[9]),m=p.jsxs("div",{className:"flex flex-col mb-2",children:[p.jsx("button",{type:"button",onClick:()=>!g&&d(!f),onMouseEnter:C,onMouseLeave:T,className:ae("flex items-center gap-1.5 py-2 opacity-60 transition-opacity",!g&&"cursor-pointer hover:opacity-100",g&&"cursor-default"),children:p.jsxs("span",{className:"flex items-center gap-1.5",children:[g?p.jsx(jn,{className:"text-muted-foreground shrink-0 shimmer",size:14}):o?p.jsx(ua,{className:ae("text-muted-foreground transition-transform shrink-0",f&&"rotate-90"),size:14}):p.jsx(Ea,{className:"text-muted-foreground shrink-0",size:14}),p.jsx("span",{className:ae("text-[15px] text-muted-foreground",g&&"shimmer"),children:g?"Thinking...":`Thought for ${u}s`})]})}),k&&p.jsx("div",{className:"ml-[6px] border-l-2 pl-4 mt-1 mb-2 max-h-[300px] overflow-y-auto",children:h.map((S,N)=>p.jsx("div",{className:"text-muted-foreground markdown-sm pb-2",children:p.jsx(yi,{id:`${i}-reasoning-${N}`,text:S.text})},`${i}-reasoning-${N}`))})]}),e[2]=i,e[3]=f,e[4]=o,e[5]=r,e[6]=u,e[7]=m}else m=e[7];return m}function vE(t){return t.state==="streaming"}function BE(t){return t.type==="reasoning"}function FE(t){const e=V.c(17),{part:n,id:r,usageStats:i,isFollowedByToolCall:s,isFirstToolCallInSequence:a,isLastToolCallInSequence:u,hasNextToolCall:o}=t;switch(n.type){case"dynamic-tool":{let l;return e[0]!==o||e[1]!==r||e[2]!==a||e[3]!==u||e[4]!==n?(l=p.jsx(Xs,{part:n,id:r,isFirstInSequence:a,isLastInSequence:u,hasNextToolCall:o}),e[0]=o,e[1]=r,e[2]=a,e[3]=u,e[4]=n,e[5]=l):l=e[5],l}case"text":{let l;return e[6]!==r||e[7]!==s||e[8]!==n||e[9]!==i?(l=p.jsx(wo,{id:r,part:n,extraActions:i,copyable:!0,hasToolCallAfter:s}),e[6]=r,e[7]=s,e[8]=n,e[9]=i,e[10]=l):l=e[10],l}case"reasoning":return null;case"step-start":case"file":case"source-url":case"source-document":return null;default:if(n.type.startsWith("tool-")){const l=n;let f;return e[11]!==o||e[12]!==r||e[13]!==a||e[14]!==u||e[15]!==l?(f=p.jsx(Xs,{part:l,id:r,isFirstInSequence:a,isLastInSequence:u,hasNextToolCall:o}),e[11]=o,e[12]=r,e[13]=a,e[14]=u,e[15]=l,e[16]=f):f=e[16],f}}throw new Error(`Unknown part type: ${n.type}`)}function HE(t){const e=V.c(32),{message:n,status:r,className:i}=t,{id:s,parts:a}=n,l=r==="streaming"||r==="submitted",f=U.useRef(null);let d;e[0]!==s?(d=()=>{const z=localStorage.getItem(`msg-duration-${s}`);return z?Number(z):null},e[0]=s,e[1]=d):d=e[1];const[m,h]=U.useState(d);let g,k;e[2]!==l?(g=()=>{l&&f.current===null&&(f.current=Date.now())},k=[l],e[2]=l,e[3]=g,e[4]=k):(g=e[3],k=e[4]),U.useEffect(g,k);let C,T;e[5]!==m||e[6]!==s||e[7]!==a.length?(C=()=>{if(a.length>0&&m===null&&f.current!==null){const z=Date.now()-f.current;h(z),localStorage.setItem(`msg-duration-${s}`,z.toString())}},T=[a.length,m,s],e[5]=m,e[6]=s,e[7]=a.length,e[8]=C,e[9]=T):(C=e[8],T=e[9]),U.useEffect(C,T);const S=a.length>0;let N;e[10]!==a?(N=a.some(jE),e[10]=a,e[11]=N):N=e[11];const L=N;let O;e[12]!==l||e[13]!==a?(O=l&&a.some(UE),e[12]=l,e[13]=a,e[14]=O):O=e[14];const j=S&&(L||O)&&m!==null;let Y;e[15]!==n?(Y=p.jsx(RE,{messages:[n]}),e[15]=n,e[16]=Y):Y=e[16];const q=Y;let I;e[17]!==i?(I=ae("w-full min-w-0 group relative flex items-start gap-4 px-4 z-20 text-foreground flex-row",i),e[17]=i,e[18]=I):I=e[18];let B;e[19]!==m||e[20]!==S||e[21]!==s||e[22]!==l||e[23]!==a||e[24]!==j||e[25]!==q?(B=S?p.jsxs(p.Fragment,{children:[j&&p.jsx(ME,{duration:m,parts:a,id:s}),a.map((z,M)=>{const W=a[M+1],K=a[M-1],te=W&&(W.type==="dynamic-tool"||W.type.startsWith("tool-")),J=z.type==="dynamic-tool"||z.type.startsWith("tool-"),A=K&&(K.type==="dynamic-tool"||K.type.startsWith("tool-")),Z=W&&(W.type==="dynamic-tool"||W.type.startsWith("tool-")),le=J&&!A,x=J&&!Z,ue=J&&Z;return p.jsx(FE,{part:z,id:s,usageStats:M===a.length-1?q:void 0,isFollowedByToolCall:te,isFirstToolCallInSequence:le,isLastToolCallInSequence:x,hasNextToolCall:ue},`${s}-${M}`)})]}):l?p.jsx(PE,{}):null,e[19]=m,e[20]=S,e[21]=s,e[22]=l,e[23]=a,e[24]=j,e[25]=q,e[26]=B):B=e[26];let F;e[27]!==B?(F=p.jsx("div",{className:"flex flex-col min-w-0 w-full items-start",children:p.jsx("div",{className:"w-full min-w-0 not-only:rounded-2xl text-[15px] wrap-break-word overflow-wrap-anywhere bg-transparent",children:B})}),e[27]=B,e[28]=F):F=e[28];let G;return e[29]!==F||e[30]!==I?(G=p.jsx("div",{className:I,children:F}),e[29]=F,e[30]=I,e[31]=G):G=e[31],G}function UE(t){return t.type==="reasoning"&&t.state==="streaming"}function jE(t){return t.type==="reasoning"}const Oo=U.createContext(null);function Do(t){const e=V.c(2),{children:n}=t;let r;return e[0]!==n?(r=p.jsx(p.Fragment,{children:n}),e[0]=n,e[1]=r):r=e[1],r}function zE(t){const e=[];for(let n=0;n<t.length;n++){const r=t[n];if(!U.isValidElement(r))continue;if(r.props?.message?.role==="assistant"){const s=t[n-1],a=U.isValidElement(s)&&s.props?.message?.role,u=s&&U.isValidElement(s)&&a==="user"?s:null;e.push({user:u,assistant:r})}}return e}function $E(t){const e=V.c(27),{children:n,className:r,minHeightOffset:i}=t,s=U.useRef(null);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=[],e[0]=a):a=e[0];const u=U.useRef(a);let o,l,f,d,m,h,g;if(e[1]!==n||e[2]!==r||e[3]!==i){const S=U.Children.toArray(n),N=S[S.length-1];l=N&&U.isValidElement(N)&&N.type===Do?N:null;const L=l?S.slice(0,-1):S,O=zE(L);let y;e[11]===Symbol.for("react.memo_cache_sentinel")?(y=Y=>{const q=u.current[Y];if(q&&s.current){const I=s.current.offsetTop,B=q.offsetTop;s.current.scrollTo({top:B-I,behavior:"smooth"})}},e[11]=y):y=e[11];const j=y;o=Oo.Provider,e[12]===Symbol.for("react.memo_cache_sentinel")?(g={scrollToPair:j},e[12]=g):g=e[12],m=s,e[13]!==r?(h=ae("w-full min-w-0 max-w-full overflow-y-auto h-full overflow-x-hidden",r),e[13]=r,e[14]=h):h=e[14],f="flex flex-col min-w-0 max-w-2xl mx-auto w-full",d=O.map((Y,q)=>{const I=q===O.length-1;return p.jsxs("div",{ref:B=>{u.current[q]=B},className:"flex flex-col pb-2",style:I&&i?{minHeight:`calc(100vh - ${i}px)`}:void 0,children:[p.jsx("div",{className:"sticky top-0 z-50 bg-background w-full h-4"}),p.jsx("div",{className:"sticky mb-3 top-4 z-50",children:Y.user&&U.isValidElement(Y.user)?U.cloneElement(Y.user,{pairIndex:q}):Y.user}),Y.assistant]},q)}),e[1]=n,e[2]=r,e[3]=i,e[4]=o,e[5]=l,e[6]=f,e[7]=d,e[8]=m,e[9]=h,e[10]=g}else o=e[4],l=e[5],f=e[6],d=e[7],m=e[8],h=e[9],g=e[10];let k;e[15]!==l||e[16]!==f||e[17]!==d?(k=p.jsxs("div",{className:f,children:[d,l]}),e[15]=l,e[16]=f,e[17]=d,e[18]=k):k=e[18];let C;e[19]!==m||e[20]!==h||e[21]!==k?(C=p.jsx("div",{ref:m,className:h,children:k}),e[19]=m,e[20]=h,e[21]=k,e[22]=C):C=e[22];let T;return e[23]!==o||e[24]!==g||e[25]!==C?(T=p.jsx(o,{value:g,children:C}),e[23]=o,e[24]=g,e[25]=C,e[26]=T):T=e[26],T}function YE(t){const e=V.c(5),{locator:n}=Bt(),r=Ul(),i=Ca();let s;return e[0]!==n||e[1]!==r||e[2]!==t||e[3]!==i?(s=async(u,o,l)=>{const f=await ka(n,l),d=f.findIndex(C=>C.id===u);if(d===-1){console.warn(`[branch] Message ${u} not found in thread ${l}`);return}const m=f.slice(0,d).filter(qE),h=crypto.randomUUID(),g=new Date().toISOString(),k={id:h,title:"",created_at:g,updated_at:g,hidden:!1};if(await i.insert.mutateAsync(k),m.length>0){const C=m.map(T=>({...T,id:crypto.randomUUID(),metadata:{...T.metadata,thread_id:h,created_at:T.metadata?.created_at||g}}));await r.insertMany.mutateAsync(C)}t(h)},e[0]=n,e[1]=r,e[2]=t,e[3]=i,e[4]=s):s=e[4],s}function qE(t){return t.role!=="system"}function VE(t){const e=V.c(18),{messageId:n,parts:r}=t,[i,s]=U.useState(!1),{setInputValue:a,startBranch:u,setActiveThreadId:o,activeThreadId:l}=Yl(),f=YE(o);let d;e[0]!==r?(d=r.filter(GE).map(WE).join(`
|
|
88
|
+
`),e[0]=r,e[1]=d):d=e[1];const m=d;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=y=>{y.stopPropagation(),s(!0)},e[2]=h):h=e[2];const g=h;let k;e[3]!==l||e[4]!==f||e[5]!==n||e[6]!==m||e[7]!==a||e[8]!==u?(k=async()=>{await f(n,m,l),a(m),u({originalThreadId:l,originalMessageId:n,originalMessageText:m}),s(!1)},e[3]=l,e[4]=f,e[5]=n,e[6]=m,e[7]=a,e[8]=u,e[9]=k):k=e[9];const C=k;let T;e[10]===Symbol.for("react.memo_cache_sentinel")?(T=p.jsx("div",{className:"flex justify-center items-end px-2 pb-1",children:p.jsxs(Vr,{children:[p.jsx(Wr,{asChild:!0,children:p.jsx(Qe,{onClick:g,variant:"ghost",size:"xs",className:"opacity-0 group-hover:opacity-100 hover:bg-gray-200/70 rounded-md transition-opacity text-muted-foreground hover:text-foreground aspect-square w-6 h-6 p-0",children:p.jsx(pa,{size:16,className:"p-0.5"})})}),p.jsx(Gr,{side:"bottom",children:"Edit message"})]})}),e[10]=T):T=e[10];let S;e[11]===Symbol.for("react.memo_cache_sentinel")?(S=p.jsxs(dl,{children:[p.jsx(hl,{children:"Edit message?"}),p.jsx(ml,{children:"This will create a new conversation branch from this point. The original conversation will remain unchanged."})]}),e[11]=S):S=e[11];let N;e[12]===Symbol.for("react.memo_cache_sentinel")?(N=p.jsx(pl,{children:"Cancel"}),e[12]=N):N=e[12];let L;e[13]!==C?(L=p.jsxs(gl,{children:[S,p.jsxs(El,{children:[N,p.jsx(bl,{onClick:C,children:"Confirm"})]})]}),e[13]=C,e[14]=L):L=e[14];let O;return e[15]!==i||e[16]!==L?(O=p.jsxs(p.Fragment,{children:[T,p.jsx(Tl,{open:i,onOpenChange:s,children:L})]}),e[15]=i,e[16]=L,e[17]=O):O=e[17],O}function WE(t){return t.text}function GE(t){return t.type==="text"}function QE(t){const e=V.c(29),{message:n,className:r,pairIndex:i}=t,{id:s,parts:a}=n,u=U.useContext(Oo),[o,l]=U.useState(!1);if(!a||a.length===0)return null;let f;e[0]!==u||e[1]!==i?(f=()=>{l(!0),i!==void 0&&u?.scrollToPair(i)},e[0]=u,e[1]=i,e[2]=f):f=e[2];const d=f;let m;e[3]!==r?(m=ae("message-block w-full min-w-0 group relative flex items-start gap-4 px-2.5 text-foreground flex-row-reverse",r),e[3]=r,e[4]=m):m=e[4];let h,g;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=()=>l(!0),g=()=>l(!1),e[5]=h,e[6]=g):(h=e[5],g=e[6]);const k=o?"overflow-auto opacity-100":"overflow-hidden opacity-99 mask-b-from-1%";let C;e[7]!==k?(C=ae("z-10 px-4 py-2 transition-opacity max-h-[120px] flex-1",k),e[7]=k,e[8]=C):C=e[8];let T;if(e[9]!==s||e[10]!==a){let j;e[12]!==s?(j=(Y,q)=>Y.type==="text"?p.jsx(wo,{id:s,part:Y},`${s}-${q}`):null,e[12]=s,e[13]=j):j=e[13],T=a.map(j),e[9]=s,e[10]=a,e[11]=T}else T=e[11];let S;e[14]!==T?(S=p.jsx("div",{children:T}),e[14]=T,e[15]=S):S=e[15];let N;e[16]!==C||e[17]!==S?(N=p.jsx("div",{className:C,children:S}),e[16]=C,e[17]=S,e[18]=N):N=e[18];let L;e[19]!==s||e[20]!==a?(L=p.jsx(VE,{messageId:s,parts:a}),e[19]=s,e[20]=a,e[21]=L):L=e[21];let O;e[22]!==d||e[23]!==L||e[24]!==N?(O=p.jsxs("div",{tabIndex:0,onClick:d,onFocus:h,onBlur:g,className:"w-full border min-w-0 shadow-xs rounded-lg text-[0.9375rem] wrap-break-word overflow-wrap-anywhere bg-background cursor-pointer transition-colors relative flex outline-none",children:[N,L]}),e[22]=d,e[23]=L,e[24]=N,e[25]=O):O=e[25];let y;return e[26]!==O||e[27]!==m?(y=p.jsx(p.Fragment,{children:p.jsx("div",{className:m,children:O})}),e[26]=O,e[27]=m,e[28]=y):y=e[28],y}const Po=U.createContext({isMobile:!1,setValue:()=>{}}),Di=()=>U.useContext(Po),Mo=t=>{const e=V.c(37);let n,r,i,s,a,u,o,l;e[0]!==t?({children:n,defaultOpen:r,open:u,onOpenChange:s,defaultValue:i,value:l,onValueChange:a,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=s,e[5]=a,e[6]=u,e[7]=o,e[8]=l):(n=e[1],r=e[2],i=e[3],s=e[4],a=e[5],u=e[6],o=e[7],l=e[8]);const f=Cl(),d=r??!1;let m;e[9]!==s||e[10]!==u||e[11]!==d?(m={prop:u,defaultProp:d,onChange:s},e[9]=s,e[10]=u,e[11]=d,e[12]=m):m=e[12];const[h,g]=vi(m);let k;e[13]!==i||e[14]!==a||e[15]!==l?(k={prop:l,defaultProp:i,onChange:a},e[13]=i,e[14]=a,e[15]=l,e[16]=k):k=e[16];const[C,T]=vi(k);let S;e[17]!==T?(S=Y=>{Y&&T(Y)},e[17]=T,e[18]=S):S=e[18];const N=S;let L;e[19]!==f||e[20]!==N?(L={isMobile:f,setValue:N},e[19]=f,e[20]=N,e[21]=L):L=e[21];let O;e[22]!==n||e[23]!==h||e[24]!==o||e[25]!==g?(O=p.jsx(wl,{open:h,onOpenChange:g,...o,children:n}),e[22]=n,e[23]=h,e[24]=o,e[25]=g,e[26]=O):O=e[26];let y;e[27]!==h||e[28]!==o||e[29]!==g||e[30]!==N||e[31]!==O||e[32]!==C?(y=p.jsx(kl,{open:h,onOpenChange:g,value:C,onValueChange:N,...o,children:O}),e[27]=h,e[28]=o,e[29]=g,e[30]=N,e[31]=O,e[32]=C,e[33]=y):y=e[33];let j;return e[34]!==L||e[35]!==y?(j=p.jsx(Po.Provider,{value:L,children:y}),e[34]=L,e[35]=y,e[36]=j):j=e[36],j},vo=t=>{const{children:e,title:n,headerActions:r,...i}=t,{isMobile:s}=Di(),{className:a,...u}=i;return s?p.jsxs(Dl,{...u,children:[p.jsxs(Pl,{className:ae(r?"flex flex-row items-center justify-between":"hidden"),children:[p.jsx(Ml,{children:n}),r]}),p.jsx("div",{className:ae("flex flex-col gap-2 p-2 py-4",a),children:e})]}):p.jsx(Al,{...i,children:e})},Bo=t=>{const e=V.c(7);let n,r;e[0]!==t?({children:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);const{isMobile:i}=Di();let s;return e[3]!==n||e[4]!==i||e[5]!==r?(s=i?p.jsx(Ll,{asChild:!0,children:p.jsx(Qe,{variant:"outline",...r,children:n})}):p.jsx(_l,{...r,children:n}),e[3]=n,e[4]=i,e[5]=r,e[6]=s):s=e[6],s},Fo=t=>{const e=V.c(7);let n,r;e[0]!==t?({children:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);const{isMobile:i}=Di();let s;return e[3]!==n||e[4]!==i||e[5]!==r?(s=i?p.jsx("span",{...r,children:n}):p.jsx(xl,{...r,children:n}),e[3]=n,e[4]=i,e[5]=r,e[6]=s):s=e[6],s};function KE(){const t=V.c(4),e=tl();let n;t[0]!==e?(n=e??[],t[0]=e,t[1]=n):n=t[1];let r;return t[2]!==n?(r=n.map(XE),t[2]=n,t[3]=r):r=t[3],r}function XE(t){return{id:t.id,title:t.title,description:t.description??null,icon:t.icon??null,fallbackIcon:p.jsx(Yr,{})}}function ZE(t){const e=V.c(24),{gateway:n,isSelected:r}=t,i=r&&"bg-accent";let s;e[0]!==i?(s=ae("flex items-start gap-3 py-3 px-3 hover:bg-accent cursor-pointer rounded-lg",i),e[0]=i,e[1]=s):s=e[1];let a;e[2]!==n.fallbackIcon?(a=n.fallbackIcon??p.jsx(Yr,{}),e[2]=n.fallbackIcon,e[3]=a):a=e[3];let u;e[4]!==n.icon||e[5]!==n.title||e[6]!==a?(u=p.jsx(ia,{icon:n.icon,name:n.title,size:"sm",fallbackIcon:a,className:"size-10"}),e[4]=n.icon,e[5]=n.title,e[6]=a,e[7]=u):u=e[7];let o;e[8]!==n.title?(o=p.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:n.title}),e[8]=n.title,e[9]=o):o=e[9];let l;e[10]!==r?(l=r&&p.jsx(xt,{size:16,className:"text-foreground shrink-0"}),e[10]=r,e[11]=l):l=e[11];let f;e[12]!==o||e[13]!==l?(f=p.jsxs("div",{className:"flex items-center justify-between",children:[o,l]}),e[12]=o,e[13]=l,e[14]=f):f=e[14];let d;e[15]!==n.description?(d=n.description&&p.jsx("p",{className:"text-xs text-muted-foreground line-clamp-1 leading-relaxed",children:n.description}),e[15]=n.description,e[16]=d):d=e[16];let m;e[17]!==f||e[18]!==d?(m=p.jsxs("div",{className:"flex flex-col flex-1 min-w-0 gap-0.5",children:[f,d]}),e[17]=f,e[18]=d,e[19]=m):m=e[19];let h;return e[20]!==s||e[21]!==u||e[22]!==m?(h=p.jsxs("div",{className:s,children:[u,m]}),e[20]=s,e[21]=u,e[22]=m,e[23]=h):h=e[23],h}function JE(t){const e=V.c(12),{gateway:n}=t;if(!n){let u;return e[0]===Symbol.for("react.memo_cache_sentinel")?(u=p.jsx("span",{className:"text-sm text-muted-foreground",children:"Select agent"}),e[0]=u):u=e[0],u}let r;e[1]!==n.fallbackIcon?(r=n.fallbackIcon??p.jsx(Yr,{}),e[1]=n.fallbackIcon,e[2]=r):r=e[2];let i;e[3]!==n.icon||e[4]!==n.title||e[5]!==r?(i=p.jsx(ia,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:r,className:"w-5! h-5! min-w-5! shrink-0 rounded-sm"}),e[3]=n.icon,e[4]=n.title,e[5]=r,e[6]=i):i=e[6];let s;e[7]!==n.title?(s=p.jsx("span",{className:"text-sm text-muted-foreground group-hover:text-foreground transition-colors truncate min-w-0 max-w-[200px] hidden sm:inline-block",children:n.title}),e[7]=n.title,e[8]=s):s=e[8];let a;return e[9]!==i||e[10]!==s?(a=p.jsxs("div",{className:"flex items-center gap-2 min-w-0 max-w-full",children:[i,s]}),e[9]=i,e[10]=s,e[11]=a):a=e[11],a}function Qb(t){const e=V.c(47),{selectedGatewayId:n,onGatewayChange:r,variant:i,className:s,placeholder:a}=t,u=i===void 0?"bordered":i,o=a===void 0?"Select Agent":a,[l,f]=U.useState(!1),[d,m]=U.useState(""),h=U.useRef(null),g=KE();let k,C;e[0]!==l?(k=()=>{l&&setTimeout(()=>{h.current?.focus()},0)},C=[l],e[0]=l,e[1]=k,e[2]=C):(k=e[1],C=e[2]),U.useEffect(k,C);let T;if(e[3]!==g||e[4]!==n){let x;e[6]!==n?(x=ue=>ue.id===n,e[6]=n,e[7]=x):x=e[7],T=g.find(x),e[3]=g,e[4]=n,e[5]=T}else T=e[5];const S=T;let N;e:{if(!d.trim()){N=g;break e}let x;if(e[8]!==g||e[9]!==d){const ue=d.toLowerCase();x=g.filter(he=>he.title.toLowerCase().includes(ue)||he.description?.toLowerCase().includes(ue)),e[8]=g,e[9]=d,e[10]=x}else x=e[10];N=x}const L=N;let O;e[11]!==r?(O=x=>{r(x),m(""),f(!1)},e[11]=r,e[12]=O):O=e[12];const y=O;let j;e[13]===Symbol.for("react.memo_cache_sentinel")?(j=x=>{f(x),x||m("")},e[13]=j):j=e[13];const Y=j,q=n||"",I=u==="borderless"&&"border-0 md:border-none";let B;e[14]!==s||e[15]!==I?(B=ae("text-sm hover:bg-accent rounded-lg py-0.5 px-1 gap-1 shadow-none cursor-pointer group focus-visible:ring-0 focus-visible:ring-offset-0 min-w-0 max-w-full",I,s),e[14]=s,e[15]=I,e[16]=B):B=e[16];let F;e[17]!==S?(F=p.jsx(JE,{gateway:S}),e[17]=S,e[18]=F):F=e[18];let G;e[19]!==o||e[20]!==F?(G=p.jsx(Fo,{placeholder:o,className:"min-w-0 max-w-full",children:F}),e[19]=o,e[20]=F,e[21]=G):G=e[21];let z;e[22]!==B||e[23]!==G?(z=p.jsx(Bo,{size:"sm",className:B,children:G}),e[22]=B,e[23]=G,e[24]=z):z=e[24];let M;e[25]===Symbol.for("react.memo_cache_sentinel")?(M=p.jsx(qr,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none"}),e[25]=M):M=e[25];let W;e[26]===Symbol.for("react.memo_cache_sentinel")?(W=x=>m(x.target.value),e[26]=W):W=e[26];let K;e[27]!==d?(K=p.jsx("div",{className:"border-b px-4 py-3 bg-background/95 backdrop-blur sticky top-0 z-10",children:p.jsxs("div",{className:"relative",children:[M,p.jsx(sa,{ref:h,type:"text",placeholder:"Search for an agent...",value:d,onChange:W,className:"pl-9 h-9 text-sm border-0 focus-visible:ring-0 focus-visible:ring-offset-0 shadow-none"})]})}),e[27]=d,e[28]=K):K=e[28];let te;e[29]!==L||e[30]!==y||e[31]!==n?(te=L.length>0?L.map(x=>p.jsx("div",{onClick:()=>y(x.id),className:"outline-none",children:p.jsx(ZE,{gateway:x,isSelected:x.id===n})},x.id)):p.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"No agents found"}),e[29]=L,e[30]=y,e[31]=n,e[32]=te):te=e[32];let J;e[33]!==te?(J=p.jsx("div",{className:"overflow-y-auto p-2 flex flex-col gap-1",children:te}),e[33]=te,e[34]=J):J=e[34];let A;e[35]!==K||e[36]!==J?(A=p.jsxs("div",{className:"flex flex-col max-h-[300px]",children:[K,J]}),e[35]=K,e[36]=J,e[37]=A):A=e[37];let Z;e[38]!==o||e[39]!==A?(Z=p.jsx(vo,{title:o,className:"w-full md:w-[400px] p-0",side:"bottom",children:A}),e[38]=o,e[39]=A,e[40]=Z):Z=e[40];let le;return e[41]!==y||e[42]!==l||e[43]!==z||e[44]!==Z||e[45]!==q?(le=p.jsxs(Mo,{open:l,onOpenChange:Y,value:q,onValueChange:y,children:[z,Z]}),e[41]=y,e[42]=l,e[43]=z,e[44]=Z,e[45]=q,e[46]=le):le=e[46],le}function eb(t,e){const n=V.c(4);let r;n[0]!==e?(r=e===void 0?{}:e,n[0]=e,n[1]=r):r=n[1];const i=r,s=t??nl;let a;return n[2]!==s?(a=il(s),n[2]=s,n[3]=a):a=n[3],rl(s,"LLM",a,i)}const tb=["x-ai/grok-code-fast-1","anthropic/claude-sonnet-4.5","google/gemini-2.5-flash","xiaomi/mimo-v2-flash:free","google/gemini-3-flash-preview","deepseek/deepseek-v3.2","anthropic/claude-opus-4.5","x-ai/grok-4.1-fast","google/gemini-2.5-flash-lite","google/gemini-2.0-flash-001"],zr=new Map;tb.forEach((t,e)=>{zr.set(t,e)});function nb(){const t=V.c(9),e=sl();let n;t[0]!==e?(n={connections:e,binding:"LLMS"},t[0]=e,t[1]=n):n=t[1];const[r]=yl(n);let i;t[2]===Symbol.for("react.memo_cache_sentinel")?(i={pageSize:999},t[2]=i):i=t[2];const s=eb(r?.id,i);if(!s||!r){let o;return t[3]===Symbol.for("react.memo_cache_sentinel")?(o=[],t[3]=o):o=t[3],o}let a;if(t[4]!==r||t[5]!==s){let o;t[7]!==r?(o=l=>({...l,name:l.title,contextWindow:l.limits?.contextWindow,outputLimit:l.limits?.maxOutputTokens,inputCost:l.costs?.input,outputCost:l.costs?.output,provider:l.provider,connectionId:r.id,connectionName:r.title}),t[7]=r,t[8]=o):o=t[8],a=s.filter(ib).map(o).sort(rb),t[4]=r,t[5]=s,t[6]=a}else a=t[6];return a}function rb(t,e){const n=zr.get(t.id),r=zr.get(e.id);return n!==void 0&&r!==void 0?n-r:n!==void 0?-1:r!==void 0?1:t.name.localeCompare(e.name)}function ib(t){return t.limits?.contextWindow&&t.limits?.maxOutputTokens}const sb={reasoning:{icon:p.jsx(jn,{className:"size-4"}),bg:"bg-purple-100",text:"text-purple-700",label:"Reasoning"},"image-upload":{icon:p.jsx(ga,{className:"size-4"}),bg:"bg-teal-100",text:"text-teal-700",label:"Can analyze images"},"file-upload":{icon:p.jsx(Nl,{className:"size-4"}),bg:"bg-blue-100",text:"text-blue-700",label:"Can analyze files"},"web-search":{icon:p.jsx(qr,{className:"size-4"}),bg:"bg-amber-100",text:"text-amber-700",label:"Can search the web to answer questions"}},Ho=U.memo(function(e){const n=V.c(11),{capability:r}=e,i=sb[r];let s;n[0]!==r||n[1]!==i?(s=i||{icon:p.jsx(xt,{className:"size-4"}),bg:"bg-slate-200",text:"text-slate-700",label:r},n[0]=r,n[1]=i,n[2]=s):s=n[2];const a=s,u=`flex items-center justify-center h-6 w-6 rounded-sm ${a.bg} ${a.text}`;let o;n[3]!==a.icon||n[4]!==u?(o=p.jsx(Wr,{asChild:!0,children:p.jsx("div",{className:u,children:a.icon})}),n[3]=a.icon,n[4]=u,n[5]=o):o=n[5];let l;n[6]!==a.label?(l=p.jsx(Gr,{children:p.jsx("p",{children:a.label})}),n[6]=a.label,n[7]=l):l=n[7];let f;return n[8]!==o||n[9]!==l?(f=p.jsxs(Vr,{children:[o,l]}),n[8]=o,n[9]=l,n[10]=f):f=n[10],f}),Zs=U.memo(function(e){const n=V.c(54),{model:r,compact:i}=e,s=i===void 0?!1:i;if(!r){let T;return n[0]===Symbol.for("react.memo_cache_sentinel")?(T=p.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground text-sm",children:"Hover to preview"}),n[0]=T):T=n[0],T}const a=r.contextWindow||r.inputCost||r.outputCost||r.outputLimit;if(!a&&!s){let T;n[1]!==r.logo||n[2]!==r.name?(T=r.logo&&p.jsx("img",{src:r.logo,className:"w-6 h-6",alt:r.name}),n[1]=r.logo,n[2]=r.name,n[3]=T):T=n[3];let S;n[4]!==r.name?(S=p.jsx("p",{className:"text-lg font-medium leading-7",children:r.name}),n[4]=r.name,n[5]=S):S=n[5];let N;n[6]!==T||n[7]!==S?(N=p.jsxs("div",{className:"flex items-center gap-3 py-2 px-0",children:[T,S]}),n[6]=T,n[7]=S,n[8]=N):N=n[8];let L;n[9]!==r.description?(L=r.description&&p.jsx("p",{className:"text-sm text-muted-foreground",children:r.description}),n[9]=r.description,n[10]=L):L=n[10];let O;return n[11]!==N||n[12]!==L?(O=p.jsxs("div",{className:"flex flex-col gap-3 py-1 px-1.5",children:[N,L]}),n[11]=N,n[12]=L,n[13]=O):O=n[13],O}if(!a&&s)return null;if(s){let T;n[14]!==r.contextWindow?(T=r.contextWindow&&p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("span",{className:"text-muted-foreground",children:"Context"}),p.jsxs("span",{className:"text-foreground font-medium",children:[r.contextWindow.toLocaleString()," tokens"]})]}),n[14]=r.contextWindow,n[15]=T):T=n[15];let S;n[16]!==r.inputCost?(S=r.inputCost&&p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("span",{className:"text-muted-foreground",children:"Input cost"}),p.jsxs("span",{className:"text-foreground font-medium",children:["$",r.inputCost.toFixed(2)," / 1M"]})]}),n[16]=r.inputCost,n[17]=S):S=n[17];let N;n[18]!==r.outputCost?(N=r.outputCost&&p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("span",{className:"text-muted-foreground",children:"Output cost"}),p.jsxs("span",{className:"text-foreground font-medium",children:["$",r.outputCost.toFixed(2)," / 1M"]})]}),n[18]=r.outputCost,n[19]=N):N=n[19];let L;n[20]!==r.outputLimit?(L=r.outputLimit&&p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("span",{className:"text-muted-foreground",children:"Output limit"}),p.jsxs("span",{className:"text-foreground font-medium",children:[r.outputLimit.toLocaleString()," tokens"]})]}),n[20]=r.outputLimit,n[21]=L):L=n[21];let O;return n[22]!==T||n[23]!==S||n[24]!==N||n[25]!==L?(O=p.jsxs("div",{className:"flex flex-col gap-2.5 pt-3 pb-3 px-3 rounded-b-lg text-xs",children:[T,S,N,L]}),n[22]=T,n[23]=S,n[24]=N,n[25]=L,n[26]=O):O=n[26],O}let u;n[27]!==r.logo||n[28]!==r.name?(u=r.logo&&p.jsx("img",{src:r.logo,className:"w-6 h-6",alt:r.name}),n[27]=r.logo,n[28]=r.name,n[29]=u):u=n[29];let o;n[30]!==r.name?(o=p.jsx("p",{className:"text-lg font-medium leading-7",children:r.name}),n[30]=r.name,n[31]=o):o=n[31];let l;n[32]!==u||n[33]!==o?(l=p.jsxs("div",{className:"flex items-center gap-3",children:[u,o]}),n[32]=u,n[33]=o,n[34]=l):l=n[34];let f;n[35]!==r.capabilities?(f=r.capabilities&&r.capabilities.length>0&&p.jsx("div",{className:"flex items-center gap-2",children:r.capabilities.map(ob)}),n[35]=r.capabilities,n[36]=f):f=n[36];let d;n[37]!==l||n[38]!==f?(d=p.jsxs("div",{className:"flex flex-col gap-3 py-2 px-0",children:[l,f]}),n[37]=l,n[38]=f,n[39]=d):d=n[39];let m;n[40]!==r.contextWindow?(m=r.contextWindow&&p.jsxs("div",{className:"flex flex-col gap-1.5",children:[p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx(ll,{className:"w-3.5 h-3.5 text-muted-foreground"}),p.jsx("p",{className:"text-sm text-foreground",children:"Context window"})]}),p.jsxs("p",{className:"text-sm text-muted-foreground",children:[r.contextWindow.toLocaleString()," tokens"]})]}),n[40]=r.contextWindow,n[41]=m):m=n[41];let h;n[42]!==r.inputCost||n[43]!==r.outputCost?(h=(r.inputCost||r.outputCost)&&p.jsxs("div",{className:"flex flex-col gap-1.5",children:[p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx(ma,{className:"w-3.5 h-3.5 text-muted-foreground"}),p.jsx("p",{className:"text-sm text-foreground",children:"Costs"})]}),p.jsxs("div",{className:"flex flex-col gap-0.5",children:[r.inputCost!==null&&r.inputCost!==void 0&&p.jsxs("p",{className:"text-sm text-muted-foreground",children:["$",r.inputCost.toFixed(2)," / 1M tokens (input)"]}),r.outputCost!==null&&r.outputCost!==void 0&&p.jsxs("p",{className:"text-sm text-muted-foreground",children:["$",r.outputCost.toFixed(2)," / 1M tokens (output)"]})]})]}),n[42]=r.inputCost,n[43]=r.outputCost,n[44]=h):h=n[44];let g;n[45]!==r.outputLimit?(g=r.outputLimit&&p.jsxs("div",{className:"flex flex-col gap-1.5",children:[p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx(ba,{className:"w-4.5 h-4.5 text-muted-foreground/70"}),p.jsx("p",{className:"text-sm text-foreground",children:"Output limit"})]}),p.jsxs("p",{className:"text-sm text-muted-foreground",children:[r.outputLimit.toLocaleString()," token limit"]})]}),n[45]=r.outputLimit,n[46]=g):g=n[46];let k;n[47]!==m||n[48]!==h||n[49]!==g?(k=p.jsxs("div",{className:"flex flex-col gap-4",children:[m,h,g]}),n[47]=m,n[48]=h,n[49]=g,n[50]=k):k=n[50];let C;return n[51]!==k||n[52]!==d?(C=p.jsxs("div",{className:"flex flex-col gap-3 py-1 px-1.5",children:[d,k]}),n[51]=k,n[52]=d,n[53]=C):C=n[53],C}),ab=U.memo(function(e){const n=V.c(27),{model:r,onHover:i,isSelected:s,hasExpandedInfo:a}=e,u=a?"rounded-t-lg":"rounded-lg";let o;n[0]!==u?(o=ae("flex items-center gap-2 h-10 py-4 px-3 hover:bg-accent cursor-pointer",u),n[0]=u,n[1]=o):o=n[1];let l;n[2]!==r||n[3]!==i?(l=()=>i(r),n[2]=r,n[3]=i,n[4]=l):l=n[4];let f;n[5]!==r.logo||n[6]!==r.name?(f=r.logo&&p.jsx("img",{src:r.logo,className:"w-5 h-5 shrink-0",alt:r.name}),n[5]=r.logo,n[6]=r.name,n[7]=f):f=n[7];let d;n[8]!==r.name?(d=p.jsx("span",{className:"text-sm text-foreground",children:r.name}),n[8]=r.name,n[9]=d):d=n[9];let m;n[10]!==a||n[11]!==r.capabilities?(m=a&&r.capabilities&&r.capabilities.length>0&&p.jsx("div",{className:"md:hidden flex items-center gap-1.5 ml-auto",children:r.capabilities.map(lb)}),n[10]=a,n[11]=r.capabilities,n[12]=m):m=n[12];let h;n[13]!==a||n[14]!==s?(h=s&&!a&&p.jsx(xt,{className:"w-4 h-4 text-foreground ml-auto"}),n[13]=a,n[14]=s,n[15]=h):h=n[15];let g;n[16]!==a||n[17]!==s?(g=s&&a&&p.jsx(xt,{className:"w-4 h-4 text-foreground ml-2 shrink-0"}),n[16]=a,n[17]=s,n[18]=g):g=n[18];let k;return n[19]!==o||n[20]!==l||n[21]!==f||n[22]!==d||n[23]!==m||n[24]!==h||n[25]!==g?(k=p.jsxs("div",{className:o,onMouseEnter:l,children:[f,d,m,h,g]}),n[19]=o,n[20]=l,n[21]=f,n[22]=d,n[23]=m,n[24]=h,n[25]=g,n[26]=k):k=n[26],k});function ub(t){const e=V.c(9),{model:n}=t;if(!n){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=p.jsx("span",{className:"text-sm text-muted-foreground",children:"Select model"}),e[0]=a):a=e[0],a}let r;e[1]!==n.logo||e[2]!==n.name?(r=n.logo&&p.jsx("img",{src:n.logo,className:"w-5 h-5 shrink-0 rounded-sm",alt:n.name}),e[1]=n.logo,e[2]=n.name,e[3]=r):r=e[3];let i;e[4]!==n.name?(i=p.jsx("span",{className:"text-sm text-muted-foreground group-hover:text-foreground transition-colors truncate min-w-0 max-w-[200px] hidden sm:inline-block",children:n.name}),e[4]=n.name,e[5]=i):i=e[5];let s;return e[6]!==r||e[7]!==i?(s=p.jsxs("div",{className:"flex items-center gap-2 min-w-0 max-w-full",children:[r,i]}),e[6]=r,e[7]=i,e[8]=s):s=e[8],s}function Kb(t){const e=V.c(67),{selectedModel:n,onModelChange:r,variant:i,className:s,placeholder:a}=t,u=i===void 0?"borderless":i,o=a===void 0?"Select model":a,[l,f]=U.useState(!1),[d,m]=U.useState(null),[h,g]=U.useState(!1),[k,C]=U.useState(""),T=U.useRef(null),S=nb();let N,L;e[0]!==l?(N=()=>{l&&setTimeout(()=>{T.current?.focus()},0)},L=[l],e[0]=l,e[1]=N,e[2]=L):(N=e[1],L=e[2]),U.useEffect(N,L);let O;e[3]!==S||e[4]!==n?(O=n?S.find(ie=>ie.id===n.id&&ie.connectionId===n.connectionId)?.id:void 0,e[3]=S,e[4]=n,e[5]=O):O=e[5];const y=O;let j;if(e[6]!==S||e[7]!==y){let ie;e[9]!==y?(ie=we=>we.id===y,e[9]=y,e[10]=ie):ie=e[10],j=S.find(ie),e[6]=S,e[7]=y,e[8]=j}else j=e[8];const Y=j;let q;e:{if(!k.trim()){q=S;break e}let ie;if(e[11]!==S||e[12]!==k){const we=k.toLowerCase();ie=S.filter(ot=>ot.name.toLowerCase().includes(we)||ot.provider?.toLowerCase().includes(we)||ot.description?.toLowerCase().includes(we)),e[11]=S,e[12]=k,e[13]=ie}else ie=e[13];q=ie}const I=q;let B;e[14]!==S||e[15]!==r?(B=ie=>{const we=S.find(ot=>ot.id===ie);we&&(r({id:we.id,connectionId:we.connectionId,provider:we.provider??void 0}),C(""),f(!1))},e[14]=S,e[15]=r,e[16]=B):B=e[16];const F=B;let G;e[17]===Symbol.for("react.memo_cache_sentinel")?(G=ie=>{f(ie),ie||C("")},e[17]=G):G=e[17];const z=G;if(S.length===0)return null;const M=y||"",W=u==="borderless"&&"md:border-none";let K;e[18]!==s||e[19]!==W?(K=ae("text-sm hover:bg-accent rounded-lg py-0.5 px-1 gap-1 shadow-none cursor-pointer border-0 group focus-visible:ring-0 focus-visible:ring-offset-0 min-w-0 max-w-full",W,s),e[18]=s,e[19]=W,e[20]=K):K=e[20];let te;e[21]!==Y?(te=p.jsx(ub,{model:Y}),e[21]=Y,e[22]=te):te=e[22];let J;e[23]!==o||e[24]!==te?(J=p.jsx(Fo,{placeholder:o,className:"min-w-0 max-w-full",children:te}),e[23]=o,e[24]=te,e[25]=J):J=e[25];let A;e[26]!==K||e[27]!==J?(A=p.jsx(Bo,{size:"sm",className:K,children:J}),e[26]=K,e[27]=J,e[28]=A):A=e[28];let Z;e[29]!==h?(Z=()=>g(!h),e[29]=h,e[30]=Z):Z=e[30];const le=h?"text-foreground":"text-muted-foreground";let x;e[31]!==le?(x=ae("w-5 h-5 transition-colors",le),e[31]=le,e[32]=x):x=e[32];let ue;e[33]!==x?(ue=p.jsx(Sl,{className:x}),e[33]=x,e[34]=ue):ue=e[34];let he;e[35]!==Z||e[36]!==ue?(he=p.jsx("button",{type:"button",onClick:Z,className:"md:hidden flex items-center justify-center h-8 w-8 rounded-lg hover:bg-accent transition-colors","aria-label":"Toggle model info",children:ue}),e[35]=Z,e[36]=ue,e[37]=he):he=e[37];let ce;e[38]===Symbol.for("react.memo_cache_sentinel")?(ce=p.jsx(qr,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none"}),e[38]=ce):ce=e[38];let ke;e[39]===Symbol.for("react.memo_cache_sentinel")?(ke=ie=>C(ie.target.value),e[39]=ke):ke=e[39];let Ee;e[40]!==k?(Ee=p.jsx("div",{className:"border-b px-4 py-3 bg-background/95 backdrop-blur sticky top-0 z-10",children:p.jsxs("div",{className:"relative",children:[ce,p.jsx(sa,{ref:T,type:"text",placeholder:"Search for a model...",value:k,onChange:ke,className:"pl-9 h-9 text-sm border-0 focus-visible:ring-0 focus-visible:ring-offset-0 shadow-none"})]})}),e[40]=k,e[41]=Ee):Ee=e[41];let xe;e[42]!==I||e[43]!==F||e[44]!==y||e[45]!==h?(xe=I.length>0?I.map(ie=>p.jsxs("div",{onClick:()=>F(ie.id),className:ae("rounded-lg mb-1",ie.id===y&&"bg-accent"),children:[p.jsx(ab,{model:ie,onHover:m,isSelected:ie.id===y,hasExpandedInfo:h}),h&&p.jsx("div",{className:"md:hidden",children:p.jsx(Zs,{model:ie,compact:!0})})]},ie.id)):p.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"No models found"}),e[42]=I,e[43]=F,e[44]=y,e[45]=h,e[46]=xe):xe=e[46];let me;e[47]!==xe?(me=p.jsx("div",{className:"flex-1 overflow-y-auto px-0.5",children:xe}),e[47]=xe,e[48]=me):me=e[48];let Ae;e[49]!==Ee||e[50]!==me?(Ae=p.jsxs("div",{className:"flex-1 flex flex-col md:border-r",children:[Ee,me]}),e[49]=Ee,e[50]=me,e[51]=Ae):Ae=e[51];const Ie=d||Y||null;let be;e[52]!==Ie?(be=p.jsx("div",{className:"hidden md:block md:w-[300px] p-3",children:p.jsx(Zs,{model:Ie})}),e[52]=Ie,e[53]=be):be=e[53];let Pe;e[54]!==Ae||e[55]!==be?(Pe=p.jsxs("div",{className:"flex flex-col md:flex-row h-[350px]",children:[Ae,be]}),e[54]=Ae,e[55]=be,e[56]=Pe):Pe=e[56];let Le;e[57]!==o||e[58]!==he||e[59]!==Pe?(Le=p.jsx(vo,{title:o,className:"w-full md:w-auto md:min-w-[600px] [&_button[aria-label='Scroll down']]:!hidden [&_button[aria-label='Scroll up']]:!hidden",headerActions:he,children:Pe}),e[57]=o,e[58]=he,e[59]=Pe,e[60]=Le):Le=e[60];let Fe;return e[61]!==F||e[62]!==l||e[63]!==M||e[64]!==A||e[65]!==Le?(Fe=p.jsxs(Mo,{open:l,onOpenChange:z,value:M,onValueChange:F,children:[A,Le]}),e[61]=F,e[62]=l,e[63]=M,e[64]=A,e[65]=Le,e[66]=Fe):Fe=e[66],Fe}function ob(t){return p.jsx(Ho,{capability:t},t)}function lb(t){return p.jsx(Ho,{capability:t},t)}function cb({messageCount:t,sentinelRef:e}){const n=U.useRef(t),r=U.useRef(0);t>n.current&&r.current!==t&&queueMicrotask(()=>{e.current?.scrollIntoView({behavior:"smooth",block:"start"}),r.current=t}),n.current=t}function Js(t,e){const n=U.Children.toArray(t);for(const r of n)if(U.isValidElement(r)&&r.type===e)return r;return null}function fb(t){const e=V.c(5),{className:n,children:r}=t;let i;e[0]!==n?(i=ae("flex flex-col h-full w-full bg-sidebar transform-[translateZ(0)]",n),e[0]=n,e[1]=i):i=e[1];let s;return e[2]!==r||e[3]!==i?(s=p.jsx("div",{className:i,children:r}),e[2]=r,e[3]=i,e[4]=s):s=e[4],s}function db(t){const e=V.c(11),{children:n}=t;let r;e[0]!==n?(r=Js(n,Uo),e[0]=n,e[1]=r):r=e[1];const i=r;let s;e[2]!==n?(s=Js(n,jo),e[2]=n,e[3]=s):s=e[3];const a=s,u=i?.props.children;let o;e[4]!==u?(o=p.jsx("div",{className:"flex items-center gap-2",children:u}),e[4]=u,e[5]=o):o=e[5];const l=a?.props.children;let f;e[6]!==l?(f=p.jsx("div",{className:"flex items-center gap-1",children:l}),e[6]=l,e[7]=f):f=e[7];let d;return e[8]!==o||e[9]!==f?(d=p.jsxs("div",{className:"flex h-12 items-center justify-between border-b border-border px-4 flex-none",children:[o,f]}),e[8]=o,e[9]=f,e[10]=d):d=e[10],d}function Uo(t){const e=V.c(2),{children:n}=t;let r;return e[0]!==n?(r=p.jsx(p.Fragment,{children:n}),e[0]=n,e[1]=r):r=e[1],r}function jo(t){const e=V.c(2),{children:n}=t;let r;return e[0]!==n?(r=p.jsx(p.Fragment,{children:n}),e[0]=n,e[1]=r):r=e[1],r}function hb(t){const e=V.c(5),{children:n,className:r}=t;let i;e[0]!==r?(i=ae("flex-1 min-h-0 overflow-y-auto",r),e[0]=r,e[1]=i):i=e[1];let s;return e[2]!==n||e[3]!==i?(s=p.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=s):s=e[4],s}function mb(t){const e=V.c(2),{children:n}=t;let r;return e[0]!==n?(r=p.jsx("div",{className:"h-full w-full flex items-center justify-center max-w-2xl mx-auto",children:n}),e[0]=n,e[1]=r):r=e[1],r}function pb(t){const e=V.c(12),{messages:n,status:r,minHeightOffset:i}=t,s=i===void 0?240:i,a=U.useRef(null);let u;e[0]!==n.length?(u={messageCount:n.length,sentinelRef:a},e[0]=n.length,e[1]=u):u=e[1],cb(u);let o;if(e[2]!==n||e[3]!==r){let d;e[5]!==n.length||e[6]!==r?(d=(m,h)=>m.role==="user"?p.jsx(QE,{message:m},m.id):m.role==="assistant"?p.jsx(HE,{message:m,status:h===n.length-1?r:void 0},m.id):null,e[5]=n.length,e[6]=r,e[7]=d):d=e[7],o=n.map(d),e[2]=n,e[3]=r,e[4]=o}else o=e[4];let l;e[8]===Symbol.for("react.memo_cache_sentinel")?(l=p.jsx(Do,{children:p.jsx("div",{ref:a,className:"h-0"})}),e[8]=l):l=e[8];let f;return e[9]!==s||e[10]!==o?(f=p.jsxs($E,{minHeightOffset:s,children:[o,l]}),e[9]=s,e[10]=o,e[11]=f):f=e[11],f}function gb(t){const e=V.c(5),{children:n,className:r}=t;let i;e[0]!==r?(i=ae("flex-none w-full mx-auto p-2","max-w-2xl min-w-0",r),e[0]=r,e[1]=i):i=e[1];let s;return e[2]!==n||e[3]!==i?(s=p.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=s):s=e[4],s}function Pi(t){const e=V.c(24),{title:n,description:r,icon:i,variant:s,onDismiss:a,children:u}=t,o=s===void 0?"default":s;let l,f,d,m,h;if(e[0]!==u||e[1]!==r||e[2]!==i||e[3]!==n||e[4]!==o){const N={default:{container:"border-muted-foreground/30 bg-muted/50 hover:bg-muted transition-colors",icon:"text-muted-foreground",title:"text-muted-foreground",description:"text-muted-foreground/70"},danger:{container:"border-destructive/30 bg-destructive/5",icon:"text-destructive",title:"text-destructive font-medium",description:"text-muted-foreground"},warning:{container:"border-amber-500/30 bg-amber-500/5",icon:"text-amber-600 dark:text-amber-500",title:"text-amber-600 dark:text-amber-500 font-medium",description:"text-muted-foreground"}}[o];m=ae("flex items-start gap-2 px-3 py-2.5 rounded-lg border border-dashed text-sm w-full",N.container),h=i&&p.jsx("div",{className:ae("mt-0.5 shrink-0",N.icon),children:i}),l="flex-1 min-w-0",f=n&&p.jsx("div",{className:ae("text-xs mb-1",N.title),children:n}),d=r&&p.jsx("div",{className:ae("text-xs line-clamp-2",N.description,u?"mb-2":""),children:r}),e[0]=u,e[1]=r,e[2]=i,e[3]=n,e[4]=o,e[5]=l,e[6]=f,e[7]=d,e[8]=m,e[9]=h}else l=e[5],f=e[6],d=e[7],m=e[8],h=e[9];let g;e[10]!==u?(g=u&&p.jsx("div",{className:"flex gap-2",children:u}),e[10]=u,e[11]=g):g=e[11];let k;e[12]!==l||e[13]!==f||e[14]!==d||e[15]!==g?(k=p.jsxs("div",{className:l,children:[f,d,g]}),e[12]=l,e[13]=f,e[14]=d,e[15]=g,e[16]=k):k=e[16];let C;e[17]!==a?(C=a&&p.jsx("button",{type:"button",onClick:a,className:"text-muted-foreground hover:text-foreground transition-colors shrink-0",title:"Dismiss",children:p.jsx(ul,{size:14})}),e[17]=a,e[18]=C):C=e[18];let T;return e[19]!==m||e[20]!==h||e[21]!==k||e[22]!==C?(T=p.jsxs("div",{className:m,children:[h,k,C]}),e[19]=m,e[20]=h,e[21]=k,e[22]=C,e[23]=T):T=e[23],T}function Eb(t){const e=V.c(10),{branchContext:n,clearBranchContext:r,onGoToOriginalMessage:i,setInputValue:s}=t;if(!n)return null;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=p.jsx(ha,{size:14}),e[0]=a):a=e[0];let u;e[1]!==r||e[2]!==s?(u=()=>{r(),s("")},e[1]=r,e[2]=s,e[3]=u):u=e[3];let o;e[4]!==i?(o=p.jsx(Qe,{size:"sm",variant:"outline",onClick:i,className:"h-7 text-xs",children:"View original"}),e[4]=i,e[5]=o):o=e[5];let l;return e[6]!==n.originalMessageText||e[7]!==u||e[8]!==o?(l=p.jsx(Pi,{variant:"default",title:"Editing message (click to view original)",description:n.originalMessageText,icon:a,onDismiss:u,children:o}),e[6]=n.originalMessageText,e[7]=u,e[8]=o,e[9]=l):l=e[9],l}function bb(t){const e=V.c(8),{error:n,onFixInChat:r,onDismiss:i}=t;if(!n)return null;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=p.jsx(aa,{size:16}),e[0]=s):s=e[0];let a;e[1]!==r?(a=p.jsx(Qe,{size:"sm",variant:"outline",onClick:r,className:"h-7 text-xs",children:"Fix in chat"}),e[1]=r,e[2]=a):a=e[2];let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=p.jsx(Qe,{size:"sm",variant:"outline",disabled:!0,className:"h-7 text-xs",children:"Report"}),e[3]=u):u=e[3];let o;return e[4]!==n.message||e[5]!==i||e[6]!==a?(o=p.jsxs(Pi,{variant:"danger",title:"Error occurred",description:n.message,icon:s,onDismiss:i,children:[a,u]}),e[4]=n.message,e[5]=i,e[6]=a,e[7]=o):o=e[7],o}function Tb(t){const e=V.c(7),{finishReason:n,onContinue:r,onDismiss:i}=t;if(!n||n==="stop")return null;const a=xb(n);let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=p.jsx(al,{size:16}),e[0]=u):u=e[0];let o;e[1]!==r?(o=p.jsx(Qe,{size:"sm",variant:"outline",onClick:r,className:"h-7 text-xs",children:"Continue"}),e[1]=r,e[2]=o):o=e[2];let l;return e[3]!==i||e[4]!==a||e[5]!==o?(l=p.jsx(Pi,{variant:"warning",title:"Response incomplete",description:a,icon:u,onDismiss:i,children:o}),e[3]=i,e[4]=a,e[5]=o,e[6]=l):l=e[6],l}function xb(t){switch(t){case"length":return"Response reached the model's output limit. Different models have different limits. Try switching models or asking it to continue.";case"content-filter":return"Response was filtered due to content policy.";case"tool-calls":return"Response paused after tool execution to prevent infinite loops and save costs. Click continue to keep working.";default:return`Response stopped unexpectedly: ${t}`}}const Xb=Object.assign(fb,{Header:Object.assign(db,{Left:Uo,Right:jo}),Main:hb,Messages:pb,EmptyState:mb,Footer:gb,Input:ql,BranchPreview:Eb,ErrorBanner:bb,FinishReasonWarning:Tb,Provider:zl});export{Xb as C,Ll as D,Qb as G,Kb as M,kE as R,Wb as T,RE as U,Dl as a,Pl as b,Ml as c,wl as d,vl as e,Yl as f,Yb as g,KE as h,nb as i,zl as j,ql as k,Ca as l,Ul as m,qb as n,$b as o,Ta as p,Vb as q,Gb as r,vi as u};
|