@antseed/gateway-console 0.1.1 → 0.1.3

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.
Files changed (144) hide show
  1. package/dist/assets/{Activity-aMw4GLn_.js → Activity-DmBxVhX7.js} +1 -1
  2. package/dist/assets/{Audit-CCre2vZ2.js → Audit-xjujDcFx.js} +1 -1
  3. package/dist/assets/{ChainGate-rOjMTVIg.js → ChainGate-B_PADueu.js} +1 -1
  4. package/dist/assets/{ChannelClose-DkQxS0-Z.js → ChannelClose-DBF_JUwr.js} +1 -1
  5. package/dist/assets/{Charts-NmIMcccv.js → Charts-BjppB8Po.js} +1 -1
  6. package/dist/assets/Chat-CUWxcJqH.css +1 -0
  7. package/dist/assets/Chat-T0qS59Xu.js +220 -0
  8. package/dist/assets/{ConnectWallet-QN7kfDQq.js → ConnectWallet-Ba-nE-Ex.js} +1 -1
  9. package/dist/assets/{DataTable-D2QIQ-gI.js → DataTable-C7t_4-zX.js} +1 -1
  10. package/dist/assets/{Disclosure-h1MJg5Wn.js → Disclosure-CYz0evEi.js} +1 -1
  11. package/dist/assets/{KeyHolder-DUhCBfBH.js → KeyHolder-BFM8S7rC.js} +1 -1
  12. package/dist/assets/{Keys-DIlH-qns.js → Keys-DrSAHaHB.js} +1 -1
  13. package/dist/assets/{Logs-BPrDGUHL.js → Logs-BsAM5FMh.js} +1 -1
  14. package/dist/assets/{Members-Cud9TWBJ.js → Members-Dt4m03ab.js} +1 -1
  15. package/dist/assets/{Migrate-DEIQ12oJ.js → Migrate-D5lsM7jR.js} +1 -1
  16. package/dist/assets/{Models-DXI7RYae.js → Models-DjTeLItT.js} +1 -1
  17. package/dist/assets/{OperatorActions-BC74iRfA.js → OperatorActions-BZHwECbE.js} +1 -1
  18. package/dist/assets/{OperatorGateAlert-CIQwPW1h.js → OperatorGateAlert-DAmQCyeN.js} +1 -1
  19. package/dist/assets/{Overview-ipvNEEut.js → Overview-D5G2tGEo.js} +1 -1
  20. package/dist/assets/{PolicyEditor-CRhTwGq0.js → PolicyEditor-Gmmqb9Cc.js} +1 -1
  21. package/dist/assets/{PolicyField-0xAOIP4-.js → PolicyField-B3b2T_KJ.js} +1 -1
  22. package/dist/assets/{Presets-DrJ48O3s.js → Presets-DbjhaVl4.js} +1 -1
  23. package/dist/assets/{Providers-CcIj0C5E.js → Providers-DwVfGgZj.js} +1 -1
  24. package/dist/assets/{RequestLog-CBZWWnHo.js → RequestLog-DFYOMsBa.js} +1 -1
  25. package/dist/assets/{Rewards-CUru480X.js → Rewards-DJj-p9Np.js} +2 -2
  26. package/dist/assets/{RewardsClaim-BjwCidx5.js → RewardsClaim-Bswnd4Du.js} +1 -1
  27. package/dist/assets/{Routing-BO7JFJGH.js → Routing-LfYjjbov.js} +1 -1
  28. package/dist/assets/{Segmented-BJmgB5-Y.js → Segmented-JCEKIWY7.js} +1 -1
  29. package/dist/assets/{SelectField-D_BPTzpT.js → SelectField-DgDdipP1.js} +1 -1
  30. package/dist/assets/{Settings-qFQk36WV.js → Settings-CPqBAsTx.js} +1 -1
  31. package/dist/assets/{Switch-JCyfy3G5.js → Switch-BasD00zg.js} +1 -1
  32. package/dist/assets/{Tabs-CGI9v1OW.js → Tabs-eMKdE-iz.js} +1 -1
  33. package/dist/assets/{TextAreaField-4JuDDT4k.js → TextAreaField-DeGuklpV.js} +1 -1
  34. package/dist/assets/{UsageByModel-jvNkVE4M.js → UsageByModel-BFNAtlZ4.js} +1 -1
  35. package/dist/assets/{Wallet-tlCKFe2Q.js → Wallet-ByJgGxqY.js} +3 -3
  36. package/dist/assets/{WalletConfirm-Dz6gVYW9.js → WalletConfirm-DLpdkgEI.js} +1 -1
  37. package/dist/assets/{WalletFunding-NSKzSiY5.js → WalletFunding-C5dOeiPL.js} +1 -1
  38. package/dist/assets/{WalletSignIn-Bs_yxjak.js → WalletSignIn-Cq__V2L6.js} +1 -1
  39. package/dist/assets/{Workspaces-C79eSjJK.js → Workspaces-CYixrYxE.js} +1 -1
  40. package/dist/assets/{add-CxYxphqt.js → add-BODkAe-c.js} +1 -1
  41. package/dist/assets/{all-wallets-BSHfFrwc.js → all-wallets-DhpA95KH.js} +1 -1
  42. package/dist/assets/{app-store-DzDsfjeG.js → app-store-mosenM4j.js} +1 -1
  43. package/dist/assets/{apple-N_ET94Rt.js → apple-DjSmNz7B.js} +1 -1
  44. package/dist/assets/{arrow-bottom-U6RBQjWC.js → arrow-bottom-CeDSRmNE.js} +1 -1
  45. package/dist/assets/{arrow-bottom-circle-tDeqZ1Ky.js → arrow-bottom-circle-DcX_G-xh.js} +1 -1
  46. package/dist/assets/{arrow-left-BShNPqIx.js → arrow-left-DUoqf10U.js} +1 -1
  47. package/dist/assets/{arrow-right-CNSfQOzD.js → arrow-right-DHoa2pF7.js} +1 -1
  48. package/dist/assets/{arrow-top-DV_peLyo.js → arrow-top-BR-QE9T9.js} +1 -1
  49. package/dist/assets/{bank-CBIxfTrG.js → bank-SDwW3Dkp.js} +1 -1
  50. package/dist/assets/{basic-N6vekuGx.js → basic-HWgx8ne-.js} +1 -1
  51. package/dist/assets/{browser-CSb6b6iQ.js → browser-Cs1coMqG.js} +1 -1
  52. package/dist/assets/bundle-full-B6fi0-ms.js +13 -0
  53. package/dist/assets/{card-DrFIu-YX.js → card-DZo9bdfS.js} +1 -1
  54. package/dist/assets/{ccip-kqAjTfpP.js → ccip-DIM-P7wd.js} +1 -1
  55. package/dist/assets/{checkmark-CjzmzCYU.js → checkmark-DAOulFxE.js} +1 -1
  56. package/dist/assets/{checkmark-bold-B66sPzPs.js → checkmark-bold-DXiCBLB8.js} +1 -1
  57. package/dist/assets/{chevron-bottom--JM7vIl_.js → chevron-bottom-CxXQ-qE-.js} +1 -1
  58. package/dist/assets/{chevron-left-CPo0GZiC.js → chevron-left-CNg3LJR0.js} +1 -1
  59. package/dist/assets/{chevron-right-BgXTpiHp.js → chevron-right-BEgGXp3W.js} +1 -1
  60. package/dist/assets/{chevron-top-BDxNAlrf.js → chevron-top-DTt9-y9n.js} +1 -1
  61. package/dist/assets/{chrome-store-BCPQdBXr.js → chrome-store-DD0QyBx7.js} +1 -1
  62. package/dist/assets/{clock-B7Udw_0s.js → clock-CUWl2UXI.js} +1 -1
  63. package/dist/assets/{close-ClhMnzas.js → close-KGY7xRXQ.js} +1 -1
  64. package/dist/assets/code-block-0KvO9_Pn.js +3 -0
  65. package/dist/assets/{coinPlaceholder-Bsvaf8UD.js → coinPlaceholder-D5WWISbz.js} +1 -1
  66. package/dist/assets/{compass-CtgRkLwG.js → compass-D2F47cHp.js} +1 -1
  67. package/dist/assets/{copy-Cju_aL0g.js → copy-2dFkZNac.js} +1 -1
  68. package/dist/assets/{core-Dv4ivRNs.js → core-FBx8iqx5.js} +3 -3
  69. package/dist/assets/cursor-CWTguKCx.js +3 -0
  70. package/dist/assets/{cursor-transparent-A0O6SzCH.js → cursor-transparent-D0luUhMB.js} +1 -1
  71. package/dist/assets/{desktop-CuYleYi9.js → desktop-DdbSeEv5.js} +1 -1
  72. package/dist/assets/{disconnect-UdfoNj_d.js → disconnect-CfKuUcu9.js} +1 -1
  73. package/dist/assets/{discord-CBP0IyFM.js → discord-D4PzntCV.js} +1 -1
  74. package/dist/assets/{en_US-Y4ZOVFV4-3vDquI1C.js → en_US-Y4ZOVFV4-C1wt0O8b.js} +4 -4
  75. package/dist/assets/{etherscan-PHAlrHol.js → etherscan-DP-dOCS7.js} +1 -1
  76. package/dist/assets/{exclamation-triangle-udtYedHZ.js → exclamation-triangle-Cz73ROGX.js} +1 -1
  77. package/dist/assets/{extension-BSfnWZTn.js → extension-CJFWp4eM.js} +1 -1
  78. package/dist/assets/{external-link-BhINeBf6.js → external-link-CgBWYupV.js} +1 -1
  79. package/dist/assets/{facebook-DPMSywQV.js → facebook-Dr31tYhh.js} +1 -1
  80. package/dist/assets/{farcaster-BgZocY3-.js → farcaster-UjSyQW0m.js} +1 -1
  81. package/dist/assets/{filters-H_ETj-7w.js → filters-DjumokIU.js} +1 -1
  82. package/dist/assets/{github-Dnt_pb3p.js → github-BUU3xNn6.js} +1 -1
  83. package/dist/assets/{google-Mu_8pwD-.js → google-D4Sl_6wx.js} +1 -1
  84. package/dist/assets/{help-circle-DRVJ-8K8.js → help-circle-BdORni3L.js} +1 -1
  85. package/dist/assets/highlighted-body-KQOG7T2V-DZDubho7.js +1 -0
  86. package/dist/assets/{id-DXjcfKMm.js → id-BeI-jz4T.js} +1 -1
  87. package/dist/assets/{image-Bhqm-9NV.js → image-BSmuE4jA.js} +1 -1
  88. package/dist/assets/index-9dOi2Cir.js +1 -0
  89. package/dist/assets/{index-CR02SnS1.js → index-CAEBOGcb.js} +1 -1
  90. package/dist/assets/{index-C9wUwD4n.js → index-CBpN3RR7.js} +3 -3
  91. package/dist/assets/{index-U4U6E7fq.css → index-CqEPMnZS.css} +1 -1
  92. package/dist/assets/{index-BrcuwiCz.js → index-CxJO1Ljw.js} +1 -1
  93. package/dist/assets/{index-DNA9wtqn.js → index-DMFnEtmX.js} +1 -1
  94. package/dist/assets/{index-C21bvTBH.js → index-jbhwAQ05.js} +24 -24
  95. package/dist/assets/{index.es-DX2eegnP.js → index.es-B5dC6ZPc.js} +4 -4
  96. package/dist/assets/{info-BaRtFUwf.js → info-Be24SYro.js} +1 -1
  97. package/dist/assets/{info-circle-Bsl8G0Ii.js → info-circle-B1UBH84l.js} +1 -1
  98. package/dist/assets/{lightbulb-BlV4kI0m.js → lightbulb-BOxJlIam.js} +1 -1
  99. package/dist/assets/{limits-D_C7APR_.js → limits-CE9uA1mE.js} +1 -1
  100. package/dist/assets/{mail-BPcY_N8f.js → mail-CIPLYvTV.js} +1 -1
  101. package/dist/assets/mermaid-MCJ5UELQ-Djb0AMyx.js +562 -0
  102. package/dist/assets/{metamask-sdk-B0WxSi8v.js → metamask-sdk-fc1iADZM.js} +1 -1
  103. package/dist/assets/{mobile-9_L4G6Kz.js → mobile-BVbitISP.js} +1 -1
  104. package/dist/assets/{models-BpLCh6Fr.js → models-g5FVBi3I.js} +1 -1
  105. package/dist/assets/{more-BMrrxkhZ.js → more-dZBFgnEq.js} +1 -1
  106. package/dist/assets/{network-placeholder-CYXkxcyL.js → network-placeholder-b_cq5dDb.js} +1 -1
  107. package/dist/assets/{nftPlaceholder-CfIu_Ovu.js → nftPlaceholder-D6VuHH4L.js} +1 -1
  108. package/dist/assets/{off-BpqSEfQB.js → off-DIVE_Apr.js} +1 -1
  109. package/dist/assets/{play-store-BKqBXU1V.js → play-store-BwuovnpF.js} +1 -1
  110. package/dist/assets/{plus-CSgT3KZh.js → plus-DsiiE_0r.js} +1 -1
  111. package/dist/assets/{qr-code-edbLJ8Gf.js → qr-code-Ciyg_r5_.js} +1 -1
  112. package/dist/assets/{recycle-horizontal-CuX0JB4-.js → recycle-horizontal-Dt_UN1jS.js} +1 -1
  113. package/dist/assets/{refresh-Dq45LHYF.js → refresh-CcEqjcUE.js} +1 -1
  114. package/dist/assets/{reown-logo-CRobwYXY.js → reown-logo-Bq4Gp-eF.js} +1 -1
  115. package/dist/assets/{search-gYoog0zk.js → search-D5f3v5zH.js} +1 -1
  116. package/dist/assets/{secp256k1-uRM0t8uf.js → secp256k1-Jjx6bzii.js} +1 -1
  117. package/dist/assets/{send-Pm4IO0Hs.js → send-CdsLof8L.js} +1 -1
  118. package/dist/assets/{swapHorizontal-DhCZ210V.js → swapHorizontal-3pzJ0fK5.js} +1 -1
  119. package/dist/assets/{swapHorizontalBold-DHO5cxVU.js → swapHorizontalBold-CttCNoHf.js} +1 -1
  120. package/dist/assets/{swapHorizontalMedium-VGtbzLgi.js → swapHorizontalMedium-C-WPorgo.js} +1 -1
  121. package/dist/assets/{swapHorizontalRoundedBold-6HTAC2Np.js → swapHorizontalRoundedBold-C5VJDqCA.js} +1 -1
  122. package/dist/assets/{swapVertical-Dg6bMEa-.js → swapVertical-jp-7l-n1.js} +1 -1
  123. package/dist/assets/{telegram-CHXgC-Jw.js → telegram-B8LqO8ML.js} +1 -1
  124. package/dist/assets/{three-dots-MixBEg-b.js → three-dots-D3booDJ4.js} +1 -1
  125. package/dist/assets/{twitch-CWrx7ZD7.js → twitch-B3H8D0Lu.js} +1 -1
  126. package/dist/assets/{twitterIcon-Vrp2iWQv.js → twitterIcon-__3pOZUO.js} +1 -1
  127. package/dist/assets/{usage-MPZYg7D2.js → usage-AvFyjxl-.js} +1 -1
  128. package/dist/assets/{useInfiniteQuery-Bpu8bc5A.js → useInfiniteQuery-Dn0V4FRG.js} +1 -1
  129. package/dist/assets/{useTx-Cp52G7Yo.js → useTx-B_KdxpeJ.js} +1 -1
  130. package/dist/assets/{verify-Cv1Ie02p.js → verify-DKhrB_jr.js} +1 -1
  131. package/dist/assets/{verify-filled-D4Of1TFY.js → verify-filled-DXI3-Yqh.js} +1 -1
  132. package/dist/assets/{w3m-modal-B8kvY5hN.js → w3m-modal-BdNwk4FV.js} +1 -1
  133. package/dist/assets/{wallet-uxpqh3A6.js → wallet-DKsa0YqH.js} +1 -1
  134. package/dist/assets/{wallet-placeholder-C-l2svWA.js → wallet-placeholder-DAigD97U.js} +1 -1
  135. package/dist/assets/{walletconnect-0CplSxZT.js → walletconnect-CKlXyEvq.js} +1 -1
  136. package/dist/assets/{warning-circle-gLBXgr6A.js → warning-circle-W9Rnd_B_.js} +1 -1
  137. package/dist/assets/{x-C17dW4I6.js → x-D7Opg1tU.js} +1 -1
  138. package/dist/index.html +3 -3
  139. package/package.json +1 -1
  140. package/dist/assets/cursor-D3NwpSI9.js +0 -3
  141. package/dist/assets/highlighted-body-KQOG7T2V-ClwcaYX1.js +0 -1
  142. package/dist/assets/index-DqHGr8d4.js +0 -1
  143. package/dist/assets/mermaid-MCJ5UELQ-BFJCTi2D.css +0 -1
  144. package/dist/assets/mermaid-MCJ5UELQ-DAirhLo4.js +0 -793
@@ -1,793 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-D_SYSyRt.js","assets/html-BlS82ilI.js","assets/javascript-wDzz0qaB.js","assets/css-Z72CF80r.js","assets/angular-ts-DGq0tZX5.js","assets/scss-Cw6XMfVs.js","assets/apl-ChzvTHjC.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-DTjqU0_L.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-k33SngOZ.js","assets/html-derivative-DZhk3IEZ.js","assets/sql-DkvoVjww.js","assets/bsl-DlhNcFeZ.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/chapel-DTp_pixX.js","assets/c-BIGW1oBm.js","assets/cobol-BBKr1ja6.js","assets/coffee-Ch7k5sss.js","assets/cpp-BMRokrvK.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/crystal-LUwhHfY5.js","assets/shellscript-Yzrsuije.js","assets/edge-CJaD-t2L.js","assets/elixir-DkJLSxtU.js","assets/elm-DbKCFpqz.js","assets/erb-CSMaCouu.js","assets/ruby-C8rp0wew.js","assets/haml-GN_XdMnF.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BaeVxFsk.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-CkoXwp7k.js","assets/fortran-free-form-BxgE0vQu.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-TyuKm33G.js","assets/gdshader-DkwncUOv.js","assets/gdscript-DqcFQ5yU.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-Drrc9bTt.js","assets/glimmer-ts-zeybXsvi.js","assets/hack-Ck6-gGSS.js","assets/handlebars-DPT5vKgj.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-2-FPmUDs.js","assets/haxe-CfZj7gIn.js","assets/jinja-DFQZVq3b.js","assets/jison-wvAkD_A8.js","assets/julia-Cu79e8SL.js","assets/r-Cf5RLm7j.js","assets/just-CMxyWJJc.js","assets/perl-5klg-GXX.js","assets/latex-DJVikpzR.js","assets/tex-D96PA37w.js","assets/liquid-B-duXHXw.js","assets/marko-BYgDmDgU.js","assets/less-B1dDrJ26.js","assets/mdc-DF4WjDMn.js","assets/nextflow-BCxp2Aob.js","assets/nextflow-groovy-CedDknKX.js","assets/nginx-BpAMiNFr.js","assets/nim-nV83PyhX.js","assets/org-6a7ccXN_.js","assets/ini-BEwlwnbL.js","assets/make-CHLpvVh8.js","assets/php-DoruYMF0.js","assets/vb-Cu-pLBUe.js","assets/clojure-P80f7IUj.js","assets/objective-c-DXmwc3jG.js","assets/docker-BcOcwvcX.js","assets/go-C27-OAKa.js","assets/groovy-gcz8RCvz.js","assets/raku-DXvB9xmW.js","assets/rust-DPvrY3IQ.js","assets/scala-CqE71os6.js","assets/csharp-B_TYUkTI.js","assets/dart-CtKP3W-j.js","assets/ocaml-C0hk2d4L.js","assets/zig-VOosw3JB.js","assets/xsl-CtQFsRM5.js","assets/pug-BtYPkAgq.js","assets/qml-3beO22l8.js","assets/razor-CyjPwjZj.js","assets/rst-CVOjT0e7.js","assets/cmake-D1j8_8rp.js","assets/sas-BGn39htG.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-zscZBeg6.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-DACIj5bg.js","assets/surrealql-Cjom0U5J.js","assets/svelte-D84K1R2Q.js","assets/templ-Vpw5XpSW.js","assets/ts-tags-Ls60c9xG.js","assets/twig-D9-LOF2p.js","assets/typst-DamkJZ1Q.js","assets/bat-CickPsom.js","assets/bibtex-CHM0blh-.js","assets/jsonc-Des-eS-w.js","assets/log-2UxHyX5q.js","assets/powershell-Dd0kTxKP.js","assets/swift-C2oV4EkX.js","assets/verilog-nZwndyjY.js","assets/system-verilog-0hqHdDBg.js","assets/vue-DSqPwMUe.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-C0RcJ6UU.js","assets/stylus-BEDo0Tqx.js","assets/highlighted-body-KQOG7T2V-ClwcaYX1.js","assets/index-C21bvTBH.js","assets/index-U4U6E7fq.css","assets/clsx-B-dksMZM.js","assets/index-DqHGr8d4.js"])))=>i.map(i=>d[i]);
2
- var j9=Object.defineProperty;var U9=Object.getPrototypeOf;var H9=Reflect.get;var gg=e=>{throw TypeError(e)};var V9=(e,t,r)=>t in e?j9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var G=(e,t,r)=>V9(e,typeof t!="symbol"?t+"":t,r),X0=(e,t,r)=>t.has(e)||gg("Cannot "+r);var je=(e,t,r)=>(X0(e,t,"read from private field"),r?r.call(e):t.get(e)),Ut=(e,t,r)=>t.has(e)?gg("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),rt=(e,t,r,n)=>(X0(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Zl=(e,t,r)=>(X0(e,t,"access private method"),r);var bg=(e,t,r)=>H9(U9(e),r,t);import{c3 as Gm,r as k,cg as Ms,j as v,ch as q9,ci as G9,_ as O,t as W9,u as Z9,d as co,q as tn,D as Y9,i as K9,bS as X9,cj as Q9,ck as J9,s as eS,m as yg,U as tS,v as Aa,bQ as Wm,bR as Zm,e as Ws,a8 as rS,f as Lh,h as vg}from"./index-C21bvTBH.js";import{c as Qc}from"./clsx-B-dksMZM.js";import{r as $a}from"./index-DqHGr8d4.js";function X(e,t,r){function n(o,l){if(o._zod||Object.defineProperty(o,"_zod",{value:{def:l,constr:a,traits:new Set},enumerable:!1}),o._zod.traits.has(e))return;o._zod.traits.add(e),t(o,l);const u=a.prototype,c=Object.keys(u);for(let d=0;d<c.length;d++){const h=c[d];h in o||(o[h]=u[h].bind(o))}}const i=(r==null?void 0:r.Parent)??Object;class s extends i{}Object.defineProperty(s,"name",{value:e});function a(o){var l;const u=r!=null&&r.Parent?new s:this;n(u,o),(l=u._zod).deferred??(l.deferred=[]);for(const c of u._zod.deferred)c();return u}return Object.defineProperty(a,"init",{value:n}),Object.defineProperty(a,Symbol.hasInstance,{value:o=>{var l,u;return r!=null&&r.Parent&&o instanceof r.Parent?!0:(u=(l=o==null?void 0:o._zod)==null?void 0:l.traits)==null?void 0:u.has(e)}}),Object.defineProperty(a,"name",{value:e}),a}class ba extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class B6 extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const F6={};function Li(e){return F6}function z6(e){const t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,i])=>t.indexOf(+n)===-1).map(([n,i])=>i)}function Dh(e,t){return typeof t=="bigint"?t.toString():t}function Jc(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Ym(e){return e==null}function Km(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function nS(e,t){const r=(e.toString().split(".")[1]||"").length,n=t.toString();let i=(n.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(n)){const l=n.match(/\d?e-(\d?)/);l!=null&&l[1]&&(i=Number.parseInt(l[1]))}const s=r>i?r:i,a=Number.parseInt(e.toFixed(s).replace(".","")),o=Number.parseInt(t.toFixed(s).replace(".",""));return a%o/10**s}const xg=Symbol("evaluating");function Ye(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==xg)return n===void 0&&(n=xg,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function Bs(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function qi(...e){const t={};for(const r of e){const n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function Eg(e){return JSON.stringify(e)}function iS(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const $6="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Xo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const sS=Jc(()=>{var e;if(typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function Ca(e){if(Xo(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(Xo(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function j6(e){return Ca(e)?{...e}:Array.isArray(e)?[...e]:e}const aS=new Set(["string","number","symbol"]);function Ia(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Gi(e,t,r){const n=new e._zod.constr(t??e._zod.def);return(!t||r!=null&&r.parent)&&(n._zod.parent=e),n}function _e(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function oS(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const lS={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function uS(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s=qi(e._zod.def,{get shape(){const a={};for(const o in t){if(!(o in r.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&(a[o]=r.shape[o])}return Bs(this,"shape",a),a},checks:[]});return Gi(e,s)}function cS(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=qi(e._zod.def,{get shape(){const a={...e._zod.def.shape};for(const o in t){if(!(o in r.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&delete a[o]}return Bs(this,"shape",a),a},checks:[]});return Gi(e,s)}function dS(e,t){if(!Ca(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const s=e._zod.def.shape;for(const a in t)if(Object.getOwnPropertyDescriptor(s,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const i=qi(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return Bs(this,"shape",s),s}});return Gi(e,i)}function hS(e,t){if(!Ca(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r=qi(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return Bs(this,"shape",n),n}});return Gi(e,r)}function fS(e,t){const r=qi(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return Bs(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return Gi(e,r)}function mS(e,t,r){const i=t._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const a=qi(t._zod.def,{get shape(){const o=t._zod.def.shape,l={...o};if(r)for(const u in r){if(!(u in o))throw new Error(`Unrecognized key: "${u}"`);r[u]&&(l[u]=e?new e({type:"optional",innerType:o[u]}):o[u])}else for(const u in o)l[u]=e?new e({type:"optional",innerType:o[u]}):o[u];return Bs(this,"shape",l),l},checks:[]});return Gi(t,a)}function pS(e,t,r){const n=qi(t._zod.def,{get shape(){const i=t._zod.def.shape,s={...i};if(r)for(const a in r){if(!(a in s))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(s[a]=new e({type:"nonoptional",innerType:i[a]}))}else for(const a in i)s[a]=new e({type:"nonoptional",innerType:i[a]});return Bs(this,"shape",s),s}});return Gi(t,n)}function da(e,t=0){var r;if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(((r=e.issues[n])==null?void 0:r.continue)!==!0)return!0;return!1}function ha(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function Yl(e){return typeof e=="string"?e:e==null?void 0:e.message}function Di(e,t,r){var i,s,a,o,l,u;const n={...e,path:e.path??[]};if(!e.message){const c=Yl((a=(s=(i=e.inst)==null?void 0:i._zod.def)==null?void 0:s.error)==null?void 0:a.call(s,e))??Yl((o=t==null?void 0:t.error)==null?void 0:o.call(t,e))??Yl((l=r.customError)==null?void 0:l.call(r,e))??Yl((u=r.localeError)==null?void 0:u.call(r,e))??"Invalid input";n.message=c}return delete n.inst,delete n.continue,t!=null&&t.reportInput||delete n.input,n}function Xm(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Qo(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}const U6=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Dh,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},H6=X("$ZodError",U6),V6=X("$ZodError",U6,{Parent:Error});function gS(e,t=r=>r.message){const r={},n=[];for(const i of e.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(t(i))):n.push(t(i));return{formErrors:n,fieldErrors:r}}function bS(e,t=r=>r.message){const r={_errors:[]},n=i=>{for(const s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>n({issues:a}));else if(s.code==="invalid_key")n({issues:s.issues});else if(s.code==="invalid_element")n({issues:s.issues});else if(s.path.length===0)r._errors.push(t(s));else{let a=r,o=0;for(;o<s.path.length;){const l=s.path[o];o===s.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(t(s))):a[l]=a[l]||{_errors:[]},a=a[l],o++}}};return n(e),r}const Qm=e=>(t,r,n,i)=>{const s=n?Object.assign(n,{async:!1}):{async:!1},a=t._zod.run({value:r,issues:[]},s);if(a instanceof Promise)throw new ba;if(a.issues.length){const o=new((i==null?void 0:i.Err)??e)(a.issues.map(l=>Di(l,s,Li())));throw $6(o,i==null?void 0:i.callee),o}return a.value},Jm=e=>async(t,r,n,i)=>{const s=n?Object.assign(n,{async:!0}):{async:!0};let a=t._zod.run({value:r,issues:[]},s);if(a instanceof Promise&&(a=await a),a.issues.length){const o=new((i==null?void 0:i.Err)??e)(a.issues.map(l=>Di(l,s,Li())));throw $6(o,i==null?void 0:i.callee),o}return a.value},e0=e=>(t,r,n)=>{const i=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new ba;return s.issues.length?{success:!1,error:new(e??H6)(s.issues.map(a=>Di(a,i,Li())))}:{success:!0,data:s.value}},yS=e0(V6),t0=e=>async(t,r,n)=>{const i=n?Object.assign(n,{async:!0}):{async:!0};let s=t._zod.run({value:r,issues:[]},i);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(a=>Di(a,i,Li())))}:{success:!0,data:s.value}},vS=t0(V6),xS=e=>(t,r,n)=>{const i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Qm(e)(t,r,i)},ES=e=>(t,r,n)=>Qm(e)(t,r,n),_S=e=>async(t,r,n)=>{const i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Jm(e)(t,r,i)},TS=e=>async(t,r,n)=>Jm(e)(t,r,n),wS=e=>(t,r,n)=>{const i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return e0(e)(t,r,i)},kS=e=>(t,r,n)=>e0(e)(t,r,n),SS=e=>async(t,r,n)=>{const i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return t0(e)(t,r,i)},AS=e=>async(t,r,n)=>t0(e)(t,r,n),CS=/^[cC][^\s-]{8,}$/,IS=/^[0-9a-z]+$/,NS=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,RS=/^[0-9a-vA-V]{20}$/,PS=/^[A-Za-z0-9]{27}$/,OS=/^[a-zA-Z0-9_-]{21}$/,LS=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,DS=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,_g=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,MS=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,BS="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function FS(){return new RegExp(BS,"u")}const zS=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,$S=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,jS=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,US=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,HS=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,q6=/^[A-Za-z0-9_-]*$/,VS=/^\+[1-9]\d{6,14}$/,G6="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",qS=new RegExp(`^${G6}$`);function W6(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function GS(e){return new RegExp(`^${W6(e)}$`)}function WS(e){const t=W6({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${t}(?:${r.join("|")})`;return new RegExp(`^${G6}T(?:${n})$`)}const ZS=e=>{const t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},YS=/^-?\d+$/,Z6=/^-?\d+(?:\.\d+)?$/,KS=/^(?:true|false)$/i,XS=/^null$/i,QS=/^[^A-Z]*$/,JS=/^[^a-z]*$/,xr=X("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Y6={number:"number",bigint:"bigint",object:"date"},K6=X("$ZodCheckLessThan",(e,t)=>{xr.init(e,t);const r=Y6[typeof t.value];e._zod.onattach.push(n=>{const i=n._zod.bag,s=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?i.maximum=t.value:i.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),X6=X("$ZodCheckGreaterThan",(e,t)=>{xr.init(e,t);const r=Y6[typeof t.value];e._zod.onattach.push(n=>{const i=n._zod.bag,s=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),eA=X("$ZodCheckMultipleOf",(e,t)=>{xr.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):nS(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),tA=X("$ZodCheckNumberFormat",(e,t)=>{var a;xr.init(e,t),t.format=t.format||"float64";const r=(a=t.format)==null?void 0:a.includes("int"),n=r?"int":"number",[i,s]=lS[t.format];e._zod.onattach.push(o=>{const l=o._zod.bag;l.format=t.format,l.minimum=i,l.maximum=s,r&&(l.pattern=YS)}),e._zod.check=o=>{const l=o.value;if(r){if(!Number.isInteger(l)){o.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?o.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):o.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}l<i&&o.issues.push({origin:"number",input:l,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),l>s&&o.issues.push({origin:"number",input:l,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}}),rA=X("$ZodCheckMaxLength",(e,t)=>{var r;xr.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!Ym(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{const i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const i=n.value;if(i.length<=t.maximum)return;const a=Xm(i);n.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),nA=X("$ZodCheckMinLength",(e,t)=>{var r;xr.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!Ym(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{const i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const i=n.value;if(i.length>=t.minimum)return;const a=Xm(i);n.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),iA=X("$ZodCheckLengthEquals",(e,t)=>{var r;xr.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!Ym(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{const i=n._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=n=>{const i=n.value,s=i.length;if(s===t.length)return;const a=Xm(i),o=s>t.length;n.issues.push({origin:a,...o?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),r0=X("$ZodCheckStringFormat",(e,t)=>{var r,n;xr.init(e,t),e._zod.onattach.push(i=>{const s=i._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),sA=X("$ZodCheckRegex",(e,t)=>{r0.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),aA=X("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=QS),r0.init(e,t)}),oA=X("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=JS),r0.init(e,t)}),lA=X("$ZodCheckIncludes",(e,t)=>{xr.init(e,t);const r=Ia(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),uA=X("$ZodCheckStartsWith",(e,t)=>{xr.init(e,t);const r=new RegExp(`^${Ia(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),cA=X("$ZodCheckEndsWith",(e,t)=>{xr.init(e,t);const r=new RegExp(`.*${Ia(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),dA=X("$ZodCheckOverwrite",(e,t)=>{xr.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class hA{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const n=t.split(`
3
- `).filter(a=>a),i=Math.min(...n.map(a=>a.length-a.trimStart().length)),s=n.map(a=>a.slice(i)).map(a=>" ".repeat(this.indent*2)+a);for(const a of s)this.content.push(a)}compile(){const t=Function,r=this==null?void 0:this.args,i=[...((this==null?void 0:this.content)??[""]).map(s=>` ${s}`)];return new t(...r,i.join(`
4
- `))}}const fA={major:4,minor:3,patch:6},ht=X("$ZodType",(e,t)=>{var i;var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=fA;const n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(const s of n)for(const a of s._zod.onattach)a(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),(i=e._zod.deferred)==null||i.push(()=>{e._zod.run=e._zod.parse});else{const s=(o,l,u)=>{let c=da(o),d;for(const h of l){if(h._zod.def.when){if(!h._zod.def.when(o))continue}else if(c)continue;const f=o.issues.length,m=h._zod.check(o);if(m instanceof Promise&&(u==null?void 0:u.async)===!1)throw new ba;if(d||m instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await m,o.issues.length!==f&&(c||(c=da(o,f)))});else{if(o.issues.length===f)continue;c||(c=da(o,f))}}return d?d.then(()=>o):o},a=(o,l,u)=>{if(da(o))return o.aborted=!0,o;const c=s(l,n,u);if(c instanceof Promise){if(u.async===!1)throw new ba;return c.then(d=>e._zod.parse(d,u))}return e._zod.parse(c,u)};e._zod.run=(o,l)=>{if(l.skipChecks)return e._zod.parse(o,l);if(l.direction==="backward"){const c=e._zod.parse({value:o.value,issues:[]},{...l,skipChecks:!0});return c instanceof Promise?c.then(d=>a(d,o,l)):a(c,o,l)}const u=e._zod.parse(o,l);if(u instanceof Promise){if(l.async===!1)throw new ba;return u.then(c=>s(c,n,l))}return s(u,n,l)}}Ye(e,"~standard",()=>({validate:s=>{var a;try{const o=yS(e,s);return o.success?{value:o.data}:{issues:(a=o.error)==null?void 0:a.issues}}catch{return vS(e,s).then(l=>{var u;return l.success?{value:l.data}:{issues:(u=l.error)==null?void 0:u.issues}})}},vendor:"zod",version:1}))}),ep=X("$ZodString",(e,t)=>{var r;ht.init(e,t),e._zod.pattern=[...((r=e==null?void 0:e._zod.bag)==null?void 0:r.patterns)??[]].pop()??ZS(e._zod.bag),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),bt=X("$ZodStringFormat",(e,t)=>{r0.init(e,t),ep.init(e,t)}),mA=X("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=DS),bt.init(e,t)}),pA=X("$ZodUUID",(e,t)=>{if(t.version){const n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=_g(n))}else t.pattern??(t.pattern=_g());bt.init(e,t)}),gA=X("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=MS),bt.init(e,t)}),bA=X("$ZodURL",(e,t)=>{bt.init(e,t),e._zod.check=r=>{try{const n=r.value.trim(),i=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),yA=X("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=FS()),bt.init(e,t)}),vA=X("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=OS),bt.init(e,t)}),xA=X("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=CS),bt.init(e,t)}),EA=X("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=IS),bt.init(e,t)}),_A=X("$ZodULID",(e,t)=>{t.pattern??(t.pattern=NS),bt.init(e,t)}),TA=X("$ZodXID",(e,t)=>{t.pattern??(t.pattern=RS),bt.init(e,t)}),wA=X("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=PS),bt.init(e,t)}),kA=X("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=WS(t)),bt.init(e,t)}),SA=X("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=qS),bt.init(e,t)}),AA=X("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=GS(t)),bt.init(e,t)}),CA=X("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=LS),bt.init(e,t)}),IA=X("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=zS),bt.init(e,t),e._zod.bag.format="ipv4"}),NA=X("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=$S),bt.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),RA=X("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=jS),bt.init(e,t)}),PA=X("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=US),bt.init(e,t),e._zod.check=r=>{const n=r.value.split("/");try{if(n.length!==2)throw new Error;const[i,s]=n;if(!s)throw new Error;const a=Number(s);if(`${a}`!==s)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${i}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function Q6(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const OA=X("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=HS),bt.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Q6(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function LA(e){if(!q6.test(e))return!1;const t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Q6(r)}const DA=X("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=q6),bt.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{LA(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),MA=X("$ZodE164",(e,t)=>{t.pattern??(t.pattern=VS),bt.init(e,t)});function BA(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[n]=r;if(!n)return!1;const i=JSON.parse(atob(n));return!("typ"in i&&(i==null?void 0:i.typ)!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}}const FA=X("$ZodJWT",(e,t)=>{bt.init(e,t),e._zod.check=r=>{BA(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),J6=X("$ZodNumber",(e,t)=>{ht.init(e,t),e._zod.pattern=e._zod.bag.pattern??Z6,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;const s=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...s?{received:s}:{}}),r}}),zA=X("$ZodNumberFormat",(e,t)=>{tA.init(e,t),J6.init(e,t)}),$A=X("$ZodBoolean",(e,t)=>{ht.init(e,t),e._zod.pattern=KS,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}const i=r.value;return typeof i=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),r}}),jA=X("$ZodNull",(e,t)=>{ht.init(e,t),e._zod.pattern=XS,e._zod.values=new Set([null]),e._zod.parse=(r,n)=>{const i=r.value;return i===null||r.issues.push({expected:"null",code:"invalid_type",input:i,inst:e}),r}}),UA=X("$ZodUnknown",(e,t)=>{ht.init(e,t),e._zod.parse=r=>r}),HA=X("$ZodNever",(e,t)=>{ht.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function Tg(e,t,r){e.issues.length&&t.issues.push(...ha(r,e.issues)),t.value[r]=e.value}const VA=X("$ZodArray",(e,t)=>{ht.init(e,t),e._zod.parse=(r,n)=>{const i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);const s=[];for(let a=0;a<i.length;a++){const o=i[a],l=t.element._zod.run({value:o,issues:[]},n);l instanceof Promise?s.push(l.then(u=>Tg(u,r,a))):Tg(l,r,a)}return s.length?Promise.all(s).then(()=>r):r}});function Xu(e,t,r,n,i){if(e.issues.length){if(i&&!(r in n))return;t.issues.push(...ha(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}function ev(e){var n,i,s,a;const t=Object.keys(e.shape);for(const o of t)if(!((a=(s=(i=(n=e.shape)==null?void 0:n[o])==null?void 0:i._zod)==null?void 0:s.traits)!=null&&a.has("$ZodType")))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);const r=oS(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function tv(e,t,r,n,i,s){const a=[],o=i.keySet,l=i.catchall._zod,u=l.def.type,c=l.optout==="optional";for(const d in t){if(o.has(d))continue;if(u==="never"){a.push(d);continue}const h=l.run({value:t[d],issues:[]},n);h instanceof Promise?e.push(h.then(f=>Xu(f,r,d,t,c))):Xu(h,r,d,t,c)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:s}),e.length?Promise.all(e).then(()=>r):r}const qA=X("$ZodObject",(e,t)=>{ht.init(e,t);const r=Object.getOwnPropertyDescriptor(t,"shape");if(!(r!=null&&r.get)){const o=t.shape;Object.defineProperty(t,"shape",{get:()=>{const l={...o};return Object.defineProperty(t,"shape",{value:l}),l}})}const n=Jc(()=>ev(t));Ye(e._zod,"propValues",()=>{const o=t.shape,l={};for(const u in o){const c=o[u]._zod;if(c.values){l[u]??(l[u]=new Set);for(const d of c.values)l[u].add(d)}}return l});const i=Xo,s=t.catchall;let a;e._zod.parse=(o,l)=>{a??(a=n.value);const u=o.value;if(!i(u))return o.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),o;o.value={};const c=[],d=a.shape;for(const h of a.keys){const f=d[h],m=f._zod.optout==="optional",b=f._zod.run({value:u[h],issues:[]},l);b instanceof Promise?c.push(b.then(y=>Xu(y,o,h,u,m))):Xu(b,o,h,u,m)}return s?tv(c,u,o,l,n.value,e):c.length?Promise.all(c).then(()=>o):o}}),GA=X("$ZodObjectJIT",(e,t)=>{qA.init(e,t);const r=e._zod.parse,n=Jc(()=>ev(t)),i=h=>{var x;const f=new hA(["shape","payload","ctx"]),m=n.value,b=_=>{const A=Eg(_);return`shape[${A}]._zod.run({ value: input[${A}], issues: [] }, ctx)`};f.write("const input = payload.value;");const y=Object.create(null);let E=0;for(const _ of m.keys)y[_]=`key_${E++}`;f.write("const newResult = {};");for(const _ of m.keys){const A=y[_],S=Eg(_),I=h[_],N=((x=I==null?void 0:I._zod)==null?void 0:x.optout)==="optional";f.write(`const ${A} = ${b(_)};`),N?f.write(`
5
- if (${A}.issues.length) {
6
- if (${S} in input) {
7
- payload.issues = payload.issues.concat(${A}.issues.map(iss => ({
8
- ...iss,
9
- path: iss.path ? [${S}, ...iss.path] : [${S}]
10
- })));
11
- }
12
- }
13
-
14
- if (${A}.value === undefined) {
15
- if (${S} in input) {
16
- newResult[${S}] = undefined;
17
- }
18
- } else {
19
- newResult[${S}] = ${A}.value;
20
- }
21
-
22
- `):f.write(`
23
- if (${A}.issues.length) {
24
- payload.issues = payload.issues.concat(${A}.issues.map(iss => ({
25
- ...iss,
26
- path: iss.path ? [${S}, ...iss.path] : [${S}]
27
- })));
28
- }
29
-
30
- if (${A}.value === undefined) {
31
- if (${S} in input) {
32
- newResult[${S}] = undefined;
33
- }
34
- } else {
35
- newResult[${S}] = ${A}.value;
36
- }
37
-
38
- `)}f.write("payload.value = newResult;"),f.write("return payload;");const w=f.compile();return(_,A)=>w(h,_,A)};let s;const a=Xo,o=!F6.jitless,u=o&&sS.value,c=t.catchall;let d;e._zod.parse=(h,f)=>{d??(d=n.value);const m=h.value;return a(m)?o&&u&&(f==null?void 0:f.async)===!1&&f.jitless!==!0?(s||(s=i(t.shape)),h=s(h,f),c?tv([],m,h,f,d,e):h):r(h,f):(h.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),h)}});function wg(e,t,r,n){for(const s of e)if(s.issues.length===0)return t.value=s.value,t;const i=e.filter(s=>!da(s));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(s=>s.issues.map(a=>Di(a,n,Li())))}),t)}const rv=X("$ZodUnion",(e,t)=>{ht.init(e,t),Ye(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),Ye(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),Ye(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),Ye(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){const i=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${i.map(s=>Km(s.source)).join("|")})$`)}});const r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(i,s)=>{if(r)return n(i,s);let a=!1;const o=[];for(const l of t.options){const u=l._zod.run({value:i.value,issues:[]},s);if(u instanceof Promise)o.push(u),a=!0;else{if(u.issues.length===0)return u;o.push(u)}}return a?Promise.all(o).then(l=>wg(l,i,e,s)):wg(o,i,e,s)}}),WA=X("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,rv.init(e,t);const r=e._zod.parse;Ye(e._zod,"propValues",()=>{const i={};for(const s of t.options){const a=s._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(const[o,l]of Object.entries(a)){i[o]||(i[o]=new Set);for(const u of l)i[o].add(u)}}return i});const n=Jc(()=>{var a;const i=t.options,s=new Map;for(const o of i){const l=(a=o._zod.propValues)==null?void 0:a[t.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(const u of l){if(s.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);s.set(u,o)}}return s});e._zod.parse=(i,s)=>{const a=i.value;if(!Xo(a))return i.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),i;const o=n.value.get(a==null?void 0:a[t.discriminator]);return o?o._zod.run(i,s):t.unionFallback?r(i,s):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:a,path:[t.discriminator],inst:e}),i)}}),ZA=X("$ZodIntersection",(e,t)=>{ht.init(e,t),e._zod.parse=(r,n)=>{const i=r.value,s=t.left._zod.run({value:i,issues:[]},n),a=t.right._zod.run({value:i,issues:[]},n);return s instanceof Promise||a instanceof Promise?Promise.all([s,a]).then(([l,u])=>kg(r,l,u)):kg(r,s,a)}});function Mh(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ca(e)&&Ca(t)){const r=Object.keys(t),n=Object.keys(e).filter(s=>r.indexOf(s)!==-1),i={...e,...t};for(const s of n){const a=Mh(e[s],t[s]);if(!a.valid)return{valid:!1,mergeErrorPath:[s,...a.mergeErrorPath]};i[s]=a.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<e.length;n++){const i=e[n],s=t[n],a=Mh(i,s);if(!a.valid)return{valid:!1,mergeErrorPath:[n,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function kg(e,t,r){const n=new Map;let i;for(const o of t.issues)if(o.code==="unrecognized_keys"){i??(i=o);for(const l of o.keys)n.has(l)||n.set(l,{}),n.get(l).l=!0}else e.issues.push(o);for(const o of r.issues)if(o.code==="unrecognized_keys")for(const l of o.keys)n.has(l)||n.set(l,{}),n.get(l).r=!0;else e.issues.push(o);const s=[...n].filter(([,o])=>o.l&&o.r).map(([o])=>o);if(s.length&&i&&e.issues.push({...i,keys:s}),da(e))return e;const a=Mh(t.value,r.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}const YA=X("$ZodRecord",(e,t)=>{ht.init(e,t),e._zod.parse=(r,n)=>{const i=r.value;if(!Ca(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),r;const s=[],a=t.keyType._zod.values;if(a){r.value={};const o=new Set;for(const u of a)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){o.add(typeof u=="number"?u.toString():u);const c=t.valueType._zod.run({value:i[u],issues:[]},n);c instanceof Promise?s.push(c.then(d=>{d.issues.length&&r.issues.push(...ha(u,d.issues)),r.value[u]=d.value})):(c.issues.length&&r.issues.push(...ha(u,c.issues)),r.value[u]=c.value)}let l;for(const u in i)o.has(u)||(l=l??[],l.push(u));l&&l.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:l})}else{r.value={};for(const o of Reflect.ownKeys(i)){if(o==="__proto__")continue;let l=t.keyType._zod.run({value:o,issues:[]},n);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof o=="string"&&Z6.test(o)&&l.issues.length){const d=t.keyType._zod.run({value:Number(o),issues:[]},n);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(l=d)}if(l.issues.length){t.mode==="loose"?r.value[o]=i[o]:r.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(d=>Di(d,n,Li())),input:o,path:[o],inst:e});continue}const c=t.valueType._zod.run({value:i[o],issues:[]},n);c instanceof Promise?s.push(c.then(d=>{d.issues.length&&r.issues.push(...ha(o,d.issues)),r.value[l.value]=d.value})):(c.issues.length&&r.issues.push(...ha(o,c.issues)),r.value[l.value]=c.value)}}return s.length?Promise.all(s).then(()=>r):r}}),KA=X("$ZodEnum",(e,t)=>{ht.init(e,t);const r=z6(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>aS.has(typeof i)).map(i=>typeof i=="string"?Ia(i):i.toString()).join("|")})$`),e._zod.parse=(i,s)=>{const a=i.value;return n.has(a)||i.issues.push({code:"invalid_value",values:r,input:a,inst:e}),i}}),XA=X("$ZodLiteral",(e,t)=>{if(ht.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?Ia(n):n?Ia(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,i)=>{const s=n.value;return r.has(s)||n.issues.push({code:"invalid_value",values:t.values,input:s,inst:e}),n}}),QA=X("$ZodTransform",(e,t)=>{ht.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new B6(e.constructor.name);const i=t.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(a=>(r.value=a,r));if(i instanceof Promise)throw new ba;return r.value=i,r}});function Sg(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const nv=X("$ZodOptional",(e,t)=>{ht.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Ye(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Ye(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Km(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>Sg(s,r.value)):Sg(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),JA=X("$ZodExactOptional",(e,t)=>{nv.init(e,t),Ye(e._zod,"values",()=>t.innerType._zod.values),Ye(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),eC=X("$ZodNullable",(e,t)=>{ht.init(e,t),Ye(e._zod,"optin",()=>t.innerType._zod.optin),Ye(e._zod,"optout",()=>t.innerType._zod.optout),Ye(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Km(r.source)}|null)$`):void 0}),Ye(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),tC=X("$ZodDefault",(e,t)=>{ht.init(e,t),e._zod.optin="optional",Ye(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>Ag(s,t)):Ag(i,t)}});function Ag(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const rC=X("$ZodPrefault",(e,t)=>{ht.init(e,t),e._zod.optin="optional",Ye(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),nC=X("$ZodNonOptional",(e,t)=>{ht.init(e,t),Ye(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>Cg(s,e)):Cg(i,e)}});function Cg(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const iC=X("$ZodCatch",(e,t)=>{ht.init(e,t),Ye(e._zod,"optin",()=>t.innerType._zod.optin),Ye(e._zod,"optout",()=>t.innerType._zod.optout),Ye(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>(r.value=s.value,s.issues.length&&(r.value=t.catchValue({...r,error:{issues:s.issues.map(a=>Di(a,n,Li()))},input:r.value}),r.issues=[]),r)):(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(s=>Di(s,n,Li()))},input:r.value}),r.issues=[]),r)}}),sC=X("$ZodPipe",(e,t)=>{ht.init(e,t),Ye(e._zod,"values",()=>t.in._zod.values),Ye(e._zod,"optin",()=>t.in._zod.optin),Ye(e._zod,"optout",()=>t.out._zod.optout),Ye(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){const s=t.out._zod.run(r,n);return s instanceof Promise?s.then(a=>Kl(a,t.in,n)):Kl(s,t.in,n)}const i=t.in._zod.run(r,n);return i instanceof Promise?i.then(s=>Kl(s,t.out,n)):Kl(i,t.out,n)}});function Kl(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const aC=X("$ZodReadonly",(e,t)=>{ht.init(e,t),Ye(e._zod,"propValues",()=>t.innerType._zod.propValues),Ye(e._zod,"values",()=>t.innerType._zod.values),Ye(e._zod,"optin",()=>{var r,n;return(n=(r=t.innerType)==null?void 0:r._zod)==null?void 0:n.optin}),Ye(e._zod,"optout",()=>{var r,n;return(n=(r=t.innerType)==null?void 0:r._zod)==null?void 0:n.optout}),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(Ig):Ig(i)}});function Ig(e){return e.value=Object.freeze(e.value),e}const oC=X("$ZodLazy",(e,t)=>{ht.init(e,t),Ye(e._zod,"innerType",()=>t.getter()),Ye(e._zod,"pattern",()=>{var r,n;return(n=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:n.pattern}),Ye(e._zod,"propValues",()=>{var r,n;return(n=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:n.propValues}),Ye(e._zod,"optin",()=>{var r,n;return((n=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:n.optin)??void 0}),Ye(e._zod,"optout",()=>{var r,n;return((n=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:n.optout)??void 0}),e._zod.parse=(r,n)=>e._zod.innerType._zod.run(r,n)}),lC=X("$ZodCustom",(e,t)=>{xr.init(e,t),ht.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{const n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(s=>Ng(s,r,n,e));Ng(i,r,n,e)}});function Ng(e,t,r,n){if(!e){const i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),t.issues.push(Qo(i))}}var Rg;class uC{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const n={...this.get(r)??{}};delete n.id;const i={...n,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function cC(){return new uC}(Rg=globalThis).__zod_globalRegistry??(Rg.__zod_globalRegistry=cC());const ko=globalThis.__zod_globalRegistry;function dC(e,t){return new e({type:"string",..._e(t)})}function hC(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,..._e(t)})}function Pg(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,..._e(t)})}function fC(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,..._e(t)})}function mC(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",..._e(t)})}function pC(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",..._e(t)})}function gC(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",..._e(t)})}function bC(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,..._e(t)})}function yC(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,..._e(t)})}function vC(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,..._e(t)})}function xC(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,..._e(t)})}function EC(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,..._e(t)})}function _C(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,..._e(t)})}function TC(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,..._e(t)})}function wC(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,..._e(t)})}function kC(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,..._e(t)})}function SC(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,..._e(t)})}function AC(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,..._e(t)})}function CC(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,..._e(t)})}function IC(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,..._e(t)})}function NC(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,..._e(t)})}function RC(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,..._e(t)})}function PC(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,..._e(t)})}function OC(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,..._e(t)})}function LC(e,t){return new e({type:"string",format:"date",check:"string_format",..._e(t)})}function DC(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,..._e(t)})}function MC(e,t){return new e({type:"string",format:"duration",check:"string_format",..._e(t)})}function BC(e,t){return new e({type:"number",checks:[],..._e(t)})}function FC(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",..._e(t)})}function zC(e,t){return new e({type:"boolean",..._e(t)})}function $C(e,t){return new e({type:"null",..._e(t)})}function jC(e){return new e({type:"unknown"})}function UC(e,t){return new e({type:"never",..._e(t)})}function Og(e,t){return new K6({check:"less_than",..._e(t),value:e,inclusive:!1})}function Q0(e,t){return new K6({check:"less_than",..._e(t),value:e,inclusive:!0})}function Lg(e,t){return new X6({check:"greater_than",..._e(t),value:e,inclusive:!1})}function J0(e,t){return new X6({check:"greater_than",..._e(t),value:e,inclusive:!0})}function Dg(e,t){return new eA({check:"multiple_of",..._e(t),value:e})}function iv(e,t){return new rA({check:"max_length",..._e(t),maximum:e})}function Qu(e,t){return new nA({check:"min_length",..._e(t),minimum:e})}function sv(e,t){return new iA({check:"length_equals",..._e(t),length:e})}function HC(e,t){return new sA({check:"string_format",format:"regex",..._e(t),pattern:e})}function VC(e){return new aA({check:"string_format",format:"lowercase",..._e(e)})}function qC(e){return new oA({check:"string_format",format:"uppercase",..._e(e)})}function GC(e,t){return new lA({check:"string_format",format:"includes",..._e(t),includes:e})}function WC(e,t){return new uA({check:"string_format",format:"starts_with",..._e(t),prefix:e})}function ZC(e,t){return new cA({check:"string_format",format:"ends_with",..._e(t),suffix:e})}function ja(e){return new dA({check:"overwrite",tx:e})}function YC(e){return ja(t=>t.normalize(e))}function KC(){return ja(e=>e.trim())}function XC(){return ja(e=>e.toLowerCase())}function QC(){return ja(e=>e.toUpperCase())}function JC(){return ja(e=>iS(e))}function eI(e,t,r){return new e({type:"array",element:t,..._e(r)})}function tI(e,t,r){const n=_e(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}function rI(e,t,r){return new e({type:"custom",check:"custom",fn:t,..._e(r)})}function nI(e){const t=iI(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(Qo(n,r.value,t._zod.def));else{const i=n;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=t),i.continue??(i.continue=!t._zod.def.abort),r.issues.push(Qo(i))}},e(r.value,r)));return t}function iI(e,t){const r=new xr({check:"custom",..._e(t)});return r._zod.check=e,r}function Ju(e){let t=(e==null?void 0:e.target)??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??ko,target:t,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function ct(e,t,r={path:[],schemaPath:[]}){var c,d;var n;const i=e._zod.def,s=t.seen.get(e);if(s)return s.count++,r.schemaPath.includes(e)&&(s.cycle=r.path),s.schema;const a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a);const o=(d=(c=e._zod).toJSONSchema)==null?void 0:d.call(c);if(o)a.schema=o;else{const h={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,h);else{const m=a.schema,b=t.processors[i.type];if(!b)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);b(e,t,m,h)}const f=e._zod.parent;f&&(a.ref||(a.ref=f),ct(f,t,h),t.seen.get(f).isParent=!0)}const l=t.metadataRegistry.get(e);return l&&Object.assign(a.schema,l),t.io==="input"&&ur(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&a.schema._prefault&&((n=a.schema).default??(n.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function ec(e,t){var a,o,l,u;const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=new Map;for(const c of e.seen.entries()){const d=(a=e.metadataRegistry.get(c[0]))==null?void 0:a.id;if(d){const h=n.get(d);if(h&&h!==c[0])throw new Error(`Duplicate schema id "${d}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(d,c[0])}}const i=c=>{var b;const d=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const y=(b=e.external.registry.get(c[0]))==null?void 0:b.id,E=e.external.uri??(x=>x);if(y)return{ref:E(y)};const w=c[1].defId??c[1].schema.id??`schema${e.counter++}`;return c[1].defId=w,{defId:w,ref:`${E("__shared")}#/${d}/${w}`}}if(c[1]===r)return{ref:"#"};const f=`#/${d}/`,m=c[1].schema.id??`__schema${e.counter++}`;return{defId:m,ref:f+m}},s=c=>{if(c[1].schema.$ref)return;const d=c[1],{ref:h,defId:f}=i(c);d.def={...d.schema},f&&(d.defId=f);const m=d.schema;for(const b in m)delete m[b];m.$ref=h};if(e.cycles==="throw")for(const c of e.seen.entries()){const d=c[1];if(d.cycle)throw new Error(`Cycle detected: #/${(o=d.cycle)==null?void 0:o.join("/")}/<root>
39
-
40
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const c of e.seen.entries()){const d=c[1];if(t===c[0]){s(c);continue}if(e.external){const f=(l=e.external.registry.get(c[0]))==null?void 0:l.id;if(t!==c[0]&&f){s(c);continue}}if((u=e.metadataRegistry.get(c[0]))==null?void 0:u.id){s(c);continue}if(d.cycle){s(c);continue}if(d.count>1&&e.reused==="ref"){s(c);continue}}}function tc(e,t){var a,o,l;const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=u=>{const c=e.seen.get(u);if(c.ref===null)return;const d=c.def??c.schema,h={...d},f=c.ref;if(c.ref=null,f){n(f);const b=e.seen.get(f),y=b.schema;if(y.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(y)):Object.assign(d,y),Object.assign(d,h),u._zod.parent===f)for(const w in d)w==="$ref"||w==="allOf"||w in h||delete d[w];if(y.$ref&&b.def)for(const w in d)w==="$ref"||w==="allOf"||w in b.def&&JSON.stringify(d[w])===JSON.stringify(b.def[w])&&delete d[w]}const m=u._zod.parent;if(m&&m!==f){n(m);const b=e.seen.get(m);if(b!=null&&b.schema.$ref&&(d.$ref=b.schema.$ref,b.def))for(const y in d)y==="$ref"||y==="allOf"||y in b.def&&JSON.stringify(d[y])===JSON.stringify(b.def[y])&&delete d[y]}e.override({zodSchema:u,jsonSchema:d,path:c.path??[]})};for(const u of[...e.seen.entries()].reverse())n(u[0]);const i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":e.target,(a=e.external)!=null&&a.uri){const u=(o=e.external.registry.get(t))==null?void 0:o.id;if(!u)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(u)}Object.assign(i,r.def??r.schema);const s=((l=e.external)==null?void 0:l.defs)??{};for(const u of e.seen.entries()){const c=u[1];c.def&&c.defId&&(s[c.defId]=c.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?i.$defs=s:i.definitions=s);try{const u=JSON.parse(JSON.stringify(i));return Object.defineProperty(u,"~standard",{value:{...t["~standard"],jsonSchema:{input:rc(t,"input",e.processors),output:rc(t,"output",e.processors)}},enumerable:!1,writable:!1}),u}catch{throw new Error("Error converting schema to JSON.")}}function ur(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return ur(n.element,r);if(n.type==="set")return ur(n.valueType,r);if(n.type==="lazy")return ur(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return ur(n.innerType,r);if(n.type==="intersection")return ur(n.left,r)||ur(n.right,r);if(n.type==="record"||n.type==="map")return ur(n.keyType,r)||ur(n.valueType,r);if(n.type==="pipe")return ur(n.in,r)||ur(n.out,r);if(n.type==="object"){for(const i in n.shape)if(ur(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(const i of n.options)if(ur(i,r))return!0;return!1}if(n.type==="tuple"){for(const i of n.items)if(ur(i,r))return!0;return!!(n.rest&&ur(n.rest,r))}return!1}const sI=(e,t={})=>r=>{const n=Ju({...r,processors:t});return ct(e,n),ec(n,e),tc(n,e)},rc=(e,t,r={})=>n=>{const{libraryOptions:i,target:s}=n??{},a=Ju({...i??{},target:s,io:t,processors:r});return ct(e,a),ec(a,e),tc(a,e)},aI={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},av=(e,t,r,n)=>{const i=r;i.type="string";const{minimum:s,maximum:a,format:o,patterns:l,contentEncoding:u}=e._zod.bag;if(typeof s=="number"&&(i.minLength=s),typeof a=="number"&&(i.maxLength=a),o&&(i.format=aI[o]??o,i.format===""&&delete i.format,o==="time"&&delete i.format),u&&(i.contentEncoding=u),l&&l.size>0){const c=[...l];c.length===1?i.pattern=c[0].source:c.length>1&&(i.allOf=[...c.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},ov=(e,t,r,n)=>{const i=r,{minimum:s,maximum:a,format:o,multipleOf:l,exclusiveMaximum:u,exclusiveMinimum:c}=e._zod.bag;typeof o=="string"&&o.includes("int")?i.type="integer":i.type="number",typeof c=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.minimum=c,i.exclusiveMinimum=!0):i.exclusiveMinimum=c),typeof s=="number"&&(i.minimum=s,typeof c=="number"&&t.target!=="draft-04"&&(c>=s?delete i.minimum:delete i.exclusiveMinimum)),typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.maximum=u,i.exclusiveMaximum=!0):i.exclusiveMaximum=u),typeof a=="number"&&(i.maximum=a,typeof u=="number"&&t.target!=="draft-04"&&(u<=a?delete i.maximum:delete i.exclusiveMaximum)),typeof l=="number"&&(i.multipleOf=l)},lv=(e,t,r,n)=>{r.type="boolean"},oI=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},lI=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},uv=(e,t,r,n)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},uI=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},cI=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},cv=(e,t,r,n)=>{r.not={}},dI=(e,t,r,n)=>{},dv=(e,t,r,n)=>{},hI=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},hv=(e,t,r,n)=>{const i=e._zod.def,s=z6(i.entries);s.every(a=>typeof a=="number")&&(r.type="number"),s.every(a=>typeof a=="string")&&(r.type="string"),r.enum=s},fv=(e,t,r,n)=>{const i=e._zod.def,s=[];for(const a of i.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");s.push(Number(a))}else s.push(a);if(s.length!==0)if(s.length===1){const a=s[0];r.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[a]:r.const=a}else s.every(a=>typeof a=="number")&&(r.type="number"),s.every(a=>typeof a=="string")&&(r.type="string"),s.every(a=>typeof a=="boolean")&&(r.type="boolean"),s.every(a=>a===null)&&(r.type="null"),r.enum=s},fI=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},mI=(e,t,r,n)=>{const i=r,s=e._zod.pattern;if(!s)throw new Error("Pattern not found in template literal");i.type="string",i.pattern=s.source},pI=(e,t,r,n)=>{const i=r,s={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:o,mime:l}=e._zod.bag;a!==void 0&&(s.minLength=a),o!==void 0&&(s.maxLength=o),l?l.length===1?(s.contentMediaType=l[0],Object.assign(i,s)):(Object.assign(i,s),i.anyOf=l.map(u=>({contentMediaType:u}))):Object.assign(i,s)},gI=(e,t,r,n)=>{r.type="boolean"},mv=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},bI=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},pv=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},yI=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},vI=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},gv=(e,t,r,n)=>{const i=r,s=e._zod.def,{minimum:a,maximum:o}=e._zod.bag;typeof a=="number"&&(i.minItems=a),typeof o=="number"&&(i.maxItems=o),i.type="array",i.items=ct(s.element,t,{...n,path:[...n.path,"items"]})},bv=(e,t,r,n)=>{var u;const i=r,s=e._zod.def;i.type="object",i.properties={};const a=s.shape;for(const c in a)i.properties[c]=ct(a[c],t,{...n,path:[...n.path,"properties",c]});const o=new Set(Object.keys(a)),l=new Set([...o].filter(c=>{const d=s.shape[c]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));l.size>0&&(i.required=Array.from(l)),((u=s.catchall)==null?void 0:u._zod.def.type)==="never"?i.additionalProperties=!1:s.catchall?s.catchall&&(i.additionalProperties=ct(s.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},yv=(e,t,r,n)=>{const i=e._zod.def,s=i.inclusive===!1,a=i.options.map((o,l)=>ct(o,t,{...n,path:[...n.path,s?"oneOf":"anyOf",l]}));s?r.oneOf=a:r.anyOf=a},vv=(e,t,r,n)=>{const i=e._zod.def,s=ct(i.left,t,{...n,path:[...n.path,"allOf",0]}),a=ct(i.right,t,{...n,path:[...n.path,"allOf",1]}),o=u=>"allOf"in u&&Object.keys(u).length===1,l=[...o(s)?s.allOf:[s],...o(a)?a.allOf:[a]];r.allOf=l},xI=(e,t,r,n)=>{const i=r,s=e._zod.def;i.type="array";const a=t.target==="draft-2020-12"?"prefixItems":"items",o=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",l=s.items.map((h,f)=>ct(h,t,{...n,path:[...n.path,a,f]})),u=s.rest?ct(s.rest,t,{...n,path:[...n.path,o,...t.target==="openapi-3.0"?[s.items.length]:[]]}):null;t.target==="draft-2020-12"?(i.prefixItems=l,u&&(i.items=u)):t.target==="openapi-3.0"?(i.items={anyOf:l},u&&i.items.anyOf.push(u),i.minItems=l.length,u||(i.maxItems=l.length)):(i.items=l,u&&(i.additionalItems=u));const{minimum:c,maximum:d}=e._zod.bag;typeof c=="number"&&(i.minItems=c),typeof d=="number"&&(i.maxItems=d)},xv=(e,t,r,n)=>{const i=r,s=e._zod.def;i.type="object";const a=s.keyType,o=a._zod.bag,l=o==null?void 0:o.patterns;if(s.mode==="loose"&&l&&l.size>0){const c=ct(s.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});i.patternProperties={};for(const d of l)i.patternProperties[d.source]=c}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(i.propertyNames=ct(s.keyType,t,{...n,path:[...n.path,"propertyNames"]})),i.additionalProperties=ct(s.valueType,t,{...n,path:[...n.path,"additionalProperties"]});const u=a._zod.values;if(u){const c=[...u].filter(d=>typeof d=="string"||typeof d=="number");c.length>0&&(i.required=c)}},Ev=(e,t,r,n)=>{const i=e._zod.def,s=ct(i.innerType,t,n),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=i.innerType,r.nullable=!0):r.anyOf=[s,{type:"null"}]},_v=(e,t,r,n)=>{const i=e._zod.def;ct(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType},Tv=(e,t,r,n)=>{const i=e._zod.def;ct(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},wv=(e,t,r,n)=>{const i=e._zod.def;ct(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},kv=(e,t,r,n)=>{const i=e._zod.def;ct(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType;let a;try{a=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},Sv=(e,t,r,n)=>{const i=e._zod.def,s=t.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;ct(s,t,n);const a=t.seen.get(e);a.ref=s},Av=(e,t,r,n)=>{const i=e._zod.def;ct(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType,r.readOnly=!0},EI=(e,t,r,n)=>{const i=e._zod.def;ct(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType},tp=(e,t,r,n)=>{const i=e._zod.def;ct(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType},Cv=(e,t,r,n)=>{const i=e._zod.innerType;ct(i,t,n);const s=t.seen.get(e);s.ref=i},Mg={string:av,number:ov,boolean:lv,bigint:oI,symbol:lI,null:uv,undefined:uI,void:cI,never:cv,any:dI,unknown:dv,date:hI,enum:hv,literal:fv,nan:fI,template_literal:mI,file:pI,success:gI,custom:mv,function:bI,transform:pv,map:yI,set:vI,array:gv,object:bv,union:yv,intersection:vv,tuple:xI,record:xv,nullable:Ev,nonoptional:_v,default:Tv,prefault:wv,catch:kv,pipe:Sv,readonly:Av,promise:EI,optional:tp,lazy:Cv};function _I(e,t){if("_idmap"in e){const n=e,i=Ju({...t,processors:Mg}),s={};for(const l of n._idmap.entries()){const[u,c]=l;ct(c,i)}const a={},o={registry:n,uri:t==null?void 0:t.uri,defs:s};i.external=o;for(const l of n._idmap.entries()){const[u,c]=l;ec(i,c),a[u]=tc(i,c)}if(Object.keys(s).length>0){const l=i.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[l]:s}}return{schemas:a}}const r=Ju({...t,processors:Mg});return ct(e,r),ec(r,e),tc(r,e)}const Iv="vercel.ai.error",TI=Symbol.for(Iv);var nr=class Nv extends Error{constructor({name:t,message:r,cause:n}){super(r),this[TI]=!0,this.name=t,this.cause=n}static isInstance(t){return Nv.hasMarker(t,Iv)}static hasMarker(t,r){const n=Symbol.for(r);return t!=null&&typeof t=="object"&&n in t&&typeof t[n]=="boolean"&&t[n]===!0}};const Rv="AI_APICallError",Pv=`vercel.ai.error.${Rv}`,wI=Symbol.for(Pv);var kI=class extends nr{constructor({message:e,url:t,requestBodyValues:r,statusCode:n,responseHeaders:i,responseBody:s,cause:a,isRetryable:o=n!=null&&(n===408||n===409||n===429||n>=500),data:l}){super({name:Rv,message:e,cause:a}),this[wI]=!0,this.url=t,this.requestBodyValues=r,this.statusCode=n,this.responseHeaders=i,this.responseBody=s,this.isRetryable=o,this.data=l}static isInstance(e){return nr.hasMarker(e,Pv)}};const Ov="AI_EmptyResponseBodyError",Lv=`vercel.ai.error.${Ov}`,SI=Symbol.for(Lv);var Bg=class extends nr{constructor({message:e="Empty response body"}={}){super({name:Ov,message:e}),this[SI]=!0}static isInstance(e){return nr.hasMarker(e,Lv)}};function Dv(e){return e==null?"unknown error":typeof e=="string"?e:e instanceof Error?e.toString():JSON.stringify(e)}const Mv="AI_InvalidArgumentError",Bv=`vercel.ai.error.${Mv}`,AI=Symbol.for(Bv);var CI=class extends nr{constructor({message:t,cause:r,argument:n}){super({name:Mv,message:t,cause:r}),this[AI]=!0,this.argument=n}static isInstance(t){return nr.hasMarker(t,Bv)}};const Fv="AI_JSONParseError",zv=`vercel.ai.error.${Fv}`,II=Symbol.for(zv);var Fg=class extends nr{constructor({text:e,cause:t}){super({name:Fv,message:`JSON parsing failed: Text: ${e}.
41
- Error message: ${Dv(t)}`,cause:t}),this[II]=!0,this.text=e}static isInstance(e){return nr.hasMarker(e,zv)}};const $v="AI_TypeValidationError",jv=`vercel.ai.error.${$v}`,NI=Symbol.for(jv);var nc=class Bh extends nr{constructor({value:t,cause:r,context:n}){let i="Type validation failed";if(n!=null&&n.field&&(i+=` for ${n.field}`),n!=null&&n.entityName||n!=null&&n.entityId){i+=" (";const s=[];n.entityName&&s.push(n.entityName),n.entityId&&s.push(`id: "${n.entityId}"`),i+=s.join(", "),i+=")"}super({name:$v,message:`${i}: Value: ${JSON.stringify(t)}.
42
- Error message: ${Dv(r)}`,cause:r}),this[NI]=!0,this.value=t,this.context=n}static isInstance(t){return nr.hasMarker(t,jv)}static wrap({value:t,cause:r,context:n}){var i,s,a;return Bh.isInstance(r)&&r.value===t&&((i=r.context)==null?void 0:i.field)===(n==null?void 0:n.field)&&((s=r.context)==null?void 0:s.entityName)===(n==null?void 0:n.entityName)&&((a=r.context)==null?void 0:a.entityId)===(n==null?void 0:n.entityId)?r:new Bh({value:t,cause:r,context:n})}};const Uv="AI_UnsupportedFunctionalityError",Hv=`vercel.ai.error.${Uv}`,RI=Symbol.for(Hv);var PI=class extends nr{constructor({functionality:e,message:t=`'${e}' functionality not supported.`}){super({name:Uv,message:t}),this[RI]=!0,this.functionality=e}static isInstance(e){return nr.hasMarker(e,Hv)}};const OI=X("ZodISODateTime",(e,t)=>{kA.init(e,t),Et.init(e,t)});function LI(e){return OC(OI,e)}const DI=X("ZodISODate",(e,t)=>{SA.init(e,t),Et.init(e,t)});function MI(e){return LC(DI,e)}const BI=X("ZodISOTime",(e,t)=>{AA.init(e,t),Et.init(e,t)});function FI(e){return DC(BI,e)}const zI=X("ZodISODuration",(e,t)=>{CA.init(e,t),Et.init(e,t)});function $I(e){return MC(zI,e)}const jI=(e,t)=>{H6.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>bS(e,r)},flatten:{value:r=>gS(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Dh,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Dh,2)}},isEmpty:{get(){return e.issues.length===0}}})},Kr=X("ZodError",jI,{Parent:Error}),UI=Qm(Kr),HI=Jm(Kr),VI=e0(Kr),Vv=t0(Kr),qI=xS(Kr),GI=ES(Kr),WI=_S(Kr),ZI=TS(Kr),YI=wS(Kr),KI=kS(Kr),XI=SS(Kr),QI=AS(Kr),ft=X("ZodType",(e,t)=>(ht.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:rc(e,"input"),output:rc(e,"output")}}),e.toJSONSchema=sI(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(qi(t,{checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0}),e.with=e.check,e.clone=(r,n)=>Gi(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>UI(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>VI(e,r,n),e.parseAsync=async(r,n)=>HI(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>Vv(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>qI(e,r,n),e.decode=(r,n)=>GI(e,r,n),e.encodeAsync=async(r,n)=>WI(e,r,n),e.decodeAsync=async(r,n)=>ZI(e,r,n),e.safeEncode=(r,n)=>YI(e,r,n),e.safeDecode=(r,n)=>KI(e,r,n),e.safeEncodeAsync=async(r,n)=>XI(e,r,n),e.safeDecodeAsync=async(r,n)=>QI(e,r,n),e.refine=(r,n)=>e.check(tR(r,n)),e.superRefine=r=>e.check(rR(r)),e.overwrite=r=>e.check(ja(r)),e.optional=()=>jg(e),e.exactOptional=()=>$N(e),e.nullable=()=>Ug(e),e.nullish=()=>jg(Ug(e)),e.nonoptional=r=>GN(e,r),e.array=()=>Zv(e),e.or=r=>Xv([e,r]),e.and=r=>PN(e,r),e.transform=r=>Hg(e,FN(r)),e.default=r=>HN(e,r),e.prefault=r=>qN(e,r),e.catch=r=>ZN(e,r),e.pipe=r=>Hg(e,r),e.readonly=()=>XN(e),e.describe=r=>{const n=e.clone();return ko.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){var r;return(r=ko.get(e))==null?void 0:r.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return ko.get(e);const n=e.clone();return ko.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),qv=X("_ZodString",(e,t)=>{ep.init(e,t),ft.init(e,t),e._zod.processJSONSchema=(n,i,s)=>av(e,n,i);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(HC(...n)),e.includes=(...n)=>e.check(GC(...n)),e.startsWith=(...n)=>e.check(WC(...n)),e.endsWith=(...n)=>e.check(ZC(...n)),e.min=(...n)=>e.check(Qu(...n)),e.max=(...n)=>e.check(iv(...n)),e.length=(...n)=>e.check(sv(...n)),e.nonempty=(...n)=>e.check(Qu(1,...n)),e.lowercase=n=>e.check(VC(n)),e.uppercase=n=>e.check(qC(n)),e.trim=()=>e.check(KC()),e.normalize=(...n)=>e.check(YC(...n)),e.toLowerCase=()=>e.check(XC()),e.toUpperCase=()=>e.check(QC()),e.slugify=()=>e.check(JC())}),JI=X("ZodString",(e,t)=>{ep.init(e,t),qv.init(e,t),e.email=r=>e.check(hC(tN,r)),e.url=r=>e.check(bC(rN,r)),e.jwt=r=>e.check(PC(bN,r)),e.emoji=r=>e.check(yC(nN,r)),e.guid=r=>e.check(Pg(zg,r)),e.uuid=r=>e.check(fC(Xl,r)),e.uuidv4=r=>e.check(mC(Xl,r)),e.uuidv6=r=>e.check(pC(Xl,r)),e.uuidv7=r=>e.check(gC(Xl,r)),e.nanoid=r=>e.check(vC(iN,r)),e.guid=r=>e.check(Pg(zg,r)),e.cuid=r=>e.check(xC(sN,r)),e.cuid2=r=>e.check(EC(aN,r)),e.ulid=r=>e.check(_C(oN,r)),e.base64=r=>e.check(IC(mN,r)),e.base64url=r=>e.check(NC(pN,r)),e.xid=r=>e.check(TC(lN,r)),e.ksuid=r=>e.check(wC(uN,r)),e.ipv4=r=>e.check(kC(cN,r)),e.ipv6=r=>e.check(SC(dN,r)),e.cidrv4=r=>e.check(AC(hN,r)),e.cidrv6=r=>e.check(CC(fN,r)),e.e164=r=>e.check(RC(gN,r)),e.datetime=r=>e.check(LI(r)),e.date=r=>e.check(MI(r)),e.time=r=>e.check(FI(r)),e.duration=r=>e.check($I(r))});function eN(e){return dC(JI,e)}const Et=X("ZodStringFormat",(e,t)=>{bt.init(e,t),qv.init(e,t)}),tN=X("ZodEmail",(e,t)=>{gA.init(e,t),Et.init(e,t)}),zg=X("ZodGUID",(e,t)=>{mA.init(e,t),Et.init(e,t)}),Xl=X("ZodUUID",(e,t)=>{pA.init(e,t),Et.init(e,t)}),rN=X("ZodURL",(e,t)=>{bA.init(e,t),Et.init(e,t)}),nN=X("ZodEmoji",(e,t)=>{yA.init(e,t),Et.init(e,t)}),iN=X("ZodNanoID",(e,t)=>{vA.init(e,t),Et.init(e,t)}),sN=X("ZodCUID",(e,t)=>{xA.init(e,t),Et.init(e,t)}),aN=X("ZodCUID2",(e,t)=>{EA.init(e,t),Et.init(e,t)}),oN=X("ZodULID",(e,t)=>{_A.init(e,t),Et.init(e,t)}),lN=X("ZodXID",(e,t)=>{TA.init(e,t),Et.init(e,t)}),uN=X("ZodKSUID",(e,t)=>{wA.init(e,t),Et.init(e,t)}),cN=X("ZodIPv4",(e,t)=>{IA.init(e,t),Et.init(e,t)}),dN=X("ZodIPv6",(e,t)=>{NA.init(e,t),Et.init(e,t)}),hN=X("ZodCIDRv4",(e,t)=>{RA.init(e,t),Et.init(e,t)}),fN=X("ZodCIDRv6",(e,t)=>{PA.init(e,t),Et.init(e,t)}),mN=X("ZodBase64",(e,t)=>{OA.init(e,t),Et.init(e,t)}),pN=X("ZodBase64URL",(e,t)=>{DA.init(e,t),Et.init(e,t)}),gN=X("ZodE164",(e,t)=>{MA.init(e,t),Et.init(e,t)}),bN=X("ZodJWT",(e,t)=>{FA.init(e,t),Et.init(e,t)}),Gv=X("ZodNumber",(e,t)=>{J6.init(e,t),ft.init(e,t),e._zod.processJSONSchema=(n,i,s)=>ov(e,n,i),e.gt=(n,i)=>e.check(Lg(n,i)),e.gte=(n,i)=>e.check(J0(n,i)),e.min=(n,i)=>e.check(J0(n,i)),e.lt=(n,i)=>e.check(Og(n,i)),e.lte=(n,i)=>e.check(Q0(n,i)),e.max=(n,i)=>e.check(Q0(n,i)),e.int=n=>e.check($g(n)),e.safe=n=>e.check($g(n)),e.positive=n=>e.check(Lg(0,n)),e.nonnegative=n=>e.check(J0(0,n)),e.negative=n=>e.check(Og(0,n)),e.nonpositive=n=>e.check(Q0(0,n)),e.multipleOf=(n,i)=>e.check(Dg(n,i)),e.step=(n,i)=>e.check(Dg(n,i)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function yN(e){return BC(Gv,e)}const vN=X("ZodNumberFormat",(e,t)=>{zA.init(e,t),Gv.init(e,t)});function $g(e){return FC(vN,e)}const xN=X("ZodBoolean",(e,t)=>{$A.init(e,t),ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>lv(e,r,n)});function EN(e){return zC(xN,e)}const _N=X("ZodNull",(e,t)=>{jA.init(e,t),ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>uv(e,r,n)});function TN(e){return $C(_N,e)}const wN=X("ZodUnknown",(e,t)=>{UA.init(e,t),ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>dv()});function ic(){return jC(wN)}const kN=X("ZodNever",(e,t)=>{HA.init(e,t),ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>cv(e,r,n)});function Wv(e){return UC(kN,e)}const SN=X("ZodArray",(e,t)=>{VA.init(e,t),ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>gv(e,r,n,i),e.element=t.element,e.min=(r,n)=>e.check(Qu(r,n)),e.nonempty=r=>e.check(Qu(1,r)),e.max=(r,n)=>e.check(iv(r,n)),e.length=(r,n)=>e.check(sv(r,n)),e.unwrap=()=>e.element});function Zv(e,t){return eI(SN,e,t)}const Yv=X("ZodObject",(e,t)=>{GA.init(e,t),ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>bv(e,r,n,i),Ye(e,"shape",()=>t.shape),e.keyof=()=>Qv(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:ic()}),e.loose=()=>e.clone({...e._zod.def,catchall:ic()}),e.strict=()=>e.clone({...e._zod.def,catchall:Wv()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>dS(e,r),e.safeExtend=r=>hS(e,r),e.merge=r=>fS(e,r),e.pick=r=>uS(e,r),e.omit=r=>cS(e,r),e.partial=(...r)=>mS(Jv,e,r[0]),e.required=(...r)=>pS(e5,e,r[0])});function AN(e,t){const r={type:"object",shape:e??{},..._e(t)};return new Yv(r)}function CN(e,t){return new Yv({type:"object",shape:e,catchall:ic(),..._e(t)})}const Kv=X("ZodUnion",(e,t)=>{rv.init(e,t),ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>yv(e,r,n,i),e.options=t.options});function Xv(e,t){return new Kv({type:"union",options:e,..._e(t)})}const IN=X("ZodDiscriminatedUnion",(e,t)=>{Kv.init(e,t),WA.init(e,t)});function NN(e,t,r){return new IN({type:"union",options:t,discriminator:e,..._e(r)})}const RN=X("ZodIntersection",(e,t)=>{ZA.init(e,t),ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>vv(e,r,n,i)});function PN(e,t){return new RN({type:"intersection",left:e,right:t})}const ON=X("ZodRecord",(e,t)=>{YA.init(e,t),ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>xv(e,r,n,i),e.keyType=t.keyType,e.valueType=t.valueType});function LN(e,t,r){return new ON({type:"record",keyType:e,valueType:t,..._e(r)})}const Fh=X("ZodEnum",(e,t)=>{KA.init(e,t),ft.init(e,t),e._zod.processJSONSchema=(n,i,s)=>hv(e,n,i),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(n,i)=>{const s={};for(const a of n)if(r.has(a))s[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new Fh({...t,checks:[],..._e(i),entries:s})},e.exclude=(n,i)=>{const s={...t.entries};for(const a of n)if(r.has(a))delete s[a];else throw new Error(`Key ${a} not found in enum`);return new Fh({...t,checks:[],..._e(i),entries:s})}});function Qv(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Fh({type:"enum",entries:r,..._e(t)})}const DN=X("ZodLiteral",(e,t)=>{XA.init(e,t),ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>fv(e,r,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function MN(e,t){return new DN({type:"literal",values:Array.isArray(e)?e:[e],..._e(t)})}const BN=X("ZodTransform",(e,t)=>{QA.init(e,t),ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>pv(e,r),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new B6(e.constructor.name);r.addIssue=s=>{if(typeof s=="string")r.issues.push(Qo(s,r.value,t));else{const a=s;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(Qo(a))}};const i=t.transform(r.value,r);return i instanceof Promise?i.then(s=>(r.value=s,r)):(r.value=i,r)}});function FN(e){return new BN({type:"transform",transform:e})}const Jv=X("ZodOptional",(e,t)=>{nv.init(e,t),ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>tp(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function jg(e){return new Jv({type:"optional",innerType:e})}const zN=X("ZodExactOptional",(e,t)=>{JA.init(e,t),ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>tp(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function $N(e){return new zN({type:"optional",innerType:e})}const jN=X("ZodNullable",(e,t)=>{eC.init(e,t),ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Ev(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function Ug(e){return new jN({type:"nullable",innerType:e})}const UN=X("ZodDefault",(e,t)=>{tC.init(e,t),ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Tv(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function HN(e,t){return new UN({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():j6(t)}})}const VN=X("ZodPrefault",(e,t)=>{rC.init(e,t),ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>wv(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function qN(e,t){return new VN({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():j6(t)}})}const e5=X("ZodNonOptional",(e,t)=>{nC.init(e,t),ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>_v(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function GN(e,t){return new e5({type:"nonoptional",innerType:e,..._e(t)})}const WN=X("ZodCatch",(e,t)=>{iC.init(e,t),ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>kv(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ZN(e,t){return new WN({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const YN=X("ZodPipe",(e,t)=>{sC.init(e,t),ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Sv(e,r,n,i),e.in=t.in,e.out=t.out});function Hg(e,t){return new YN({type:"pipe",in:e,out:t})}const KN=X("ZodReadonly",(e,t)=>{aC.init(e,t),ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Av(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function XN(e){return new KN({type:"readonly",innerType:e})}const QN=X("ZodLazy",(e,t)=>{oC.init(e,t),ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Cv(e,r,n,i),e.unwrap=()=>e._zod.def.getter()});function JN(e){return new QN({type:"lazy",getter:e})}const rp=X("ZodCustom",(e,t)=>{lC.init(e,t),ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>mv(e,r)});function eR(e,t){return tI(rp,e??(()=>!0),t)}function tR(e,t={}){return rI(rp,e,t)}function rR(e){return nI(e)}function nR(e,t={}){const r=new rp({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,..._e(t)});return r._zod.bag.Class=e,r._zod.check=n=>{n.value instanceof e||n.issues.push({code:"invalid_type",expected:e.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}let ed=class extends Error{constructor(t,r){super(t),this.name="ParseError",this.type=r.type,this.field=r.field,this.value=r.value,this.line=r.line}};const Vg=10,iR=13,es=32;function td(e){}function sR(e){if(typeof e=="function")throw new TypeError("`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?");const{onEvent:t=td,onError:r=td,onRetry:n=td,onComment:i,maxBufferSize:s}=e,a=[];let o=0,l=!0,u,c="",d=0,h,f=!1;function m(A){if(f)throw new Error("Cannot feed parser: it was terminated after exceeding the configured max buffer size. Call `reset()` to resume parsing.");if(l&&(l=!1,A.charCodeAt(0)===239&&A.charCodeAt(1)===187&&A.charCodeAt(2)===191&&(A=A.slice(3))),a.length===0){const N=y(A);N!==""&&(a.push(N),o=N.length),b();return}if(A.indexOf(`
43
- `)===-1&&A.indexOf("\r")===-1){a.push(A),o+=A.length,b();return}a.push(A);const S=a.join("");a.length=0,o=0;const I=y(S);I!==""&&(a.push(I),o=I.length),b()}function b(){s!==void 0&&(o+c.length<=s||(f=!0,a.length=0,o=0,u=void 0,c="",d=0,h=void 0,r(new ed(`Buffered data exceeded max buffer size of ${s} characters`,{type:"max-buffer-size-exceeded"}))))}function y(A){let S=0;if(A.indexOf("\r")===-1){let I=A.indexOf(`
44
- `,S);for(;I!==-1;){if(S===I){d>0&&t({id:u,event:h,data:c}),u=void 0,c="",d=0,h=void 0,S=I+1,I=A.indexOf(`
45
- `,S);continue}const N=A.charCodeAt(S);if(qg(A,S,N)){const U=A.charCodeAt(S+5)===es?S+6:S+5,z=A.slice(U,I);if(d===0&&A.charCodeAt(I+1)===Vg){t({id:u,event:h,data:z}),u=void 0,c="",h=void 0,S=I+2,I=A.indexOf(`
46
- `,S);continue}c=d===0?z:`${c}
47
- ${z}`,d++}else Gg(A,S,N)?h=A.slice(A.charCodeAt(S+6)===es?S+7:S+6,I)||void 0:E(A,S,I);S=I+1,I=A.indexOf(`
48
- `,S)}return A.slice(S)}for(;S<A.length;){const I=A.indexOf("\r",S),N=A.indexOf(`
49
- `,S);let U=-1;if(I!==-1&&N!==-1?U=I<N?I:N:I!==-1?I===A.length-1?U=-1:U=I:N!==-1&&(U=N),U===-1)break;E(A,S,U),S=U+1,A.charCodeAt(S-1)===iR&&A.charCodeAt(S)===Vg&&S++}return A.slice(S)}function E(A,S,I){if(S===I){x();return}const N=A.charCodeAt(S);if(qg(A,S,N)){const J=A.charCodeAt(S+5)===es?S+6:S+5,Y=A.slice(J,I);c=d===0?Y:`${c}
50
- ${Y}`,d++;return}if(Gg(A,S,N)){h=A.slice(A.charCodeAt(S+6)===es?S+7:S+6,I)||void 0;return}if(N===105&&A.charCodeAt(S+1)===100&&A.charCodeAt(S+2)===58){const J=A.slice(A.charCodeAt(S+3)===es?S+4:S+3,I);J.includes("\0")||(u=J);return}if(N===58){if(i){const J=A.slice(S,I);i(J.slice(A.charCodeAt(S+1)===es?2:1))}return}const U=A.slice(S,I),z=U.indexOf(":");if(z===-1){w(U,"",U);return}const Z=U.slice(0,z),V=U.charCodeAt(z+1)===es?2:1,ae=U.slice(z+V);w(Z,ae,U)}function w(A,S,I){switch(A){case"event":h=S||void 0;break;case"data":c=d===0?S:`${c}
51
- ${S}`,d++;break;case"id":S.includes("\0")||(u=S);break;case"retry":/^\d+$/.test(S)?n(parseInt(S,10)):r(new ed(`Invalid \`retry\` value: "${S}"`,{type:"invalid-retry",value:S,line:I}));break;default:r(new ed(`Unknown field "${A.length>20?`${A.slice(0,20)}…`:A}"`,{type:"unknown-field",field:A,value:S,line:I}));break}}function x(){d>0&&t({id:u,event:h,data:c}),u=void 0,c="",d=0,h=void 0}function _(A={}){if(A.consume&&a.length>0){const S=a.join("");E(S,0,S.length)}l=!0,u=void 0,c="",d=0,h=void 0,a.length=0,o=0,f=!1}return{feed:m,reset:_}}function qg(e,t,r){return r===100&&e.charCodeAt(t+1)===97&&e.charCodeAt(t+2)===116&&e.charCodeAt(t+3)===97&&e.charCodeAt(t+4)===58}function Gg(e,t,r){return r===101&&e.charCodeAt(t+1)===118&&e.charCodeAt(t+2)===101&&e.charCodeAt(t+3)===110&&e.charCodeAt(t+4)===116&&e.charCodeAt(t+5)===58}class aR extends TransformStream{constructor({onError:t,onRetry:r,onComment:n,maxBufferSize:i}={}){let s;super({start(a){s=sR({onEvent:o=>{a.enqueue(o)},onError(o){typeof t=="function"&&t(o),(t==="terminate"||o.type==="max-buffer-size-exceeded")&&a.error(o)},onRetry:r,onComment:n,maxBufferSize:i})},transform(a){s.feed(a)}})}}new TextDecoder;function Zs(e){if(e==null)return{};const t={};if(e instanceof Headers)e.forEach((r,n)=>{t[n.toLowerCase()]=r});else{Array.isArray(e)||(e=Object.entries(e));for(const[r,n]of e)n!=null&&(t[r.toLowerCase()]=n)}return t}const ir=({prefix:e,size:t=16,alphabet:r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:n="-"}={})=>{const i=()=>{const s=r.length,a=new Array(t);for(let o=0;o<t;o++)a[o]=r[Math.random()*s|0];return a.join("")};if(e==null)return i;if(r.includes(n))throw new CI({argument:"separator",message:`The separator "${n}" must not be part of the alphabet "${r}".`});return()=>`${e}${n}${i()}`},oR=ir();function lR(e){var t;return((t=globalThis.Buffer)==null?void 0:t.isBuffer(e))??!1}const uR=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,cR=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function Wg(e){const t=JSON.parse(e);return t===null||typeof t!="object"||uR.test(e)===!1&&cR.test(e)===!1?t:dR(t)}function dR(e){let t=[e];for(;t.length;){const r=t;t=[];for(const n of r){if(Object.prototype.hasOwnProperty.call(n,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(n,"constructor")&&n.constructor!==null&&typeof n.constructor=="object"&&Object.prototype.hasOwnProperty.call(n.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const i in n){const s=n[i];s&&typeof s=="object"&&t.push(s)}}}return e}function hR(e){const{stackTraceLimit:t}=Error;try{Error.stackTraceLimit=0}catch{return Wg(e)}try{return Wg(e)}finally{Error.stackTraceLimit=t}}function np(e){if(e.type==="object"||Array.isArray(e.type)&&e.type.includes("object")){const{additionalProperties:r}=e;e.additionalProperties=r!=null&&typeof r!="boolean"?hi(r):!1;const{properties:n}=e;if(n!=null)for(const i of Object.keys(n))n[i]=hi(n[i])}e.items!=null&&(e.items=Array.isArray(e.items)?e.items.map(hi):hi(e.items)),e.anyOf!=null&&(e.anyOf=e.anyOf.map(hi)),e.allOf!=null&&(e.allOf=e.allOf.map(hi)),e.oneOf!=null&&(e.oneOf=e.oneOf.map(hi));const{definitions:t}=e;if(t!=null)for(const r of Object.keys(t))t[r]=hi(t[r]);return e}function hi(e){return typeof e=="boolean"?e:np(e)}const fR=Symbol("Let zodToJsonSchema decide on which parser to use"),Zg={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},mR=e=>typeof e=="string"?{...Zg,name:e}:{...Zg,...e};function Rr(){return{}}function pR(e,t){var n,i,s;const r={type:"array"};return(n=e.type)!=null&&n._def&&((s=(i=e.type)==null?void 0:i._def)==null?void 0:s.typeName)!=="ZodAny"&&(r.items=Je(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&(r.minItems=e.minLength.value),e.maxLength&&(r.maxItems=e.maxLength.value),e.exactLength&&(r.minItems=e.exactLength.value,r.maxItems=e.exactLength.value),r}function gR(e){const t={type:"integer",format:"int64"};if(!e.checks)return t;for(const r of e.checks)switch(r.kind){case"min":r.inclusive?t.minimum=r.value:t.exclusiveMinimum=r.value;break;case"max":r.inclusive?t.maximum=r.value:t.exclusiveMaximum=r.value;break;case"multipleOf":t.multipleOf=r.value}return t}function bR(){return{type:"boolean"}}function t5(e,t){return Je(e.type._def,t)}const yR=(e,t)=>Je(e.innerType._def,t);function r5(e,t,r){const n=r??t.dateStrategy;if(Array.isArray(n))return{anyOf:n.map(i=>r5(e,t,i))};switch(n){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return vR(e)}}const vR=e=>{const t={type:"integer",format:"unix-time"};for(const r of e.checks)switch(r.kind){case"min":t.minimum=r.value;break;case"max":t.maximum=r.value}return t};function xR(e,t){return{...Je(e.innerType._def,t),default:e.defaultValue()}}function ER(e,t){return t.effectStrategy==="input"?Je(e.schema._def,t):Rr()}function _R(e){return{type:"string",enum:Array.from(e.values)}}const TR=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function wR(e,t){const r=[Je(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),Je(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(i=>!!i),n=[];return r.forEach(i=>{if(TR(i))n.push(...i.allOf);else{let s=i;if("additionalProperties"in i&&i.additionalProperties===!1){const{additionalProperties:a,...o}=i;s=o}n.push(s)}}),n.length?{allOf:n}:void 0}function kR(e){const t=typeof e.value;return t!=="bigint"&&t!=="number"&&t!=="boolean"&&t!=="string"?{type:Array.isArray(e.value)?"array":"object"}:{type:t==="bigint"?"integer":t,const:e.value}}let rd;const rn={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(rd===void 0&&(rd=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),rd),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function n5(e,t){const r={type:"string"};if(e.checks)for(const n of e.checks)switch(n.kind){case"min":r.minLength=typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value;break;case"max":r.maxLength=typeof r.maxLength=="number"?Math.min(r.maxLength,n.value):n.value;break;case"email":switch(t.emailStrategy){case"format:email":nn(r,"email",n.message,t);break;case"format:idn-email":nn(r,"idn-email",n.message,t);break;case"pattern:zod":or(r,rn.email,n.message,t)}break;case"url":nn(r,"uri",n.message,t);break;case"uuid":nn(r,"uuid",n.message,t);break;case"regex":or(r,n.regex,n.message,t);break;case"cuid":or(r,rn.cuid,n.message,t);break;case"cuid2":or(r,rn.cuid2,n.message,t);break;case"startsWith":or(r,RegExp(`^${nd(n.value,t)}`),n.message,t);break;case"endsWith":or(r,RegExp(`${nd(n.value,t)}$`),n.message,t);break;case"datetime":nn(r,"date-time",n.message,t);break;case"date":nn(r,"date",n.message,t);break;case"time":nn(r,"time",n.message,t);break;case"duration":nn(r,"duration",n.message,t);break;case"length":r.minLength=typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value,r.maxLength=typeof r.maxLength=="number"?Math.min(r.maxLength,n.value):n.value;break;case"includes":or(r,RegExp(nd(n.value,t)),n.message,t);break;case"ip":n.version!=="v6"&&nn(r,"ipv4",n.message,t),n.version!=="v4"&&nn(r,"ipv6",n.message,t);break;case"base64url":or(r,rn.base64url,n.message,t);break;case"jwt":or(r,rn.jwt,n.message,t);break;case"cidr":n.version!=="v6"&&or(r,rn.ipv4Cidr,n.message,t),n.version!=="v4"&&or(r,rn.ipv6Cidr,n.message,t);break;case"emoji":or(r,rn.emoji(),n.message,t);break;case"ulid":or(r,rn.ulid,n.message,t);break;case"base64":switch(t.base64Strategy){case"format:binary":nn(r,"binary",n.message,t);break;case"contentEncoding:base64":r.contentEncoding="base64";break;case"pattern:zod":or(r,rn.base64,n.message,t)}break;case"nanoid":or(r,rn.nanoid,n.message,t)}return r}function nd(e,t){return t.patternStrategy==="escape"?AR(e):e}const SR=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function AR(e){let t="";for(let r=0;r<e.length;r++)SR.has(e[r])||(t+="\\"),t+=e[r];return t}function nn(e,t,r,n){var i;e.format||(i=e.anyOf)!=null&&i.some(s=>s.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format}),delete e.format),e.anyOf.push({format:t,...r&&n.errorMessages&&{errorMessage:{format:r}}})):e.format=t}function or(e,t,r,n){var i;e.pattern||(i=e.allOf)!=null&&i.some(s=>s.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push({pattern:Yg(t,n),...r&&n.errorMessages&&{errorMessage:{pattern:r}}})):e.pattern=Yg(t,n)}function Yg(e,t){var l;if(!t.applyRegexFlags||!e.flags)return e.source;const r={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},n=r.i?e.source.toLowerCase():e.source;let i="",s=!1,a=!1,o=!1;for(let u=0;u<n.length;u++){if(s){i+=n[u],s=!1;continue}if(r.i){if(a){if(n[u].match(/[a-z]/)){o?(i+=n[u],i+=`${n[u-2]}-${n[u]}`.toUpperCase(),o=!1):n[u+1]==="-"&&((l=n[u+2])!=null&&l.match(/[a-z]/))?(i+=n[u],o=!0):i+=`${n[u]}${n[u].toUpperCase()}`;continue}}else if(n[u].match(/[a-z]/)){i+=`[${n[u]}${n[u].toUpperCase()}]`;continue}}if(r.m){if(n[u]==="^"){i+=`(^|(?<=[\r
52
- ]))`;continue}else if(n[u]==="$"){i+=`($|(?=[\r
53
- ]))`;continue}}if(r.s&&n[u]==="."){i+=a?`${n[u]}\r
54
- `:`[${n[u]}\r
55
- ]`;continue}i+=n[u],n[u]==="\\"?s=!0:a&&n[u]==="]"?a=!1:!a&&n[u]==="["&&(a=!0)}try{new RegExp(i)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return i}function i5(e,t){var n,i,s,a,o;const r={type:"object",additionalProperties:Je(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??t.allowedAdditionalProperties};if(((n=e.keyType)==null?void 0:n._def.typeName)==="ZodString"&&((i=e.keyType._def.checks)!=null&&i.length)){const{type:l,...u}=n5(e.keyType._def,t);return{...r,propertyNames:u}}else{if(((s=e.keyType)==null?void 0:s._def.typeName)==="ZodEnum")return{...r,propertyNames:{enum:e.keyType._def.values}};if(((a=e.keyType)==null?void 0:a._def.typeName)==="ZodBranded"&&e.keyType._def.type._def.typeName==="ZodString"&&((o=e.keyType._def.type._def.checks)!=null&&o.length)){const{type:l,...u}=t5(e.keyType._def,t);return{...r,propertyNames:u}}}return r}function CR(e,t){return t.mapStrategy==="record"?i5(e,t):{type:"array",maxItems:125,items:{type:"array",items:[Je(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||Rr(),Je(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||Rr()],minItems:2,maxItems:2}}}function IR(e){const t=e.values,r=Object.keys(e.values).filter(i=>typeof t[t[i]]!="number").map(i=>t[i]),n=Array.from(new Set(r.map(i=>typeof i)));return{type:n.length===1?n[0]==="string"?"string":"number":["string","number"],enum:r}}function NR(){return{not:Rr()}}function RR(){return{type:"null"}}const zh={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function PR(e,t){const r=e.options instanceof Map?Array.from(e.options.values()):e.options;if(r.every(n=>n._def.typeName in zh&&(!n._def.checks||!n._def.checks.length))){const n=r.reduce((i,s)=>{const a=zh[s._def.typeName];return a&&!i.includes(a)?[...i,a]:i},[]);return{type:n.length>1?n:n[0]}}else if(r.every(n=>n._def.typeName==="ZodLiteral"&&!n.description)){const n=r.reduce((i,s)=>{const a=typeof s._def.value;switch(a){case"string":case"number":case"boolean":return[...i,a];case"bigint":return[...i,"integer"];case"object":if(s._def.value===null)return[...i,"null"];default:return i}},[]);if(n.length===r.length){const i=n.filter((s,a,o)=>o.indexOf(s)===a);return{type:i.length>1?i:i[0],enum:r.reduce((s,a)=>s.includes(a._def.value)?s:[...s,a._def.value],[])}}}else if(r.every(n=>n._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((n,i)=>[...n,...i._def.values.filter(s=>!n.includes(s))],[])};return OR(e,t)}const OR=(e,t)=>{const r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((n,i)=>Je(n._def,{...t,currentPath:[...t.currentPath,"anyOf",`${i}`]})).filter(n=>!!n&&(!t.strictUnions||typeof n=="object"&&Object.keys(n).length>0));return r.length?{anyOf:r}:void 0};function LR(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[zh[e.innerType._def.typeName],"null"]};const r=Je(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}function DR(e){const t={type:"number"};if(!e.checks)return t;for(const r of e.checks)switch(r.kind){case"int":t.type="integer";break;case"min":r.inclusive?t.minimum=r.value:t.exclusiveMinimum=r.value;break;case"max":r.inclusive?t.maximum=r.value:t.exclusiveMaximum=r.value;break;case"multipleOf":t.multipleOf=r.value}return t}function MR(e,t){const r={type:"object",properties:{}},n=[],i=e.shape();for(const a in i){let o=i[a];if(o===void 0||o._def===void 0)continue;const l=FR(o),u=Je(o._def,{...t,currentPath:[...t.currentPath,"properties",a],propertyPath:[...t.currentPath,"properties",a]});u!==void 0&&(r.properties[a]=u,l||n.push(a))}n.length&&(r.required=n);const s=BR(e,t);return s!==void 0&&(r.additionalProperties=s),r}function BR(e,t){if(e.catchall._def.typeName!=="ZodNever")return Je(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function FR(e){try{return e.isOptional()}catch{return!0}}const zR=(e,t)=>{var n;if(t.currentPath.toString()===((n=t.propertyPath)==null?void 0:n.toString()))return Je(e.innerType._def,t);const r=Je(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return r?{anyOf:[{not:Rr()},r]}:Rr()},$R=(e,t)=>{if(t.pipeStrategy==="input")return Je(e.in._def,t);if(t.pipeStrategy==="output")return Je(e.out._def,t);const r=Je(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]});return{allOf:[r,Je(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",r?"1":"0"]})].filter(n=>n!==void 0)}};function jR(e,t){return Je(e.type._def,t)}function UR(e,t){const r={type:"array",uniqueItems:!0,items:Je(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&(r.minItems=e.minSize.value),e.maxSize&&(r.maxItems=e.maxSize.value),r}function HR(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((r,n)=>Je(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[]),additionalItems:Je(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((r,n)=>Je(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[])}}function VR(){return{not:Rr()}}function qR(){return Rr()}const GR=(e,t)=>Je(e.innerType._def,t),WR=(e,t,r)=>{switch(t){case"ZodString":return n5(e,r);case"ZodNumber":return DR(e);case"ZodObject":return MR(e,r);case"ZodBigInt":return gR(e);case"ZodBoolean":return bR();case"ZodDate":return r5(e,r);case"ZodUndefined":return VR();case"ZodNull":return RR();case"ZodArray":return pR(e,r);case"ZodUnion":case"ZodDiscriminatedUnion":return PR(e,r);case"ZodIntersection":return wR(e,r);case"ZodTuple":return HR(e,r);case"ZodRecord":return i5(e,r);case"ZodLiteral":return kR(e);case"ZodEnum":return _R(e);case"ZodNativeEnum":return IR(e);case"ZodNullable":return LR(e,r);case"ZodOptional":return zR(e,r);case"ZodMap":return CR(e,r);case"ZodSet":return UR(e,r);case"ZodLazy":return()=>e.getter()._def;case"ZodPromise":return jR(e,r);case"ZodNaN":case"ZodNever":return NR();case"ZodEffects":return ER(e,r);case"ZodAny":return Rr();case"ZodUnknown":return qR();case"ZodDefault":return xR(e,r);case"ZodBranded":return t5(e,r);case"ZodReadonly":return GR(e,r);case"ZodCatch":return yR(e,r);case"ZodPipeline":return $R(e,r);case"ZodFunction":case"ZodVoid":case"ZodSymbol":return;default:return(n=>{})()}},ZR=(e,t)=>{let r=0;for(;r<e.length&&r<t.length&&e[r]===t[r];r++);return[(e.length-r).toString(),...t.slice(r)].join("/")};function Je(e,t,r=!1){var o;const n=t.seen.get(e);if(t.override){const l=(o=t.override)==null?void 0:o.call(t,e,t,n,r);if(l!==fR)return l}if(n&&!r){const l=YR(n,t);if(l!==void 0)return l}const i={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,i);const s=WR(e,e.typeName,t),a=typeof s=="function"?Je(s(),t):s;if(a&&KR(e,t,a),t.postProcess){const l=t.postProcess(a,e,t);return i.jsonSchema=a,l}return i.jsonSchema=a,a}const YR=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:ZR(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((r,n)=>t.currentPath[n]===r)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),Rr()):t.$refStrategy==="seen"?Rr():void 0}},KR=(e,t,r)=>(e.description&&(r.description=e.description),r),XR=e=>{const t=mR(e),r=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([n,i])=>[i._def,{def:i._def,path:[...t.basePath,t.definitionPath,n],jsonSchema:void 0}]))}},QR=(e,t)=>{const r=XR(t);let n=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((l,[u,c])=>({...l,[u]:Je(c._def,{...r,currentPath:[...r.basePath,r.definitionPath,u]},!0)??Rr()}),{}):void 0;const i=typeof t=="string"?t:(t==null?void 0:t.nameStrategy)==="title"||t==null?void 0:t.name,s=Je(e._def,i===void 0?r:{...r,currentPath:[...r.basePath,r.definitionPath,i]},!1)??Rr(),a=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;a!==void 0&&(s.title=a);const o=i===void 0?n?{...s,[r.definitionPath]:n}:s:{$ref:[...r.$refStrategy==="relative"?[]:r.basePath,r.definitionPath,i].join("/"),[r.definitionPath]:{...n,[i]:s}};return o.$schema="http://json-schema.org/draft-07/schema#",o},$h=Symbol.for("vercel.ai.schema");function JR(e){let t;return()=>(t==null&&(t=e()),t)}function n0(e,{validate:t}={}){return{[$h]:!0,_type:void 0,get jsonSchema(){return typeof e=="function"&&(e=e()),e},validate:t}}function eP(e){return typeof e=="object"&&e!==null&&$h in e&&e[$h]===!0&&"jsonSchema"in e&&"validate"in e}function tP(e){return e==null?n0({type:"object",properties:{},additionalProperties:!1}):eP(e)?e:"~standard"in e?e["~standard"].vendor==="zod"?s5(e):rP(e):e()}function rP(e){return n0(()=>{if(!nP(e))throw new Error(`Standard schema vendor '${e["~standard"].vendor}' does not support JSON Schema conversion.`);return np(e["~standard"].jsonSchema.input({target:"draft-07"}))},{validate:async t=>{const r=await e["~standard"].validate(t);return"value"in r?{success:!0,value:r.value}:{success:!1,error:new nc({value:t,cause:r.issues})}}})}function nP(e){return e["~standard"].jsonSchema!=null}function iP(e,t){return n0(()=>QR(e,{$refStrategy:"none"}),{validate:async r=>{const n=await e.safeParseAsync(r);return n.success?{success:!0,value:n.data}:{success:!1,error:n.error}}})}function sP(e,t){return n0(()=>np(_I(e,{target:"draft-7",io:"input",reused:"inline"})),{validate:async r=>{const n=await Vv(e,r);return n.success?{success:!0,value:n.data}:{success:!1,error:n.error}}})}function aP(e){return"_zod"in e}function s5(e,t){return aP(e)?sP(e):iP(e)}async function Kg({value:e,schema:t,context:r}){const n=await a5({value:e,schema:t,context:r});if(!n.success)throw nc.wrap({value:e,cause:n.error,context:r});return n.value}async function a5({value:e,schema:t,context:r}){const n=tP(t);try{if(n.validate==null)return{success:!0,value:e,rawValue:e};const i=await n.validate(e);return i.success?{success:!0,value:i.value,rawValue:e}:{success:!1,error:nc.wrap({value:e,cause:i.error,context:r}),rawValue:e}}catch(i){return{success:!1,error:nc.wrap({value:e,cause:i,context:r}),rawValue:e}}}async function jh({text:e,schema:t}){try{const r=hR(e);return t==null?{success:!0,value:r,rawValue:r}:await a5({value:r,schema:t})}catch(r){return{success:!1,error:Fg.isInstance(r)?r:new Fg({text:e,cause:r}),rawValue:void 0}}}function oP({stream:e,schema:t}){return e.pipeThrough(new TextDecoderStream).pipeThrough(new aR).pipeThrough(new TransformStream({async transform({data:r},n){r!=="[DONE]"&&n.enqueue(await jh({text:r,schema:t}))}}))}async function Ys(e){return typeof e=="function"&&(e=e()),e}new TextDecoder;const o5="AI_InvalidArgumentError",l5=`vercel.ai.error.${o5}`,lP=Symbol.for(l5);var Pu=class extends nr{constructor({parameter:e,value:t,message:r}){super({name:o5,message:`Invalid argument for parameter ${e}: ${r}`}),this[lP]=!0,this.parameter=e,this.value=t}static isInstance(e){return nr.hasMarker(e,l5)}};const u5="AI_UIMessageStreamError",c5=`vercel.ai.error.${u5}`,uP=Symbol.for(c5);var ts=class extends nr{constructor({chunkType:e,chunkId:t,message:r}){super({name:u5,message:r}),this[uP]=!0,this.chunkType=e,this.chunkId=t}static isInstance(e){return nr.hasMarker(e,c5)}};function d5(e,t){if(e===void 0&&t===void 0)return;if(e===void 0)return t;if(t===void 0)return e;const r={...e};for(const n in t)if(!(n==="__proto__"||n==="constructor"||n==="prototype")&&Object.prototype.hasOwnProperty.call(t,n)){const i=t[n];if(i===void 0)continue;const s=n in e?e[n]:void 0,a=i!==null&&typeof i=="object"&&!Array.isArray(i)&&!(i instanceof Date)&&!(i instanceof RegExp),o=s!=null&&typeof s=="object"&&!Array.isArray(s)&&!(s instanceof Date)&&!(s instanceof RegExp);a&&o?r[n]=d5(s,i):r[n]=i}return r}const P={array:Zv,boolean:EN,custom:eR,discriminatedUnion:NN,enum:Qv,instanceof:nR,lazy:JN,literal:MN,looseObject:CN,never:Wv,null:TN,number:yN,object:AN,record:LN,string:eN,union:Xv,unknown:ic},Is=P.lazy(()=>P.union([P.null(),P.string(),P.number(),P.boolean(),P.record(P.string(),Is.optional()),P.array(Is)])),Pe=P.record(P.string(),P.record(P.string(),Is.optional())),Tl=P.union([P.string(),P.instanceof(Uint8Array),P.instanceof(ArrayBuffer),P.custom(lR,{message:"Must be a Buffer"})]),ip=P.record(P.string(),P.string()),h5=P.object({type:P.literal("text"),text:P.string(),providerOptions:Pe.optional()}),cP=P.object({type:P.literal("image"),image:P.union([Tl,P.instanceof(URL),ip]),mediaType:P.string().optional(),providerOptions:Pe.optional()}),f5=P.discriminatedUnion("type",[P.object({type:P.literal("data"),data:Tl}),P.object({type:P.literal("url"),url:P.instanceof(URL)}),P.object({type:P.literal("reference"),reference:ip}),P.object({type:P.literal("text"),text:P.string()})]),dP=P.discriminatedUnion("type",[P.object({type:P.literal("data"),data:Tl}),P.object({type:P.literal("url"),url:P.instanceof(URL)})]),m5=P.object({type:P.literal("file"),data:P.union([f5,Tl,P.instanceof(URL),ip]),filename:P.string().optional(),mediaType:P.string(),providerOptions:Pe.optional()}),hP=P.object({type:P.literal("reasoning"),text:P.string(),providerOptions:Pe.optional()}),fP=P.object({type:P.literal("custom"),kind:P.string().transform(e=>e),providerOptions:Pe.optional()}),mP=P.object({type:P.literal("reasoning-file"),data:P.union([dP,Tl,P.instanceof(URL)]),mediaType:P.string(),providerOptions:Pe.optional()}),pP=P.object({type:P.literal("tool-call"),toolCallId:P.string(),toolName:P.string(),input:P.unknown(),providerOptions:Pe.optional(),providerExecuted:P.boolean().optional()}),gP=P.discriminatedUnion("type",[P.object({type:P.literal("text"),value:P.string(),providerOptions:Pe.optional()}),P.object({type:P.literal("json"),value:Is,providerOptions:Pe.optional()}),P.object({type:P.literal("execution-denied"),reason:P.string().optional(),providerOptions:Pe.optional()}),P.object({type:P.literal("error-text"),value:P.string(),providerOptions:Pe.optional()}),P.object({type:P.literal("error-json"),value:Is,providerOptions:Pe.optional()}),P.object({type:P.literal("content"),value:P.array(P.union([P.object({type:P.literal("text"),text:P.string(),providerOptions:Pe.optional()}),P.object({type:P.literal("file"),data:f5,mediaType:P.string(),filename:P.string().optional(),providerOptions:Pe.optional()}),P.object({type:P.literal("file-data"),data:P.string(),mediaType:P.string(),filename:P.string().optional(),providerOptions:Pe.optional()}),P.object({type:P.literal("file-url"),url:P.string(),mediaType:P.string().optional(),providerOptions:Pe.optional()}),P.object({type:P.literal("file-id"),fileId:P.union([P.string(),P.record(P.string(),P.string())]),providerOptions:Pe.optional()}),P.object({type:P.literal("file-reference"),providerReference:P.record(P.string(),P.string()),providerOptions:Pe.optional()}),P.object({type:P.literal("image-data"),data:P.string(),mediaType:P.string(),providerOptions:Pe.optional()}),P.object({type:P.literal("image-url"),url:P.string(),providerOptions:Pe.optional()}),P.object({type:P.literal("image-file-id"),fileId:P.union([P.string(),P.record(P.string(),P.string())]),providerOptions:Pe.optional()}),P.object({type:P.literal("image-file-reference"),providerReference:P.record(P.string(),P.string()),providerOptions:Pe.optional()}),P.object({type:P.literal("custom"),providerOptions:Pe.optional()})]))})]),p5=P.object({type:P.literal("tool-result"),toolCallId:P.string(),toolName:P.string(),output:gP,providerOptions:Pe.optional()}),bP=P.object({type:P.literal("tool-approval-request"),approvalId:P.string(),toolCallId:P.string(),reason:P.string().optional(),isAutomatic:P.boolean().optional(),signature:P.string().optional(),inputSchemaInput:P.unknown().optional()}),yP=P.object({type:P.literal("tool-approval-response"),approvalId:P.string(),approved:P.boolean(),reason:P.string().optional()}),vP=P.object({role:P.literal("system"),content:P.string(),providerOptions:Pe.optional()}),xP=P.object({role:P.literal("user"),content:P.union([P.string(),P.array(P.union([h5,cP,m5]))]),providerOptions:Pe.optional()}),EP=P.object({role:P.literal("assistant"),content:P.union([P.string(),P.array(P.union([h5,fP,m5,hP,mP,pP,p5,bP]))]),providerOptions:Pe.optional()}),_P=P.object({role:P.literal("tool"),content:P.array(P.union([p5,yP])),providerOptions:Pe.optional()});P.union([vP,xP,EP,_P]);function TP(e){const t=["ROOT"];let r=-1,n=null,i=0;function s(c){return c>="0"&&c<="9"||c>="A"&&c<="F"||c>="a"&&c<="f"}function a(c,d,h){switch(c){case'"':r=d,t.pop(),t.push(h),t.push("INSIDE_STRING");break;case"f":case"t":case"n":r=d,n=d,t.pop(),t.push(h),t.push("INSIDE_LITERAL");break;case"-":t.pop(),t.push(h),t.push("INSIDE_NUMBER");break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":r=d,t.pop(),t.push(h),t.push("INSIDE_NUMBER");break;case"{":r=d,t.pop(),t.push(h),t.push("INSIDE_OBJECT_START");break;case"[":r=d,t.pop(),t.push(h),t.push("INSIDE_ARRAY_START")}}function o(c,d){switch(c){case",":t.pop(),t.push("INSIDE_OBJECT_AFTER_COMMA");break;case"}":r=d,t.pop()}}function l(c,d){switch(c){case",":t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break;case"]":r=d,t.pop()}}for(let c=0;c<e.length;c++){const d=e[c];switch(t[t.length-1]){case"ROOT":a(d,c,"FINISH");break;case"INSIDE_OBJECT_START":switch(d){case'"':t.pop(),t.push("INSIDE_OBJECT_KEY");break;case"}":r=c,t.pop()}break;case"INSIDE_OBJECT_AFTER_COMMA":switch(d){case'"':t.pop(),t.push("INSIDE_OBJECT_KEY")}break;case"INSIDE_OBJECT_KEY":switch(d){case'"':t.pop(),t.push("INSIDE_OBJECT_AFTER_KEY")}break;case"INSIDE_OBJECT_AFTER_KEY":switch(d){case":":t.pop(),t.push("INSIDE_OBJECT_BEFORE_VALUE")}break;case"INSIDE_OBJECT_BEFORE_VALUE":a(d,c,"INSIDE_OBJECT_AFTER_VALUE");break;case"INSIDE_OBJECT_AFTER_VALUE":o(d,c);break;case"INSIDE_STRING":switch(d){case'"':t.pop(),r=c;break;case"\\":t.push("INSIDE_STRING_ESCAPE");break;default:r=c}break;case"INSIDE_ARRAY_START":switch(d){case"]":r=c,t.pop();break;default:r=c,a(d,c,"INSIDE_ARRAY_AFTER_VALUE")}break;case"INSIDE_ARRAY_AFTER_VALUE":switch(d){case",":t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break;case"]":r=c,t.pop();break;default:r=c}break;case"INSIDE_ARRAY_AFTER_COMMA":a(d,c,"INSIDE_ARRAY_AFTER_VALUE");break;case"INSIDE_STRING_ESCAPE":t.pop(),d==="u"?(i=0,t.push("INSIDE_STRING_UNICODE_ESCAPE")):r=c;break;case"INSIDE_STRING_UNICODE_ESCAPE":s(d)&&(i++,i===4&&(t.pop(),r=c));break;case"INSIDE_NUMBER":switch(d){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":r=c;break;case"e":case"E":case"-":case".":break;case",":t.pop(),t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&l(d,c),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&o(d,c);break;case"}":t.pop(),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&o(d,c);break;case"]":t.pop(),t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&l(d,c);break;default:t.pop()}break;case"INSIDE_LITERAL":{const h=e.substring(n,c+1);!"false".startsWith(h)&&!"true".startsWith(h)&&!"null".startsWith(h)?(t.pop(),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"?o(d,c):t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&l(d,c)):r=c;break}}}let u=e.slice(0,r+1);for(let c=t.length-1;c>=0;c--)switch(t[c]){case"INSIDE_STRING":u+='"';break;case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":u+="}";break;case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":u+="]";break;case"INSIDE_LITERAL":{const d=e.substring(n,e.length);"true".startsWith(d)?u+="true".slice(d.length):"false".startsWith(d)?u+="false".slice(d.length):"null".startsWith(d)&&(u+="null".slice(d.length))}}return u}async function wP(e){if(e===void 0)return{value:void 0,state:"undefined-input"};let t=await jh({text:e});return t.success?{value:t.value,state:"successful-parse"}:(t=await jh({text:TP(e)}),t.success?{value:t.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"})}new TextEncoder;new TextEncoder;ir({prefix:"aitxt",size:24});ir({prefix:"call",size:24});(class extends TransformStream{constructor(){super({transform(e,t){t.enqueue(`data: ${JSON.stringify(e)}
56
-
57
- `)},flush(e){e.enqueue(`data: [DONE]
58
-
59
- `)}})}});const ho=P.record(P.string(),Is.optional()),kP=JR(()=>s5(P.union([P.looseObject({type:P.literal("text-start"),id:P.string(),providerMetadata:Pe.optional()}),P.looseObject({type:P.literal("text-delta"),id:P.string(),delta:P.string(),providerMetadata:Pe.optional()}),P.looseObject({type:P.literal("text-end"),id:P.string(),providerMetadata:Pe.optional()}),P.looseObject({type:P.literal("error"),errorText:P.string()}),P.looseObject({type:P.literal("tool-input-start"),toolCallId:P.string(),toolName:P.string(),providerExecuted:P.boolean().optional(),providerMetadata:Pe.optional(),toolMetadata:ho.optional(),dynamic:P.boolean().optional(),title:P.string().optional()}),P.looseObject({type:P.literal("tool-input-delta"),toolCallId:P.string(),inputTextDelta:P.string()}),P.looseObject({type:P.literal("tool-input-available"),toolCallId:P.string(),toolName:P.string(),input:P.unknown(),providerExecuted:P.boolean().optional(),providerMetadata:Pe.optional(),toolMetadata:ho.optional(),dynamic:P.boolean().optional(),title:P.string().optional()}),P.looseObject({type:P.literal("tool-input-error"),toolCallId:P.string(),toolName:P.string(),input:P.unknown(),providerExecuted:P.boolean().optional(),providerMetadata:Pe.optional(),toolMetadata:ho.optional(),dynamic:P.boolean().optional(),errorText:P.string(),title:P.string().optional()}),P.looseObject({type:P.literal("tool-approval-request"),approvalId:P.string(),toolCallId:P.string(),approvalDescriptor:P.unknown().optional(),inputSchemaInput:P.unknown().optional(),reason:P.string().optional(),isAutomatic:P.boolean().optional(),signature:P.string().optional()}),P.looseObject({type:P.literal("tool-approval-response"),approvalId:P.string(),approved:P.boolean(),reason:P.string().optional(),providerExecuted:P.boolean().optional(),providerMetadata:Pe.optional()}),P.looseObject({type:P.literal("tool-output-available"),toolCallId:P.string(),output:P.unknown(),providerExecuted:P.boolean().optional(),providerMetadata:Pe.optional(),toolMetadata:ho.optional(),dynamic:P.boolean().optional(),preliminary:P.boolean().optional()}),P.looseObject({type:P.literal("tool-output-error"),toolCallId:P.string(),errorText:P.string(),providerExecuted:P.boolean().optional(),providerMetadata:Pe.optional(),toolMetadata:ho.optional(),dynamic:P.boolean().optional()}),P.looseObject({type:P.literal("tool-output-denied"),toolCallId:P.string()}),P.looseObject({type:P.literal("reasoning-start"),id:P.string(),providerMetadata:Pe.optional()}),P.looseObject({type:P.literal("reasoning-delta"),id:P.string(),delta:P.string(),providerMetadata:Pe.optional()}),P.looseObject({type:P.literal("reasoning-end"),id:P.string(),providerMetadata:Pe.optional()}),P.looseObject({type:P.literal("custom"),kind:P.string().transform(e=>e),providerMetadata:Pe.optional()}),P.looseObject({type:P.literal("source-url"),sourceId:P.string(),url:P.string(),title:P.string().optional(),providerMetadata:Pe.optional()}),P.looseObject({type:P.literal("source-document"),sourceId:P.string(),mediaType:P.string(),title:P.string(),filename:P.string().optional(),providerMetadata:Pe.optional()}),P.looseObject({type:P.literal("file"),url:P.string(),mediaType:P.string(),providerMetadata:Pe.optional()}),P.looseObject({type:P.literal("reasoning-file"),url:P.string(),mediaType:P.string(),providerMetadata:Pe.optional()}),P.looseObject({type:P.custom(e=>typeof e=="string"&&e.startsWith("data-"),{message:'Type must start with "data-"'}),id:P.string().optional(),data:P.unknown(),transient:P.boolean().optional()}),P.looseObject({type:P.literal("start-step")}),P.looseObject({type:P.literal("finish-step")}),P.looseObject({type:P.literal("reset-step")}),P.looseObject({type:P.literal("start"),messageId:P.string().optional(),messageMetadata:P.unknown().optional()}),P.looseObject({type:P.literal("finish"),finishReason:P.enum(["stop","length","content-filter","tool-calls","error","other"]).optional(),messageMetadata:P.unknown().optional()}),P.looseObject({type:P.literal("abort"),reason:P.string().optional()}),P.looseObject({type:P.literal("message-metadata"),messageMetadata:P.unknown()})])));function SP(e){return e.type.startsWith("data-")}function ya(){return Object.create(null)}function sc(e){return e.type.startsWith("tool-")}function AP(e){return e.type==="dynamic-tool"}function ln(e){return sc(e)||AP(e)}function Uh(e){return e.type.split("-").slice(1).join("-")}function g5({lastMessage:e,messageId:t}){const r=(e==null?void 0:e.role)==="assistant"?e:{id:t,metadata:void 0,role:"assistant",parts:[]},n=ya(),i=r.parts.findLastIndex(a=>a.type==="step-start");let s=0;for(const a of r.parts.slice(i+1)){if(!ln(a))continue;const o=s;sc(a)&&s++,a.state==="input-streaming"&&(n[a.toolCallId]={text:a.rawInput??"",index:o,toolName:a.type==="dynamic-tool"?a.toolName:Uh(a),dynamic:a.type==="dynamic-tool",title:a.title,toolMetadata:a.toolMetadata})}return{message:r,activeTextParts:ya(),activeReasoningParts:ya(),partialToolCalls:n}}function CP({stream:e,messageMetadataSchema:t,dataPartSchemas:r,runUpdateMessageJob:n,onError:i,onToolCall:s,onData:a,resetStateOnMessageIdChange:o=!1,resetStateOnFirstMessageStart:l=!1}){return e.pipeThrough(new TransformStream({async transform(u,c){await n(async({state:d,write:h})=>{function f(){const _=d.message.parts;let A=_.length-1;for(;A>=0&&_[A].type!=="step-start";)A--;return _.slice(A+1)}function m(){return f().filter(ln)}function b(_){let A=m().find(S=>S.toolCallId===_);if(A==null){const S=d.message.parts;for(let I=S.length-1;I>=0;I--){const N=S[I];if(ln(N)&&N.toolCallId===_){A=N;break}}}if(A==null)throw new ts({chunkType:"tool-invocation",chunkId:_,message:`No tool invocation found for tool call ID "${_}".`});return A}function y(_){const A=d.message.parts.filter(ln).find(S=>{var I;return((I=S.approval)==null?void 0:I.id)===_});if(A==null)throw new ts({chunkType:"tool-approval-response",chunkId:_,message:`No tool invocation found for approval ID "${_}".`});return A}function E(_,A){const S=A??f().find(U=>sc(U)&&U.toolCallId===_.toolCallId),I=_,N=S;if(S!=null){S.state=_.state,N.input=I.input,N.output=I.output,N.errorText=I.errorText,N.rawInput=I.rawInput,N.preliminary=I.preliminary,_.title!==void 0&&(N.title=_.title),_.toolMetadata!==void 0&&(N.toolMetadata=_.toolMetadata),N.providerExecuted=I.providerExecuted??S.providerExecuted;const U=I.providerMetadata;if(U!=null)if(_.state==="output-available"||_.state==="output-error"){const z=S;z.resultProviderMetadata=U}else S.callProviderMetadata=U}else d.message.parts.push({type:`tool-${_.toolName}`,toolCallId:_.toolCallId,state:_.state,title:_.title,..._.toolMetadata!==void 0?{toolMetadata:_.toolMetadata}:{},input:I.input,output:I.output,rawInput:I.rawInput,errorText:I.errorText,providerExecuted:I.providerExecuted,preliminary:I.preliminary,...I.providerMetadata!=null&&(_.state==="output-available"||_.state==="output-error")?{resultProviderMetadata:I.providerMetadata}:{},...I.providerMetadata!=null&&!(_.state==="output-available"||_.state==="output-error")?{callProviderMetadata:I.providerMetadata}:{}})}function w(_,A){const S=A??f().find(U=>U.type==="dynamic-tool"&&U.toolCallId===_.toolCallId),I=_,N=S;if(S!=null){S.state=_.state,N.toolName=_.toolName,N.input=I.input,N.output=I.output,N.errorText=I.errorText,N.rawInput=I.rawInput,N.preliminary=I.preliminary,_.title!==void 0&&(N.title=_.title),_.toolMetadata!==void 0&&(N.toolMetadata=_.toolMetadata),N.providerExecuted=I.providerExecuted??S.providerExecuted;const U=I.providerMetadata;if(U!=null)if(_.state==="output-available"||_.state==="output-error"){const z=S;z.resultProviderMetadata=U}else S.callProviderMetadata=U}else d.message.parts.push({type:"dynamic-tool",toolName:_.toolName,toolCallId:_.toolCallId,state:_.state,input:I.input,output:I.output,errorText:I.errorText,preliminary:I.preliminary,providerExecuted:I.providerExecuted,title:_.title,..._.toolMetadata!==void 0?{toolMetadata:_.toolMetadata}:{},...I.providerMetadata!=null&&(_.state==="output-available"||_.state==="output-error")?{resultProviderMetadata:I.providerMetadata}:{},...I.providerMetadata!=null&&!(_.state==="output-available"||_.state==="output-error")?{callProviderMetadata:I.providerMetadata}:{}})}async function x(_){if(_!=null){const A=d.message.metadata!=null?d5(d.message.metadata,_):_;t!=null&&await Kg({value:A,schema:t,context:{field:"message.metadata",entityId:d.message.id}}),d.message.metadata=A}}switch(u.type){case"text-start":{const _={type:"text",text:"",providerMetadata:u.providerMetadata,state:"streaming"};d.activeTextParts[u.id]=_,d.message.parts.push(_),h();break}case"text-delta":{const _=d.activeTextParts[u.id];if(_==null)throw new ts({chunkType:"text-delta",chunkId:u.id,message:`Received text-delta for missing text part with ID "${u.id}". Ensure a "text-start" chunk is sent before any "text-delta" chunks.`});_.text+=u.delta,_.providerMetadata=u.providerMetadata??_.providerMetadata,h();break}case"text-end":{const _=d.activeTextParts[u.id];if(_==null)throw new ts({chunkType:"text-end",chunkId:u.id,message:`Received text-end for missing text part with ID "${u.id}". Ensure a "text-start" chunk is sent before any "text-end" chunks.`});_.state="done",_.providerMetadata=u.providerMetadata??_.providerMetadata,delete d.activeTextParts[u.id],h();break}case"custom":{const _={type:"custom",kind:u.kind,providerMetadata:u.providerMetadata};d.message.parts.push(_),h();break}case"reasoning-start":{const _={type:"reasoning",id:u.id,text:"",providerMetadata:u.providerMetadata,state:"streaming"};d.activeReasoningParts[u.id]=_,d.message.parts.push(_),h();break}case"reasoning-delta":{const _=d.activeReasoningParts[u.id];if(_==null)throw new ts({chunkType:"reasoning-delta",chunkId:u.id,message:`Received reasoning-delta for missing reasoning part with ID "${u.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-delta" chunks.`});_.text+=u.delta,_.providerMetadata=u.providerMetadata??_.providerMetadata,h();break}case"reasoning-end":{const _=d.activeReasoningParts[u.id];if(_==null)throw new ts({chunkType:"reasoning-end",chunkId:u.id,message:`Received reasoning-end for missing reasoning part with ID "${u.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-end" chunks.`});_.providerMetadata=u.providerMetadata??_.providerMetadata,_.state="done",delete d.activeReasoningParts[u.id],h();break}case"file":case"reasoning-file":d.message.parts.push({type:u.type,mediaType:u.mediaType,url:u.url,...u.providerMetadata!=null?{providerMetadata:u.providerMetadata}:{}}),h();break;case"source-url":d.message.parts.push({type:"source-url",sourceId:u.sourceId,url:u.url,title:u.title,providerMetadata:u.providerMetadata}),h();break;case"source-document":d.message.parts.push({type:"source-document",sourceId:u.sourceId,mediaType:u.mediaType,title:u.title,filename:u.filename,providerMetadata:u.providerMetadata}),h();break;case"tool-input-start":{const _=f().filter(sc);d.partialToolCalls[u.toolCallId]={text:"",toolName:u.toolName,index:_.length,dynamic:u.dynamic,title:u.title,toolMetadata:u.toolMetadata},u.dynamic?w({toolCallId:u.toolCallId,toolName:u.toolName,state:"input-streaming",input:void 0,providerExecuted:u.providerExecuted,title:u.title,toolMetadata:u.toolMetadata,providerMetadata:u.providerMetadata}):E({toolCallId:u.toolCallId,toolName:u.toolName,state:"input-streaming",input:void 0,providerExecuted:u.providerExecuted,title:u.title,toolMetadata:u.toolMetadata,providerMetadata:u.providerMetadata}),h();break}case"tool-input-delta":{const _=d.partialToolCalls[u.toolCallId];if(_==null)throw new ts({chunkType:"tool-input-delta",chunkId:u.toolCallId,message:`Received tool-input-delta for missing tool call with ID "${u.toolCallId}". Ensure a "tool-input-start" chunk is sent before any "tool-input-delta" chunks.`});_.text+=u.inputTextDelta;const{value:A}=await wP(_.text);_.dynamic?w({toolCallId:u.toolCallId,toolName:_.toolName,state:"input-streaming",input:A,rawInput:_.text,title:_.title,toolMetadata:_.toolMetadata}):E({toolCallId:u.toolCallId,toolName:_.toolName,state:"input-streaming",input:A,rawInput:_.text,title:_.title,toolMetadata:_.toolMetadata}),h();break}case"tool-input-available":u.dynamic?w({toolCallId:u.toolCallId,toolName:u.toolName,state:"input-available",input:u.input,providerExecuted:u.providerExecuted,providerMetadata:u.providerMetadata,title:u.title,toolMetadata:u.toolMetadata}):E({toolCallId:u.toolCallId,toolName:u.toolName,state:"input-available",input:u.input,providerExecuted:u.providerExecuted,providerMetadata:u.providerMetadata,title:u.title,toolMetadata:u.toolMetadata}),h(),s&&!u.providerExecuted&&await s({toolCall:u});break;case"tool-input-error":{const _=f().filter(ln).find(A=>A.toolCallId===u.toolCallId);(_!=null?_.type==="dynamic-tool":u.dynamic)?w({toolCallId:u.toolCallId,toolName:u.toolName,state:"output-error",input:u.input,errorText:u.errorText,providerExecuted:u.providerExecuted,providerMetadata:u.providerMetadata,toolMetadata:u.toolMetadata}):E({toolCallId:u.toolCallId,toolName:u.toolName,state:"output-error",input:u.input,errorText:u.errorText,providerExecuted:u.providerExecuted,providerMetadata:u.providerMetadata,toolMetadata:u.toolMetadata}),h();break}case"tool-approval-request":{const _=b(u.toolCallId);_.state="approval-requested",_.approval={id:u.approvalId,...u.approvalDescriptor!=null?{descriptor:u.approvalDescriptor}:{},...Object.prototype.hasOwnProperty.call(u,"inputSchemaInput")?{inputSchemaInput:u.inputSchemaInput}:{},...u.reason!=null?{requestReason:u.reason}:{},...u.isAutomatic===!0?{isAutomatic:!0}:{},...u.signature!=null?{signature:u.signature}:{}},h();break}case"tool-approval-response":{const _=y(u.approvalId),A=_.approval==null?{id:u.approvalId}:_.approval;_.state="approval-responded",_.approval={...A,id:u.approvalId,approved:u.approved,...u.reason!=null?{reason:u.reason}:{}},u.providerExecuted!=null&&(_.providerExecuted=u.providerExecuted),u.providerMetadata!=null&&(_.callProviderMetadata=u.providerMetadata),h();break}case"tool-output-denied":{const _=b(u.toolCallId);_.state="output-denied",h();break}case"tool-output-available":{const _=b(u.toolCallId);_.type==="dynamic-tool"?w({toolCallId:u.toolCallId,toolName:_.toolName,state:"output-available",input:_.input,output:u.output,preliminary:u.preliminary,providerExecuted:u.providerExecuted,providerMetadata:u.providerMetadata,title:_.title,toolMetadata:u.toolMetadata??_.toolMetadata},_):E({toolCallId:u.toolCallId,toolName:Uh(_),state:"output-available",input:_.input,output:u.output,providerExecuted:u.providerExecuted,preliminary:u.preliminary,providerMetadata:u.providerMetadata,title:_.title,toolMetadata:u.toolMetadata??_.toolMetadata},_),h();break}case"tool-output-error":{const _=b(u.toolCallId);_.type==="dynamic-tool"?w({toolCallId:u.toolCallId,toolName:_.toolName,state:"output-error",input:_.input,errorText:u.errorText,providerExecuted:u.providerExecuted,providerMetadata:u.providerMetadata,title:_.title,toolMetadata:u.toolMetadata??_.toolMetadata},_):E({toolCallId:u.toolCallId,toolName:Uh(_),state:"output-error",input:_.input,rawInput:_.rawInput,errorText:u.errorText,providerExecuted:u.providerExecuted,providerMetadata:u.providerMetadata,title:_.title,toolMetadata:u.toolMetadata??_.toolMetadata},_),h();break}case"start-step":d.message.parts.push({type:"step-start"});break;case"finish-step":break;case"reset-step":{const _=f();d.activeTextParts=ya(),d.activeReasoningParts=ya(),d.partialToolCalls=ya(),_.length>0&&(d.message.parts.splice(d.message.parts.length-_.length,_.length),h());break}case"start":u.messageId!=null&&(l||o&&u.messageId!==d.message.id)&&Object.assign(d,g5({lastMessage:void 0,messageId:u.messageId}),{finishReason:void 0}),u.messageId!=null&&(d.message.id=u.messageId),await x(u.messageMetadata),(u.messageId!=null||u.messageMetadata!=null)&&h({updateStatus:!1});break;case"finish":u.finishReason!=null&&(d.finishReason=u.finishReason),await x(u.messageMetadata),u.messageMetadata!=null&&h();break;case"message-metadata":await x(u.messageMetadata),u.messageMetadata!=null&&h();break;case"error":i==null||i(new Error(u.errorText));break;default:if(SP(u)){if((r==null?void 0:r[u.type])!=null){const S=d.message.parts.findIndex(N=>"id"in N&&"data"in N&&N.id===u.id&&N.type===u.type),I=S>=0?S:d.message.parts.length;await Kg({value:u.data,schema:r[u.type],context:{field:`message.parts[${I}].data`,entityName:u.type,entityId:u.id}})}const _=u;if(_.transient){a==null||a(_);break}const A=_.id!=null?d.message.parts.find(S=>_.type===S.type&&_.id===S.id):void 0;A!=null?A.data=_.data:d.message.parts.push(_),a==null||a(_),h()}}c.enqueue(u)})}}))}async function IP({stream:e,onError:t,abortSignal:r}){const n=e.getReader(),i=()=>{n.cancel().catch(()=>{})};r!=null&&r.aborted?i():r==null||r.addEventListener("abort",i,{once:!0});try{for(;;){const{done:s}=await n.read();if(s)break}}catch(s){t==null||t(s)}finally{r==null||r.removeEventListener("abort",i),n.releaseLock()}}function NP(){let e,t;return{promise:new Promise((r,n)=>{e=r,t=n}),resolve:e,reject:t}}ir({prefix:"aitxt",size:24});ir({prefix:"call",size:24});ir({prefix:"aitxt",size:24});ir({prefix:"call",size:24});P.record(P.string(),Is.optional());P.record(P.string(),P.string());ir({prefix:"call",size:24});ir({prefix:"call",size:24});new TextEncoder;ir({prefix:"call",size:24});ir({prefix:"aiobj",size:24});var RP=class{constructor(){this.queue=[],this.isProcessing=!1,this.idleWaiters=[]}async processQueue(){if(!this.isProcessing){this.isProcessing=!0;try{for(;this.queue.length>0;)await this.queue[0](),this.queue.shift()}finally{this.isProcessing=!1;for(const e of this.idleWaiters.splice(0))e()}}}async run(e){return new Promise((t,r)=>{this.queue.push(async()=>{try{await e(),t()}catch(n){r(n)}}),this.processQueue()})}async waitForIdle(){!this.isProcessing&&this.queue.length===0||await new Promise(e=>{this.idleWaiters.push(e)})}};ir({prefix:"aiobj",size:24});ir({prefix:"call",size:24});P.object({token:P.string().refine(e=>e.trim().length>0),url:P.string().refine(e=>{try{const t=new URL(e);return(t.protocol==="ws:"||t.protocol==="wss:")&&t.hostname!==""}catch{return!1}}),expiresAt:P.number().positive().max(Number.MAX_SAFE_INTEGER).optional(),tools:P.array(P.object({type:P.literal("function"),name:P.string().min(1),description:P.string().optional(),parameters:P.record(P.string(),P.unknown())})).optional()});ir({prefix:"call",size:24});ir({prefix:"call",size:24});ir({prefix:"call",size:24});async function Xg({response:e,url:t,fallbackMessage:r}){const n=await e.text();return new kI({message:n||r,url:t,requestBodyValues:void 0,statusCode:e.status,responseBody:n})}async function PP(e){if(e==null)return[];if(!globalThis.FileList||!(e instanceof globalThis.FileList))throw new PI({functionality:"FileList",message:"FileList is not supported in the current environment"});return Promise.all(Array.from(e).map(async t=>{const{name:r,type:n}=t;return{type:"file",mediaType:n,filename:r,url:await new Promise((i,s)=>{const a=new FileReader;a.onload=o=>{var l;i((l=o.target)==null?void 0:l.result)},a.onerror=o=>s(o),a.readAsDataURL(t)})}}))}function OP(e,t){const r=e.search(/[?#]/),n=r===-1?e:e.slice(0,r),i=r===-1?"":e.slice(r);return`${n.endsWith("/")&&t.startsWith("/")?n.slice(0,-1):n}${t}${i}`}var LP=class{constructor({api:e="/api/chat",credentials:t,headers:r,body:n,fetch:i,prepareSendMessagesRequest:s,prepareReconnectToStreamRequest:a}){this.api=e,this.credentials=t,this.headers=r,this.body=n,this.fetch=i,this.prepareSendMessagesRequest=s,this.prepareReconnectToStreamRequest=a}async sendMessages({abortSignal:e,...t}){var h;const r=await Ys(this.body),n=await Ys(this.headers),i=await Ys(this.credentials),s={...Zs(n),...Zs(t.headers)},a=await((h=this.prepareSendMessagesRequest)==null?void 0:h.call(this,{api:this.api,id:t.chatId,messages:t.messages,body:{...r,...t.body},headers:s,credentials:i,requestMetadata:t.metadata,trigger:t.trigger,messageId:t.messageId})),o=(a==null?void 0:a.api)??this.api,l=(a==null?void 0:a.headers)!==void 0?Zs(a.headers):s,u=(a==null?void 0:a.body)!==void 0?a.body:{...r,...t.body,id:t.chatId,messages:t.messages,trigger:t.trigger,messageId:t.messageId},c=(a==null?void 0:a.credentials)??i,d=await(this.fetch??globalThis.fetch)(o,{method:"POST",headers:{"content-type":"application/json",...l},body:JSON.stringify(u),credentials:c,signal:e});if(!d.ok)throw await Xg({response:d,url:o,fallbackMessage:"Failed to fetch the chat response."});if(!d.body)throw new Bg({message:"The response body is empty."});return this.processResponseStream(d.body)}async reconnectToStream(e){var c;const t=await Ys(this.body),r=await Ys(this.headers),n=await Ys(this.credentials),i={...Zs(r),...Zs(e.headers)},s=await((c=this.prepareReconnectToStreamRequest)==null?void 0:c.call(this,{api:this.api,id:e.chatId,body:{...t,...e.body},headers:i,credentials:n,requestMetadata:e.metadata}));let a=s==null?void 0:s.api;if(a==null){if(e.chatId==="."||e.chatId==="..")throw new Pu({parameter:"chatId",value:e.chatId,message:'Chat IDs must not be "." or ".." when using the default reconnect URL.'});a=OP(this.api,`/${encodeURIComponent(e.chatId)}/stream`)}const o=(s==null?void 0:s.headers)!==void 0?Zs(s.headers):i,l=(s==null?void 0:s.credentials)??n,u=await(this.fetch??globalThis.fetch)(a,{method:"GET",headers:o,credentials:l,signal:e.abortSignal});if(u.status===204)return null;if(!u.ok)throw await Xg({response:u,url:a,fallbackMessage:"Failed to fetch the chat response."});if(!u.body)throw new Bg({message:"The response body is empty."});return this.processResponseStream(u.body)}},sp=class extends LP{constructor(e={}){super(e)}processResponseStream(e){return oP({stream:e,schema:kP}).pipeThrough(new TransformStream({async transform(t,r){if(!t.success)throw t.error;r.enqueue(t.value)}}))}},DP=class{constructor({generateId:e=oR,id:t=e(),transport:r=new sp,messageMetadataSchema:n,dataPartSchemas:i,state:s,onError:a,onToolCall:o,onFinish:l,onData:u,sendAutomaticallyWhen:c}){this.pendingMessagePreparations=new Set,this.activeResponse=void 0,this.activeResumeRequest=void 0,this.resumableStreamState=void 0,this.jobExecutor=new RP,this.activeStopCount=0,this.stopGeneration=0,this.sendMessage=async(d,h)=>{var m;if(d==null){let b=this.pendingApprovalMessageId;if(b==null){b=(m=this.lastMessage)==null?void 0:m.id;for(let E=this.state.messages.length-1;E>=0;E--){const w=this.state.messages[E];if(w.role==="assistant"&&w.parts.some(x=>ln(x)&&x.state==="approval-responded")){b=w.id;break}}}const y=b!=null&&b===this.pendingApprovalMessageId?this.state.messages.findIndex(E=>E.id===b):-1;await this.makeRequestForToolApproval({messageId:b,messageIndex:y,...h});return}let f;if("text"in d||"files"in d){const b=new AbortController;this.pendingMessagePreparations.add(b);let y;try{y=Array.isArray(d.files)?d.files:await PP(d.files)}finally{this.pendingMessagePreparations.delete(b)}if(b.signal.aborted)return;f={parts:[...y,..."text"in d&&d.text!=null?[{type:"text",text:d.text}]:[]]}}else f=d;if(d.messageId!=null){const b=this.state.messages.findIndex(y=>y.id===d.messageId);if(b===-1)throw new Pu({parameter:"message.messageId",value:d.messageId,message:`message with id ${d.messageId} not found`});if(this.state.messages[b].role!=="user")throw new Pu({parameter:"message.messageId",value:d.messageId,message:`message with id ${d.messageId} is not a user message`});this.state.messages=this.state.messages.slice(0,b+1),this.state.replaceMessage(b,{id:d.messageId,...f,role:f.role??"user",metadata:d.metadata})}else this.state.pushMessage({...f,id:f.id??this.generateId(),role:f.role??"user",metadata:d.metadata});await this.makeRequest({trigger:"submit-message",messageId:d.messageId,...h})},this.regenerate=async({messageId:d,...h}={})=>{const f=d==null?this.state.messages.length-1:this.state.messages.findIndex(m=>m.id===d);if(f===-1)throw new Pu({parameter:"messageId",value:d,message:`message ${d} not found`});this.state.messages=this.state.messages.slice(0,this.messages[f].role==="assistant"?f:f+1),await this.makeRequest({trigger:"regenerate-message",messageId:d,...h})},this.resumeStream=async(d={})=>{await this.makeRequest({trigger:"resume-stream",...d})},this.clearError=()=>{this.status==="error"&&(this.state.error=void 0,this.setStatus({status:"ready"}))},this.addToolApprovalResponse=async({id:d,approved:h,reason:f,options:m})=>this.jobExecutor.run(async()=>{const b=this.state.messages,y=w=>ln(w)&&w.state==="approval-requested"&&w.approval.id===d?{...w,state:"approval-responded",approval:{...w.approval,id:d,approved:h,reason:f}}:w,E=b.findIndex(w=>w.parts.some(x=>ln(x)&&x.state==="approval-requested"&&x.approval.id===d));if(E!==-1){const w=b[E];this.state.replaceMessage(E,{...w,parts:w.parts.map(y)}),this.pendingApprovalMessageId=w.id}if(this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(y)),E!==-1&&this.status!=="streaming"&&this.status!=="submitted"&&this.sendAutomaticallyWhen){const w=await this.shouldSendAutomatically();w&&this.runAutomaticRequest(()=>{var _;const x=E===-1?(_=this.lastMessage)==null?void 0:_.id:b[E].id;return this.makeRequestForToolApproval({messageId:x,messageIndex:E,...m})},w)}}),this.addToolOutput=async({state:d,toolCallId:h,output:f,errorText:m,options:b})=>this.jobExecutor.run(async()=>{const y=this.state.messages,E=y[y.length-1],w=x=>{if(!ln(x)||x.toolCallId!==h)return x;const{approval:_,...A}=x,S=(_==null?void 0:_.approved)===!0?{approval:{..._,approved:_.approved}}:{};return d==="output-error"?{...A,...S,state:d,input:x.input,output:void 0,errorText:m}:{...A,...S,state:"output-available",input:x.input,output:f,errorText:void 0}};if(this.state.replaceMessage(y.length-1,{...E,parts:E.parts.map(w)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(w)),this.status!=="streaming"&&this.status!=="submitted"&&this.sendAutomaticallyWhen){const x=await this.shouldSendAutomatically();x&&this.runAutomaticRequest(()=>{var _;return this.makeRequest({trigger:"submit-message",messageId:(_=this.lastMessage)==null?void 0:_.id,...b})},x)}}),this.addToolResult=this.addToolOutput,this.stop=async()=>{this.activeStopCount++,this.stopGeneration++;try{const d=this.activeResumeRequest,h=this.activeResponse;for(const f of this.pendingMessagePreparations)f.abort();d==null||d.abortController.abort(),h==null||h.abortController.abort(),await Promise.all([d==null?void 0:d.completionPromise,h==null?void 0:h.completionPromise]),await this.jobExecutor.waitForIdle()}finally{this.activeStopCount--}},this.dispose=async()=>{var d,h;await this.stop(),(h=(d=this.transport).close)==null||h.call(d)},this.id=t,this.transport=r,this.generateId=e,this.messageMetadataSchema=n,this.dataPartSchemas=i,this.state=s,this.onError=a,this.onToolCall=o,this.onFinish=l,this.onData=u,this.sendAutomaticallyWhen=c}get status(){return this.state.status}setStatus({status:e,error:t}){if(this.status===e){this.error!==t&&(this.state.error=t);return}this.state.status=e,this.state.error=t}get error(){return this.state.error}get messages(){return this.state.messages}get lastMessage(){return this.state.messages[this.state.messages.length-1]}set messages(e){this.state.messages=e}async shouldSendAutomatically(){if(!this.sendAutomaticallyWhen)return!1;const e=this.sendAutomaticallyWhen({messages:this.state.messages});return e&&typeof e=="object"&&"then"in e?await e:e}async runAutomaticRequest(e,t){const r=this.stopGeneration,n=this.activeStopCount>0;(t??await this.shouldSendAutomatically())&&(n||r!==this.stopGeneration||this.activeStopCount>0||await e())}async makeRequestForToolApproval({messageId:e,messageIndex:t,...r}){var i;const n=e!=null&&e===this.pendingApprovalMessageId;n&&(this.pendingApprovalMessageId=void 0),await this.makeRequest({trigger:"submit-message",messageId:e,...r}),n&&this.status==="error"&&this.pendingApprovalMessageId==null&&(this.pendingApprovalMessageId=((i=this.state.messages[t])==null?void 0:i.id)??e)}async makeRequest(e){const t=NP();try{await this.makeRequestImpl({...e,completionPromise:t.promise})}finally{t.resolve()}}async makeRequestImpl({trigger:e,metadata:t,headers:r,body:n,messageId:i,completionPromise:s}){var _,A;e!=="resume-stream"&&(this.resumableStreamState=void 0);const a=new AbortController,o=e==="resume-stream"?{abortController:a,completionPromise:s}:void 0;o&&((_=this.activeResumeRequest)==null||_.abortController.abort(),this.activeResumeRequest=o);const l=()=>o==null||this.activeResumeRequest===o,u=()=>{this.activeResumeRequest===o&&(this.activeResumeRequest=void 0)};let c;if(e==="resume-stream")try{const S=await this.transport.reconnectToStream({chatId:this.id,abortSignal:a.signal,metadata:t,headers:r,body:n});if(a.signal.aborted||!l()){await(S==null?void 0:S.cancel().catch(()=>{})),l()&&(this.setStatus({status:"ready"}),this.resumableStreamState=void 0),u();return}if(S==null){this.setStatus({status:"ready"}),this.resumableStreamState=void 0,u();return}c=S}catch(S){if(a.signal.aborted||S.name==="AbortError"){l()&&(this.setStatus({status:"ready"}),this.resumableStreamState=void 0),u();return}if(!l())return;this.onError&&S instanceof Error&&this.onError(S),this.setStatus({status:"error",error:S}),u();return}this.setStatus({status:"submitted",error:void 0});const d=this.lastMessage,h=e==="submit-message"&&i!=null?this.state.messages.findIndex(S=>S.id===i):this.state.messages.length-1,f=h===-1?d:this.state.messages[h],m=e==="resume-stream"&&(f==null?void 0:f.role)==="assistant"&&f.parts.some(S=>ln(S)&&(S.state==="input-streaming"||S.state==="input-available"&&S.providerExecuted||S.state==="approval-responded"))?this.state.snapshot(f):void 0,b=h!==-1&&h<this.state.messages.length-1&&(f==null?void 0:f.role)==="assistant";let y=!1,E=!1,w=!1,x;try{const S={state:e==="resume-stream"&&this.resumableStreamState!=null?this.resumableStreamState:g5({lastMessage:e==="resume-stream"?m:e==="regenerate-message"?void 0:this.state.snapshot(f),messageId:this.generateId()}),abortController:a,completionPromise:s};x=S,S.abortController.signal.addEventListener("abort",()=>{y=!0}),this.activeResponse=S;let I;e==="resume-stream"?I=c:I=await this.transport.sendMessages({chatId:this.id,messages:this.state.messages,abortSignal:S.abortController.signal,metadata:t,headers:r,body:n,trigger:e,messageId:i});const N=U=>this.jobExecutor.run(()=>S.abortController.signal.aborted?Promise.resolve():U({state:S.state,write:({updateStatus:z=!0}={})=>{var Z;S.abortController.signal.aborted||(z&&this.setStatus({status:"streaming"}),b?this.state.replaceMessage(h,S.state.message):S.state.message.id===((Z=this.lastMessage)==null?void 0:Z.id)?this.state.replaceMessage(this.state.messages.length-1,S.state.message):this.state.pushMessage(S.state.message))}}));if(await IP({stream:CP({stream:I,resetStateOnMessageIdChange:e==="resume-stream",resetStateOnFirstMessageStart:e==="resume-stream"&&this.transport.resumeStreamIsReplay,onToolCall:this.onToolCall,onData:this.onData,messageMetadataSchema:this.messageMetadataSchema,dataPartSchemas:this.dataPartSchemas,runUpdateMessageJob:N,onError:U=>{throw U}}),abortSignal:S.abortController.signal,onError:U=>{throw U}}),y)return l()&&(this.setStatus({status:"ready"}),this.resumableStreamState===S.state&&(this.resumableStreamState=void 0)),null;l()&&(this.setStatus({status:"ready"}),this.resumableStreamState===S.state&&(this.resumableStreamState=void 0))}catch(S){if(y||S.name==="AbortError")return y=!0,l()&&(this.setStatus({status:"ready"}),this.resumableStreamState===(x==null?void 0:x.state)&&(this.resumableStreamState=void 0)),null;if(!l())return null;if(w=!0,S instanceof TypeError){const I=S.message.toLowerCase();E=I.includes("fetch")||I.includes("network")||I==="load failed"}E?this.resumableStreamState=x==null?void 0:x.state:this.resumableStreamState===(x==null?void 0:x.state)&&(this.resumableStreamState=void 0),this.onError&&S instanceof Error&&this.onError(S),this.setStatus({status:"error",error:S})}finally{try{x&&((A=this.onFinish)==null||A.call(this,{message:x.state.message,messages:this.state.messages,isAbort:y,isDisconnect:E,isError:w,finishReason:x.state.finishReason}))}finally{this.activeResponse===x&&(this.activeResponse=void 0),u()}}!y&&!w&&await this.runAutomaticRequest(()=>{var S;return this.makeRequest({trigger:"submit-message",messageId:(S=this.lastMessage)==null?void 0:S.id,metadata:t,headers:r,body:n})})}};function MP({messages:e}){const t=e[e.length-1];if(!t||t.role!=="assistant")return!1;const r=t.parts.reduce((i,s,a)=>s.type==="step-start"?a:i,-1),n=t.parts.slice(r+1).filter(ln);return n.filter(i=>i.state==="approval-responded").length>0&&n.every(i=>i.state==="output-available"&&i.preliminary!==!0||i.state==="output-error"||i.state==="output-denied"||i.state==="approval-responded")}var id,Qg;function BP(){if(Qg)return id;Qg=1;function e(t,r){if(typeof t!="function")throw new TypeError(`Expected the first argument to be a \`function\`, got \`${typeof t}\`.`);let n,i=0;return function(...a){clearTimeout(n);const o=Date.now(),l=o-i,u=r-l;u<=0?(i=o,t.apply(this,a)):n=setTimeout(()=>{i=Date.now(),t.apply(this,a)},u)}}return id=e,id}var FP=BP();const zP=Gm(FP);function $P(e,t){return t!=null?zP(e,t):e}function jP(e){return Array.isArray(e)?[...e]:e!=null&&typeof e=="object"&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null)?{...e}:e}var Sr,ka,Sa,bs,ys,vs,ki,xl,El,P6,UP=(P6=class{constructor(e=[]){Ut(this,Sr);Ut(this,ka);Ut(this,Sa);Ut(this,bs);Ut(this,ys);Ut(this,vs);Ut(this,ki);Ut(this,xl);Ut(this,El);rt(this,ka,"ready"),rt(this,Sa,void 0),rt(this,bs,new Set),rt(this,ys,new Set),rt(this,vs,new Set),this.pushMessage=t=>{rt(this,Sr,je(this,Sr).concat(t)),je(this,ki).call(this)},this.popMessage=()=>{rt(this,Sr,je(this,Sr).slice(0,-1)),je(this,ki).call(this)},this.replaceMessage=(t,r)=>{rt(this,Sr,[...je(this,Sr).slice(0,t),this.snapshot(r),...je(this,Sr).slice(t+1)]),je(this,ki).call(this)},this.snapshot=t=>{if(t==null||typeof t!="object"||!("parts"in t)||!Array.isArray(t.parts))return t;const r=t,n={...r,parts:r.parts.map(i=>({...i}))};return"metadata"in r&&(n.metadata=jP(r.metadata)),n},this["~registerMessagesCallback"]=(t,r)=>{const n=r?$P(t,r):t;return je(this,bs).add(n),()=>{je(this,bs).delete(n)}},this["~registerStatusCallback"]=t=>(je(this,ys).add(t),()=>{je(this,ys).delete(t)}),this["~registerErrorCallback"]=t=>(je(this,vs).add(t),()=>{je(this,vs).delete(t)}),rt(this,ki,()=>{je(this,bs).forEach(t=>t())}),rt(this,xl,()=>{je(this,ys).forEach(t=>t())}),rt(this,El,()=>{je(this,vs).forEach(t=>t())}),rt(this,Sr,e)}get status(){return je(this,ka)}set status(e){rt(this,ka,e),je(this,xl).call(this)}get error(){return je(this,Sa)}set error(e){rt(this,Sa,e),je(this,El).call(this)}get messages(){return je(this,Sr)}set messages(e){rt(this,Sr,[...e]),je(this,ki).call(this)}},Sr=new WeakMap,ka=new WeakMap,Sa=new WeakMap,bs=new WeakMap,ys=new WeakMap,vs=new WeakMap,ki=new WeakMap,xl=new WeakMap,El=new WeakMap,P6),xs,O6,HP=(O6=class extends DP{constructor({messages:r,...n}){const i=new UP(r);super({...n,state:i});Ut(this,xs);this["~registerMessagesCallback"]=(s,a)=>je(this,xs)["~registerMessagesCallback"](s,a),this["~registerStatusCallback"]=s=>je(this,xs)["~registerStatusCallback"](s),this["~registerErrorCallback"]=s=>je(this,xs)["~registerErrorCallback"](s),rt(this,xs,i)}},xs=new WeakMap,O6);const sd=new WeakMap;function VP({chat:e,registration:t}){let r=sd.get(e);r==null&&(r=new Set,sd.set(e,r));const n=r.size===0;return r.add(t),n&&e.resumeStream(),()=>{r.delete(t),r.size===0&&sd.delete(e)}}function Ql(e){return{chat:e,messages:e.messages,status:e.status,error:e.error}}function Jg(e,t){return e.chat===t.chat&&e.messages===t.messages&&e.status===t.status&&e.error===t.error}function qP({throttle:e,experimental_throttle:t,resume:r=!1,...n}={}){const i=e??t,s=k.useRef({}),a=k.useRef({});"chat"in n||(a.current={onToolCall:n.onToolCall,onData:n.onData,onFinish:n.onFinish,onError:n.onError,sendAutomaticallyWhen:n.sendAutomaticallyWhen,transport:n.transport});let o;const l=()=>a.current.transport??o??(o=new sp),u={...n,transport:{sendMessages:x=>l().sendMessages(x),reconnectToStream:x=>l().reconnectToStream(x)},onToolCall:x=>{var _,A;return(A=(_=a.current).onToolCall)==null?void 0:A.call(_,x)},onData:x=>{var _,A;return(A=(_=a.current).onData)==null?void 0:A.call(_,x)},onFinish:x=>{var _,A;return(A=(_=a.current).onFinish)==null?void 0:A.call(_,x)},onError:x=>{var _,A;return(A=(_=a.current).onError)==null?void 0:A.call(_,x)},sendAutomaticallyWhen:x=>{var _,A;return((A=(_=a.current).sendAutomaticallyWhen)==null?void 0:A.call(_,x))??!1}},c="chat"in n?n.chat:n.id,{chat:d,isExternallyManaged:h}=k.useMemo(()=>({chat:"chat"in n?n.chat:new HP(u),isExternallyManaged:"chat"in n}),[c]);k.useEffect(()=>{if(!h)return()=>{d.stop()}},[d,h]);const[f,m]=k.useState(()=>Ql(d));f.chat!==d&&m(Ql(d)),k.useEffect(()=>{let x=!0;const _=()=>{if(!x)return;const I=Ql(d);m(N=>N.chat!==d||Jg(N,I)?N:I)},A=[d["~registerMessagesCallback"](_,i),d["~registerStatusCallback"](_),d["~registerErrorCallback"](_)],S=Ql(d);return m(I=>Jg(I,S)?I:S),()=>{x=!1,A.forEach(I=>I())}},[d,i]);const{messages:b,status:y,error:E}=f,w=k.useCallback(x=>{typeof x=="function"&&(x=x(d.messages)),d.messages=x},[d]);return k.useEffect(()=>{if(r)return VP({chat:d,registration:s.current})},[r,d]),{id:d.id,messages:b,setMessages:w,sendMessage:d.sendMessage,regenerate:d.regenerate,clearError:d.clearError,stop:d.stop,error:E,resumeStream:d.resumeStream,status:y,addToolResult:d.addToolOutput,addToolOutput:d.addToolOutput,addToolApprovalResponse:d.addToolApprovalResponse}}/**
60
- * @license lucide-react v1.54.0 - ISC
61
- *
62
- * This source code is licensed under the ISC license.
63
- * See the LICENSE file in the root directory of this source tree.
64
- */const GP=e=>e==null?void 0:e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
65
- * @license lucide-react v1.54.0 - ISC
66
- *
67
- * This source code is licensed under the ISC license.
68
- * See the LICENSE file in the root directory of this source tree.
69
- */function WP(e,t,r=[]){if(t==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:GP(e),size:24,node:t,...r.length>0?{aliases:r}:{}}}/**
70
- * @license lucide-react v1.54.0 - ISC
71
- *
72
- * This source code is licensed under the ISC license.
73
- * See the LICENSE file in the root directory of this source tree.
74
- */const ZP=e=>{let t="",r=!1;for(const n of e){if(n==="-"||n==="_"||n<=" "){r=t.length>0;continue}t.length===0?t+=n.toLowerCase():t+=r?n.toUpperCase():n,r=!1}return t};/**
75
- * @license lucide-react v1.54.0 - ISC
76
- *
77
- * This source code is licensed under the ISC license.
78
- * See the LICENSE file in the root directory of this source tree.
79
- */const YP=e=>{const t=ZP(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
80
- * @license lucide-react v1.54.0 - ISC
81
- *
82
- * This source code is licensed under the ISC license.
83
- * See the LICENSE file in the root directory of this source tree.
84
- */const Hh=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
85
- * @license lucide-react v1.54.0 - ISC
86
- *
87
- * This source code is licensed under the ISC license.
88
- * See the LICENSE file in the root directory of this source tree.
89
- */const rs={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/**
90
- * @license lucide-react v1.54.0 - ISC
91
- *
92
- * This source code is licensed under the ISC license.
93
- * See the LICENSE file in the root directory of this source tree.
94
- */function ad(e){return e!=null}function KP(e,t={}){var h,f;const r=t.attributeNames??{},n=m=>r[m]??m,i=e.size??e.width??rs.width,s=e.size??e.height??rs.height,a=((h=e.aliases)==null?void 0:h.filter(m=>typeof m=="string"&&m.trim()!=="").map(m=>`lucide-${m}`))??[],o=[...e.name?[`lucide-${e.name}`]:[],...a],l=((f=t.className)==null?void 0:f.split(" ").filter(Boolean))??[],u=t.includeDefaultClasses===!1?Hh(...l):Hh("lucide",...o,...l),c=t.absoluteStrokeWidth?Number(t.strokeWidth??rs["stroke-width"])*Number(e.size??e.width??rs.width)/Number(t.size??t.width??rs.width):t.strokeWidth??rs["stroke-width"];return["svg",{...Object.entries(rs).reduce((m,[b,y])=>(m[n(b)]=y,m),{}),..."color"in t&&t.color&&{[n("stroke")]:t.color},..."size"in t&&ad(t.size)&&{[n("width")]:t.size,[n("height")]:t.size},..."width"in t&&ad(t.width)&&{[n("width")]:t.width},..."height"in t&&ad(t.height)&&{[n("height")]:t.height},[n("stroke-width")]:c,...u&&{[n("class")]:u},[n("viewBox")]:`0 0 ${i} ${s}`,...t.hasA11yProp===!1?{[n("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(m=>{const[b,y,E]=m,w=t.nonScalingStroke?{[n("vector-effect")]:"non-scaling-stroke",...y}:y;return E?[b,w,E]:[b,w]})]}/**
95
- * @license lucide-react v1.54.0 - ISC
96
- *
97
- * This source code is licensed under the ISC license.
98
- * See the LICENSE file in the root directory of this source tree.
99
- */function XP(e,t={}){return KP(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}/**
100
- * @license lucide-react v1.54.0 - ISC
101
- *
102
- * This source code is licensed under the ISC license.
103
- * See the LICENSE file in the root directory of this source tree.
104
- */const QP=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},JP=k.createContext({}),eO=()=>k.useContext(JP),tO=k.forwardRef(({color:e,size:t,width:r,height:n,strokeWidth:i,absoluteStrokeWidth:s,nonScalingStroke:a,className:o="",children:l,iconNode:u=[],icon:c={node:u,aliases:[],size:24},...d},h)=>{const{size:f=24,strokeWidth:m=2,absoluteStrokeWidth:b=!1,nonScalingStroke:y=!1,color:E="currentColor",className:w=""}=eO()??{},x=!!l||QP(d),[_,A,S=[]]=XP(c,{color:e??E,width:r??t??f,height:n??t??f,strokeWidth:i??m,absoluteStrokeWidth:s??b,nonScalingStroke:a??y,className:Hh(w,o),hasA11yProp:x,attributes:d});return k.createElement(_,{ref:h,...A},[...S.map(([I,N])=>k.createElement(I,N)),...Array.isArray(l)?l:[l]])});/**
105
- * @license lucide-react v1.54.0 - ISC
106
- *
107
- * This source code is licensed under the ISC license.
108
- * See the LICENSE file in the root directory of this source tree.
109
- */function kt(e,t=[],r=[]){const n=typeof e=="string"?WP(e,t,r):e,i=k.forwardRef(({className:s,...a},o)=>k.createElement(tO,{ref:o,icon:n,className:s,...a}));return n.name&&(i.displayName=YP(n.name)),i}/**
110
- * @license lucide-react v1.54.0 - ISC
111
- *
112
- * This source code is licensed under the ISC license.
113
- * See the LICENSE file in the root directory of this source tree.
114
- */const b5={name:"arrow-down",size:24,node:[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]};b5.node;const rO=kt(b5);/**
115
- * @license lucide-react v1.54.0 - ISC
116
- *
117
- * This source code is licensed under the ISC license.
118
- * See the LICENSE file in the root directory of this source tree.
119
- */const y5={name:"brain",size:24,node:[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]]};y5.node;const nO=kt(y5);/**
120
- * @license lucide-react v1.54.0 - ISC
121
- *
122
- * This source code is licensed under the ISC license.
123
- * See the LICENSE file in the root directory of this source tree.
124
- */const v5={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};v5.node;const ac=kt(v5);/**
125
- * @license lucide-react v1.54.0 - ISC
126
- *
127
- * This source code is licensed under the ISC license.
128
- * See the LICENSE file in the root directory of this source tree.
129
- */const x5={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};x5.node;const E5=kt(x5);/**
130
- * @license lucide-react v1.54.0 - ISC
131
- *
132
- * This source code is licensed under the ISC license.
133
- * See the LICENSE file in the root directory of this source tree.
134
- */const _5={name:"chevrons-up-down",size:24,node:[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]};_5.node;const T5=kt(_5);/**
135
- * @license lucide-react v1.54.0 - ISC
136
- *
137
- * This source code is licensed under the ISC license.
138
- * See the LICENSE file in the root directory of this source tree.
139
- */const w5={name:"circle-check-big",size:24,node:[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],aliases:["check-circle"]};w5.node;const eb=kt(w5);/**
140
- * @license lucide-react v1.54.0 - ISC
141
- *
142
- * This source code is licensed under the ISC license.
143
- * See the LICENSE file in the root directory of this source tree.
144
- */const k5={name:"circle-x",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-circle"]};k5.node;const tb=kt(k5);/**
145
- * @license lucide-react v1.54.0 - ISC
146
- *
147
- * This source code is licensed under the ISC license.
148
- * See the LICENSE file in the root directory of this source tree.
149
- */const S5={name:"circle",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]};S5.node;const iO=kt(S5);/**
150
- * @license lucide-react v1.54.0 - ISC
151
- *
152
- * This source code is licensed under the ISC license.
153
- * See the LICENSE file in the root directory of this source tree.
154
- */const A5={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};A5.node;const rb=kt(A5);/**
155
- * @license lucide-react v1.54.0 - ISC
156
- *
157
- * This source code is licensed under the ISC license.
158
- * See the LICENSE file in the root directory of this source tree.
159
- */const C5={name:"corner-down-left",size:24,node:[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]]};C5.node;const sO=kt(C5);/**
160
- * @license lucide-react v1.54.0 - ISC
161
- *
162
- * This source code is licensed under the ISC license.
163
- * See the LICENSE file in the root directory of this source tree.
164
- */const I5={name:"key-round",size:24,node:[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]};I5.node;const aO=kt(I5);/**
165
- * @license lucide-react v1.54.0 - ISC
166
- *
167
- * This source code is licensed under the ISC license.
168
- * See the LICENSE file in the root directory of this source tree.
169
- */const N5={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};N5.node;const oO=kt(N5);/**
170
- * @license lucide-react v1.54.0 - ISC
171
- *
172
- * This source code is licensed under the ISC license.
173
- * See the LICENSE file in the root directory of this source tree.
174
- */const R5={name:"message-square-plus",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 8v6",key:"1ib9pf"}],["path",{d:"M9 11h6",key:"1fldmi"}]]};R5.node;const od=kt(R5);/**
175
- * @license lucide-react v1.54.0 - ISC
176
- *
177
- * This source code is licensed under the ISC license.
178
- * See the LICENSE file in the root directory of this source tree.
179
- */const P5={name:"messages-square",size:24,node:[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]]};P5.node;const lO=kt(P5);/**
180
- * @license lucide-react v1.54.0 - ISC
181
- *
182
- * This source code is licensed under the ISC license.
183
- * See the LICENSE file in the root directory of this source tree.
184
- */const O5={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};O5.node;const uO=kt(O5);/**
185
- * @license lucide-react v1.54.0 - ISC
186
- *
187
- * This source code is licensed under the ISC license.
188
- * See the LICENSE file in the root directory of this source tree.
189
- */const L5={name:"server",size:24,node:[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]};L5.node;const cO=kt(L5);/**
190
- * @license lucide-react v1.54.0 - ISC
191
- *
192
- * This source code is licensed under the ISC license.
193
- * See the LICENSE file in the root directory of this source tree.
194
- */const D5={name:"shuffle",size:24,node:[["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22",key:"1ailkh"}],["path",{d:"M2 6h1.972a4 4 0 0 1 3.6 2.2",key:"km57vx"}],["path",{d:"M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",key:"os18l9"}]]};D5.node;const nb=kt(D5);/**
195
- * @license lucide-react v1.54.0 - ISC
196
- *
197
- * This source code is licensed under the ISC license.
198
- * See the LICENSE file in the root directory of this source tree.
199
- */const M5={name:"square",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]};M5.node;const dO=kt(M5);/**
200
- * @license lucide-react v1.54.0 - ISC
201
- *
202
- * This source code is licensed under the ISC license.
203
- * See the LICENSE file in the root directory of this source tree.
204
- */const B5={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};B5.node;const hO=kt(B5);/**
205
- * @license lucide-react v1.54.0 - ISC
206
- *
207
- * This source code is licensed under the ISC license.
208
- * See the LICENSE file in the root directory of this source tree.
209
- */const F5={name:"wrench",size:24,node:[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]};F5.node;const fO=kt(F5);/**
210
- * @license lucide-react v1.54.0 - ISC
211
- *
212
- * This source code is licensed under the ISC license.
213
- * See the LICENSE file in the root directory of this source tree.
214
- */const z5={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};z5.node;const $5=kt(z5),mO=[{id:"free",label:"Free"},{id:"tools",label:"Tools"},{id:"reasoning",label:"Reasoning"},{id:"vision",label:"Vision"},{id:"tee",label:"TEE"}],pO=[{id:"popular",label:"Most sellers"},{id:"price",label:"Cheapest"},{id:"name",label:"Name"}],gO=[{id:"free",label:"Free"},{id:"tools",label:"Tools"},{id:"tee",label:"TEE"}],bO=[{id:"auto",label:"Routing order"},{id:"price",label:"Cheapest"},{id:"trust",label:"Trust"}];function wl(e){return e.inputUsdPerMillion===0&&e.outputUsdPerMillion===0}function oc(e){return e.inputUsdPerMillion===null||e.outputUsdPerMillion===null?Number.POSITIVE_INFINITY:e.inputUsdPerMillion+e.outputUsdPerMillion}function yO(e,t){return t==="free"?e.free:t==="tools"?e.toolUse:t==="reasoning"?e.reasoning:t==="vision"?e.vision:e.tee}function vO(e,t,r){return e.filter(i=>[...t].every(s=>yO(i,s))).sort((i,s)=>r==="price"?oc(i)-oc(s)||s.offers-i.offers:r==="name"?i.name.localeCompare(s.name):s.offers-i.offers||i.name.localeCompare(s.name))}function xO(e){const t=new Map;for(const r of(e==null?void 0:e.candidates)??[])t.set(r.peerId.toLowerCase(),{rank:r.rank,eligible:r.eligible,reasons:r.reasons});return t}function j5(e){return e!=null&&e.modelAllowed?[...e.candidates].filter(t=>t.eligible&&t.rank!==null).sort((t,r)=>(t.rank??0)-(r.rank??0))[0]??null:null}function EO(e,t){return t==="free"?wl(e):t==="tools"?e.toolUse:e.tee}function _O(e,t,r,n){const i=e.filter(a=>[...t].every(o=>EO(a,o))),s=(a,o)=>(o.reputation??-1)-(a.reputation??-1);return i.sort((a,o)=>{if(r==="price")return oc(a)-oc(o)||s(a,o);if(r==="trust")return s(a,o);const l=n.get(a.peerId),u=n.get(o.peerId),c=d=>d!=null&&d.eligible&&d.rank!==null?d.rank:Number.POSITIVE_INFINITY;return c(l)-c(u)||s(a,o)})}const ib=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,sb=Qc,ap=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return sb(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:s}=t,a=Object.keys(i).map(u=>{const c=r==null?void 0:r[u],d=s==null?void 0:s[u];if(c===null)return null;const h=ib(c)||ib(d);return i[u][h]}),o=r&&Object.entries(r).reduce((u,c)=>{let[d,h]=c;return h===void 0||(u[d]=h),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,c)=>{let{class:d,className:h,...f}=c;return Object.entries(f).every(m=>{let[b,y]=m;return Array.isArray(y)?y.includes({...s,...o}[b]):{...s,...o}[b]===y})?[...u,d,h]:u},[]);return sb(e,a,l,r==null?void 0:r.class,r==null?void 0:r.className)},TO=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},wO=(e,t)=>({classGroupId:e,validator:t}),U5=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),lc="-",ab=[],kO="arbitrary..",SO=e=>{const t=CO(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return AO(a);const o=a.split(lc),l=o[0]===""&&o.length>1?1:0;return H5(o,l,t)},getConflictingClassGroupIds:(a,o)=>{if(o){const l=n[a],u=r[a];return l?u?TO(u,l):l:u||ab}return r[a]||ab}}},H5=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const i=e[t],s=r.nextPart.get(i);if(s){const u=H5(e,t+1,s);if(u)return u}const a=r.validators;if(a===null)return;const o=t===0?e.join(lc):e.slice(t).join(lc),l=a.length;for(let u=0;u<l;u++){const c=a[u];if(c.validator(o))return c.classGroupId}},AO=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?kO+n:void 0})(),CO=e=>{const{theme:t,classGroups:r}=e;return IO(r,t)},IO=(e,t)=>{const r=U5();for(const n in e){const i=e[n];op(i,r,n,t)}return r},op=(e,t,r,n)=>{const i=e.length;for(let s=0;s<i;s++){const a=e[s];NO(a,t,r,n)}},NO=(e,t,r,n)=>{if(typeof e=="string"){RO(e,t,r);return}if(typeof e=="function"){PO(e,t,r,n);return}OO(e,t,r,n)},RO=(e,t,r)=>{const n=e===""?t:V5(t,e);n.classGroupId=r},PO=(e,t,r,n)=>{if(LO(e)){op(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(wO(r,e))},OO=(e,t,r,n)=>{const i=Object.entries(e),s=i.length;for(let a=0;a<s;a++){const[o,l]=i[a];op(l,V5(t,o),r,n)}},V5=(e,t)=>{let r=e;const n=t.split(lc),i=n.length;for(let s=0;s<i;s++){const a=n[s];let o=r.nextPart.get(a);o||(o=U5(),r.nextPart.set(a,o)),r=o}return r},LO=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,DO=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const i=(s,a)=>{r[s]=a,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(s){let a=r[s];if(a!==void 0)return a;if((a=n[s])!==void 0)return i(s,a),a},set(s,a){s in r?r[s]=a:i(s,a)}}},Vh="!",ob=":",MO=[],lb=(e,t,r,n,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:i}),BO=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=i=>{const s=[];let a=0,o=0,l=0,u;const c=i.length;for(let b=0;b<c;b++){const y=i[b];if(a===0&&o===0){if(y===ob){s.push(i.slice(l,b)),l=b+1;continue}if(y==="/"){u=b;continue}}y==="["?a++:y==="]"?a--:y==="("?o++:y===")"&&o--}const d=s.length===0?i:i.slice(l);let h=d,f=!1;d.endsWith(Vh)?(h=d.slice(0,-1),f=!0):d.startsWith(Vh)&&(h=d.slice(1),f=!0);const m=u&&u>l?u-l:void 0;return lb(s,f,h,m)};if(t){const i=t+ob,s=n;n=a=>a.startsWith(i)?s(a.slice(i.length)):lb(MO,!1,a,void 0,!0)}if(r){const i=n;n=s=>r({className:s,parseClassName:i})}return n},FO=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let i=[];for(let s=0;s<r.length;s++){const a=r[s],o=a[0]==="[",l=t.has(a);o||l?(i.length>0&&(i.sort(),n.push(...i),i=[]),n.push(a)):i.push(a)}return i.length>0&&(i.sort(),n.push(...i)),n}},zO=e=>({cache:DO(e.cacheSize),parseClassName:BO(e),sortModifiers:FO(e),postfixLookupClassGroupIds:$O(e),...SO(e)}),$O=e=>{const t=Object.create(null),r=e.postfixLookupClassGroups;if(r)for(let n=0;n<r.length;n++)t[r[n]]=!0;return t},jO=/\s+/,UO=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:s,postfixLookupClassGroupIds:a}=t,o=[],l=e.trim().split(jO);let u="";for(let c=l.length-1;c>=0;c-=1){const d=l[c],{isExternal:h,modifiers:f,hasImportantModifier:m,baseClassName:b,maybePostfixModifierPosition:y}=r(d);if(h){u=d+(u.length>0?" "+u:u);continue}let E=!!y,w;if(E){const I=b.substring(0,y);w=n(I);const N=w&&a[w]?n(b):void 0;N&&N!==w&&(w=N,E=!1)}else w=n(b);if(!w){if(!E){u=d+(u.length>0?" "+u:u);continue}if(w=n(b),!w){u=d+(u.length>0?" "+u:u);continue}E=!1}const x=f.length===0?"":f.length===1?f[0]:s(f).join(":"),_=m?x+Vh:x,A=_+w;if(o.indexOf(A)>-1)continue;o.push(A);const S=i(w,E);for(let I=0;I<S.length;++I){const N=S[I];o.push(_+N)}u=d+(u.length>0?" "+u:u)}return u},HO=(...e)=>{let t=0,r,n,i="";for(;t<e.length;)(r=e[t++])&&(n=q5(r))&&(i&&(i+=" "),i+=n);return i},q5=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=q5(e[n]))&&(r&&(r+=" "),r+=t);return r},VO=(e,...t)=>{let r,n,i,s;const a=l=>{const u=t.reduce((c,d)=>d(c),e());return r=zO(u),n=r.cache.get,i=r.cache.set,s=o,o(l)},o=l=>{const u=n(l);if(u)return u;const c=UO(l,r);return i(l,c),c};return s=a,(...l)=>s(HO(...l))},qO=[],Pt=e=>{const t=r=>r[e]||qO;return t.isThemeGetter=!0,t.themeKey=e,t},G5=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,W5=/^\((?:(\w[\w-]*):)?(.+)\)$/i,GO=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,WO=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ZO=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,YO=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,KO=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,XO=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fi=e=>GO.test(e),Ve=e=>!!e&&!Number.isNaN(Number(e)),yn=e=>!!e&&Number.isInteger(Number(e)),ld=e=>e.endsWith("%")&&Ve(e.slice(0,-1)),Hn=e=>WO.test(e),Z5=()=>!0,QO=e=>ZO.test(e)&&!YO.test(e),lp=()=>!1,JO=e=>KO.test(e),eL=e=>XO.test(e),tL=e=>!be(e)&&!ye(e),rL=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),nL=e=>Wi(e,X5,lp),be=e=>G5.test(e),ns=e=>Wi(e,Q5,QO),ub=e=>Wi(e,dL,Ve),iL=e=>Wi(e,ex,Z5),sL=e=>Wi(e,J5,lp),cb=e=>Wi(e,Y5,lp),aL=e=>Wi(e,K5,eL),Jl=e=>Wi(e,tx,JO),ye=e=>W5.test(e),fo=e=>Fs(e,Q5),oL=e=>Fs(e,J5),db=e=>Fs(e,Y5),lL=e=>Fs(e,X5),uL=e=>Fs(e,K5),eu=e=>Fs(e,tx,!0),cL=e=>Fs(e,ex,!0),Wi=(e,t,r)=>{const n=G5.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Fs=(e,t,r=!1)=>{const n=W5.exec(e);return n?n[1]?t(n[1]):r:!1},Y5=e=>e==="position"||e==="percentage",K5=e=>e==="image"||e==="url",X5=e=>e==="length"||e==="size"||e==="bg-size",Q5=e=>e==="length",dL=e=>e==="number",J5=e=>e==="family-name",ex=e=>e==="number"||e==="weight",tx=e=>e==="shadow",hL=()=>{const e=Pt("color"),t=Pt("font"),r=Pt("text"),n=Pt("font-weight"),i=Pt("tracking"),s=Pt("leading"),a=Pt("breakpoint"),o=Pt("container"),l=Pt("spacing"),u=Pt("radius"),c=Pt("shadow"),d=Pt("inset-shadow"),h=Pt("text-shadow"),f=Pt("drop-shadow"),m=Pt("blur"),b=Pt("perspective"),y=Pt("aspect"),E=Pt("ease"),w=Pt("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],_=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[..._(),ye,be],S=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],N=()=>[ye,be,l],U=()=>[fi,"full","auto",...N()],z=()=>[yn,"none","subgrid",ye,be],Z=()=>["auto",{span:["full",yn,ye,be]},yn,ye,be],V=()=>[yn,"auto",ye,be],ae=()=>["auto","min","max","fr",ye,be],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Y=()=>["start","end","center","stretch","center-safe","end-safe"],de=()=>["auto",...N()],xe=()=>[fi,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],Ue=()=>[o,fi,"screen","full","dvw","lvw","svw","min","max","fit",...N()],He=()=>[fi,"screen","full","lh","dvh","lvh","svh","min","max","fit",...N()],L=()=>[e,ye,be],Re=()=>[..._(),db,cb,{position:[ye,be]}],Q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],M=()=>["auto","cover","contain",lL,nL,{size:[ye,be]}],pe=()=>[ld,fo,ns],oe=()=>["","none","full",u,ye,be],fe=()=>["",Ve,fo,ns],Ae=()=>["solid","dashed","dotted","double"],ze=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],re=()=>[Ve,ld,db,cb],Le=()=>["","none",m,ye,be],et=()=>["none",Ve,ye,be],Te=()=>["none",Ve,ye,be],Ke=()=>[Ve,ye,be],ot=()=>[fi,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Hn],breakpoint:[Hn],color:[Z5],container:[Hn],"drop-shadow":[Hn],ease:["in","out","in-out"],font:[tL],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Hn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Hn],shadow:[Hn],spacing:["px",Ve],text:[Hn],"text-shadow":[Hn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",fi,be,ye,y]}],container:["container"],"container-type":[{"@container":["","normal","size",ye,be]}],"container-named":[rL],columns:[{columns:[Ve,"auto",be,ye,o]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:A()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:U()}],"inset-x":[{"inset-x":U()}],"inset-y":[{"inset-y":U()}],start:[{"inset-s":U(),start:U()}],end:[{"inset-e":U(),end:U()}],"inset-bs":[{"inset-bs":U()}],"inset-be":[{"inset-be":U()}],top:[{top:U()}],right:[{right:U()}],bottom:[{bottom:U()}],left:[{left:U()}],visibility:["visible","invisible","collapse"],z:[{z:[yn,"auto",ye,be]}],basis:[{basis:[fi,"full","auto",o,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ve,fi,"auto","initial","none",be]}],grow:[{grow:["",Ve,ye,be]}],shrink:[{shrink:["",Ve,ye,be]}],order:[{order:[yn,"first","last","none",ye,be]}],"grid-cols":[{"grid-cols":z()}],"col-start-end":[{col:Z()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":z()}],"row-start-end":[{row:Z()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ae()}],"auto-rows":[{"auto-rows":ae()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[...Y(),"normal"]}],"justify-self":[{"justify-self":["auto",...Y()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[...Y(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Y(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[...Y(),"baseline"]}],"place-self":[{"place-self":["auto",...Y()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pbs:[{pbs:N()}],pbe:[{pbe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],m:[{m:de()}],mx:[{mx:de()}],my:[{my:de()}],ms:[{ms:de()}],me:[{me:de()}],mbs:[{mbs:de()}],mbe:[{mbe:de()}],mt:[{mt:de()}],mr:[{mr:de()}],mb:[{mb:de()}],ml:[{ml:de()}],"space-x":[{"space-x":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:xe()}],"inline-size":[{inline:["auto",...Ue()]}],"min-inline-size":[{"min-inline":["auto",...Ue()]}],"max-inline-size":[{"max-inline":["none",...Ue()]}],"block-size":[{block:["auto",...He()]}],"min-block-size":[{"min-block":["auto",...He()]}],"max-block-size":[{"max-block":["none",...He()]}],w:[{w:[o,"screen",...xe()]}],"min-w":[{"min-w":[o,"screen","none",...xe()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[a]},...xe()]}],h:[{h:["screen","lh",...xe()]}],"min-h":[{"min-h":["screen","lh","none",...xe()]}],"max-h":[{"max-h":["screen","lh","none",...xe()]}],"font-size":[{text:["base",r,fo,ns]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,cL,iL]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ld,be]}],"font-family":[{font:[oL,sL,t]}],"font-features":[{"font-features":[be]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,ye,be]}],"line-clamp":[{"line-clamp":[Ve,"none",ye,ub]}],leading:[{leading:["none",s,...N()]}],"list-image":[{"list-image":["none",ye,be]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ye,be]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ae(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ve,"from-font","auto",ye,ns]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[Ve,"auto",ye,be]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"tab-size":[{tab:[yn,ye,be]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ye,be]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ye,be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Re()}],"bg-repeat":[{bg:Q()}],"bg-size":[{bg:M()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},yn,ye,be],radial:["",ye,be],conic:["",yn,ye,be]},uL,aL]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:pe()}],"gradient-via-pos":[{via:pe()}],"gradient-to-pos":[{to:pe()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:oe()}],"rounded-s":[{"rounded-s":oe()}],"rounded-e":[{"rounded-e":oe()}],"rounded-t":[{"rounded-t":oe()}],"rounded-r":[{"rounded-r":oe()}],"rounded-b":[{"rounded-b":oe()}],"rounded-l":[{"rounded-l":oe()}],"rounded-ss":[{"rounded-ss":oe()}],"rounded-se":[{"rounded-se":oe()}],"rounded-ee":[{"rounded-ee":oe()}],"rounded-es":[{"rounded-es":oe()}],"rounded-tl":[{"rounded-tl":oe()}],"rounded-tr":[{"rounded-tr":oe()}],"rounded-br":[{"rounded-br":oe()}],"rounded-bl":[{"rounded-bl":oe()}],"border-w":[{border:fe()}],"border-w-x":[{"border-x":fe()}],"border-w-y":[{"border-y":fe()}],"border-w-s":[{"border-s":fe()}],"border-w-e":[{"border-e":fe()}],"border-w-bs":[{"border-bs":fe()}],"border-w-be":[{"border-be":fe()}],"border-w-t":[{"border-t":fe()}],"border-w-r":[{"border-r":fe()}],"border-w-b":[{"border-b":fe()}],"border-w-l":[{"border-l":fe()}],"divide-x":[{"divide-x":fe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":fe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ae(),"hidden","none"]}],"divide-style":[{divide:[...Ae(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-bs":[{"border-bs":L()}],"border-color-be":[{"border-be":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...Ae(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ve,ye,be]}],"outline-w":[{outline:["",Ve,fo,ns]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","inner","none",c,eu,Jl]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",d,eu,Jl]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:fe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[Ve,ns]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":fe()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",h,eu,Jl]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[Ve,ye,be]}],"mix-blend":[{"mix-blend":[...ze(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ze()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ve]}],"mask-image-linear-from-pos":[{"mask-linear-from":re()}],"mask-image-linear-to-pos":[{"mask-linear-to":re()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":re()}],"mask-image-t-to-pos":[{"mask-t-to":re()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":re()}],"mask-image-r-to-pos":[{"mask-r-to":re()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":re()}],"mask-image-b-to-pos":[{"mask-b-to":re()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":re()}],"mask-image-l-to-pos":[{"mask-l-to":re()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":re()}],"mask-image-x-to-pos":[{"mask-x-to":re()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":re()}],"mask-image-y-to-pos":[{"mask-y-to":re()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[ye,be]}],"mask-image-radial-from-pos":[{"mask-radial-from":re()}],"mask-image-radial-to-pos":[{"mask-radial-to":re()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":_()}],"mask-image-conic-pos":[{"mask-conic":[Ve]}],"mask-image-conic-from-pos":[{"mask-conic-from":re()}],"mask-image-conic-to-pos":[{"mask-conic-to":re()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Re()}],"mask-repeat":[{mask:Q()}],"mask-size":[{mask:M()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ye,be]}],filter:[{filter:["","none",ye,be]}],blur:[{blur:Le()}],brightness:[{brightness:[Ve,ye,be]}],contrast:[{contrast:[Ve,ye,be]}],"drop-shadow":[{"drop-shadow":["","none",f,eu,Jl]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",Ve,ye,be]}],"hue-rotate":[{"hue-rotate":[Ve,ye,be]}],invert:[{invert:["",Ve,ye,be]}],saturate:[{saturate:[Ve,ye,be]}],sepia:[{sepia:["",Ve,ye,be]}],"backdrop-filter":[{"backdrop-filter":["","none",ye,be]}],"backdrop-blur":[{"backdrop-blur":Le()}],"backdrop-brightness":[{"backdrop-brightness":[Ve,ye,be]}],"backdrop-contrast":[{"backdrop-contrast":[Ve,ye,be]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ve,ye,be]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ve,ye,be]}],"backdrop-invert":[{"backdrop-invert":["",Ve,ye,be]}],"backdrop-opacity":[{"backdrop-opacity":[Ve,ye,be]}],"backdrop-saturate":[{"backdrop-saturate":[Ve,ye,be]}],"backdrop-sepia":[{"backdrop-sepia":["",Ve,ye,be]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ye,be]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ve,"initial",ye,be]}],ease:[{ease:["linear","initial",E,ye,be]}],delay:[{delay:[Ve,ye,be]}],animate:[{animate:["none",w,ye,be]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,ye,be]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:et()}],"rotate-x":[{"rotate-x":et()}],"rotate-y":[{"rotate-y":et()}],"rotate-z":[{"rotate-z":et()}],scale:[{scale:Te()}],"scale-x":[{"scale-x":Te()}],"scale-y":[{"scale-y":Te()}],"scale-z":[{"scale-z":Te()}],"scale-3d":["scale-3d"],skew:[{skew:Ke()}],"skew-x":[{"skew-x":Ke()}],"skew-y":[{"skew-y":Ke()}],transform:[{transform:[ye,be,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ot()}],"translate-x":[{"translate-x":ot()}],"translate-y":[{"translate-y":ot()}],"translate-z":[{"translate-z":ot()}],"translate-none":["translate-none"],zoom:[{zoom:[yn,ye,be]}],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ye,be]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":L()}],"scrollbar-track-color":[{"scrollbar-track":L()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mbs":[{"scroll-mbs":N()}],"scroll-mbe":[{"scroll-mbe":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pbs":[{"scroll-pbs":N()}],"scroll-pbe":[{"scroll-pbe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ye,be]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[Ve,fo,ns,ub]}],stroke:[{stroke:["none",...L()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["start","end","right","left"],"inset-y":["inset-bs","inset-be","top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["ps","pe","pr","pl"],py:["pbs","pbe","pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["ms","me","mr","ml"],my:["mbs","mbe","mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-s","border-w-e","border-w-r","border-w-l"],"border-w-y":["border-w-bs","border-w-be","border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-s","border-color-e","border-color-r","border-color-l"],"border-color-y":["border-color-bs","border-color-be","border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-ms","scroll-me","scroll-mr","scroll-ml"],"scroll-my":["scroll-mbs","scroll-mbe","scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-ps","scroll-pe","scroll-pr","scroll-pl"],"scroll-py":["scroll-pbs","scroll-pbe","scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},up=VO(hL);function Ie(...e){return up(Qc(e))}var fL=Object.defineProperty,cp=(e,t)=>fL(e,"name",{value:t,configurable:!0});function qh(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}cp(qh,"setRef");function Ns(...e){return t=>{let r=!1;const n=e.map(i=>{const s=qh(i,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let i=0;i<n.length;i++){const s=n[i];typeof s=="function"?s():qh(e[i],null)}}}}cp(Ns,"composeRefs");function si(...e){return k.useCallback(Ns(...e),e)}cp(si,"useComposedRefs");var mL=Object.defineProperty,Xr=(e,t)=>mL(e,"name",{value:t,configurable:!0});function i0(e){const t=k.forwardRef((r,n)=>{let{children:i,...s}=r,a=null,o=!1;const l=[];Gh(i)&&typeof tu=="function"&&(i=tu(i._payload)),k.Children.forEach(i,h=>{var f;if(sx(h)){o=!0;const m=h;let b="child"in m.props?m.props.child:m.props.children;Gh(b)&&typeof tu=="function"&&(b=tu(b._payload)),a=bL(m,b),l.push((f=a==null?void 0:a.props)==null?void 0:f.children)}else l.push(h)}),a?a=k.cloneElement(a,void 0,l):!o&&k.Children.count(i)===1&&k.isValidElement(i)&&(a=i);const u=a?ix(a):void 0,c=si(n,u);if(!a){if(i||i===0)throw new Error(o?xL(e):vL(e));return i}const d=nx(s,a.props??{});return a.type!==k.Fragment&&(d.ref=n?c:u),k.cloneElement(a,d)});return t.displayName=`${e}.Slot`,t}Xr(i0,"createSlot");var pL=i0("Slot"),rx=Symbol.for("radix.slottable");function gL(e){const t=Xr(r=>"child"in r?r.children(r.child):r.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=rx,t}Xr(gL,"createSlottable");var bL=Xr((e,t)=>{if("child"in e.props){const r=e.props.child;return k.isValidElement(r)?k.cloneElement(r,void 0,e.props.children(r.props.children)):null}return k.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function nx(e,t){const r={...t};for(const n in t){const i=e[n],s=t[n];/^on[A-Z]/.test(n)?i&&s?r[n]=(...o)=>{const l=s(...o);return i(...o),l}:i&&(r[n]=i):n==="style"?r[n]={...i,...s}:n==="className"?r[n]=[i,s].filter(Boolean).join(" "):n==="aria-describedby"&&(r[n]=ox(s,i))}return{...e,...r}}Xr(nx,"mergeProps");function ix(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}Xr(ix,"getElementRef");function sx(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===rx}Xr(sx,"isSlottable");var yL=Symbol.for("react.lazy");function Gh(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===yL&&"_payload"in e&&ax(e._payload)}Xr(Gh,"isLazyComponent");function ax(e){return typeof e=="object"&&e!==null&&"then"in e}Xr(ax,"isPromiseLike");function ox(...e){const t=new Set;for(const r of e)if(typeof r=="string")for(const n of String(r).trim().split(/\s+/))n&&t.add(n);return t.size>0?Array.from(t).join(" "):void 0}Xr(ox,"concatAriaDescribedby");var vL=Xr(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),xL=Xr(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),tu=Ms[" use ".trim().toString()],EL=Object.defineProperty,_L=(e,t)=>EL(e,"name",{value:t,configurable:!0}),TL=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Rn=TL.reduce((e,t)=>{const r=i0(`Primitive.${t}`),n=k.forwardRef((i,s)=>{const{asChild:a,...o}=i,l=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(l,{...o,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function lx(e,t){e&&$a.flushSync(()=>e.dispatchEvent(t))}_L(lx,"dispatchDiscreteCustomEvent");var wL=Object.defineProperty,jr=(e,t)=>wL(e,"name",{value:t,configurable:!0});function kL(e,t){const r=k.createContext(t);r.displayName=e+"Context";const n=jr(s=>{const{children:a,...o}=s,l=k.useMemo(()=>o,Object.values(o));return v.jsx(r.Provider,{value:l,children:a})},"Provider");n.displayName=e+"Provider";function i(s,a={}){const{optional:o=!1}=a,l=k.useContext(r);if(l)return l;if(t!==void 0)return t;if(!o)throw new Error(`\`${s}\` must be used within \`${e}\``)}return jr(i,"useContext"),[n,i]}jr(kL,"createContext");function dp(e,t=[]){let r=[];function n(s,a){const o=k.createContext(a);o.displayName=s+"Context";const l=r.length;r=[...r,a];const u=jr(d=>{var E;const{scope:h,children:f,...m}=d,b=((E=h==null?void 0:h[e])==null?void 0:E[l])||o,y=k.useMemo(()=>m,Object.values(m));return v.jsx(b.Provider,{value:y,children:f})},"Provider");u.displayName=s+"Provider";function c(d,h,f={}){var E;const{optional:m=!1}=f,b=((E=h==null?void 0:h[e])==null?void 0:E[l])||o,y=k.useContext(b);if(y)return y;if(a!==void 0)return a;if(!m)throw new Error(`\`${d}\` must be used within \`${s}\``)}return jr(c,"useContext"),[u,c]}jr(n,"createContext");const i=jr(()=>{const s=r.map(a=>k.createContext(a));return jr(function(o){const l=(o==null?void 0:o[e])||s;return k.useMemo(()=>({[`__scope${e}`]:{...o,[e]:l}}),[o,l])},"useScope")},"createScope");return i.scopeName=e,[n,ux(i,...t)]}jr(dp,"createContextScope");function ux(...e){const t=e[0];if(e.length===1)return t;const r=jr(()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return jr(function(s){const a=n.reduce((o,{useScope:l,scopeName:u})=>{const d=l(s)[`__scope${u}`];return{...o,...d}},{});return k.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])},"useComposedScopes")},"createScope");return r.scopeName=t.scopeName,r}jr(ux,"composeContextScopes");var SL=Object.defineProperty,Ua=(e,t)=>SL(e,"name",{value:t,configurable:!0}),cx=!!(typeof window<"u"&&window.document&&window.document.createElement);function In(e,t,{checkForDefaultPrevented:r=!0}={}){return Ua(function(i){if(e==null||e(i),r===!1||!i||!i.defaultPrevented)return t==null?void 0:t(i)},"handleEvent")}Ua(In,"composeEventHandlers");function AL(e){var t;if(!cx)throw new Error("Cannot access window outside of the DOM");return((t=e==null?void 0:e.ownerDocument)==null?void 0:t.defaultView)??window}Ua(AL,"getOwnerWindow");function Wh(e){if(!cx)throw new Error("Cannot access document outside of the DOM");return(e==null?void 0:e.ownerDocument)??document}Ua(Wh,"getOwnerDocument");function dx(e,t=!1){const{activeElement:r}=Wh(e);if(!(r!=null&&r.nodeName))return null;if(hx(r)&&r.contentDocument)return dx(r.contentDocument.body,t);if(t){const n=r.getAttribute("aria-activedescendant");if(n){const i=Wh(r).getElementById(n);if(i)return i}}return r}Ua(dx,"getActiveElement");function hx(e){return e.tagName==="IFRAME"}Ua(hx,"isFrame");var Mi=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{},CL=Object.defineProperty,IL=(e,t)=>CL(e,"name",{value:t,configurable:!0}),hb=Ms[" useEffectEvent ".trim().toString()],fb=Ms[" useInsertionEffect ".trim().toString()];function fx(e){if(typeof hb=="function")return hb(e);const t=k.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof fb=="function"?fb(()=>{t.current=e}):Mi(()=>{t.current=e}),k.useMemo(()=>((...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)}),[])}IL(fx,"useEffectEvent");var NL=Object.defineProperty,kl=(e,t)=>NL(e,"name",{value:t,configurable:!0}),RL=Ms[" useInsertionEffect ".trim().toString()]||Mi;function Jo({prop:e,defaultProp:t,onChange:r=kl(()=>{},"onChange"),caller:n}){const[i,s,a]=mx({defaultProp:t,onChange:r}),o=e!==void 0,l=o?e:i,u=k.useCallback(c=>{var d;if(o){const h=px(c)?c(e):c;h!==e&&((d=a.current)==null||d.call(a,h))}else s(c)},[o,e,s,a]);return[l,u]}kl(Jo,"useControllableState");function mx({defaultProp:e,onChange:t}){const[r,n]=k.useState(e),i=k.useRef(r),s=k.useRef(t);return RL(()=>{s.current=t},[t]),k.useEffect(()=>{var a;i.current!==r&&((a=s.current)==null||a.call(s,r),i.current=r)},[r,i]),[r,n,s]}kl(mx,"useUncontrolledState");function px(e){return typeof e=="function"}kl(px,"isFunction");var mb=Symbol("RADIX:SYNC_STATE");function PL(e,t,r,n){const{prop:i,defaultProp:s,onChange:a,caller:o}=t,l=i!==void 0,u=fx(a),c=[{...r,state:s}];n&&c.push(n);const[d,h]=k.useReducer((y,E)=>{if(E.type===mb)return{...y,state:E.state};const w=e(y,E);return l&&!Object.is(w.state,y.state)&&u(w.state),w},...c),f=d.state,m=k.useRef(f);k.useEffect(()=>{m.current!==f&&(m.current=f,l||u(f))},[f,m,l]);const b=k.useMemo(()=>i!==void 0?{...d,state:i}:d,[d,i]);return k.useEffect(()=>{l&&!Object.is(i,d.state)&&h({type:mb,state:i})},[i,d.state,l]),[b,h]}kl(PL,"useControllableStateReducer");var OL=Object.defineProperty,ri=(e,t)=>OL(e,"name",{value:t,configurable:!0});function gx(e,t){return k.useReducer((r,n)=>t[r][n]??r,e)}ri(gx,"useStateMachine");var s0=ri(e=>{const{present:t,children:r}=e,n=bx(t),i=typeof r=="function"?r({present:n.isPresent}):k.Children.only(r),s=yx(n.ref,vx(i));return typeof r=="function"||n.isPresent?k.cloneElement(i,{ref:s}):null},"Presence");function bx(e){const[t,r]=k.useState(),n=k.useRef(null),i=k.useRef(e),s=k.useRef("none"),a=k.useRef(void 0),o=e?"mounted":"unmounted",[l,u]=gx(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.useEffect(()=>{l==="mounted"?(s.current=a.current??ia(n.current),a.current=void 0):s.current="none"},[l]),Mi(()=>{const c=n.current,d=i.current;if(d!==e){const f=s.current,m=ia(c);e?(a.current=m,u("MOUNT")):m==="none"||(c==null?void 0:c.display)==="none"?u("UNMOUNT"):u(d&&f!==m?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),Mi(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,h=ri(m=>{const y=ia(n.current).includes(CSS.escape(m.animationName));if(m.target===t&&y&&(u("ANIMATION_END"),!i.current)){const E=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=E)})}},"handleAnimationEnd"),f=ri(m=>{m.target===t&&(s.current=ia(n.current))},"handleAnimationStart");return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:k.useCallback(c=>{if(c){const d=getComputedStyle(c);n.current=d,a.current=ia(d)}else n.current=null;r(c)},[])}}ri(bx,"usePresence");function Zh(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}ri(Zh,"setRef");function yx(...e){const t=k.useRef(e);return t.current=e,k.useCallback(r=>{const n=t.current;let i=!1;const s=n.map(a=>{const o=Zh(a,r);return!i&&typeof o=="function"&&(i=!0),o});if(i)return()=>{for(let a=0;a<s.length;a++){const o=s[a];typeof o=="function"?o():Zh(n[a],null)}}},[])}ri(yx,"useStableComposedRefs");function ia(e){return(e==null?void 0:e.animationName)||"none"}ri(ia,"getAnimationName");function vx(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}ri(vx,"getElementRef");var LL=Object.defineProperty,DL=(e,t)=>LL(e,"name",{value:t,configurable:!0}),ML=Ms[" useId ".trim().toString()]||(()=>{}),BL=0;function Oo(e){const[t,r]=k.useState(ML());return Mi(()=>{e||r(n=>n??String(BL++))},[e]),e||(t?`radix-${t}`:"")}DL(Oo,"useId");var FL=Object.defineProperty,Sl=(e,t)=>FL(e,"name",{value:t,configurable:!0}),hp="Collapsible",[zL,m0e]=dp(hp),[$L,fp]=zL(hp),jL=k.forwardRef(Sl(function(t,r){const{__scopeCollapsible:n,open:i,defaultOpen:s,disabled:a,onOpenChange:o,...l}=t,[u,c]=Jo({prop:i,defaultProp:s??!1,onChange:o,caller:hp});return v.jsx($L,{scope:n,disabled:a,contentId:Oo(),open:u,onOpenToggle:k.useCallback(()=>c(d=>!d),[c]),children:v.jsx(Rn.div,{"data-state":a0(u),"data-disabled":a?"":void 0,...l,ref:r})})},"Collapsible")),UL="CollapsibleTrigger",HL=k.forwardRef(Sl(function(t,r){const{__scopeCollapsible:n,...i}=t,s=fp(UL,n);return v.jsx(Rn.button,{type:"button","aria-controls":s.open?s.contentId:void 0,"aria-expanded":s.open||!1,"data-state":a0(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...i,ref:r,onClick:In(t.onClick,s.onOpenToggle)})},"CollapsibleTrigger")),xx="CollapsibleContent",VL=k.forwardRef(Sl(function(t,r){const{forceMount:n,...i}=t,s=fp(xx,t.__scopeCollapsible);return v.jsx(s0,{present:n||s.open,children:({present:a})=>v.jsx(qL,{...i,ref:r,present:a})})},"CollapsibleContent")),qL=k.forwardRef(Sl(function(t,r){const{__scopeCollapsible:n,present:i,children:s,...a}=t,o=fp(xx,n),[l,u]=k.useState(i),c=k.useRef(null),d=si(r,c),h=k.useRef(0),f=h.current,m=k.useRef(0),b=m.current,y=o.open||l,E=k.useRef(y),w=k.useRef(void 0);return k.useEffect(()=>{const x=requestAnimationFrame(()=>E.current=!1);return()=>cancelAnimationFrame(x)},[]),Mi(()=>{const x=c.current;if(x){w.current=w.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const _=x.getBoundingClientRect();h.current=_.height,m.current=_.width,E.current||(x.style.transitionDuration=w.current.transitionDuration,x.style.animationName=w.current.animationName),u(i)}},[o.open,i]),v.jsx(Rn.div,{"data-state":a0(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!y,...a,ref:d,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...t.style},children:y&&s})},"CollapsibleContentImpl"));function a0(e){return e?"open":"closed"}Sl(a0,"getState");var GL=Object.defineProperty,WL=(e,t)=>GL(e,"name",{value:t,configurable:!0});function Na(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>((...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)}),[])}WL(Na,"useCallbackRef");var ZL=Object.defineProperty,qt=(e,t)=>ZL(e,"name",{value:t,configurable:!0}),Yh="dismissableLayer.update",YL="dismissableLayer.pointerDownOutside",KL="dismissableLayer.focusOutside",pb,Ex=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),XL=k.forwardRef(qt(function(t,r){const{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:i=!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:l,onDismiss:u,...c}=t,d=k.useContext(Ex),[h,f]=k.useState(null),m=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,b]=k.useState({}),y=si(r,f),E=Array.from(d.layers),[w]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),x=w?E.indexOf(w):-1,_=h?E.indexOf(h):-1,A=d.layersWithOutsidePointerEventsDisabled.size>0,S=_>=x,I=k.useRef(!1),N=Tx(V=>{a==null||a(V),l==null||l(V),V.defaultPrevented||u==null||u()},{ownerDocument:m,deferPointerDownOutside:i,isDeferredPointerDownOutsideRef:I,dismissableSurfaces:d.dismissableSurfaces,shouldHandlePointerDownOutside:k.useCallback(V=>{if(!(V instanceof Node))return!1;const ae=[...d.branches].some(J=>J.contains(V));return S&&!ae},[d.branches,S])}),U=wx(V=>{if(i&&I.current)return;const ae=V.target;[...d.branches].some(Y=>Y.contains(ae))||(o==null||o(V),l==null||l(V),V.defaultPrevented||u==null||u())},m),z=h?_===E.length-1:!1,Z=Na(V=>{V.key==="Escape"&&(s==null||s(V),!V.defaultPrevented&&u&&(V.preventDefault(),u()))});return k.useEffect(()=>{if(z)return m.addEventListener("keydown",Z,{capture:!0}),()=>m.removeEventListener("keydown",Z,{capture:!0})},[m,z,Z]),k.useEffect(()=>{if(h)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(pb=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(h)),d.layers.add(h),Kh(),()=>{n&&(d.layersWithOutsidePointerEventsDisabled.delete(h),d.layersWithOutsidePointerEventsDisabled.size===0&&(m.body.style.pointerEvents=pb))}},[h,m,n,d]),k.useEffect(()=>()=>{h&&(d.layers.delete(h),d.layersWithOutsidePointerEventsDisabled.delete(h),Kh())},[h,d]),k.useEffect(()=>{const V=qt(()=>b({}),"handleUpdate");return document.addEventListener(Yh,V),()=>document.removeEventListener(Yh,V)},[]),v.jsx(Rn.div,{...c,ref:y,style:{pointerEvents:A?S?"auto":"none":void 0,...t.style},onFocusCapture:In(t.onFocusCapture,U.onFocusCapture),onBlurCapture:In(t.onBlurCapture,U.onBlurCapture),onPointerDownCapture:In(t.onPointerDownCapture,N.onPointerDownCapture)})},"DismissableLayer"));function _x(){const e=k.useContext(Ex),[t,r]=k.useState(null);return k.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),r}qt(_x,"useDismissableLayerSurface");var QL=qt(()=>!0,"IS_TRUE");function Tx(e,t){const{ownerDocument:r=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:n=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:s,shouldHandlePointerDownOutside:a=QL}=t,o=Na(e),l=k.useRef(!1),u=k.useRef(!1),c=k.useRef(new Map),d=k.useRef(()=>{});return k.useEffect(()=>{function h(){u.current=!1,i.current=!1,c.current.clear()}qt(h,"resetOutsideInteraction");function f(){return Array.from(c.current.values()).some(Boolean)}qt(f,"isOutsideInteractionIntercepted");function m(x){if(!u.current)return;const _=x.target;_ instanceof Node&&[...s].some(S=>S.contains(_))||c.current.set(x.type,!0),x.type==="click"&&window.setTimeout(()=>{u.current&&d.current()},0)}qt(m,"handleInteractionCapture");function b(x){u.current&&c.current.set(x.type,!1)}qt(b,"handleInteractionBubble");const y=qt(x=>{if(x.target&&!l.current){let _=function(){r.removeEventListener("click",d.current);const S=f();h(),S||mp(YL,o,A,{discrete:!0})};if(qt(_,"handleAndDispatchPointerDownOutsideEvent"),!a(x.target)){r.removeEventListener("click",d.current),h(),l.current=!1;return}const A={originalEvent:x};u.current=!0,i.current=n&&x.button===0,c.current.clear(),!n||x.button!==0?_():(r.removeEventListener("click",d.current),d.current=_,r.addEventListener("click",d.current,{once:!0}))}else r.removeEventListener("click",d.current),h();l.current=!1},"handlePointerDown"),E=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const x of E)r.addEventListener(x,m,!0),r.addEventListener(x,b);const w=window.setTimeout(()=>{r.addEventListener("pointerdown",y)},0);return()=>{window.clearTimeout(w),r.removeEventListener("pointerdown",y),r.removeEventListener("click",d.current);for(const x of E)r.removeEventListener(x,m,!0),r.removeEventListener(x,b)}},[r,o,n,i,s,a]),{onPointerDownCapture:qt(()=>l.current=!0,"onPointerDownCapture")}}qt(Tx,"usePointerDownOutside");function wx(e,t=globalThis==null?void 0:globalThis.document){const r=Na(e),n=k.useRef(!1);return k.useEffect(()=>{const i=qt(s=>{s.target&&!n.current&&mp(KL,r,{originalEvent:s},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:qt(()=>n.current=!0,"onFocusCapture"),onBlurCapture:qt(()=>n.current=!1,"onBlurCapture")}}qt(wx,"useFocusOutside");function Kh(){const e=new CustomEvent(Yh);document.dispatchEvent(e)}qt(Kh,"dispatchUpdate");function mp(e,t,r,{discrete:n}){const i=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?lx(i,s):i.dispatchEvent(s)}qt(mp,"handleAndDispatchCustomEvent");var JL=Object.defineProperty,At=(e,t)=>JL(e,"name",{value:t,configurable:!0}),ud="focusScope.autoFocusOnMount",cd="focusScope.autoFocusOnUnmount",gb={bubbles:!1,cancelable:!0},eD=k.forwardRef(At(function(t,r){const{loop:n=!1,trapped:i=!1,branches:s,onMountAutoFocus:a,onUnmountAutoFocus:o,...l}=t,[u,c]=k.useState(null),d=Na(a),h=Na(o),f=k.useRef(null),m=si(r,c),b=k.useRef(s);k.useEffect(()=>{b.current=s});const y=k.useCallback(x=>{var _;return x?u!=null&&u.contains(x)?!0:!!((_=b.current)!=null&&_.some(A=>A.contains(x))):!1},[u]),E=k.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;k.useEffect(()=>{if(i){let x=function(I){if(E.paused||!u)return;const N=I.target;y(N)?f.current=N:Zn(f.current,{select:!0})},_=function(I){if(E.paused||!u)return;const N=I.relatedTarget;N!==null&&(y(N)||Zn(f.current,{select:!0}))},A=function(I){if(document.activeElement===document.body)for(const U of I)U.removedNodes.length>0&&Zn(u)};At(x,"handleFocusIn"),At(_,"handleFocusOut"),At(A,"handleMutations"),document.addEventListener("focusin",x),document.addEventListener("focusout",_);const S=new MutationObserver(A);return u&&S.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",_),S.disconnect()}}},[i,u,E.paused,y]),k.useEffect(()=>{if(u){bb.add(E);const x=document.activeElement;if(!u.contains(x)){const A=new CustomEvent(ud,gb);u.addEventListener(ud,d),u.dispatchEvent(A),A.defaultPrevented||(Cx(Ox(pp(u)),{select:!0}),document.activeElement===x&&Zn(u))}return()=>{u.removeEventListener(ud,d),setTimeout(()=>{const A=new CustomEvent(cd,gb);u.addEventListener(cd,h),u.dispatchEvent(A),A.defaultPrevented||Zn(x??document.body,{select:!0}),u.removeEventListener(cd,h),bb.remove(E)},0)}}},[u,d,h,E]);const w=k.useCallback(x=>{if(!n&&!i||E.paused)return;const _=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,A=document.activeElement;if(_&&A){const S=x.currentTarget,[I,N]=Ix(S);I&&N?!x.shiftKey&&A===N?(x.preventDefault(),n&&Zn(I,{select:!0})):x.shiftKey&&A===I&&(x.preventDefault(),n&&Zn(N,{select:!0})):A===S&&x.preventDefault()}},[n,i,E.paused]);return v.jsx(Rn.div,{tabIndex:-1,...l,ref:m,onKeyDown:w})},"FocusScope")),kx=k.createContext(null);function Sx({registry:e,children:t}){return e?v.jsx(kx.Provider,{value:e,children:t}):t}At(Sx,"FocusScopeBranchProvider");function Ax(){const[e,t]=k.useState([]),r=k.useMemo(()=>({add:At(n=>t(i=>i.includes(n)?i:[...i,n]),"add"),remove:At(n=>t(i=>i.filter(s=>s!==n)),"remove")}),[]);return{nodes:e,registry:r}}At(Ax,"useFocusScopeBranchRegistry");function tD(e){const t=k.useContext(kx);k.useEffect(()=>{if(!(!e||!t))return t.add(e),()=>t.remove(e)},[e,t])}At(tD,"useFocusScopeBranch");function Cx(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Zn(n,{select:t}),document.activeElement!==r)return}At(Cx,"focusFirst");function Ix(e){const t=pp(e),r=Xh(t,e),n=Xh(t.reverse(),e);return[r,n]}At(Ix,"getTabbableEdges");function pp(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:At(n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;r.nextNode();)t.push(r.currentNode);return t}At(pp,"getTabbableCandidates");function Xh(e,t){const r=typeof t.checkVisibility=="function"&&t.checkVisibility({checkVisibilityCSS:!0});for(const n of e)if(!(r?!n.checkVisibility({checkVisibilityCSS:!0}):Nx(n,{upTo:t})))return n}At(Xh,"findVisible");function Nx(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}At(Nx,"isHidden");function Rx(e){return e instanceof HTMLInputElement&&"select"in e}At(Rx,"isSelectableInput");function Zn(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Rx(e)&&t&&e.select()}}At(Zn,"focus");var bb=Px();function Px(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Qh(e,t),e.unshift(t)},remove(t){var r;e=Qh(e,t),(r=e[0])==null||r.resume()}}}At(Px,"createFocusScopesStack");function Qh(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}At(Qh,"arrayRemove");function Ox(e){return e.filter(t=>t.tagName!=="A")}At(Ox,"removeLinks");var rD=Object.defineProperty,nD=(e,t)=>rD(e,"name",{value:t,configurable:!0}),iD=k.forwardRef(nD(function(t,r){var l;const{container:n,...i}=t,[s,a]=k.useState(!1);Mi(()=>a(!0),[]);const o=n||s&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?$a.createPortal(v.jsx(Rn.div,{...i,ref:r}),o):null},"Portal")),sD=Object.defineProperty,gp=(e,t)=>sD(e,"name",{value:t,configurable:!0}),ru=0,vn=null;function aD(e){return bp(),e.children}gp(aD,"FocusGuards");function bp(){k.useEffect(()=>{vn||(vn={start:Jh(),end:Jh()});const{start:e,end:t}=vn;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),ru++,()=>{ru===1&&(vn==null||vn.start.remove(),vn==null||vn.end.remove(),vn=null),ru=Math.max(0,ru-1)}},[])}gp(bp,"useFocusGuards");function Jh(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}gp(Jh,"createFocusGuard");var oD=Object.defineProperty,Or=(e,t)=>oD(e,"name",{value:t,configurable:!0}),yp="Dialog",[Lx,p0e]=dp(yp),[lD,Pn]=Lx(yp),Dx=Or(e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:s,modal:a=!0}=e,o=k.useRef(null),l=k.useRef(null),{nodes:u,registry:c}=Ax(),[d,h]=Jo({prop:n,defaultProp:i??!1,onChange:s,caller:yp}),[f,m]=k.useState(0),[b,y]=k.useState(0);return v.jsx(lD,{scope:t,triggerRef:o,contentRef:l,contentId:Oo(),titleId:Oo(),descriptionId:Oo(),titlePresent:f>0,descriptionPresent:b>0,setTitleCount:m,setDescriptionCount:y,open:d,onOpenChange:h,onOpenToggle:k.useCallback(()=>h(E=>!E),[h]),modal:a,branchNodes:u,branchRegistry:c,children:r})},"Dialog"),uD="DialogTrigger",cD=k.forwardRef(Or(function(t,r){const{__scopeDialog:n,...i}=t,s=Pn(uD,n),a=si(r,s.triggerRef);return v.jsx(Rn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":o0(s.open),...i,ref:a,onClick:In(t.onClick,s.onOpenToggle)})},"DialogTrigger")),Mx="DialogPortal",[dD,Bx]=Lx(Mx,{forceMount:void 0}),Fx=Or(e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,s=Pn(Mx,t);return v.jsx(dD,{scope:t,forceMount:r,children:k.Children.map(n,a=>v.jsx(s0,{present:r||s.open,children:v.jsx(iD,{asChild:!0,container:i,children:a})}))})},"DialogPortal"),ef="DialogOverlay",zx=k.forwardRef(Or(function(t,r){const n=Bx(ef,t.__scopeDialog),{forceMount:i=n.forceMount,...s}=t,a=Pn(ef,t.__scopeDialog);return a.modal?v.jsx(s0,{present:i||a.open,children:v.jsx(fD,{...s,ref:r})}):null},"DialogOverlay")),hD=i0("DialogOverlay.RemoveScroll"),fD=k.forwardRef(Or(function(t,r){const{__scopeDialog:n,...i}=t,s=Pn(ef,n),a=_x(),o=si(r,a);return v.jsx(q9,{as:hD,allowPinchZoom:!0,shards:k.useMemo(()=>[s.contentRef,...s.branchNodes.map(l=>({current:l}))],[s.contentRef,s.branchNodes]),children:v.jsx(Rn.div,{"data-state":o0(s.open),...i,ref:o,style:{pointerEvents:"auto",...i.style}})})},"DialogOverlayImpl")),el="DialogContent",$x=k.forwardRef(Or(function(t,r){const n=Bx(el,t.__scopeDialog),{forceMount:i=n.forceMount,...s}=t,a=Pn(el,t.__scopeDialog);return v.jsx(s0,{present:i||a.open,children:a.modal?v.jsx(mD,{...s,ref:r}):v.jsx(pD,{...s,ref:r})})},"DialogContent")),mD=k.forwardRef(Or(function(t,r){const n=Pn(el,t.__scopeDialog),i=k.useRef(null),s=si(r,n.contentRef,i);return k.useEffect(()=>{const a=i.current;if(a)return G9(a)},[]),v.jsx(jx,{...t,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:In(t.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:In(t.onPointerDownOutside,a=>{const o=a.detail.originalEvent,l=o.button===0&&o.ctrlKey===!0;(o.button===2||l)&&a.preventDefault()}),onFocusOutside:In(t.onFocusOutside,a=>a.preventDefault())})},"DialogContentModal")),pD=k.forwardRef(Or(function(t,r){const n=Pn(el,t.__scopeDialog),i=k.useRef(!1),s=k.useRef(!1);return v.jsx(jx,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,l;(o=t.onCloseAutoFocus)==null||o.call(t,a),a.defaultPrevented||(i.current||(l=n.triggerRef.current)==null||l.focus(),a.preventDefault()),i.current=!1,s.current=!1},onInteractOutside:a=>{var u,c;(u=t.onInteractOutside)==null||u.call(t,a),a.defaultPrevented||(i.current=!0,a.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=a.target;((c=n.triggerRef.current)==null?void 0:c.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&s.current&&a.preventDefault()}})},"DialogContentNonModal")),jx=k.forwardRef(Or(function(t,r){const{__scopeDialog:n,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:a,"aria-describedby":o,children:l,...u}=t,c=Pn(el,n);return bp(),v.jsx(Sx,{registry:c.branchRegistry,children:v.jsx(eD,{asChild:!0,loop:!0,trapped:i,branches:c.branchNodes,onMountAutoFocus:s,onUnmountAutoFocus:a,children:v.jsx(XL,{role:"dialog",id:c.contentId,"aria-labelledby":c.titlePresent?c.titleId:void 0,"aria-describedby":c.descriptionPresent?Ux(o,c.descriptionId):o,"data-state":o0(c.open),...u,ref:r,deferPointerDownOutside:!0,onDismiss:()=>c.onOpenChange(!1),children:l})})})},"DialogContentImpl")),gD=k.forwardRef(Or(function(t,r){const{__scopeDialog:n,...i}=t,s=Pn("DialogTitle",n),{setTitleCount:a}=s;return Mi(()=>(a(o=>o+1),()=>a(o=>o-1)),[a]),v.jsx(Rn.h2,{id:s.titleId,...i,ref:r})},"DialogTitle")),bD="DialogClose",yD=k.forwardRef(Or(function(t,r){const{__scopeDialog:n,...i}=t,s=Pn(bD,n);return v.jsx(Rn.button,{type:"button",...i,ref:r,onClick:In(t.onClick,()=>s.onOpenChange(!1))})},"DialogClose"));function Ux(...e){const t=new Set;for(const r of e)if(typeof r=="string")for(const n of String(r).trim().split(/\s+/))n&&t.add(n);return t.size>0?Array.from(t).join(" "):void 0}Or(Ux,"concatAriaDescribedby");function o0(e){return e?"open":"closed"}Or(o0,"getState");const vD=ap("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Hr({className:e,variant:t="default",size:r="default",asChild:n=!1,...i}){const s=n?pL:"button";return v.jsx(s,{"data-slot":"button","data-variant":t,"data-size":r,className:Ie(vD({variant:t,size:r,className:e})),...i})}/*!---------------------------------------------------------------------------------------------
215
- * Copyright (c) StackBlitz. All rights reserved.
216
- * Licensed under the MIT License. See License.txt in the project root for license information.
217
- *--------------------------------------------------------------------------------------------*/const xD={damping:.7,stiffness:.05,mass:1.25},ED=70,_D=1e3/60,TD=350;let l0=!1;var L6;(L6=globalThis.document)==null||L6.addEventListener("mousedown",()=>{l0=!0});var D6;(D6=globalThis.document)==null||D6.addEventListener("mouseup",()=>{l0=!1});var M6;(M6=globalThis.document)==null||M6.addEventListener("click",()=>{l0=!1});const wD=(e={})=>{const[t,r]=k.useState(!1),[n,i]=k.useState(e.initial!==!1),[s,a]=k.useState(!1),o=k.useRef(null);o.current=e;const l=k.useCallback(()=>{var _;if(!l0)return!1;const w=window.getSelection();if(!w||!w.rangeCount)return!1;const x=w.getRangeAt(0);return x.commonAncestorContainer.contains(y.current)||((_=y.current)==null?void 0:_.contains(x.commonAncestorContainer))},[]),u=k.useCallback(w=>{d.isAtBottom=w,i(w)},[]),c=k.useCallback(w=>{d.escapedFromLock=w,r(w)},[]),d=k.useMemo(()=>{let w;return{escapedFromLock:t,isAtBottom:n,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){var x;return((x=y.current)==null?void 0:x.scrollTop)??0},set scrollTop(x){if(y.current){const{scrollBehavior:_}=getComputedStyle(y.current);_!=="auto"&&(y.current.style.scrollBehavior="auto"),y.current.scrollTop=x,d.ignoreScrollToTop=y.current.scrollTop,_!=="auto"&&(y.current.style.scrollBehavior=_)}},get targetScrollTop(){return!y.current||!E.current?0:y.current.scrollHeight-1-y.current.clientHeight},get calculatedTargetScrollTop(){if(!y.current||!E.current)return 0;const{targetScrollTop:x}=this;if(!e.targetScrollTop)return x;if((w==null?void 0:w.targetScrollTop)===x)return w.calculatedScrollTop;const _=Math.max(Math.min(e.targetScrollTop(x,{scrollElement:y.current,contentElement:E.current}),x),0);return w={targetScrollTop:x,calculatedScrollTop:_},requestAnimationFrame(()=>{w=void 0}),_},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=ED}}},[]),h=k.useCallback((w={})=>{var U;typeof w=="string"&&(w={animation:w}),w.preserveScrollPosition||u(!0);const x=Date.now()+(Number(w.wait)||0),_=hd(o.current,w.animation),{ignoreEscapes:A=!1}=w;let S,I=d.calculatedTargetScrollTop;w.duration instanceof Promise?w.duration.finally(()=>{S=Date.now()}):S=x+(w.duration??0);const N=async()=>{const z=new Promise(requestAnimationFrame).then(()=>{var J;if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:Z}=d,V=performance.now(),ae=(V-(d.lastTick??V))/_D;if(d.animation||(d.animation={behavior:_,promise:z,ignoreEscapes:A}),d.animation.behavior===_&&(d.lastTick=V),l()||x>Date.now())return N();if(Z<Math.min(I,d.calculatedTargetScrollTop)){if(((J=d.animation)==null?void 0:J.behavior)===_){if(_==="instant")return d.scrollTop=d.calculatedTargetScrollTop,N();d.velocity=(_.damping*d.velocity+_.stiffness*d.scrollDifference)/_.mass,d.accumulated+=d.velocity*ae,d.scrollTop+=d.accumulated,d.scrollTop!==Z&&(d.accumulated=0)}return N()}return S>Date.now()?(I=d.calculatedTargetScrollTop,N()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?h({animation:hd(o.current,o.current.resize),ignoreEscapes:A,duration:Math.max(0,S-Date.now())||void 0}):d.isAtBottom)});return z.then(Z=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),Z))};return w.wait!==!0&&(d.animation=void 0),((U=d.animation)==null?void 0:U.behavior)===_?d.animation.promise:N()},[u,l,d]),f=k.useCallback(()=>{c(!0),u(!1)},[c,u]),m=k.useCallback(({target:w})=>{if(w!==y.current)return;const{scrollTop:x,ignoreScrollToTop:_}=d;let{lastScrollTop:A=x}=d;d.lastScrollTop=x,d.ignoreScrollToTop=void 0,_&&_>x&&(A=_),a(d.isNearBottom),setTimeout(()=>{var N;if(d.resizeDifference||x===_)return;if(l()){c(!0),u(!1);return}const S=x>A,I=x<A;if((N=d.animation)!=null&&N.ignoreEscapes){d.scrollTop=A;return}I&&(c(!0),u(!1)),S&&c(!1),!d.escapedFromLock&&d.isNearBottom&&u(!0)},1)},[c,u,l,d]),b=k.useCallback(({target:w,deltaY:x})=>{var A;let _=w;for(;!["scroll","auto"].includes(getComputedStyle(_).overflow);){if(!_.parentElement)return;_=_.parentElement}_===y.current&&x<0&&y.current.scrollHeight>y.current.clientHeight&&!((A=d.animation)!=null&&A.ignoreEscapes)&&(c(!0),u(!1))},[c,u,d]),y=yb(w=>{var x,_;(x=y.current)==null||x.removeEventListener("scroll",m),(_=y.current)==null||_.removeEventListener("wheel",b),w==null||w.addEventListener("scroll",m,{passive:!0}),w==null||w.addEventListener("wheel",b,{passive:!0})},[]),E=yb(w=>{var _,A;if((_=d.resizeObserver)==null||_.disconnect(),d.resizeObserver=void 0,!w)return;let x;d.resizeObserver=new ResizeObserver(([S])=>{const{height:I}=S.contentRect,N=I-(x??I);if(d.resizeDifference=N,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),a(d.isNearBottom),N>=0){const U=hd(o.current,x?o.current.resize:o.current.initial);h({animation:U,wait:!0,preserveScrollPosition:!0,duration:U==="instant"?void 0:TD})}else d.isNearBottom&&(c(!1),u(!0));x=I,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===N&&(d.resizeDifference=0)},1)})}),(A=d.resizeObserver)==null||A.observe(w)},[]);return{contentRef:E,scrollRef:y,scrollToBottom:h,stopScroll:f,isAtBottom:n||s,isNearBottom:s,escapedFromLock:t,state:d}};function yb(e,t){const r=k.useCallback(n=>(r.current=n,e(n)),t);return r}const dd=new Map;function hd(...e){const t={...xD};let r=!1;for(const i of e){if(i==="instant"){r=!0;continue}typeof i=="object"&&(r=!1,t.damping=i.damping??t.damping,t.stiffness=i.stiffness??t.stiffness,t.mass=i.mass??t.mass)}const n=JSON.stringify(t);return dd.has(n)||dd.set(n,Object.freeze(t)),r?"instant":dd.get(n)}/*!---------------------------------------------------------------------------------------------
218
- * Copyright (c) StackBlitz. All rights reserved.
219
- * Licensed under the MIT License. See License.txt in the project root for license information.
220
- *--------------------------------------------------------------------------------------------*/const Hx=k.createContext(null),kD=typeof window<"u"?k.useLayoutEffect:k.useEffect;function uc({instance:e,children:t,resize:r,initial:n,mass:i,damping:s,stiffness:a,targetScrollTop:o,contextRef:l,...u}){const c=k.useRef(null),d=k.useCallback((A,S)=>{const I=(_==null?void 0:_.targetScrollTop)??o;return(I==null?void 0:I(A,S))??A},[o]),h=wD({mass:i,damping:s,stiffness:a,resize:r,initial:n,targetScrollTop:d}),{scrollRef:f,contentRef:m,scrollToBottom:b,stopScroll:y,isAtBottom:E,escapedFromLock:w,state:x}=e??h,_=k.useMemo(()=>({scrollToBottom:b,stopScroll:y,scrollRef:f,isAtBottom:E,escapedFromLock:w,contentRef:m,state:x,get targetScrollTop(){return c.current},set targetScrollTop(A){c.current=A}}),[b,E,m,f,y,w,x]);return k.useImperativeHandle(l,()=>_,[_]),kD(()=>{f.current&&getComputedStyle(f.current).overflow==="visible"&&(f.current.style.overflow="auto")},[]),k.createElement(Hx.Provider,{value:_},k.createElement("div",{...u},typeof t=="function"?t(_):t))}(function(e){function t({children:r,scrollClassName:n,...i}){const s=Vx();return k.createElement("div",{ref:s.scrollRef,style:{height:"100%",width:"100%",scrollbarGutter:"stable both-edges"},className:n},k.createElement("div",{...i,ref:s.contentRef},typeof r=="function"?r(s):r))}e.Content=t})(uc||(uc={}));function Vx(){const e=k.useContext(Hx);if(!e)throw new Error("use-stick-to-bottom component context must be used within a StickToBottom component");return e}const SD=({className:e,...t})=>v.jsx(uc,{className:Ie("relative flex-1 overflow-y-hidden",e),initial:"smooth",resize:"smooth",role:"log",...t}),AD=({className:e,...t})=>v.jsx(uc.Content,{className:Ie("flex flex-col gap-8 p-4",e),...t}),CD=({className:e,title:t="No messages yet",description:r="Start a conversation to see messages here",icon:n,children:i,...s})=>v.jsx("div",{className:Ie("flex size-full flex-col items-center justify-center gap-3 p-8 text-center",e),...s,children:i??v.jsxs(v.Fragment,{children:[n&&v.jsx("div",{className:"text-muted-foreground",children:n}),v.jsxs("div",{className:"space-y-1",children:[v.jsx("h3",{className:"font-medium text-sm",children:t}),r&&v.jsx("p",{className:"text-muted-foreground text-sm",children:r})]})]})}),ID=({className:e,...t})=>{const{isAtBottom:r,scrollToBottom:n}=Vx(),i=k.useCallback(()=>{n()},[n]);return!r&&v.jsx(Hr,{className:Ie("absolute bottom-4 left-[50%] translate-x-[-50%] rounded-full dark:bg-background dark:hover:bg-muted",e),onClick:i,size:"icon",type:"button",variant:"outline",...t,children:v.jsx(rO,{className:"size-4"})})};var tf=Object.defineProperty,ND=Object.getOwnPropertyDescriptor,RD=Object.getOwnPropertyNames,PD=Object.prototype.hasOwnProperty,OD=(e,t)=>{let r={};for(var n in e)tf(r,n,{get:e[n],enumerable:!0});return tf(r,Symbol.toStringTag,{value:"Module"}),r},LD=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=RD(t),s=0,a=i.length,o;s<a;s++)o=i[s],!PD.call(e,o)&&o!==r&&tf(e,o,{get:(l=>t[l]).bind(null,o),enumerable:!(n=ND(t,o))||n.enumerable});return e},DD=(e,t,r)=>(LD(e,t,"default"),r);const vp=[{id:"abap",name:"ABAP",import:(()=>O(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",aliases:["actionscript","as3"],import:(()=>O(()=>import("./actionscript-3-B3316cI-.js"),[]))},{id:"ada",name:"Ada",import:(()=>O(()=>import("./ada-BIOnG6TC.js"),[]))},{id:"ahk",name:"AutoHotkey",aliases:["ahk1"],import:(()=>O(()=>import("./ahk-BrbAagtO.js"),[]))},{id:"ahk2",name:"AutoHotkey2",import:(()=>O(()=>import("./ahk2-8Zs4aa1G.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>O(()=>import("./angular-html-D_SYSyRt.js").then(e=>e.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>O(()=>import("./angular-ts-DGq0tZX5.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>O(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>O(()=>import("./apex-DhZFqWV2.js"),[]))},{id:"apl",name:"APL",import:(()=>O(()=>import("./apl-ChzvTHjC.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>O(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>O(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>O(()=>import("./asciidoc-CSVQ5wI8.js"),[]))},{id:"asm",name:"Assembly",import:(()=>O(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>O(()=>import("./astro-DTjqU0_L.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>O(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>O(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch","cmd"],import:(()=>O(()=>import("./bat-CickPsom.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>O(()=>import("./beancount-BgSHGh8x.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>O(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>O(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>O(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>O(()=>import("./bird2-Bx8U0n9b.js"),[]))},{id:"blade",name:"Blade",import:(()=>O(()=>import("./blade-k33SngOZ.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>O(()=>import("./bsl-DlhNcFeZ.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>O(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>O(()=>import("./c3-Dp5svz6Z.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>O(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>O(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"chapel",name:"Chapel",aliases:["chpl"],import:(()=>O(()=>import("./chapel-DTp_pixX.js"),__vite__mapDeps([21,22])))},{id:"clarity",name:"Clarity",import:(()=>O(()=>import("./clarity-Dn5IMItf.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>O(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>O(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>O(()=>import("./cobol-BBKr1ja6.js"),__vite__mapDeps([23,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>O(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>O(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>O(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([24,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>O(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Rocq",import:(()=>O(()=>import("./coq-BqXF5kFF.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>O(()=>import("./cpp-BMRokrvK.js"),__vite__mapDeps([25,26,27,22])))},{id:"crystal",name:"Crystal",import:(()=>O(()=>import("./crystal-LUwhHfY5.js"),__vite__mapDeps([28,1,2,3,16,22,29])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>O(()=>import("./csharp-B_TYUkTI.js"),[]))},{id:"css",name:"CSS",import:(()=>O(()=>import("./css-Z72CF80r.js"),[]))},{id:"csv",name:"CSV",import:(()=>O(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>O(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>O(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>O(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>O(()=>import("./dart-CtKP3W-j.js"),[]))},{id:"dax",name:"DAX",import:(()=>O(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>O(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>O(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>O(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>O(()=>import("./dotenv-De0Btta0.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>O(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>O(()=>import("./edge-CJaD-t2L.js"),__vite__mapDeps([30,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>O(()=>import("./elixir-DkJLSxtU.js"),__vite__mapDeps([31,1,2,3])))},{id:"elm",name:"Elm",import:(()=>O(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([32,27,22])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>O(()=>import("./emacs-lisp-DaIrSCgJ.js"),[]))},{id:"erb",name:"ERB",import:(()=>O(()=>import("./erb-CSMaCouu.js"),__vite__mapDeps([33,1,2,3,34,35,7,8,16,36,11,37,13,25,26,27,22,29,38,39])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>O(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([40,41])))},{id:"fennel",name:"Fennel",import:(()=>O(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>O(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>O(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>O(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([42,43])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>O(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>O(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([44,41])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>O(()=>import("./gdresource-TyuKm33G.js"),__vite__mapDeps([45,46,47])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>O(()=>import("./gdscript-DqcFQ5yU.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>O(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>O(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>O(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>O(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([48,49])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>O(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([50,29])))},{id:"gleam",name:"Gleam",import:(()=>O(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>O(()=>import("./glimmer-js-Drrc9bTt.js"),__vite__mapDeps([51,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>O(()=>import("./glimmer-ts-zeybXsvi.js"),__vite__mapDeps([52,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>O(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([27,22])))},{id:"gn",name:"GN",import:(()=>O(()=>import("./gn-8iBmfbXw.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>O(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>O(()=>import("./go-C27-OAKa.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>O(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([36,2,11,37,13])))},{id:"groovy",name:"Groovy",import:(()=>O(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>O(()=>import("./hack-Ck6-gGSS.js"),__vite__mapDeps([53,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>O(()=>import("./haml-GN_XdMnF.js"),__vite__mapDeps([35,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>O(()=>import("./handlebars-DPT5vKgj.js"),__vite__mapDeps([54,1,2,3,39])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>O(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>O(()=>import("./haxe-CfZj7gIn.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>O(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>O(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>O(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>O(()=>import("./html-BlS82ilI.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>O(()=>import("./html-derivative-DZhk3IEZ.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>O(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([55,29,9,7,8,36,2,11,37,13])))},{id:"hurl",name:"Hurl",import:(()=>O(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([56,36,2,11,37,13,7,8,57])))},{id:"hxml",name:"HXML",import:(()=>O(()=>import("./hxml-2-FPmUDs.js"),__vite__mapDeps([58,59])))},{id:"hy",name:"Hy",import:(()=>O(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>O(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>O(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>O(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>O(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>O(()=>import("./jinja-DFQZVq3b.js"),__vite__mapDeps([60,1,2,3])))},{id:"jison",name:"Jison",import:(()=>O(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([61,2])))},{id:"json",name:"JSON",import:(()=>O(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>O(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>O(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>O(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>O(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>O(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>O(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>O(()=>import("./julia-Cu79e8SL.js"),__vite__mapDeps([62,25,26,27,22,20,2,63,16])))},{id:"just",name:"Just",aliases:["justfile"],import:(()=>O(()=>import("./just-CMxyWJJc.js"),__vite__mapDeps([64,29,2,11,65,1,3,7,8,16,20,34,35,36,37,13,25,26,27,22,38,39])))},{id:"kdl",name:"KDL",import:(()=>O(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>O(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>O(()=>import("./kusto-wEQ09or8.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>O(()=>import("./latex-DJVikpzR.js"),__vite__mapDeps([66,67,63])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>O(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>O(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>O(()=>import("./liquid-B-duXHXw.js"),__vite__mapDeps([68,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>O(()=>import("./llvm-BZoOZj88.js"),[]))},{id:"log",name:"Log file",import:(()=>O(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>O(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>O(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([38,22])))},{id:"luau",name:"Luau",import:(()=>O(()=>import("./luau-nOZpfvQi.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>O(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>O(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>O(()=>import("./marko-BYgDmDgU.js"),__vite__mapDeps([69,3,70,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>O(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>O(()=>import("./mdc-DF4WjDMn.js"),__vite__mapDeps([71,41,39,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>O(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>O(()=>import("./mermaid-CQcHuHx7.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>O(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>O(()=>import("./mojo-DJz3ZmWd.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>O(()=>import("./moonbit-Bag4Rp_g.js"),[]))},{id:"move",name:"Move",import:(()=>O(()=>import("./move-el3G9tDJ.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>O(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>O(()=>import("./nextflow-BCxp2Aob.js"),__vite__mapDeps([72,73])))},{id:"nextflow-groovy",name:"Nextflow Groovy",import:(()=>O(()=>import("./nextflow-groovy-CedDknKX.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>O(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([74,38,22])))},{id:"nim",name:"Nim",import:(()=>O(()=>import("./nim-nV83PyhX.js"),__vite__mapDeps([75,22,1,2,3,7,8,27,41])))},{id:"nix",name:"Nix",import:(()=>O(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nsis",name:"NSIS",import:(()=>O(()=>import("./nsis-BlV79W_Q.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>O(()=>import("./nushell-BXD5iret.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>O(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>O(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>O(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>O(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>O(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"org",name:"Org Markup",import:(()=>O(()=>import("./org-6a7ccXN_.js"),__vite__mapDeps([76,2,11,13,8,20,26,3,38,22,77,78,65,1,7,16,63,34,35,36,37,25,27,29,39,79,9,80,81,24,82,49,83,84,85,70,5,86,87,88,89,90,75,41,31,40,91,92,93,48,50,66,67])))},{id:"pascal",name:"Pascal",import:(()=>O(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>O(()=>import("./perl-5klg-GXX.js"),__vite__mapDeps([65,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>O(()=>import("./php-DoruYMF0.js"),__vite__mapDeps([79,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>O(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>O(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>O(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>O(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>O(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>O(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1","pwsh"],import:(()=>O(()=>import("./powershell-Dd0kTxKP.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>O(()=>import("./prisma-Vru482bI.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>O(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>O(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>O(()=>import("./pug-BtYPkAgq.js"),__vite__mapDeps([94,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>O(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>O(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>O(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>O(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([95,2])))},{id:"qmldir",name:"QML Directory",import:(()=>O(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>O(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>O(()=>import("./r-Cf5RLm7j.js"),[]))},{id:"racket",name:"Racket",import:(()=>O(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>O(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>O(()=>import("./razor-CyjPwjZj.js"),__vite__mapDeps([96,1,2,3,89])))},{id:"rbs",name:"RBS",aliases:["ruby-signature"],import:(()=>O(()=>import("./rbs-CpoqiR4B.js"),[]))},{id:"reg",name:"Windows Registry Script",import:(()=>O(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>O(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>O(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>O(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>O(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>O(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>O(()=>import("./rst-CVOjT0e7.js"),__vite__mapDeps([97,15,1,2,3,25,26,27,22,20,29,39,98,34,35,7,8,16,36,11,37,13,38])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>O(()=>import("./ruby-C8rp0wew.js"),__vite__mapDeps([34,1,2,3,35,7,8,16,36,11,37,13,25,26,27,22,29,38,39])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>O(()=>import("./rust-DPvrY3IQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>O(()=>import("./sas-BGn39htG.js"),__vite__mapDeps([99,16])))},{id:"sass",name:"Sass",import:(()=>O(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>O(()=>import("./scala-CqE71os6.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>O(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>O(()=>import("./scss-Cw6XMfVs.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>O(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>O(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([100,101])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>O(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>O(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([102,29])))},{id:"smalltalk",name:"GNU Smalltalk",import:(()=>O(()=>import("./smalltalk-BOQMe2GC.js"),[]))},{id:"smithy",name:"Smithy",import:(()=>O(()=>import("./smithy-cds9vsN8.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>O(()=>import("./solidity-DijEV5ha.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>O(()=>import("./soy-zscZBeg6.js"),__vite__mapDeps([103,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>O(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([104,105])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>O(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>O(()=>import("./sql-DkvoVjww.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>O(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>O(()=>import("./stata-DACIj5bg.js"),__vite__mapDeps([106,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>O(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>O(()=>import("./surrealql-Cjom0U5J.js"),__vite__mapDeps([107,2])))},{id:"svelte",name:"Svelte",import:(()=>O(()=>import("./svelte-D84K1R2Q.js"),__vite__mapDeps([108,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>O(()=>import("./swift-C2oV4EkX.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>O(()=>import("./system-verilog-0hqHdDBg.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>O(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>O(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>O(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>O(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>O(()=>import("./templ-Vpw5XpSW.js"),__vite__mapDeps([109,84,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>O(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>O(()=>import("./tex-D96PA37w.js"),__vite__mapDeps([67,63])))},{id:"toml",name:"TOML",import:(()=>O(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>O(()=>import("./ts-tags-Ls60c9xG.js"),__vite__mapDeps([110,11,3,2,27,22,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>O(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>O(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>O(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>O(()=>import("./twig-D9-LOF2p.js"),__vite__mapDeps([111,2,3,5,79,1,7,8,16,9,20,34,35,36,11,37,13,25,26,27,22,29,38,39])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>O(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>O(()=>import("./typespec-ClX509-Q.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>O(()=>import("./typst-DamkJZ1Q.js"),__vite__mapDeps([112,113,114,22,81,24,2,25,26,27,3,89,90,49,83,31,1,40,41,44,48,50,29,84,85,54,39,77,8,115,9,62,20,63,16,66,67,70,116,38,78,82,65,7,86,79,117,94,34,35,36,11,37,13,5,118,93,87,88,111,119,120,80])))},{id:"v",name:"V",import:(()=>O(()=>import("./v-BGw2Nkan.js"),[]))},{id:"vala",name:"Vala",import:(()=>O(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",import:(()=>O(()=>import("./vb-Cu-pLBUe.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>O(()=>import("./verilog-nZwndyjY.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>O(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>O(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>O(()=>import("./vue-DSqPwMUe.js"),__vite__mapDeps([121,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>O(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([122,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>O(()=>import("./vue-vine-C0RcJ6UU.js"),__vite__mapDeps([123,3,5,70,124,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>O(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>O(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>O(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>O(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>O(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>O(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>O(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>O(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>O(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([93,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>O(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>O(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>O(()=>import("./zig-VOosw3JB.js"),[]))}],MD=Object.fromEntries(vp.map(e=>[e.id,e.import])),BD=Object.fromEntries(vp.flatMap(e=>{var t;return((t=e.aliases)==null?void 0:t.map(r=>[r,e.import]))||[]})),qx={...MD,...BD},FD=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>O(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>O(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>O(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>O(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>O(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>O(()=>import("./catppuccin-frappe-CZL1YF0i.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>O(()=>import("./catppuccin-latte-DH-8KZSZ.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>O(()=>import("./catppuccin-macchiato-B7yYVSCf.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>O(()=>import("./catppuccin-mocha-Ct7hS0mc.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>O(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>O(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>O(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>O(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>O(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>O(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>O(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>O(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>O(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>O(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>O(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>O(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>O(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>O(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>O(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>O(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>O(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>O(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>O(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>O(()=>import("./horizon-bright-CUuTKBJd.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>O(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>O(()=>import("./kanagawa-dragon-BuwD2xS4.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>O(()=>import("./kanagawa-lotus-C3DzagqV.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>O(()=>import("./kanagawa-wave-DFGoQZhC.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>O(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>O(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>O(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>O(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>O(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>O(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>O(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>O(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>O(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>O(()=>import("./monokai-CR4piiQ-.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>O(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>O(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>O(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>O(()=>import("./one-dark-pro-CxGP3dtY.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>O(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>O(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>O(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>O(()=>import("./red-DMbB5_pp.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>O(()=>import("./rose-pine-5qJOZa0Y.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>O(()=>import("./rose-pine-dawn-zx0QlTCp.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>O(()=>import("./rose-pine-moon-C9pEdX9L.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>O(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>O(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>O(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>O(()=>import("./solarized-dark-UcubFVte.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>O(()=>import("./solarized-light-DCG28T6R.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>O(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>O(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>O(()=>import("./vesper-DRje8inN.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>O(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>O(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>O(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],zD=Object.fromEntries(FD.map(e=>[e.id,e.import]));var xp=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function $D(){return 2147483648}function jD(){return typeof performance<"u"?performance.now():Date.now()}const UD=(e,t)=>e+(t-e%t)%t;async function HD(e){let t,r;const n={};function i(f){r=f,n.HEAPU8=new Uint8Array(f),n.HEAPU32=new Uint32Array(f)}function s(f,m,b){n.HEAPU8.copyWithin(f,m,m+b)}function a(f){try{return t.grow(f-r.byteLength+65535>>>16),i(t.buffer),1}catch{}}function o(f){const m=n.HEAPU8.length;f=f>>>0;const b=$D();if(f>b)return!1;for(let y=1;y<=4;y*=2){let E=m*(1+.2/y);E=Math.min(E,f+100663296);const w=Math.min(b,UD(Math.max(f,E),65536));if(a(w))return!0}return!1}const l=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function u(f,m,b=1024){const y=m+b;let E=m;for(;f[E]&&!(E>=y);)++E;if(E-m>16&&f.buffer&&l)return l.decode(f.subarray(m,E));let w="";for(;m<E;){let x=f[m++];if(!(x&128)){w+=String.fromCharCode(x);continue}const _=f[m++]&63;if((x&224)===192){w+=String.fromCharCode((x&31)<<6|_);continue}const A=f[m++]&63;if((x&240)===224?x=(x&15)<<12|_<<6|A:x=(x&7)<<18|_<<12|A<<6|f[m++]&63,x<65536)w+=String.fromCharCode(x);else{const S=x-65536;w+=String.fromCharCode(55296|S>>10,56320|S&1023)}}return w}function c(f,m){return f?u(n.HEAPU8,f,m):""}const d={emscripten_get_now:jD,emscripten_memcpy_big:s,emscripten_resize_heap:o,fd_write:()=>0};async function h(){const m=await e({env:d,wasi_snapshot_preview1:d});t=m.memory,i(t.buffer),Object.assign(n,m),n.UTF8ToString=c}return await h(),n}var VD=Object.defineProperty,qD=(e,t,r)=>t in e?VD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Bt=(e,t,r)=>qD(e,typeof t!="symbol"?t+"":t,r);let Vt=null;function GD(e){throw new xp(e.UTF8ToString(e.getLastOnigError()))}class u0{constructor(t){Bt(this,"utf16Length"),Bt(this,"utf8Length"),Bt(this,"utf16Value"),Bt(this,"utf8Value"),Bt(this,"utf16OffsetToUtf8"),Bt(this,"utf8OffsetToUtf16");const r=t.length,n=u0._utf8ByteLength(t),i=n!==r,s=i?new Uint32Array(r+1):null;i&&(s[r]=n);const a=i?new Uint32Array(n+1):null;i&&(a[n]=r);const o=new Uint8Array(n);let l=0;for(let u=0;u<r;u++){const c=t.charCodeAt(u);let d=c,h=!1;if(c>=55296&&c<=56319&&u+1<r){const f=t.charCodeAt(u+1);f>=56320&&f<=57343&&(d=(c-55296<<10)+65536|f-56320,h=!0)}i&&(s[u]=l,h&&(s[u+1]=l),d<=127?a[l+0]=u:d<=2047?(a[l+0]=u,a[l+1]=u):d<=65535?(a[l+0]=u,a[l+1]=u,a[l+2]=u):(a[l+0]=u,a[l+1]=u,a[l+2]=u,a[l+3]=u)),d<=127?o[l++]=d:d<=2047?(o[l++]=192|(d&1984)>>>6,o[l++]=128|(d&63)>>>0):d<=65535?(o[l++]=224|(d&61440)>>>12,o[l++]=128|(d&4032)>>>6,o[l++]=128|(d&63)>>>0):(o[l++]=240|(d&1835008)>>>18,o[l++]=128|(d&258048)>>>12,o[l++]=128|(d&4032)>>>6,o[l++]=128|(d&63)>>>0),h&&u++}this.utf16Length=r,this.utf8Length=n,this.utf16Value=t,this.utf8Value=o,this.utf16OffsetToUtf8=s,this.utf8OffsetToUtf16=a}static _utf8ByteLength(t){let r=0;for(let n=0,i=t.length;n<i;n++){const s=t.charCodeAt(n);let a=s,o=!1;if(s>=55296&&s<=56319&&n+1<i){const l=t.charCodeAt(n+1);l>=56320&&l<=57343&&(a=(s-55296<<10)+65536|l-56320,o=!0)}a<=127?r+=1:a<=2047?r+=2:a<=65535?r+=3:r+=4,o&&n++}return r}createString(t){const r=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,r),r}}const c0=class xn{constructor(t){if(Bt(this,"id",++xn.LAST_ID),Bt(this,"_onigBinding"),Bt(this,"content"),Bt(this,"utf16Length"),Bt(this,"utf8Length"),Bt(this,"utf16OffsetToUtf8"),Bt(this,"utf8OffsetToUtf16"),Bt(this,"ptr"),!Vt)throw new xp("Must invoke loadWasm first.");this._onigBinding=Vt,this.content=t;const r=new u0(t);this.utf16Length=r.utf16Length,this.utf8Length=r.utf8Length,this.utf16OffsetToUtf8=r.utf16OffsetToUtf8,this.utf8OffsetToUtf16=r.utf8OffsetToUtf16,this.utf8Length<1e4&&!xn._sharedPtrInUse?(xn._sharedPtr||(xn._sharedPtr=Vt.omalloc(1e4)),xn._sharedPtrInUse=!0,Vt.HEAPU8.set(r.utf8Value,xn._sharedPtr),this.ptr=xn._sharedPtr):this.ptr=r.createString(Vt)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===xn._sharedPtr?xn._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Bt(c0,"LAST_ID",0);Bt(c0,"_sharedPtr",0);Bt(c0,"_sharedPtrInUse",!1);let Gx=c0;class WD{constructor(t){if(Bt(this,"_onigBinding"),Bt(this,"_ptr"),!Vt)throw new xp("Must invoke loadWasm first.");const r=[],n=[];for(let o=0,l=t.length;o<l;o++){const u=new u0(t[o]);r[o]=u.createString(Vt),n[o]=u.utf8Length}const i=Vt.omalloc(4*t.length);Vt.HEAPU32.set(r,i/4);const s=Vt.omalloc(4*t.length);Vt.HEAPU32.set(n,s/4);const a=Vt.createOnigScanner(i,s,t.length);for(let o=0,l=t.length;o<l;o++)Vt.ofree(r[o]);Vt.ofree(s),Vt.ofree(i),a===0&&GD(Vt),this._onigBinding=Vt,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,r,n){let i=0;if(typeof n=="number"&&(i=n),typeof t=="string"){t=new Gx(t);const s=this._findNextMatchSync(t,r,!1,i);return t.dispose(),s}return this._findNextMatchSync(t,r,!1,i)}_findNextMatchSync(t,r,n,i){const s=this._onigBinding,a=s.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(r),i);if(a===0)return null;const o=s.HEAPU32;let l=a/4;const u=o[l++],c=o[l++],d=[];for(let h=0;h<c;h++){const f=t.convertUtf8OffsetToUtf16(o[l++]),m=t.convertUtf8OffsetToUtf16(o[l++]);d[h]={start:f,end:m,length:m-f}}return{index:u,captureIndices:d}}}function ZD(e){return typeof e.instantiator=="function"}function YD(e){return typeof e.default=="function"}function KD(e){return typeof e.data<"u"}function XD(e){return typeof Response<"u"&&e instanceof Response}function QD(e){var t;return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&((t=Buffer.isBuffer)==null?void 0:t.call(Buffer,e))||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let nu;function Wx(e){if(nu)return nu;async function t(){Vt=await HD(async r=>{let n=e;return n=await n,typeof n=="function"&&(n=await n(r)),typeof n=="function"&&(n=await n(r)),ZD(n)?n=await n.instantiator(r):YD(n)?n=await n.default(r):(KD(n)&&(n=n.data),XD(n)?typeof WebAssembly.instantiateStreaming=="function"?n=await JD(n)(r):n=await eM(n)(r):QD(n)?n=await fd(n)(r):n instanceof WebAssembly.Module?n=await fd(n)(r):"default"in n&&n.default instanceof WebAssembly.Module&&(n=await fd(n.default)(r))),"instance"in n&&(n=n.instance),"exports"in n&&(n=n.exports),n})}return nu=t(),nu}function fd(e){return t=>WebAssembly.instantiate(e,t)}function JD(e){return t=>WebAssembly.instantiateStreaming(e,t)}function eM(e){return async t=>{const r=await e.arrayBuffer();return WebAssembly.instantiate(r,t)}}let Zx;function tM(e){Zx=e}function rM(){return Zx}async function nM(e){return e&&await Wx(e),{createScanner(t){return new WD(t.map(r=>typeof r=="string"?r:r.source))},createString(t){return new Gx(t)}}}const iM=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:nM,getDefaultWasmLoader:rM,loadWasm:Wx,setDefaultWasmLoader:tM},Symbol.toStringTag,{value:"Module"}));var Yx=OD({});DD(Yx,iM);var ut=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function sM(e){return Ep(e)}function Ep(e){return Array.isArray(e)?aM(e):e instanceof RegExp?e:typeof e=="object"?oM(e):e}function aM(e){let t=[];for(let r=0,n=e.length;r<n;r++)t[r]=Ep(e[r]);return t}function oM(e){let t={};for(let r in e)t[r]=Ep(e[r]);return t}function Kx(e,...t){return t.forEach(r=>{for(let n in r)e[n]=r[n]}),e}function Xx(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?Xx(e.substring(0,e.length-1)):e.substr(~t+1)}var md=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,iu=class{static hasCaptures(e){return e===null?!1:(md.lastIndex=0,md.test(e))}static replaceCaptures(e,t,r){return e.replace(md,(n,i,s,a)=>{let o=r[parseInt(i||s,10)];if(o){let l=t.substring(o.start,o.end);for(;l[0]===".";)l=l.substring(1);switch(a){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return n})}};function Qx(e,t){return e<t?-1:e>t?1:0}function Jx(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let r=e.length,n=t.length;if(r===n){for(let i=0;i<r;i++){let s=Qx(e[i],t[i]);if(s!==0)return s}return 0}return r-n}function vb(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function eE(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var tE=class{constructor(e){G(this,"cache",new Map);this.fn=e}get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},cc=class{constructor(e,t,r){G(this,"_cachedMatchRoot",new tE(e=>this._root.match(e)));this._colorMap=e,this._defaults=t,this._root=r}static createFromRawTheme(e,t){return this.createFromParsedTheme(cM(e),t)}static createFromParsedTheme(e,t){return hM(e,t)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,n=this._cachedMatchRoot.get(t).find(i=>lM(e.parent,i.parentScopes));return n?new rE(n.fontStyle,n.foreground,n.background):null}},pd=class Ou{constructor(t,r){this.parent=t,this.scopeName=r}static push(t,r){for(const n of r)t=new Ou(t,n);return t}static from(...t){let r=null;for(let n=0;n<t.length;n++)r=new Ou(r,t[n]);return r}push(t){return new Ou(this,t)}getSegments(){let t=this;const r=[];for(;t;)r.push(t.scopeName),t=t.parent;return r.reverse(),r}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const r=[];let n=this;for(;n&&n!==t;)r.push(n.scopeName),n=n.parent;return n===t?r.reverse():void 0}};function lM(e,t){if(t.length===0)return!0;for(let r=0;r<t.length;r++){let n=t[r],i=!1;if(n===">"){if(r===t.length-1)return!1;n=t[++r],i=!0}for(;e&&!uM(e.scopeName,n);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function uM(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var rE=class{constructor(e,t,r){this.fontStyle=e,this.foregroundId=t,this.backgroundId=r}};function cM(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,r=[],n=0;for(let i=0,s=t.length;i<s;i++){let a=t[i];if(!a.settings)continue;let o;if(typeof a.scope=="string"){let d=a.scope;d=d.replace(/^[,]+/,""),d=d.replace(/[,]+$/,""),o=d.split(",")}else Array.isArray(a.scope)?o=a.scope:o=[""];let l=-1;if(typeof a.settings.fontStyle=="string"){l=0;let d=a.settings.fontStyle.split(" ");for(let h=0,f=d.length;h<f;h++)switch(d[h]){case"italic":l=l|1;break;case"bold":l=l|2;break;case"underline":l=l|4;break;case"strikethrough":l=l|8;break}}let u=null;typeof a.settings.foreground=="string"&&vb(a.settings.foreground)&&(u=a.settings.foreground);let c=null;typeof a.settings.background=="string"&&vb(a.settings.background)&&(c=a.settings.background);for(let d=0,h=o.length;d<h;d++){let m=o[d].trim().split(" "),b=m[m.length-1],y=null;m.length>1&&(y=m.slice(0,m.length-1),y.reverse()),r[n++]=new dM(b,y,i,l,u,c)}}return r}var dM=class{constructor(e,t,r,n,i,s){this.scope=e,this.parentScopes=t,this.index=r,this.fontStyle=n,this.foreground=i,this.background=s}},er=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(er||{});function hM(e,t){e.sort((l,u)=>{let c=Qx(l.scope,u.scope);return c!==0||(c=Jx(l.parentScopes,u.parentScopes),c!==0)?c:l.index-u.index});let r=0,n="#000000",i="#ffffff";for(;e.length>=1&&e[0].scope==="";){let l=e.shift();l.fontStyle!==-1&&(r=l.fontStyle),l.foreground!==null&&(n=l.foreground),l.background!==null&&(i=l.background)}let s=new fM(t),a=new rE(r,s.getId(n),s.getId(i)),o=new pM(new rf(0,null,-1,0,0),[]);for(let l=0,u=e.length;l<u;l++){let c=e[l];o.insert(0,c.scope,c.parentScopes,c.fontStyle,s.getId(c.foreground),s.getId(c.background))}return new cc(s,a,o)}var fM=class{constructor(e){G(this,"_isFrozen");G(this,"_lastColorId");G(this,"_id2color");G(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,r=e.length;t<r;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},mM=Object.freeze([]),rf=class nE{constructor(t,r,n,i,s){G(this,"scopeDepth");G(this,"parentScopes");G(this,"fontStyle");G(this,"foreground");G(this,"background");this.scopeDepth=t,this.parentScopes=r||mM,this.fontStyle=n,this.foreground=i,this.background=s}clone(){return new nE(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let r=[];for(let n=0,i=t.length;n<i;n++)r[n]=t[n].clone();return r}acceptOverwrite(t,r,n,i){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,r!==-1&&(this.fontStyle=r),n!==0&&(this.foreground=n),i!==0&&(this.background=i)}},pM=class nf{constructor(t,r=[],n={}){G(this,"_rulesWithParentScopes");this._mainRule=t,this._children=n,this._rulesWithParentScopes=r}static _cmpBySpecificity(t,r){if(t.scopeDepth!==r.scopeDepth)return r.scopeDepth-t.scopeDepth;let n=0,i=0;for(;t.parentScopes[n]===">"&&n++,r.parentScopes[i]===">"&&i++,!(n>=t.parentScopes.length||i>=r.parentScopes.length);){const s=r.parentScopes[i].length-t.parentScopes[n].length;if(s!==0)return s;n++,i++}return r.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let n=t.indexOf("."),i,s;if(n===-1?(i=t,s=""):(i=t.substring(0,n),s=t.substring(n+1)),this._children.hasOwnProperty(i))return this._children[i].match(s)}const r=this._rulesWithParentScopes.concat(this._mainRule);return r.sort(nf._cmpBySpecificity),r}insert(t,r,n,i,s,a){if(r===""){this._doInsertHere(t,n,i,s,a);return}let o=r.indexOf("."),l,u;o===-1?(l=r,u=""):(l=r.substring(0,o),u=r.substring(o+1));let c;this._children.hasOwnProperty(l)?c=this._children[l]:(c=new nf(this._mainRule.clone(),rf.cloneArr(this._rulesWithParentScopes)),this._children[l]=c),c.insert(t+1,u,n,i,s,a)}_doInsertHere(t,r,n,i,s){if(r===null){this._mainRule.acceptOverwrite(t,n,i,s);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let l=this._rulesWithParentScopes[a];if(Jx(l.parentScopes,r)===0){l.acceptOverwrite(t,n,i,s);return}}n===-1&&(n=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),s===0&&(s=this._mainRule.background),this._rulesWithParentScopes.push(new rf(t,r,n,i,s))}},Ts=class Mr{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const r=Mr.getLanguageId(t),n=Mr.getTokenType(t),i=Mr.getFontStyle(t),s=Mr.getForeground(t),a=Mr.getBackground(t);console.log({languageId:r,tokenType:n,fontStyle:i,foreground:s,background:a})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,r,n,i,s,a,o){let l=Mr.getLanguageId(t),u=Mr.getTokenType(t),c=Mr.containsBalancedBrackets(t)?1:0,d=Mr.getFontStyle(t),h=Mr.getForeground(t),f=Mr.getBackground(t);return r!==0&&(l=r),n!==8&&(u=n),i!==null&&(c=i?1:0),s!==-1&&(d=s),a!==0&&(h=a),o!==0&&(f=o),(l<<0|u<<8|c<<10|d<<11|h<<15|f<<24)>>>0}};function dc(e,t){const r=[],n=gM(e);let i=n.next();for(;i!==null;){let l=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=n.next()}let u=a();if(r.push({matcher:u,priority:l}),i!==",")break;i=n.next()}return r;function s(){if(i==="-"){i=n.next();const l=s();return u=>!!l&&!l(u)}if(i==="("){i=n.next();const l=o();return i===")"&&(i=n.next()),l}if(xb(i)){const l=[];do l.push(i),i=n.next();while(xb(i));return u=>t(l,u)}return null}function a(){const l=[];let u=s();for(;u;)l.push(u),u=s();return c=>l.every(d=>d(c))}function o(){const l=[];let u=a();for(;u&&(l.push(u),i==="|"||i===",");){do i=n.next();while(i==="|"||i===",");u=a()}return c=>l.some(d=>d(c))}}function xb(e){return!!e&&!!e.match(/[\w\.:]+/)}function gM(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,r=t.exec(e);return{next:()=>{if(!r)return null;const n=r[0];return r=t.exec(e),n}}}function iE(e){typeof e.dispose=="function"&&e.dispose()}var tl=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},bM=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},yM=class{constructor(){G(this,"_references",[]);G(this,"_seenReferenceKeys",new Set);G(this,"visitedRule",new Set)}get references(){return this._references}add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},vM=class{constructor(e,t){G(this,"seenFullScopeRequests",new Set);G(this,"seenPartialScopeRequests",new Set);G(this,"Q");this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new tl(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new yM;for(const r of e)xM(r,this.initialScopeName,this.repo,t);for(const r of t.references)if(r instanceof tl){if(this.seenFullScopeRequests.has(r.scopeName))continue;this.seenFullScopeRequests.add(r.scopeName),this.Q.push(r)}else{if(this.seenFullScopeRequests.has(r.scopeName)||this.seenPartialScopeRequests.has(r.toKey()))continue;this.seenPartialScopeRequests.add(r.toKey()),this.Q.push(r)}}};function xM(e,t,r,n){const i=r.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const s=r.lookup(t);e instanceof tl?Lu({baseGrammar:s,selfGrammar:i},n):sf(e.ruleName,{baseGrammar:s,selfGrammar:i,repository:i.repository},n);const a=r.injections(e.scopeName);if(a)for(const o of a)n.add(new tl(o))}function sf(e,t,r){if(t.repository&&t.repository[e]){const n=t.repository[e];hc([n],t,r)}}function Lu(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&hc(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&hc(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function hc(e,t,r){for(const n of e){if(r.visitedRule.has(n))continue;r.visitedRule.add(n);const i=n.repository?Kx({},t.repository,n.repository):t.repository;Array.isArray(n.patterns)&&hc(n.patterns,{...t,repository:i},r);const s=n.include;if(!s)continue;const a=sE(s);switch(a.kind){case 0:Lu({...t,selfGrammar:t.baseGrammar},r);break;case 1:Lu(t,r);break;case 2:sf(a.ruleName,{...t,repository:i},r);break;case 3:case 4:const o=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(o){const l={baseGrammar:t.baseGrammar,selfGrammar:o,repository:i};a.kind===4?sf(a.ruleName,l,r):Lu(l,r)}else a.kind===4?r.add(new bM(a.scopeName,a.ruleName)):r.add(new tl(a.scopeName));break}}}var EM=class{constructor(){G(this,"kind",0)}},_M=class{constructor(){G(this,"kind",1)}},TM=class{constructor(e){G(this,"kind",2);this.ruleName=e}},wM=class{constructor(e){G(this,"kind",3);this.scopeName=e}},kM=class{constructor(e,t){G(this,"kind",4);this.scopeName=e,this.ruleName=t}};function sE(e){if(e==="$base")return new EM;if(e==="$self")return new _M;const t=e.indexOf("#");if(t===-1)return new wM(e);if(t===0)return new TM(e.substring(1));{const r=e.substring(0,t),n=e.substring(t+1);return new kM(r,n)}}var SM=/\\(\d+)/,Eb=/\\(\d+)/g,AM=-1,aE=-2;var Al=class{constructor(e,t,r,n){G(this,"$location");G(this,"id");G(this,"_nameIsCapturing");G(this,"_name");G(this,"_contentNameIsCapturing");G(this,"_contentName");this.$location=e,this.id=t,this._name=r||null,this._nameIsCapturing=iu.hasCaptures(this._name),this._contentName=n||null,this._contentNameIsCapturing=iu.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${Xx(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:iu.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:iu.replaceCaptures(this._contentName,e,t)}},CM=class extends Al{constructor(t,r,n,i,s){super(t,r,n,i);G(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(t,r){throw new Error("Not supported!")}compile(t,r){throw new Error("Not supported!")}compileAG(t,r,n,i){throw new Error("Not supported!")}},IM=class extends Al{constructor(t,r,n,i,s){super(t,r,n,null);G(this,"_match");G(this,"captures");G(this,"_cachedCompiledPatterns");this._match=new rl(i,this.id),this.captures=s,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,r){r.push(this._match)}compile(t,r){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,r,n,i){return this._getCachedCompiledPatterns(t).compileAG(t,n,i)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new nl,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},_b=class extends Al{constructor(t,r,n,i,s){super(t,r,n,i);G(this,"hasMissingPatterns");G(this,"patterns");G(this,"_cachedCompiledPatterns");this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,r){for(const n of this.patterns)t.getRule(n).collectPatterns(t,r)}compile(t,r){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,r,n,i){return this._getCachedCompiledPatterns(t).compileAG(t,n,i)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new nl,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},af=class extends Al{constructor(t,r,n,i,s,a,o,l,u,c){super(t,r,n,i);G(this,"_begin");G(this,"beginCaptures");G(this,"_end");G(this,"endHasBackReferences");G(this,"endCaptures");G(this,"applyEndPatternLast");G(this,"hasMissingPatterns");G(this,"patterns");G(this,"_cachedCompiledPatterns");this._begin=new rl(s,this.id),this.beginCaptures=a,this._end=new rl(o||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=l,this.applyEndPatternLast=u||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,r){return this._end.resolveBackReferences(t,r)}collectPatterns(t,r){r.push(this._begin)}compile(t,r){return this._getCachedCompiledPatterns(t,r).compile(t)}compileAG(t,r,n,i){return this._getCachedCompiledPatterns(t,r).compileAG(t,n,i)}_getCachedCompiledPatterns(t,r){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new nl;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,r):this._cachedCompiledPatterns.setSource(0,r)),this._cachedCompiledPatterns}},fc=class extends Al{constructor(t,r,n,i,s,a,o,l,u){super(t,r,n,i);G(this,"_begin");G(this,"beginCaptures");G(this,"whileCaptures");G(this,"_while");G(this,"whileHasBackReferences");G(this,"hasMissingPatterns");G(this,"patterns");G(this,"_cachedCompiledPatterns");G(this,"_cachedCompiledWhilePatterns");this._begin=new rl(s,this.id),this.beginCaptures=a,this.whileCaptures=l,this._while=new rl(o,aE),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,r){return this._while.resolveBackReferences(t,r)}collectPatterns(t,r){r.push(this._begin)}compile(t,r){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,r,n,i){return this._getCachedCompiledPatterns(t).compileAG(t,n,i)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new nl;for(const r of this.patterns)t.getRule(r).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,r){return this._getCachedCompiledWhilePatterns(t,r).compile(t)}compileWhileAG(t,r,n,i){return this._getCachedCompiledWhilePatterns(t,r).compileAG(t,n,i)}_getCachedCompiledWhilePatterns(t,r){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new nl,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,r||"￿"),this._cachedCompiledWhilePatterns}},oE=class Jt{static createCaptureRule(t,r,n,i,s){return t.registerRule(a=>new CM(r,a,n,i,s))}static getCompiledRuleId(t,r,n){return t.id||r.registerRule(i=>{if(t.id=i,t.match)return new IM(t.$vscodeTextmateLocation,t.id,t.name,t.match,Jt._compileCaptures(t.captures,r,n));if(typeof t.begin>"u"){t.repository&&(n=Kx({},n,t.repository));let s=t.patterns;return typeof s>"u"&&t.include&&(s=[{include:t.include}]),new _b(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,Jt._compilePatterns(s,r,n))}return t.while?new fc(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Jt._compileCaptures(t.beginCaptures||t.captures,r,n),t.while,Jt._compileCaptures(t.whileCaptures||t.captures,r,n),Jt._compilePatterns(t.patterns,r,n)):new af(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Jt._compileCaptures(t.beginCaptures||t.captures,r,n),t.end,Jt._compileCaptures(t.endCaptures||t.captures,r,n),t.applyEndPatternLast,Jt._compilePatterns(t.patterns,r,n))}),t.id}static _compileCaptures(t,r,n){let i=[];if(t){let s=0;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const o=parseInt(a,10);o>s&&(s=o)}for(let a=0;a<=s;a++)i[a]=null;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const o=parseInt(a,10);let l=0;t[a].patterns&&(l=Jt.getCompiledRuleId(t[a],r,n)),i[o]=Jt.createCaptureRule(r,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,l)}}return i}static _compilePatterns(t,r,n){let i=[];if(t)for(let s=0,a=t.length;s<a;s++){const o=t[s];let l=-1;if(o.include){const u=sE(o.include);switch(u.kind){case 0:case 1:l=Jt.getCompiledRuleId(n[o.include],r,n);break;case 2:let c=n[u.ruleName];c&&(l=Jt.getCompiledRuleId(c,r,n));break;case 3:case 4:const d=u.scopeName,h=u.kind===4?u.ruleName:null,f=r.getExternalGrammar(d,n);if(f)if(h){let m=f.repository[h];m&&(l=Jt.getCompiledRuleId(m,r,f.repository))}else l=Jt.getCompiledRuleId(f.repository.$self,r,f.repository);break}}else l=Jt.getCompiledRuleId(o,r,n);if(l!==-1){const u=r.getRule(l);let c=!1;if((u instanceof _b||u instanceof af||u instanceof fc)&&u.hasMissingPatterns&&u.patterns.length===0&&(c=!0),c)continue;i.push(l)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},rl=class lE{constructor(t,r){G(this,"source");G(this,"ruleId");G(this,"hasAnchor");G(this,"hasBackReferences");G(this,"_anchorCache");if(t&&typeof t=="string"){const n=t.length;let i=0,s=[],a=!1;for(let o=0;o<n;o++)if(t.charAt(o)==="\\"&&o+1<n){const u=t.charAt(o+1);u==="z"?(s.push(t.substring(i,o)),s.push("$(?!\\n)(?<!\\n)"),i=o+2):(u==="A"||u==="G")&&(a=!0),o++}this.hasAnchor=a,i===0?this.source=t:(s.push(t.substring(i,n)),this.source=s.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=r,typeof this.source=="string"?this.hasBackReferences=SM.test(this.source):this.hasBackReferences=!1}clone(){return new lE(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,r){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let n=r.map(i=>t.substring(i.start,i.end));return Eb.lastIndex=0,this.source.replace(Eb,(i,s)=>eE(n[parseInt(s,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],r=[],n=[],i=[],s,a,o,l;for(s=0,a=this.source.length;s<a;s++)o=this.source.charAt(s),t[s]=o,r[s]=o,n[s]=o,i[s]=o,o==="\\"&&s+1<a&&(l=this.source.charAt(s+1),l==="A"?(t[s+1]="￿",r[s+1]="￿",n[s+1]="A",i[s+1]="A"):l==="G"?(t[s+1]="￿",r[s+1]="G",n[s+1]="￿",i[s+1]="G"):(t[s+1]=l,r[s+1]=l,n[s+1]=l,i[s+1]=l),s++);return{A0_G0:t.join(""),A0_G1:r.join(""),A1_G0:n.join(""),A1_G1:i.join("")}}resolveAnchors(t,r){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?r?this._anchorCache.A1_G1:this._anchorCache.A1_G0:r?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},nl=class{constructor(){G(this,"_items");G(this,"_hasAnchors");G(this,"_cached");G(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(r=>r.source);this._cached=new Tb(e,t,this._items.map(r=>r.ruleId))}return this._cached}compileAG(e,t,r){return this._hasAnchors?t?r?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,r)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,r)),this._anchorCache.A1_G0):r?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,r)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,r)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,r){let n=this._items.map(i=>i.resolveAnchors(t,r));return new Tb(e,n,this._items.map(i=>i.ruleId))}},Tb=class{constructor(e,t,r){G(this,"scanner");this.regExps=t,this.rules=r,this.scanner=e.createOnigScanner(t)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,r=this.rules.length;t<r;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
221
- `)}findNextMatchSync(e,t,r){const n=this.scanner.findNextMatchSync(e,t,r);return n?{ruleId:this.rules[n.index],captureIndices:n.captureIndices}:null}},gd=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Qn,NM=(Qn=class{constructor(t,r){G(this,"_defaultAttributes");G(this,"_embeddedLanguagesMatcher");G(this,"_getBasicScopeAttributes",new tE(t=>{const r=this._scopeToLanguage(t),n=this._toStandardTokenType(t);return new gd(r,n)}));this._defaultAttributes=new gd(t,8),this._embeddedLanguagesMatcher=new RM(Object.entries(r||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?Qn._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const r=t.match(Qn.STANDARD_TOKEN_TYPE_REGEXP);if(!r)return 8;switch(r[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}},G(Qn,"_NULL_SCOPE_METADATA",new gd(0,0)),G(Qn,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),Qn),RM=class{constructor(e){G(this,"values");G(this,"scopesRegExp");if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([r,n])=>eE(r));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},wb=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function uE(e,t,r,n,i,s,a,o){const l=t.content.length;let u=!1,c=-1;if(a){const f=PM(e,t,r,n,i,s);i=f.stack,n=f.linePos,r=f.isFirstLine,c=f.anchorPosition}const d=Date.now();for(;!u;){if(o!==0&&Date.now()-d>o)return new wb(i,!0);h()}return new wb(i,!1);function h(){const f=OM(e,t,r,n,i,c);if(!f){s.produce(i,l),u=!0;return}const m=f.captureIndices,b=f.matchedRuleId,y=m&&m.length>0?m[0].end>n:!1;if(b===AM){const E=i.getRule(e);s.produce(i,m[0].start),i=i.withContentNameScopesList(i.nameScopesList),So(e,t,r,i,s,E.endCaptures,m),s.produce(i,m[0].end);const w=i;if(i=i.parent,c=w.getAnchorPos(),!y&&w.getEnterPos()===n){i=w,s.produce(i,l),u=!0;return}}else{const E=e.getRule(b);s.produce(i,m[0].start);const w=i,x=E.getName(t.content,m),_=i.contentNameScopesList.pushAttributed(x,e);if(i=i.push(b,n,c,m[0].end===l,null,_,_),E instanceof af){const A=E;So(e,t,r,i,s,A.beginCaptures,m),s.produce(i,m[0].end),c=m[0].end;const S=A.getContentName(t.content,m),I=_.pushAttributed(S,e);if(i=i.withContentNameScopesList(I),A.endHasBackReferences&&(i=i.withEndRule(A.getEndWithResolvedBackReferences(t.content,m))),!y&&w.hasSameRuleAs(i)){i=i.pop(),s.produce(i,l),u=!0;return}}else if(E instanceof fc){const A=E;So(e,t,r,i,s,A.beginCaptures,m),s.produce(i,m[0].end),c=m[0].end;const S=A.getContentName(t.content,m),I=_.pushAttributed(S,e);if(i=i.withContentNameScopesList(I),A.whileHasBackReferences&&(i=i.withEndRule(A.getWhileWithResolvedBackReferences(t.content,m))),!y&&w.hasSameRuleAs(i)){i=i.pop(),s.produce(i,l),u=!0;return}}else if(So(e,t,r,i,s,E.captures,m),s.produce(i,m[0].end),i=i.pop(),!y){i=i.safePop(),s.produce(i,l),u=!0;return}}m[0].end>n&&(n=m[0].end,r=!1)}}function PM(e,t,r,n,i,s){let a=i.beginRuleCapturedEOL?0:-1;const o=[];for(let l=i;l;l=l.pop()){const u=l.getRule(e);u instanceof fc&&o.push({rule:u,stack:l})}for(let l=o.pop();l;l=o.pop()){const{ruleScanner:u,findOptions:c}=MM(l.rule,e,l.stack.endRule,r,n===a),d=u.findNextMatchSync(t,n,c);if(d){if(d.ruleId!==aE){i=l.stack.pop();break}d.captureIndices&&d.captureIndices.length&&(s.produce(l.stack,d.captureIndices[0].start),So(e,t,r,l.stack,s,l.rule.whileCaptures,d.captureIndices),s.produce(l.stack,d.captureIndices[0].end),a=d.captureIndices[0].end,d.captureIndices[0].end>n&&(n=d.captureIndices[0].end,r=!1))}else{i=l.stack.pop();break}}return{stack:i,linePos:n,anchorPosition:a,isFirstLine:r}}function OM(e,t,r,n,i,s){const a=LM(e,t,r,n,i,s),o=e.getInjections();if(o.length===0)return a;const l=DM(o,e,t,r,n,i,s);if(!l)return a;if(!a)return l;const u=a.captureIndices[0].start,c=l.captureIndices[0].start;return c<u||l.priorityMatch&&c===u?l:a}function LM(e,t,r,n,i,s){const a=i.getRule(e),{ruleScanner:o,findOptions:l}=cE(a,e,i.endRule,r,n===s),u=o.findNextMatchSync(t,n,l);return u?{captureIndices:u.captureIndices,matchedRuleId:u.ruleId}:null}function DM(e,t,r,n,i,s,a){let o=Number.MAX_VALUE,l=null,u,c=0;const d=s.contentNameScopesList.getScopeNames();for(let h=0,f=e.length;h<f;h++){const m=e[h];if(!m.matcher(d))continue;const b=t.getRule(m.ruleId),{ruleScanner:y,findOptions:E}=cE(b,t,null,n,i===a),w=y.findNextMatchSync(r,i,E);if(!w)continue;const x=w.captureIndices[0].start;if(!(x>=o)&&(o=x,l=w.captureIndices,u=w.ruleId,c=m.priority,o===i))break}return l?{priorityMatch:c===-1,captureIndices:l,matchedRuleId:u}:null}function cE(e,t,r,n,i){return{ruleScanner:e.compileAG(t,r,n,i),findOptions:0}}function MM(e,t,r,n,i){return{ruleScanner:e.compileWhileAG(t,r,n,i),findOptions:0}}function So(e,t,r,n,i,s,a){if(s.length===0)return;const o=t.content,l=Math.min(s.length,a.length),u=[],c=a[0].end;for(let d=0;d<l;d++){const h=s[d];if(h===null)continue;const f=a[d];if(f.length===0)continue;if(f.start>c)break;for(;u.length>0&&u[u.length-1].endPos<=f.start;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?i.produceFromScopes(u[u.length-1].scopes,f.start):i.produce(n,f.start),h.retokenizeCapturedWithRuleId){const b=h.getName(o,a),y=n.contentNameScopesList.pushAttributed(b,e),E=h.getContentName(o,a),w=y.pushAttributed(E,e),x=n.push(h.retokenizeCapturedWithRuleId,f.start,-1,!1,null,y,w),_=e.createOnigString(o.substring(0,f.end));uE(e,_,r&&f.start===0,f.start,x,i,!1,0),iE(_);continue}const m=h.getName(o,a);if(m!==null){const y=(u.length>0?u[u.length-1].scopes:n.contentNameScopesList).pushAttributed(m,e);u.push(new BM(y,f.end))}}for(;u.length>0;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}var BM=class{constructor(e,t){G(this,"scopes");G(this,"endPos");this.scopes=e,this.endPos=t}};function FM(e,t,r,n,i,s,a,o){return new $M(e,t,r,n,i,s,a,o)}function kb(e,t,r,n,i){const s=dc(t,mc),a=oE.getCompiledRuleId(r,n,i.repository);for(const o of s)e.push({debugSelector:t,matcher:o.matcher,ruleId:a,grammar:i,priority:o.priority})}function mc(e,t){if(t.length<e.length)return!1;let r=0;return e.every(n=>{for(let i=r;i<t.length;i++)if(zM(t[i],n))return r=i+1,!0;return!1})}function zM(e,t){if(!e)return!1;if(e===t)return!0;const r=t.length;return e.length>r&&e.substr(0,r)===t&&e[r]==="."}var $M=class{constructor(e,t,r,n,i,s,a,o){G(this,"_rootId");G(this,"_lastRuleId");G(this,"_ruleId2desc");G(this,"_includedGrammars");G(this,"_grammarRepository");G(this,"_grammar");G(this,"_injections");G(this,"_basicScopeAttributesProvider");G(this,"_tokenTypeMatchers");if(this._rootScopeName=e,this.balancedBracketSelectors=s,this._onigLib=o,this._basicScopeAttributesProvider=new NM(r,n),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=a,this._grammar=Sb(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const l of Object.keys(i)){const u=dc(l,mc);for(const c of u)this._tokenTypeMatchers.push({matcher:c.matcher,type:i[l]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},t=[],r=this._rootScopeName,n=e.lookup(r);if(n){const i=n.injections;if(i)for(let a in i)kb(t,a,i[a],this,n);const s=this._grammarRepository.injections(r);s&&s.forEach(a=>{const o=this.getExternalGrammar(a);if(o){const l=o.injectionSelector;l&&kb(t,l,o,this,o)}})}return t.sort((i,s)=>i.priority-s.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,r=e(t);return this._ruleId2desc[t]=r,r}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const r=this._grammarRepository.lookup(e);if(r)return this._includedGrammars[e]=Sb(r,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,r=0){const n=this._tokenize(e,t,!1,r);return{tokens:n.lineTokens.getResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}tokenizeLine2(e,t,r=0){const n=this._tokenize(e,t,!0,r);return{tokens:n.lineTokens.getBinaryResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}_tokenize(e,t,r,n){this._rootId===-1&&(this._rootId=oE.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===of.NULL){i=!0;const u=this._basicScopeAttributesProvider.getDefaultAttributes(),c=this.themeProvider.getDefaults(),d=Ts.set(0,u.languageId,u.tokenType,null,c.fontStyle,c.foregroundId,c.backgroundId),h=this.getRule(this._rootId).getName(null,null);let f;h?f=Lo.createRootAndLookUpScopeName(h,d,this):f=Lo.createRoot("unknown",d),t=new of(null,this._rootId,-1,-1,!1,null,f,f)}else i=!1,t.reset();e=e+`
222
- `;const s=this.createOnigString(e),a=s.content.length,o=new UM(r,e,this._tokenTypeMatchers,this.balancedBracketSelectors),l=uE(this,s,i,0,t,o,!0,n);return iE(s),{lineLength:a,lineTokens:o,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function Sb(e,t){return e=sM(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Lo=class En{constructor(t,r,n){this.parent=t,this.scopePath=r,this.tokenAttributes=n}static fromExtension(t,r){let n=t,i=(t==null?void 0:t.scopePath)??null;for(const s of r)i=pd.push(i,s.scopeNames),n=new En(n,i,s.encodedTokenAttributes);return n}static createRoot(t,r){return new En(null,new pd(null,t),r)}static createRootAndLookUpScopeName(t,r,n){const i=n.getMetadataForScope(t),s=new pd(null,t),a=n.themeProvider.themeMatch(s),o=En.mergeAttributes(r,i,a);return new En(null,s,o)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return En.equals(this,t)}static equals(t,r){do{if(t===r||!t&&!r)return!0;if(!t||!r||t.scopeName!==r.scopeName||t.tokenAttributes!==r.tokenAttributes)return!1;t=t.parent,r=r.parent}while(!0)}static mergeAttributes(t,r,n){let i=-1,s=0,a=0;return n!==null&&(i=n.fontStyle,s=n.foregroundId,a=n.backgroundId),Ts.set(t,r.languageId,r.tokenType,null,i,s,a)}pushAttributed(t,r){if(t===null)return this;if(t.indexOf(" ")===-1)return En._pushAttributed(this,t,r);const n=t.split(/ /g);let i=this;for(const s of n)i=En._pushAttributed(i,s,r);return i}static _pushAttributed(t,r,n){const i=n.getMetadataForScope(r),s=t.scopePath.push(r),a=n.themeProvider.themeMatch(s),o=En.mergeAttributes(t.tokenAttributes,i,a);return new En(t,s,o)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){var i;const r=[];let n=this;for(;n&&n!==t;)r.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(((i=n.parent)==null?void 0:i.scopePath)??null)}),n=n.parent;return n===t?r.reverse():void 0}},$r,of=($r=class{constructor(t,r,n,i,s,a,o,l){G(this,"_stackElementBrand");G(this,"_enterPos");G(this,"_anchorPos");G(this,"depth");this.parent=t,this.ruleId=r,this.beginRuleCapturedEOL=s,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=l,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=i}equals(t){return t===null?!1:$r._equals(this,t)}static _equals(t,r){return t===r?!0:this._structuralEquals(t,r)?Lo.equals(t.contentNameScopesList,r.contentNameScopesList):!1}static _structuralEquals(t,r){do{if(t===r||!t&&!r)return!0;if(!t||!r||t.depth!==r.depth||t.ruleId!==r.ruleId||t.endRule!==r.endRule)return!1;t=t.parent,r=r.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){$r._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,r,n,i,s,a,o){return new $r(this,t,r,n,i,s,a,o)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,r){var n,i;return this.parent&&(r=this.parent._writeString(t,r)),t[r++]=`(${this.ruleId}, ${(n=this.nameScopesList)==null?void 0:n.toString()}, ${(i=this.contentNameScopesList)==null?void 0:i.toString()})`,r}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new $r(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let r=this;for(;r&&r._enterPos===t._enterPos;){if(r.ruleId===t.ruleId)return!0;r=r.parent}return!1}toStateStackFrame(){var t,r,n;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((r=this.nameScopesList)==null?void 0:r.getExtensionIfDefined(((t=this.parent)==null?void 0:t.nameScopesList)??null))??[],contentNameScopesList:((n=this.contentNameScopesList)==null?void 0:n.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(t,r){const n=Lo.fromExtension((t==null?void 0:t.nameScopesList)??null,r.nameScopesList);return new $r(t,r.ruleId,r.enterPos??-1,r.anchorPos??-1,r.beginRuleCapturedEOL,r.endRule,n,Lo.fromExtension(n,r.contentNameScopesList))}},G($r,"NULL",new $r(null,0,0,0,!1,null,null,null)),$r),jM=class{constructor(e,t){G(this,"balancedBracketScopes");G(this,"unbalancedBracketScopes");G(this,"allowAny",!1);this.balancedBracketScopes=e.flatMap(r=>r==="*"?(this.allowAny=!0,[]):dc(r,mc).map(n=>n.matcher)),this.unbalancedBracketScopes=t.flatMap(r=>dc(r,mc).map(n=>n.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},UM=class{constructor(e,t,r,n){G(this,"_emitBinaryTokens");G(this,"_lineText");G(this,"_tokens");G(this,"_binaryTokens");G(this,"_lastTokenEndIndex");G(this,"_tokenTypeOverrides");this.balancedBracketSelectors=n,this._emitBinaryTokens=e,this._tokenTypeOverrides=r,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){var n;if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let i=(e==null?void 0:e.tokenAttributes)??0,s=!1;if((n=this.balancedBracketSelectors)!=null&&n.matchesAlways&&(s=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const a=(e==null?void 0:e.getScopeNames())??[];for(const o of this._tokenTypeOverrides)o.matcher(a)&&(i=Ts.set(i,0,o.type,null,-1,0,0));this.balancedBracketSelectors&&(s=this.balancedBracketSelectors.match(a))}if(s&&(i=Ts.set(i,0,8,s,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===i){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(i),this._lastTokenEndIndex=t;return}const r=(e==null?void 0:e.getScopeNames())??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:r}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const r=new Uint32Array(this._binaryTokens.length);for(let n=0,i=this._binaryTokens.length;n<i;n++)r[n]=this._binaryTokens[n];return r}},HM=class{constructor(e,t){G(this,"_grammars",new Map);G(this,"_rawGrammars",new Map);G(this,"_injectionGrammars",new Map);G(this,"_theme");this._onigLib=t,this._theme=e}dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,r,n,i){if(!this._grammars.has(e)){let s=this._rawGrammars.get(e);if(!s)return null;this._grammars.set(e,FM(e,s,t,r,n,i,this,this._onigLib))}return this._grammars.get(e)}},VM=class{constructor(t){G(this,"_options");G(this,"_syncRegistry");G(this,"_ensureGrammarCache");this._options=t,this._syncRegistry=new HM(cc.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,r){this._syncRegistry.setTheme(cc.createFromRawTheme(t,r))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,r,n){return this.loadGrammarWithConfiguration(t,r,{embeddedLanguages:n})}loadGrammarWithConfiguration(t,r,n){return this._loadGrammar(t,r,n.embeddedLanguages,n.tokenTypes,new jM(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,r,n,i,s){const a=new vM(this._syncRegistry,t);for(;a.Q.length>0;)a.Q.map(o=>this._loadSingleGrammar(o.scopeName)),a.processQueue();return this._grammarForScopeName(t,r,n,i,s)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const r=this._options.loadGrammar(t);if(r){const n=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(r,n)}}addGrammar(t,r=[],n=0,i=null){return this._syncRegistry.addGrammar(t,r),this._grammarForScopeName(t.scopeName,n,i)}_grammarForScopeName(t,r=0,n=null,i=null,s=null){return this._syncRegistry.grammarForScopeName(t,r,n,i,s)}},lf=of.NULL;function pc(e,t){const r=typeof e=="string"?{}:{...e.colorReplacements},n=typeof e=="string"?e:e.name;for(const[i,s]of Object.entries((t==null?void 0:t.colorReplacements)||{}))typeof s=="string"?r[i]=s:i===n&&Object.assign(r,s);return r}function Ri(e,t){return e&&((t==null?void 0:t[e==null?void 0:e.toLowerCase()])||e)}function qM(e){return Array.isArray(e)?e:[e]}async function dE(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function d0(e){return!e||["plaintext","txt","text","plain"].includes(e)}function hE(e){return e==="ansi"||d0(e)}function h0(e){return e==="none"}function fE(e){return h0(e)}const GM=/(\r?\n)/g;function f0(e,t=!1){var s;if(e.length===0)return[["",0]];const r=e.split(GM);let n=0;const i=[];for(let a=0;a<r.length;a+=2){const o=t?r[a]+(r[a+1]||""):r[a];i.push([o,n]),n+=r[a].length,n+=((s=r[a+1])==null?void 0:s.length)||0}return i}const Ab={light:"#333333",dark:"#bbbbbb"},Cb={light:"#fffffe",dark:"#1e1e1e"},Ib="__shiki_resolved";function _p(e){var o,l,u,c,d;if(e!=null&&e[Ib])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||(t.type="dark"),t.colorReplacements={...t.colorReplacements},t.settings||(t.settings=[]);let{bg:r,fg:n}=t;if(!r||!n){const h=t.settings?t.settings.find(f=>!f.name&&!f.scope):void 0;(o=h==null?void 0:h.settings)!=null&&o.foreground&&(n=h.settings.foreground),(l=h==null?void 0:h.settings)!=null&&l.background&&(r=h.settings.background),!n&&((u=t==null?void 0:t.colors)!=null&&u["editor.foreground"])&&(n=t.colors["editor.foreground"]),!r&&((c=t==null?void 0:t.colors)!=null&&c["editor.background"])&&(r=t.colors["editor.background"]),n||(n=t.type==="light"?Ab.light:Ab.dark),r||(r=t.type==="light"?Cb.light:Cb.dark),t.fg=n,t.bg=r}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0;const s=new Map;function a(h){var m;if(s.has(h))return s.get(h);i+=1;const f=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return(m=t.colorReplacements)!=null&&m[`#${f}`]?a(h):(s.set(h,f),f)}t.settings=t.settings.map(h=>{var y,E;const f=((y=h.settings)==null?void 0:y.foreground)&&!h.settings.foreground.startsWith("#"),m=((E=h.settings)==null?void 0:E.background)&&!h.settings.background.startsWith("#");if(!f&&!m)return h;const b={...h,settings:{...h.settings}};if(f){const w=a(h.settings.foreground);t.colorReplacements[w]=h.settings.foreground,b.settings.foreground=w}if(m){const w=a(h.settings.background);t.colorReplacements[w]=h.settings.background,b.settings.background=w}return b});for(const h of Object.keys(t.colors||{}))if((h==="editor.foreground"||h==="editor.background"||h.startsWith("terminal.ansi"))&&!((d=t.colors[h])!=null&&d.startsWith("#"))){const f=a(t.colors[h]);t.colorReplacements[f]=t.colors[h],t.colors[h]=f}return Object.defineProperty(t,Ib,{enumerable:!1,writable:!1,value:!0}),t}async function mE(e){return[...new Set((await Promise.all(e.filter(t=>!hE(t)).map(async t=>await dE(t).then(r=>Array.isArray(r)?r:[r])))).flat())]}async function pE(e){return(await Promise.all(e.map(async t=>fE(t)?null:_p(await dE(t))))).filter(t=>!!t)}function gE(e,t){if(!t)return e;if(t[e]){const r=new Set([e]);for(;t[e];){if(e=t[e],r.has(e))throw new ut(`Circular alias \`${[...r].join(" -> ")} -> ${e}\``);r.add(e)}}return e}var WM=class extends VM{constructor(t,r,n,i={}){super(t);G(this,"_resolver");G(this,"_themes");G(this,"_langs");G(this,"_alias");G(this,"_resolvedThemes",new Map);G(this,"_resolvedGrammars",new Map);G(this,"_langMap",new Map);G(this,"_langGraph",new Map);G(this,"_textmateThemeCache",new WeakMap);G(this,"_loadedThemesCache",null);G(this,"_loadedLanguagesCache",null);this._resolver=t,this._themes=r,this._langs=n,this._alias=i,this._themes.map(s=>this.loadTheme(s)),this.loadLanguages(this._langs)}getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const r=_p(t);return r.name&&(this._resolvedThemes.set(r.name,r),this._loadedThemesCache=null),r}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let r=this._textmateThemeCache.get(t);r||(r=cc.createFromRawTheme(t),this._textmateThemeCache.set(t,r)),this._syncRegistry.setTheme(r)}getGrammar(t){return t=gE(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){var s,a,o,l,u,c,d;if(this.getGrammar(t.name))return;const r=new Set([...this._langMap.values()].filter(h=>{var f;return(f=h.embeddedLangsLazy)==null?void 0:f.includes(t.name)}));this._resolver.addLanguage(t);const n={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const i=this.loadGrammarWithConfiguration(t.scopeName,1,n);if(i.name=t.name,this._resolvedGrammars.set(t.name,i),t.aliases&&t.aliases.forEach(h=>{this._alias[h]=t.name}),this._loadedLanguagesCache=null,r.size)for(const h of r)(o=(a=(s=this._syncRegistry)==null?void 0:s._grammars)==null?void 0:a.get(h.scopeName))==null||o.dispose(),this._resolvedGrammars.delete(h.name),this._loadedLanguagesCache=null,(u=(l=this._syncRegistry)==null?void 0:l._injectionGrammars)==null||u.delete(h.scopeName),(d=(c=this._syncRegistry)==null?void 0:c._grammars)==null||d.delete(h.scopeName),this.loadLanguage(this._langMap.get(h.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const i of t)this.resolveEmbeddedLanguages(i);const r=[...this._langGraph.entries()],n=r.filter(([i,s])=>!s);if(n.length){const i=r.filter(([s,a])=>{var o;return a?(o=a.embeddedLanguages||a.embeddedLangs)==null?void 0:o.some(l=>n.map(([u])=>u).includes(l)):!1}).filter(s=>!n.includes(s));throw new ut(`Missing languages ${n.map(([s])=>`\`${s}\``).join(", ")}, required by ${i.map(([s])=>`\`${s}\``).join(", ")}`)}for(const[i,s]of r)this._resolver.addLanguage(s);for(const[i,s]of r)this.loadLanguage(s)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);const r=t.embeddedLanguages??t.embeddedLangs;if(r)for(const n of r)this._langGraph.set(n,this._langMap.get(n))}},ZM=class{constructor(e,t){G(this,"_langs",new Map);G(this,"_scopeToLang",new Map);G(this,"_injections",new Map);G(this,"_onigLib");this._onigLib={createOnigScanner:r=>e.createScanner(r),createOnigString:r=>e.createString(r)},t.forEach(r=>this.addLanguage(r))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).includes(e.scopeName)||this._injections.get(t).push(e.scopeName)})}getInjections(e){const t=e.split(".");let r=[];for(let n=1;n<=t.length;n++){const i=t.slice(0,n).join(".");r=[...r,...this._injections.get(i)||[]]}return r}};let mo=0;function YM(e){mo+=1,e.warnings!==!1&&mo>=10&&mo%10===0&&console.warn(`[Shiki] ${mo} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new ut("`engine` option is required for synchronous mode");const r=(e.langs||[]).flat(1),n=(e.themes||[]).flat(1).map(_p),i=new WM(new ZM(e.engine,r),n,r,e.langAlias);let s;function a(w){return gE(w,e.langAlias)}function o(w){y();const x=i.getGrammar(typeof w=="string"?w:w.name);if(!x)throw new ut(`Language \`${w}\` not found, you may need to load it first`);return x}function l(w){if(w==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};y();const x=i.getTheme(w);if(!x)throw new ut(`Theme \`${w}\` not found, you may need to load it first`);return x}function u(w){y();const x=l(w);return s!==w&&(i.setTheme(x),s=w),{theme:x,colorMap:i.getColorMap()}}function c(){return y(),i.getLoadedThemes()}function d(){return y(),i.getLoadedLanguages()}function h(...w){y(),i.loadLanguages(w.flat(1))}async function f(...w){return h(await mE(w))}function m(...w){y();for(const x of w.flat(1))i.loadTheme(x)}async function b(...w){return y(),m(await pE(w))}function y(){if(t)throw new ut("Shiki instance has been disposed")}function E(){t||(t=!0,i.dispose(),mo-=1)}return{setTheme:u,getTheme:l,getLanguage:o,getLoadedThemes:c,getLoadedLanguages:d,resolveLangAlias:a,loadLanguage:f,loadLanguageSync:h,loadTheme:b,loadThemeSync:m,dispose:E,[Symbol.dispose]:E}}async function KM(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,r,n]=await Promise.all([pE(e.themes||[]),mE(e.langs||[]),e.engine]);return YM({...e,themes:t,langs:r,engine:n})}const bE=new WeakMap;function m0(e,t){bE.set(e,t)}function il(e){return bE.get(e)}var p0=class yE{constructor(...t){G(this,"_stacks",{});G(this,"lang");if(t.length===2){const[r,n]=t;this.lang=n,this._stacks=r}else{const[r,n,i]=t;this.lang=n,this._stacks={[i]:r}}}get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,r){return new yE(Object.fromEntries(qM(r).map(n=>[n,lf])),t)}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return XM(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function XM(e){const t=[],r=new Set;function n(i){var a;if(r.has(i))return;r.add(i);const s=(a=i==null?void 0:i.nameScopesList)==null?void 0:a.scopeName;s&&t.push(s),i.parent&&n(i.parent)}return n(e),t}function QM(e,t){if(!(e instanceof p0))throw new ut("Invalid grammar state");return e.getInternalStack(t)}const JM=/,/,eB=/ /;function vE(e,t,r={}){const{theme:n=e.getLoadedThemes()[0]}=r;if(d0(e.resolveLangAlias(r.lang||"text"))||h0(n))return f0(t).map(o=>[{content:o[0],offset:o[1]}]);const{theme:i,colorMap:s}=e.setTheme(n),a=e.getLanguage(r.lang||"text");if(r.grammarState){if(r.grammarState.lang!==a.name)throw new ut(`Grammar state language "${r.grammarState.lang}" does not match highlight language "${a.name}"`);if(!r.grammarState.themes.includes(i.name))throw new ut(`Grammar state themes "${r.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return rB(t,a,i,s,r)}function tB(...e){if(e.length===2)return il(e[1]);const[t,r,n={}]=e,{lang:i="text",theme:s=t.getLoadedThemes()[0]}=n;if(d0(i)||h0(s))throw new ut("Plain language does not have grammar state");if(i==="ansi")throw new ut("ANSI language does not have grammar state");const{theme:a,colorMap:o}=t.setTheme(s),l=t.getLanguage(i);return new p0(Tp(r,l,a,o,n).stateStack,l.name,a.name)}function rB(e,t,r,n,i){const s=Tp(e,t,r,n,i),a=new p0(s.stateStack,t.name,r.name);return m0(s.tokens,a),s.tokens}function Tp(e,t,r,n,i){const s=pc(r,i),{tokenizeMaxLineLength:a=0,tokenizeTimeLimit:o=500,includeExplanation:l=!1}=i,u=f0(e);let c=i.grammarState?QM(i.grammarState,r.name)??lf:i.grammarContextCode!=null?Tp(i.grammarContextCode,t,r,n,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:lf,d=[];const h=[];for(let f=0,m=u.length;f<m;f++){const[b,y]=u[f];if(b===""){d=[],h.push([]);continue}if(a>0&&b.length>=a){d=[],h.push([{content:b,offset:y,color:"",fontStyle:0}]);continue}let E,w,x;l&&l!=="tokenType"&&(E=t.tokenizeLine(b,c,o),w=E.tokens,x=0);const _=t.tokenizeLine2(b,c,o),A=_.tokens.length/2;for(let S=0;S<A;S++){const I=_.tokens[2*S],N=S+1<A?_.tokens[2*S+2]:b.length;if(I===N)continue;const U=_.tokens[2*S+1],z=Ri(n[Ts.getForeground(U)],s),Z=Ts.getFontStyle(U),V={content:b.substring(I,N),offset:y+I,color:z,fontStyle:Z};if(l==="tokenType")V.type=Ts.getTokenType(U);else if(l){const ae=[];if(l!=="scopeName")for(const Y of r.settings){let de;switch(typeof Y.scope){case"string":de=Y.scope.split(JM).map(xe=>xe.trim());break;case"object":de=Y.scope;break;default:continue}ae.push({settings:Y,selectors:de.map(xe=>xe.split(eB))})}V.explanation=[];let J=0;for(;I+J<N;){const Y=w[x],de=b.substring(Y.startIndex,Y.endIndex);J+=de.length,V.explanation.push({content:de,scopes:l==="scopeName"?nB(Y.scopes):iB(ae,Y.scopes)}),x+=1}}d.push(V)}h.push(d),d=[],c=_.ruleStack}return{tokens:h,stateStack:c}}function nB(e){return e.map(t=>({scopeName:t}))}function iB(e,t){const r=[];for(let n=0,i=t.length;n<i;n++){const s=t[n];r[n]={scopeName:s,themeMatches:aB(e,s,t.slice(0,n))}}return r}function Nb(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function sB(e,t,r){if(!Nb(e.at(-1),t))return!1;let n=e.length-2,i=r.length-1;for(;n>=0&&i>=0;)Nb(e[n],r[i])&&(n-=1),i-=1;return n===-1}function aB(e,t,r){const n=[];for(const{selectors:i,settings:s}of e)for(const a of i)if(sB(a,t,r)){n.push(s);break}return n}function xE(e,t,r,n=vE){const i=Object.entries(r.themes).filter(u=>u[1]).map(u=>({color:u[0],theme:u[1]})),s=i.map(u=>{const c=n(e,t,{...r,theme:u.theme});return{tokens:c,state:il(c),theme:typeof u.theme=="string"?u.theme:u.theme.name}}),a=oB(...s.map(u=>u.tokens)),o=a[0].map((u,c)=>u.map((d,h)=>{const f={content:d.content,variants:{},offset:d.offset};return"includeExplanation"in r&&r.includeExplanation&&(f.explanation=d.explanation),a.forEach((m,b)=>{const{content:y,explanation:E,offset:w,...x}=m[c][h];f.variants[i[b].color]=x}),f})),l=s[0].state?new p0(Object.fromEntries(s.map(u=>{var c;return[u.theme,(c=u.state)==null?void 0:c.getInternalStack(u.theme)]})),s[0].state.lang):void 0;return l&&m0(o,l),o}function oB(...e){const t=e.map(()=>[]),r=e.length;for(let n=0;n<e[0].length;n++){const i=e.map(l=>l[n]),s=t.map(()=>[]);t.forEach((l,u)=>l.push(s[u]));const a=i.map(()=>0),o=i.map(l=>l[0]);for(;o.every(l=>l);){const l=Math.min(...o.map(u=>u.content.length));for(let u=0;u<r;u++){const c=o[u];c.content.length===l?(s[u].push(c),a[u]+=1,o[u]=i[u][a[u]]):(s[u].push({...c,content:c.content.slice(0,l)}),o[u]={...c,content:c.content.slice(l),offset:c.offset+l})}}}return t}const EE=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class Cl{constructor(t,r,n){this.normal=r,this.property=t,n&&(this.space=n)}}Cl.prototype.normal={};Cl.prototype.property={};Cl.prototype.space=void 0;function _E(e,t){const r={},n={};for(const i of e)Object.assign(r,i.property),Object.assign(n,i.normal);return new Cl(r,n,t)}function sl(e){return e.toLowerCase()}class Er{constructor(t,r){this.attribute=r,this.property=t}}Er.prototype.attribute="";Er.prototype.booleanish=!1;Er.prototype.boolean=!1;Er.prototype.commaOrSpaceSeparated=!1;Er.prototype.commaSeparated=!1;Er.prototype.defined=!1;Er.prototype.mustUseProperty=!1;Er.prototype.number=!1;Er.prototype.overloadedBoolean=!1;Er.prototype.property="";Er.prototype.spaceSeparated=!1;Er.prototype.space=void 0;let lB=0;const Be=zs(),St=zs(),uf=zs(),ce=zs(),lt=zs(),va=zs(),wr=zs();function zs(){return 2**++lB}const cf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Be,booleanish:St,commaOrSpaceSeparated:wr,commaSeparated:va,number:ce,overloadedBoolean:uf,spaceSeparated:lt},Symbol.toStringTag,{value:"Module"})),bd=Object.keys(cf);class wp extends Er{constructor(t,r,n,i){let s=-1;if(super(t,r),Rb(this,"space",i),typeof n=="number")for(;++s<bd.length;){const a=bd[s];Rb(this,bd[s],(n&cf[a])===cf[a])}}}wp.prototype.defined=!0;function Rb(e,t,r){r&&(e[t]=r)}function Ha(e){const t={},r={};for(const[n,i]of Object.entries(e.properties)){const s=new wp(n,e.transform(e.attributes||{},n),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(s.mustUseProperty=!0),t[n]=s,r[sl(n)]=n,r[sl(s.attribute)]=n}return new Cl(t,r,e.space)}const TE=Ha({properties:{ariaActiveDescendant:null,ariaAtomic:St,ariaAutoComplete:null,ariaBusy:St,ariaChecked:St,ariaColCount:ce,ariaColIndex:ce,ariaColSpan:ce,ariaControls:lt,ariaCurrent:null,ariaDescribedBy:lt,ariaDetails:null,ariaDisabled:St,ariaDropEffect:lt,ariaErrorMessage:null,ariaExpanded:St,ariaFlowTo:lt,ariaGrabbed:St,ariaHasPopup:null,ariaHidden:St,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:lt,ariaLevel:ce,ariaLive:null,ariaModal:St,ariaMultiLine:St,ariaMultiSelectable:St,ariaOrientation:null,ariaOwns:lt,ariaPlaceholder:null,ariaPosInSet:ce,ariaPressed:St,ariaReadOnly:St,ariaRelevant:null,ariaRequired:St,ariaRoleDescription:lt,ariaRowCount:ce,ariaRowIndex:ce,ariaRowSpan:ce,ariaSelected:St,ariaSetSize:ce,ariaSort:null,ariaValueMax:ce,ariaValueMin:ce,ariaValueNow:ce,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function wE(e,t){return t in e?e[t]:t}function kE(e,t){return wE(e,t.toLowerCase())}const uB=Ha({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:va,acceptCharset:lt,accessKey:lt,action:null,allow:null,allowFullScreen:Be,allowPaymentRequest:Be,allowUserMedia:Be,alt:null,as:null,async:Be,autoCapitalize:null,autoComplete:lt,autoFocus:Be,autoPlay:Be,blocking:lt,capture:null,charSet:null,checked:Be,cite:null,className:lt,cols:ce,colSpan:null,content:null,contentEditable:St,controls:Be,controlsList:lt,coords:ce|va,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Be,defer:Be,dir:null,dirName:null,disabled:Be,download:uf,draggable:St,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Be,formTarget:null,headers:lt,height:ce,hidden:uf,high:ce,href:null,hrefLang:null,htmlFor:lt,httpEquiv:lt,id:null,imageSizes:null,imageSrcSet:null,inert:Be,inputMode:null,integrity:null,is:null,isMap:Be,itemId:null,itemProp:lt,itemRef:lt,itemScope:Be,itemType:lt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Be,low:ce,manifest:null,max:null,maxLength:ce,media:null,method:null,min:null,minLength:ce,multiple:Be,muted:Be,name:null,nonce:null,noModule:Be,noValidate:Be,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:Be,optimum:ce,pattern:null,ping:lt,placeholder:null,playsInline:Be,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Be,referrerPolicy:null,rel:lt,required:Be,reversed:Be,rows:ce,rowSpan:ce,sandbox:lt,scope:null,scoped:Be,seamless:Be,selected:Be,shadowRootClonable:Be,shadowRootDelegatesFocus:Be,shadowRootMode:null,shape:null,size:ce,sizes:null,slot:null,span:ce,spellCheck:St,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ce,step:null,style:null,tabIndex:ce,target:null,title:null,translate:null,type:null,typeMustMatch:Be,useMap:null,value:St,width:ce,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:lt,axis:null,background:null,bgColor:null,border:ce,borderColor:null,bottomMargin:ce,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Be,declare:Be,event:null,face:null,frame:null,frameBorder:null,hSpace:ce,leftMargin:ce,link:null,longDesc:null,lowSrc:null,marginHeight:ce,marginWidth:ce,noResize:Be,noHref:Be,noShade:Be,noWrap:Be,object:null,profile:null,prompt:null,rev:null,rightMargin:ce,rules:null,scheme:null,scrolling:St,standby:null,summary:null,text:null,topMargin:ce,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ce,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Be,disableRemotePlayback:Be,prefix:null,property:null,results:ce,security:null,unselectable:null},space:"html",transform:kE}),cB=Ha({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:wr,accentHeight:ce,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ce,amplitude:ce,arabicForm:null,ascent:ce,attributeName:null,attributeType:null,azimuth:ce,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ce,by:null,calcMode:null,capHeight:ce,className:lt,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:ce,diffuseConstant:ce,direction:null,display:null,dur:null,divisor:ce,dominantBaseline:null,download:Be,dx:null,dy:null,edgeMode:null,editable:null,elevation:ce,enableBackground:null,end:null,event:null,exponent:ce,externalResourcesRequired:null,fill:null,fillOpacity:ce,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:va,g2:va,glyphName:va,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ce,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ce,horizOriginX:ce,horizOriginY:ce,id:null,ideographic:ce,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ce,k:ce,k1:ce,k2:ce,k3:ce,k4:ce,kernelMatrix:wr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ce,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:ce,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:ce,overlineThickness:ce,paintOrder:null,panose1:null,path:null,pathLength:ce,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:lt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ce,pointsAtY:ce,pointsAtZ:ce,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:wr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:wr,rev:wr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:wr,requiredFeatures:wr,requiredFonts:wr,requiredFormats:wr,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:ce,specularExponent:ce,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ce,strikethroughThickness:ce,string:null,stroke:null,strokeDashArray:wr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ce,strokeOpacity:ce,strokeWidth:null,style:null,surfaceScale:ce,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:wr,tabIndex:ce,tableValues:null,target:null,targetX:ce,targetY:ce,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:wr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ce,underlineThickness:ce,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ce,values:null,vAlphabetic:ce,vMathematical:ce,vectorEffect:null,vHanging:ce,vIdeographic:ce,version:null,vertAdvY:ce,vertOriginX:ce,vertOriginY:ce,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ce,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:wE}),SE=Ha({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),AE=Ha({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:kE}),CE=Ha({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),dB={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"},hB=/[A-Z]/g,Pb=/-[a-z]/g,fB=/^data[-\w.:]+$/i;function Il(e,t){const r=sl(t);let n=t,i=Er;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&fB.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Pb,pB);n="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Pb.test(s)){let a=s.replace(hB,mB);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=wp}return new i(n,t)}function mB(e){return"-"+e.toLowerCase()}function pB(e){return e.charAt(1).toUpperCase()}const Va=_E([TE,uB,SE,AE,CE],"html"),On=_E([TE,cB,SE,AE,CE],"svg"),Ob={}.hasOwnProperty;function kp(e,t){const r=t||{};function n(i,...s){let a=n.invalid;const o=n.handlers;if(i&&Ob.call(i,e)){const l=String(i[e]);a=Ob.call(o,l)?o[l]:n.unknown}if(a)return a.call(this,i,...s)}return n.handlers=r.handlers||{},n.invalid=r.invalid,n.unknown=r.unknown,n}const gB=/["&'<>`]/g,bB=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,yB=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,vB=/[|\\{}()[\]^$+*?.]/g,Lb=new WeakMap;function xB(e,t){if(e=e.replace(t.subset?EB(t.subset):gB,n),t.subset||t.escapeOnly)return e;return e.replace(bB,r).replace(yB,n);function r(i,s,a){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,a.charCodeAt(s+2),t)}function n(i,s,a){return t.format(i.charCodeAt(0),a.charCodeAt(s+1),t)}}function EB(e){let t=Lb.get(e);return t||(t=_B(e),Lb.set(e,t)),t}function _B(e){const t=[];let r=-1;for(;++r<e.length;)t.push(e[r].replace(vB,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const TB=/[\dA-Fa-f]/;function wB(e,t,r){const n="&#x"+e.toString(16).toUpperCase();return r&&t&&!TB.test(String.fromCharCode(t))?n:n+";"}const kB=/\d/;function SB(e,t,r){const n="&#"+String(e);return r&&t&&!kB.test(String.fromCharCode(t))?n:n+";"}const AB=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],yd={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},CB=["cent","copy","divide","gt","lt","not","para","times"],IE={}.hasOwnProperty,df={};let su;for(su in yd)IE.call(yd,su)&&(df[yd[su]]=su);const IB=/[^\dA-Za-z]/;function NB(e,t,r,n){const i=String.fromCharCode(e);if(IE.call(df,i)){const s=df[i],a="&"+s;return r&&AB.includes(s)&&!CB.includes(s)&&(!n||t&&t!==61&&IB.test(String.fromCharCode(t)))?a:a+";"}return""}function RB(e,t,r){let n=wB(e,t,r.omitOptionalSemicolons),i;if((r.useNamedReferences||r.useShortestReferences)&&(i=NB(e,t,r.omitOptionalSemicolons,r.attribute)),(r.useShortestReferences||!i)&&r.useShortestReferences){const s=SB(e,t,r.omitOptionalSemicolons);s.length<n.length&&(n=s)}return i&&(!r.useShortestReferences||i.length<n.length)?i:n}function xa(e,t){return xB(e,Object.assign({format:RB},t))}const PB=/^>|^->|<!--|-->|--!>|<!-$/g,OB=[">"],LB=["<",">"];function DB(e,t,r,n){return n.settings.bogusComments?"<?"+xa(e.value,Object.assign({},n.settings.characterReferences,{subset:OB}))+">":"<!--"+e.value.replace(PB,i)+"-->";function i(s){return xa(s,Object.assign({},n.settings.characterReferences,{subset:LB}))}}function MB(e,t,r,n){return"<!"+(n.settings.upperDoctype?"DOCTYPE":"doctype")+(n.settings.tightDoctype?"":" ")+"html>"}function gc(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let n=0,i=r.indexOf(t);for(;i!==-1;)n++,i=r.indexOf(t,i+t.length);return n}function Db(e){const t=[],r=String(e||"");let n=r.indexOf(","),i=0,s=!1;for(;!s;){n===-1&&(n=r.length,s=!0);const a=r.slice(i,n).trim();(a||!s)&&t.push(a),i=n+1,n=r.indexOf(",",i)}return t}function Sp(e,t){const r=t||{};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}function Mb(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Ap(e){return e.join(" ").trim()}const BB=/[ \t\n\f\r]/g;function g0(e){return typeof e=="object"?e.type==="text"?Bb(e.value):!1:Bb(e)}function Bb(e){return e.replace(BB,"")===""}const $t=RE(1),NE=RE(-1),FB=[];function RE(e){return t;function t(r,n,i){const s=r?r.children:FB;let a=(n||0)+e,o=s[a];if(!i)for(;o&&g0(o);)a+=e,o=s[a];return o}}const zB={}.hasOwnProperty;function PE(e){return t;function t(r,n,i){return zB.call(e,r.tagName)&&e[r.tagName](r,n,i)}}const Cp=PE({body:jB,caption:vd,colgroup:vd,dd:qB,dt:VB,head:vd,html:$B,li:HB,optgroup:GB,option:WB,p:UB,rp:Fb,rt:Fb,tbody:YB,td:zb,tfoot:KB,th:zb,thead:ZB,tr:XB});function vd(e,t,r){const n=$t(r,t,!0);return!n||n.type!=="comment"&&!(n.type==="text"&&g0(n.value.charAt(0)))}function $B(e,t,r){const n=$t(r,t);return!n||n.type!=="comment"}function jB(e,t,r){const n=$t(r,t);return!n||n.type!=="comment"}function UB(e,t,r){const n=$t(r,t);return n?n.type==="element"&&(n.tagName==="address"||n.tagName==="article"||n.tagName==="aside"||n.tagName==="blockquote"||n.tagName==="details"||n.tagName==="div"||n.tagName==="dl"||n.tagName==="fieldset"||n.tagName==="figcaption"||n.tagName==="figure"||n.tagName==="footer"||n.tagName==="form"||n.tagName==="h1"||n.tagName==="h2"||n.tagName==="h3"||n.tagName==="h4"||n.tagName==="h5"||n.tagName==="h6"||n.tagName==="header"||n.tagName==="hgroup"||n.tagName==="hr"||n.tagName==="main"||n.tagName==="menu"||n.tagName==="nav"||n.tagName==="ol"||n.tagName==="p"||n.tagName==="pre"||n.tagName==="section"||n.tagName==="table"||n.tagName==="ul"):!r||!(r.type==="element"&&(r.tagName==="a"||r.tagName==="audio"||r.tagName==="del"||r.tagName==="ins"||r.tagName==="map"||r.tagName==="noscript"||r.tagName==="video"))}function HB(e,t,r){const n=$t(r,t);return!n||n.type==="element"&&n.tagName==="li"}function VB(e,t,r){const n=$t(r,t);return!!(n&&n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd"))}function qB(e,t,r){const n=$t(r,t);return!n||n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd")}function Fb(e,t,r){const n=$t(r,t);return!n||n.type==="element"&&(n.tagName==="rp"||n.tagName==="rt")}function GB(e,t,r){const n=$t(r,t);return!n||n.type==="element"&&n.tagName==="optgroup"}function WB(e,t,r){const n=$t(r,t);return!n||n.type==="element"&&(n.tagName==="option"||n.tagName==="optgroup")}function ZB(e,t,r){const n=$t(r,t);return!!(n&&n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot"))}function YB(e,t,r){const n=$t(r,t);return!n||n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot")}function KB(e,t,r){return!$t(r,t)}function XB(e,t,r){const n=$t(r,t);return!n||n.type==="element"&&n.tagName==="tr"}function zb(e,t,r){const n=$t(r,t);return!n||n.type==="element"&&(n.tagName==="td"||n.tagName==="th")}const QB=PE({body:tF,colgroup:rF,head:eF,html:JB,tbody:nF});function JB(e){const t=$t(e,-1);return!t||t.type!=="comment"}function eF(e){const t=new Set;for(const n of e.children)if(n.type==="element"&&(n.tagName==="base"||n.tagName==="title")){if(t.has(n.tagName))return!1;t.add(n.tagName)}const r=e.children[0];return!r||r.type==="element"}function tF(e){const t=$t(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&g0(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function rF(e,t,r){const n=NE(r,t),i=$t(e,-1,!0);return r&&n&&n.type==="element"&&n.tagName==="colgroup"&&Cp(n,r.children.indexOf(n),r)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function nF(e,t,r){const n=NE(r,t),i=$t(e,-1);return r&&n&&n.type==="element"&&(n.tagName==="thead"||n.tagName==="tbody")&&Cp(n,r.children.indexOf(n),r)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const au={name:[[`
223
- \f\r &/=>`.split(""),`
224
- \f\r "&'/=>\``.split("")],[`\0
225
- \f\r "&'/<=>`.split(""),`\0
226
- \f\r "&'/<=>\``.split("")]],unquoted:[[`
227
- \f\r &>`.split(""),`\0
228
- \f\r "&'<=>\``.split("")],[`\0
229
- \f\r "&'<=>\``.split(""),`\0
230
- \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function iF(e,t,r,n){const i=n.schema,s=i.space==="svg"?!1:n.settings.omitOptionalTags;let a=i.space==="svg"?n.settings.closeEmptyElements:n.settings.voids.includes(e.tagName.toLowerCase());const o=[];let l;i.space==="html"&&e.tagName==="svg"&&(n.schema=On);const u=sF(n,e.properties),c=n.all(i.space==="html"&&e.tagName==="template"?e.content:e);return n.schema=i,c&&(a=!1),(u||!s||!QB(e,t,r))&&(o.push("<",e.tagName,u?" "+u:""),a&&(i.space==="svg"||n.settings.closeSelfClosing)&&(l=u.charAt(u.length-1),(!n.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&o.push(" "),o.push("/")),o.push(">")),o.push(c),!a&&(!s||!Cp(e,t,r))&&o.push("</"+e.tagName+">"),o.join("")}function sF(e,t){const r=[];let n=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){const s=aF(e,i,t[i]);s&&r.push(s)}}for(;++n<r.length;){const s=e.settings.tightAttributes?r[n].charAt(r[n].length-1):void 0;n!==r.length-1&&s!=='"'&&s!=="'"&&(r[n]+=" ")}return r.join("")}function aF(e,t,r){const n=Il(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,s=e.settings.allowDangerousCharacters?0:1;let a=e.quote,o;if(n.overloadedBoolean&&(r===n.attribute||r==="")?r=!0:(n.boolean||n.overloadedBoolean)&&(typeof r!="string"||r===n.attribute||r==="")&&(r=!!r),r==null||r===!1||typeof r=="number"&&Number.isNaN(r))return"";const l=xa(n.attribute,Object.assign({},e.settings.characterReferences,{subset:au.name[i][s]}));return r===!0||(r=Array.isArray(r)?(n.commaSeparated?Sp:Ap)(r,{padLeft:!e.settings.tightCommaSeparatedLists}):String(r),e.settings.collapseEmptyAttributes&&!r)?l:(e.settings.preferUnquoted&&(o=xa(r,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:au.unquoted[i][s]}))),o!==r&&(e.settings.quoteSmart&&gc(r,a)>gc(r,e.alternative)&&(a=e.alternative),o=a+xa(r,Object.assign({},e.settings.characterReferences,{subset:(a==="'"?au.single:au.double)[i][s],attribute:!0}))+a),l+(o&&"="+o))}const oF=["<","&"];function OE(e,t,r,n){return r&&r.type==="element"&&(r.tagName==="script"||r.tagName==="style")?e.value:xa(e.value,Object.assign({},n.settings.characterReferences,{subset:oF}))}function lF(e,t,r,n){return n.settings.allowDangerousHtml?e.value:OE(e,t,r,n)}function uF(e,t,r,n){return n.all(e)}const cF=kp("type",{invalid:dF,unknown:hF,handlers:{comment:DB,doctype:MB,element:iF,raw:lF,root:uF,text:OE}});function dF(e){throw new Error("Expected node, not `"+e+"`")}function hF(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const fF={},mF={},pF=[];function gF(e,t){const r=t||fF,n=r.quote||'"',i=n==='"'?"'":'"';if(n!=='"'&&n!=="'")throw new Error("Invalid quote `"+n+"`, expected `'` or `\"`");return{one:bF,all:yF,settings:{omitOptionalTags:r.omitOptionalTags||!1,allowParseErrors:r.allowParseErrors||!1,allowDangerousCharacters:r.allowDangerousCharacters||!1,quoteSmart:r.quoteSmart||!1,preferUnquoted:r.preferUnquoted||!1,tightAttributes:r.tightAttributes||!1,upperDoctype:r.upperDoctype||!1,tightDoctype:r.tightDoctype||!1,bogusComments:r.bogusComments||!1,tightCommaSeparatedLists:r.tightCommaSeparatedLists||!1,tightSelfClosing:r.tightSelfClosing||!1,collapseEmptyAttributes:r.collapseEmptyAttributes||!1,allowDangerousHtml:r.allowDangerousHtml||!1,voids:r.voids||EE,characterReferences:r.characterReferences||mF,closeSelfClosing:r.closeSelfClosing||!1,closeEmptyElements:r.closeEmptyElements||!1},schema:r.space==="svg"?On:Va,quote:n,alternative:i}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function bF(e,t,r){return cF(e,t,r,this)}function yF(e){const t=[],r=e&&e.children||pF;let n=-1;for(;++n<r.length;)t[n]=this.one(r[n],n,e);return t.join("")}const $b=/\s+/g;function LE(e,t){var n;if(!t)return e;e.properties||(e.properties={}),(n=e.properties).class||(n.class=[]),typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split($b)),Array.isArray(e.properties.class)||(e.properties.class=[]);const r=Array.isArray(t)?t:t.split($b);for(const i of r)i&&!e.properties.class.includes(i)&&e.properties.class.push(i);return e}function vF(e){const t=f0(e,!0).map(([i])=>i);function r(i){if(i===e.length)return{line:t.length-1,character:t.at(-1).length};let s=i,a=0;for(const o of t){if(s<o.length)break;s-=o.length,a++}return{line:a,character:s}}function n(i,s){let a=0;for(let o=0;o<i;o++)a+=t[o].length;return a+=s,a}return{lines:t,indexToPos:r,posToIndex:n}}const xF=["color","background-color"];function EF(e,t){let r=0;const n=[];for(const i of t)i>r&&n.push({...e,content:e.content.slice(r,i),offset:e.offset+r}),r=i;return r<e.content.length&&n.push({...e,content:e.content.slice(r),offset:e.offset+r}),n}function _F(e,t){let r=0,n=e.length;for(;r<n;){const i=r+(n-r>>1);e[i]<=t?r=i+1:n=i}return r}function TF(e,t){const r=[...t instanceof Set?t:new Set(t)].sort((n,i)=>n-i);return r.length?e.map(n=>n.flatMap(i=>{const s=i.offset+i.content.length,a=_F(r,i.offset);let o=a;for(;o<r.length&&r[o]<s;)o++;if(a===o)return i;const l=r.slice(a,o);for(let u=0;u<l.length;u++)l[u]-=i.offset;return EF(i,l)})):e}function wF(e,t,r,n,i="css-vars"){const s={content:e.content,explanation:e.explanation,offset:e.offset},a=t.map(c=>bc(e.variants[c])),o=new Set(a.flatMap(c=>Object.keys(c))),l={},u=(c,d)=>{const h=d==="color"?"":d==="background-color"?"-bg":`-${d}`;return r+t[c]+(d==="color"?"":h)};return a.forEach((c,d)=>{for(const h of o){const f=c[h]||"inherit";if(d===0&&n&&xF.includes(h))if(n==="light-dark()"&&a.length>1){const m=t.findIndex(w=>w==="light"),b=t.findIndex(w=>w==="dark");if(m===-1||b===-1)throw new ut('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const y=a[m][h]||"inherit",E=a[b][h]||"inherit";l[h]=`light-dark(${y}, ${E})`,i==="css-vars"&&(l[u(d,h)]=f)}else l[h]=f;else i==="css-vars"&&(l[u(d,h)]=f)}}),s.htmlStyle=l,s}function bc(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&er.Italic&&(t["font-style"]="italic"),e.fontStyle&er.Bold&&(t["font-weight"]="bold");const r=[];e.fontStyle&er.Underline&&r.push("underline"),e.fontStyle&er.Strikethrough&&r.push("line-through"),r.length&&(t["text-decoration"]=r.join(" "))}return t}function hf(e){return typeof e=="string"?e:Object.entries(e).map(([t,r])=>`${t}:${r}`).join(";")}function kF(){const e=new WeakMap;function t(r){if(!e.has(r.meta)){let i=function(a){if(typeof a=="number"){if(a<0||a>r.source.length)throw new ut(`Invalid decoration offset: ${a}. Code length: ${r.source.length}`);return{...n.indexToPos(a),offset:a}}else{const o=n.lines[a.line];if(o===void 0)throw new ut(`Invalid decoration position ${JSON.stringify(a)}. Lines length: ${n.lines.length}`);let l=a.character;if(l<0&&(l=o.length+l),l<0||l>o.length)throw new ut(`Invalid decoration position ${JSON.stringify(a)}. Line ${a.line} length: ${o.length}`);return{...a,character:l,offset:n.posToIndex(a.line,l)}}};const n=vF(r.source),s=(r.options.decorations||[]).map(a=>({...a,start:i(a.start),end:i(a.end)}));SF(s),e.set(r.meta,{decorations:s,converter:n,source:r.source})}return e.get(r.meta)}return{name:"shiki:decorations",tokens(r){var n;if((n=this.options.decorations)!=null&&n.length)return TF(r,t(this).decorations.flatMap(i=>[i.start.offset,i.end.offset]))},code(r){var c;if(!((c=this.options.decorations)!=null&&c.length))return;const n=t(this),i=[...r.children].filter(d=>d.type==="element"&&d.tagName==="span");if(i.length!==n.converter.lines.length)throw new ut(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function s(d,h,f,m){const b=i[d];let y="",E=-1,w=-1;if(h===0&&(E=0),f===0&&(w=0),f===Number.POSITIVE_INFINITY&&(w=b.children.length),E===-1||w===-1)for(let _=0;_<b.children.length;_++)y+=DE(b.children[_]),E===-1&&y.length===h&&(E=_+1),w===-1&&y.length===f&&(w=_+1);if(E===-1)throw new ut(`Failed to find start index for decoration ${JSON.stringify(m.start)}`);if(w===-1)throw new ut(`Failed to find end index for decoration ${JSON.stringify(m.end)}`);const x=b.children.slice(E,w);if(!m.alwaysWrap&&x.length===b.children.length)o(b,m,"line");else if(!m.alwaysWrap&&x.length===1&&x[0].type==="element")o(x[0],m,"token");else{const _={type:"element",tagName:"span",properties:{},children:x};o(_,m,"wrapper"),b.children.splice(E,x.length,_)}}function a(d,h){i[d]=o(i[d],h,"line")}function o(d,h,f){var y;const m=h.properties||{},b=h.transform||(E=>E);return d.tagName=h.tagName||"span",d.properties={...d.properties,...m,class:d.properties.class},(y=h.properties)!=null&&y.class&&LE(d,h.properties.class),d=b(d,f)||d,d}const l=[],u=n.decorations.sort((d,h)=>h.start.offset-d.start.offset||d.end.offset-h.end.offset);for(const d of u){const{start:h,end:f}=d;if(h.line===f.line)s(h.line,h.character,f.character,d);else if(h.line<f.line){s(h.line,h.character,Number.POSITIVE_INFINITY,d);for(let m=h.line+1;m<f.line;m++)l.unshift(()=>a(m,d));s(f.line,0,f.character,d)}}l.forEach(d=>d())}}}function SF(e){for(let t=0;t<e.length;t++){const r=e[t];if(r.start.offset>r.end.offset)throw new ut(`Invalid decoration range: ${JSON.stringify(r.start)} - ${JSON.stringify(r.end)}`);for(let n=t+1;n<e.length;n++){const i=e[n],s=r.start.offset<=i.start.offset&&i.start.offset<r.end.offset,a=r.start.offset<i.end.offset&&i.end.offset<=r.end.offset,o=i.start.offset<=r.start.offset&&r.start.offset<i.end.offset,l=i.start.offset<r.end.offset&&r.end.offset<=i.end.offset;if(s||a||o||l){if(s&&a||o&&l||o&&r.start.offset===r.end.offset||a&&i.start.offset===i.end.offset)continue;throw new ut(`Decorations ${JSON.stringify(r.start)} and ${JSON.stringify(i.start)} intersect.`)}}}}function DE(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(DE).join(""):""}const AF=[kF()];function yc(e){const t=CF(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...AF]}function CF(e){const t=[],r=[],n=[];for(const i of e)switch(i.enforce){case"pre":t.push(i);break;case"post":r.push(i);break;default:n.push(i)}return{pre:t,post:r,normal:n}}var fs=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],xd={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function IF(e,t){const r=e.indexOf("\x1B",t);if(r!==-1&&e[r+1]==="["){const n=e.indexOf("m",r);if(n!==-1)return{sequence:e.substring(r+2,n).split(";"),startPosition:r,position:n+1}}return{position:e.length}}function jb(e){const t=e.shift();if(t==="2"){const r=e.splice(0,3).map(n=>Number.parseInt(n));return r.length!==3||r.some(n=>Number.isNaN(n))?void 0:{type:"rgb",rgb:r}}else if(t==="5"){const r=e.shift();if(r)return{type:"table",index:Number(r)}}}function NF(e){const t=[];for(;e.length>0;){const r=e.shift();if(!r)continue;const n=Number.parseInt(r);if(!Number.isNaN(n))if(n===0)t.push({type:"resetAll"});else if(n<=9)xd[n]&&t.push({type:"setDecoration",value:xd[n]});else if(n<=29){const i=xd[n-20];i&&(t.push({type:"resetDecoration",value:i}),i==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(n<=37)t.push({type:"setForegroundColor",value:{type:"named",name:fs[n-30]}});else if(n===38){const i=jb(e);i&&t.push({type:"setForegroundColor",value:i})}else if(n===39)t.push({type:"resetForegroundColor"});else if(n<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:fs[n-40]}});else if(n===48){const i=jb(e);i&&t.push({type:"setBackgroundColor",value:i})}else n===49?t.push({type:"resetBackgroundColor"}):n===53?t.push({type:"setDecoration",value:"overline"}):n===55?t.push({type:"resetDecoration",value:"overline"}):n>=90&&n<=97?t.push({type:"setForegroundColor",value:{type:"named",name:fs[n-90+8]}}):n>=100&&n<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:fs[n-100+8]}})}return t}function RF(){let e=null,t=null,r=new Set;return{parse(n){const i=[];let s=0;do{const a=IF(n,s),o=a.sequence?n.substring(s,a.startPosition):n.substring(s);if(o.length>0&&i.push({value:o,foreground:e,background:t,decorations:new Set(r)}),a.sequence){const l=NF(a.sequence);for(const u of l)u.type==="resetAll"?(e=null,t=null,r.clear()):u.type==="resetForegroundColor"?e=null:u.type==="resetBackgroundColor"?t=null:u.type==="resetDecoration"&&r.delete(u.value);for(const u of l)u.type==="setForegroundColor"?e=u.value:u.type==="setBackgroundColor"?t=u.value:u.type==="setDecoration"&&r.add(u.value)}s=a.position}while(s<n.length);return i}}}var PF={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function OF(e=PF){function t(o){return e[o]}function r(o){return`#${o.map(l=>Math.max(0,Math.min(l,255)).toString(16).padStart(2,"0")).join("")}`}let n;function i(){if(n)return n;n=[];for(let u=0;u<fs.length;u++)n.push(t(fs[u]));let o=[0,95,135,175,215,255];for(let u=0;u<6;u++)for(let c=0;c<6;c++)for(let d=0;d<6;d++)n.push(r([o[u],o[c],o[d]]));let l=8;for(let u=0;u<24;u++,l+=10)n.push(r([l,l,l]));return n}function s(o){return i()[o]}function a(o){switch(o.type){case"named":return t(o.name);case"rgb":return r(o.rgb);case"table":return s(o.index)}}return{value:a}}const LF=/#([0-9a-f]{3,8})/i,DF=/var\((--[\w-]+-ansi-[\w-]+)\)/,MF={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function BF(e,t,r){const n=pc(e,r),i=f0(t),s=OF(Object.fromEntries(fs.map(o=>{var u;const l=`terminal.ansi${o[0].toUpperCase()}${o.substring(1)}`;return[o,((u=e.colors)==null?void 0:u[l])||MF[o]]}))),a=RF();return i.map(o=>a.parse(o[0]).map(l=>{let u,c;l.decorations.has("reverse")?(u=l.background?s.value(l.background):e.bg,c=l.foreground?s.value(l.foreground):e.fg):(u=l.foreground?s.value(l.foreground):e.fg,c=l.background?s.value(l.background):void 0),u=Ri(u,n),c=Ri(c,n),l.decorations.has("dim")&&(u=FF(u));let d=er.None;return l.decorations.has("bold")&&(d|=er.Bold),l.decorations.has("italic")&&(d|=er.Italic),l.decorations.has("underline")&&(d|=er.Underline),l.decorations.has("strikethrough")&&(d|=er.Strikethrough),{content:l.value,offset:o[1],color:u,bgColor:c,fontStyle:d}}))}function FF(e){const t=e.match(LF);if(t){const n=t[1];if(n.length===8){const i=Math.round(Number.parseInt(n.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${n.slice(0,6)}${i}`}else{if(n.length===6)return`#${n}80`;if(n.length===4){const i=n[0],s=n[1],a=n[2],o=n[3];return`#${i}${i}${s}${s}${a}${a}${Math.round(Number.parseInt(`${o}${o}`,16)/2).toString(16).padStart(2,"0")}`}else if(n.length===3){const i=n[0],s=n[1],a=n[2];return`#${i}${i}${s}${s}${a}${a}80`}}}const r=e.match(DF);return r?`var(${r[1]}-dim)`:e}function ff(e,t,r={}){const n=e.resolveLangAlias(r.lang||"text"),{theme:i=e.getLoadedThemes()[0]}=r;if(!d0(n)&&!h0(i)&&n==="ansi"){const{theme:s}=e.setTheme(i);return BF(s,t,r)}return vE(e,t,r)}function vc(e,t,r){let n,i,s,a,o,l;if("themes"in r){const{defaultColor:u="light",cssVariablePrefix:c="--shiki-",colorsRendering:d="css-vars"}=r,h=Object.entries(r.themes).filter(E=>E[1]).map(E=>({color:E[0],theme:E[1]})).sort((E,w)=>E.color===u?-1:w.color===u?1:0);if(h.length===0)throw new ut("`themes` option must not be empty");const f=xE(e,t,r,ff);if(l=il(f),u&&u!=="light-dark()"&&!h.some(E=>E.color===u))throw new ut(`\`themes\` option must contain the defaultColor key \`${u}\``);const m=h.map(E=>e.getTheme(E.theme)),b=h.map(E=>E.color);s=f.map(E=>E.map(w=>wF(w,b,c,u,d))),l&&m0(s,l);const y=h.map(E=>pc(E.theme,r));i=Ub(h,m,y,c,u,"fg",d),n=Ub(h,m,y,c,u,"bg",d),a=`shiki-themes ${m.map(E=>E.name).join(" ")}`,o=u?void 0:[i,n].join(";")}else if("theme"in r){const u=pc(r.theme,r);s=ff(e,t,r);const c=e.getTheme(r.theme);n=Ri(c.bg,u),i=Ri(c.fg,u),a=c.name,l=il(s)}else throw new ut("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:i,bg:n,themeName:a,rootStyle:o,grammarState:l}}function Ub(e,t,r,n,i,s,a){return e.map((o,l)=>{const u=Ri(t[l][s],r[l])||"inherit",c=`${n+o.color}${s==="bg"?"-bg":""}:${u}`;if(l===0&&i){if(i==="light-dark()"&&e.length>1){const d=e.findIndex(f=>f.color==="light"),h=e.findIndex(f=>f.color==="dark");if(d===-1||h===-1)throw new ut('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${Ri(t[d][s],r[d])||"inherit"}, ${Ri(t[h][s],r[h])||"inherit"});${c}`}return u}return a==="css-vars"?c:null}).filter(o=>!!o).join(";")}const ME=/^\s+$/,zF=/^(\s*)(.*?)(\s*)$/;function xc(e,t,r,n={meta:{},options:r,codeToHast:(i,s)=>xc(e,i,s),codeToTokens:(i,s)=>vc(e,i,s)}){var m,b;let i=t;for(const y of yc(r))i=((m=y.preprocess)==null?void 0:m.call(n,i,r))||i;let{tokens:s,fg:a,bg:o,themeName:l,rootStyle:u,grammarState:c}=vc(e,i,r);const{mergeWhitespaces:d=!0,mergeSameStyleTokens:h=!1}=r;d===!0?s=jF(s):d==="never"&&(s=UF(s)),h&&(s=HF(s));const f={...n,get source(){return i}};for(const y of yc(r))s=((b=y.tokens)==null?void 0:b.call(f,s))||s;return $F(s,{...r,fg:a,bg:o,themeName:l,rootStyle:r.rootStyle===!1?!1:r.rootStyle??u},f,c)}function $F(e,t,r,n=il(e)){var b,y,E,w;const i=yc(t),s=[],a={type:"root",children:[]},{structure:o="classic",tabindex:l="0"}=t,u={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?u.style=t.rootStyle:u.style=`background-color:${t.bg};color:${t.fg}`),l!==!1&&l!=null&&(u.tabindex=l.toString());for(const[x,_]of Object.entries(t.meta||{}))x.startsWith("_")||(u[x]=_);let c={type:"element",tagName:"pre",properties:u,children:[],data:t.data},d={type:"element",tagName:"code",properties:{},children:s};const h=[],f={...r,structure:o,addClassToHast:LE,get source(){return r.source},get tokens(){return e},get options(){return t},get root(){return a},get pre(){return c},get code(){return d},get lines(){return h}};if(e.forEach((x,_)=>{var I,N;_&&(o==="inline"?a.children.push({type:"element",tagName:"br",properties:{},children:[]}):o==="classic"&&s.push({type:"text",value:`
231
- `}));let A={type:"element",tagName:"span",properties:{class:"line"},children:[]},S=0;for(const U of x){let z={type:"element",tagName:"span",properties:{...U.htmlAttrs},children:[{type:"text",value:U.content}]};const Z=hf(U.htmlStyle||bc(U));Z&&(z.properties.style=Z);for(const V of i)z=((I=V==null?void 0:V.span)==null?void 0:I.call(f,z,_+1,S,A,U))||z;o==="inline"?a.children.push(z):o==="classic"&&A.children.push(z),S+=U.content.length}if(o==="classic"){for(const U of i)A=((N=U==null?void 0:U.line)==null?void 0:N.call(f,A,_+1))||A;h.push(A),s.push(A)}else o==="inline"&&h.push(A)}),o==="classic"){for(const x of i)d=((b=x==null?void 0:x.code)==null?void 0:b.call(f,d))||d;c.children.push(d);for(const x of i)c=((y=x==null?void 0:x.pre)==null?void 0:y.call(f,c))||c;a.children.push(c)}else if(o==="inline"){const x=[];let _={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const S of a.children)S.type==="element"&&S.tagName==="br"?(x.push(_),_={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(S.type==="element"||S.type==="text")&&_.children.push(S);x.push(_);let A={type:"element",tagName:"code",properties:{},children:x};for(const S of i)A=((E=S==null?void 0:S.code)==null?void 0:E.call(f,A))||A;a.children=[];for(let S=0;S<A.children.length;S++){S>0&&a.children.push({type:"element",tagName:"br",properties:{},children:[]});const I=A.children[S];I.type==="element"&&a.children.push(...I.children)}}let m=a;for(const x of i)m=((w=x==null?void 0:x.root)==null?void 0:w.call(f,m))||m;return n&&m0(m,n),m}function jF(e){return e.map(t=>{const r=[];let n="",i;return t.forEach((s,a)=>{const o=!(s.fontStyle&&(s.fontStyle&er.Underline||s.fontStyle&er.Strikethrough));o&&ME.test(s.content)&&t[a+1]?(i===void 0&&(i=s.offset),n+=s.content):n?(o?r.push({...s,offset:i,content:n+s.content}):r.push({content:n,offset:i},s),i=void 0,n=""):r.push(s)}),r})}function UF(e){return e.map(t=>t.flatMap(r=>{if(ME.test(r.content))return r;const n=r.content.match(zF);if(!n)return r;const[,i,s,a]=n;if(!i&&!a)return r;const o=[{...r,offset:r.offset+i.length,content:s}];return i&&o.unshift({content:i,offset:r.offset}),a&&o.push({content:a,offset:r.offset+i.length+s.length}),o}))}function HF(e){return e.map(t=>{const r=[];for(const n of t){if(r.length===0){r.push({...n});continue}const i=r.at(-1),s=hf(i.htmlStyle||bc(i)),a=hf(n.htmlStyle||bc(n)),o=i.fontStyle&&(i.fontStyle&er.Underline||i.fontStyle&er.Strikethrough),l=n.fontStyle&&(n.fontStyle&er.Underline||n.fontStyle&er.Strikethrough);!o&&!l&&s===a?i.content+=n.content:r.push({...n})}return r})}const VF=gF;function qF(e,t,r){var s;const n={meta:{},options:r,codeToHast:(a,o)=>xc(e,a,o),codeToTokens:(a,o)=>vc(e,a,o)};let i=VF(xc(e,t,r,n));for(const a of yc(r))i=((s=a.postprocess)==null?void 0:s.call(n,i,r))||i;return i}async function GF(e){const t=await KM(e);return{getLastGrammarState:(...r)=>tB(t,...r),codeToTokensBase:(r,n)=>ff(t,r,n),codeToTokensWithThemes:(r,n)=>xE(t,r,n),codeToTokens:(r,n)=>vc(t,r,n),codeToHast:(r,n)=>xc(t,r,n),codeToHtml:(r,n)=>qF(t,r,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function WF(e){const t=e.langs,r=e.themes,n=e.engine;async function i(s){function a(d){var h;if(typeof d=="string"){if(d=((h=s.langAlias)==null?void 0:h[d])||d,hE(d))return[];const f=t[d];if(!f)throw new ut(`Language \`${d}\` is not included in this bundle. You may want to load it from external source.`);return f}return d}function o(d){if(fE(d))return"none";if(typeof d=="string"){const h=r[d];if(!h)throw new ut(`Theme \`${d}\` is not included in this bundle. You may want to load it from external source.`);return h}return d}const l=(s.themes??[]).map(d=>o(d)),u=(s.langs??[]).map(d=>a(d)),c=await GF({engine:s.engine??n(),...s,themes:l,langs:u});return{...c,loadLanguage(...d){return c.loadLanguage(...d.map(a))},loadTheme(...d){return c.loadTheme(...d.map(o))},getBundledLanguages(){return t},getBundledThemes(){return r}}}return i}const BE=WF({langs:qx,themes:zD,engine:()=>(0,Yx.createOnigurumaEngine)(O(()=>import("./wasm-CG6Dc4jp.js"),[]))}),Hb=4294967295;function ZF(e){var t;return!e.sticky&&!((t=e.rawOptions)!=null&&t.strategy)}function Vb(e,t){return{index:e,captureIndices:t.map(r=>r==null?{start:Hb,end:Hb,length:0}:{start:r[0],end:r[1],length:r[1]-r[0]})}}var YF=class{constructor(e,t={}){G(this,"patterns");G(this,"options");G(this,"regexps");G(this,"lastSearches");this.patterns=e,this.options=t;const{forgiving:r=!1,cache:n,regexConstructor:i}=t;if(!i)throw new Error("Option `regexConstructor` is not provided");this.regexps=e.map(s=>{if(typeof s!="string")return s;const a=n==null?void 0:n.get(s);if(a){if(a instanceof RegExp)return a;if(r)return null;throw a}try{const o=i(s);return n==null||n.set(s,o),o}catch(o){if(n==null||n.set(s,o),r)return null;throw o}}),this.lastSearches=this.regexps.map(s=>s&&ZF(s)?{strId:0,searchedFrom:0,matchIndex:-1,indices:null}:null)}findNextMatchSync(e,t,r){const n=typeof e=="string"?e:e.content,i=typeof e=="string"?0:e.id||0;let s=-1,a=0,o=null;for(let l=0;l<this.regexps.length;l++){const u=this.regexps[l];if(u)try{const c=i?this.lastSearches[l]:null;let d,h;if(c&&c.strId===i&&c.searchedFrom<=t&&(c.matchIndex===-1||c.matchIndex>=t))d=c.matchIndex,h=c.indices;else{u.lastIndex=t;const f=u.exec(n);d=f?f.index:-1,h=f?f.indices:null,c&&(c.strId=i,c.searchedFrom=t,c.matchIndex=d,c.indices=h)}if(d===-1)continue;if(d===t)return Vb(l,h);(s===-1||d<a)&&(s=l,a=d,o=h)}catch(c){if(this.options.forgiving)continue;throw c}}return s===-1?null:Vb(s,o)}};let KF=0;function XF(e){return{content:e,id:++KF}}function qa(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function QF(e,t,r){return e.has(t)||e.set(t,r),e.get(t)}const Ip=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),Gt=String.raw;function Ga(e,t){if(e==null)throw new Error(t??"Value expected");return e}const FE=Gt`\[\^?`,zE=`c.? | C(?:-.?)?|${Gt`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${Gt`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${Gt`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${Gt`o\{[^\}]*\}?`}|${Gt`\d{1,3}`}`,Np=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,ou=new RegExp(Gt`
232
- \\ (?:
233
- ${zE}
234
- | [gk]<[^>]*>?
235
- | [gk]'[^']*'?
236
- | .
237
- )
238
- | \( (?:
239
- \? (?:
240
- [:=!>({]
241
- | <[=!]
242
- | <[^>]*>
243
- | '[^']*'
244
- | ~\|?
245
- | #(?:[^)\\]|\\.?)*
246
- | [^:)]*[:)]
247
- )?
248
- | \*[^\)]*\)?
249
- )?
250
- | (?:${Np.source})+
251
- | ${FE}
252
- | .
253
- `.replace(/\s+/g,""),"gsu"),Ed=new RegExp(Gt`
254
- \\ (?:
255
- ${zE}
256
- | .
257
- )
258
- | \[:(?:\^?\p{Alpha}+|\^):\]
259
- | ${FE}
260
- | &&
261
- | .
262
- `.replace(/\s+/g,""),"gsu");function JF(e,t={}){const r={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const n=yz(r.flags),i=[n.extended],s={captureGroup:r.rules.captureGroup,getCurrentModX(){return i.at(-1)},numOpenGroups:0,popModX(){i.pop()},pushModX(d){i.push(d)},replaceCurrentModX(d){i[i.length-1]=d},singleline:r.rules.singleline};let a=[],o;for(ou.lastIndex=0;o=ou.exec(e);){const d=ez(s,e,o[0],ou.lastIndex);d.tokens?a.push(...d.tokens):d.token&&a.push(d.token),d.lastIndex!==void 0&&(ou.lastIndex=d.lastIndex)}const l=[];let u=0;a.filter(d=>d.type==="GroupOpen").forEach(d=>{d.kind==="capturing"?d.number=++u:d.raw==="("&&l.push(d)}),u||l.forEach((d,h)=>{d.kind="capturing",d.number=h+1});const c=u||l.length;return{tokens:a.map(d=>d.type==="EscapedNumber"?xz(d,c):d).flat(),flags:n}}function ez(e,t,r,n){const[i,s]=r;if(r==="["||r==="[^"){const a=tz(t,r,n);return{tokens:a.tokens,lastIndex:a.lastIndex}}if(i==="\\"){if("AbBGyYzZ".includes(s))return{token:qb(r,r)};if(/^\\g[<']/.test(r)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(r))throw new Error(`Invalid group name "${r}"`);return{token:dz(r)}}if(/^\\k[<']/.test(r)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(r))throw new Error(`Invalid group name "${r}"`);return{token:jE(r)}}if(s==="K")return{token:UE("keep",r)};if(s==="N"||s==="R")return{token:ms("newline",r,{negate:s==="N"})};if(s==="O")return{token:ms("any",r)};if(s==="X")return{token:ms("text_segment",r)};const a=$E(r,{inCharClass:!1});return Array.isArray(a)?{tokens:a}:{token:a}}if(i==="("){if(s==="*")return{token:pz(r)};if(r==="(?{")throw new Error(`Unsupported callout "${r}"`);if(r.startsWith("(?#")){if(t[n]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:n+1}}if(/^\(\?[-imx]+[:)]$/.test(r))return{token:mz(r,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,r==="("&&!e.captureGroup||r==="(?:")return{token:sa("group",r)};if(r==="(?>")return{token:sa("atomic",r)};if(r==="(?="||r==="(?!"||r==="(?<="||r==="(?<!")return{token:sa(r[2]==="<"?"lookbehind":"lookahead",r,{negate:r.endsWith("!")})};if(r==="("&&e.captureGroup||r.startsWith("(?<")&&r.endsWith(">")||r.startsWith("(?'")&&r.endsWith("'"))return{token:sa("capturing",r,{...r!=="("&&{name:r.slice(3,-1)}})};if(r.startsWith("(?~")){if(r==="(?~|")throw new Error(`Unsupported absence function kind "${r}"`);return{token:sa("absence_repeater",r)}}throw r==="(?("?new Error(`Unsupported conditional "${r}"`):new Error(`Invalid or unsupported group option "${r}"`)}if(r===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:lz(r)}}if(e.getCurrentModX()){if(r==="#"){const a=t.indexOf(`
263
- `,n);return{lastIndex:a===-1?t.length:a}}if(/^\s$/.test(r)){const a=/\s+/y;return a.lastIndex=n,{lastIndex:a.exec(t)?a.lastIndex:n}}}if(r===".")return{token:ms("dot",r)};if(r==="^"||r==="$"){const a=e.singleline?{"^":Gt`\A`,$:Gt`\Z`}[r]:r;return{token:qb(a,r)}}return r==="|"?{token:nz(r)}:Np.test(r)?{tokens:Ez(r)}:{token:Jn(qa(r),r)}}function tz(e,t,r){const n=[Gb(t[1]==="^",t)];let i=1,s;for(Ed.lastIndex=r;s=Ed.exec(e);){const a=s[0];if(a[0]==="["&&a[1]!==":")i++,n.push(Gb(a[1]==="^",a));else if(a==="]"){if(n.at(-1).type==="CharacterClassOpen")n.push(Jn(93,a));else if(i--,n.push(iz(a)),!i)break}else{const o=rz(a);Array.isArray(o)?n.push(...o):n.push(o)}}return{tokens:n,lastIndex:Ed.lastIndex||e.length}}function rz(e){if(e[0]==="\\")return $E(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!Ip.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return ms("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?sz(e):e==="&&"?az(e):Jn(qa(e),e)}function $E(e,{inCharClass:t}){const r=e[1];if(r==="c"||r==="C")return fz(e);if("dDhHsSwW".includes(r))return gz(e);if(e.startsWith(Gt`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return bz(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const n=e.split(/\\x/).slice(1).map(a=>parseInt(a,16)),i=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(n)),s=new TextEncoder;return[...i].map(a=>{const o=[...s.encode(a)].map(l=>`\\x${l.toString(16)}`).join("");return Jn(qa(a),o)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(r==="u"||r==="x")return Jn(vz(e),e);if(Wb.has(r))return Jn(Wb.get(r),e);if(/\d/.test(r))return oz(t,e);if(e==="\\")throw new Error(Gt`Incomplete escape "\"`);if(r==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return Jn(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function nz(e){return{type:"Alternator",raw:e}}function qb(e,t){return{type:"Assertion",kind:e,raw:t}}function jE(e){return{type:"Backreference",raw:e}}function Jn(e,t){return{type:"Character",value:e,raw:t}}function iz(e){return{type:"CharacterClassClose",raw:e}}function sz(e){return{type:"CharacterClassHyphen",raw:e}}function az(e){return{type:"CharacterClassIntersector",raw:e}}function Gb(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function ms(e,t,r={}){return{type:"CharacterSet",kind:e,...r,raw:t}}function UE(e,t,r={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:Ga(r.flags),raw:t}}function oz(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function lz(e){return{type:"GroupClose",raw:e}}function sa(e,t,r={}){return{type:"GroupOpen",kind:e,...r,raw:t}}function uz(e,t,r,n){return{type:"NamedCallout",kind:e,tag:t,arguments:r,raw:n}}function cz(e,t,r,n){return{type:"Quantifier",kind:e,min:t,max:r,raw:n}}function dz(e){return{type:"Subroutine",raw:e}}const hz=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),Wb=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function fz(e){const t=e[1]==="c"?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw new Error(`Unsupported control character "${e}"`);return Jn(qa(t.toUpperCase())-64,e)}function mz(e,t){let{on:r,off:n}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;n??(n="");const i=(t.getCurrentModX()||r.includes("x"))&&!n.includes("x"),s=Yb(r),a=Yb(n),o={};if(s&&(o.enable=s),a&&(o.disable=a),e.endsWith(")"))return t.replaceCurrentModX(i),UE("flags",e,{flags:o});if(e.endsWith(":"))return t.pushModX(i),t.numOpenGroups++,sa("group",e,{...(s||a)&&{flags:o}});throw new Error(`Unexpected flag modifier "${e}"`)}function pz(e){const t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:r,tag:n,args:i}=t.groups;if(!r)throw new Error(`Invalid named callout "${e}"`);if(n==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const s=i?i.split(",").filter(c=>c!=="").map(c=>/^[+-]?\d+$/.test(c)?+c:c):[],[a,o,l]=s,u=hz.has(r)?r.toLowerCase():"custom";switch(u){case"fail":case"mismatch":case"skip":if(s.length>0)throw new Error(`Named callout arguments not allowed "${s}"`);break;case"error":if(s.length>1)throw new Error(`Named callout allows only one argument "${s}"`);if(typeof a=="string")throw new Error(`Named callout argument must be a number "${a}"`);break;case"max":if(!s.length||s.length>2)throw new Error(`Named callout must have one or two arguments "${s}"`);if(typeof a=="string"&&!/^[A-Za-z_]\w*$/.test(a))throw new Error(`Named callout argument one must be a tag or number "${a}"`);if(s.length===2&&(typeof o=="number"||!/^[<>X]$/.test(o)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${o}"`);break;case"count":case"total_count":if(s.length>1)throw new Error(`Named callout allows only one argument "${s}"`);if(s.length===1&&(typeof a=="number"||!/^[<>X]$/.test(a)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${a}"`);break;case"cmp":if(s.length!==3)throw new Error(`Named callout must have three arguments "${s}"`);if(typeof a=="string"&&!/^[A-Za-z_]\w*$/.test(a))throw new Error(`Named callout argument one must be a tag or number "${a}"`);if(typeof o=="number"||!/^(?:[<>!=]=|[<>])$/.test(o))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${o}"`);if(typeof l=="string"&&!/^[A-Za-z_]\w*$/.test(l))throw new Error(`Named callout argument three must be a tag or number "${l}"`);break;case"custom":throw new Error(`Undefined callout name "${r}"`);default:throw new Error(`Unexpected named callout kind "${u}"`)}return uz(u,n??null,(i==null?void 0:i.split(","))??null,e)}function Zb(e){let t=null,r,n;if(e[0]==="{"){const{minStr:i,maxStr:s}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,a=1e5;if(+i>a||s&&+s>a)throw new Error("Quantifier value unsupported in Oniguruma");if(r=+i,n=s===void 0?+i:s===""?1/0:+s,r>n&&(t="possessive",[r,n]=[n,r]),e.endsWith("?")){if(t==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else r=e[0]==="+"?1:0,n=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return cz(t,r,n,e)}function gz(e){const t=e[1].toLowerCase();return ms({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function bz(e){const{p:t,neg:r,value:n}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return ms("property",e,{value:n,negate:t==="P"&&!r||t==="p"&&!!r})}function Yb(e){const t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function yz(e){const t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let r=0;r<e.length;r++){const n=e[r];if(!"imxDPSWy".includes(n))throw new Error(`Invalid flag "${n}"`);if(n==="y"){if(!/^y{[gw]}/.test(e.slice(r)))throw new Error('Invalid or unspecified flag "y" mode');t.textSegmentMode=e[r+2]==="g"?"grapheme":"word",r+=3;continue}t[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[n]]=!0}return t}function vz(e){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(e))throw new Error(`Incomplete or invalid escape "${e}"`);const t=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function xz(e,t){const{raw:r,inCharClass:n}=e,i=r.slice(1);if(!n&&(i!=="0"&&i.length===1||i[0]!=="0"&&+i<=t))return[jE(r)];const s=[],a=i.match(/^[0-7]+|\d/g);for(let o=0;o<a.length;o++){const l=a[o];let u;if(o===0&&l!=="8"&&l!=="9"){if(u=parseInt(l,8),u>127)throw new Error(Gt`Octal encoded byte above 177 unsupported "${r}"`)}else u=qa(l);s.push(Jn(u,(o===0?"\\":"")+l))}return s}function Ez(e){const t=[],r=new RegExp(Np,"gy");let n;for(;n=r.exec(e);){const i=n[0];if(i[0]==="{"){const s=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(i);if(s){const{min:a,max:o}=s.groups;if(+a>+o&&i.endsWith("?")){r.lastIndex--,t.push(Zb(i.slice(0,-1)));continue}}}t.push(Zb(i))}return t}function HE(e,t){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const r=e.body[0];return!t||Object.keys(t).every(n=>t[n]===r[n])}function _z(e){return Tz.has(e.type)}const Tz=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function VE(e,t={}){const r={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},n=JF(e,{flags:r.flags,rules:{captureGroup:r.rules.captureGroup,singleline:r.rules.singleline}}),i=(h,f)=>{const m=n.tokens[s.nextIndex];switch(s.parent=h,s.nextIndex++,m.type){case"Alternator":return Rs();case"Assertion":return wz(m);case"Backreference":return kz(m,s);case"Character":return b0(m.value,{useLastValid:!!f.isCheckingRangeEnd});case"CharacterClassHyphen":return Sz(m,s,f);case"CharacterClassOpen":return Az(m,s,f);case"CharacterSet":return Cz(m,s);case"Directive":return Lz(m.kind,{flags:m.flags});case"GroupOpen":return Iz(m,s,f);case"NamedCallout":return Mz(m.kind,m.tag,m.arguments);case"Quantifier":return Nz(m,s);case"Subroutine":return Rz(m,s);default:throw new Error(`Unexpected token type "${m.type}"`)}},s={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:r.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:r.skipBackrefValidation,skipLookbehindValidation:r.skipLookbehindValidation,skipPropertyNameValidation:r.skipPropertyNameValidation,subroutines:[],tokens:n.tokens,unicodePropertyMap:r.unicodePropertyMap,walk:i},a=Fz(Dz(n.flags));let o=a.body[0];for(;s.nextIndex<n.tokens.length;){const h=i(o,{});h.type==="Alternative"?(a.body.push(h),o=h):o.body.push(h)}const{capturingGroups:l,hasNumberedRef:u,namedGroupsByName:c,subroutines:d}=s;if(u&&c.size&&!r.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:h}of d)if(typeof h=="number"){if(h>l.length)throw new Error("Subroutine uses a group number that's not defined");h&&(l[h-1].isSubroutined=!0)}else if(c.has(h)){if(c.get(h).length>1)throw new Error(Gt`Subroutine uses a duplicate group name "\g<${h}>"`);c.get(h)[0].isSubroutined=!0}else throw new Error(Gt`Subroutine uses a group name that's not defined "\g<${h}>"`);return a}function wz({kind:e}){return mf(Ga({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===Gt`\B`||e===Gt`\Y`})}function kz({raw:e},t){const r=/^\\k[<']/.test(e),n=r?e.slice(3,-1):e.slice(1),i=(s,a=!1)=>{const o=t.capturingGroups.length;let l=!1;if(s>o)if(t.skipBackrefValidation)l=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,pf(a?o+1-s:s,{orphan:l})};if(r){const s=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(n);if(s)return i(+s.groups.num,!!s.groups.sign);if(/[-+]/.test(n))throw new Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(n))throw new Error(`Group name not defined to the left "${e}"`);return pf(n)}return i(+n)}function Sz(e,t,r){const{tokens:n,walk:i}=t,s=t.parent,a=s.body.at(-1),o=n[t.nextIndex];if(!r.isCheckingRangeEnd&&a&&a.type!=="CharacterClass"&&a.type!=="CharacterClassRange"&&o&&o.type!=="CharacterClassOpen"&&o.type!=="CharacterClassClose"&&o.type!=="CharacterClassIntersector"){const l=i(s,{...r,isCheckingRangeEnd:!0});if(a.type==="Character"&&l.type==="Character")return s.body.pop(),Oz(a,l);throw new Error("Invalid character class range")}return b0(qa("-"))}function Az({negate:e},t,r){const{tokens:n,walk:i}=t,s=[Du()],a=n[t.nextIndex];let o=Qb(a);for(;o.type!=="CharacterClassClose";){if(o.type==="CharacterClassIntersector")s.push(Du()),t.nextIndex++;else{const u=s.at(-1);u.body.push(i(u,r))}o=Qb(n[t.nextIndex],a)}const l=Du({negate:e});return s.length===1?l.body=s[0].body:(l.kind="intersection",l.body=s.map(u=>u.body.length===1?u.body[0]:u)),t.nextIndex++,l}function Cz({kind:e,negate:t,value:r},n){const{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:s,unicodePropertyMap:a}=n;if(e==="property"){const o=y0(r);if(Ip.has(o)&&!(a!=null&&a.has(o)))e="posix",r=o;else return aa(r,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:s,unicodePropertyMap:a})}return e==="posix"?Bz(r,{negate:t}):gf(e,{negate:t})}function Iz(e,t,r){const{tokens:n,capturingGroups:i,namedGroupsByName:s,skipLookbehindValidation:a,walk:o}=t,l=zz(e),u=l.type==="AbsenceFunction",c=Xb(l),d=c&&l.negate;if(l.type==="CapturingGroup"&&(i.push(l),l.name&&QF(s,l.name,[]).push(l)),u&&r.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let h=Jb(n[t.nextIndex]);for(;h.type!=="GroupClose";){if(h.type==="Alternator")l.body.push(Rs()),t.nextIndex++;else{const f=l.body.at(-1),m=o(f,{...r,isInAbsenceFunction:r.isInAbsenceFunction||u,isInLookbehind:r.isInLookbehind||c,isInNegLookbehind:r.isInNegLookbehind||d});if(f.body.push(m),(c||r.isInLookbehind)&&!a){const b="Lookbehind includes a pattern not allowed by Oniguruma";if(d||r.isInNegLookbehind){if(Kb(m)||m.type==="CapturingGroup")throw new Error(b)}else if(Kb(m)||Xb(m)&&m.negate)throw new Error(b)}}h=Jb(n[t.nextIndex])}return t.nextIndex++,l}function Nz({kind:e,min:t,max:r},n){const i=n.parent,s=i.body.at(-1);if(!s||!_z(s))throw new Error("Quantifier requires a repeatable token");const a=GE(e,t,r,s);return i.body.pop(),a}function Rz({raw:e},t){const{capturingGroups:r,subroutines:n}=t;let i=e.slice(3,-1);const s=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);if(s){const o=+s.groups.num,l=r.length;if(t.hasNumberedRef=!0,i={"":o,"+":l+o,"-":l+1-o}[s.groups.sign],i<1)throw new Error("Invalid subroutine number")}else i==="0"&&(i=0);const a=WE(i);return n.push(a),a}function Pz(e,t){return{type:"AbsenceFunction",kind:e,body:Nl(t==null?void 0:t.body)}}function Rs(e){return{type:"Alternative",body:ZE(e==null?void 0:e.body)}}function mf(e,t){const r={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(r.negate=!!(t!=null&&t.negate)),r}function pf(e,t){const r=!!(t!=null&&t.orphan);return{type:"Backreference",ref:e,...r&&{orphan:r}}}function qE(e,t){const r={name:void 0,isSubroutined:!1,...t};if(r.name!==void 0&&!$z(r.name))throw new Error(`Group name "${r.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...r.name&&{name:r.name},...r.isSubroutined&&{isSubroutined:r.isSubroutined},body:Nl(t==null?void 0:t.body)}}function b0(e,t){const r={useLastValid:!1,...t};if(e>1114111){const n=e.toString(16);if(r.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${n}}"`):new Error(`Invalid code point out of range in JS "\\x{${n}}"`)}return{type:"Character",value:e}}function Du(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:ZE(e==null?void 0:e.body)}}function Oz(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function gf(e,t){const r=!!(t!=null&&t.negate),n={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(n.negate=r),(e==="text_segment"||e==="newline"&&!r)&&(n.variableLength=!0),n}function Lz(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:Ga(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function Dz(e){return{type:"Flags",...e}}function un(e){const t=e==null?void 0:e.atomic,r=e==null?void 0:e.flags;if(t&&r)throw new Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...r&&{flags:r},body:Nl(e==null?void 0:e.body)}}function cs(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:Nl(e==null?void 0:e.body)}}function Mz(e,t,r){return{type:"NamedCallout",kind:e,tag:t,arguments:r}}function Bz(e,t){const r=!!(t!=null&&t.negate);if(!Ip.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:r}}function GE(e,t,r,n){if(t>r)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:r,body:n}}function Fz(e,t){return{type:"Regex",body:Nl(t==null?void 0:t.body),flags:e}}function WE(e){return{type:"Subroutine",ref:e}}function aa(e,t){var i;const r={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let n=(i=r.unicodePropertyMap)==null?void 0:i.get(y0(e));if(!n){if(r.normalizeUnknownPropertyNames)n=jz(e);else if(r.unicodePropertyMap&&!r.skipPropertyNameValidation)throw new Error(Gt`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:n??e,negate:r.negate}}function zz({flags:e,kind:t,name:r,negate:n,number:i}){switch(t){case"absence_repeater":return Pz("repeater");case"atomic":return un({atomic:!0});case"capturing":return qE(i,{name:r});case"group":return un({flags:e});case"lookahead":case"lookbehind":return cs({behind:t==="lookbehind",negate:n});default:throw new Error(`Unexpected group kind "${t}"`)}}function Nl(e){if(e===void 0)e=[Rs()];else if(!Array.isArray(e)||!e.length||!e.every(t=>t.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}function ZE(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(t=>!!t.type))throw new Error("Invalid body; expected array of nodes");return e}function Kb(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function Xb(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function $z(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function jz(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function y0(e){return e.replace(/[- _]+/g,"").toLowerCase()}function Qb(e,t){const r=t;return Ga(e,`Unclosed character class${(r==null?void 0:r.type)==="Character"&&r.value===93&&r.raw==="]"?' (started with "]")':""}`)}function Jb(e){return Ga(e,"Unclosed group")}function Do(e,t,r=null){function n(s,a){for(let o=0;o<s.length;o++){const l=i(s[o],a,o,s);o=Math.max(-1,o+l)}}function i(s,a=null,o=null,l=null){var E,w;let u=0,c=!1;const d={node:s,parent:a,key:o,container:l,root:e,remove(){lu(l).splice(Math.max(0,Ks(o)+u),1),u--,c=!0},removeAllNextSiblings(){return lu(l).splice(Ks(o)+1)},removeAllPrevSiblings(){const x=Ks(o)+u;return u-=x,lu(l).splice(0,Math.max(0,x))},replaceWith(x,_={}){const A=!!_.traverse;l?l[Math.max(0,Ks(o)+u)]=x:Ga(a,"Can't replace root node")[o]=x,A&&i(x,a,o,l),c=!0},replaceWithMultiple(x,_={}){const A=!!_.traverse;if(lu(l).splice(Math.max(0,Ks(o)+u),1,...x),u+=x.length-1,A){let S=0;for(let I=0;I<x.length;I++)S+=i(x[I],a,Ks(o)+I+S,l)}c=!0},skip(){c=!0}},{type:h}=s,f=t["*"],m=t[h],b=typeof f=="function"?f:f==null?void 0:f.enter,y=typeof m=="function"?m:m==null?void 0:m.enter;if(b==null||b(d,r),y==null||y(d,r),!c)switch(h){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":n(s.body,s);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":i(s.min,s,"min"),i(s.max,s,"max");break;case"Quantifier":i(s.body,s,"body");break;case"Regex":n(s.body,s),i(s.flags,s,"flags");break;default:throw new Error(`Unexpected node type "${h}"`)}return(E=m==null?void 0:m.exit)==null||E.call(m,d,r),(w=f==null?void 0:f.exit)==null||w.call(f,d,r),u}return i(e),e}function lu(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function Ks(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const Uz=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function Hz(e,t){for(let r=0;r<e.length;r++)e[r]>=t&&e[r]++}function Vz(e,t,r,n){return e.slice(0,t)+n+e.slice(t+r.length)}const Vr=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function Rp(e,t,r,n){const i=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),s=[!1];let a=0,o="";for(const l of e.matchAll(i)){const{0:u,groups:{$skip:c}}=l;if(!c&&(!n||n===Vr.DEFAULT==!a)){r instanceof Function?o+=r(l,{context:a?Vr.CHAR_CLASS:Vr.DEFAULT,negated:s[s.length-1]}):o+=r;continue}u[0]==="["?(a++,s.push(u[1]==="^")):u==="]"&&a&&(a--,s.pop()),o+=u}return o}function YE(e,t,r,n){Rp(e,t,r,n)}function qz(e,t,r=0,n){if(!new RegExp(t,"su").test(e))return null;const i=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");i.lastIndex=r;let s=0,a;for(;a=i.exec(e);){const{0:o,groups:{$skip:l}}=a;if(!l&&(!n||n===Vr.DEFAULT==!s))return a;o==="["?s++:o==="]"&&s&&s--,i.lastIndex==a.index&&i.lastIndex++}return null}function uu(e,t,r){return!!qz(e,t,0,r)}function Gz(e,t){const r=/\\?./gsu;r.lastIndex=t;let n=e.length,i=0,s=1,a;for(;a=r.exec(e);){const[o]=a;if(o==="[")i++;else if(i)o==="]"&&i--;else if(o==="(")s++;else if(o===")"&&(s--,!s)){n=a.index;break}}return e.slice(t,n)}const e2=new RegExp(String.raw`(?<noncapturingStart>${Uz})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function Wz(e,t){const r=(t==null?void 0:t.hiddenCaptures)??[];let n=(t==null?void 0:t.captureTransfers)??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:n,hiddenCaptures:r};const i="(?>",s="(?:(?=(",a=[0],o=[];let l=0,u=0,c=NaN,d;do{d=!1;let h=0,f=0,m=!1,b;for(e2.lastIndex=Number.isNaN(c)?0:c+s.length;b=e2.exec(e);){const{0:y,index:E,groups:{capturingStart:w,noncapturingStart:x}}=b;if(y==="[")h++;else if(h)y==="]"&&h--;else if(y===i&&!m)c=E,m=!0;else if(m&&x)f++;else if(w)m?f++:(l++,a.push(l+u));else if(y===")"&&m){if(!f){u++;const _=l+u;if(e=`${e.slice(0,c)}${s}${e.slice(c+i.length,E)}))<$$${_}>)${e.slice(E+1)}`,d=!0,o.push(_),Hz(r,_),n.size){const A=new Map;n.forEach((S,I)=>{A.set(I>=_?I+1:I,S.map(N=>N>=_?N+1:N))}),n=A}break}f--}}}while(d);return r.push(...o),e=Rp(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:h,groups:{backrefNum:f,wrappedBackrefNum:m}})=>{if(f){const b=+f;if(b>a.length-1)throw new Error(`Backref "${h}" greater than number of captures`);return`\\${a[b]}`}return`\\${m}`},Vr.DEFAULT),{pattern:e,captureTransfers:n,hiddenCaptures:r}}const KE=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,_d=new RegExp(String.raw`
264
- \\(?: \d+
265
- | c[A-Za-z]
266
- | [gk]<[^>]+>
267
- | [pPu]\{[^\}]+\}
268
- | u[A-Fa-f\d]{4}
269
- | x[A-Fa-f\d]{2}
270
- )
271
- | \((?: \? (?: [:=!>]
272
- | <(?:[=!]|[^>]+>)
273
- | [A-Za-z\-]+:
274
- | \(DEFINE\)
275
- ))?
276
- | (?<qBase>${KE})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
277
- | \\?.
278
- `.replace(/\s+/g,""),"gsu");function Zz(e){if(!new RegExp(`${KE}\\+`).test(e))return{pattern:e};const t=[];let r=null,n=null,i="",s=0,a;for(_d.lastIndex=0;a=_d.exec(e);){const{0:o,index:l,groups:{qBase:u,qMod:c,invalidQ:d}}=a;if(o==="[")s||(n=l),s++;else if(o==="]")s?s--:n=null;else if(!s)if(c==="+"&&i&&!i.startsWith("(")){if(d)throw new Error(`Invalid quantifier "${o}"`);let h=-1;if(/^\{\d+\}$/.test(u))e=Vz(e,l+u.length,c,"");else{if(i===")"||i==="]"){const f=i===")"?r:n;if(f===null)throw new Error(`Invalid unmatched "${i}"`);e=`${e.slice(0,f)}(?>${e.slice(f,l)}${u})${e.slice(l+o.length)}`}else e=`${e.slice(0,l-i.length)}(?>${i}${u})${e.slice(l+o.length)}`;h+=4}_d.lastIndex+=h}else o[0]==="("?t.push(l):o===")"&&(r=t.length?t.pop():null);i=o}return{pattern:e}}const Ur=String.raw,Yz=Ur`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,bf=Ur`\(\?R=(?<rDepth>[^\)]+)\)|${Yz}`,v0=Ur`\(\?<(?![=!])(?<captureName>[^>]+)>`,XE=Ur`${v0}|(?<unnamed>\()(?!\?)`,is=new RegExp(Ur`${v0}|${bf}|\(\?|\\?.`,"gsu"),Td="Cannot use multiple overlapping recursions";function Kz(e,t){const{hiddenCaptures:r,mode:n}={hiddenCaptures:[],mode:"plugin",...t};let i=(t==null?void 0:t.captureTransfers)??new Map;if(!new RegExp(bf,"su").test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:r};if(n==="plugin"&&uu(e,Ur`\(\?\(DEFINE\)`,Vr.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const s=[],a=uu(e,Ur`\\[1-9]`,Vr.DEFAULT),o=new Map,l=[];let u=!1,c=0,d=0,h;for(is.lastIndex=0;h=is.exec(e);){const{0:f,groups:{captureName:m,rDepth:b,gRNameOrNum:y,gRDepth:E}}=h;if(f==="[")c++;else if(c)f==="]"&&c--;else if(b){if(t2(b),u)throw new Error(Td);if(a)throw new Error(`${n==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const w=e.slice(0,h.index),x=e.slice(is.lastIndex);if(uu(x,bf,Vr.DEFAULT))throw new Error(Td);const _=+b-1;e=r2(w,x,_,!1,r,s,d),i=i2(i,w,_,s.length,0,d);break}else if(y){t2(E);let w=!1;for(const V of l)if(V.name===y||V.num===+y){if(w=!0,V.hasRecursedWithin)throw new Error(Td);break}if(!w)throw new Error(Ur`Recursive \g cannot be used outside the referenced group "${n==="external"?y:Ur`\g<${y}&R=${E}>`}"`);const x=o.get(y),_=Gz(e,x);if(a&&uu(_,Ur`${v0}|\((?!\?)`,Vr.DEFAULT))throw new Error(`${n==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const A=e.slice(x,h.index),S=_.slice(A.length+f.length),I=s.length,N=+E-1,U=r2(A,S,N,!0,r,s,d);i=i2(i,A,N,s.length-I,I,d);const z=e.slice(0,x),Z=e.slice(x+_.length);e=`${z}${U}${Z}`,is.lastIndex+=U.length-f.length-A.length-S.length,l.forEach(V=>V.hasRecursedWithin=!0),u=!0}else if(m)d++,o.set(String(d),is.lastIndex),o.set(m,is.lastIndex),l.push({num:d,name:m});else if(f[0]==="("){const w=f==="(";w&&(d++,o.set(String(d),is.lastIndex)),l.push(w?{num:d}:{})}else f===")"&&l.pop()}return r.push(...s),{pattern:e,captureTransfers:i,hiddenCaptures:r}}function t2(e){const t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e))throw new Error(t);if(e=+e,e<2||e>100)throw new Error(t)}function r2(e,t,r,n,i,s,a){const o=new Set;n&&YE(e+t,v0,({groups:{captureName:u}})=>{o.add(u)},Vr.DEFAULT);const l=[r,n?o:null,i,s,a];return`${e}${n2(`(?:${e}`,"forward",...l)}(?:)${n2(`${t})`,"backward",...l)}${t}`}function n2(e,t,r,n,i,s,a){const l=c=>t==="forward"?c+2:r-c+2-1;let u="";for(let c=0;c<r;c++){const d=l(c);u+=Rp(e,Ur`${XE}|\\k<(?<backref>[^>]+)>`,({0:h,groups:{captureName:f,unnamed:m,backref:b}})=>{if(b&&n&&!n.has(b))return h;const y=`_$${d}`;if(m||f){const E=a+s.length+1;return s.push(E),Xz(i,E),m?h:`(?<${f}${y}>`}return Ur`\k<${b}${y}>`},Vr.DEFAULT)}return u}function Xz(e,t){for(let r=0;r<e.length;r++)e[r]>=t&&e[r]++}function i2(e,t,r,n,i,s){if(e.size&&n){let a=0;YE(t,XE,()=>a++,Vr.DEFAULT);const o=s-a+i,l=new Map;return e.forEach((u,c)=>{const d=(n-a*r)/r,h=a*r,f=c>o+a?c+n:c,m=[];for(const b of u)if(b<=o)m.push(b);else if(b>o+a+d)m.push(b+n);else if(b<=o+a)for(let y=0;y<=r;y++)m.push(b+a*y);else for(let y=0;y<=r;y++)m.push(b+h+d*y);l.set(f,m)}),l}return e}var Ft=String.fromCodePoint,De=String.raw,cn={},x0=globalThis.RegExp;cn.flagGroups=(()=>{try{new x0("(?i:)")}catch{return!1}return!0})();cn.unicodeSets=(()=>{try{new x0("[[]]","v")}catch{return!1}return!0})();cn.bugFlagVLiteralHyphenIsRange=cn.unicodeSets?(()=>{try{new x0(De`[\d\-a]`,"v")}catch{return!0}return!1})():!1;cn.bugNestedClassIgnoresNegation=cn.unicodeSets&&new x0("[[^a]]","v").test("a");function Ec(e,{enable:t,disable:r}){return{dotAll:!(r!=null&&r.dotAll)&&!!(t!=null&&t.dotAll||e.dotAll),ignoreCase:!(r!=null&&r.ignoreCase)&&!!(t!=null&&t.ignoreCase||e.ignoreCase)}}function al(e,t,r){return e.has(t)||e.set(t,r),e.get(t)}function yf(e,t){return s2[e]>=s2[t]}function Qz(e,t){if(e==null)throw new Error(t??"Value expected");return e}var s2={ES2025:2025,ES2024:2024,ES2018:2018},Jz={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function QE(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!Jz[e.target])throw new Error(`Unexpected target "${e.target}"`);const t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target==="auto"&&(t.target=cn.flagGroups?"ES2025":cn.unicodeSets?"ES2024":"ES2018"),t}var e$="[ -\r ]",t$=new Set([Ft(304),Ft(305)]),Vn=De`[\p{L}\p{M}\p{N}\p{Pc}]`;function JE(e){if(t$.has(e))return[e];const t=new Set,r=e.toLowerCase(),n=r.toUpperCase(),i=i$.get(r),s=r$.get(r),a=n$.get(r);return[...n].length===1&&t.add(n),a&&t.add(a),i&&t.add(i),t.add(r),s&&t.add(s),[...t]}var Pp=new Map(`C Other
279
- Cc Control cntrl
280
- Cf Format
281
- Cn Unassigned
282
- Co Private_Use
283
- Cs Surrogate
284
- L Letter
285
- LC Cased_Letter
286
- Ll Lowercase_Letter
287
- Lm Modifier_Letter
288
- Lo Other_Letter
289
- Lt Titlecase_Letter
290
- Lu Uppercase_Letter
291
- M Mark Combining_Mark
292
- Mc Spacing_Mark
293
- Me Enclosing_Mark
294
- Mn Nonspacing_Mark
295
- N Number
296
- Nd Decimal_Number digit
297
- Nl Letter_Number
298
- No Other_Number
299
- P Punctuation punct
300
- Pc Connector_Punctuation
301
- Pd Dash_Punctuation
302
- Pe Close_Punctuation
303
- Pf Final_Punctuation
304
- Pi Initial_Punctuation
305
- Po Other_Punctuation
306
- Ps Open_Punctuation
307
- S Symbol
308
- Sc Currency_Symbol
309
- Sk Modifier_Symbol
310
- Sm Math_Symbol
311
- So Other_Symbol
312
- Z Separator
313
- Zl Line_Separator
314
- Zp Paragraph_Separator
315
- Zs Space_Separator
316
- ASCII
317
- ASCII_Hex_Digit AHex
318
- Alphabetic Alpha
319
- Any
320
- Assigned
321
- Bidi_Control Bidi_C
322
- Bidi_Mirrored Bidi_M
323
- Case_Ignorable CI
324
- Cased
325
- Changes_When_Casefolded CWCF
326
- Changes_When_Casemapped CWCM
327
- Changes_When_Lowercased CWL
328
- Changes_When_NFKC_Casefolded CWKCF
329
- Changes_When_Titlecased CWT
330
- Changes_When_Uppercased CWU
331
- Dash
332
- Default_Ignorable_Code_Point DI
333
- Deprecated Dep
334
- Diacritic Dia
335
- Emoji
336
- Emoji_Component EComp
337
- Emoji_Modifier EMod
338
- Emoji_Modifier_Base EBase
339
- Emoji_Presentation EPres
340
- Extended_Pictographic ExtPict
341
- Extender Ext
342
- Grapheme_Base Gr_Base
343
- Grapheme_Extend Gr_Ext
344
- Hex_Digit Hex
345
- IDS_Binary_Operator IDSB
346
- IDS_Trinary_Operator IDST
347
- ID_Continue IDC
348
- ID_Start IDS
349
- Ideographic Ideo
350
- Join_Control Join_C
351
- Logical_Order_Exception LOE
352
- Lowercase Lower
353
- Math
354
- Noncharacter_Code_Point NChar
355
- Pattern_Syntax Pat_Syn
356
- Pattern_White_Space Pat_WS
357
- Quotation_Mark QMark
358
- Radical
359
- Regional_Indicator RI
360
- Sentence_Terminal STerm
361
- Soft_Dotted SD
362
- Terminal_Punctuation Term
363
- Unified_Ideograph UIdeo
364
- Uppercase Upper
365
- Variation_Selector VS
366
- White_Space space
367
- XID_Continue XIDC
368
- XID_Start XIDS`.split(/\s/).map(e=>[y0(e),e])),r$=new Map([["s",Ft(383)],[Ft(383),"s"]]),n$=new Map([[Ft(223),Ft(7838)],[Ft(107),Ft(8490)],[Ft(229),Ft(8491)],[Ft(969),Ft(8486)]]),i$=new Map([yi(453),yi(456),yi(459),yi(498),...wd(8072,8079),...wd(8088,8095),...wd(8104,8111),yi(8124),yi(8140),yi(8188)]),s$=new Map([["alnum",De`[\p{Alpha}\p{Nd}]`],["alpha",De`\p{Alpha}`],["ascii",De`\p{ASCII}`],["blank",De`[\p{Zs}\t]`],["cntrl",De`\p{Cc}`],["digit",De`\p{Nd}`],["graph",De`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",De`\p{Lower}`],["print",De`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",De`[\p{P}\p{S}]`],["space",De`\p{space}`],["upper",De`\p{Upper}`],["word",De`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",De`\p{AHex}`]]);function a$(e,t){const r=[];for(let n=e;n<=t;n++)r.push(n);return r}function yi(e){const t=Ft(e);return[t.toLowerCase(),t]}function wd(e,t){return a$(e,t).map(r=>yi(r))}var e_=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function o$(e,t){const r={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};t_(e);const n={accuracy:r.accuracy,asciiWordBoundaries:r.asciiWordBoundaries,avoidSubclass:r.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:yf(r.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};Do(e,l$,n);const i={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},s={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:n.subroutineRefMap};Do(e,u$,s);const a={groupsByName:s.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:s.reffedNodesByReferencer};return Do(e,c$,a),e._originMap=s.groupOriginByCopy,e._strategy=n.strategy,e}var l$={AbsenceFunction({node:e,parent:t,replaceWith:r}){const{body:n,kind:i}=e;if(i==="repeater"){const s=un();s.body[0].body.push(cs({negate:!0,body:n}),aa("Any"));const a=un();a.body[0].body.push(GE("greedy",0,1/0,s)),r(Tt(a,t),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:r},{flagDirectivesByAlt:n}){const i=e.body.filter(s=>s.kind==="flags");for(let s=r+1;s<t.body.length;s++){const a=t.body[s];al(n,a,[]).push(...i)}},exit({node:e},{flagDirectivesByAlt:t}){var r;if((r=t.get(e))!=null&&r.length){const n=n_(t.get(e));if(n){const i=un({flags:n});i.body[0].body=e.body,e.body=[Tt(i,e)]}}}},Assertion({node:e,parent:t,key:r,container:n,root:i,remove:s,replaceWith:a},o){const{kind:l,negate:u}=e,{asciiWordBoundaries:c,avoidSubclass:d,supportedGNodes:h,wordIsAscii:f}=o;if(l==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${u?"Y":"y"}"`);if(l==="line_end")a(Tt(cs({body:[Rs({body:[mf("string_end")]}),Rs({body:[b0(10)]})]}),t));else if(l==="line_start")a(Tt(qn(De`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(l==="search_start")if(h.has(e))i.flags.sticky=!0,s();else{const m=n[r-1];if(m&&g$(m))a(Tt(cs({negate:!0}),t));else{if(d)throw new Error(De`Uses "\G" in a way that requires a subclass`);a(vi(mf("string_start"),t)),o.strategy="clip_search"}}else if(!(l==="string_end"||l==="string_start"))if(l==="string_end_newline")a(Tt(qn(De`(?=\n?\z)`),t));else if(l==="word_boundary"){if(!f&&!c){const m=`(?:(?<=${Vn})(?!${Vn})|(?<!${Vn})(?=${Vn}))`,b=`(?:(?<=${Vn})(?=${Vn})|(?<!${Vn})(?!${Vn}))`;a(Tt(qn(u?b:m),t))}}else throw new Error(`Unexpected assertion kind "${l}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:r}=e;typeof r=="string"&&!Sd(r)&&(r=kd(r,t),e.ref=r)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:r}){let{name:n}=e;n&&!Sd(n)&&(n=kd(n,t),e.name=n),r.set(e.number,e),n&&r.set(n,e)},CharacterClassRange({node:e,parent:t,replaceWith:r}){if(t.kind==="intersection"){const n=Du({body:[e]});r(Tt(n,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:r},{accuracy:n,minTargetEs2024:i,digitIsAscii:s,spaceIsAscii:a,wordIsAscii:o}){const{kind:l,negate:u,value:c}=e;if(s&&(l==="digit"||c==="digit")){r(vi(gf("digit",{negate:u}),t));return}if(a&&(l==="space"||c==="space")){r(Tt(Ad(qn(e$),u),t));return}if(o&&(l==="word"||c==="word")){r(vi(gf("word",{negate:u}),t));return}if(l==="any")r(vi(aa("Any"),t));else if(l==="digit")r(vi(aa("Nd",{negate:u}),t));else if(l!=="dot")if(l==="text_segment"){if(n==="strict")throw new Error(De`Use of "\X" requires non-strict accuracy`);const d="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",h=De`\p{RI}{2}|${d}(?:\u200D${d})*`;r(Tt(qn(De`(?>\r\n|${i?De`\p{RGI_Emoji}`:h}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(l==="hex")r(vi(aa("AHex",{negate:u}),t));else if(l==="newline")r(Tt(qn(u?`[^
369
- ]`:`(?>\r
370
- ?|[
371
- \v\f…\u2028\u2029])`),t));else if(l==="posix")if(!i&&(c==="graph"||c==="print")){if(n==="strict")throw new Error(`POSIX class "${c}" requires min target ES2024 or non-strict accuracy`);let d={graph:"!-~",print:" -~"}[c];u&&(d=`\0-${Ft(d.codePointAt(0)-1)}${Ft(d.codePointAt(2)+1)}-􏿿`),r(Tt(qn(`[${d}]`),t))}else r(Tt(Ad(qn(s$.get(c)),u),t));else if(l==="property")Pp.has(y0(c))||(e.key="sc");else if(l==="space")r(vi(aa("space",{negate:u}),t));else if(l==="word")r(Tt(Ad(qn(Vn),u),t));else throw new Error(`Unexpected character set kind "${l}"`)},Directive({node:e,parent:t,root:r,remove:n,replaceWith:i,removeAllPrevSiblings:s,removeAllNextSiblings:a}){const{kind:o,flags:l}=e;if(o==="flags")if(!l.enable&&!l.disable)n();else{const u=un({flags:l});u.body[0].body=a(),i(Tt(u,t),{traverse:!0})}else if(o==="keep"){const u=r.body[0],d=r.body.length===1&&HE(u,{type:"Group"})&&u.body[0].body.length===1?u.body[0]:r;if(t.parent!==d||d.body.length>1)throw new Error(De`Uses "\K" in a way that's unsupported`);const h=cs({behind:!0});h.body[0].body=s(),i(Tt(h,t))}else throw new Error(`Unexpected directive kind "${o}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(r=>delete e[r]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:t,disable:r}=e.flags;t!=null&&t.extended&&delete t.extended,r!=null&&r.extended&&delete r.extended,t!=null&&t.dotAll&&(r!=null&&r.dotAll)&&delete t.dotAll,t!=null&&t.ignoreCase&&(r!=null&&r.ignoreCase)&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,r&&!Object.keys(r).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){const{kind:r}=e;r==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:r}){const{kind:n}=e;if(n==="fail")r(Tt(cs({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${n.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=un();t.body[0].body.push(e.body),e.body=Tt(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const r=[];let n=!1,i=!1;for(const s of e.body)if(s.body.length===1&&s.body[0].kind==="search_start")s.body.pop();else{const a=s_(s.body);a?(n=!0,Array.isArray(a)?r.push(...a):r.push(a)):i=!0}n&&!i&&r.forEach(s=>t.add(s))},exit(e,{accuracy:t,passedLookbehind:r,strategy:n}){if(t==="strict"&&r&&n)throw new Error(De`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:r}=e;typeof r=="string"&&!Sd(r)&&(r=kd(r,t),e.ref=r)}},u$={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:r}){const{orphan:n,ref:i}=e;n||r.set(e,[...t.get(i).map(({node:s})=>s)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:r,skip:n},{groupOriginByCopy:i,groupsByName:s,multiplexCapturesToLeftByRef:a,openRefs:o,reffedNodesByReferencer:l}){const u=i.get(e);if(u&&o.has(e.number)){const d=vi(a2(e.number),t);l.set(d,o.get(e.number)),r(d);return}o.set(e.number,e),a.set(e.number,[]),e.name&&al(a,e.name,[]);const c=a.get(e.name??e.number);for(let d=0;d<c.length;d++){const h=c[d];if(u===h.node||u&&u===h.origin||e===h.origin){c.splice(d,1);break}}if(a.get(e.number).push({node:e,origin:u}),e.name&&a.get(e.name).push({node:e,origin:u}),e.name){const d=al(s,e.name,new Map);let h=!1;if(u)h=!0;else for(const f of d.values())if(!f.hasDuplicateNameToRemove){h=!0;break}s.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:h})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=Ec(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:r},n){const{isRecursive:i,ref:s}=e;if(i){let c=t;for(;(c=c.parent)&&!(c.type==="CapturingGroup"&&(c.name===s||c.number===s)););n.reffedNodesByReferencer.set(e,c);return}const a=n.subroutineRefMap.get(s),o=s===0,l=o?a2(0):r_(a,n.groupOriginByCopy,null);let u=l;if(!o){const c=n_(f$(a,h=>h.type==="Group"&&!!h.flags)),d=c?Ec(n.globalFlags,c):n.globalFlags;d$(d,n.currentFlags)||(u=un({flags:m$(d)}),u.body[0].body.push(l))}r(Tt(u,t),{traverse:!o})}},c$={Backreference({node:e,parent:t,replaceWith:r},n){if(e.orphan){n.highestOrphanBackref=Math.max(n.highestOrphanBackref,e.ref);return}const s=n.reffedNodesByReferencer.get(e).filter(a=>h$(a,e));if(!s.length)r(Tt(cs({negate:!0}),t));else if(s.length>1){const a=un({atomic:!0,body:s.reverse().map(o=>Rs({body:[pf(o.number)]}))});r(Tt(a,t))}else e.ref=s[0].number},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){const r=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let n=0;n<r;n++){const i=qE();e.body.at(-1).body.push(i)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function t_(e){Do(e,{"*"({node:t,parent:r}){t.parent=r}})}function d$(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function h$(e,t){let r=t;do{if(r.type==="Regex")return!1;if(r.type==="Alternative")continue;if(r===e)return!1;const n=i_(r.parent);for(const i of n){if(i===r)break;if(i===e||a_(i,e))return!0}}while(r=r.parent);throw new Error("Unexpected path")}function r_(e,t,r,n){const i=Array.isArray(e)?[]:{};for(const[s,a]of Object.entries(e))s==="parent"?i.parent=Array.isArray(r)?n:r:a&&typeof a=="object"?i[s]=r_(a,t,i,r):(s==="type"&&a==="CapturingGroup"&&t.set(i,t.get(e)??e),i[s]=a);return i}function a2(e){const t=WE(e);return t.isRecursive=!0,t}function f$(e,t){const r=[];for(;e=e.parent;)(!t||t(e))&&r.push(e);return r}function kd(e,t){if(t.has(e))return t.get(e);const r=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,r),r}function n_(e){const t=["dotAll","ignoreCase"],r={enable:{},disable:{}};return e.forEach(({flags:n})=>{t.forEach(i=>{var s,a;(s=n.enable)!=null&&s[i]&&(delete r.disable[i],r.enable[i]=!0),(a=n.disable)!=null&&a[i]&&(r.disable[i]=!0)})}),Object.keys(r.enable).length||delete r.enable,Object.keys(r.disable).length||delete r.disable,r.enable||r.disable?r:null}function m$({dotAll:e,ignoreCase:t}){const r={};return(e||t)&&(r.enable={},e&&(r.enable.dotAll=!0),t&&(r.enable.ignoreCase=!0)),(!e||!t)&&(r.disable={},!e&&(r.disable.dotAll=!0),!t&&(r.disable.ignoreCase=!0)),r}function i_(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function s_(e){const t=e.find(r=>r.kind==="search_start"||b$(r,{negate:!1})||!p$(r));if(!t)return null;if(t.kind==="search_start")return t;if(t.type==="LookaroundAssertion")return t.body[0].body[0];if(t.type==="CapturingGroup"||t.type==="Group"){const r=[];for(const n of t.body){const i=s_(n.body);if(!i)return null;Array.isArray(i)?r.push(...i):r.push(i)}return r}return null}function a_(e,t){const r=i_(e)??[];for(const n of r)if(n===t||a_(n,t))return!0;return!1}function p$({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function g$(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function b$(e,t){const r={negate:null,...t};return e.type==="LookaroundAssertion"&&(r.negate===null||e.negate===r.negate)&&e.body.length===1&&HE(e.body[0],{type:"Assertion",kind:"search_start"})}function Sd(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function qn(e,t){const n=VE(e,{...t,unicodePropertyMap:Pp}).body;return n.length>1||n[0].body.length>1?un({body:n}):n[0].body[0]}function Ad(e,t){return e.negate=t,e}function vi(e,t){return e.parent=t,e}function Tt(e,t){return t_(e),e.parent=t,e}function y$(e,t){const r=QE(t),n=yf(r.target,"ES2024"),i=yf(r.target,"ES2025"),s=r.rules.recursionLimit;if(!Number.isInteger(s)||s<2||s>20)throw new Error("Invalid recursionLimit; use 2-20");let a=null,o=null;if(!i){const f=[e.flags.ignoreCase];Do(e,v$,{getCurrentModI:()=>f.at(-1),popModI(){f.pop()},pushModI(m){f.push(m)},setHasCasedChar(){f.at(-1)?a=!0:o=!0}})}const l={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||a)&&!o)};let u=e;const c={accuracy:r.accuracy,appliedGlobalFlags:l,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:u,originMap:e._originMap,recursionLimit:s,useAppliedIgnoreCase:!!(!i&&a&&o),useFlagMods:i,useFlagV:n,verbose:r.verbose};function d(f){return c.lastNode=u,u=f,Qz(x$[f.type],`Unexpected node type "${f.type}"`)(f,c,d)}const h={pattern:e.body.map(d).join("|"),flags:d(e.flags),options:{...e.options}};return n||(delete h.options.force.v,h.options.disable.v=!0,h.options.unicodeSetsPlugin=null),h._captureTransfers=new Map,h._hiddenCaptures=[],c.captureMap.forEach((f,m)=>{f.hidden&&h._hiddenCaptures.push(m),f.transferTo&&al(h._captureTransfers,f.transferTo,[]).push(m)}),h}var v$={"*":{enter({node:e},t){if(l2(e)){const r=t.getCurrentModI();t.pushModI(e.flags?Ec({ignoreCase:r},e.flags).ignoreCase:r)}},exit({node:e},t){l2(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){Op(Ft(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},r){t(),o_(e,{firstOnly:!0}).length&&r.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&e_.has(e.value)&&t.setHasCasedChar()}},x$={Alternative({body:e},t,r){return e.map(r).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?De`\B`:De`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,r){const{body:n,name:i,number:s}=e,a={ignoreCase:t.currentFlags.ignoreCase},o=t.originMap.get(e);return o&&(a.hidden=!0,s>o.number&&(a.transferTo=o.number)),t.captureMap.set(s,a),`(${i?`?<${i}>`:""}${n.map(r).join("|")})`},Character({value:e},t){const r=Ft(e),n=Xs(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(n!==r)return n;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&Op(r)){const i=JE(r);return t.inCharClass?i.join(""):i.length>1?`[${i.join("")}]`:i[0]}return r},CharacterClass(e,t,r){const{kind:n,negate:i,parent:s}=e;let{body:a}=e;if(n==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");cn.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&a.some(u2)&&(a=[b0(45),...a.filter(u=>!u2(u))]);const o=()=>`[${i?"^":""}${a.map(r).join(n==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||cn.bugNestedClassIgnoresNegation)&&!i){const c=a.filter(d=>d.type==="CharacterClass"&&d.kind==="union"&&d.negate);if(c.length){const d=un(),h=d.body[0];return d.parent=s,h.parent=d,a=a.filter(f=>!c.includes(f)),e.body=a,a.length?(e.parent=h,h.body.push(e)):d.body.pop(),c.forEach(f=>{const m=Rs({body:[f]});f.parent=m,m.parent=d,d.body.push(m)}),r(d)}}t.inCharClass=!0;const u=o();return t.inCharClass=!1,u}const l=a[0];if(n==="union"&&!i&&l&&((!t.useFlagV||!t.verbose)&&s.kind==="union"&&!(cn.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&s.kind==="intersection"&&a.length===1&&l.type!=="CharacterClassRange"))return a.map(r).join("");if(!t.useFlagV&&s.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return o()},CharacterClassRange(e,t){const r=e.min.value,n=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},s=Xs(r,i),a=Xs(n,i),o=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const l=o_(e);k$(l).forEach(c=>{o.add(Array.isArray(c)?`${Xs(c[0],i)}-${Xs(c[1],i)}`:Xs(c,i))})}return`${s}-${a}${[...o].join("")}`},CharacterSet({kind:e,negate:t,value:r,key:n},i){if(e==="dot")return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?".":"[^]":De`[^\n]`;if(e==="digit")return t?De`\D`:De`\d`;if(e==="property"){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&e_.has(r))throw new Error(`Unicode property "${r}" can't be case-insensitive when other chars have specific case`);return`${t?De`\P`:De`\p`}{${n?`${n}=`:""}${r}}`}if(e==="word")return t?De`\W`:De`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:t,flags:r,parent:n},i,s){const a=i.currentFlags;r&&(i.currentFlags=Ec(a,r));const o=t.map(s).join("|"),l=!i.verbose&&t.length===1&&n.type!=="Quantifier"&&!e&&(!i.useFlagMods||!r)?o:`(?${S$(e,r,i.useFlagMods)}${o})`;return i.currentFlags=a,l},LookaroundAssertion({body:e,kind:t,negate:r},n,i){return`(?${`${t==="lookahead"?"":"<"}${r?"!":"="}`}${e.map(i).join("|")})`},Quantifier(e,t,r){return r(e.body)+A$(e)},Subroutine({isRecursive:e,ref:t},r){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const n=r.recursionLimit;return t===0?`(?R=${n})`:De`\g<${t}&R=${n}>`}},E$=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),_$=new Set(["-","\\","]","^","["]),T$=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),o2=new Map([[9,De`\t`],[10,De`\n`],[11,De`\v`],[12,De`\f`],[13,De`\r`],[8232,De`\u2028`],[8233,De`\u2029`],[65279,De`\uFEFF`]]),w$=new RegExp("^\\p{Cased}$","u");function Op(e){return w$.test(e)}function o_(e,t){const r=!!(t!=null&&t.firstOnly),n=e.min.value,i=e.max.value,s=[];if(n<65&&(i===65535||i>=131071)||n===65536&&i>=131071)return s;for(let a=n;a<=i;a++){const o=Ft(a);if(!Op(o))continue;const l=JE(o).filter(u=>{const c=u.codePointAt(0);return c<n||c>i});if(l.length&&(s.push(...l),r))break}return s}function Xs(e,{escDigit:t,inCharClass:r,useFlagV:n}){if(o2.has(e))return o2.get(e);if(e<32||e>126&&e<160||e>262143||t&&C$(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const i=r?n?T$:_$:E$,s=Ft(e);return(i.has(s)?"\\":"")+s}function k$(e){const t=e.map(i=>i.codePointAt(0)).sort((i,s)=>i-s),r=[];let n=null;for(let i=0;i<t.length;i++)t[i+1]===t[i]+1?n??(n=t[i]):n===null?r.push(t[i]):(r.push([n,t[i]]),n=null);return r}function S$(e,t,r){if(e)return">";let n="";if(t&&r){const{enable:i,disable:s}=t;n=(i!=null&&i.ignoreCase?"i":"")+(i!=null&&i.dotAll?"s":"")+(s?"-":"")+(s!=null&&s.ignoreCase?"i":"")+(s!=null&&s.dotAll?"s":"")}return`${n}:`}function A$({kind:e,max:t,min:r}){let n;return!r&&t===1?n="?":!r&&t===1/0?n="*":r===1&&t===1/0?n="+":r===t?n=`{${r}}`:n=`{${r},${t===1/0?"":t}}`,n+{greedy:"",lazy:"?",possessive:"+"}[e]}function l2({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function C$(e){return e>47&&e<58}function u2({type:e,value:t}){return e==="Character"&&t===45}var Si,Kn,Es,Ai,_s,_l,vf,Oi,I$=(Oi=class extends RegExp{constructor(r,n,i){var t=(...bde)=>(super(...bde),Ut(this,_l),Ut(this,Si,new Map),Ut(this,Kn,null),Ut(this,Es),Ut(this,Ai,null),Ut(this,_s,null),G(this,"rawOptions",{}),this);const s=!!(i!=null&&i.lazyCompile);if(r instanceof RegExp){if(i)throw new Error("Cannot provide options when copying a regexp");const a=r;t(a,n),rt(this,Es,a.source),a instanceof Oi&&(rt(this,Si,je(a,Si)),rt(this,Ai,je(a,Ai)),rt(this,_s,je(a,_s)),this.rawOptions=a.rawOptions)}else{const a={hiddenCaptures:[],strategy:null,transfers:[],...i};t(s?"":r,n),rt(this,Es,r),rt(this,Si,R$(a.hiddenCaptures,a.transfers)),rt(this,_s,a.strategy),this.rawOptions=i??{}}s||rt(this,Kn,this)}get source(){return je(this,Es)||"(?:)"}exec(r){if(!je(this,Kn)){const{lazyCompile:s,...a}=this.rawOptions;rt(this,Kn,new Oi(je(this,Es),this.flags,a))}const n=this.global||this.sticky,i=this.lastIndex;if(je(this,_s)==="clip_search"&&n&&i){this.lastIndex=0;const s=Zl(this,_l,vf).call(this,r.slice(i));return s&&(N$(s,i,r,this.hasIndices),this.lastIndex+=i),s}return Zl(this,_l,vf).call(this,r)}},Si=new WeakMap,Kn=new WeakMap,Es=new WeakMap,Ai=new WeakMap,_s=new WeakMap,_l=new WeakSet,vf=function(r){je(this,Kn).lastIndex=this.lastIndex;const n=bg(Oi.prototype,this,"exec").call(je(this,Kn),r);if(this.lastIndex=je(this,Kn).lastIndex,!n||!je(this,Si).size)return n;const i=[...n];n.length=1;let s;this.hasIndices&&(s=[...n.indices],n.indices.length=1);const a=[0];for(let o=1;o<i.length;o++){const{hidden:l,transferTo:u}=je(this,Si).get(o)??{};if(l?a.push(null):(a.push(n.length),n.push(i[o]),this.hasIndices&&n.indices.push(s[o])),u&&i[o]!==void 0){const c=a[u];if(!c)throw new Error(`Invalid capture transfer to "${c}"`);if(n[c]=i[o],this.hasIndices&&(n.indices[c]=s[o]),n.groups){je(this,Ai)||rt(this,Ai,P$(this.source));const d=je(this,Ai).get(u);d&&(n.groups[d]=i[o],this.hasIndices&&(n.indices.groups[d]=s[o]))}}}return n},Oi);function N$(e,t,r,n){if(e.index+=t,e.input=r,n){const i=e.indices;for(let a=0;a<i.length;a++){const o=i[a];o&&(i[a]=[o[0]+t,o[1]+t])}const s=i.groups;s&&Object.keys(s).forEach(a=>{const o=s[a];o&&(s[a]=[o[0]+t,o[1]+t])})}}function R$(e,t){const r=new Map;for(const n of e)r.set(n,{hidden:!0});for(const[n,i]of t)for(const s of i)al(r,s,{}).transferTo=n;return r}function P$(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,r=new Map;let n=0,i=0,s;for(;s=t.exec(e);){const{0:a,groups:{capture:o,name:l}}=s;a==="["?n++:n?a==="]"&&n--:o&&(i++,l&&r.set(i,l))}return r}function O$(e,t){const r=L$(e,t);return r.options?new I$(r.pattern,r.flags,r.options):new RegExp(r.pattern,r.flags)}function L$(e,t){const r=QE(t),n=VE(e,{flags:r.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:r.rules.captureGroup,singleline:r.rules.singleline},skipBackrefValidation:r.rules.allowOrphanBackrefs,unicodePropertyMap:Pp}),i=o$(n,{accuracy:r.accuracy,asciiWordBoundaries:r.rules.asciiWordBoundaries,avoidSubclass:r.avoidSubclass,bestEffortTarget:r.target}),s=y$(i,r),a=Kz(s.pattern,{captureTransfers:s._captureTransfers,hiddenCaptures:s._hiddenCaptures,mode:"external"}),o=Zz(a.pattern),l=Wz(o.pattern,{captureTransfers:a.captureTransfers,hiddenCaptures:a.hiddenCaptures}),u={pattern:l.pattern,flags:`${r.hasIndices?"d":""}${r.global?"g":""}${s.flags}${s.options.disable.v?"u":"v"}`};if(r.avoidSubclass){if(r.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const c=l.hiddenCaptures.sort((m,b)=>m-b),d=Array.from(l.captureTransfers),h=i._strategy,f=u.pattern.length>=r.lazyCompileLength;(c.length||d.length||h||f)&&(u.options={...c.length&&{hiddenCaptures:c},...d.length&&{transfers:d},...h&&{strategy:h},...f&&{lazyCompile:f}})}return u}function D$(e,t){return O$(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function M$(e={}){const t={target:"auto",cache:new Map,...e};return t.regexConstructor||(t.regexConstructor=r=>D$(r,{target:t.target})),{createScanner(r){return new YF(r,t)},createString:XF}}var B$=M$({forgiving:!0}),F$=Object.fromEntries(vp.flatMap(e=>{var t;return((t=e.aliases)!=null?t:[]).map(r=>[r,e.id])})),Mu=new Set(Object.keys(qx)),c2=e=>{let t=e.trim().toLowerCase();return F$[t]||(Mu.has(t),t)},Cd=new Map,z$=3e5,$$=5e3,j$=64,ei=new Map,xf=0,U$=(e,t)=>{let r=t.tokens.length+Math.ceil(e.length/j$);for(let n of t.tokens)r+=n.length;return r},d2=e=>{let t=ei.get(e);return t&&(ei.delete(e),ei.set(e,t)),t==null?void 0:t.result},h2=e=>{let t=ei.get(e);t&&(ei.delete(e),xf-=t.cost)},H$=(e,t)=>{h2(e);let r=U$(e,t);for(ei.set(e,{cost:r,result:t}),xf+=r;(xf>z$||ei.size>$$)&&ei.size>1;)h2(ei.keys().next().value)},Ef=new Map,V$=4,q$=(e,t)=>{let r=Ef.get(e);if(!r)return;let n=r.findIndex(i=>t.startsWith(i.prefix));return n===-1?void 0:r.splice(n,1)[0]},f2=(e,t)=>{let r=Ef.get(e);r||(r=[],Ef.set(e,r)),r.unshift(t),r.length>V$&&r.pop()},m2=(e,t)=>{if(t!==0)for(let r of e)for(let n of r)n.offset+=t},G$=(e,t,r,n,i)=>{let s=q$(r,t),a=s?s.prefix:"",o=s?s.rows:[],l=s==null?void 0:s.grammarState,u=t.lastIndexOf(`
372
- `)+1;if(u>a.length){let d=e.codeToTokens(t.slice(a.length,u),{lang:n,themes:i,grammarState:l}),h=d.tokens;h.pop(),m2(h,a.length),o=o.concat(h),l=d.grammarState,a=t.slice(0,u),f2(r,{grammarState:l,prefix:a,rows:o})}else s&&f2(r,s);let c=e.codeToTokens(t.slice(u),{lang:n,themes:i,grammarState:l});return m2(c.tokens,u),{...c,tokens:o.concat(c.tokens)}},_c=e=>{var t;return typeof e=="string"?e:(t=e.name)!=null?t:"custom"},l_=(e,t)=>`${e}-${_c(t[0])}-${_c(t[1])}`,W$=(e,t,r)=>`${t}:${r[0]}:${r[1]}
373
- ${e}`,Z$=(e,t)=>{let r=l_(e,t);if(Cd.has(r))return Cd.get(r);let n=BE({themes:t,langs:[e],engine:B$});return Cd.set(r,n),n};function Y$(e={}){var t;let r=(t=e.themes)!=null?t:["github-light","github-dark"];return{name:"shiki",type:"code-highlighter",supportsLanguage(n){let i=c2(n);return Mu.has(i)},getSupportedLanguages(){return Array.from(Mu)},getThemes(){return r},highlight({code:n,language:i,themes:s,isIncomplete:a=!1},o){let l=c2(i),u=[_c(s[0]),_c(s[1])],c=Mu.has(l)?l:"text",d=W$(n,c,u);return d2(d)||(Z$(c,s).then(f=>{let m=f.getLoadedLanguages().includes(l)?l:"text",b=d2(d);b||(b=G$(f,n,`${l_(c,s)}:${m}`,m,{light:u[0],dark:u[1]}),a||H$(d,b)),o==null||o(b)}).catch(f=>{console.error("[Streamdown Code] Failed to highlight code:",f)}),null)}}}var K$=Y$();const p2=/[#.]/g;function X$(e,t){const r=e||"",n={};let i=0,s,a;for(;i<r.length;){p2.lastIndex=i;const o=p2.exec(r),l=r.slice(i,o?o.index:r.length);l&&(s?s==="#"?n.id=l:Array.isArray(n.className)?n.className.push(l):n.className=[l]:a=l,i+=l.length),o&&(s=o[0],i++)}return{type:"element",tagName:a||t||"div",properties:n,children:[]}}function u_(e,t,r){const n=r?tj(r):void 0;function i(s,a,...o){let l;if(s==null){l={type:"root",children:[]};const u=a;o.unshift(u)}else{l=X$(s,t);const u=l.tagName.toLowerCase(),c=n?n.get(u):void 0;if(l.tagName=c||u,Q$(a))o.unshift(a);else for(const[d,h]of Object.entries(a))J$(e,l.properties,d,h)}for(const u of o)_f(l.children,u);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return i}function Q$(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,r=Object.keys(e);for(const n of r){const i=t[n];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 e&&Array.isArray(e.children))}function J$(e,t,r,n){const i=Il(e,r);let s;if(n!=null){if(typeof n=="number"){if(Number.isNaN(n))return;s=n}else typeof n=="boolean"?s=n:typeof n=="string"?i.spaceSeparated?s=Mb(n):i.commaSeparated?s=Db(n):i.commaOrSpaceSeparated?s=Mb(Db(n).join(" ")):s=g2(i,i.property,n):Array.isArray(n)?s=[...n]:s=i.property==="style"?ej(n):String(n);if(Array.isArray(s)){const a=[];for(const o of s)a.push(g2(i,i.property,o));s=a}i.property==="className"&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[i.property]=s}}function _f(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const r of t)_f(e,r);else if(typeof t=="object"&&"type"in t)t.type==="root"?_f(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function g2(e,t,r){if(typeof r=="string"){if(e.number&&r&&!Number.isNaN(Number(r)))return Number(r);if((e.boolean||e.overloadedBoolean)&&(r===""||sl(r)===sl(t)))return!0}return r}function ej(e){const t=[];for(const[r,n]of Object.entries(e))t.push([r,n].join(": "));return t.join("; ")}function tj(e){const t=new Map;for(const r of e)t.set(r.toLowerCase(),r);return t}const rj=["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"],c_=u_(Va,"div"),d_=u_(On,"g",rj),An={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/"};function nj(e,t){return h_(e,{})||{type:"root",children:[]}}function h_(e,t){const r=ij(e,t);return r&&t.afterTransform&&t.afterTransform(e,r),r}function ij(e,t){switch(e.nodeType){case 1:return lj(e,t);case 3:return aj(e);case 8:return oj(e);case 9:return b2(e,t);case 10:return sj();case 11:return b2(e,t);default:return}}function b2(e,t){return{type:"root",children:f_(e,t)}}function sj(){return{type:"doctype"}}function aj(e){return{type:"text",value:e.nodeValue||""}}function oj(e){return{type:"comment",value:e.nodeValue||""}}function lj(e,t){const r=e.namespaceURI,n=r===An.svg?d_:c_,i=r===An.html?e.tagName.toLowerCase():e.tagName,s=r===An.html&&i==="template"?e.content:e,a=e.getAttributeNames(),o={};let l=-1;for(;++l<a.length;)o[a[l]]=e.getAttribute(a[l])||"";return n(i,o,f_(s,t))}function f_(e,t){const r=e.childNodes,n=[];let i=-1;for(;++i<r.length;){const s=h_(r[i],t);s!==void 0&&n.push(s)}return n}new DOMParser;function uj(e,t){const r=cj(e);return nj(r)}function cj(e){const t=document.createElement("template");return t.innerHTML=e,t.content}const Rl=(function(e){if(e==null)return mj;if(typeof e=="function")return E0(e);if(typeof e=="object")return Array.isArray(e)?dj(e):hj(e);if(typeof e=="string")return fj(e);throw new Error("Expected function, string, or object as test")});function dj(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=Rl(e[r]);return E0(n);function n(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function hj(e){const t=e;return E0(r);function r(n){const i=n;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function fj(e){return E0(t);function t(r){return r&&r.type===e}}function E0(e){return t;function t(r,n,i){return!!(pj(r)&&e.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}function mj(){return!0}function pj(e){return e!==null&&typeof e=="object"&&"type"in e}const y2=(function(e,t,r){const n=Rl(r);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(n(e.children[t],t,e))return e.children[t]}),$s=(function(e){if(e==null)return yj;if(typeof e=="string")return bj(e);if(typeof e=="object")return gj(e);if(typeof e=="function")return Lp(e);throw new Error("Expected function, string, or array as `test`")});function gj(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=$s(e[r]);return Lp(n);function n(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function bj(e){return Lp(t);function t(r){return r.tagName===e}}function Lp(e){return t;function t(r,n,i){return!!(vj(r)&&e.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}function yj(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function vj(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const v2=/\n/g,x2=/[\t ]+/g,Tf=$s("br"),E2=$s(Aj),xj=$s("p"),_2=$s("tr"),Ej=$s(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",Sj,Cj]),m_=$s(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function _j(e,t){const r=t||{},n="children"in e?e.children:[],i=m_(e),s=b_(e,{whitespace:r.whitespace||"normal"}),a=[];(e.type==="text"||e.type==="comment")&&a.push(...g_(e,{breakBefore:!0,breakAfter:!0}));let o=-1;for(;++o<n.length;)a.push(...p_(n[o],e,{whitespace:s,breakBefore:o?void 0:i,breakAfter:o<n.length-1?Tf(n[o+1]):i}));const l=[];let u;for(o=-1;++o<a.length;){const c=a[o];typeof c=="number"?u!==void 0&&c>u&&(u=c):c&&(u!==void 0&&u>-1&&l.push(`
374
- `.repeat(u)||" "),u=-1,l.push(c))}return l.join("")}function p_(e,t,r){return e.type==="element"?Tj(e,t,r):e.type==="text"?r.whitespace==="normal"?g_(e,r):wj(e):[]}function Tj(e,t,r){const n=b_(e,r),i=e.children||[];let s=-1,a=[];if(Ej(e))return a;let o,l;for(Tf(e)||_2(e)&&y2(t,e,_2)?l=`
375
- `:xj(e)?(o=2,l=2):m_(e)&&(o=1,l=1);++s<i.length;)a=a.concat(p_(i[s],e,{whitespace:n,breakBefore:s?void 0:o,breakAfter:s<i.length-1?Tf(i[s+1]):l}));return E2(e)&&y2(t,e,E2)&&a.push(" "),o&&a.unshift(o),l&&a.push(l),a}function g_(e,t){const r=String(e.value),n=[],i=[];let s=0;for(;s<=r.length;){v2.lastIndex=s;const l=v2.exec(r),u=l&&"index"in l?l.index:r.length;n.push(kj(r.slice(s,u).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),s===0?t.breakBefore:!0,u===r.length?t.breakAfter:!0)),s=u+1}let a=-1,o;for(;++a<n.length;)n[a].charCodeAt(n[a].length-1)===8203||a<n.length-1&&n[a+1].charCodeAt(0)===8203?(i.push(n[a]),o=void 0):n[a]?(typeof o=="number"&&i.push(o),i.push(n[a]),o=0):(a===0||a===n.length-1)&&i.push(0);return i}function wj(e){return[String(e.value)]}function kj(e,t,r){const n=[];let i=0,s;for(;i<e.length;){x2.lastIndex=i;const a=x2.exec(e);s=a?a.index:e.length,!i&&!s&&a&&!t&&n.push(""),i!==s&&n.push(e.slice(i,s)),i=a?s+a[0].length:s}return i!==s&&!r&&n.push(""),n.join(" ")}function b_(e,t){if(e.type==="element"){const r=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return r.wrap?"pre-wrap":"pre";case"td":case"th":return r.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function Sj(e){return!!(e.properties||{}).hidden}function Aj(e){return e.tagName==="td"||e.tagName==="th"}function Cj(e){return e.tagName==="dialog"&&!(e.properties||{}).open}class le extends Error{constructor(t,r){var n="KaTeX parse error: "+t,i,s,a=r&&r.loc;if(a&&a.start<=a.end){var o=a.lexer.input;i=a.start,s=a.end,i===o.length?n+=" at end of input: ":n+=" at position "+(i+1)+": ";var l=o.slice(i,s).replace(/[^]/g,"$&̲"),u;i>15?u="…"+o.slice(i-15,i):u=o.slice(0,i);var c;s+15<o.length?c=o.slice(s,s+15)+"…":c=o.slice(s),n+=u+l+c}super(n),this.name="ParseError",this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,le.prototype),this.position=i,i!=null&&s!=null&&(this.length=s-i),this.rawMessage=t}}var Ij=/([A-Z])/g,Nj=e=>e.replace(Ij,"-$1").toLowerCase(),Rj={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},Pj=/[&><"']/g,rr=e=>String(e).replace(Pj,t=>Rj[t]),Bu=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?Bu(e.body[0]):e:e.type==="font"?Bu(e.body):e,Oj=new Set(["mathord","textord","atom"]),ai=e=>Oj.has(Bu(e).type),Lj=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return t?t[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():"_relative"},wf={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>e==="Infinity"?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function Dj(e){if(typeof e!="string")return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw new Error("Unexpected schema type; settings must declare an explicit default.")}}function Mj(e){if(e.default!==void 0)return e.default;var t=Array.isArray(e.type)?e.type[0]:e.type;return Dj(t)}function Bj(e,t,r,n){var i=r[t];e[t]=i!==void 0?n.processor?n.processor(i):i:Mj(n)}class Dp{constructor(t){t===void 0&&(t={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,t=t||{};for(var r of Object.keys(wf)){var n=wf[r];n&&Bj(this,r,t,n)}}reportNonstrict(t,r,n){var i=this.strict;if(typeof i=="function"&&(i=i(t,r,n)),!(!i||i==="ignore")){if(i===!0||i==="error")throw new le("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+t+"]"),n);i==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+t+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+t+"]"))}}useStrictBehavior(t,r,n){var i=this.strict;if(typeof i=="function")try{i=i(t,r,n)}catch{i="error"}return!i||i==="ignore"?!1:i===!0||i==="error"?!0:i==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+t+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+t+"]")),!1)}isTrusted(t){if("url"in t&&t.url&&!t.protocol){var r=Lj(t.url);if(r==null)return!1;t.protocol=r}var n=typeof this.trust=="function"?this.trust(t):this.trust;return!!n}}class mi{constructor(t,r,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=r,this.cramped=n}sup(){return wn[Fj[this.id]]}sub(){return wn[zj[this.id]]}fracNum(){return wn[$j[this.id]]}fracDen(){return wn[jj[this.id]]}cramp(){return wn[Uj[this.id]]}text(){return wn[Hj[this.id]]}isTight(){return this.size>=2}}var Mp=0,Tc=1,Ea=2,ti=3,ol=4,qr=5,Ra=6,fr=7,wn=[new mi(Mp,0,!1),new mi(Tc,0,!0),new mi(Ea,1,!1),new mi(ti,1,!0),new mi(ol,2,!1),new mi(qr,2,!0),new mi(Ra,3,!1),new mi(fr,3,!0)],Fj=[ol,qr,ol,qr,Ra,fr,Ra,fr],zj=[qr,qr,qr,qr,fr,fr,fr,fr],$j=[Ea,ti,ol,qr,Ra,fr,Ra,fr],jj=[ti,ti,qr,qr,fr,fr,fr,fr],Uj=[Tc,Tc,ti,ti,qr,qr,fr,fr],Hj=[Mp,Tc,Ea,ti,Ea,ti,Ea,ti],Oe={DISPLAY:wn[Mp],TEXT:wn[Ea],SCRIPT:wn[ol],SCRIPTSCRIPT:wn[Ra]},kf=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function Vj(e){for(var t=0;t<kf.length;t++)for(var r=kf[t],n=0;n<r.blocks.length;n++){var i=r.blocks[n];if(e>=i[0]&&e<=i[1])return r.name}return null}var Fu=[];kf.forEach(e=>e.blocks.forEach(t=>Fu.push(...t)));function y_(e){for(var t=0;t<Fu.length;t+=2)if(e>=Fu[t]&&e<=Fu[t+1])return!0;return!1}var Lt=e=>e+" "+e,Qs=80,qj=function(t,r){return"M95,"+(622+t+r)+`
376
- c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
377
- c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
378
- c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
379
- s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
380
- c69,-144,104.5,-217.7,106.5,-221
381
- l`+t/2.075+" -"+t+`
382
- c5.3,-9.3,12,-14,20,-14
383
- H400000v`+(40+t)+`H845.2724
384
- s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
385
- c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
386
- M`+(834+t)+" "+r+"h400000v"+(40+t)+"h-400000z"},Gj=function(t,r){return"M263,"+(601+t+r)+`c0.7,0,18,39.7,52,119
387
- c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
388
- c340,-704.7,510.7,-1060.3,512,-1067
389
- l`+t/2.084+" -"+t+`
390
- c4.7,-7.3,11,-11,19,-11
391
- H40000v`+(40+t)+`H1012.3
392
- s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
393
- c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
394
- s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
395
- c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
396
- M`+(1001+t)+" "+r+"h400000v"+(40+t)+"h-400000z"},Wj=function(t,r){return"M983 "+(10+t+r)+`
397
- l`+t/3.13+" -"+t+`
398
- c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+`
399
- H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
400
- s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
401
- c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
402
- c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
403
- c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
404
- c53.7,-170.3,84.5,-266.8,92.5,-289.5z
405
- M`+(1001+t)+" "+r+"h400000v"+(40+t)+"h-400000z"},Zj=function(t,r){return"M424,"+(2398+t+r)+`
406
- c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
407
- c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
408
- s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
409
- s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
410
- l`+t/4.223+" -"+t+`c4,-6.7,10,-10,18,-10 H400000
411
- v`+(40+t)+`H1014.6
412
- s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
413
- c-2,6,-10,9,-24,9
414
- c-8,0,-12,-0.7,-12,-2z M`+(1001+t)+" "+r+`
415
- h400000v`+(40+t)+"h-400000z"},Yj=function(t,r){return"M473,"+(2713+t+r)+`
416
- c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+`
417
- c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`H1017.7
418
- s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
419
- c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
420
- c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
421
- s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
422
- 606zM`+(1001+t)+" "+r+"h400000v"+(40+t)+"H1017.7z"},Kj=function(t){var r=t/2;return"M400000 "+t+" H0 L"+r+" 0 l65 45 L145 "+(t-80)+" H400000z"},Xj=function(t,r,n){var i=n-54-r-t;return"M702 "+(t+r)+"H400000"+(40+t)+`
423
- H742v`+i+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
424
- h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
425
- c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
426
- 219 661 l218 661zM702 `+r+"H400000v"+(40+t)+"H742z"},Qj=function(t,r,n){r=1e3*r;var i="";switch(t){case"sqrtMain":i=qj(r,Qs);break;case"sqrtSize1":i=Gj(r,Qs);break;case"sqrtSize2":i=Wj(r,Qs);break;case"sqrtSize3":i=Zj(r,Qs);break;case"sqrtSize4":i=Yj(r,Qs);break;case"sqrtTall":i=Xj(r,Qs,n)}return i},Jj=function(t,r){switch(t){case"⎜":return Lt("M291 0 H417 V"+r+" H291z");case"∣":return Lt("M145 0 H188 V"+r+" H145z");case"∥":return Lt("M145 0 H188 V"+r+" H145z")+Lt("M367 0 H410 V"+r+" H367z");case"⎟":return Lt("M457 0 H583 V"+r+" H457z");case"⎢":return Lt("M319 0 H403 V"+r+" H319z");case"⎥":return Lt("M263 0 H347 V"+r+" H263z");case"⎪":return Lt("M384 0 H504 V"+r+" H384z");case"⏐":return Lt("M312 0 H355 V"+r+" H312z");case"‖":return Lt("M257 0 H300 V"+r+" H257z")+Lt("M478 0 H521 V"+r+" H478z");default:return""}},T2={doubleleftarrow:`M262 157
427
- l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
428
- 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
429
- 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
430
- c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
431
- 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
432
- -86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
433
- -2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
434
- m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
435
- -10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
436
- 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
437
- -33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
438
- -17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
439
- -13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
440
- c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
441
- -107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
442
- 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
443
- -5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
444
- c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
445
- 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
446
- 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
447
- l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
448
- -45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
449
- 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
450
- 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
451
- 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
452
- -331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
453
- H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
454
- 435 0h399565z`,leftgroupunder:`M400000 262
455
- H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
456
- 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
457
- -3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
458
- -18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
459
- -196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
460
- 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
461
- -4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
462
- -10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
463
- m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
464
- 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
465
- 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
466
- -152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
467
- 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
468
- -2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
469
- v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
470
- -83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
471
- -68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
472
- 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:Lt("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:Lt("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:Lt("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:Lt("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
473
- -.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
474
- c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
475
- 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:Lt("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:`M200428 334
476
- c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
477
- -53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
478
- 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
479
- 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
480
- c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
481
- 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
482
- 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
483
- -5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
484
- -320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
485
- m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
486
- 60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
487
- -451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
488
- m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
489
- c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
490
- -480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
491
- m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
492
- 85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
493
- -707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
494
- m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
495
- c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
496
- -16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
497
- 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
498
- 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
499
- -40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
500
- -12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
501
- 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
502
- -6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
503
- s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
504
- c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
505
- 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
506
- -174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
507
- 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
508
- 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
509
- -3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
510
- -10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
511
- 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
512
- -18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
513
- 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
514
- m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
515
- 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
516
- -7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
517
- -27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
518
- 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
519
- 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
520
- -64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
521
- m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
522
- 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
523
- -13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
524
- 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:Lt("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:Lt("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:Lt("M399995 440 h-120 V150 H0 v-120 H399995z"),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
525
- 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
526
- -52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
527
- -167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
528
- 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
529
- -70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
530
- -40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
531
- -37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
532
- 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
533
- c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
534
- 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
535
- 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
536
- -19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
537
- 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
538
- -2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
539
- 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
540
- 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
541
- -68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
542
- -8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
543
- 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
544
- c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
545
- 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
546
- -11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
547
- 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
548
- 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
549
- -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
550
- -11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
551
- 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
552
- 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
553
- -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
554
- 3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
555
- 10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
556
- -1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
557
- -7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
558
- H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
559
- c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
560
- c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
561
- -11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
562
- -11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
563
- -11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
564
- -5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
565
- -11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
566
- -11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
567
- -11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
568
- c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
569
- c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
570
- s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
571
- 121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
572
- s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
573
- c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
574
- M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
575
- -27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
576
- 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
577
- -84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
578
- -119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
579
- -12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
580
- 151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
581
- c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
582
- c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
583
- c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
584
- c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
585
- M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
586
- c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
587
- -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
588
- c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
589
- M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
590
- c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
591
- 1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
592
- -152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
593
- M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
594
- c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
595
- -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
596
- c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
597
- M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},eU=function(t,r){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v1759 v84 h347 v-84
598
- H403z M403 1759 V0 H319 V1759 v`+r+" v1759 v84 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v1759 H0 v84 H347z
599
- M347 1759 V0 H263 V1759 v`+r+" v1759 h84z";case"vert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15
600
- c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15
601
- c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+" v585 h43z";case"doublevert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15
602
- c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15
603
- c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+` v585 h43z
604
- M367 15 v585 v`+r+` v585 c2.667,10,9.667,15,21,15
605
- c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15
606
- c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+r+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+r+` v1715 h263 v84 H319z
607
- MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+r+` v1799 H0 v-84 H319z
608
- MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v602 h84z
609
- M403 1759 V0 H319 V1759 v`+r+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v602 h84z
610
- M347 1759 V0 h-84 V1759 v`+r+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
611
- c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
612
- -36,557 l0,`+(r+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
613
- 949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
614
- c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
615
- -544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
616
- l0,-`+(r+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
617
- -210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
618
- 63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
619
- c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(r+9)+`
620
- c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
621
- c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
622
- c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
623
- c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
624
- l0,-`+(r+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
625
- -470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};function tU(e){return"toText"in e}class Wa{constructor(t){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return this.classes.includes(t)}toNode(){for(var t=document.createDocumentFragment(),r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t}toMarkup(){for(var t="",r=0;r<this.children.length;r++)t+=this.children[r].toMarkup();return t}toText(){return this.children.map(t=>{if(tU(t))return t.toText();throw new Error("Expected MathDomNode with toText, got "+t.constructor.name)}).join("")}}var Sf={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},rU={ex:!0,em:!0,mu:!0},v_=function(t){return typeof t!="string"&&(t=t.unit),t in Sf||t in rU||t==="ex"},xt=function(t,r){var n;if(t.unit in Sf)n=Sf[t.unit]/r.fontMetrics().ptPerEm/r.sizeMultiplier;else if(t.unit==="mu")n=r.fontMetrics().cssEmPerMu;else{var i;if(r.style.isTight()?i=r.havingStyle(r.style.text()):i=r,t.unit==="ex")n=i.fontMetrics().xHeight;else if(t.unit==="em")n=i.fontMetrics().quad;else throw new le("Invalid unit: '"+t.unit+"'");i!==r&&(n*=i.sizeMultiplier/r.sizeMultiplier)}return Math.min(t.number*n,r.maxSize)},he=function(t){return+t.toFixed(4)+"em"},Bi=function(t){return t.filter(r=>r).join(" ")},Bp=function(t){var r="";for(var n of Object.keys(t)){var i=t[n];i!==void 0&&(r+=Nj(n)+":"+i+";")}return r},x_=function(t,r,n){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},r){r.style.isTight()&&this.classes.push("mtight");var i=r.getColor();i&&(this.style.color=i)}},E_=function(t){var r=document.createElement(t);r.className=Bi(this.classes),Object.assign(r.style,this.style);for(var n of Object.keys(this.attributes))r.setAttribute(n,this.attributes[n]);for(var i=0;i<this.children.length;i++)r.appendChild(this.children[i].toNode());return r},nU=/[\s"'>/=\x00-\x1f]/,__=function(t){var r="<"+t;this.classes.length&&(r+=' class="'+rr(Bi(this.classes))+'"');var n=Bp(this.style);n&&(r+=' style="'+rr(n)+'"');for(var i of Object.keys(this.attributes)){if(nU.test(i))throw new le("Invalid attribute name '"+i+"'");r+=" "+i+'="'+rr(this.attributes[i])+'"'}r+=">";for(var s=0;s<this.children.length;s++)r+=this.children[s].toMarkup();return r+="</"+t+">",r};class Za{constructor(t,r,n,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,x_.call(this,t,n,i),this.children=r||[]}setAttribute(t,r){this.attributes[t]=r}hasClass(t){return this.classes.includes(t)}toNode(){return E_.call(this,"span")}toMarkup(){return __.call(this,"span")}}class _0{constructor(t,r,n,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,x_.call(this,r,i),this.children=n||[],this.setAttribute("href",t)}setAttribute(t,r){this.attributes[t]=r}hasClass(t){return this.classes.includes(t)}toNode(){return E_.call(this,"a")}toMarkup(){return __.call(this,"a")}}class iU{constructor(t,r,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=r,this.src=t,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createElement("img");return t.src=this.src,t.alt=this.alt,t.className="mord",Object.assign(t.style,this.style),t}toMarkup(){var t='<img src="'+rr(this.src)+'"'+(' alt="'+rr(this.alt)+'"'),r=Bp(this.style);return r&&(t+=' style="'+rr(r)+'"'),t+="'/>",t}}var sU={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class Pr{constructor(t,r,n,i,s,a,o,l){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=t,this.height=r||0,this.depth=n||0,this.italic=i||0,this.skew=s||0,this.width=a||0,this.classes=o||[],this.style=l||{},this.maxFontSize=0;var u=Vj(this.text.charCodeAt(0));u&&this.classes.push(u+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=sU[this.text])}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createTextNode(this.text),r=null;return this.italic>0&&(r=document.createElement("span"),r.style.marginRight=he(this.italic)),this.classes.length>0&&(r=r||document.createElement("span"),r.className=Bi(this.classes)),Object.keys(this.style).length>0&&(r=r||document.createElement("span"),Object.assign(r.style,this.style)),r?(r.appendChild(t),r):t}toMarkup(){var t=!1,r="<span";this.classes.length&&(t=!0,r+=' class="',r+=rr(Bi(this.classes)),r+='"');var n="";this.italic>0&&(n+="margin-right:"+he(this.italic)+";"),n+=Bp(this.style),n&&(t=!0,r+=' style="'+rr(n)+'"');var i=rr(this.text);return t?(r+=">",r+=i,r+="</span>",r):i}}class ni{constructor(t,r){this.children=void 0,this.attributes=void 0,this.children=t||[],this.attributes=r||{}}toNode(){var t="http://www.w3.org/2000/svg",r=document.createElementNS(t,"svg");for(var n of Object.keys(this.attributes))r.setAttribute(n,this.attributes[n]);for(var i=0;i<this.children.length;i++)r.appendChild(this.children[i].toNode());return r}toMarkup(){var t='<svg xmlns="http://www.w3.org/2000/svg"';for(var r of Object.keys(this.attributes))t+=" "+r+'="'+rr(this.attributes[r])+'"';t+=">";for(var n=0;n<this.children.length;n++)t+=this.children[n].toMarkup();return t+="</svg>",t}}class Fi{constructor(t,r){this.pathName=void 0,this.alternate=void 0,this.pathName=t,this.alternate=r}toNode(){var t="http://www.w3.org/2000/svg",r=document.createElementNS(t,"path");return this.alternate?r.setAttribute("d",this.alternate):r.setAttribute("d",T2[this.pathName]),r}toMarkup(){return this.alternate?'<path d="'+rr(this.alternate)+'"/>':'<path d="'+rr(T2[this.pathName])+'"/>'}}class Af{constructor(t){this.attributes=void 0,this.attributes=t||{}}toNode(){var t="http://www.w3.org/2000/svg",r=document.createElementNS(t,"line");for(var n of Object.keys(this.attributes))r.setAttribute(n,this.attributes[n]);return r}toMarkup(){var t="<line";for(var r of Object.keys(this.attributes))t+=" "+r+'="'+rr(this.attributes[r])+'"';return t+="/>",t}}function aU(e){if(e instanceof Pr)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}function oU(e){if(e instanceof Za)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}var lU=e=>e instanceof Za||e instanceof _0||e instanceof Wa,Cn={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},cu={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},w2={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function uU(e,t){Cn[e]=t}function Fp(e,t,r){if(!Cn[t])throw new Error("Font metrics not found for font: "+t+".");var n=e.charCodeAt(0),i=Cn[t][n];if(!i&&e[0]in w2&&(n=w2[e[0]].charCodeAt(0),i=Cn[t][n]),!i&&r==="text"&&y_(n)&&(i=Cn[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var Id={};function cU(e){var t;if(e>=5?t=0:e>=3?t=1:t=2,!Id[t]){var r=Id[t]={cssEmPerMu:cu.quad[t]/18};for(var n in cu)cu.hasOwnProperty(n)&&(r[n]=cu[n][t])}return Id[t]}var gt={math:{},text:{}};function g(e,t,r,n,i,s){gt[e][i]={font:t,group:r,replace:n},s&&n&&(gt[e][n]=gt[e][i])}var T="math",ee="text",C="main",F="ams",yt="accent-token",ge="bin",gr="close",Ya="inner",Ce="mathord",Nt="op-token",Lr="open",Pl="punct",$="rel",oi="spacing",H="textord";g(T,C,$,"≡","\\equiv",!0);g(T,C,$,"≺","\\prec",!0);g(T,C,$,"≻","\\succ",!0);g(T,C,$,"∼","\\sim",!0);g(T,C,$,"⊥","\\perp");g(T,C,$,"⪯","\\preceq",!0);g(T,C,$,"⪰","\\succeq",!0);g(T,C,$,"≃","\\simeq",!0);g(T,C,$,"∣","\\mid",!0);g(T,C,$,"≪","\\ll",!0);g(T,C,$,"≫","\\gg",!0);g(T,C,$,"≍","\\asymp",!0);g(T,C,$,"∥","\\parallel");g(T,C,$,"⋈","\\bowtie",!0);g(T,C,$,"⌣","\\smile",!0);g(T,C,$,"⊑","\\sqsubseteq",!0);g(T,C,$,"⊒","\\sqsupseteq",!0);g(T,C,$,"≐","\\doteq",!0);g(T,C,$,"⌢","\\frown",!0);g(T,C,$,"∋","\\ni",!0);g(T,C,$,"∝","\\propto",!0);g(T,C,$,"⊢","\\vdash",!0);g(T,C,$,"⊣","\\dashv",!0);g(T,C,$,"∋","\\owns");g(T,C,Pl,".","\\ldotp");g(T,C,Pl,"⋅","\\cdotp");g(T,C,Pl,"⋅","·");g(ee,C,H,"⋅","·");g(T,C,H,"#","\\#");g(ee,C,H,"#","\\#");g(T,C,H,"&","\\&");g(ee,C,H,"&","\\&");g(T,C,H,"ℵ","\\aleph",!0);g(T,C,H,"∀","\\forall",!0);g(T,C,H,"ℏ","\\hbar",!0);g(T,C,H,"∃","\\exists",!0);g(T,C,H,"∇","\\nabla",!0);g(T,C,H,"♭","\\flat",!0);g(T,C,H,"ℓ","\\ell",!0);g(T,C,H,"♮","\\natural",!0);g(T,C,H,"♣","\\clubsuit",!0);g(T,C,H,"℘","\\wp",!0);g(T,C,H,"♯","\\sharp",!0);g(T,C,H,"♢","\\diamondsuit",!0);g(T,C,H,"ℜ","\\Re",!0);g(T,C,H,"♡","\\heartsuit",!0);g(T,C,H,"ℑ","\\Im",!0);g(T,C,H,"♠","\\spadesuit",!0);g(T,C,H,"§","\\S",!0);g(ee,C,H,"§","\\S");g(T,C,H,"¶","\\P",!0);g(ee,C,H,"¶","\\P");g(T,C,H,"†","\\dag");g(ee,C,H,"†","\\dag");g(ee,C,H,"†","\\textdagger");g(T,C,H,"‡","\\ddag");g(ee,C,H,"‡","\\ddag");g(ee,C,H,"‡","\\textdaggerdbl");g(T,C,gr,"⎱","\\rmoustache",!0);g(T,C,Lr,"⎰","\\lmoustache",!0);g(T,C,gr,"⟯","\\rgroup",!0);g(T,C,Lr,"⟮","\\lgroup",!0);g(T,C,ge,"∓","\\mp",!0);g(T,C,ge,"⊖","\\ominus",!0);g(T,C,ge,"⊎","\\uplus",!0);g(T,C,ge,"⊓","\\sqcap",!0);g(T,C,ge,"∗","\\ast");g(T,C,ge,"⊔","\\sqcup",!0);g(T,C,ge,"◯","\\bigcirc",!0);g(T,C,ge,"∙","\\bullet",!0);g(T,C,ge,"‡","\\ddagger");g(T,C,ge,"≀","\\wr",!0);g(T,C,ge,"⨿","\\amalg");g(T,C,ge,"&","\\And");g(T,C,$,"⟵","\\longleftarrow",!0);g(T,C,$,"⇐","\\Leftarrow",!0);g(T,C,$,"⟸","\\Longleftarrow",!0);g(T,C,$,"⟶","\\longrightarrow",!0);g(T,C,$,"⇒","\\Rightarrow",!0);g(T,C,$,"⟹","\\Longrightarrow",!0);g(T,C,$,"↔","\\leftrightarrow",!0);g(T,C,$,"⟷","\\longleftrightarrow",!0);g(T,C,$,"⇔","\\Leftrightarrow",!0);g(T,C,$,"⟺","\\Longleftrightarrow",!0);g(T,C,$,"↦","\\mapsto",!0);g(T,C,$,"⟼","\\longmapsto",!0);g(T,C,$,"↗","\\nearrow",!0);g(T,C,$,"↩","\\hookleftarrow",!0);g(T,C,$,"↪","\\hookrightarrow",!0);g(T,C,$,"↘","\\searrow",!0);g(T,C,$,"↼","\\leftharpoonup",!0);g(T,C,$,"⇀","\\rightharpoonup",!0);g(T,C,$,"↙","\\swarrow",!0);g(T,C,$,"↽","\\leftharpoondown",!0);g(T,C,$,"⇁","\\rightharpoondown",!0);g(T,C,$,"↖","\\nwarrow",!0);g(T,C,$,"⇌","\\rightleftharpoons",!0);g(T,F,$,"≮","\\nless",!0);g(T,F,$,"","\\@nleqslant");g(T,F,$,"","\\@nleqq");g(T,F,$,"⪇","\\lneq",!0);g(T,F,$,"≨","\\lneqq",!0);g(T,F,$,"","\\@lvertneqq");g(T,F,$,"⋦","\\lnsim",!0);g(T,F,$,"⪉","\\lnapprox",!0);g(T,F,$,"⊀","\\nprec",!0);g(T,F,$,"⋠","\\npreceq",!0);g(T,F,$,"⋨","\\precnsim",!0);g(T,F,$,"⪹","\\precnapprox",!0);g(T,F,$,"≁","\\nsim",!0);g(T,F,$,"","\\@nshortmid");g(T,F,$,"∤","\\nmid",!0);g(T,F,$,"⊬","\\nvdash",!0);g(T,F,$,"⊭","\\nvDash",!0);g(T,F,$,"⋪","\\ntriangleleft");g(T,F,$,"⋬","\\ntrianglelefteq",!0);g(T,F,$,"⊊","\\subsetneq",!0);g(T,F,$,"","\\@varsubsetneq");g(T,F,$,"⫋","\\subsetneqq",!0);g(T,F,$,"","\\@varsubsetneqq");g(T,F,$,"≯","\\ngtr",!0);g(T,F,$,"","\\@ngeqslant");g(T,F,$,"","\\@ngeqq");g(T,F,$,"⪈","\\gneq",!0);g(T,F,$,"≩","\\gneqq",!0);g(T,F,$,"","\\@gvertneqq");g(T,F,$,"⋧","\\gnsim",!0);g(T,F,$,"⪊","\\gnapprox",!0);g(T,F,$,"⊁","\\nsucc",!0);g(T,F,$,"⋡","\\nsucceq",!0);g(T,F,$,"⋩","\\succnsim",!0);g(T,F,$,"⪺","\\succnapprox",!0);g(T,F,$,"≆","\\ncong",!0);g(T,F,$,"","\\@nshortparallel");g(T,F,$,"∦","\\nparallel",!0);g(T,F,$,"⊯","\\nVDash",!0);g(T,F,$,"⋫","\\ntriangleright");g(T,F,$,"⋭","\\ntrianglerighteq",!0);g(T,F,$,"","\\@nsupseteqq");g(T,F,$,"⊋","\\supsetneq",!0);g(T,F,$,"","\\@varsupsetneq");g(T,F,$,"⫌","\\supsetneqq",!0);g(T,F,$,"","\\@varsupsetneqq");g(T,F,$,"⊮","\\nVdash",!0);g(T,F,$,"⪵","\\precneqq",!0);g(T,F,$,"⪶","\\succneqq",!0);g(T,F,$,"","\\@nsubseteqq");g(T,F,ge,"⊴","\\unlhd");g(T,F,ge,"⊵","\\unrhd");g(T,F,$,"↚","\\nleftarrow",!0);g(T,F,$,"↛","\\nrightarrow",!0);g(T,F,$,"⇍","\\nLeftarrow",!0);g(T,F,$,"⇏","\\nRightarrow",!0);g(T,F,$,"↮","\\nleftrightarrow",!0);g(T,F,$,"⇎","\\nLeftrightarrow",!0);g(T,F,$,"△","\\vartriangle");g(T,F,H,"ℏ","\\hslash");g(T,F,H,"▽","\\triangledown");g(T,F,H,"◊","\\lozenge");g(T,F,H,"Ⓢ","\\circledS");g(T,F,H,"®","\\circledR");g(ee,F,H,"®","\\circledR");g(T,F,H,"∡","\\measuredangle",!0);g(T,F,H,"∄","\\nexists");g(T,F,H,"℧","\\mho");g(T,F,H,"Ⅎ","\\Finv",!0);g(T,F,H,"⅁","\\Game",!0);g(T,F,H,"‵","\\backprime");g(T,F,H,"▲","\\blacktriangle");g(T,F,H,"▼","\\blacktriangledown");g(T,F,H,"■","\\blacksquare");g(T,F,H,"⧫","\\blacklozenge");g(T,F,H,"★","\\bigstar");g(T,F,H,"∢","\\sphericalangle",!0);g(T,F,H,"∁","\\complement",!0);g(T,F,H,"ð","\\eth",!0);g(ee,C,H,"ð","ð");g(T,F,H,"╱","\\diagup");g(T,F,H,"╲","\\diagdown");g(T,F,H,"□","\\square");g(T,F,H,"□","\\Box");g(T,F,H,"◊","\\Diamond");g(T,F,H,"¥","\\yen",!0);g(ee,F,H,"¥","\\yen",!0);g(T,F,H,"✓","\\checkmark",!0);g(ee,F,H,"✓","\\checkmark");g(T,F,H,"ℶ","\\beth",!0);g(T,F,H,"ℸ","\\daleth",!0);g(T,F,H,"ℷ","\\gimel",!0);g(T,F,H,"ϝ","\\digamma",!0);g(T,F,H,"ϰ","\\varkappa");g(T,F,Lr,"┌","\\@ulcorner",!0);g(T,F,gr,"┐","\\@urcorner",!0);g(T,F,Lr,"└","\\@llcorner",!0);g(T,F,gr,"┘","\\@lrcorner",!0);g(T,F,$,"≦","\\leqq",!0);g(T,F,$,"⩽","\\leqslant",!0);g(T,F,$,"⪕","\\eqslantless",!0);g(T,F,$,"≲","\\lesssim",!0);g(T,F,$,"⪅","\\lessapprox",!0);g(T,F,$,"≊","\\approxeq",!0);g(T,F,ge,"⋖","\\lessdot");g(T,F,$,"⋘","\\lll",!0);g(T,F,$,"≶","\\lessgtr",!0);g(T,F,$,"⋚","\\lesseqgtr",!0);g(T,F,$,"⪋","\\lesseqqgtr",!0);g(T,F,$,"≑","\\doteqdot");g(T,F,$,"≓","\\risingdotseq",!0);g(T,F,$,"≒","\\fallingdotseq",!0);g(T,F,$,"∽","\\backsim",!0);g(T,F,$,"⋍","\\backsimeq",!0);g(T,F,$,"⫅","\\subseteqq",!0);g(T,F,$,"⋐","\\Subset",!0);g(T,F,$,"⊏","\\sqsubset",!0);g(T,F,$,"≼","\\preccurlyeq",!0);g(T,F,$,"⋞","\\curlyeqprec",!0);g(T,F,$,"≾","\\precsim",!0);g(T,F,$,"⪷","\\precapprox",!0);g(T,F,$,"⊲","\\vartriangleleft");g(T,F,$,"⊴","\\trianglelefteq");g(T,F,$,"⊨","\\vDash",!0);g(T,F,$,"⊪","\\Vvdash",!0);g(T,F,$,"⌣","\\smallsmile");g(T,F,$,"⌢","\\smallfrown");g(T,F,$,"≏","\\bumpeq",!0);g(T,F,$,"≎","\\Bumpeq",!0);g(T,F,$,"≧","\\geqq",!0);g(T,F,$,"⩾","\\geqslant",!0);g(T,F,$,"⪖","\\eqslantgtr",!0);g(T,F,$,"≳","\\gtrsim",!0);g(T,F,$,"⪆","\\gtrapprox",!0);g(T,F,ge,"⋗","\\gtrdot");g(T,F,$,"⋙","\\ggg",!0);g(T,F,$,"≷","\\gtrless",!0);g(T,F,$,"⋛","\\gtreqless",!0);g(T,F,$,"⪌","\\gtreqqless",!0);g(T,F,$,"≖","\\eqcirc",!0);g(T,F,$,"≗","\\circeq",!0);g(T,F,$,"≜","\\triangleq",!0);g(T,F,$,"∼","\\thicksim");g(T,F,$,"≈","\\thickapprox");g(T,F,$,"⫆","\\supseteqq",!0);g(T,F,$,"⋑","\\Supset",!0);g(T,F,$,"⊐","\\sqsupset",!0);g(T,F,$,"≽","\\succcurlyeq",!0);g(T,F,$,"⋟","\\curlyeqsucc",!0);g(T,F,$,"≿","\\succsim",!0);g(T,F,$,"⪸","\\succapprox",!0);g(T,F,$,"⊳","\\vartriangleright");g(T,F,$,"⊵","\\trianglerighteq");g(T,F,$,"⊩","\\Vdash",!0);g(T,F,$,"∣","\\shortmid");g(T,F,$,"∥","\\shortparallel");g(T,F,$,"≬","\\between",!0);g(T,F,$,"⋔","\\pitchfork",!0);g(T,F,$,"∝","\\varpropto");g(T,F,$,"◀","\\blacktriangleleft");g(T,F,$,"∴","\\therefore",!0);g(T,F,$,"∍","\\backepsilon");g(T,F,$,"▶","\\blacktriangleright");g(T,F,$,"∵","\\because",!0);g(T,F,$,"⋘","\\llless");g(T,F,$,"⋙","\\gggtr");g(T,F,ge,"⊲","\\lhd");g(T,F,ge,"⊳","\\rhd");g(T,F,$,"≂","\\eqsim",!0);g(T,C,$,"⋈","\\Join");g(T,F,$,"≑","\\Doteq",!0);g(T,F,ge,"∔","\\dotplus",!0);g(T,F,ge,"∖","\\smallsetminus");g(T,F,ge,"⋒","\\Cap",!0);g(T,F,ge,"⋓","\\Cup",!0);g(T,F,ge,"⩞","\\doublebarwedge",!0);g(T,F,ge,"⊟","\\boxminus",!0);g(T,F,ge,"⊞","\\boxplus",!0);g(T,F,ge,"⋇","\\divideontimes",!0);g(T,F,ge,"⋉","\\ltimes",!0);g(T,F,ge,"⋊","\\rtimes",!0);g(T,F,ge,"⋋","\\leftthreetimes",!0);g(T,F,ge,"⋌","\\rightthreetimes",!0);g(T,F,ge,"⋏","\\curlywedge",!0);g(T,F,ge,"⋎","\\curlyvee",!0);g(T,F,ge,"⊝","\\circleddash",!0);g(T,F,ge,"⊛","\\circledast",!0);g(T,F,ge,"⋅","\\centerdot");g(T,F,ge,"⊺","\\intercal",!0);g(T,F,ge,"⋒","\\doublecap");g(T,F,ge,"⋓","\\doublecup");g(T,F,ge,"⊠","\\boxtimes",!0);g(T,F,$,"⇢","\\dashrightarrow",!0);g(T,F,$,"⇠","\\dashleftarrow",!0);g(T,F,$,"⇇","\\leftleftarrows",!0);g(T,F,$,"⇆","\\leftrightarrows",!0);g(T,F,$,"⇚","\\Lleftarrow",!0);g(T,F,$,"↞","\\twoheadleftarrow",!0);g(T,F,$,"↢","\\leftarrowtail",!0);g(T,F,$,"↫","\\looparrowleft",!0);g(T,F,$,"⇋","\\leftrightharpoons",!0);g(T,F,$,"↶","\\curvearrowleft",!0);g(T,F,$,"↺","\\circlearrowleft",!0);g(T,F,$,"↰","\\Lsh",!0);g(T,F,$,"⇈","\\upuparrows",!0);g(T,F,$,"↿","\\upharpoonleft",!0);g(T,F,$,"⇃","\\downharpoonleft",!0);g(T,C,$,"⊶","\\origof",!0);g(T,C,$,"⊷","\\imageof",!0);g(T,F,$,"⊸","\\multimap",!0);g(T,F,$,"↭","\\leftrightsquigarrow",!0);g(T,F,$,"⇉","\\rightrightarrows",!0);g(T,F,$,"⇄","\\rightleftarrows",!0);g(T,F,$,"↠","\\twoheadrightarrow",!0);g(T,F,$,"↣","\\rightarrowtail",!0);g(T,F,$,"↬","\\looparrowright",!0);g(T,F,$,"↷","\\curvearrowright",!0);g(T,F,$,"↻","\\circlearrowright",!0);g(T,F,$,"↱","\\Rsh",!0);g(T,F,$,"⇊","\\downdownarrows",!0);g(T,F,$,"↾","\\upharpoonright",!0);g(T,F,$,"⇂","\\downharpoonright",!0);g(T,F,$,"⇝","\\rightsquigarrow",!0);g(T,F,$,"⇝","\\leadsto");g(T,F,$,"⇛","\\Rrightarrow",!0);g(T,F,$,"↾","\\restriction");g(T,C,H,"‘","`");g(T,C,H,"$","\\$");g(ee,C,H,"$","\\$");g(ee,C,H,"$","\\textdollar");g(T,C,H,"%","\\%");g(ee,C,H,"%","\\%");g(T,C,H,"_","\\_");g(ee,C,H,"_","\\_");g(ee,C,H,"_","\\textunderscore");g(T,C,H,"∠","\\angle",!0);g(T,C,H,"∞","\\infty",!0);g(T,C,H,"′","\\prime");g(T,C,H,"△","\\triangle");g(T,C,H,"Γ","\\Gamma",!0);g(T,C,H,"Δ","\\Delta",!0);g(T,C,H,"Θ","\\Theta",!0);g(T,C,H,"Λ","\\Lambda",!0);g(T,C,H,"Ξ","\\Xi",!0);g(T,C,H,"Π","\\Pi",!0);g(T,C,H,"Σ","\\Sigma",!0);g(T,C,H,"Υ","\\Upsilon",!0);g(T,C,H,"Φ","\\Phi",!0);g(T,C,H,"Ψ","\\Psi",!0);g(T,C,H,"Ω","\\Omega",!0);g(T,C,H,"A","Α");g(T,C,H,"B","Β");g(T,C,H,"E","Ε");g(T,C,H,"Z","Ζ");g(T,C,H,"H","Η");g(T,C,H,"I","Ι");g(T,C,H,"K","Κ");g(T,C,H,"M","Μ");g(T,C,H,"N","Ν");g(T,C,H,"O","Ο");g(T,C,H,"P","Ρ");g(T,C,H,"T","Τ");g(T,C,H,"X","Χ");g(T,C,H,"¬","\\neg",!0);g(T,C,H,"¬","\\lnot");g(T,C,H,"⊤","\\top");g(T,C,H,"⊥","\\bot");g(T,C,H,"∅","\\emptyset");g(T,F,H,"∅","\\varnothing");g(T,C,Ce,"α","\\alpha",!0);g(T,C,Ce,"β","\\beta",!0);g(T,C,Ce,"γ","\\gamma",!0);g(T,C,Ce,"δ","\\delta",!0);g(T,C,Ce,"ϵ","\\epsilon",!0);g(T,C,Ce,"ζ","\\zeta",!0);g(T,C,Ce,"η","\\eta",!0);g(T,C,Ce,"θ","\\theta",!0);g(T,C,Ce,"ι","\\iota",!0);g(T,C,Ce,"κ","\\kappa",!0);g(T,C,Ce,"λ","\\lambda",!0);g(T,C,Ce,"μ","\\mu",!0);g(T,C,Ce,"ν","\\nu",!0);g(T,C,Ce,"ξ","\\xi",!0);g(T,C,Ce,"ο","\\omicron",!0);g(T,C,Ce,"π","\\pi",!0);g(T,C,Ce,"ρ","\\rho",!0);g(T,C,Ce,"σ","\\sigma",!0);g(T,C,Ce,"τ","\\tau",!0);g(T,C,Ce,"υ","\\upsilon",!0);g(T,C,Ce,"ϕ","\\phi",!0);g(T,C,Ce,"χ","\\chi",!0);g(T,C,Ce,"ψ","\\psi",!0);g(T,C,Ce,"ω","\\omega",!0);g(T,C,Ce,"ε","\\varepsilon",!0);g(T,C,Ce,"ϑ","\\vartheta",!0);g(T,C,Ce,"ϖ","\\varpi",!0);g(T,C,Ce,"ϱ","\\varrho",!0);g(T,C,Ce,"ς","\\varsigma",!0);g(T,C,Ce,"φ","\\varphi",!0);g(T,C,ge,"∗","*",!0);g(T,C,ge,"+","+");g(T,C,ge,"−","-",!0);g(T,C,ge,"⋅","\\cdot",!0);g(T,C,ge,"∘","\\circ",!0);g(T,C,ge,"÷","\\div",!0);g(T,C,ge,"±","\\pm",!0);g(T,C,ge,"×","\\times",!0);g(T,C,ge,"∩","\\cap",!0);g(T,C,ge,"∪","\\cup",!0);g(T,C,ge,"∖","\\setminus",!0);g(T,C,ge,"∧","\\land");g(T,C,ge,"∨","\\lor");g(T,C,ge,"∧","\\wedge",!0);g(T,C,ge,"∨","\\vee",!0);g(T,C,H,"√","\\surd");g(T,C,Lr,"⟨","\\langle",!0);g(T,C,Lr,"∣","\\lvert");g(T,C,Lr,"∥","\\lVert");g(T,C,gr,"?","?");g(T,C,gr,"!","!");g(T,C,gr,"⟩","\\rangle",!0);g(T,C,gr,"∣","\\rvert");g(T,C,gr,"∥","\\rVert");g(T,C,$,"=","=");g(T,C,$,":",":");g(T,C,$,"≈","\\approx",!0);g(T,C,$,"≅","\\cong",!0);g(T,C,$,"≥","\\ge");g(T,C,$,"≥","\\geq",!0);g(T,C,$,"←","\\gets");g(T,C,$,">","\\gt",!0);g(T,C,$,"∈","\\in",!0);g(T,C,$,"","\\@not");g(T,C,$,"⊂","\\subset",!0);g(T,C,$,"⊃","\\supset",!0);g(T,C,$,"⊆","\\subseteq",!0);g(T,C,$,"⊇","\\supseteq",!0);g(T,F,$,"⊈","\\nsubseteq",!0);g(T,F,$,"⊉","\\nsupseteq",!0);g(T,C,$,"⊨","\\models");g(T,C,$,"←","\\leftarrow",!0);g(T,C,$,"≤","\\le");g(T,C,$,"≤","\\leq",!0);g(T,C,$,"<","\\lt",!0);g(T,C,$,"→","\\rightarrow",!0);g(T,C,$,"→","\\to");g(T,F,$,"≱","\\ngeq",!0);g(T,F,$,"≰","\\nleq",!0);g(T,C,oi," ","\\ ");g(T,C,oi," ","\\space");g(T,C,oi," ","\\nobreakspace");g(ee,C,oi," ","\\ ");g(ee,C,oi," "," ");g(ee,C,oi," ","\\space");g(ee,C,oi," ","\\nobreakspace");g(T,C,oi,"","\\nobreak");g(T,C,oi,"","\\allowbreak");g(T,C,Pl,",",",");g(T,C,Pl,";",";");g(T,F,ge,"⊼","\\barwedge",!0);g(T,F,ge,"⊻","\\veebar",!0);g(T,C,ge,"⊙","\\odot",!0);g(T,C,ge,"⊕","\\oplus",!0);g(T,C,ge,"⊗","\\otimes",!0);g(T,C,H,"∂","\\partial",!0);g(T,C,ge,"⊘","\\oslash",!0);g(T,F,ge,"⊚","\\circledcirc",!0);g(T,F,ge,"⊡","\\boxdot",!0);g(T,C,ge,"△","\\bigtriangleup");g(T,C,ge,"▽","\\bigtriangledown");g(T,C,ge,"†","\\dagger");g(T,C,ge,"⋄","\\diamond");g(T,C,ge,"⋆","\\star");g(T,C,ge,"◃","\\triangleleft");g(T,C,ge,"▹","\\triangleright");g(T,C,Lr,"{","\\{");g(ee,C,H,"{","\\{");g(ee,C,H,"{","\\textbraceleft");g(T,C,gr,"}","\\}");g(ee,C,H,"}","\\}");g(ee,C,H,"}","\\textbraceright");g(T,C,Lr,"{","\\lbrace");g(T,C,gr,"}","\\rbrace");g(T,C,Lr,"[","\\lbrack",!0);g(ee,C,H,"[","\\lbrack",!0);g(T,C,gr,"]","\\rbrack",!0);g(ee,C,H,"]","\\rbrack",!0);g(T,C,Lr,"(","\\lparen",!0);g(T,C,gr,")","\\rparen",!0);g(ee,C,H,"<","\\textless",!0);g(ee,C,H,">","\\textgreater",!0);g(T,C,Lr,"⌊","\\lfloor",!0);g(T,C,gr,"⌋","\\rfloor",!0);g(T,C,Lr,"⌈","\\lceil",!0);g(T,C,gr,"⌉","\\rceil",!0);g(T,C,H,"\\","\\backslash");g(T,C,H,"∣","|");g(T,C,H,"∣","\\vert");g(ee,C,H,"|","\\textbar",!0);g(T,C,H,"∥","\\|");g(T,C,H,"∥","\\Vert");g(ee,C,H,"∥","\\textbardbl");g(ee,C,H,"~","\\textasciitilde");g(ee,C,H,"\\","\\textbackslash");g(ee,C,H,"^","\\textasciicircum");g(T,C,$,"↑","\\uparrow",!0);g(T,C,$,"⇑","\\Uparrow",!0);g(T,C,$,"↓","\\downarrow",!0);g(T,C,$,"⇓","\\Downarrow",!0);g(T,C,$,"↕","\\updownarrow",!0);g(T,C,$,"⇕","\\Updownarrow",!0);g(T,C,Nt,"∐","\\coprod");g(T,C,Nt,"⋁","\\bigvee");g(T,C,Nt,"⋀","\\bigwedge");g(T,C,Nt,"⨄","\\biguplus");g(T,C,Nt,"⋂","\\bigcap");g(T,C,Nt,"⋃","\\bigcup");g(T,C,Nt,"∫","\\int");g(T,C,Nt,"∫","\\intop");g(T,C,Nt,"∬","\\iint");g(T,C,Nt,"∭","\\iiint");g(T,C,Nt,"∏","\\prod");g(T,C,Nt,"∑","\\sum");g(T,C,Nt,"⨂","\\bigotimes");g(T,C,Nt,"⨁","\\bigoplus");g(T,C,Nt,"⨀","\\bigodot");g(T,C,Nt,"∮","\\oint");g(T,C,Nt,"∯","\\oiint");g(T,C,Nt,"∰","\\oiiint");g(T,C,Nt,"⨆","\\bigsqcup");g(T,C,Nt,"∫","\\smallint");g(ee,C,Ya,"…","\\textellipsis");g(T,C,Ya,"…","\\mathellipsis");g(ee,C,Ya,"…","\\ldots",!0);g(T,C,Ya,"…","\\ldots",!0);g(T,C,Ya,"⋯","\\@cdots",!0);g(T,C,Ya,"⋱","\\ddots",!0);g(T,C,H,"⋮","\\varvdots");g(ee,C,H,"⋮","\\varvdots");g(T,C,yt,"ˊ","\\acute");g(T,C,yt,"ˋ","\\grave");g(T,C,yt,"¨","\\ddot");g(T,C,yt,"~","\\tilde");g(T,C,yt,"ˉ","\\bar");g(T,C,yt,"˘","\\breve");g(T,C,yt,"ˇ","\\check");g(T,C,yt,"^","\\hat");g(T,C,yt,"⃗","\\vec");g(T,C,yt,"˙","\\dot");g(T,C,yt,"˚","\\mathring");g(T,C,Ce,"","\\@imath");g(T,C,Ce,"","\\@jmath");g(T,C,H,"ı","ı");g(T,C,H,"ȷ","ȷ");g(ee,C,H,"ı","\\i",!0);g(ee,C,H,"ȷ","\\j",!0);g(ee,C,H,"ß","\\ss",!0);g(ee,C,H,"æ","\\ae",!0);g(ee,C,H,"œ","\\oe",!0);g(ee,C,H,"ø","\\o",!0);g(ee,C,H,"Æ","\\AE",!0);g(ee,C,H,"Œ","\\OE",!0);g(ee,C,H,"Ø","\\O",!0);g(ee,C,yt,"ˊ","\\'");g(ee,C,yt,"ˋ","\\`");g(ee,C,yt,"ˆ","\\^");g(ee,C,yt,"˜","\\~");g(ee,C,yt,"ˉ","\\=");g(ee,C,yt,"˘","\\u");g(ee,C,yt,"˙","\\.");g(ee,C,yt,"¸","\\c");g(ee,C,yt,"˚","\\r");g(ee,C,yt,"ˇ","\\v");g(ee,C,yt,"¨",'\\"');g(ee,C,yt,"˝","\\H");g(ee,C,yt,"◯","\\textcircled");var T_={"--":!0,"---":!0,"``":!0,"''":!0};g(ee,C,H,"–","--",!0);g(ee,C,H,"–","\\textendash");g(ee,C,H,"—","---",!0);g(ee,C,H,"—","\\textemdash");g(ee,C,H,"‘","`",!0);g(ee,C,H,"‘","\\textquoteleft");g(ee,C,H,"’","'",!0);g(ee,C,H,"’","\\textquoteright");g(ee,C,H,"“","``",!0);g(ee,C,H,"“","\\textquotedblleft");g(ee,C,H,"”","''",!0);g(ee,C,H,"”","\\textquotedblright");g(T,C,H,"°","\\degree",!0);g(ee,C,H,"°","\\degree");g(ee,C,H,"°","\\textdegree",!0);g(T,C,H,"£","\\pounds");g(T,C,H,"£","\\mathsterling",!0);g(ee,C,H,"£","\\pounds");g(ee,C,H,"£","\\textsterling",!0);g(T,F,H,"✠","\\maltese");g(ee,F,H,"✠","\\maltese");var k2='0123456789/@."';for(var Nd=0;Nd<k2.length;Nd++){var S2=k2.charAt(Nd);g(T,C,H,S2,S2)}var A2='0123456789!@*()-=+";:?/.,';for(var Rd=0;Rd<A2.length;Rd++){var C2=A2.charAt(Rd);g(ee,C,H,C2,C2)}var wc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(var Pd=0;Pd<wc.length;Pd++){var du=wc.charAt(Pd);g(T,C,Ce,du,du),g(ee,C,H,du,du)}g(T,F,H,"C","ℂ");g(ee,F,H,"C","ℂ");g(T,F,H,"H","ℍ");g(ee,F,H,"H","ℍ");g(T,F,H,"N","ℕ");g(ee,F,H,"N","ℕ");g(T,F,H,"P","ℙ");g(ee,F,H,"P","ℙ");g(T,F,H,"Q","ℚ");g(ee,F,H,"Q","ℚ");g(T,F,H,"R","ℝ");g(ee,F,H,"R","ℝ");g(T,F,H,"Z","ℤ");g(ee,F,H,"Z","ℤ");g(T,C,Ce,"h","ℎ");g(ee,C,Ce,"h","ℎ");var Ne;for(var lr=0;lr<wc.length;lr++){var _t=wc.charAt(lr);Ne=String.fromCharCode(55349,56320+lr),g(T,C,Ce,_t,Ne),g(ee,C,H,_t,Ne),Ne=String.fromCharCode(55349,56372+lr),g(T,C,Ce,_t,Ne),g(ee,C,H,_t,Ne),Ne=String.fromCharCode(55349,56424+lr),g(T,C,Ce,_t,Ne),g(ee,C,H,_t,Ne),Ne=String.fromCharCode(55349,56580+lr),g(T,C,Ce,_t,Ne),g(ee,C,H,_t,Ne),Ne=String.fromCharCode(55349,56684+lr),g(T,C,Ce,_t,Ne),g(ee,C,H,_t,Ne),Ne=String.fromCharCode(55349,56736+lr),g(T,C,Ce,_t,Ne),g(ee,C,H,_t,Ne),Ne=String.fromCharCode(55349,56788+lr),g(T,C,Ce,_t,Ne),g(ee,C,H,_t,Ne),Ne=String.fromCharCode(55349,56840+lr),g(T,C,Ce,_t,Ne),g(ee,C,H,_t,Ne),Ne=String.fromCharCode(55349,56944+lr),g(T,C,Ce,_t,Ne),g(ee,C,H,_t,Ne),lr<26&&(Ne=String.fromCharCode(55349,56632+lr),g(T,C,Ce,_t,Ne),g(ee,C,H,_t,Ne),Ne=String.fromCharCode(55349,56476+lr),g(T,C,Ce,_t,Ne),g(ee,C,H,_t,Ne))}Ne="𝕜";g(T,C,Ce,"k",Ne);g(ee,C,H,"k",Ne);for(var ss=0;ss<10;ss++){var pi=ss.toString();Ne=String.fromCharCode(55349,57294+ss),g(T,C,Ce,pi,Ne),g(ee,C,H,pi,Ne),Ne=String.fromCharCode(55349,57314+ss),g(T,C,Ce,pi,Ne),g(ee,C,H,pi,Ne),Ne=String.fromCharCode(55349,57324+ss),g(T,C,Ce,pi,Ne),g(ee,C,H,pi,Ne),Ne=String.fromCharCode(55349,57334+ss),g(T,C,Ce,pi,Ne),g(ee,C,H,pi,Ne)}var Cf="ÐÞþ";for(var Od=0;Od<Cf.length;Od++){var hu=Cf.charAt(Od);g(T,C,Ce,hu,hu),g(ee,C,H,hu,hu)}var If={mathClass:"mathbf",textClass:"textbf",font:"Main-Bold"},I2={mathClass:"mathnormal",textClass:"textit",font:"Math-Italic"},N2={mathClass:"boldsymbol",textClass:"boldsymbol",font:"Main-BoldItalic"},dU={mathClass:"mathscr",textClass:"textscr",font:"Script-Regular"},ds={mathClass:"",textClass:"",font:""},R2={mathClass:"mathfrak",textClass:"textfrak",font:"Fraktur-Regular"},P2={mathClass:"mathbb",textClass:"textbb",font:"AMS-Regular"},O2={mathClass:"mathboldfrak",textClass:"textboldfrak",font:"Fraktur-Regular"},Nf={mathClass:"mathsf",textClass:"textsf",font:"SansSerif-Regular"},Rf={mathClass:"mathboldsf",textClass:"textboldsf",font:"SansSerif-Bold"},L2={mathClass:"mathitsf",textClass:"textitsf",font:"SansSerif-Italic"},Pf={mathClass:"mathtt",textClass:"texttt",font:"Typewriter-Regular"},D2=[If,If,I2,I2,N2,N2,dU,ds,ds,ds,R2,R2,P2,P2,O2,O2,Nf,Nf,Rf,Rf,L2,L2,ds,ds,Pf,Pf],hU=[If,ds,Nf,Rf,Pf],fU=e=>{var t=e.charCodeAt(0),r=e.charCodeAt(1),n=(t-55296)*1024+(r-56320)+65536;if(119808<=n&&n<120484){var i=Math.floor((n-119808)/26);return D2[i]}else if(120782<=n&&n<=120831){var s=Math.floor((n-120782)/10);return hU[s]}else{if(n===120485||n===120486)return D2[0];if(120486<n&&n<120782)return ds;throw new le("Unsupported character: "+e)}},T0=function(t,r,n){if(gt[n][t]){var i=gt[n][t].replace;i&&(t=i)}return{value:t,metrics:Fp(t,r,n)}},dr=function(t,r,n,i,s){var a=T0(t,r,n),o=a.metrics;t=a.value;var l;if(o){var u=o.italic;(n==="text"||i&&i.font==="mathit")&&(u=0),l=new Pr(t,o.height,o.depth,u,o.skew,o.width,s)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+t+"' in style '"+r+"' and mode '"+n+"'")),l=new Pr(t,0,0,0,0,0,s);if(i){l.maxFontSize=i.sizeMultiplier,i.style.isTight()&&l.classes.push("mtight");var c=i.getColor();c&&(l.style.color=c)}return l},zp=function(t,r,n,i){return i===void 0&&(i=[]),n.font==="boldsymbol"&&T0(t,"Main-Bold",r).metrics?dr(t,"Main-Bold",r,n,i.concat(["mathbf"])):t==="\\"||gt[r][t].font==="main"?dr(t,"Main-Regular",r,n,i):dr(t,"AMS-Regular",r,n,i.concat(["amsrm"]))},mU=function(t,r,n){return n!=="textord"&&T0(t,"Math-BoldItalic",r).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},w0=function(t,r,n){var i=t.mode,s=t.text,a=["mord"],{font:o,fontFamily:l,fontWeight:u,fontShape:c}=r,d=i==="math"||i==="text"&&!!o,h=d?o:l,f="",m="";if(s.charCodeAt(0)===55349){var b=fU(s);f=b.font,m=b[i+"Class"]}if(f)return dr(s,f,i,r,a.concat(m));if(h){var y,E;if(h==="boldsymbol"){var w=mU(s,i,n);y=w.fontName,E=[w.fontClass]}else d?(y=Of[o].fontName,E=[o]):(y=fu(l,u,c),E=[l,u,c]);if(T0(s,y,i).metrics)return dr(s,y,i,r,a.concat(E));if(T_.hasOwnProperty(s)&&y.slice(0,10)==="Typewriter"){for(var x=[],_=0;_<s.length;_++)x.push(dr(s[_],y,i,r,a.concat(E)));return li(x)}}if(n==="mathord")return dr(s,"Math-Italic",i,r,a.concat(["mathnormal"]));if(n==="textord"){var A=gt[i][s]&&gt[i][s].font;if(A==="ams"){var S=fu("amsrm",u,c);return dr(s,S,i,r,a.concat("amsrm",u,c))}else if(A==="main"||!A){var I=fu("textrm",u,c);return dr(s,I,i,r,a.concat(u,c))}else{var N=fu(A,u,c);return dr(s,N,i,r,a.concat(N,u,c))}}else throw new Error("unexpected type: "+n+" in makeOrd")},pU=(e,t)=>{if(Bi(e.classes)!==Bi(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass("mathnormal"))return!1;if(e.classes.length===1){var r=e.classes[0];if(r==="mbin"||r==="mord")return!1}for(var n of Object.keys(e.style))if(e.style[n]!==t.style[n])return!1;for(var i of Object.keys(t.style))if(e.style[i]!==t.style[i])return!1;return!0},w_=e=>{for(var t=0;t<e.length-1;t++){var r=e[t],n=e[t+1];r instanceof Pr&&n instanceof Pr&&pU(r,n)&&(r.text+=n.text,r.height=Math.max(r.height,n.height),r.depth=Math.max(r.depth,n.depth),r.italic=n.italic,e.splice(t+1,1),t--)}return e},$p=function(t){for(var r=0,n=0,i=0,s=0;s<t.children.length;s++){var a=t.children[s];a.height>r&&(r=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>i&&(i=a.maxFontSize)}t.height=r,t.depth=n,t.maxFontSize=i},ie=function(t,r,n,i){var s=new Za(t,r,n,i);return $p(s),s},zi=(e,t,r,n)=>new Za(e,t,r,n),Pa=function(t,r,n){var i=ie([t],[],r);return i.height=Math.max(n||r.fontMetrics().defaultRuleThickness,r.minRuleThickness),i.style.borderBottomWidth=he(i.height),i.maxFontSize=1,i},gU=function(t,r,n,i){var s=new _0(t,r,n,i);return $p(s),s},li=function(t){var r=new Wa(t);return $p(r),r},Oa=function(t,r){return t instanceof Wa?ie([],[t],r):t},bU=function(t){if(t.positionType==="individualShift"){for(var r=t.children,n=[r[0]],i=-r[0].shift-r[0].elem.depth,s=i,a=1;a<r.length;a++){var o=-r[a].shift-s-r[a].elem.depth,l=o-(r[a-1].elem.height+r[a-1].elem.depth);s=s+o,n.push({type:"kern",size:l}),n.push(r[a])}return{children:n,depth:i}}var u;if(t.positionType==="top"){for(var c=t.positionData,d=0;d<t.children.length;d++){var h=t.children[d];c-=h.type==="kern"?h.size:h.elem.height+h.elem.depth}u=c}else if(t.positionType==="bottom")u=-t.positionData;else{var f=t.children[0];if(f.type!=="elem")throw new Error('First child must have type "elem".');if(t.positionType==="shift")u=-f.elem.depth-t.positionData;else if(t.positionType==="firstBaseline")u=-f.elem.depth;else throw new Error("Invalid positionType "+t.positionType+".")}return{children:t.children,depth:u}},Xe=function(t,r){for(var{children:n,depth:i}=bU(t),s=0,a=0;a<n.length;a++){var o=n[a];if(o.type==="elem"){var l=o.elem;s=Math.max(s,l.maxFontSize,l.height)}}s+=2;var u=ie(["pstrut"],[]);u.style.height=he(s);for(var c=[],d=i,h=i,f=i,m=0;m<n.length;m++){var b=n[m];if(b.type==="kern")f+=b.size;else{var y=b.elem,E=b.wrapperClasses||[],w=b.wrapperStyle||{},x=ie(E,[u,y],void 0,w);x.style.top=he(-s-f-y.depth),b.marginLeft&&(x.style.marginLeft=b.marginLeft),b.marginRight&&(x.style.marginRight=b.marginRight),c.push(x),f+=y.height+y.depth}d=Math.min(d,f),h=Math.max(h,f)}var _=ie(["vlist"],c);_.style.height=he(h);var A;if(d<0){var S=ie([],[]),I=ie(["vlist"],[S]);I.style.height=he(-d);var N=ie(["vlist-s"],[new Pr("​")]);A=[ie(["vlist-r"],[_,N]),ie(["vlist-r"],[I])]}else A=[ie(["vlist-r"],[_])];var U=ie(["vlist-t"],A);return A.length===2&&U.classes.push("vlist-t2"),U.height=h,U.depth=-d,U},k_=(e,t)=>{var r=ie(["mspace"],[],t),n=xt(e,t);return r.style.marginRight=he(n),r},fu=(e,t,r)=>{var n,i;switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}return t==="textbf"&&r==="textit"?i="BoldItalic":t==="textbf"?i="Bold":r==="textit"?i="Italic":i="Regular",n+"-"+i},Of={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},S_={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},A_=function(t,r){var[n,i,s]=S_[t],a=new Fi(n),o=new ni([a],{width:he(i),height:he(s),style:"width:"+he(i),viewBox:"0 0 "+1e3*i+" "+1e3*s,preserveAspectRatio:"xMinYMin"}),l=zi(["overlay"],[o],r);return l.height=s,l.style.height=he(s),l.style.width=he(i),l},vt={number:3,unit:"mu"},as={number:4,unit:"mu"},Gn={number:5,unit:"mu"},yU={mord:{mop:vt,mbin:as,mrel:Gn,minner:vt},mop:{mord:vt,mop:vt,mrel:Gn,minner:vt},mbin:{mord:as,mop:as,mopen:as,minner:as},mrel:{mord:Gn,mop:Gn,mopen:Gn,minner:Gn},mopen:{},mclose:{mop:vt,mbin:as,mrel:Gn,minner:vt},mpunct:{mord:vt,mop:vt,mrel:Gn,mopen:vt,mclose:vt,mpunct:vt,minner:vt},minner:{mord:vt,mop:vt,mbin:as,mrel:Gn,mopen:vt,mpunct:vt,minner:vt}},vU={mord:{mop:vt},mop:{mord:vt,mop:vt},mbin:{},mrel:{},mopen:{},mclose:{mop:vt},mpunct:{},minner:{mop:vt}},C_={},kc={},Sc={};function me(e){for(var{type:t,names:r,props:n,handler:i,htmlBuilder:s,mathmlBuilder:a}=e,o={type:t,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:i},l=0;l<r.length;++l)C_[r[l]]=o;t&&(s&&(kc[t]=s),a&&(Sc[t]=a))}function js(e){var{type:t,htmlBuilder:r,mathmlBuilder:n}=e;me({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:r,mathmlBuilder:n})}var Ac=function(t){return t.type==="ordgroup"&&t.body.length===1?t.body[0]:t},Ct=function(t){return t.type==="ordgroup"?t.body:[t]},xU=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),EU=new Set(["rightmost","mrel","mclose","mpunct"]),_U={display:Oe.DISPLAY,text:Oe.TEXT,script:Oe.SCRIPT,scriptscript:Oe.SCRIPTSCRIPT},TU={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},zt=function(t,r,n,i){i===void 0&&(i=[null,null]);for(var s=[],a=0;a<t.length;a++){var o=Qe(t[a],r);if(o instanceof Wa){var l=o.children;s.push(...l)}else s.push(o)}if(w_(s),!n)return s;var u=r;if(t.length===1){var c=t[0];c.type==="sizing"?u=r.havingSize(c.size):c.type==="styling"&&(u=r.havingStyle(_U[c.style]))}var d=ie([i[0]||"leftmost"],[],r),h=ie([i[1]||"rightmost"],[],r),f=n==="root";return Lf(s,(m,b)=>{var y=b.classes[0],E=m.classes[0];y==="mbin"&&EU.has(E)?b.classes[0]="mord":E==="mbin"&&xU.has(y)&&(m.classes[0]="mord")},{node:d},h,f),Lf(s,(m,b)=>{var y,E,w=Mf(b),x=Mf(m),_=w&&x?m.hasClass("mtight")?(y=vU[w])==null?void 0:y[x]:(E=yU[w])==null?void 0:E[x]:null;if(_)return k_(_,u)},{node:d},h,f),s},Lf=function(t,r,n,i,s){i&&t.push(i);for(var a=0;a<t.length;a++){var o=t[a],l=I_(o);if(l){Lf(l.children,r,n,null,s);continue}var u=!o.hasClass("mspace");if(u){var c=r(o,n.node);c&&(n.insertAfter?n.insertAfter(c):(t.unshift(c),a++))}u?n.node=o:s&&o.hasClass("newline")&&(n.node=ie(["leftmost"])),n.insertAfter=(d=>h=>{t.splice(d+1,0,h),a++})(a)}i&&t.pop()},I_=function(t){return t instanceof Wa||t instanceof _0||t instanceof Za&&t.hasClass("enclosing")?t:null},Df=function(t,r){var n=I_(t);if(n){var i=n.children;if(i.length){if(r==="right")return Df(i[i.length-1],"right");if(r==="left")return Df(i[0],"left")}}return t},Mf=function(t,r){if(!t)return null;r&&(t=Df(t,r));var n=t.classes[0];return TU[n]||null},ll=function(t,r){var n=["nulldelimiter"].concat(t.baseSizingClasses());return ie(r.concat(n))},Qe=function(t,r,n){if(!t)return ie();if(kc[t.type]){var i=kc[t.type](t,r);if(n&&r.size!==n.size){i=ie(r.sizingClasses(n),[i],r);var s=r.sizeMultiplier/n.sizeMultiplier;i.height*=s,i.depth*=s}return i}else throw new le("Got group of unknown type: '"+t.type+"'")};function mu(e,t){var r=ie(["base"],e,t),n=ie(["strut"]);return n.style.height=he(r.height+r.depth),r.depth&&(n.style.verticalAlign=he(-r.depth)),r.children.unshift(n),r}function Bf(e,t){var r=null;e.length===1&&e[0].type==="tag"&&(r=e[0].tag,e=e[0].body);var n=zt(e,t,"root"),i;n.length===2&&n[1].hasClass("tag")&&(i=n.pop());for(var s=[],a=[],o=0;o<n.length;o++)if(a.push(n[o]),n[o].hasClass("mbin")||n[o].hasClass("mrel")||n[o].hasClass("allowbreak")){for(var l=!1;o<n.length-1&&n[o+1].hasClass("mspace")&&!n[o+1].hasClass("newline");)o++,a.push(n[o]),n[o].hasClass("nobreak")&&(l=!0);l||(s.push(mu(a,t)),a=[])}else n[o].hasClass("newline")&&(a.pop(),a.length>0&&(s.push(mu(a,t)),a=[]),s.push(n[o]));a.length>0&&s.push(mu(a,t));var u;r?(u=mu(zt(r,t,!0),t),u.classes=["tag"],s.push(u)):i&&s.push(i);var c=ie(["katex-html"],s);if(c.setAttribute("aria-hidden","true"),u){var d=u.children[0];d.style.height=he(c.height+c.depth),c.depth&&(d.style.verticalAlign=he(-c.depth))}return c}function N_(e){return new Wa(e)}class ue{constructor(t,r,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=t,this.attributes={},this.children=r||[],this.classes=n||[]}setAttribute(t,r){this.attributes[t]=r}getAttribute(t){return this.attributes[t]}toNode(){var t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&t.setAttribute(r,this.attributes[r]);this.classes.length>0&&(t.className=Bi(this.classes));for(var n=0;n<this.children.length;n++)if(this.children[n]instanceof It&&this.children[n+1]instanceof It){for(var i=this.children[n].toText()+this.children[++n].toText();this.children[n+1]instanceof It;)i+=this.children[++n].toText();t.appendChild(new It(i).toNode())}else t.appendChild(this.children[n].toNode());return t}toMarkup(){var t="<"+this.type;for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&(t+=" "+r+'="',t+=rr(this.attributes[r]),t+='"');this.classes.length>0&&(t+=' class ="'+rr(Bi(this.classes))+'"'),t+=">";for(var n=0;n<this.children.length;n++)t+=this.children[n].toMarkup();return t+="</"+this.type+">",t}toText(){return this.children.map(t=>t.toText()).join("")}}class It{constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return rr(this.toText())}toText(){return this.text}}class R_{constructor(t){this.width=void 0,this.character=void 0,this.width=t,t>=.05555&&t<=.05556?this.character=" ":t>=.1666&&t<=.1667?this.character=" ":t>=.2222&&t<=.2223?this.character=" ":t>=.2777&&t<=.2778?this.character="  ":t>=-.05556&&t<=-.05555?this.character=" ⁣":t>=-.1667&&t<=-.1666?this.character=" ⁣":t>=-.2223&&t<=-.2222?this.character=" ⁣":t>=-.2778&&t<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return t.setAttribute("width",he(this.width)),t}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+he(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var wU=new Set(["\\imath","\\jmath"]),kU=new Set(["mrow","mtable"]),Zr=function(t,r,n){return gt[r][t]&&gt[r][t].replace&&t.charCodeAt(0)!==55349&&!(T_.hasOwnProperty(t)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(t=gt[r][t].replace),new It(t)},jp=function(t){return t.length===1?t[0]:new ue("mrow",t)},SU={mathit:"italic",boldsymbol:e=>e.type==="textord"?"bold":"bold-italic",mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},Up=(e,t)=>{if(e.mode==="text"){if(t.fontFamily==="texttt")return"monospace";if(t.fontFamily==="textsf")return t.fontShape==="textit"&&t.fontWeight==="textbf"?"sans-serif-bold-italic":t.fontShape==="textit"?"sans-serif-italic":t.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(t.fontShape==="textit"&&t.fontWeight==="textbf")return"bold-italic";if(t.fontShape==="textit")return"italic";if(t.fontWeight==="textbf")return"bold"}var r=t.font;if(!r||r==="mathnormal")return null;var n=e.mode,i=SU[r];if(i)return typeof i=="function"?i(e):i;var s=e.text;if(wU.has(s))return null;if(gt[n][s]){var a=gt[n][s].replace;a&&(s=a)}var o=Of[r].fontName;return Fp(s,o,n)?Of[r].variant:null};function Ld(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var t=e.children[0];return t instanceof It&&t.text==="."}else if(e.type==="mo"&&e.children.length===1&&e.getAttribute("separator")==="true"&&e.getAttribute("lspace")==="0em"&&e.getAttribute("rspace")==="0em"){var r=e.children[0];return r instanceof It&&r.text===","}else return!1}var Dr=function(t,r,n){if(t.length===1){var i=st(t[0],r);return n&&i instanceof ue&&i.type==="mo"&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i]}for(var s=[],a,o=0;o<t.length;o++){var l=st(t[o],r);if(l instanceof ue&&a instanceof ue){if(l.type==="mtext"&&a.type==="mtext"&&l.getAttribute("mathvariant")===a.getAttribute("mathvariant")){a.children.push(...l.children);continue}else if(l.type==="mn"&&a.type==="mn"){a.children.push(...l.children);continue}else if(Ld(l)&&a.type==="mn"){a.children.push(...l.children);continue}else if(l.type==="mn"&&Ld(a))l.children=[...a.children,...l.children],s.pop();else if((l.type==="msup"||l.type==="msub")&&l.children.length>=1&&(a.type==="mn"||Ld(a))){var u=l.children[0];u instanceof ue&&u.type==="mn"&&(u.children=[...a.children,...u.children],s.pop())}else if(a.type==="mi"&&a.children.length===1){var c=a.children[0];if(c instanceof It&&c.text==="̸"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var d=l.children[0];d instanceof It&&d.text.length>0&&(d.text=d.text.slice(0,1)+"̸"+d.text.slice(1),s.pop())}}}s.push(l),a=l}return s},$i=function(t,r,n){return jp(Dr(t,r,n))},st=function(t,r){if(!t)return new ue("mrow");if(Sc[t.type])return Sc[t.type](t,r);throw new le("Got group of unknown type: '"+t.type+"'")};function M2(e,t,r,n,i){var s=Dr(e,r),a;s.length===1&&s[0]instanceof ue&&kU.has(s[0].type)?a=s[0]:a=new ue("mrow",s);var o=new ue("annotation",[new It(t)]);o.setAttribute("encoding","application/x-tex");var l=new ue("semantics",[a,o]),u=new ue("math",[l]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&u.setAttribute("display","block");var c=i?"katex":"katex-mathml";return ie([c],[u])}var AU=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],B2=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],F2=function(t,r){return r.size<2?t:AU[t-1][r.size-1]};class Yn{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||Yn.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=B2[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var r={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(r,t),new Yn(r)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:F2(this.textSize,t)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(t){return this.size===t&&this.textSize===t?this:this.extend({style:this.style.text(),size:t,textSize:t,sizeMultiplier:B2[t-1]})}havingBaseStyle(t){t=t||this.style.text();var r=F2(Yn.BASESIZE,t);return this.size===r&&this.textSize===Yn.BASESIZE&&this.style===t?this:this.extend({style:t,size:r})}havingBaseSizing(){var t;switch(this.style.id){case 4:case 5:t=3;break;case 6:case 7:t=1;break;default:t=6}return this.extend({style:this.style.text(),size:t})}withColor(t){return this.extend({color:t})}withPhantom(){return this.extend({phantom:!0})}withFont(t){return this.extend({font:t})}withTextFontFamily(t){return this.extend({fontFamily:t,font:""})}withTextFontWeight(t){return this.extend({fontWeight:t,font:""})}withTextFontShape(t){return this.extend({fontShape:t,font:""})}sizingClasses(t){return t.size!==this.size?["sizing","reset-size"+t.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==Yn.BASESIZE?["sizing","reset-size"+this.size,"size"+Yn.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=cU(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Yn.BASESIZE=6;var P_=function(t){return new Yn({style:t.displayMode?Oe.DISPLAY:Oe.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},O_=function(t,r){if(r.displayMode){var n=["katex-display"];r.leqno&&n.push("leqno"),r.fleqn&&n.push("fleqn"),t=ie(n,[t])}return t},CU=function(t,r,n){var i=P_(n),s;if(n.output==="mathml")return M2(t,r,i,n.displayMode,!0);if(n.output==="html"){var a=Bf(t,i);s=ie(["katex"],[a])}else{var o=M2(t,r,i,n.displayMode,!1),l=Bf(t,i);s=ie(["katex"],[o,l])}return O_(s,n)},IU=function(t,r,n){var i=P_(n),s=Bf(t,i),a=ie(["katex"],[s]);return O_(a,n)},NU={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",underbracket:"⎵",overbracket:"⎴",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},k0=function(t){var r=new ue("mo",[new It(NU[t.replace(/^\\/,"")])]);return r.setAttribute("stretchy","true"),r},RU={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},PU=new Set(["widehat","widecheck","widetilde","utilde"]),S0=function(t,r){function n(){var o=4e5,l=t.label.slice(1);if(PU.has(l)&&"base"in t){var u=t.base.type==="ordgroup"?t.base.body.length:1,c,d,h;if(u>5)l==="widehat"||l==="widecheck"?(c=420,o=2364,h=.42,d=l+"4"):(c=312,o=2340,h=.34,d="tilde4");else{var f=[1,1,2,2,3,3][u];l==="widehat"||l==="widecheck"?(o=[0,1062,2364,2364,2364][f],c=[0,239,300,360,420][f],h=[0,.24,.3,.3,.36,.42][f],d=l+f):(o=[0,600,1033,2339,2340][f],c=[0,260,286,306,312][f],h=[0,.26,.286,.3,.306,.34][f],d="tilde"+f)}var m=new Fi(d),b=new ni([m],{width:"100%",height:he(h),viewBox:"0 0 "+o+" "+c,preserveAspectRatio:"none"});return{span:zi([],[b],r),minWidth:0,height:h}}else{var y=[],E=RU[l];if(!E)throw new Error('No SVG data for "'+l+'".');var[w,x,_]=E,A=_/1e3,S=w.length,I,N;if(S===1){if(E.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+l+'".');I=["hide-tail"],N=[E[3]]}else if(S===2)I=["halfarrow-left","halfarrow-right"],N=["xMinYMin","xMaxYMin"];else if(S===3)I=["brace-left","brace-center","brace-right"],N=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
626
- `+S+" children.");for(var U=0;U<S;U++){var z=new Fi(w[U]),Z=new ni([z],{width:"400em",height:he(A),viewBox:"0 0 "+o+" "+_,preserveAspectRatio:N[U]+" slice"}),V=zi([I[U]],[Z],r);if(S===1)return{span:V,minWidth:x,height:A};V.style.height=he(A),y.push(V)}return{span:ie(["stretchy"],y,r),minWidth:x,height:A}}}var{span:i,minWidth:s,height:a}=n();return i.height=a,i.style.height=he(a),s>0&&(i.style.minWidth=he(s)),i},OU=function(t,r,n,i,s){var a,o=t.height+t.depth+n+i;if(/fbox|color|angl/.test(r)){if(a=ie(["stretchy",r],[],s),r==="fbox"){var l=s.color&&s.getColor();l&&(a.style.borderColor=l)}}else{var u=[];/^[bx]cancel$/.test(r)&&u.push(new Af({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(r)&&u.push(new Af({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var c=new ni(u,{width:"100%",height:he(o)});a=zi([],[c],s)}return a.height=o,a.style.height=he(o),a},LU={bin:1,close:1,inner:1,open:1,punct:1,rel:1},DU={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function MU(e){return e in LU}function Fe(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function A0(e){var t=C0(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function C0(e){return e&&(e.type==="atom"||DU.hasOwnProperty(e.type))?e:null}var L_=e=>{if(e instanceof Pr)return e;if(lU(e)&&e.children.length===1)return L_(e.children[0])},Hp=(e,t)=>{var r,n,i;e&&e.type==="supsub"?(n=Fe(e.base,"accent"),r=n.base,e.base=r,i=oU(Qe(e,t)),e.base=n):(n=Fe(e,"accent"),r=n.base);var s=Qe(r,t.havingCrampedStyle()),a=n.isShifty&&ai(r),o=0;if(a){var l,u;o=(l=(u=L_(s))==null?void 0:u.skew)!=null?l:0}var c=n.label==="\\c",d=c?s.height+s.depth:Math.min(s.height,t.fontMetrics().xHeight),h;if(n.isStretchy)h=S0(n,t),h=Xe({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:h,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+he(2*o)+")",marginLeft:he(2*o)}:void 0}]});else{var f,m;n.label==="\\vec"?(f=A_("vec",t),m=S_.vec[1]):(f=w0({mode:n.mode,text:n.label},t,"textord"),f=aU(f),f.italic=0,m=f.width,c&&(d+=f.depth)),h=ie(["accent-body"],[f]);var b=n.label==="\\textcircled";b&&(h.classes.push("accent-full"),d=s.height);var y=o;b||(y-=m/2),h.style.left=he(y),n.label==="\\textcircled"&&(h.style.top=".2em"),h=Xe({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-d},{type:"elem",elem:h}]})}var E=ie(["mord","accent"],[h],t);return i?(i.children[0]=E,i.height=Math.max(E.height,i.height),i.classes[0]="mord",i):E},D_=(e,t)=>{var r=e.isStretchy?k0(e.label):new ue("mo",[Zr(e.label,e.mode)]),n=new ue("mover",[st(e.base,t),r]);return n.setAttribute("accent","true"),n},BU=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));me({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var r=Ac(t[0]),n=!BU.test(e.funcName),i=!n||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,isShifty:i,base:r}},htmlBuilder:Hp,mathmlBuilder:D_});me({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var r=t[0],n=e.parser.mode;return n==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:e.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:Hp,mathmlBuilder:D_});me({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0];return{type:"accentUnder",mode:r.mode,label:n,base:i}},htmlBuilder:(e,t)=>{var r=Qe(e.base,t),n=S0(e,t),i=e.label==="\\utilde"?.12:0,s=Xe({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:r}]});return ie(["mord","accentunder"],[s],t)},mathmlBuilder:(e,t)=>{var r=k0(e.label),n=new ue("munder",[st(e.base,t),r]);return n.setAttribute("accentunder","true"),n}});var pu=e=>{var t=new ue("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};me({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:n,funcName:i}=e;return{type:"xArrow",mode:n.mode,label:i,body:t[0],below:r[0]}},htmlBuilder(e,t){var r=t.style,n=t.havingStyle(r.sup()),i=Oa(Qe(e.body,n,t),t),s=e.label.slice(0,2)==="\\x"?"x":"cd";i.classes.push(s+"-arrow-pad");var a;e.below&&(n=t.havingStyle(r.sub()),a=Oa(Qe(e.below,n,t),t),a.classes.push(s+"-arrow-pad"));var o=S0(e,t),l=-t.fontMetrics().axisHeight+.5*o.height,u=-t.fontMetrics().axisHeight-.5*o.height-.111;(i.depth>.25||e.label==="\\xleftequilibrium")&&(u-=i.depth);var c;if(a){var d=-t.fontMetrics().axisHeight+a.height+.5*o.height+.111;c=Xe({positionType:"individualShift",children:[{type:"elem",elem:i,shift:u},{type:"elem",elem:o,shift:l,wrapperClasses:["svg-align"]},{type:"elem",elem:a,shift:d}]})}else c=Xe({positionType:"individualShift",children:[{type:"elem",elem:i,shift:u},{type:"elem",elem:o,shift:l,wrapperClasses:["svg-align"]}]});return ie(["mrel","x-arrow"],[c],t)},mathmlBuilder(e,t){var r=k0(e.label);r.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(e.body){var i=pu(st(e.body,t));if(e.below){var s=pu(st(e.below,t));n=new ue("munderover",[r,s,i])}else n=new ue("mover",[r,i])}else if(e.below){var a=pu(st(e.below,t));n=new ue("munder",[r,a])}else n=pu(),n=new ue("mover",[r,n]);return n}});function M_(e,t){var r=zt(e.body,t,!0);return ie([e.mclass],r,t)}function B_(e,t){var r,n=Dr(e.body,t);return e.mclass==="minner"?r=new ue("mpadded",n):e.mclass==="mord"?e.isCharacterBox?(r=n[0],r.type="mi"):r=new ue("mi",n):(e.isCharacterBox?(r=n[0],r.type="mo"):r=new ue("mo",n),e.mclass==="mbin"?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):e.mclass==="mpunct"?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(r.attributes.lspace="0em",r.attributes.rspace="0em"):e.mclass==="minner"&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}me({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:r,funcName:n}=e,i=t[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:Ct(i),isCharacterBox:ai(i)}},htmlBuilder:M_,mathmlBuilder:B_});var I0=e=>{var t=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return t.type==="atom"&&(t.family==="bin"||t.family==="rel")?"m"+t.family:"mord"};me({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:r}=e;return{type:"mclass",mode:r.mode,mclass:I0(t[0]),body:Ct(t[1]),isCharacterBox:ai(t[1])}}});me({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:r,funcName:n}=e,i=t[1],s=t[0],a;n!=="\\stackrel"?a=I0(i):a="mrel";var o={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:Ct(i)},l={type:"supsub",mode:s.mode,base:o,sup:n==="\\underset"?null:s,sub:n==="\\underset"?s:null};return{type:"mclass",mode:r.mode,mclass:a,body:[l],isCharacterBox:ai(l)}},htmlBuilder:M_,mathmlBuilder:B_});me({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"pmb",mode:r.mode,mclass:I0(t[0]),body:Ct(t[0])}},htmlBuilder(e,t){var r=zt(e.body,t,!0),n=ie([e.mclass],r,t);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(e,t){var r=Dr(e.body,t),n=new ue("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var FU={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},z2=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),$2=e=>e.type==="textord"&&e.text==="@",zU=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;function $U(e,t,r){var n=FU[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{var i=r.callFunction("\\\\cdleft",[t[0]],[]),s={type:"atom",text:n,mode:"math",family:"rel"},a=r.callFunction("\\Big",[s],[]),o=r.callFunction("\\\\cdright",[t[1]],[]),l={type:"ordgroup",mode:"math",body:[i,a,o]};return r.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var u={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[u],[])}default:return{type:"textord",text:" ",mode:"math"}}}function jU(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var r=e.fetch().text;if(r==="&"||r==="\\\\")e.consume();else if(r==="\\end"){t[t.length-1].length===0&&t.pop();break}else throw new le("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var n=[],i=[n],s=0;s<t.length;s++){for(var a=t[s],o=z2(),l=0;l<a.length;l++)if(!$2(a[l]))o.body.push(a[l]);else{n.push(o),l+=1;var u=A0(a[l]).text,c=new Array(2);if(c[0]={type:"ordgroup",mode:"math",body:[]},c[1]={type:"ordgroup",mode:"math",body:[]},!"=|.".includes(u))if("<>AV".includes(u))for(var d=0;d<2;d++){for(var h=!0,f=l+1;f<a.length;f++){if(zU(a[f],u)){h=!1,l=f;break}if($2(a[f]))throw new le("Missing a "+u+" character to complete a CD arrow.",a[f]);c[d].body.push(a[f])}if(h)throw new le("Missing a "+u+" character to complete a CD arrow.",a[l])}else throw new le('Expected one of "<>AV=|." after @',a[l]);var m=$U(u,c,e),b={type:"styling",body:[m],mode:"math",style:"display",resetFont:!0};n.push(b),o=z2()}s%2===0?n.push(o):n.shift(),n=[],i.push(n)}e.gullet.endGroup(),e.gullet.endGroup();var y=new Array(i[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:y,colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}me({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:t[0]}},htmlBuilder(e,t){var r=t.havingStyle(t.style.sup()),n=Oa(Qe(e.label,r,t),t);return n.classes.push("cd-label-"+e.side),n.style.bottom=he(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(e,t){var r=new ue("mrow",[st(e.label,t)]);return r=new ue("mpadded",[r]),r.setAttribute("width","0"),e.side==="left"&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new ue("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}});me({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:r}=e;return{type:"cdlabelparent",mode:r.mode,fragment:t[0]}},htmlBuilder(e,t){var r=Oa(Qe(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder(e,t){return new ue("mrow",[st(e.fragment,t)])}});me({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:r}=e,n=Fe(t[0],"ordgroup"),i=n.body,s="",a=0;a<i.length;a++){var o=Fe(i[a],"textord");s+=o.text}var l=parseInt(s),u;if(isNaN(l))throw new le("\\@char has non-numeric argument "+s);if(l<0||l>=1114111)throw new le("\\@char with invalid code point "+s);return l<=65535?u=String.fromCharCode(l):(l-=65536,u=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:r.mode,text:u}}});var F_=(e,t)=>{var r=zt(e.body,t.withColor(e.color),!1);return li(r)},z_=(e,t)=>{var r=Dr(e.body,t.withColor(e.color)),n=new ue("mstyle",r);return n.setAttribute("mathcolor",e.color),n};me({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:r}=e,n=Fe(t[0],"color-token").color,i=t[1];return{type:"color",mode:r.mode,color:n,body:Ct(i)}},htmlBuilder:F_,mathmlBuilder:z_});me({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:r,breakOnTokenText:n}=e,i=Fe(t[0],"color-token").color;r.gullet.macros.set("\\current@color",i);var s=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:i,body:s}},htmlBuilder:F_,mathmlBuilder:z_});me({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){var{parser:n}=e,i=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,s=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:s,size:i&&Fe(i,"size").value}},htmlBuilder(e,t){var r=ie(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=he(xt(e.size,t)))),r},mathmlBuilder(e,t){var r=new ue("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",he(xt(e.size,t)))),r}});var Ff={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},$_=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new le("Expected a control sequence",e);return t},UU=e=>{var t=e.gullet.popToken();return t.text==="="&&(t=e.gullet.popToken(),t.text===" "&&(t=e.gullet.popToken())),t},j_=(e,t,r,n)=>{var i=e.gullet.macros.get(r.text);i==null&&(r.noexpand=!0,i={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,i,n)};me({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:r}=e;t.consumeSpaces();var n=t.fetch();if(Ff[n.text])return(r==="\\global"||r==="\\\\globallong")&&(n.text=Ff[n.text]),Fe(t.parseFunction(),"internal");throw new le("Invalid token after macro prefix",n)}});me({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=t.gullet.popToken(),i=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new le("Expected a control sequence",n);for(var s=0,a,o=[[]];t.gullet.future().text!=="{";)if(n=t.gullet.popToken(),n.text==="#"){if(t.gullet.future().text==="{"){a=t.gullet.future(),o[s].push("{");break}if(n=t.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new le('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==s+1)throw new le('Argument number "'+n.text+'" out of order');s++,o.push([])}else{if(n.text==="EOF")throw new le("Expected a macro definition");o[s].push(n.text)}var{tokens:l}=t.gullet.consumeArg();return a&&l.unshift(a),(r==="\\edef"||r==="\\xdef")&&(l=t.gullet.expandTokens(l),l.reverse()),t.gullet.macros.set(i,{tokens:l,numArgs:s,delimiters:o},r===Ff[r]),{type:"internal",mode:t.mode}}});me({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=$_(t.gullet.popToken());t.gullet.consumeSpaces();var i=UU(t);return j_(t,n,i,r==="\\\\globallet"),{type:"internal",mode:t.mode}}});me({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=$_(t.gullet.popToken()),i=t.gullet.popToken(),s=t.gullet.popToken();return j_(t,n,s,r==="\\\\globalfuture"),t.gullet.pushToken(s),t.gullet.pushToken(i),{type:"internal",mode:t.mode}}});var Ao=function(t,r,n){var i=gt.math[t]&&gt.math[t].replace,s=Fp(i||t,r,n);if(!s)throw new Error("Unsupported symbol "+t+" and font size "+r+".");return s},Vp=function(t,r,n,i){var s=n.havingBaseStyle(r),a=ie(i.concat(s.sizingClasses(n)),[t],n),o=s.sizeMultiplier/n.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=s.sizeMultiplier,a},U_=function(t,r,n){var i=r.havingBaseStyle(n),s=(1-r.sizeMultiplier/i.sizeMultiplier)*r.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=he(s),t.height-=s,t.depth+=s},HU=function(t,r,n,i,s,a){var o=dr(t,"Main-Regular",s,i),l=Vp(o,r,i,a);return U_(l,i,r),l},VU=function(t,r,n,i){return dr(t,"Size"+r+"-Regular",n,i)},H_=function(t,r,n,i,s,a){var o=VU(t,r,s,i),l=Vp(ie(["delimsizing","size"+r],[o],i),Oe.TEXT,i,a);return n&&U_(l,i,Oe.TEXT),l},Dd=function(t,r,n){var i;r==="Size1-Regular"?i="delim-size1":i="delim-size4";var s=ie(["delimsizinginner",i],[ie([],[dr(t,r,n)])]);return{type:"elem",elem:s}},Md=function(t,r,n){var i=Cn["Size4-Regular"][t.charCodeAt(0)]?Cn["Size4-Regular"][t.charCodeAt(0)][4]:Cn["Size1-Regular"][t.charCodeAt(0)][4],s=new Fi("inner",Jj(t,Math.round(1e3*r))),a=new ni([s],{width:he(i),height:he(r),style:"width:"+he(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*r),preserveAspectRatio:"xMinYMin"}),o=zi([],[a],n);return o.height=r,o.style.height=he(r),o.style.width=he(i),{type:"elem",elem:o}},zf=.008,gu={type:"kern",size:-1*zf},qU=new Set(["|","\\lvert","\\rvert","\\vert"]),GU=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),V_=function(t,r,n,i,s,a){var o,l,u,c,d="",h=0;o=u=c=t,l=null;var f="Size1-Regular";t==="\\uparrow"?u=c="⏐":t==="\\Uparrow"?u=c="‖":t==="\\downarrow"?o=u="⏐":t==="\\Downarrow"?o=u="‖":t==="\\updownarrow"?(o="\\uparrow",u="⏐",c="\\downarrow"):t==="\\Updownarrow"?(o="\\Uparrow",u="‖",c="\\Downarrow"):qU.has(t)?(u="∣",d="vert",h=333):GU.has(t)?(u="∥",d="doublevert",h=556):t==="["||t==="\\lbrack"?(o="⎡",u="⎢",c="⎣",f="Size4-Regular",d="lbrack",h=667):t==="]"||t==="\\rbrack"?(o="⎤",u="⎥",c="⎦",f="Size4-Regular",d="rbrack",h=667):t==="\\lfloor"||t==="⌊"?(u=o="⎢",c="⎣",f="Size4-Regular",d="lfloor",h=667):t==="\\lceil"||t==="⌈"?(o="⎡",u=c="⎢",f="Size4-Regular",d="lceil",h=667):t==="\\rfloor"||t==="⌋"?(u=o="⎥",c="⎦",f="Size4-Regular",d="rfloor",h=667):t==="\\rceil"||t==="⌉"?(o="⎤",u=c="⎥",f="Size4-Regular",d="rceil",h=667):t==="("||t==="\\lparen"?(o="⎛",u="⎜",c="⎝",f="Size4-Regular",d="lparen",h=875):t===")"||t==="\\rparen"?(o="⎞",u="⎟",c="⎠",f="Size4-Regular",d="rparen",h=875):t==="\\{"||t==="\\lbrace"?(o="⎧",l="⎨",c="⎩",u="⎪",f="Size4-Regular"):t==="\\}"||t==="\\rbrace"?(o="⎫",l="⎬",c="⎭",u="⎪",f="Size4-Regular"):t==="\\lgroup"||t==="⟮"?(o="⎧",c="⎩",u="⎪",f="Size4-Regular"):t==="\\rgroup"||t==="⟯"?(o="⎫",c="⎭",u="⎪",f="Size4-Regular"):t==="\\lmoustache"||t==="⎰"?(o="⎧",c="⎭",u="⎪",f="Size4-Regular"):(t==="\\rmoustache"||t==="⎱")&&(o="⎫",c="⎩",u="⎪",f="Size4-Regular");var m=Ao(o,f,s),b=m.height+m.depth,y=Ao(u,f,s),E=y.height+y.depth,w=Ao(c,f,s),x=w.height+w.depth,_=0,A=1;if(l!==null){var S=Ao(l,f,s);_=S.height+S.depth,A=2}var I=b+x+_,N=Math.max(0,Math.ceil((r-I)/(A*E))),U=I+N*A*E,z=i.fontMetrics().axisHeight;n&&(z*=i.sizeMultiplier);var Z=U/2-z,V=[];if(d.length>0){var ae=U-b-x,J=Math.round(U*1e3),Y=eU(d,Math.round(ae*1e3)),de=new Fi(d,Y),xe=he(h/1e3),Ue=he(J/1e3),He=new ni([de],{width:xe,height:Ue,viewBox:"0 0 "+h+" "+J}),L=zi([],[He],i);L.height=J/1e3,L.style.width=xe,L.style.height=Ue,V.push({type:"elem",elem:L})}else{if(V.push(Dd(c,f,s)),V.push(gu),l===null){var Re=U-b-x+2*zf;V.push(Md(u,Re,i))}else{var Q=(U-b-x-_)/2+2*zf;V.push(Md(u,Q,i)),V.push(gu),V.push(Dd(l,f,s)),V.push(gu),V.push(Md(u,Q,i))}V.push(gu),V.push(Dd(o,f,s))}var M=i.havingBaseStyle(Oe.TEXT),pe=Xe({positionType:"bottom",positionData:Z,children:V});return Vp(ie(["delimsizing","mult"],[pe],M),Oe.TEXT,i,a)},Bd=80,Fd=.08,zd=function(t,r,n,i,s){var a=Qj(t,i,n),o=new Fi(t,a),l=new ni([o],{width:"400em",height:he(r),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return zi(["hide-tail"],[l],s)},WU=function(t,r){var n=r.havingBaseSizing(),i=Y_("\\surd",t*n.sizeMultiplier,Z_,n),s=n.sizeMultiplier,a=Math.max(0,r.minRuleThickness-r.fontMetrics().sqrtRuleThickness),o,l,u,c,d;return i.type==="small"?(c=1e3+1e3*a+Bd,t<1?s=1:t<1.4&&(s=.7),l=(1+a+Fd)/s,u=(1+a)/s,o=zd("sqrtMain",l,c,a,r),o.style.minWidth="0.853em",d=.833/s):i.type==="large"?(c=(1e3+Bd)*Mo[i.size],u=(Mo[i.size]+a)/s,l=(Mo[i.size]+a+Fd)/s,o=zd("sqrtSize"+i.size,l,c,a,r),o.style.minWidth="1.02em",d=1/s):(l=t+a+Fd,u=t+a,c=Math.floor(1e3*t+a)+Bd,o=zd("sqrtTall",l,c,a,r),o.style.minWidth="0.742em",d=1.056),o.height=u,o.style.height=he(l),{span:o,advanceWidth:d,ruleWidth:(r.fontMetrics().sqrtRuleThickness+a)*s}},q_=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),ZU=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),G_=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),Mo=[0,1.2,1.8,2.4,3],W_=function(t,r,n,i,s){if(t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle"),q_.has(t)||G_.has(t))return H_(t,r,!1,n,i,s);if(ZU.has(t))return V_(t,Mo[r],!1,n,i,s);throw new le("Illegal delimiter: '"+t+"'")},YU=[{type:"small",style:Oe.SCRIPTSCRIPT},{type:"small",style:Oe.SCRIPT},{type:"small",style:Oe.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],KU=[{type:"small",style:Oe.SCRIPTSCRIPT},{type:"small",style:Oe.SCRIPT},{type:"small",style:Oe.TEXT},{type:"stack"}],Z_=[{type:"small",style:Oe.SCRIPTSCRIPT},{type:"small",style:Oe.SCRIPT},{type:"small",style:Oe.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],XU=function(t){if(t.type==="small")return"Main-Regular";if(t.type==="large")return"Size"+t.size+"-Regular";if(t.type==="stack")return"Size4-Regular";var r=t.type;throw new Error("Add support for delim type '"+r+"' here.")},Y_=function(t,r,n,i){for(var s=Math.min(2,3-i.style.size),a=s;a<n.length;a++){var o=n[a];if(o.type==="stack")break;var l=Ao(t,XU(o),"math"),u=l.height+l.depth;if(o.type==="small"){var c=i.havingBaseStyle(o.style);u*=c.sizeMultiplier}if(u>r)return o}return n[n.length-1]},$f=function(t,r,n,i,s,a){t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle");var o;G_.has(t)?o=YU:q_.has(t)?o=Z_:o=KU;var l=Y_(t,r,o,i);return l.type==="small"?HU(t,l.style,n,i,s,a):l.type==="large"?H_(t,l.size,n,i,s,a):V_(t,r,n,i,s,a)},$d=function(t,r,n,i,s,a){var o=i.fontMetrics().axisHeight*i.sizeMultiplier,l=901,u=5/i.fontMetrics().ptPerEm,c=Math.max(r-o,n+o),d=Math.max(c/500*l,2*c-u);return $f(t,d,!0,i,s,a)},j2={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},QU=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function U2(e){return"isMiddle"in e}function N0(e,t){var r=C0(e);if(r&&QU.has(r.text))return r;throw r?new le("Invalid delimiter '"+r.text+"' after '"+t.funcName+"'",e):new le("Invalid delimiter type '"+e.type+"'",e)}me({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var r=N0(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:j2[e.funcName].size,mclass:j2[e.funcName].mclass,delim:r.text}},htmlBuilder:(e,t)=>e.delim==="."?ie([e.mclass]):W_(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!=="."&&t.push(Zr(e.delim,e.mode));var r=new ue("mo",t);e.mclass==="mopen"||e.mclass==="mclose"?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=he(Mo[e.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}});function H2(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}me({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=e.parser.gullet.macros.get("\\current@color");if(r&&typeof r!="string")throw new le("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:N0(t[0],e).text,color:r}}});me({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=N0(t[0],e),n=e.parser;++n.leftrightDepth;var i=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var s=Fe(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:i,left:r.text,right:s.delim,rightColor:s.color}},htmlBuilder:(e,t)=>{H2(e);for(var r=zt(e.body,t,!0,["mopen","mclose"]),n=0,i=0,s=!1,a=0;a<r.length;a++){var o=r[a];U2(o)?s=!0:(n=Math.max(r[a].height,n),i=Math.max(r[a].depth,i))}n*=t.sizeMultiplier,i*=t.sizeMultiplier;var l;if(e.left==="."?l=ll(t,["mopen"]):l=$d(e.left,n,i,t,e.mode,["mopen"]),r.unshift(l),s)for(var u=1;u<r.length;u++){var c=r[u];if(U2(c)){var d=c.isMiddle;r[u]=$d(d.delim,n,i,d.options,e.mode,[])}}var h;if(e.right===".")h=ll(t,["mclose"]);else{var f=e.rightColor?t.withColor(e.rightColor):t;h=$d(e.right,n,i,f,e.mode,["mclose"])}return r.push(h),ie(["minner"],r,t)},mathmlBuilder:(e,t)=>{H2(e);var r=Dr(e.body,t);if(e.left!=="."){var n=new ue("mo",[Zr(e.left,e.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if(e.right!=="."){var i=new ue("mo",[Zr(e.right,e.mode)]);i.setAttribute("fence","true"),e.rightColor&&i.setAttribute("mathcolor",e.rightColor),r.push(i)}return jp(r)}});me({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=N0(t[0],e);if(!e.parser.leftrightDepth)throw new le("\\middle without preceding \\left",r);return{type:"middle",mode:e.parser.mode,delim:r.text}},htmlBuilder:(e,t)=>{var r;return e.delim==="."?r=ll(t,[]):(r=W_(e.delim,1,t,e.mode,[]),r.isMiddle={delim:e.delim,options:t}),r},mathmlBuilder:(e,t)=>{var r=e.delim==="\\vert"||e.delim==="|"?Zr("|","text"):Zr(e.delim,e.mode),n=new ue("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var R0=(e,t)=>{var r=Oa(Qe(e.body,t),t),n=e.label.slice(1),i=t.sizeMultiplier,s,a,o=ai(e.body);if(n==="sout")s=ie(["stretchy","sout"]),s.height=t.fontMetrics().defaultRuleThickness/i,a=-.5*t.fontMetrics().xHeight;else if(n==="phase"){var l=xt({number:.6,unit:"pt"},t),u=xt({number:.35,unit:"ex"},t),c=t.havingBaseSizing();i=i/c.sizeMultiplier;var d=r.height+r.depth+l+u;r.style.paddingLeft=he(d/2+l);var h=Math.floor(1e3*d*i),f=Kj(h),m=new ni([new Fi("phase",f)],{width:"400em",height:he(h/1e3),viewBox:"0 0 400000 "+h,preserveAspectRatio:"xMinYMin slice"});s=zi(["hide-tail"],[m],t),s.style.height=he(d),a=r.depth+l+u}else{/cancel/.test(n)?o||r.classes.push("cancel-pad"):n==="angl"?r.classes.push("anglpad"):r.classes.push("boxpad");var b,y,E=0;/box/.test(n)?(E=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),b=t.fontMetrics().fboxsep+(n==="colorbox"?0:E),y=b):n==="angl"?(E=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),b=4*E,y=Math.max(0,.25-r.depth)):(b=o?.2:0,y=b),s=OU(r,n,b,y,t),/fbox|boxed|fcolorbox/.test(n)?(s.style.borderStyle="solid",s.style.borderWidth=he(E)):n==="angl"&&E!==.049&&(s.style.borderTopWidth=he(E),s.style.borderRightWidth=he(E)),a=r.depth+y,e.backgroundColor&&(s.style.backgroundColor=e.backgroundColor,e.borderColor&&(s.style.borderColor=e.borderColor))}var w;if(e.backgroundColor)w=Xe({positionType:"individualShift",children:[{type:"elem",elem:s,shift:a},{type:"elem",elem:r,shift:0}]});else{var x=/cancel|phase/.test(n)?["svg-align"]:[];w=Xe({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:s,shift:a,wrapperClasses:x}]})}return/cancel/.test(n)&&(w.height=r.height,w.depth=r.depth),/cancel/.test(n)&&!o?ie(["mord","cancel-lap"],[w],t):ie(["mord"],[w],t)},P0=(e,t)=>{var r,n=new ue(e.label.includes("colorbox")?"mpadded":"menclose",[st(e.body,t)]);switch(e.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),e.label==="\\fcolorbox"){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);n.setAttribute("style","border: "+he(i)+" solid "+e.borderColor)}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n};me({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,t,r){var{parser:n,funcName:i}=e,s=Fe(t[0],"color-token").color,a=t[1];return{type:"enclose",mode:n.mode,label:i,backgroundColor:s,body:a}},htmlBuilder:R0,mathmlBuilder:P0});me({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,t,r){var{parser:n,funcName:i}=e,s=Fe(t[0],"color-token").color,a=Fe(t[1],"color-token").color,o=t[2];return{type:"enclose",mode:n.mode,label:i,backgroundColor:a,borderColor:s,body:o}},htmlBuilder:R0,mathmlBuilder:P0});me({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\fbox",body:t[0]}}});me({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e,i=t[0];return{type:"enclose",mode:r.mode,label:n,body:i}},htmlBuilder:R0,mathmlBuilder:P0});me({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r,funcName:n}=e;r.mode==="math"&&r.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var i=t[0];return{type:"enclose",mode:r.mode,label:n,body:i}},htmlBuilder:R0,mathmlBuilder:P0});me({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\angl",body:t[0]}}});var K_={};function Ln(e){for(var{type:t,names:r,props:n,handler:i,htmlBuilder:s,mathmlBuilder:a}=e,o={type:t,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},l=0;l<r.length;++l)K_[r[l]]=o;s&&(kc[t]=s),a&&(Sc[t]=a)}var X_={};function R(e,t){X_[e]=t}class vr{constructor(t,r,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=t,this.start=r,this.end=n}static range(t,r){return r?!t||!t.loc||!r.loc||t.loc.lexer!==r.loc.lexer?null:new vr(t.loc.lexer,t.loc.start,r.loc.end):t&&t.loc}}class Cr{constructor(t,r){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=t,this.loc=r}range(t,r){return new Cr(r,vr.range(this,t))}}function V2(e){var t=[];e.consumeSpaces();var r=e.fetch().text;for(r==="\\relax"&&(e.consume(),e.consumeSpaces(),r=e.fetch().text);r==="\\hline"||r==="\\hdashline";)e.consume(),t.push(r==="\\hdashline"),e.consumeSpaces(),r=e.fetch().text;return t}var O0=e=>{var t=e.parser.settings;if(!t.displayMode)throw new le("{"+e.envName+"} can be used only in display mode.")},JU=new Set(["gather","gather*"]);function qp(e){if(!e.includes("ed"))return!e.includes("*")}function Zi(e,t,r){var{hskipBeforeAndAfter:n,addJot:i,cols:s,arraystretch:a,colSeparationType:o,autoTag:l,singleRow:u,emptySingleRow:c,maxNumCols:d,leqno:h}=t;if(e.gullet.beginGroup(),u||e.gullet.macros.set("\\cr","\\\\\\relax"),!a){var f=e.gullet.expandMacroAsText("\\arraystretch");if(f==null)a=1;else if(a=parseFloat(f),!a||a<0)throw new le("Invalid \\arraystretch: "+f)}e.gullet.beginGroup();var m=[],b=[m],y=[],E=[],w=l!=null?[]:void 0;function x(){l&&e.gullet.macros.set("\\@eqnsw","1",!0)}function _(){w&&(e.gullet.macros.get("\\df@tag")?(w.push(e.subparse([new Cr("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):w.push(!!l&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(x(),E.push(V2(e));;){var A=e.parseExpression(!1,u?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var S={type:"ordgroup",mode:e.mode,body:A};r&&(S={type:"styling",mode:e.mode,style:r,resetFont:!0,body:[S]}),m.push(S);var I=e.fetch().text;if(I==="&"){if(d&&m.length===d){if(u||o)throw new le("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(I==="\\end"){_(),m.length===1&&S.type==="styling"&&S.body.length===1&&S.body[0].type==="ordgroup"&&S.body[0].body.length===0&&(b.length>1||!c)&&b.pop(),E.length<b.length+1&&E.push([]);break}else if(I==="\\\\"){e.consume();var N=void 0;e.gullet.future().text!==" "&&(N=e.parseSizeGroup(!0)),y.push(N?N.value:null),_(),E.push(V2(e)),m=[],b.push(m),x()}else throw new le("Expected & or \\\\ or \\cr or \\end",e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:i,arraystretch:a,body:b,cols:s,rowGaps:y,hskipBeforeAndAfter:n,hLinesBeforeRow:E,colSeparationType:o,tags:w,leqno:h}}function Gp(e){return e.slice(0,1)==="d"?"display":"text"}var Dn=function(t,r){var n,i,s=t.body.length,a=t.hLinesBeforeRow,o=0,l=new Array(s),u=[],c=Math.max(r.fontMetrics().arrayRuleWidth,r.minRuleThickness),d=1/r.fontMetrics().ptPerEm,h=5*d;if(t.colSeparationType&&t.colSeparationType==="small"){var f=r.havingStyle(Oe.SCRIPT).sizeMultiplier;h=.2778*(f/r.sizeMultiplier)}var m=t.colSeparationType==="CD"?xt({number:3,unit:"ex"},r):12*d,b=3*d,y=t.arraystretch*m,E=.7*y,w=.3*y,x=0;function _(Ee){for(var ke=0;ke<Ee.length;++ke)ke>0&&(x+=.25),u.push({pos:x,isDashed:Ee[ke]})}for(_(a[0]),n=0;n<t.body.length;++n){var A=t.body[n],S=E,I=w;o<A.length&&(o=A.length);var N={cells:new Array(A.length),height:0,depth:0,pos:0};for(i=0;i<A.length;++i){var U=Qe(A[i],r);I<U.depth&&(I=U.depth),S<U.height&&(S=U.height),N.cells[i]=U}var z=t.rowGaps[n],Z=0;z&&(Z=xt(z,r),Z>0&&(Z+=w,I<Z&&(I=Z),Z=0)),t.addJot&&n<t.body.length-1&&(I+=b),N.height=S,N.depth=I,x+=S,N.pos=x,x+=I+Z,l[n]=N,_(a[n+1])}var V=x/2+r.fontMetrics().axisHeight,ae=t.cols||[],J=[],Y,de,xe=[];if(t.tags&&t.tags.some(Ee=>Ee))for(n=0;n<s;++n){var Ue=l[n],He=Ue.pos-V,L=t.tags[n],Re=void 0;L===!0?Re=ie(["eqn-num"],[],r):L===!1?Re=ie([],[],r):Re=ie([],zt(L,r,!0),r),Re.depth=Ue.depth,Re.height=Ue.height,xe.push({type:"elem",elem:Re,shift:He})}for(i=0,de=0;i<o||de<ae.length;++i,++de){for(var Q,M=ae[de],pe=!0;((oe=M)==null?void 0:oe.type)==="separator";){var oe;if(pe||(Y=ie(["arraycolsep"],[]),Y.style.width=he(r.fontMetrics().doubleRuleSep),J.push(Y)),M.separator==="|"||M.separator===":"){var fe=M.separator==="|"?"solid":"dashed",Ae=ie(["vertical-separator"],[],r);Ae.style.height=he(x),Ae.style.borderRightWidth=he(c),Ae.style.borderRightStyle=fe,Ae.style.margin="0 "+he(-c/2);var ze=x-V;ze&&(Ae.style.verticalAlign=he(-ze)),J.push(Ae)}else throw new le("Invalid separator type: "+M.separator);de++,M=ae[de],pe=!1}if(!(i>=o)){var re=void 0;if(i>0||t.hskipBeforeAndAfter){var Le,et;re=(Le=(et=M)==null?void 0:et.pregap)!=null?Le:h,re!==0&&(Y=ie(["arraycolsep"],[]),Y.style.width=he(re),J.push(Y))}var Te=[];for(n=0;n<s;++n){var Ke=l[n],ot=Ke.cells[i];if(ot){var Rt=Ke.pos-V;ot.depth=Ke.depth,ot.height=Ke.height,Te.push({type:"elem",elem:ot,shift:Rt})}}var bn=Xe({positionType:"individualShift",children:Te}),Jr=ie(["col-align-"+(((Q=M)==null?void 0:Q.align)||"c")],[bn]);if(J.push(Jr),i<o-1||t.hskipBeforeAndAfter){var $n,_r;re=($n=(_r=M)==null?void 0:_r.postgap)!=null?$n:h,re!==0&&(Y=ie(["arraycolsep"],[]),Y.style.width=he(re),J.push(Y))}}}var en=ie(["mtable"],J);if(u.length>0){for(var ao=Pa("hline",r,c),oo=Pa("hdashline",r,c),Qi=[{type:"elem",elem:en,shift:0}];u.length>0;){var qs=u.pop(),Se=qs.pos-V;qs.isDashed?Qi.push({type:"elem",elem:oo,shift:Se}):Qi.push({type:"elem",elem:ao,shift:Se})}en=Xe({positionType:"individualShift",children:Qi})}if(xe.length===0)return ie(["mord"],[en],r);var W=Xe({positionType:"individualShift",children:xe}),ne=ie(["tag"],[W],r);return li([en,ne])},eH={c:"center ",l:"left ",r:"right "},Mn=function(t,r){for(var n=[],i=new ue("mtd",[],["mtr-glue"]),s=new ue("mtd",[],["mml-eqn-num"]),a=0;a<t.body.length;a++){for(var o=t.body[a],l=[],u=0;u<o.length;u++)l.push(new ue("mtd",[st(o[u],r)]));t.tags&&t.tags[a]&&(l.unshift(i),l.push(i),t.leqno?l.unshift(s):l.push(s)),n.push(new ue("mtr",l))}var c=new ue("mtable",n),d=t.arraystretch===.5?.1:.16+t.arraystretch-1+(t.addJot?.09:0);c.setAttribute("rowspacing",he(d));var h="",f="";if(t.cols&&t.cols.length>0){var m=t.cols,b="",y=!1,E=0,w=m.length;m[0].type==="separator"&&(h+="top ",E=1),m[m.length-1].type==="separator"&&(h+="bottom ",w-=1);for(var x=E;x<w;x++){var _=m[x];_.type==="align"?(f+=eH[_.align],y&&(b+="none "),y=!0):_.type==="separator"&&y&&(b+=_.separator==="|"?"solid ":"dashed ",y=!1)}c.setAttribute("columnalign",f.trim()),/[sd]/.test(b)&&c.setAttribute("columnlines",b.trim())}if(t.colSeparationType==="align"){for(var A=t.cols||[],S="",I=1;I<A.length;I++)S+=I%2?"0em ":"1em ";c.setAttribute("columnspacing",S.trim())}else t.colSeparationType==="alignat"||t.colSeparationType==="gather"?c.setAttribute("columnspacing","0em"):t.colSeparationType==="small"?c.setAttribute("columnspacing","0.2778em"):t.colSeparationType==="CD"?c.setAttribute("columnspacing","0.5em"):c.setAttribute("columnspacing","1em");var N="",U=t.hLinesBeforeRow;h+=U[0].length>0?"left ":"",h+=U[U.length-1].length>0?"right ":"";for(var z=1;z<U.length-1;z++)N+=U[z].length===0?"none ":U[z][0]?"dashed ":"solid ";return/[sd]/.test(N)&&c.setAttribute("rowlines",N.trim()),h!==""&&(c=new ue("menclose",[c]),c.setAttribute("notation",h.trim())),t.arraystretch&&t.arraystretch<1&&(c=new ue("mstyle",[c]),c.setAttribute("scriptlevel","1")),c},Q_=function(t,r){t.envName.includes("ed")||O0(t);var n=[],i=t.envName.includes("at")?"alignat":"align",s=t.envName==="split",a=Zi(t.parser,{cols:n,addJot:!0,autoTag:s?void 0:qp(t.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:s?2:void 0,leqno:t.parser.settings.leqno},"display"),o=0,l=0,u={type:"ordgroup",mode:t.mode,body:[]};if(r[0]&&r[0].type==="ordgroup"){for(var c="",d=0;d<r[0].body.length;d++){var h=Fe(r[0].body[d],"textord");c+=h.text}o=Number(c),l=o*2}var f=!l;a.body.forEach(function(E){for(var w=1;w<E.length;w+=2){var x=Fe(E[w],"styling"),_=Fe(x.body[0],"ordgroup");_.body.unshift(u)}if(f)l<E.length&&(l=E.length);else{var A=E.length/2;if(o<A)throw new le("Too many math in a row: "+("expected "+o+", but got "+A),E[0])}});for(var m=0;m<l;++m){var b="r",y=0;m%2===1?b="l":m>0&&f&&(y=1),n[m]={type:"align",align:b,pregap:y,postgap:0}}return a.colSeparationType=f?"align":"alignat",a};Ln({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var r=C0(t[0]),n=r?[t[0]]:Fe(t[0],"ordgroup").body,i=n.map(function(a){var o=A0(a),l=o.text;if("lcr".includes(l))return{type:"align",align:l};if(l==="|")return{type:"separator",separator:"|"};if(l===":")return{type:"separator",separator:":"};throw new le("Unknown column alignment: "+l,a)}),s={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return Zi(e.parser,s,Gp(e.envName))},htmlBuilder:Dn,mathmlBuilder:Mn});Ln({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if(e.envName.charAt(e.envName.length-1)==="*"){var i=e.parser;if(i.consumeSpaces(),i.fetch().text==="["){if(i.consume(),i.consumeSpaces(),r=i.fetch().text,!"lcr".includes(r))throw new le("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),n.cols=[{type:"align",align:r}]}}var s=Zi(e.parser,n,Gp(e.envName)),a=Math.max(0,...s.body.map(o=>o.length));return s.cols=new Array(a).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[s],left:t[0],right:t[1],rightColor:void 0}:s},htmlBuilder:Dn,mathmlBuilder:Mn});Ln({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:.5},r=Zi(e.parser,t,"script");return r.colSeparationType="small",r},htmlBuilder:Dn,mathmlBuilder:Mn});Ln({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var r=C0(t[0]),n=r?[t[0]]:Fe(t[0],"ordgroup").body,i=n.map(function(o){var l=A0(o),u=l.text;if("lc".includes(u))return{type:"align",align:u};throw new le("Unknown column alignment: "+u,o)});if(i.length>1)throw new le("{subarray} can contain only one column");var s={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5},a=Zi(e.parser,s,"script");if(a.body.length>0&&a.body[0].length>1)throw new le("{subarray} can contain only one column");return a},htmlBuilder:Dn,mathmlBuilder:Mn});Ln({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},r=Zi(e.parser,t,Gp(e.envName));return{type:"leftright",mode:e.mode,body:[r],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:Dn,mathmlBuilder:Mn});Ln({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Q_,htmlBuilder:Dn,mathmlBuilder:Mn});Ln({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){JU.has(e.envName)&&O0(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:qp(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Zi(e.parser,t,"display")},htmlBuilder:Dn,mathmlBuilder:Mn});Ln({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Q_,htmlBuilder:Dn,mathmlBuilder:Mn});Ln({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){O0(e);var t={autoTag:qp(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Zi(e.parser,t,"display")},htmlBuilder:Dn,mathmlBuilder:Mn});Ln({type:"array",names:["CD"],props:{numArgs:0},handler(e){return O0(e),jU(e.parser)},htmlBuilder:Dn,mathmlBuilder:Mn});R("\\nonumber","\\gdef\\@eqnsw{0}");R("\\notag","\\nonumber");me({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new le(e.funcName+" valid only within array environment")}});var q2=K_;me({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:r,funcName:n}=e,i=t[0];if(i.type!=="ordgroup")throw new le("Invalid environment name",i);for(var s="",a=0;a<i.body.length;++a)s+=Fe(i.body[a],"textord").text;if(n==="\\begin"){if(!q2.hasOwnProperty(s))throw new le("No such environment: "+s,i);var o=q2[s],{args:l,optArgs:u}=r.parseArguments("\\begin{"+s+"}",o),c={mode:r.mode,envName:s,parser:r},d=o.handler(c,l,u);r.expect("\\end",!1);var h=r.nextToken,f=Fe(r.parseFunction(),"environment");if(f.name!==s)throw new le("Mismatch: \\begin{"+s+"} matched by \\end{"+f.name+"}",h);return d}return{type:"environment",mode:r.mode,name:s,nameGroup:i}}});var J_=(e,t)=>{var r=e.font,n=t.withFont(r);return Qe(e.body,n)},eT=(e,t)=>{var r=e.font,n=t.withFont(r);return st(e.body,n)},G2={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};me({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=Ac(t[0]),s=n;return s in G2&&(s=G2[s]),{type:"font",mode:r.mode,font:s.slice(1),body:i}},htmlBuilder:J_,mathmlBuilder:eT});me({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"mclass",mode:r.mode,mclass:I0(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:ai(n)}}});me({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n,breakOnTokenText:i}=e,{mode:s}=r,a=r.parseExpression(!0,i);return{type:"font",mode:s,font:"math"+n.slice(1),body:{type:"ordgroup",mode:r.mode,body:a}}},htmlBuilder:J_,mathmlBuilder:eT});var tH=(e,t)=>{var r=t.style,n=r.fracNum(),i=r.fracDen(),s;s=t.havingStyle(n);var a=Qe(e.numer,s,t);if(e.continued){var o=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;a.height=a.height<o?o:a.height,a.depth=a.depth<l?l:a.depth}s=t.havingStyle(i);var u=Qe(e.denom,s,t),c,d,h;e.hasBarLine?(e.barSize?(d=xt(e.barSize,t),c=Pa("frac-line",t,d)):c=Pa("frac-line",t),d=c.height,h=c.height):(c=null,d=0,h=t.fontMetrics().defaultRuleThickness);var f,m,b;r.size===Oe.DISPLAY.size?(f=t.fontMetrics().num1,d>0?m=3*h:m=7*h,b=t.fontMetrics().denom1):(d>0?(f=t.fontMetrics().num2,m=h):(f=t.fontMetrics().num3,m=3*h),b=t.fontMetrics().denom2);var y;if(c){var w=t.fontMetrics().axisHeight;f-a.depth-(w+.5*d)<m&&(f+=m-(f-a.depth-(w+.5*d))),w-.5*d-(u.height-b)<m&&(b+=m-(w-.5*d-(u.height-b)));var x=-(w-.5*d);y=Xe({positionType:"individualShift",children:[{type:"elem",elem:u,shift:b},{type:"elem",elem:c,shift:x},{type:"elem",elem:a,shift:-f}]})}else{var E=f-a.depth-(u.height-b);E<m&&(f+=.5*(m-E),b+=.5*(m-E)),y=Xe({positionType:"individualShift",children:[{type:"elem",elem:u,shift:b},{type:"elem",elem:a,shift:-f}]})}s=t.havingStyle(r),y.height*=s.sizeMultiplier/t.sizeMultiplier,y.depth*=s.sizeMultiplier/t.sizeMultiplier;var _;r.size===Oe.DISPLAY.size?_=t.fontMetrics().delim1:r.size===Oe.SCRIPTSCRIPT.size?_=t.havingStyle(Oe.SCRIPT).fontMetrics().delim2:_=t.fontMetrics().delim2;var A,S;return e.leftDelim==null?A=ll(t,["mopen"]):A=$f(e.leftDelim,_,!0,t.havingStyle(r),e.mode,["mopen"]),e.continued?S=ie([]):e.rightDelim==null?S=ll(t,["mclose"]):S=$f(e.rightDelim,_,!0,t.havingStyle(r),e.mode,["mclose"]),ie(["mord"].concat(s.sizingClasses(t)),[A,ie(["mfrac"],[y]),S],t)},rH=(e,t)=>{var r=new ue("mfrac",[st(e.numer,t),st(e.denom,t)]);if(!e.hasBarLine)r.setAttribute("linethickness","0px");else if(e.barSize){var n=xt(e.barSize,t);r.setAttribute("linethickness",he(n))}if(e.leftDelim!=null||e.rightDelim!=null){var i=[];if(e.leftDelim!=null){var s=new ue("mo",[new It(e.leftDelim.replace("\\",""))]);s.setAttribute("fence","true"),i.push(s)}if(i.push(r),e.rightDelim!=null){var a=new ue("mo",[new It(e.rightDelim.replace("\\",""))]);a.setAttribute("fence","true"),i.push(a)}return jp(i)}return r},tT=(e,t)=>{if(!t)return e;var r={type:"styling",mode:e.mode,style:t,body:[e]};return r};me({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0],s=t[1],a,o=null,l=null;switch(n){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":a=!0;break;case"\\\\atopfrac":a=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":a=!1,o="(",l=")";break;case"\\\\bracefrac":a=!1,o="\\{",l="\\}";break;case"\\\\brackfrac":a=!1,o="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}var u=n==="\\cfrac",c=null;return u||n.startsWith("\\d")?c="display":n.startsWith("\\t")&&(c="text"),tT({type:"genfrac",mode:r.mode,numer:i,denom:s,continued:u,hasBarLine:a,leftDelim:o,rightDelim:l,barSize:null},c)},htmlBuilder:tH,mathmlBuilder:rH});me({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:r,token:n}=e,i;switch(r){case"\\over":i="\\frac";break;case"\\choose":i="\\binom";break;case"\\atop":i="\\\\atopfrac";break;case"\\brace":i="\\\\bracefrac";break;case"\\brack":i="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:i,token:n}}});var W2=["display","text","script","scriptscript"],Z2=function(t){var r=null;return t.length>0&&(r=t,r=r==="."?null:r),r};me({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var{parser:r}=e,n=t[4],i=t[5],s=Ac(t[0]),a=s.type==="atom"&&s.family==="open"?Z2(s.text):null,o=Ac(t[1]),l=o.type==="atom"&&o.family==="close"?Z2(o.text):null,u=Fe(t[2],"size"),c,d=null;u.isBlank?c=!0:(d=u.value,c=d.number>0);var h=null,f=t[3];if(f.type==="ordgroup"){if(f.body.length>0){var m=Fe(f.body[0],"textord");h=W2[Number(m.text)]}}else f=Fe(f,"textord"),h=W2[Number(f.text)];return tT({type:"genfrac",mode:r.mode,numer:n,denom:i,continued:!1,hasBarLine:c,barSize:d,leftDelim:a,rightDelim:l},h)}});me({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:r,funcName:n,token:i}=e;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:Fe(t[0],"size").value,token:i}}});me({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0],s=Fe(t[1],"infix").size;if(!s)throw new Error("\\\\abovefrac expected size, but got "+String(s));var a=t[2],o=s.number>0;return{type:"genfrac",mode:r.mode,numer:i,denom:a,continued:!1,hasBarLine:o,barSize:s,leftDelim:null,rightDelim:null}}});var rT=(e,t)=>{var r=t.style,n,i;e.type==="supsub"?(n=e.sup?Qe(e.sup,t.havingStyle(r.sup()),t):Qe(e.sub,t.havingStyle(r.sub()),t),i=Fe(e.base,"horizBrace")):i=Fe(e,"horizBrace");var s=Qe(i.base,t.havingBaseStyle(Oe.DISPLAY)),a=S0(i,t),o;if(i.isOver?o=Xe({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:a,wrapperClasses:["svg-align"]}]}):o=Xe({positionType:"bottom",positionData:s.depth+.1+a.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:s}]}),n){var l=ie(["minner",i.isOver?"mover":"munder"],[o],t);i.isOver?o=Xe({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]}):o=Xe({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]})}return ie(["minner",i.isOver?"mover":"munder"],[o],t)},nH=(e,t)=>{var r=k0(e.label);return new ue(e.isOver?"mover":"munder",[st(e.base,t),r])};me({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e;return{type:"horizBrace",mode:r.mode,label:n,isOver:n.includes("\\over"),base:t[0]}},htmlBuilder:rT,mathmlBuilder:nH});me({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[1],i=Fe(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:r.mode,href:i,body:Ct(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var r=zt(e.body,t,!1);return gU(e.href,[],r,t)},mathmlBuilder:(e,t)=>{var r=$i(e.body,t);return r instanceof ue||(r=new ue("mrow",[r])),r.setAttribute("href",e.href),r}});me({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=Fe(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var i=[],s=0;s<n.length;s++){var a=n[s];a==="~"&&(a="\\textasciitilde"),i.push({type:"textord",mode:"text",text:a})}var o={type:"text",mode:r.mode,font:"\\texttt",body:i};return{type:"href",mode:r.mode,href:n,body:Ct(o)}}});me({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){var{parser:r}=e;return{type:"hbox",mode:r.mode,body:Ct(t[0])}},htmlBuilder(e,t){var r=zt(e.body,t.withFont(""),!1);return li(r)},mathmlBuilder(e,t){return new ue("mrow",Dr(e.body,t.withFont("")))}});me({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n,token:i}=e,s=Fe(t[0],"raw").string,a=t[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o,l={};switch(n){case"\\htmlClass":l.class=s,o={command:"\\htmlClass",class:s};break;case"\\htmlId":l.id=s,o={command:"\\htmlId",id:s};break;case"\\htmlStyle":l.style=s,o={command:"\\htmlStyle",style:s};break;case"\\htmlData":{for(var u=s.split(","),c=0;c<u.length;c++){var d=u[c],h=d.indexOf("=");if(h<0)throw new le("\\htmlData key/value '"+d+"' missing equals sign");var f=d.slice(0,h),m=d.slice(h+1);l["data-"+f.trim()]=m}o={command:"\\htmlData",attributes:l};break}default:throw new Error("Unrecognized html command")}return r.settings.isTrusted(o)?{type:"html",mode:r.mode,attributes:l,body:Ct(a)}:r.formatUnsupportedCmd(n)},htmlBuilder:(e,t)=>{var r=zt(e.body,t,!1),n=["enclosing"];e.attributes.class&&n.push(...e.attributes.class.trim().split(/\s+/));var i=ie(n,r,t);for(var s in e.attributes)s!=="class"&&e.attributes.hasOwnProperty(s)&&i.setAttribute(s,e.attributes[s]);return i},mathmlBuilder:(e,t)=>$i(e.body,t)});me({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"htmlmathml",mode:r.mode,html:Ct(t[0]),mathml:Ct(t[1])}},htmlBuilder:(e,t)=>{var r=zt(e.html,t,!1);return li(r)},mathmlBuilder:(e,t)=>$i(e.mathml,t)});var jd=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!r)throw new le("Invalid size: '"+t+"' in \\includegraphics");var n={number:+(r[1]+r[2]),unit:r[3]};if(!v_(n))throw new le("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};me({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,r)=>{var{parser:n}=e,i={number:0,unit:"em"},s={number:.9,unit:"em"},a={number:0,unit:"em"},o="";if(r[0])for(var l=Fe(r[0],"raw").string,u=l.split(","),c=0;c<u.length;c++){var d=u[c].split("=");if(d.length===2){var h=d[1].trim();switch(d[0].trim()){case"alt":o=h;break;case"width":i=jd(h);break;case"height":s=jd(h);break;case"totalheight":a=jd(h);break;default:throw new le("Invalid key: '"+d[0]+"' in \\includegraphics.")}}}var f=Fe(t[0],"url").url;return o===""&&(o=f,o=o.replace(/^.*[\\/]/,""),o=o.substring(0,o.lastIndexOf("."))),n.settings.isTrusted({command:"\\includegraphics",url:f})?{type:"includegraphics",mode:n.mode,alt:o,width:i,height:s,totalheight:a,src:f}:n.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var r=xt(e.height,t),n=0;e.totalheight.number>0&&(n=xt(e.totalheight,t)-r);var i=0;e.width.number>0&&(i=xt(e.width,t));var s={height:he(r+n)};i>0&&(s.width=he(i)),n>0&&(s.verticalAlign=he(-n));var a=new iU(e.src,e.alt,s);return a.height=r,a.depth=n,a},mathmlBuilder:(e,t)=>{var r=new ue("mglyph",[]);r.setAttribute("alt",e.alt);var n=xt(e.height,t),i=0;if(e.totalheight.number>0&&(i=xt(e.totalheight,t)-n,r.setAttribute("valign",he(-i))),r.setAttribute("height",he(n+i)),e.width.number>0){var s=xt(e.width,t);r.setAttribute("width",he(s))}return r.setAttribute("src",e.src),r}});me({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:n}=e,i=Fe(t[0],"size");if(r.settings.strict){var s=n[1]==="m",a=i.value.unit==="mu";s?(a||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+i.value.unit+" units")),r.mode!=="math"&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):a&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:i.value}},htmlBuilder(e,t){return k_(e.dimension,t)},mathmlBuilder(e,t){var r=xt(e.dimension,t);return new R_(r)}});me({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:i}},htmlBuilder:(e,t)=>{var r;e.alignment==="clap"?(r=ie([],[Qe(e.body,t)]),r=ie(["inner"],[r],t)):r=ie(["inner"],[Qe(e.body,t)]);var n=ie(["fix"],[]),i=ie([e.alignment],[r,n],t),s=ie(["strut"]);return s.style.height=he(i.height+i.depth),i.depth&&(s.style.verticalAlign=he(-i.depth)),i.children.unshift(s),i=ie(["thinbox"],[i],t),ie(["mord","vbox"],[i],t)},mathmlBuilder:(e,t)=>{var r=new ue("mpadded",[st(e.body,t)]);if(e.alignment!=="rlap"){var n=e.alignment==="llap"?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r}});me({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:r,parser:n}=e,i=n.mode;n.switchMode("math");var s=r==="\\("?"\\)":"$",a=n.parseExpression(!1,s);return n.expect(s),n.switchMode(i),{type:"styling",mode:n.mode,style:"text",resetFont:!0,body:a}}});me({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new le("Mismatched "+e.funcName)}});var Y2=(e,t)=>{switch(t.style.size){case Oe.DISPLAY.size:return e.display;case Oe.TEXT.size:return e.text;case Oe.SCRIPT.size:return e.script;case Oe.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};me({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"mathchoice",mode:r.mode,display:Ct(t[0]),text:Ct(t[1]),script:Ct(t[2]),scriptscript:Ct(t[3])}},htmlBuilder:(e,t)=>{var r=Y2(e,t),n=zt(r,t,!1);return li(n)},mathmlBuilder:(e,t)=>{var r=Y2(e,t);return $i(r,t)}});var nT=(e,t,r,n,i,s,a)=>{e=ie([],[e]);var o=r&&ai(r),l,u;if(t){var c=Qe(t,n.havingStyle(i.sup()),n);u={elem:c,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-c.depth)}}if(r){var d=Qe(r,n.havingStyle(i.sub()),n);l={elem:d,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-d.height)}}var h;if(u&&l){var f=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+a;h=Xe({positionType:"bottom",positionData:f,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:he(-s)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:he(s)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else if(l){var m=e.height-a;h=Xe({positionType:"top",positionData:m,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:he(-s)},{type:"kern",size:l.kern},{type:"elem",elem:e}]})}else if(u){var b=e.depth+a;h=Xe({positionType:"bottom",positionData:b,children:[{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:he(s)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else return e;var y=[h];if(l&&s!==0&&!o){var E=ie(["mspace"],[],n);E.style.marginRight=he(s),y.unshift(E)}return ie(["mop","op-limits"],y,n)},iT=new Set(["\\smallint"]),Ka=(e,t)=>{var r,n,i=!1,s;e.type==="supsub"?(r=e.sup,n=e.sub,s=Fe(e.base,"op"),i=!0):s=Fe(e,"op");var a=t.style,o=!1;a.size===Oe.DISPLAY.size&&s.symbol&&!iT.has(s.name)&&(o=!0);var l,u;if(s.symbol){var c=o?"Size2-Regular":"Size1-Regular",d="";if((s.name==="\\oiint"||s.name==="\\oiiint")&&(d=s.name.slice(1),s.name=d==="oiint"?"\\iint":"\\iiint"),l=dr(s.name,c,"math",t,["mop","op-symbol",o?"large-op":"small-op"]),u=l.italic,d.length>0){var h=A_(d+"Size"+(o?"2":"1"),t);l=Xe({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:h,shift:o?.08:0}]}),s.name="\\"+d,l.classes.unshift("mop"),l.italic=u}}else if(s.body){var f=zt(s.body,t,!0);f.length===1&&f[0]instanceof Pr?(l=f[0],l.classes[0]="mop"):l=ie(["mop"],f,t)}else{for(var m=[],b=1;b<s.name.length;b++)m.push(zp(s.name[b],s.mode,t));l=ie(["mop"],m,t)}var y=0,E=0;if((l instanceof Pr||s.name==="\\oiint"||s.name==="\\oiiint")&&!s.suppressBaseShift){var w;y=(l.height-l.depth)/2-t.fontMetrics().axisHeight,E=(w=l.italic)!=null?w:0}return i?nT(l,r,n,t,a,E,y):(y&&(l.style.position="relative",l.style.top=he(y)),l)},Ol=(e,t)=>{var r;if(e.symbol)r=new ue("mo",[Zr(e.name,e.mode)]),iT.has(e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new ue("mo",Dr(e.body,t));else{r=new ue("mi",[new It(e.name.slice(1))]);var n=new ue("mo",[Zr("⁡","text")]);e.parentIsSupSub?r=new ue("mrow",[r,n]):r=N_([r,n])}return r},iH={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};me({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=n;return i.length===1&&(i=iH[i]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:Ka,mathmlBuilder:Ol});me({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Ct(n)}},htmlBuilder:Ka,mathmlBuilder:Ol});var sH={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};me({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:Ka,mathmlBuilder:Ol});me({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:Ka,mathmlBuilder:Ol});me({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:r}=e,n=r;return n.length===1&&(n=sH[n]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:Ka,mathmlBuilder:Ol});var sT=(e,t)=>{var r,n,i=!1,s;e.type==="supsub"?(r=e.sup,n=e.sub,s=Fe(e.base,"operatorname"),i=!0):s=Fe(e,"operatorname");var a;if(s.body.length>0){for(var o=s.body.map(d=>{var h="text"in d?d.text:void 0;return typeof h=="string"?{type:"textord",mode:d.mode,text:h}:d}),l=zt(o,t.withFont("mathrm"),!0),u=0;u<l.length;u++){var c=l[u];c instanceof Pr&&(c.text=c.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}a=ie(["mop"],l,t)}else a=ie(["mop"],[],t);return i?nT(a,r,n,t,t.style,0,0):a},aH=(e,t)=>{for(var r=Dr(e.body,t.withFont("mathrm")),n=!0,i=0;i<r.length;i++){var s=r[i];if(!(s instanceof R_))if(s instanceof ue)switch(s.type){case"mi":case"mn":case"mspace":case"mtext":break;case"mo":{var a=s.children[0];s.children.length===1&&a instanceof It?a.text=a.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break}default:n=!1}else n=!1}if(n){var o=r.map(c=>c.toText()).join("");r=[new It(o)]}var l=new ue("mi",r);l.setAttribute("mathvariant","normal");var u=new ue("mo",[Zr("⁡","text")]);return e.parentIsSupSub?new ue("mrow",[l,u]):N_([l,u])};me({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0];return{type:"operatorname",mode:r.mode,body:Ct(i),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:sT,mathmlBuilder:aH});R("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");js({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?li(zt(e.body,t,!1)):ie(["mord"],zt(e.body,t,!0),t)},mathmlBuilder(e,t){return $i(e.body,t,!0)}});me({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:r}=e,n=t[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(e,t){var r=Qe(e.body,t.havingCrampedStyle()),n=Pa("overline-line",t),i=t.fontMetrics().defaultRuleThickness,s=Xe({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n},{type:"kern",size:i}]});return ie(["mord","overline"],[s],t)},mathmlBuilder(e,t){var r=new ue("mo",[new It("‾")]);r.setAttribute("stretchy","true");var n=new ue("mover",[st(e.body,t),r]);return n.setAttribute("accent","true"),n}});me({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"phantom",mode:r.mode,body:Ct(n)}},htmlBuilder:(e,t)=>{var r=zt(e.body,t.withPhantom(),!1);return li(r)},mathmlBuilder:(e,t)=>{var r=Dr(e.body,t);return new ue("mphantom",r)}});R("\\hphantom","\\smash{\\phantom{#1}}");me({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:(e,t)=>{var r=ie(["inner"],[Qe(e.body,t.withPhantom())]),n=ie(["fix"],[]);return ie(["mord","rlap"],[r,n],t)},mathmlBuilder:(e,t)=>{var r=Dr(Ct(e.body),t),n=new ue("mphantom",r),i=new ue("mpadded",[n]);return i.setAttribute("width","0px"),i}});me({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e,n=Fe(t[0],"size").value,i=t[1];return{type:"raisebox",mode:r.mode,dy:n,body:i}},htmlBuilder(e,t){var r=Qe(e.body,t),n=xt(e.dy,t);return Xe({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]})},mathmlBuilder(e,t){var r=new ue("mpadded",[st(e.body,t)]),n=e.dy.number+e.dy.unit;return r.setAttribute("voffset",n),r}});me({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}});me({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,r){var{parser:n}=e,i=r[0],s=Fe(t[0],"size"),a=Fe(t[1],"size");return{type:"rule",mode:n.mode,shift:i&&Fe(i,"size").value,width:s.value,height:a.value}},htmlBuilder(e,t){var r=ie(["mord","rule"],[],t),n=xt(e.width,t),i=xt(e.height,t),s=e.shift?xt(e.shift,t):0;return r.style.borderRightWidth=he(n),r.style.borderTopWidth=he(i),r.style.bottom=he(s),r.width=n,r.height=i+s,r.depth=-s,r.maxFontSize=i*1.125*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=xt(e.width,t),n=xt(e.height,t),i=e.shift?xt(e.shift,t):0,s=t.color&&t.getColor()||"black",a=new ue("mspace");a.setAttribute("mathbackground",s),a.setAttribute("width",he(r)),a.setAttribute("height",he(n));var o=new ue("mpadded",[a]);return i>=0?o.setAttribute("height",he(i)):(o.setAttribute("height",he(i)),o.setAttribute("depth",he(-i))),o.setAttribute("voffset",he(i)),o}});function aT(e,t,r){for(var n=zt(e,t,!1),i=t.sizeMultiplier/r.sizeMultiplier,s=0;s<n.length;s++){var a=n[s].classes.indexOf("sizing");a<0?Array.prototype.push.apply(n[s].classes,t.sizingClasses(r)):n[s].classes[a+1]==="reset-size"+t.size&&(n[s].classes[a+1]="reset-size"+r.size),n[s].height*=i,n[s].depth*=i}return li(n)}var K2=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],oH=(e,t)=>{var r=t.havingSize(e.size);return aT(e.body,r,t)};me({type:"sizing",names:K2,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:r,funcName:n,parser:i}=e,s=i.parseExpression(!1,r);return{type:"sizing",mode:i.mode,size:K2.indexOf(n)+1,body:s}},htmlBuilder:oH,mathmlBuilder:(e,t)=>{var r=t.havingSize(e.size),n=Dr(e.body,r),i=new ue("mstyle",n);return i.setAttribute("mathsize",he(r.sizeMultiplier)),i}});me({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,r)=>{var{parser:n}=e,i=!1,s=!1,a=r[0]&&Fe(r[0],"ordgroup");if(a)for(var o,l=0;l<a.body.length;++l){var u=a.body[l];if(o=A0(u).text,o==="t")i=!0;else if(o==="b")s=!0;else{i=!1,s=!1;break}}else i=!0,s=!0;var c=t[0];return{type:"smash",mode:n.mode,body:c,smashHeight:i,smashDepth:s}},htmlBuilder:(e,t)=>{var r=ie([],[Qe(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0),e.smashDepth&&(r.depth=0),e.smashHeight&&e.smashDepth)return ie(["mord","smash"],[r],t);if(r.children)for(var n=0;n<r.children.length;n++)e.smashHeight&&(r.children[n].height=0),e.smashDepth&&(r.children[n].depth=0);var i=Xe({positionType:"firstBaseline",children:[{type:"elem",elem:r}]});return ie(["mord"],[i],t)},mathmlBuilder:(e,t)=>{var r=new ue("mpadded",[st(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}});me({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:n}=e,i=r[0],s=t[0];return{type:"sqrt",mode:n.mode,body:s,index:i}},htmlBuilder(e,t){var r=Qe(e.body,t.havingCrampedStyle());r.height===0&&(r.height=t.fontMetrics().xHeight),r=Oa(r,t);var n=t.fontMetrics(),i=n.defaultRuleThickness,s=i;t.style.id<Oe.TEXT.id&&(s=t.fontMetrics().xHeight);var a=i+s/4,o=r.height+r.depth+a+i,{span:l,ruleWidth:u,advanceWidth:c}=WU(o,t),d=l.height-u;d>r.height+r.depth+a&&(a=(a+d-r.height-r.depth)/2);var h=l.height-r.height-a-u;r.style.paddingLeft=he(c);var f=Xe({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+h)},{type:"elem",elem:l},{type:"kern",size:u}]});if(e.index){var m=t.havingStyle(Oe.SCRIPTSCRIPT),b=Qe(e.index,m,t),y=.6*(f.height-f.depth),E=Xe({positionType:"shift",positionData:-y,children:[{type:"elem",elem:b}]}),w=ie(["root"],[E]);return ie(["mord","sqrt"],[w,f],t)}else return ie(["mord","sqrt"],[f],t)},mathmlBuilder(e,t){var{body:r,index:n}=e;return n?new ue("mroot",[st(r,t),st(n,t)]):new ue("msqrt",[st(r,t)])}});var jf={display:Oe.DISPLAY,text:Oe.TEXT,script:Oe.SCRIPT,scriptscript:Oe.SCRIPTSCRIPT};function lH(e){return e in jf}me({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:r,funcName:n,parser:i}=e,s=i.parseExpression(!0,r),a=n.slice(1,n.length-5);if(!lH(a))throw new Error("Unknown style: "+a);return{type:"styling",mode:i.mode,style:a,body:s}},htmlBuilder(e,t){var r=jf[e.style],n=t.havingStyle(r);return e.resetFont&&(n=n.withFont("")),aT(e.body,n,t)},mathmlBuilder(e,t){var r=jf[e.style],n=t.havingStyle(r);e.resetFont&&(n=n.withFont(""));var i=Dr(e.body,n),s=new ue("mstyle",i),a={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},o=a[e.style];return s.setAttribute("scriptlevel",o[0]),s.setAttribute("displaystyle",o[1]),s}});var uH=function(t,r){var n=t.base;if(n)if(n.type==="op"){var i=n.limits&&(r.style.size===Oe.DISPLAY.size||n.alwaysHandleSupSub);return i?Ka:null}else if(n.type==="operatorname"){var s=n.alwaysHandleSupSub&&(r.style.size===Oe.DISPLAY.size||n.limits);return s?sT:null}else{if(n.type==="accent")return ai(n.base)?Hp:null;if(n.type==="horizBrace"){var a=!t.sub;return a===n.isOver?rT:null}else return null}else return null};js({type:"supsub",htmlBuilder(e,t){var r=uH(e,t);if(r)return r(e,t);var{base:n,sup:i,sub:s}=e,a=Qe(n,t),o,l,u=t.fontMetrics(),c=0,d=0,h=n&&ai(n);if(i){var f=t.havingStyle(t.style.sup());o=Qe(i,f,t),h||(c=a.height-f.fontMetrics().supDrop*f.sizeMultiplier/t.sizeMultiplier)}if(s){var m=t.havingStyle(t.style.sub());l=Qe(s,m,t),h||(d=a.depth+m.fontMetrics().subDrop*m.sizeMultiplier/t.sizeMultiplier)}var b;t.style===Oe.DISPLAY?b=u.sup1:t.style.cramped?b=u.sup3:b=u.sup2;var y=t.sizeMultiplier,E=he(.5/u.ptPerEm/y),w=null;if(l){var x=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(a instanceof Pr||x){var _;w=he(-((_=a.italic)!=null?_:0))}}var A;if(o&&l){c=Math.max(c,b,o.depth+.25*u.xHeight),d=Math.max(d,u.sub2);var S=u.defaultRuleThickness,I=4*S;if(c-o.depth-(l.height-d)<I){d=I-(c-o.depth)+l.height;var N=.8*u.xHeight-(c-o.depth);N>0&&(c+=N,d-=N)}var U=[{type:"elem",elem:l,shift:d,marginRight:E,marginLeft:w},{type:"elem",elem:o,shift:-c,marginRight:E}];A=Xe({positionType:"individualShift",children:U})}else if(l){d=Math.max(d,u.sub1,l.height-.8*u.xHeight);var z=[{type:"elem",elem:l,marginLeft:w,marginRight:E}];A=Xe({positionType:"shift",positionData:d,children:z})}else if(o)c=Math.max(c,b,o.depth+.25*u.xHeight),A=Xe({positionType:"shift",positionData:-c,children:[{type:"elem",elem:o,marginRight:E}]});else throw new Error("supsub must have either sup or sub.");var Z=Mf(a,"right")||"mord";return ie([Z],[a,ie(["msupsub"],[A])],t)},mathmlBuilder(e,t){var r=!1,n,i;e.base&&e.base.type==="horizBrace"&&(i=!!e.sup,i===e.base.isOver&&(r=!0,n=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var s=[st(e.base,t)];e.sub&&s.push(st(e.sub,t)),e.sup&&s.push(st(e.sup,t));var a;if(r)a=n?"mover":"munder";else if(e.sub)if(e.sup){var u=e.base;u&&u.type==="op"&&u.limits&&t.style===Oe.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(t.style===Oe.DISPLAY||u.limits)?a="munderover":a="msubsup"}else{var l=e.base;l&&l.type==="op"&&l.limits&&(t.style===Oe.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||t.style===Oe.DISPLAY)?a="munder":a="msub"}else{var o=e.base;o&&o.type==="op"&&o.limits&&(t.style===Oe.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||t.style===Oe.DISPLAY)?a="mover":a="msup"}return new ue(a,s)}});js({type:"atom",htmlBuilder(e,t){return zp(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var r=new ue("mo",[Zr(e.text,e.mode)]);if(e.family==="bin"){var n=Up(e,t);n==="bold-italic"&&r.setAttribute("mathvariant",n)}else e.family==="punct"?r.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&r.setAttribute("stretchy","false");return r}});var oT={mi:"italic",mn:"normal",mtext:"normal"};js({type:"mathord",htmlBuilder(e,t){return w0(e,t,"mathord")},mathmlBuilder(e,t){var r=new ue("mi",[Zr(e.text,e.mode,t)]),n=Up(e,t)||"italic";return n!==oT[r.type]&&r.setAttribute("mathvariant",n),r}});js({type:"textord",htmlBuilder(e,t){return w0(e,t,"textord")},mathmlBuilder(e,t){var r=Zr(e.text,e.mode,t),n=Up(e,t)||"normal",i;return e.mode==="text"?i=new ue("mtext",[r]):/[0-9]/.test(e.text)?i=new ue("mn",[r]):e.text==="\\prime"?i=new ue("mo",[r]):i=new ue("mi",[r]),n!==oT[i.type]&&i.setAttribute("mathvariant",n),i}});var Ud={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Hd={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};js({type:"spacing",htmlBuilder(e,t){if(Hd.hasOwnProperty(e.text)){var r=Hd[e.text].className||"";if(e.mode==="text"){var n=w0(e,t,"textord");return n.classes.push(r),n}else return ie(["mspace",r],[zp(e.text,e.mode,t)],t)}else{if(Ud.hasOwnProperty(e.text))return ie(["mspace",Ud[e.text]],[],t);throw new le('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,t){var r;if(Hd.hasOwnProperty(e.text))r=new ue("mtext",[new It(" ")]);else{if(Ud.hasOwnProperty(e.text))return new ue("mspace");throw new le('Unknown type of space "'+e.text+'"')}return r}});var X2=()=>{var e=new ue("mtd",[]);return e.setAttribute("width","50%"),e};js({type:"tag",mathmlBuilder(e,t){var r=new ue("mtable",[new ue("mtr",[X2(),new ue("mtd",[$i(e.body,t)]),X2(),new ue("mtd",[$i(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});var Q2={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},J2={"\\textbf":"textbf","\\textmd":"textmd"},cH={"\\textit":"textit","\\textup":"textup"},e4=(e,t)=>{var r=e.font;if(r){if(Q2[r])return t.withTextFontFamily(Q2[r]);if(J2[r])return t.withTextFontWeight(J2[r]);if(r==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit")}else return t;return t.withTextFontShape(cH[r])};me({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:n}=e,i=t[0];return{type:"text",mode:r.mode,body:Ct(i),font:n}},htmlBuilder(e,t){var r=e4(e,t),n=zt(e.body,r,!0);return ie(["mord","text"],n,r)},mathmlBuilder(e,t){var r=e4(e,t);return $i(e.body,r)}});me({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"underline",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=Qe(e.body,t),n=Pa("underline-line",t),i=t.fontMetrics().defaultRuleThickness,s=Xe({positionType:"top",positionData:r.height,children:[{type:"kern",size:i},{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r}]});return ie(["mord","underline"],[s],t)},mathmlBuilder(e,t){var r=new ue("mo",[new It("‾")]);r.setAttribute("stretchy","true");var n=new ue("munder",[st(e.body,t),r]);return n.setAttribute("accentunder","true"),n}});me({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"vcenter",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=Qe(e.body,t),n=t.fontMetrics().axisHeight,i=.5*(r.height-n-(r.depth+n));return Xe({positionType:"shift",positionData:i,children:[{type:"elem",elem:r}]})},mathmlBuilder(e,t){var r=new ue("mpadded",[st(e.body,t)],["vcenter"]);return new ue("mrow",[r])}});me({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new le("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var r=t4(e),n=[],i=t.havingStyle(t.style.text()),s=0;s<r.length;s++){var a=r[s];a==="~"&&(a="\\textasciitilde"),n.push(dr(a,"Typewriter-Regular",e.mode,i,["mord","texttt"]))}return ie(["mord","text"].concat(i.sizingClasses(t)),w_(n),i)},mathmlBuilder(e,t){var r=new It(t4(e)),n=new ue("mtext",[r]);return n.setAttribute("mathvariant","monospace"),n}});var t4=e=>e.body.replace(/ /g,e.star?"␣":" "),Ci=C_,lT=`[ \r
627
- ]`,dH="\\\\[a-zA-Z@]+",hH="\\\\[^\uD800-\uDFFF]",fH="("+dH+")"+lT+"*",mH=`\\\\(
628
- |[ \r ]+
629
- ?)[ \r ]*`,Uf="[̀-ͯ]",pH=new RegExp(Uf+"+$"),gH="("+lT+"+)|"+(mH+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(Uf+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(Uf+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+fH)+("|"+hH+")");class r4{constructor(t,r){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=t,this.settings=r,this.tokenRegex=new RegExp(gH,"g"),this.catcodes={"%":14,"~":13}}setCatcode(t,r){this.catcodes[t]=r}lex(){var t=this.input,r=this.tokenRegex.lastIndex;if(r===t.length)return new Cr("EOF",new vr(this,r,r));var n=this.tokenRegex.exec(t);if(n===null||n.index!==r)throw new le("Unexpected character: '"+t[r]+"'",new Cr(t[r],new vr(this,r,r+1)));var i=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[i]===14){var s=t.indexOf(`
630
- `,this.tokenRegex.lastIndex);return s===-1?(this.tokenRegex.lastIndex=t.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=s+1,this.lex()}return new Cr(i,new vr(this,r,this.tokenRegex.lastIndex))}}class bH{constructor(t,r){t===void 0&&(t={}),r===void 0&&(r={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=r,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new le("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var t=this.undefStack.pop();for(var r in t)t.hasOwnProperty(r)&&(t[r]==null?delete this.current[r]:this.current[r]=t[r])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(t){return this.current.hasOwnProperty(t)||this.builtins.hasOwnProperty(t)}get(t){return this.current.hasOwnProperty(t)?this.current[t]:this.builtins[t]}set(t,r,n){if(n===void 0&&(n=!1),n){for(var i=0;i<this.undefStack.length;i++)delete this.undefStack[i][t];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][t]=r)}else{var s=this.undefStack[this.undefStack.length-1];s&&!s.hasOwnProperty(t)&&(s[t]=this.current[t])}r==null?delete this.current[t]:this.current[t]=r}}var yH=X_;R("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}});R("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}});R("\\@firstoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}});R("\\@secondoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}});R("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var r=e.future();return t[0].length===1&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}});R("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");R("\\TextOrMath",function(e){var t=e.consumeArgs(2);return e.mode==="text"?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var n4={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};R("\\char",function(e){var t=e.popToken(),r,n=0;if(t.text==="'")r=8,t=e.popToken();else if(t.text==='"')r=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]==="\\")n=t.text.charCodeAt(1);else{if(t.text==="EOF")throw new le("\\char` missing argument");n=t.text.charCodeAt(0)}else r=10;if(r){if(n=n4[t.text],n==null||n>=r)throw new le("Invalid base-"+r+" digit "+t.text);for(var i;(i=n4[e.future().text])!=null&&i<r;)n*=r,n+=i,e.popToken()}return"\\@char{"+n+"}"});var Wp=(e,t,r,n)=>{var i=e.consumeArg().tokens;if(i.length!==1)throw new le("\\newcommand's first argument must be a macro name");var s=i[0].text,a=e.isDefined(s);if(a&&!t)throw new le("\\newcommand{"+s+"} attempting to redefine "+(s+"; use \\renewcommand"));if(!a&&!r)throw new le("\\renewcommand{"+s+"} when command "+s+" does not yet exist; use \\newcommand");var o=0;if(i=e.consumeArg().tokens,i.length===1&&i[0].text==="["){for(var l="",u=e.expandNextToken();u.text!=="]"&&u.text!=="EOF";)l+=u.text,u=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new le("Invalid number of arguments: "+l);o=parseInt(l),i=e.consumeArg().tokens}return a&&n||e.macros.set(s,{tokens:i,numArgs:o}),""};R("\\newcommand",e=>Wp(e,!1,!0,!1));R("\\renewcommand",e=>Wp(e,!0,!1,!1));R("\\providecommand",e=>Wp(e,!0,!0,!0));R("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(r=>r.text).join("")),""});R("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(r=>r.text).join("")),""});R("\\show",e=>{var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),Ci[r],gt.math[r],gt.text[r]),""});R("\\bgroup","{");R("\\egroup","}");R("~","\\nobreakspace");R("\\lq","`");R("\\rq","'");R("\\aa","\\r a");R("\\AA","\\r A");R("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");R("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");R("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");R("ℬ","\\mathscr{B}");R("ℰ","\\mathscr{E}");R("ℱ","\\mathscr{F}");R("ℋ","\\mathscr{H}");R("ℐ","\\mathscr{I}");R("ℒ","\\mathscr{L}");R("ℳ","\\mathscr{M}");R("ℛ","\\mathscr{R}");R("ℭ","\\mathfrak{C}");R("ℌ","\\mathfrak{H}");R("ℨ","\\mathfrak{Z}");R("\\Bbbk","\\Bbb{k}");R("\\llap","\\mathllap{\\textrm{#1}}");R("\\rlap","\\mathrlap{\\textrm{#1}}");R("\\clap","\\mathclap{\\textrm{#1}}");R("\\mathstrut","\\vphantom{(}");R("\\underbar","\\underline{\\text{#1}}");R("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');R("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");R("\\ne","\\neq");R("≠","\\neq");R("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");R("∉","\\notin");R("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");R("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");R("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");R("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");R("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");R("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");R("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");R("⟂","\\perp");R("‼","\\mathclose{!\\mkern-0.8mu!}");R("∌","\\notni");R("⌜","\\ulcorner");R("⌝","\\urcorner");R("⌞","\\llcorner");R("⌟","\\lrcorner");R("©","\\copyright");R("®","\\textregistered");R("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');R("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');R("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');R("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');R("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");R("⋮","\\vdots");R("\\varGamma","\\mathit{\\Gamma}");R("\\varDelta","\\mathit{\\Delta}");R("\\varTheta","\\mathit{\\Theta}");R("\\varLambda","\\mathit{\\Lambda}");R("\\varXi","\\mathit{\\Xi}");R("\\varPi","\\mathit{\\Pi}");R("\\varSigma","\\mathit{\\Sigma}");R("\\varUpsilon","\\mathit{\\Upsilon}");R("\\varPhi","\\mathit{\\Phi}");R("\\varPsi","\\mathit{\\Psi}");R("\\varOmega","\\mathit{\\Omega}");R("\\substack","\\begin{subarray}{c}#1\\end{subarray}");R("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");R("\\boxed","\\fbox{$\\displaystyle{#1}$}");R("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");R("\\implies","\\DOTSB\\;\\Longrightarrow\\;");R("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");R("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");R("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var i4={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},vH=new Set(["bin","rel"]);R("\\dots",function(e){var t="\\dotso",r=e.expandAfterFuture().text;return r in i4?t=i4[r]:(r.slice(0,4)==="\\not"||r in gt.math&&vH.has(gt.math[r].group))&&(t="\\dotsb"),t});var Zp={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};R("\\dotso",function(e){var t=e.future().text;return t in Zp?"\\ldots\\,":"\\ldots"});R("\\dotsc",function(e){var t=e.future().text;return t in Zp&&t!==","?"\\ldots\\,":"\\ldots"});R("\\cdots",function(e){var t=e.future().text;return t in Zp?"\\@cdots\\,":"\\@cdots"});R("\\dotsb","\\cdots");R("\\dotsm","\\cdots");R("\\dotsi","\\!\\cdots");R("\\dotsx","\\ldots\\,");R("\\DOTSI","\\relax");R("\\DOTSB","\\relax");R("\\DOTSX","\\relax");R("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");R("\\,","\\tmspace+{3mu}{.1667em}");R("\\thinspace","\\,");R("\\>","\\mskip{4mu}");R("\\:","\\tmspace+{4mu}{.2222em}");R("\\medspace","\\:");R("\\;","\\tmspace+{5mu}{.2777em}");R("\\thickspace","\\;");R("\\!","\\tmspace-{3mu}{.1667em}");R("\\negthinspace","\\!");R("\\negmedspace","\\tmspace-{4mu}{.2222em}");R("\\negthickspace","\\tmspace-{5mu}{.277em}");R("\\enspace","\\kern.5em ");R("\\enskip","\\hskip.5em\\relax");R("\\quad","\\hskip1em\\relax");R("\\qquad","\\hskip2em\\relax");R("\\tag","\\@ifstar\\tag@literal\\tag@paren");R("\\tag@paren","\\tag@literal{({#1})}");R("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new le("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});R("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");R("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");R("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");R("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");R("\\newline","\\\\\\relax");R("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var uT=he(Cn["Main-Regular"][84][1]-.7*Cn["Main-Regular"][65][1]);R("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+uT+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");R("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+uT+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");R("\\hspace","\\@ifstar\\@hspacer\\@hspace");R("\\@hspace","\\hskip #1\\relax");R("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");R("\\ordinarycolon",":");R("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");R("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');R("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');R("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');R("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');R("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');R("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');R("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');R("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');R("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');R("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');R("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');R("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');R("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');R("∷","\\dblcolon");R("∹","\\eqcolon");R("≔","\\coloneqq");R("≕","\\eqqcolon");R("⩴","\\Coloneqq");R("\\ratio","\\vcentcolon");R("\\coloncolon","\\dblcolon");R("\\colonequals","\\coloneqq");R("\\coloncolonequals","\\Coloneqq");R("\\equalscolon","\\eqqcolon");R("\\equalscoloncolon","\\Eqqcolon");R("\\colonminus","\\coloneq");R("\\coloncolonminus","\\Coloneq");R("\\minuscolon","\\eqcolon");R("\\minuscoloncolon","\\Eqcolon");R("\\coloncolonapprox","\\Colonapprox");R("\\coloncolonsim","\\Colonsim");R("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");R("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");R("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");R("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");R("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");R("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");R("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");R("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");R("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");R("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");R("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");R("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");R("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");R("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");R("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");R("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");R("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");R("\\nleqq","\\html@mathml{\\@nleqq}{≰}");R("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");R("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");R("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");R("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");R("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");R("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");R("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");R("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");R("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");R("\\imath","\\html@mathml{\\@imath}{ı}");R("\\jmath","\\html@mathml{\\@jmath}{ȷ}");R("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");R("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");R("⟦","\\llbracket");R("⟧","\\rrbracket");R("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");R("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");R("⦃","\\lBrace");R("⦄","\\rBrace");R("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");R("⦵","\\minuso");R("\\darr","\\downarrow");R("\\dArr","\\Downarrow");R("\\Darr","\\Downarrow");R("\\lang","\\langle");R("\\rang","\\rangle");R("\\uarr","\\uparrow");R("\\uArr","\\Uparrow");R("\\Uarr","\\Uparrow");R("\\N","\\mathbb{N}");R("\\R","\\mathbb{R}");R("\\Z","\\mathbb{Z}");R("\\alef","\\aleph");R("\\alefsym","\\aleph");R("\\Alpha","\\mathrm{A}");R("\\Beta","\\mathrm{B}");R("\\bull","\\bullet");R("\\Chi","\\mathrm{X}");R("\\clubs","\\clubsuit");R("\\cnums","\\mathbb{C}");R("\\Complex","\\mathbb{C}");R("\\Dagger","\\ddagger");R("\\diamonds","\\diamondsuit");R("\\empty","\\emptyset");R("\\Epsilon","\\mathrm{E}");R("\\Eta","\\mathrm{H}");R("\\exist","\\exists");R("\\harr","\\leftrightarrow");R("\\hArr","\\Leftrightarrow");R("\\Harr","\\Leftrightarrow");R("\\hearts","\\heartsuit");R("\\image","\\Im");R("\\infin","\\infty");R("\\Iota","\\mathrm{I}");R("\\isin","\\in");R("\\Kappa","\\mathrm{K}");R("\\larr","\\leftarrow");R("\\lArr","\\Leftarrow");R("\\Larr","\\Leftarrow");R("\\lrarr","\\leftrightarrow");R("\\lrArr","\\Leftrightarrow");R("\\Lrarr","\\Leftrightarrow");R("\\Mu","\\mathrm{M}");R("\\natnums","\\mathbb{N}");R("\\Nu","\\mathrm{N}");R("\\Omicron","\\mathrm{O}");R("\\plusmn","\\pm");R("\\rarr","\\rightarrow");R("\\rArr","\\Rightarrow");R("\\Rarr","\\Rightarrow");R("\\real","\\Re");R("\\reals","\\mathbb{R}");R("\\Reals","\\mathbb{R}");R("\\Rho","\\mathrm{P}");R("\\sdot","\\cdot");R("\\sect","\\S");R("\\spades","\\spadesuit");R("\\sub","\\subset");R("\\sube","\\subseteq");R("\\supe","\\supseteq");R("\\Tau","\\mathrm{T}");R("\\thetasym","\\vartheta");R("\\weierp","\\wp");R("\\Zeta","\\mathrm{Z}");R("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");R("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");R("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");R("\\bra","\\mathinner{\\langle{#1}|}");R("\\ket","\\mathinner{|{#1}\\rangle}");R("\\braket","\\mathinner{\\langle{#1}\\rangle}");R("\\Bra","\\left\\langle#1\\right|");R("\\Ket","\\left|#1\\right\\rangle");var cT=e=>t=>{var r=t.consumeArg().tokens,n=t.consumeArg().tokens,i=t.consumeArg().tokens,s=t.consumeArg().tokens,a=t.macros.get("|"),o=t.macros.get("\\|");t.macros.beginGroup();var l=d=>h=>{e&&(h.macros.set("|",a),i.length&&h.macros.set("\\|",o));var f=d;if(!d&&i.length){var m=h.future();m.text==="|"&&(h.popToken(),f=!0)}return{tokens:f?i:n,numArgs:0}};t.macros.set("|",l(!1)),i.length&&t.macros.set("\\|",l(!0));var u=t.consumeArg().tokens,c=t.expandTokens([...s,...u,...r]);return t.macros.endGroup(),{tokens:c.reverse(),numArgs:0}};R("\\bra@ket",cT(!1));R("\\bra@set",cT(!0));R("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");R("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");R("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");R("\\angln","{\\angl n}");R("\\blue","\\textcolor{##6495ed}{#1}");R("\\orange","\\textcolor{##ffa500}{#1}");R("\\pink","\\textcolor{##ff00af}{#1}");R("\\red","\\textcolor{##df0030}{#1}");R("\\green","\\textcolor{##28ae7b}{#1}");R("\\gray","\\textcolor{gray}{#1}");R("\\purple","\\textcolor{##9d38bd}{#1}");R("\\blueA","\\textcolor{##ccfaff}{#1}");R("\\blueB","\\textcolor{##80f6ff}{#1}");R("\\blueC","\\textcolor{##63d9ea}{#1}");R("\\blueD","\\textcolor{##11accd}{#1}");R("\\blueE","\\textcolor{##0c7f99}{#1}");R("\\tealA","\\textcolor{##94fff5}{#1}");R("\\tealB","\\textcolor{##26edd5}{#1}");R("\\tealC","\\textcolor{##01d1c1}{#1}");R("\\tealD","\\textcolor{##01a995}{#1}");R("\\tealE","\\textcolor{##208170}{#1}");R("\\greenA","\\textcolor{##b6ffb0}{#1}");R("\\greenB","\\textcolor{##8af281}{#1}");R("\\greenC","\\textcolor{##74cf70}{#1}");R("\\greenD","\\textcolor{##1fab54}{#1}");R("\\greenE","\\textcolor{##0d923f}{#1}");R("\\goldA","\\textcolor{##ffd0a9}{#1}");R("\\goldB","\\textcolor{##ffbb71}{#1}");R("\\goldC","\\textcolor{##ff9c39}{#1}");R("\\goldD","\\textcolor{##e07d10}{#1}");R("\\goldE","\\textcolor{##a75a05}{#1}");R("\\redA","\\textcolor{##fca9a9}{#1}");R("\\redB","\\textcolor{##ff8482}{#1}");R("\\redC","\\textcolor{##f9685d}{#1}");R("\\redD","\\textcolor{##e84d39}{#1}");R("\\redE","\\textcolor{##bc2612}{#1}");R("\\maroonA","\\textcolor{##ffbde0}{#1}");R("\\maroonB","\\textcolor{##ff92c6}{#1}");R("\\maroonC","\\textcolor{##ed5fa6}{#1}");R("\\maroonD","\\textcolor{##ca337c}{#1}");R("\\maroonE","\\textcolor{##9e034e}{#1}");R("\\purpleA","\\textcolor{##ddd7ff}{#1}");R("\\purpleB","\\textcolor{##c6b9fc}{#1}");R("\\purpleC","\\textcolor{##aa87ff}{#1}");R("\\purpleD","\\textcolor{##7854ab}{#1}");R("\\purpleE","\\textcolor{##543b78}{#1}");R("\\mintA","\\textcolor{##f5f9e8}{#1}");R("\\mintB","\\textcolor{##edf2df}{#1}");R("\\mintC","\\textcolor{##e0e5cc}{#1}");R("\\grayA","\\textcolor{##f6f7f7}{#1}");R("\\grayB","\\textcolor{##f0f1f2}{#1}");R("\\grayC","\\textcolor{##e3e5e6}{#1}");R("\\grayD","\\textcolor{##d6d8da}{#1}");R("\\grayE","\\textcolor{##babec2}{#1}");R("\\grayF","\\textcolor{##888d93}{#1}");R("\\grayG","\\textcolor{##626569}{#1}");R("\\grayH","\\textcolor{##3b3e40}{#1}");R("\\grayI","\\textcolor{##21242c}{#1}");R("\\kaBlue","\\textcolor{##314453}{#1}");R("\\kaGreen","\\textcolor{##71B307}{#1}");var dT={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class xH{constructor(t,r,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=r,this.expansionCount=0,this.feed(t),this.macros=new bH(yH,r.macros),this.mode=n,this.stack=[]}feed(t){this.lexer=new r4(t,this.settings)}switchMode(t){this.mode=t}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(t){this.stack.push(t)}pushTokens(t){this.stack.push(...t)}scanArgument(t){var r,n,i;if(t){if(this.consumeSpaces(),this.future().text!=="[")return null;r=this.popToken(),{tokens:i,end:n}=this.consumeArg(["]"])}else({tokens:i,start:r,end:n}=this.consumeArg());return this.pushToken(new Cr("EOF",n.loc)),this.pushTokens(i),new Cr("",vr.range(r,n))}consumeSpaces(){for(;;){var t=this.future();if(t.text===" ")this.stack.pop();else break}}consumeArg(t){var r=[],n=t&&t.length>0;n||this.consumeSpaces();var i=this.future(),s,a=0,o=0;do{if(s=this.popToken(),r.push(s),s.text==="{")++a;else if(s.text==="}"){if(--a,a===-1)throw new le("Extra }",s)}else if(s.text==="EOF")throw new le("Unexpected end of input in a macro argument, expected '"+(t&&n?t[o]:"}")+"'",s);if(t&&n)if((a===0||a===1&&t[o]==="{")&&s.text===t[o]){if(++o,o===t.length){r.splice(-o,o);break}}else o=0}while(a!==0||n);return i.text==="{"&&r[r.length-1].text==="}"&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:i,end:s}}consumeArgs(t,r){if(r){if(r.length!==t+1)throw new le("The length of delimiters doesn't match the number of args!");for(var n=r[0],i=0;i<n.length;i++){var s=this.popToken();if(n[i]!==s.text)throw new le("Use of the macro doesn't match its definition",s)}}for(var a=[],o=0;o<t;o++)a.push(this.consumeArg(r&&r[o+1]).tokens);return a}countExpansion(t){if(this.expansionCount+=t,this.expansionCount>this.settings.maxExpand)throw new le("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(t){var r=this.popToken(),n=r.text,i=r.noexpand?null:this._getExpansion(n);if(i==null||t&&i.unexpandable){if(t&&i==null&&n[0]==="\\"&&!this.isDefined(n))throw new le("Undefined control sequence: "+n);return this.pushToken(r),!1}this.countExpansion(1);var s=i.tokens,a=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs){s=s.slice();for(var o=s.length-1;o>=0;--o){var l=s[o];if(l.text==="#"){if(o===0)throw new le("Incomplete placeholder at end of macro body",l);if(l=s[--o],l.text==="#")s.splice(o+1,1);else if(/^[1-9]$/.test(l.text))s.splice(o,2,...a[+l.text-1]);else throw new le("Not a valid argument number",l)}}}return this.pushTokens(s),s.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var t=this.stack.pop();return t.treatAsRelax&&(t.text="\\relax"),t}}expandMacro(t){return this.macros.has(t)?this.expandTokens([new Cr(t)]):void 0}expandTokens(t){var r=[],n=this.stack.length;for(this.pushTokens(t);this.stack.length>n;)if(this.expandOnce(!0)===!1){var i=this.stack.pop();i.treatAsRelax&&(i.noexpand=!1,i.treatAsRelax=!1),r.push(i)}return this.countExpansion(r.length),r}expandMacroAsText(t){var r=this.expandMacro(t);return r&&r.map(n=>n.text).join("")}_getExpansion(t){var r=this.macros.get(t);if(r==null)return r;if(t.length===1){var n=this.lexer.catcodes[t];if(n!=null&&n!==13)return}var i=typeof r=="function"?r(this):r;if(typeof i=="string"){var s=0;if(i.includes("#"))for(var a=i.replace(/##/g,"");a.includes("#"+(s+1));)++s;for(var o=new r4(i,this.settings),l=[],u=o.lex();u.text!=="EOF";)l.push(u),u=o.lex();l.reverse();var c={tokens:l,numArgs:s};return c}return i}isDefined(t){return this.macros.has(t)||Ci.hasOwnProperty(t)||gt.math.hasOwnProperty(t)||gt.text.hasOwnProperty(t)||dT.hasOwnProperty(t)}isExpandable(t){var r=this.macros.get(t);return r!=null?typeof r=="string"||typeof r=="function"||!r.unexpandable:Ci.hasOwnProperty(t)&&!Ci[t].primitive}}var s4=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,bu=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Vd={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},a4={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};let hT=class fT{constructor(t,r){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new xH(t,r,this.mode),this.settings=r,this.leftrightDepth=0,this.nextToken=null}expect(t,r){if(r===void 0&&(r=!0),this.fetch().text!==t)throw new le("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());r&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(t){this.mode=t,this.gullet.switchMode(t)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var t=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),t}finally{this.gullet.endGroups()}}subparse(t){var r=this.nextToken;this.consume(),this.gullet.pushToken(new Cr("}")),this.gullet.pushTokens(t);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=r,n}parseExpression(t,r){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var i=this.fetch();if(fT.endOfExpression.has(i.text)||r&&i.text===r||t&&Ci[i.text]&&Ci[i.text].infix)break;var s=this.parseAtom(r);if(s){if(s.type==="internal")continue}else break;n.push(s)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(t){for(var r=-1,n,i=0;i<t.length;i++){var s=t[i];if(s.type==="infix"){if(r!==-1)throw new le("only one infix operator per group",s.token);r=i,n=s.replaceWith}}if(r!==-1&&n){var a,o,l=t.slice(0,r),u=t.slice(r+1);l.length===1&&l[0].type==="ordgroup"?a=l[0]:a={type:"ordgroup",mode:this.mode,body:l},u.length===1&&u[0].type==="ordgroup"?o=u[0]:o={type:"ordgroup",mode:this.mode,body:u};var c;return n==="\\\\abovefrac"?c=this.callFunction(n,[a,t[r],o],[]):c=this.callFunction(n,[a,o],[]),[c]}else return t}handleSupSubscript(t){var r=this.fetch(),n=r.text;this.consume(),this.consumeSpaces();var i;do{var s;i=this.parseGroup(t)}while(((s=i)==null?void 0:s.type)==="internal");if(!i)throw new le("Expected group after '"+n+"'",r);return i}formatUnsupportedCmd(t){for(var r=[],n=0;n<t.length;n++)r.push({type:"textord",mode:"text",text:t[n]});var i={type:"text",mode:this.mode,body:r},s={type:"color",mode:this.mode,color:this.settings.errorColor,body:[i]};return s}parseAtom(t){var r=this.parseGroup("atom",t);if((r==null?void 0:r.type)==="internal"||this.mode==="text")return r;for(var n,i;;){this.consumeSpaces();var s=this.fetch();if(s.text==="\\limits"||s.text==="\\nolimits"){if(r&&r.type==="op"){var a=s.text==="\\limits";r.limits=a,r.alwaysHandleSupSub=!0}else if(r&&r.type==="operatorname")r.alwaysHandleSupSub&&(r.limits=s.text==="\\limits");else throw new le("Limit controls must follow a math operator",s);this.consume()}else if(s.text==="^"){if(n)throw new le("Double superscript",s);n=this.handleSupSubscript("superscript")}else if(s.text==="_"){if(i)throw new le("Double subscript",s);i=this.handleSupSubscript("subscript")}else if(s.text==="'"){if(n)throw new le("Double superscript",s);var o={type:"textord",mode:this.mode,text:"\\prime"},l=[o];for(this.consume();this.fetch().text==="'";)l.push(o),this.consume();this.fetch().text==="^"&&l.push(this.handleSupSubscript("superscript")),n={type:"ordgroup",mode:this.mode,body:l}}else if(bu[s.text]){var u=s4.test(s.text),c=[];for(c.push(new Cr(bu[s.text])),this.consume();;){var d=this.fetch().text;if(!bu[d]||s4.test(d)!==u)break;c.unshift(new Cr(bu[d])),this.consume()}var h=this.subparse(c);u?i={type:"ordgroup",mode:"math",body:h}:n={type:"ordgroup",mode:"math",body:h}}else break}return n||i?{type:"supsub",mode:this.mode,base:r,sup:n,sub:i}:r}parseFunction(t,r){var n=this.fetch(),i=n.text,s=Ci[i];if(!s)return null;if(this.consume(),r&&r!=="atom"&&!s.allowedInArgument)throw new le("Got function '"+i+"' with no arguments"+(r?" as "+r:""),n);if(this.mode==="text"&&!s.allowedInText)throw new le("Can't use function '"+i+"' in text mode",n);if(this.mode==="math"&&s.allowedInMath===!1)throw new le("Can't use function '"+i+"' in math mode",n);var{args:a,optArgs:o}=this.parseArguments(i,s);return this.callFunction(i,a,o,n,t)}callFunction(t,r,n,i,s){var a={funcName:t,parser:this,token:i,breakOnTokenText:s},o=Ci[t];if(o&&o.handler)return o.handler(a,r,n);throw new le("No function handler for "+t)}parseArguments(t,r){var n=r.numArgs+r.numOptionalArgs;if(n===0)return{args:[],optArgs:[]};for(var i=[],s=[],a=0;a<n;a++){var o=r.argTypes&&r.argTypes[a],l=a<r.numOptionalArgs;("primitive"in r&&r.primitive&&o==null||r.type==="sqrt"&&a===1&&s[0]==null)&&(o="primitive");var u=this.parseGroupOfType("argument to '"+t+"'",o,l);if(l)s.push(u);else if(u!=null)i.push(u);else throw new le("Null argument, please report this as a bug")}return{args:i,optArgs:s}}parseGroupOfType(t,r,n){switch(r){case"color":return this.parseColorGroup(n);case"size":return this.parseSizeGroup(n);case"url":return this.parseUrlGroup(n);case"math":case"text":return this.parseArgumentGroup(n,r);case"hbox":{var i=this.parseArgumentGroup(n,"text");return i!=null?{type:"styling",mode:i.mode,body:[i],style:"text",resetFont:!0}:null}case"raw":{var s=this.parseStringGroup("raw",n);return s!=null?{type:"raw",mode:"text",string:s.text}:null}case"primitive":{if(n)throw new le("A primitive argument cannot be optional");var a=this.parseGroup(t);if(a==null)throw new le("Expected group as "+t,this.fetch());return a}case"original":case null:case void 0:return this.parseArgumentGroup(n);default:throw new le("Unknown group type as "+t,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(t,r){var n=this.gullet.scanArgument(r);if(n==null)return null;for(var i="",s;(s=this.fetch()).text!=="EOF";)i+=s.text,this.consume();return this.consume(),n.text=i,n}parseRegexGroup(t,r){for(var n=this.fetch(),i=n,s="",a;(a=this.fetch()).text!=="EOF"&&t.test(s+a.text);)i=a,s+=i.text,this.consume();if(s==="")throw new le("Invalid "+r+": '"+n.text+"'",n);return n.range(i,s)}parseColorGroup(t){var r=this.parseStringGroup("color",t);if(r==null)return null;var n=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(r.text);if(!n)throw new le("Invalid color: '"+r.text+"'",r);var i=n[0];return/^[0-9a-f]{6}$/i.test(i)&&(i="#"+i),{type:"color-token",mode:this.mode,color:i}}parseSizeGroup(t){var r,n=!1;if(this.gullet.consumeSpaces(),!t&&this.gullet.future().text!=="{"?r=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):r=this.parseStringGroup("size",t),!r)return null;!t&&r.text.length===0&&(r.text="0pt",n=!0);var i=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(r.text);if(!i)throw new le("Invalid size: '"+r.text+"'",r);var s={number:+(i[1]+i[2]),unit:i[3]};if(!v_(s))throw new le("Invalid unit: '"+s.unit+"'",r);return{type:"size",mode:this.mode,value:s,isBlank:n}}parseUrlGroup(t){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var r=this.parseStringGroup("url",t);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),r==null)return null;var n=r.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:n}}parseArgumentGroup(t,r){var n=this.gullet.scanArgument(t);if(n==null)return null;var i=this.mode;r&&this.switchMode(r),this.gullet.beginGroup();var s=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var a={type:"ordgroup",mode:this.mode,loc:n.loc,body:s};return r&&this.switchMode(i),a}parseGroup(t,r){var n=this.fetch(),i=n.text,s;if(i==="{"||i==="\\begingroup"){this.consume();var a=i==="{"?"}":"\\endgroup";this.gullet.beginGroup();var o=this.parseExpression(!1,a),l=this.fetch();this.expect(a),this.gullet.endGroup(),s={type:"ordgroup",mode:this.mode,loc:vr.range(n,l),body:o,semisimple:i==="\\begingroup"||void 0}}else if(s=this.parseFunction(r,t)||this.parseSymbol(),s==null&&i[0]==="\\"&&!dT.hasOwnProperty(i)){if(this.settings.throwOnError)throw new le("Undefined control sequence: "+i,n);s=this.formatUnsupportedCmd(i),this.consume()}return s}formLigatures(t){for(var r=t.length-1,n=0;n<r;++n){var i=t[n];if(i.type==="textord"){var s=i.text,a=t[n+1];if(!(!a||a.type!=="textord")){if(s==="-"&&a.text==="-"){var o=t[n+2];n+1<r&&o&&o.type==="textord"&&o.text==="-"?(t.splice(n,3,{type:"textord",mode:"text",loc:vr.range(i,o),text:"---"}),r-=2):(t.splice(n,2,{type:"textord",mode:"text",loc:vr.range(i,a),text:"--"}),r-=1)}(s==="'"||s==="`")&&a.text===s&&(t.splice(n,2,{type:"textord",mode:"text",loc:vr.range(i,a),text:s+s}),r-=1)}}}}parseSymbol(){var t=this.fetch(),r=t.text;if(/^\\verb[^a-zA-Z]/.test(r)){this.consume();var n=r.slice(5),i=n.charAt(0)==="*";if(i&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new le(`\\verb assertion failed --
631
- please report what input caused this bug`);return n=n.slice(1,-1),{type:"verb",mode:"text",body:n,star:i}}a4.hasOwnProperty(r[0])&&!gt[this.mode][r[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+r[0]+'" used in math mode',t),r=a4[r[0]]+r.slice(1));var s=pH.exec(r);s&&(r=r.substring(0,s.index),r==="i"?r="ı":r==="j"&&(r="ȷ"));var a;if(gt[this.mode][r]){this.settings.strict&&this.mode==="math"&&Cf.includes(r)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+r[0]+'" used in math mode',t);var o=gt[this.mode][r].group,l=vr.range(t),u;MU(o)?u={type:"atom",mode:this.mode,family:o,loc:l,text:r}:u={type:o,mode:this.mode,loc:l,text:r},a=u}else if(r.charCodeAt(0)>=128)this.settings.strict&&(y_(r.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'"'+(" ("+r.charCodeAt(0)+")"),t)),a={type:"textord",mode:"text",loc:vr.range(t),text:r};else return null;if(this.consume(),s)for(var c=0;c<s[0].length;c++){var d=s[0][c];if(!Vd[d])throw new le("Unknown accent ' "+d+"'",t);var h=Vd[d][this.mode]||Vd[d].text;if(!h)throw new le("Accent "+d+" unsupported in "+this.mode+" mode",t);a={type:"accent",mode:this.mode,loc:vr.range(t),label:h,isStretchy:!1,isShifty:!0,base:a}}return a}};hT.endOfExpression=new Set(["}","\\endgroup","\\end","\\right","&"]);var Yp=function(t,r){if(!(typeof t=="string"||t instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new hT(t,r);delete n.gullet.macros.current["\\df@tag"];var i=n.parse();if(delete n.gullet.macros.current["\\current@color"],delete n.gullet.macros.current["\\color"],n.gullet.macros.get("\\df@tag")){if(!r.displayMode)throw new le("\\tag works only in display equations");i=[{type:"tag",mode:"text",body:i,tag:n.subparse([new Cr("\\df@tag")])}]}return i},mT=function(t,r,n){r.textContent="";var i=Kp(t,n).toNode();r.appendChild(i)};typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),mT=function(){throw new le("KaTeX doesn't work in quirks mode.")});var EH=function(t,r){var n=Kp(t,r).toMarkup();return n},_H=function(t,r){var n=new Dp(r);return Yp(t,n)},pT=function(t,r,n){if(n.throwOnError||!(t instanceof le))throw t;var i=ie(["katex-error"],[new Pr(r)]);return i.setAttribute("title",t.toString()),i.setAttribute("style","color:"+n.errorColor),i},Kp=function(t,r){var n=new Dp(r);try{var i=Yp(t,n);return CU(i,t,n)}catch(s){return pT(s,t,n)}},TH=function(t,r){var n=new Dp(r);try{var i=Yp(t,n);return IU(i,t,n)}catch(s){return pT(s,t,n)}},wH="0.16.47",kH={Span:Za,Anchor:_0,SymbolNode:Pr,SvgNode:ni,PathNode:Fi,LineNode:Af},o4={version:wH,render:mT,renderToString:EH,ParseError:le,SETTINGS_SCHEMA:wf,__parse:_H,__renderToDomTree:Kp,__renderToHTMLTree:TH,__setFontMetrics:uU,__defineSymbol:g,__defineFunction:me,__defineMacro:R,__domTree:kH};const gT=[],Co=!0,Hf=!1,Ii="skip";function Ll(e,t,r,n){let i;typeof t=="function"&&typeof r!="function"?(n=r,r=t):i=t;const s=Rl(i),a=n?-1:1;o(e,void 0,[])();function o(l,u,c){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=gT,m,b,y;if((!t||s(l,u,c[c.length-1]||void 0))&&(f=SH(r(l,c)),f[0]===Hf))return f;if("children"in l&&l.children){const E=l;if(E.children&&f[0]!==Ii)for(b=(n?E.children.length:-1)+a,y=c.concat(E);b>-1&&b<E.children.length;){const w=E.children[b];if(m=o(w,b,y)(),m[0]===Hf)return m;b=typeof m[1]=="number"?m[1]:b+a}}return f}}}function SH(e){return Array.isArray(e)?e:typeof e=="number"?[Co,e]:e==null?gT:[e]}const AH={},CH=[];function IH(e){const t=e||AH;return function(r,n){Ll(r,"element",function(i,s){const a=Array.isArray(i.properties.className)?i.properties.className:CH,o=a.includes("language-math"),l=a.includes("math-display"),u=a.includes("math-inline");let c=l;if(!o&&!l&&!u)return;let d=s[s.length-1],h=i;if(i.tagName==="code"&&o&&d&&d.type==="element"&&d.tagName==="pre"&&(h=d,d=s[s.length-2],c=!0),!d)return;const f=_j(h,{whitespace:"pre"});let m;try{m=o4.renderToString(f,{...t,displayMode:c,throwOnError:!0})}catch(y){const E=y,w=E.name.toLowerCase();n.message("Could not render math with KaTeX",{ancestors:[...s,i],cause:E,place:i.position,ruleId:w,source:"rehype-katex"});try{m=o4.renderToString(f,{...t,displayMode:c,strict:"ignore",throwOnError:!1})}catch{m=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(t.errorColor||"#cc0000"),title:String(y)},children:[{type:"text",value:f}]}]}}typeof m=="string"&&(m=uj(m).children);const b=d.children.indexOf(h);return d.children.splice(b,1,...m),Ii})}}function bT(e,t){const r=String(e);let n=r.indexOf(t),i=n,s=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;n!==-1;)n===i?++s>a&&(a=s):s=1,i=n+t.length,n=r.indexOf(t,i);return a}function NH(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:s},exit:{mathFlow:i,mathFlowFence:n,mathFlowFenceMeta:r,mathFlowValue:o,mathText:a,mathTextData:o}};function e(l){const u={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[u]}},l)}function t(){this.buffer()}function r(){const l=this.resume(),u=this.stack[this.stack.length-1];u.type,u.meta=l}function n(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(l){const u=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),c=this.stack[this.stack.length-1];c.type,this.exit(l),c.value=u;const d=c.data.hChildren[0];d.type,d.tagName,d.children.push({type:"text",value:u}),this.data.mathFlowInside=void 0}function s(l){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},l),this.buffer()}function a(l){const u=this.resume(),c=this.stack[this.stack.length-1];c.type,this.exit(l),c.value=u,c.data.hChildren.push({type:"text",value:u})}function o(l){this.config.enter.data.call(this,l),this.config.exit.data.call(this,l)}}function RH(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),n.peek=i,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:`
632
- `,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:r,inlineMath:n}};function r(s,a,o,l){const u=s.value||"",c=o.createTracker(l),d="$".repeat(Math.max(bT(u,"$")+1,2)),h=o.enter("mathFlow");let f=c.move(d);if(s.meta){const m=o.enter("mathFlowMeta");f+=c.move(o.safe(s.meta,{after:`
633
- `,before:f,encode:["$"],...c.current()})),m()}return f+=c.move(`
634
- `),u&&(f+=c.move(u+`
635
- `)),f+=c.move(d),h(),f}function n(s,a,o){let l=s.value||"",u=1;for(t||u++;new RegExp("(^|[^$])"+"\\$".repeat(u)+"([^$]|$)").test(l);)u++;const c="$".repeat(u);/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^\$|\$$/.test(l))&&(l=" "+l+" ");let d=-1;for(;++d<o.unsafe.length;){const h=o.unsafe[d];if(!h.atBreak)continue;const f=o.compilePattern(h);let m;for(;m=f.exec(l);){let b=m.index;l.codePointAt(b)===10&&l.codePointAt(b-1)===13&&b--,l=l.slice(0,b)+" "+l.slice(m.index+1)}}return c+l+c}function i(){return"$"}}const hr=Yi(/[A-Za-z]/),tr=Yi(/[\dA-Za-z]/),PH=Yi(/[#-'*+\--9=?A-Z^-~]/);function Cc(e){return e!==null&&(e<32||e===127)}const Vf=Yi(/\d/),OH=Yi(/[\dA-Fa-f]/),LH=Yi(/[!-/:-@[-`{-~]/);function we(e){return e!==null&&e<-2}function at(e){return e!==null&&(e<0||e===32)}function Ze(e){return e===-2||e===-1||e===32}const L0=Yi(new RegExp("\\p{P}|\\p{S}","u")),Ps=Yi(/\s/);function Yi(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function Ge(e,t,r,n){const i=n?n-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(l){return Ze(l)?(e.enter(r),o(l)):t(l)}function o(l){return Ze(l)&&s++<i?(e.consume(l),o):(e.exit(r),t(l))}}const DH={tokenize:MH,concrete:!0,name:"mathFlow"},l4={tokenize:BH,partial:!0};function MH(e,t,r){const n=this,i=n.events[n.events.length-1],s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0;let a=0;return o;function o(w){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),l(w)}function l(w){return w===36?(e.consume(w),a++,l):a<2?r(w):(e.exit("mathFlowFenceSequence"),Ge(e,u,"whitespace")(w))}function u(w){return w===null||we(w)?d(w):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),c(w))}function c(w){return w===null||we(w)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),d(w)):w===36?r(w):(e.consume(w),c)}function d(w){return e.exit("mathFlowFence"),n.interrupt?t(w):e.attempt(l4,h,y)(w)}function h(w){return e.attempt({tokenize:E,partial:!0},y,f)(w)}function f(w){return(s?Ge(e,m,"linePrefix",s+1):m)(w)}function m(w){return w===null?y(w):we(w)?e.attempt(l4,h,y)(w):(e.enter("mathFlowValue"),b(w))}function b(w){return w===null||we(w)?(e.exit("mathFlowValue"),m(w)):(e.consume(w),b)}function y(w){return e.exit("mathFlow"),t(w)}function E(w,x,_){let A=0;return Ge(w,S,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function S(U){return w.enter("mathFlowFence"),w.enter("mathFlowFenceSequence"),I(U)}function I(U){return U===36?(A++,w.consume(U),I):A<a?_(U):(w.exit("mathFlowFenceSequence"),Ge(w,N,"whitespace")(U))}function N(U){return U===null||we(U)?(w.exit("mathFlowFence"),x(U)):_(U)}}}function BH(e,t,r){const n=this;return i;function i(a){return a===null?t(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s)}function s(a){return n.parser.lazy[n.now().line]?r(a):t(a)}}function FH(e){let r=(e||{}).singleDollarTextMath;return r==null&&(r=!0),{tokenize:n,resolve:zH,previous:$H,name:"mathText"};function n(i,s,a){let o=0,l,u;return c;function c(b){return i.enter("mathText"),i.enter("mathTextSequence"),d(b)}function d(b){return b===36?(i.consume(b),o++,d):o<2&&!r?a(b):(i.exit("mathTextSequence"),h(b))}function h(b){return b===null?a(b):b===36?(u=i.enter("mathTextSequence"),l=0,m(b)):b===32?(i.enter("space"),i.consume(b),i.exit("space"),h):we(b)?(i.enter("lineEnding"),i.consume(b),i.exit("lineEnding"),h):(i.enter("mathTextData"),f(b))}function f(b){return b===null||b===32||b===36||we(b)?(i.exit("mathTextData"),h(b)):(i.consume(b),f)}function m(b){return b===36?(i.consume(b),l++,m):l===o?(i.exit("mathTextSequence"),i.exit("mathText"),s(b)):(u.type="mathTextData",f(b))}}}function zH(e){let t=e.length-4,r=3,n,i;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="mathTextData"){e[t][1].type="mathTextPadding",e[r][1].type="mathTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)i===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(i=n):(n===t||e[n][1].type==="lineEnding")&&(e[i][1].type="mathTextData",n!==i+2&&(e[i][1].end=e[n-1][1].end,e.splice(i+2,n-i-2),t-=n-i-2,n=i+2),i=void 0);return e}function $H(e){return e!==36||this.events[this.events.length-1][1].type==="characterEscape"}function jH(e){return{flow:{36:DH},text:{36:FH(e)}}}const UH={};function HH(e){const t=this,r=e||UH,n=t.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),s=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(jH(r)),s.push(NH()),a.push(RH(r))}function VH(e={}){var t,r;let n=[HH,{singleDollarTextMath:(t=e.singleDollarTextMath)!=null?t:!1}],i=[IH,{errorColor:(r=e.errorColor)!=null?r:"var(--color-muted-foreground)"}];return{name:"katex",type:"math",remarkPlugin:n,rehypePlugin:i,getStyles(){return"katex/dist/katex.min.css"}}}var qH=VH();function Yr(e,t,r,n){let i,s,a;typeof t=="function"&&typeof r!="function"?(s=void 0,a=t,i=r):(s=t,a=r,i=n),Ll(e,s,o,i);function o(l,u){const c=u[u.length-1],d=c?c.children.indexOf(l):void 0;return a(l,d,c)}}const La={indicator:"indicator",textOnly:"text-only",remove:"remove"};function GH({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:r=[],allowDataImages:n=!1,allowedProtocols:i=[],blockedImageClass:s="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:a="text-gray-500",linkBlockPolicy:o=La.indicator,imageBlockPolicy:l=La.indicator}){const u=t.length&&!t.every(d=>d==="*"),c=r.length&&!r.every(d=>d==="*");if(!e&&(u||c))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return d=>{const h=QH(e,t,r,n,i,s,a,o,l);yT(d),Yr(d,h)}}function u4(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function WH(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const ZH=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),YH=new Set(["javascript:","data:","file:","vbscript:"]);function c4(e,t,r,n=!1,i=!1,s=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!i)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return i&&n&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const c=e.substring(5);if(c&&c.length>0&&c!=="invalid")return e}}catch{return null}return null}const a=u4(e,r);if(!a||YH.has(a.protocol)||!(ZH.has(a.protocol)||s.includes(a.protocol)||s.includes("*")))return null;if(a.protocol==="mailto:"||!a.protocol.match(/^https?:$/))return a.href;const l=WH(e);return a&&t.some(u=>{const c=u4(u,r);return!c||c.origin!==a.origin?!1:a.href.startsWith(c.href)})?l?a.pathname+a.search+a.hash:a.href:t.includes("*")?a.protocol!=="https:"&&a.protocol!=="http:"?null:l?a.pathname+a.search+a.hash:a.href:null}function yT(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)yT(t)}}const qd=Symbol("node-seen");function KH(e,t,r){return t===La.remove?{type:"remove"}:t===La.textOnly?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:r},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function XH(e,t,r){if(t===La.remove)return{type:"remove"};if(t===La.textOnly){const n=String(e.properties.alt||"");return n?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:n}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:r},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}const QH=(e,t,r,n,i,s,a,o,l)=>{const u=(c,d,h)=>{if(c.type!=="element"||c[qd])return Co;if(c.tagName==="a"){const f=c4(c.properties.href,t,e,!1,!1,i);if(f===null){if(c[qd]=!0,Yr(c,u),h&&typeof d=="number"){const m=KH(c,o,a);if(m.type==="remove")return h.children.splice(d,1),[Ii,d];h.children[d]=m.element}return Ii}else return c.properties.href=f,c.properties.target="_blank",c.properties.rel="noopener noreferrer",Co}if(c.tagName==="img"){const f=c4(c.properties.src,r,e,n,!0,i);if(f===null){if(c[qd]=!0,Yr(c,u),h&&typeof d=="number"){const m=XH(c,l,s);if(m.type==="remove")return h.children.splice(d,1),[Ii,d];h.children[d]=m.element}return Ii}else return c.properties.src=f,Co}return Co};return u},vT=-1,D0=0,Bo=1,Ic=2,Xp=3,Qp=4,Jp=5,e1=6,xT=7,ET=8,d4=typeof self=="object"?self:globalThis,JH=(e,t)=>{const r=(i,s)=>(e.set(s,i),i),n=i=>{if(e.has(i))return e.get(i);const[s,a]=t[i];switch(s){case D0:case vT:return r(a,i);case Bo:{const o=r([],i);for(const l of a)o.push(n(l));return o}case Ic:{const o=r({},i);for(const[l,u]of a)o[n(l)]=n(u);return o}case Xp:return r(new Date(a),i);case Qp:{const{source:o,flags:l}=a;return r(new RegExp(o,l),i)}case Jp:{const o=r(new Map,i);for(const[l,u]of a)o.set(n(l),n(u));return o}case e1:{const o=r(new Set,i);for(const l of a)o.add(n(l));return o}case xT:{const{name:o,message:l}=a;return r(new d4[o](l),i)}case ET:return r(BigInt(a),i);case"BigInt":return r(Object(BigInt(a)),i);case"ArrayBuffer":return r(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:o}=new Uint8Array(a);return r(new DataView(o),a)}}return r(new d4[s](a),i)};return n},h4=e=>JH(new Map,e)(0),Js="",{toString:eV}={},{keys:tV}=Object,po=e=>{const t=typeof e;if(t!=="object"||!e)return[D0,t];const r=eV.call(e).slice(8,-1);switch(r){case"Array":return[Bo,Js];case"Object":return[Ic,Js];case"Date":return[Xp,Js];case"RegExp":return[Qp,Js];case"Map":return[Jp,Js];case"Set":return[e1,Js];case"DataView":return[Bo,r]}return r.includes("Array")?[Bo,r]:r.includes("Error")?[xT,r]:[Ic,r]},yu=([e,t])=>e===D0&&(t==="function"||t==="symbol"),rV=(e,t,r,n)=>{const i=(a,o)=>{const l=n.push(a)-1;return r.set(o,l),l},s=a=>{if(r.has(a))return r.get(a);let[o,l]=po(a);switch(o){case D0:{let c=a;switch(l){case"bigint":o=ET,c=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);c=null;break;case"undefined":return i([vT],a)}return i([o,c],a)}case Bo:{if(l){let h=a;return l==="DataView"?h=new Uint8Array(a.buffer):l==="ArrayBuffer"&&(h=new Uint8Array(a)),i([l,[...h]],a)}const c=[],d=i([o,c],a);for(const h of a)c.push(s(h));return d}case Ic:{if(l)switch(l){case"BigInt":return i([l,a.toString()],a);case"Boolean":case"Number":case"String":return i([l,a.valueOf()],a)}if(t&&"toJSON"in a)return s(a.toJSON());const c=[],d=i([o,c],a);for(const h of tV(a))(e||!yu(po(a[h])))&&c.push([s(h),s(a[h])]);return d}case Xp:return i([o,a.toISOString()],a);case Qp:{const{source:c,flags:d}=a;return i([o,{source:c,flags:d}],a)}case Jp:{const c=[],d=i([o,c],a);for(const[h,f]of a)(e||!(yu(po(h))||yu(po(f))))&&c.push([s(h),s(f)]);return d}case e1:{const c=[],d=i([o,c],a);for(const h of a)(e||!yu(po(h)))&&c.push(s(h));return d}}const{message:u}=a;return i([o,{name:l,message:u}],a)};return s},f4=(e,{json:t,lossy:r}={})=>{const n=[];return rV(!(t||r),!!t,new Map,n)(e),n},Os=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?h4(f4(e,t)):structuredClone(e):(e,t)=>h4(f4(e,t));function nV(e){const t=String(e),r=[];return{toOffset:i,toPoint:n};function n(s){if(typeof s=="number"&&s>-1&&s<=t.length){let a=0;for(;;){let o=r[a];if(o===void 0){const l=m4(t,r[a-1]);o=l===-1?t.length+1:l+1,r[a]=o}if(o>s)return{line:a+1,column:s-(a>0?r[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(;r.length<s.line;){const o=r[r.length-1],l=m4(t,o),u=l===-1?t.length+1:l+1;if(o===u)break;r.push(u)}const a=(s.line>1?r[s.line-2]:0)+s.column-1;if(a<r[s.line-1])return a}}}function m4(e,t){const r=e.indexOf("\r",t),n=e.indexOf(`
636
- `,t);return n===-1?r:r===-1||r+1===n?n:r<n?r:n}const _T={}.hasOwnProperty,iV=Object.prototype;function sV(e,t){const r=t||{};return t1({file:r.file||void 0,location:!1,schema:r.space==="svg"?On:Va,verbose:r.verbose||!1},e)}function t1(e,t){let r;switch(t.nodeName){case"#comment":{const n=t;return r={type:"comment",value:n.data},zu(e,n,r),r}case"#document":case"#document-fragment":{const n=t,i="mode"in n?n.mode==="quirks"||n.mode==="limited-quirks":!1;if(r={type:"root",children:TT(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const s=String(e.file),a=nV(s),o=a.toPoint(0),l=a.toPoint(s.length);r.position={start:o,end:l}}return r}case"#documentType":{const n=t;return r={type:"doctype"},zu(e,n,r),r}case"#text":{const n=t;return r={type:"text",value:n.value},zu(e,n,r),r}default:return r=aV(e,t),r}}function TT(e,t){let r=-1;const n=[];for(;++r<t.length;){const i=t1(e,t[r]);n.push(i)}return n}function aV(e,t){const r=e.schema;e.schema=t.namespaceURI===An.svg?On:Va;let n=-1;const i={};for(;++n<t.attrs.length;){const o=t.attrs[n],l=(o.prefix?o.prefix+":":"")+o.name;_T.call(iV,l)||(i[l]=o.value)}const a=(e.schema.space==="svg"?d_:c_)(t.tagName,i,TT(e,t.childNodes));if(zu(e,t,a),a.tagName==="template"){const o=t,l=o.sourceCodeLocation,u=l&&l.startTag&&fa(l.startTag),c=l&&l.endTag&&fa(l.endTag),d=t1(e,o.content);u&&c&&e.file&&(d.position={start:u.end,end:c.start}),a.content=d}return e.schema=r,a}function zu(e,t,r){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const n=oV(e,r,t.sourceCodeLocation);n&&(e.location=!0,r.position=n)}}function oV(e,t,r){const n=fa(r);if(t.type==="element"){const i=t.children[t.children.length-1];if(n&&!r.endTag&&i&&i.position&&i.position.end&&(n.end=Object.assign({},i.position.end)),e.verbose){const s={};let a;if(r.attrs)for(a in r.attrs)_T.call(r.attrs,a)&&(s[Il(e.schema,a).property]=fa(r.attrs[a]));r.startTag;const o=fa(r.startTag),l=r.endTag?fa(r.endTag):void 0,u={opening:o};l&&(u.closing=l),u.properties=s,t.data={position:u}}}return n}function fa(e){const t=p4({line:e.startLine,column:e.startCol,offset:e.startOffset}),r=p4({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||r?{start:t,end:r}:void 0}function p4(e){return e.line&&e.column?e:void 0}const lV={},uV={}.hasOwnProperty,wT=kp("type",{handlers:{root:dV,element:gV,text:mV,comment:pV,doctype:fV}});function cV(e,t){const n=(t||lV).space;return wT(e,n==="svg"?On:Va)}function dV(e,t){const r={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return r.childNodes=r1(e.children,r,t),Xa(e,r),r}function hV(e,t){const r={nodeName:"#document-fragment",childNodes:[]};return r.childNodes=r1(e.children,r,t),Xa(e,r),r}function fV(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Xa(e,t),t}function mV(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Xa(e,t),t}function pV(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Xa(e,t),t}function gV(e,t){const r=t;let n=r;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&r.space==="html"&&(n=On);const i=[];let s;if(e.properties){for(s in e.properties)if(s!=="children"&&uV.call(e.properties,s)){const l=bV(n,s,e.properties[s]);l&&i.push(l)}}const a=n.space,o={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:An[a],childNodes:[],parentNode:null};return o.childNodes=r1(e.children,o,n),Xa(e,o),e.tagName==="template"&&e.content&&(o.content=hV(e.content,n)),o}function bV(e,t,r){const n=Il(e,t);if(r===!1||r===null||r===void 0||typeof r=="number"&&Number.isNaN(r)||!r&&n.boolean)return;Array.isArray(r)&&(r=n.commaSeparated?Sp(r):Ap(r));const i={name:n.attribute,value:r===!0?"":String(r)};if(n.space&&n.space!=="html"&&n.space!=="svg"){const s=i.name.indexOf(":");s<0?i.prefix="":(i.name=i.name.slice(s+1),i.prefix=n.attribute.slice(0,s)),i.namespace=An[n.space]}return i}function r1(e,t,r){let n=-1;const i=[];if(e)for(;++n<e.length;){const s=wT(e[n],r);s.parentNode=t,i.push(s)}return i}function Xa(e,t){const r=e.position;r&&r.start&&r.end&&(r.start.offset,r.end.offset,t.sourceCodeLocation={startLine:r.start.line,startCol:r.start.column,startOffset:r.start.offset,endLine:r.end.line,endCol:r.end.column,endOffset:r.end.offset})}const yV=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]),pt="�";var D;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(D||(D={}));const br={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function kT(e){return e>=55296&&e<=57343}function vV(e){return e>=56320&&e<=57343}function xV(e,t){return(e-55296)*1024+9216+t}function ST(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function AT(e){return e>=64976&&e<=65007||yV.has(e)}var K;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(K||(K={}));const EV=65536;class _V{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=EV,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,r){const{line:n,col:i,offset:s}=this,a=i+r,o=s+r;return{code:t,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const r=this.html.charCodeAt(this.pos+1);if(vV(r))return this.pos++,this._addGap(),xV(t,r)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,D.EOF;return this._err(K.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,r){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=r}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,r){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(r)return this.html.startsWith(t,this.pos);for(let n=0;n<t.length;n++)if((this.html.charCodeAt(this.pos+n)|32)!==t.charCodeAt(n))return!1;return!0}peek(t){const r=this.pos+t;if(r>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,D.EOF;const n=this.html.charCodeAt(r);return n===D.CARRIAGE_RETURN?D.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,D.EOF;let t=this.html.charCodeAt(this.pos);return t===D.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,D.LINE_FEED):t===D.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,kT(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===D.LINE_FEED||t===D.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){ST(t)?this._err(K.controlCharacterInInputStream):AT(t)&&this._err(K.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var qe;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(qe||(qe={}));function CT(e,t){for(let r=e.attrs.length-1;r>=0;r--)if(e.attrs[r].name===t)return e.attrs[r].value;return null}const TV=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୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢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;怳Ādp໩໮uct;戏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ǣጓ\0጖y;䐎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Ā;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀ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Ā;e᜚᜜lƀ;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\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩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ↄⅪ←ٖ↛ǰ↉\0↎proø₞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;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\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\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),wV=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 kV(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=wV.get(e))!==null&&t!==void 0?t:e}var Wt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Wt||(Wt={}));const SV=32;var Ni;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Ni||(Ni={}));function qf(e){return e>=Wt.ZERO&&e<=Wt.NINE}function AV(e){return e>=Wt.UPPER_A&&e<=Wt.UPPER_F||e>=Wt.LOWER_A&&e<=Wt.LOWER_F}function CV(e){return e>=Wt.UPPER_A&&e<=Wt.UPPER_Z||e>=Wt.LOWER_A&&e<=Wt.LOWER_Z||qf(e)}function IV(e){return e===Wt.EQUALS||CV(e)}var Ht;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Ht||(Ht={}));var Xn;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Xn||(Xn={}));class NV{constructor(t,r,n){this.decodeTree=t,this.emitCodePoint=r,this.errors=n,this.state=Ht.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Xn.Strict}startEntity(t){this.decodeMode=t,this.state=Ht.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,r){switch(this.state){case Ht.EntityStart:return t.charCodeAt(r)===Wt.NUM?(this.state=Ht.NumericStart,this.consumed+=1,this.stateNumericStart(t,r+1)):(this.state=Ht.NamedEntity,this.stateNamedEntity(t,r));case Ht.NumericStart:return this.stateNumericStart(t,r);case Ht.NumericDecimal:return this.stateNumericDecimal(t,r);case Ht.NumericHex:return this.stateNumericHex(t,r);case Ht.NamedEntity:return this.stateNamedEntity(t,r)}}stateNumericStart(t,r){return r>=t.length?-1:(t.charCodeAt(r)|SV)===Wt.LOWER_X?(this.state=Ht.NumericHex,this.consumed+=1,this.stateNumericHex(t,r+1)):(this.state=Ht.NumericDecimal,this.stateNumericDecimal(t,r))}addToNumericResult(t,r,n,i){if(r!==n){const s=n-r;this.result=this.result*Math.pow(i,s)+Number.parseInt(t.substr(r,s),i),this.consumed+=s}}stateNumericHex(t,r){const n=r;for(;r<t.length;){const i=t.charCodeAt(r);if(qf(i)||AV(i))r+=1;else return this.addToNumericResult(t,n,r,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,n,r,16),-1}stateNumericDecimal(t,r){const n=r;for(;r<t.length;){const i=t.charCodeAt(r);if(qf(i))r+=1;else return this.addToNumericResult(t,n,r,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,n,r,10),-1}emitNumericEntity(t,r){var n;if(this.consumed<=r)return(n=this.errors)===null||n===void 0||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Wt.SEMI)this.consumed+=1;else if(this.decodeMode===Xn.Strict)return 0;return this.emitCodePoint(kV(this.result),this.consumed),this.errors&&(t!==Wt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,r){const{decodeTree:n}=this;let i=n[this.treeIndex],s=(i&Ni.VALUE_LENGTH)>>14;for(;r<t.length;r++,this.excess++){const a=t.charCodeAt(r);if(this.treeIndex=RV(n,i,this.treeIndex+Math.max(1,s),a),this.treeIndex<0)return this.result===0||this.decodeMode===Xn.Attribute&&(s===0||IV(a))?0:this.emitNotTerminatedNamedEntity();if(i=n[this.treeIndex],s=(i&Ni.VALUE_LENGTH)>>14,s!==0){if(a===Wt.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==Xn.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:r,decodeTree:n}=this,i=(n[r]&Ni.VALUE_LENGTH)>>14;return this.emitNamedEntityData(r,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,r,n){const{decodeTree:i}=this;return this.emitCodePoint(r===1?i[t]&~Ni.VALUE_LENGTH:i[t+1],n),r===3&&this.emitCodePoint(i[t+2],n),n}end(){var t;switch(this.state){case Ht.NamedEntity:return this.result!==0&&(this.decodeMode!==Xn.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ht.NumericDecimal:return this.emitNumericEntity(0,2);case Ht.NumericHex:return this.emitNumericEntity(0,3);case Ht.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ht.EntityStart:return 0}}}function RV(e,t,r,n){const i=(t&Ni.BRANCH_LENGTH)>>7,s=t&Ni.JUMP_TABLE;if(i===0)return s!==0&&n===s?r:-1;if(s){const l=n-s;return l<0||l>=i?-1:e[r+l]-1}let a=r,o=a+i-1;for(;a<=o;){const l=a+o>>>1,u=e[l];if(u<n)a=l+1;else if(u>n)o=l-1;else return e[l+i]}return-1}var te;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(te||(te={}));var ws;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(ws||(ws={}));var Br;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Br||(Br={}));var q;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(q||(q={}));var p;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(p||(p={}));const PV=new Map([[q.A,p.A],[q.ADDRESS,p.ADDRESS],[q.ANNOTATION_XML,p.ANNOTATION_XML],[q.APPLET,p.APPLET],[q.AREA,p.AREA],[q.ARTICLE,p.ARTICLE],[q.ASIDE,p.ASIDE],[q.B,p.B],[q.BASE,p.BASE],[q.BASEFONT,p.BASEFONT],[q.BGSOUND,p.BGSOUND],[q.BIG,p.BIG],[q.BLOCKQUOTE,p.BLOCKQUOTE],[q.BODY,p.BODY],[q.BR,p.BR],[q.BUTTON,p.BUTTON],[q.CAPTION,p.CAPTION],[q.CENTER,p.CENTER],[q.CODE,p.CODE],[q.COL,p.COL],[q.COLGROUP,p.COLGROUP],[q.DD,p.DD],[q.DESC,p.DESC],[q.DETAILS,p.DETAILS],[q.DIALOG,p.DIALOG],[q.DIR,p.DIR],[q.DIV,p.DIV],[q.DL,p.DL],[q.DT,p.DT],[q.EM,p.EM],[q.EMBED,p.EMBED],[q.FIELDSET,p.FIELDSET],[q.FIGCAPTION,p.FIGCAPTION],[q.FIGURE,p.FIGURE],[q.FONT,p.FONT],[q.FOOTER,p.FOOTER],[q.FOREIGN_OBJECT,p.FOREIGN_OBJECT],[q.FORM,p.FORM],[q.FRAME,p.FRAME],[q.FRAMESET,p.FRAMESET],[q.H1,p.H1],[q.H2,p.H2],[q.H3,p.H3],[q.H4,p.H4],[q.H5,p.H5],[q.H6,p.H6],[q.HEAD,p.HEAD],[q.HEADER,p.HEADER],[q.HGROUP,p.HGROUP],[q.HR,p.HR],[q.HTML,p.HTML],[q.I,p.I],[q.IMG,p.IMG],[q.IMAGE,p.IMAGE],[q.INPUT,p.INPUT],[q.IFRAME,p.IFRAME],[q.KEYGEN,p.KEYGEN],[q.LABEL,p.LABEL],[q.LI,p.LI],[q.LINK,p.LINK],[q.LISTING,p.LISTING],[q.MAIN,p.MAIN],[q.MALIGNMARK,p.MALIGNMARK],[q.MARQUEE,p.MARQUEE],[q.MATH,p.MATH],[q.MENU,p.MENU],[q.META,p.META],[q.MGLYPH,p.MGLYPH],[q.MI,p.MI],[q.MO,p.MO],[q.MN,p.MN],[q.MS,p.MS],[q.MTEXT,p.MTEXT],[q.NAV,p.NAV],[q.NOBR,p.NOBR],[q.NOFRAMES,p.NOFRAMES],[q.NOEMBED,p.NOEMBED],[q.NOSCRIPT,p.NOSCRIPT],[q.OBJECT,p.OBJECT],[q.OL,p.OL],[q.OPTGROUP,p.OPTGROUP],[q.OPTION,p.OPTION],[q.P,p.P],[q.PARAM,p.PARAM],[q.PLAINTEXT,p.PLAINTEXT],[q.PRE,p.PRE],[q.RB,p.RB],[q.RP,p.RP],[q.RT,p.RT],[q.RTC,p.RTC],[q.RUBY,p.RUBY],[q.S,p.S],[q.SCRIPT,p.SCRIPT],[q.SEARCH,p.SEARCH],[q.SECTION,p.SECTION],[q.SELECT,p.SELECT],[q.SOURCE,p.SOURCE],[q.SMALL,p.SMALL],[q.SPAN,p.SPAN],[q.STRIKE,p.STRIKE],[q.STRONG,p.STRONG],[q.STYLE,p.STYLE],[q.SUB,p.SUB],[q.SUMMARY,p.SUMMARY],[q.SUP,p.SUP],[q.TABLE,p.TABLE],[q.TBODY,p.TBODY],[q.TEMPLATE,p.TEMPLATE],[q.TEXTAREA,p.TEXTAREA],[q.TFOOT,p.TFOOT],[q.TD,p.TD],[q.TH,p.TH],[q.THEAD,p.THEAD],[q.TITLE,p.TITLE],[q.TR,p.TR],[q.TRACK,p.TRACK],[q.TT,p.TT],[q.U,p.U],[q.UL,p.UL],[q.SVG,p.SVG],[q.VAR,p.VAR],[q.WBR,p.WBR],[q.XMP,p.XMP]]);function Qa(e){var t;return(t=PV.get(e))!==null&&t!==void 0?t:p.UNKNOWN}const se=p,OV={[te.HTML]:new Set([se.ADDRESS,se.APPLET,se.AREA,se.ARTICLE,se.ASIDE,se.BASE,se.BASEFONT,se.BGSOUND,se.BLOCKQUOTE,se.BODY,se.BR,se.BUTTON,se.CAPTION,se.CENTER,se.COL,se.COLGROUP,se.DD,se.DETAILS,se.DIR,se.DIV,se.DL,se.DT,se.EMBED,se.FIELDSET,se.FIGCAPTION,se.FIGURE,se.FOOTER,se.FORM,se.FRAME,se.FRAMESET,se.H1,se.H2,se.H3,se.H4,se.H5,se.H6,se.HEAD,se.HEADER,se.HGROUP,se.HR,se.HTML,se.IFRAME,se.IMG,se.INPUT,se.LI,se.LINK,se.LISTING,se.MAIN,se.MARQUEE,se.MENU,se.META,se.NAV,se.NOEMBED,se.NOFRAMES,se.NOSCRIPT,se.OBJECT,se.OL,se.P,se.PARAM,se.PLAINTEXT,se.PRE,se.SCRIPT,se.SECTION,se.SELECT,se.SOURCE,se.STYLE,se.SUMMARY,se.TABLE,se.TBODY,se.TD,se.TEMPLATE,se.TEXTAREA,se.TFOOT,se.TH,se.THEAD,se.TITLE,se.TR,se.TRACK,se.UL,se.WBR,se.XMP]),[te.MATHML]:new Set([se.MI,se.MO,se.MN,se.MS,se.MTEXT,se.ANNOTATION_XML]),[te.SVG]:new Set([se.TITLE,se.FOREIGN_OBJECT,se.DESC]),[te.XLINK]:new Set,[te.XML]:new Set,[te.XMLNS]:new Set},Gf=new Set([se.H1,se.H2,se.H3,se.H4,se.H5,se.H6]);q.STYLE,q.SCRIPT,q.XMP,q.IFRAME,q.NOEMBED,q.NOFRAMES,q.PLAINTEXT;var B;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(B||(B={}));const wt={DATA:B.DATA,RCDATA:B.RCDATA,RAWTEXT:B.RAWTEXT,SCRIPT_DATA:B.SCRIPT_DATA,PLAINTEXT:B.PLAINTEXT,CDATA_SECTION:B.CDATA_SECTION};function LV(e){return e>=D.DIGIT_0&&e<=D.DIGIT_9}function Io(e){return e>=D.LATIN_CAPITAL_A&&e<=D.LATIN_CAPITAL_Z}function DV(e){return e>=D.LATIN_SMALL_A&&e<=D.LATIN_SMALL_Z}function xi(e){return DV(e)||Io(e)}function g4(e){return xi(e)||LV(e)}function vu(e){return e+32}function IT(e){return e===D.SPACE||e===D.LINE_FEED||e===D.TABULATION||e===D.FORM_FEED}function b4(e){return IT(e)||e===D.SOLIDUS||e===D.GREATER_THAN_SIGN}function MV(e){return e===D.NULL?K.nullCharacterReference:e>1114111?K.characterReferenceOutsideUnicodeRange:kT(e)?K.surrogateCharacterReference:AT(e)?K.noncharacterCharacterReference:ST(e)||e===D.CARRIAGE_RETURN?K.controlCharacterReference:null}class BV{constructor(t,r){this.options=t,this.handler=r,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=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 _V(r),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new NV(TV,(n,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(n)},r.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(K.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:n=>{this._err(K.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+n)},validateNumericCharacterReference:n=>{const i=MV(n);i&&this._err(i,1)}}:void 0)}_err(t,r=0){var n,i;(i=(n=this.handler).onParseError)===null||i===void 0||i.call(n,this.preprocessor.getError(t,r))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,r,n){this.active=!0,this.preprocessor.write(t,r),this._runParsingLoop(),this.paused||n==null||n()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let r=0;r<t;r++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,r){return this.preprocessor.startsWith(t,r)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:qe.START_TAG,tagName:"",tagID:p.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:qe.END_TAG,tagName:"",tagID:p.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:qe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:qe.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,r){this.currentCharacterToken={type:t,chars:r,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,r;const n=this.currentToken;if(CT(n,this.currentAttr.name)===null){if(n.attrs.push(this.currentAttr),n.location&&this.currentLocation){const i=(t=(r=n.location).attrs)!==null&&t!==void 0?t:r.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(K.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Qa(t.tagName),t.type===qe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(K.endTagWithAttributes),t.selfClosing&&this._err(K.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case qe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case qe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case qe.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:qe.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,r){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=r;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,r)}_emitCodePoint(t){const r=IT(t)?qe.WHITESPACE_CHARACTER:t===D.NULL?qe.NULL_CHARACTER:qe.CHARACTER;this._appendCharToCurrentCharacterToken(r,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(qe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=B.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Xn.Attribute:Xn.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===B.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===B.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===B.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case B.DATA:{this._stateData(t);break}case B.RCDATA:{this._stateRcdata(t);break}case B.RAWTEXT:{this._stateRawtext(t);break}case B.SCRIPT_DATA:{this._stateScriptData(t);break}case B.PLAINTEXT:{this._statePlaintext(t);break}case B.TAG_OPEN:{this._stateTagOpen(t);break}case B.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case B.TAG_NAME:{this._stateTagName(t);break}case B.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case B.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case B.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case B.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case B.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case B.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case B.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case B.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case B.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case B.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case B.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case B.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case B.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case B.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case B.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case B.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case B.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case B.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case B.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case B.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case B.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case B.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case B.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case B.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case B.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case B.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case B.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case B.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case B.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case B.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case B.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case B.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case B.BOGUS_COMMENT:{this._stateBogusComment(t);break}case B.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case B.COMMENT_START:{this._stateCommentStart(t);break}case B.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case B.COMMENT:{this._stateComment(t);break}case B.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case B.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case B.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case B.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case B.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case B.COMMENT_END:{this._stateCommentEnd(t);break}case B.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case B.DOCTYPE:{this._stateDoctype(t);break}case B.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case B.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case B.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case B.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case B.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case B.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case B.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case B.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case B.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case B.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case B.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case B.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case B.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case B.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case B.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case B.CDATA_SECTION:{this._stateCdataSection(t);break}case B.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case B.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case B.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case B.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case D.LESS_THAN_SIGN:{this.state=B.TAG_OPEN;break}case D.AMPERSAND:{this._startCharacterReference();break}case D.NULL:{this._err(K.unexpectedNullCharacter),this._emitCodePoint(t);break}case D.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case D.AMPERSAND:{this._startCharacterReference();break}case D.LESS_THAN_SIGN:{this.state=B.RCDATA_LESS_THAN_SIGN;break}case D.NULL:{this._err(K.unexpectedNullCharacter),this._emitChars(pt);break}case D.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case D.LESS_THAN_SIGN:{this.state=B.RAWTEXT_LESS_THAN_SIGN;break}case D.NULL:{this._err(K.unexpectedNullCharacter),this._emitChars(pt);break}case D.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case D.LESS_THAN_SIGN:{this.state=B.SCRIPT_DATA_LESS_THAN_SIGN;break}case D.NULL:{this._err(K.unexpectedNullCharacter),this._emitChars(pt);break}case D.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case D.NULL:{this._err(K.unexpectedNullCharacter),this._emitChars(pt);break}case D.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(xi(t))this._createStartTagToken(),this.state=B.TAG_NAME,this._stateTagName(t);else switch(t){case D.EXCLAMATION_MARK:{this.state=B.MARKUP_DECLARATION_OPEN;break}case D.SOLIDUS:{this.state=B.END_TAG_OPEN;break}case D.QUESTION_MARK:{this._err(K.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=B.BOGUS_COMMENT,this._stateBogusComment(t);break}case D.EOF:{this._err(K.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(K.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=B.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(xi(t))this._createEndTagToken(),this.state=B.TAG_NAME,this._stateTagName(t);else switch(t){case D.GREATER_THAN_SIGN:{this._err(K.missingEndTagName),this.state=B.DATA;break}case D.EOF:{this._err(K.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(K.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=B.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const r=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this.state=B.BEFORE_ATTRIBUTE_NAME;break}case D.SOLIDUS:{this.state=B.SELF_CLOSING_START_TAG;break}case D.GREATER_THAN_SIGN:{this.state=B.DATA,this.emitCurrentTagToken();break}case D.NULL:{this._err(K.unexpectedNullCharacter),r.tagName+=pt;break}case D.EOF:{this._err(K.eofInTag),this._emitEOFToken();break}default:r.tagName+=String.fromCodePoint(Io(t)?vu(t):t)}}_stateRcdataLessThanSign(t){t===D.SOLIDUS?this.state=B.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=B.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){xi(t)?(this.state=B.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=B.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const r=this.currentToken;switch(r.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=B.BEFORE_ATTRIBUTE_NAME,!1;case D.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=B.SELF_CLOSING_START_TAG,!1;case D.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=B.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=B.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===D.SOLIDUS?this.state=B.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=B.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){xi(t)?(this.state=B.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=B.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=B.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case D.SOLIDUS:{this.state=B.SCRIPT_DATA_END_TAG_OPEN;break}case D.EXCLAMATION_MARK:{this.state=B.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=B.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){xi(t)?(this.state=B.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=B.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=B.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===D.HYPHEN_MINUS?(this.state=B.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=B.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===D.HYPHEN_MINUS?(this.state=B.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=B.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case D.HYPHEN_MINUS:{this.state=B.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case D.LESS_THAN_SIGN:{this.state=B.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case D.NULL:{this._err(K.unexpectedNullCharacter),this._emitChars(pt);break}case D.EOF:{this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case D.HYPHEN_MINUS:{this.state=B.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case D.LESS_THAN_SIGN:{this.state=B.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case D.NULL:{this._err(K.unexpectedNullCharacter),this.state=B.SCRIPT_DATA_ESCAPED,this._emitChars(pt);break}case D.EOF:{this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=B.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case D.HYPHEN_MINUS:{this._emitChars("-");break}case D.LESS_THAN_SIGN:{this.state=B.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case D.GREATER_THAN_SIGN:{this.state=B.SCRIPT_DATA,this._emitChars(">");break}case D.NULL:{this._err(K.unexpectedNullCharacter),this.state=B.SCRIPT_DATA_ESCAPED,this._emitChars(pt);break}case D.EOF:{this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=B.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===D.SOLIDUS?this.state=B.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:xi(t)?(this._emitChars("<"),this.state=B.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=B.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){xi(t)?(this.state=B.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=B.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=B.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(br.SCRIPT,!1)&&b4(this.preprocessor.peek(br.SCRIPT.length))){this._emitCodePoint(t);for(let r=0;r<br.SCRIPT.length;r++)this._emitCodePoint(this._consume());this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=B.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case D.HYPHEN_MINUS:{this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case D.LESS_THAN_SIGN:{this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case D.NULL:{this._err(K.unexpectedNullCharacter),this._emitChars(pt);break}case D.EOF:{this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case D.HYPHEN_MINUS:{this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case D.LESS_THAN_SIGN:{this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case D.NULL:{this._err(K.unexpectedNullCharacter),this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(pt);break}case D.EOF:{this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case D.HYPHEN_MINUS:{this._emitChars("-");break}case D.LESS_THAN_SIGN:{this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case D.GREATER_THAN_SIGN:{this.state=B.SCRIPT_DATA,this._emitChars(">");break}case D.NULL:{this._err(K.unexpectedNullCharacter),this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(pt);break}case D.EOF:{this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===D.SOLIDUS?(this.state=B.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(br.SCRIPT,!1)&&b4(this.preprocessor.peek(br.SCRIPT.length))){this._emitCodePoint(t);for(let r=0;r<br.SCRIPT.length;r++)this._emitCodePoint(this._consume());this.state=B.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.SOLIDUS:case D.GREATER_THAN_SIGN:case D.EOF:{this.state=B.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case D.EQUALS_SIGN:{this._err(K.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=B.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=B.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:case D.SOLIDUS:case D.GREATER_THAN_SIGN:case D.EOF:{this._leaveAttrName(),this.state=B.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case D.EQUALS_SIGN:{this._leaveAttrName(),this.state=B.BEFORE_ATTRIBUTE_VALUE;break}case D.QUOTATION_MARK:case D.APOSTROPHE:case D.LESS_THAN_SIGN:{this._err(K.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case D.NULL:{this._err(K.unexpectedNullCharacter),this.currentAttr.name+=pt;break}default:this.currentAttr.name+=String.fromCodePoint(Io(t)?vu(t):t)}}_stateAfterAttributeName(t){switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.SOLIDUS:{this.state=B.SELF_CLOSING_START_TAG;break}case D.EQUALS_SIGN:{this.state=B.BEFORE_ATTRIBUTE_VALUE;break}case D.GREATER_THAN_SIGN:{this.state=B.DATA,this.emitCurrentTagToken();break}case D.EOF:{this._err(K.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=B.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.QUOTATION_MARK:{this.state=B.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case D.APOSTROPHE:{this.state=B.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case D.GREATER_THAN_SIGN:{this._err(K.missingAttributeValue),this.state=B.DATA,this.emitCurrentTagToken();break}default:this.state=B.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case D.QUOTATION_MARK:{this.state=B.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case D.AMPERSAND:{this._startCharacterReference();break}case D.NULL:{this._err(K.unexpectedNullCharacter),this.currentAttr.value+=pt;break}case D.EOF:{this._err(K.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case D.APOSTROPHE:{this.state=B.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case D.AMPERSAND:{this._startCharacterReference();break}case D.NULL:{this._err(K.unexpectedNullCharacter),this.currentAttr.value+=pt;break}case D.EOF:{this._err(K.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this._leaveAttrValue(),this.state=B.BEFORE_ATTRIBUTE_NAME;break}case D.AMPERSAND:{this._startCharacterReference();break}case D.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=B.DATA,this.emitCurrentTagToken();break}case D.NULL:{this._err(K.unexpectedNullCharacter),this.currentAttr.value+=pt;break}case D.QUOTATION_MARK:case D.APOSTROPHE:case D.LESS_THAN_SIGN:case D.EQUALS_SIGN:case D.GRAVE_ACCENT:{this._err(K.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case D.EOF:{this._err(K.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this._leaveAttrValue(),this.state=B.BEFORE_ATTRIBUTE_NAME;break}case D.SOLIDUS:{this._leaveAttrValue(),this.state=B.SELF_CLOSING_START_TAG;break}case D.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=B.DATA,this.emitCurrentTagToken();break}case D.EOF:{this._err(K.eofInTag),this._emitEOFToken();break}default:this._err(K.missingWhitespaceBetweenAttributes),this.state=B.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case D.GREATER_THAN_SIGN:{const r=this.currentToken;r.selfClosing=!0,this.state=B.DATA,this.emitCurrentTagToken();break}case D.EOF:{this._err(K.eofInTag),this._emitEOFToken();break}default:this._err(K.unexpectedSolidusInTag),this.state=B.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const r=this.currentToken;switch(t){case D.GREATER_THAN_SIGN:{this.state=B.DATA,this.emitCurrentComment(r);break}case D.EOF:{this.emitCurrentComment(r),this._emitEOFToken();break}case D.NULL:{this._err(K.unexpectedNullCharacter),r.data+=pt;break}default:r.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(br.DASH_DASH,!0)?(this._createCommentToken(br.DASH_DASH.length+1),this.state=B.COMMENT_START):this._consumeSequenceIfMatch(br.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(br.DOCTYPE.length+1),this.state=B.DOCTYPE):this._consumeSequenceIfMatch(br.CDATA_START,!0)?this.inForeignNode?this.state=B.CDATA_SECTION:(this._err(K.cdataInHtmlContent),this._createCommentToken(br.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=B.BOGUS_COMMENT):this._ensureHibernation()||(this._err(K.incorrectlyOpenedComment),this._createCommentToken(2),this.state=B.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case D.HYPHEN_MINUS:{this.state=B.COMMENT_START_DASH;break}case D.GREATER_THAN_SIGN:{this._err(K.abruptClosingOfEmptyComment),this.state=B.DATA;const r=this.currentToken;this.emitCurrentComment(r);break}default:this.state=B.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const r=this.currentToken;switch(t){case D.HYPHEN_MINUS:{this.state=B.COMMENT_END;break}case D.GREATER_THAN_SIGN:{this._err(K.abruptClosingOfEmptyComment),this.state=B.DATA,this.emitCurrentComment(r);break}case D.EOF:{this._err(K.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="-",this.state=B.COMMENT,this._stateComment(t)}}_stateComment(t){const r=this.currentToken;switch(t){case D.HYPHEN_MINUS:{this.state=B.COMMENT_END_DASH;break}case D.LESS_THAN_SIGN:{r.data+="<",this.state=B.COMMENT_LESS_THAN_SIGN;break}case D.NULL:{this._err(K.unexpectedNullCharacter),r.data+=pt;break}case D.EOF:{this._err(K.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const r=this.currentToken;switch(t){case D.EXCLAMATION_MARK:{r.data+="!",this.state=B.COMMENT_LESS_THAN_SIGN_BANG;break}case D.LESS_THAN_SIGN:{r.data+="<";break}default:this.state=B.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===D.HYPHEN_MINUS?this.state=B.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=B.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===D.HYPHEN_MINUS?this.state=B.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=B.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==D.GREATER_THAN_SIGN&&t!==D.EOF&&this._err(K.nestedComment),this.state=B.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const r=this.currentToken;switch(t){case D.HYPHEN_MINUS:{this.state=B.COMMENT_END;break}case D.EOF:{this._err(K.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="-",this.state=B.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const r=this.currentToken;switch(t){case D.GREATER_THAN_SIGN:{this.state=B.DATA,this.emitCurrentComment(r);break}case D.EXCLAMATION_MARK:{this.state=B.COMMENT_END_BANG;break}case D.HYPHEN_MINUS:{r.data+="-";break}case D.EOF:{this._err(K.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="--",this.state=B.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const r=this.currentToken;switch(t){case D.HYPHEN_MINUS:{r.data+="--!",this.state=B.COMMENT_END_DASH;break}case D.GREATER_THAN_SIGN:{this._err(K.incorrectlyClosedComment),this.state=B.DATA,this.emitCurrentComment(r);break}case D.EOF:{this._err(K.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="--!",this.state=B.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this.state=B.BEFORE_DOCTYPE_NAME;break}case D.GREATER_THAN_SIGN:{this.state=B.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case D.EOF:{this._err(K.eofInDoctype),this._createDoctypeToken(null);const r=this.currentToken;r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(K.missingWhitespaceBeforeDoctypeName),this.state=B.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Io(t))this._createDoctypeToken(String.fromCharCode(vu(t))),this.state=B.DOCTYPE_NAME;else switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.NULL:{this._err(K.unexpectedNullCharacter),this._createDoctypeToken(pt),this.state=B.DOCTYPE_NAME;break}case D.GREATER_THAN_SIGN:{this._err(K.missingDoctypeName),this._createDoctypeToken(null);const r=this.currentToken;r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=B.DATA;break}case D.EOF:{this._err(K.eofInDoctype),this._createDoctypeToken(null);const r=this.currentToken;r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=B.DOCTYPE_NAME}}_stateDoctypeName(t){const r=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this.state=B.AFTER_DOCTYPE_NAME;break}case D.GREATER_THAN_SIGN:{this.state=B.DATA,this.emitCurrentDoctype(r);break}case D.NULL:{this._err(K.unexpectedNullCharacter),r.name+=pt;break}case D.EOF:{this._err(K.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.name+=String.fromCodePoint(Io(t)?vu(t):t)}}_stateAfterDoctypeName(t){const r=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.GREATER_THAN_SIGN:{this.state=B.DATA,this.emitCurrentDoctype(r);break}case D.EOF:{this._err(K.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(br.PUBLIC,!1)?this.state=B.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(br.SYSTEM,!1)?this.state=B.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(K.invalidCharacterSequenceAfterDoctypeName),r.forceQuirks=!0,this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const r=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this.state=B.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case D.QUOTATION_MARK:{this._err(K.missingWhitespaceAfterDoctypePublicKeyword),r.publicId="",this.state=B.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case D.APOSTROPHE:{this._err(K.missingWhitespaceAfterDoctypePublicKeyword),r.publicId="",this.state=B.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case D.GREATER_THAN_SIGN:{this._err(K.missingDoctypePublicIdentifier),r.forceQuirks=!0,this.state=B.DATA,this.emitCurrentDoctype(r);break}case D.EOF:{this._err(K.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(K.missingQuoteBeforeDoctypePublicIdentifier),r.forceQuirks=!0,this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const r=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.QUOTATION_MARK:{r.publicId="",this.state=B.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case D.APOSTROPHE:{r.publicId="",this.state=B.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case D.GREATER_THAN_SIGN:{this._err(K.missingDoctypePublicIdentifier),r.forceQuirks=!0,this.state=B.DATA,this.emitCurrentDoctype(r);break}case D.EOF:{this._err(K.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(K.missingQuoteBeforeDoctypePublicIdentifier),r.forceQuirks=!0,this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const r=this.currentToken;switch(t){case D.QUOTATION_MARK:{this.state=B.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case D.NULL:{this._err(K.unexpectedNullCharacter),r.publicId+=pt;break}case D.GREATER_THAN_SIGN:{this._err(K.abruptDoctypePublicIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=B.DATA;break}case D.EOF:{this._err(K.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const r=this.currentToken;switch(t){case D.APOSTROPHE:{this.state=B.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case D.NULL:{this._err(K.unexpectedNullCharacter),r.publicId+=pt;break}case D.GREATER_THAN_SIGN:{this._err(K.abruptDoctypePublicIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=B.DATA;break}case D.EOF:{this._err(K.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const r=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this.state=B.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case D.GREATER_THAN_SIGN:{this.state=B.DATA,this.emitCurrentDoctype(r);break}case D.QUOTATION_MARK:{this._err(K.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),r.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case D.APOSTROPHE:{this._err(K.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),r.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case D.EOF:{this._err(K.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(K.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const r=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.GREATER_THAN_SIGN:{this.emitCurrentDoctype(r),this.state=B.DATA;break}case D.QUOTATION_MARK:{r.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case D.APOSTROPHE:{r.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case D.EOF:{this._err(K.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(K.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const r=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this.state=B.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case D.QUOTATION_MARK:{this._err(K.missingWhitespaceAfterDoctypeSystemKeyword),r.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case D.APOSTROPHE:{this._err(K.missingWhitespaceAfterDoctypeSystemKeyword),r.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case D.GREATER_THAN_SIGN:{this._err(K.missingDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=B.DATA,this.emitCurrentDoctype(r);break}case D.EOF:{this._err(K.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(K.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const r=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.QUOTATION_MARK:{r.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case D.APOSTROPHE:{r.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case D.GREATER_THAN_SIGN:{this._err(K.missingDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=B.DATA,this.emitCurrentDoctype(r);break}case D.EOF:{this._err(K.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(K.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const r=this.currentToken;switch(t){case D.QUOTATION_MARK:{this.state=B.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case D.NULL:{this._err(K.unexpectedNullCharacter),r.systemId+=pt;break}case D.GREATER_THAN_SIGN:{this._err(K.abruptDoctypeSystemIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=B.DATA;break}case D.EOF:{this._err(K.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const r=this.currentToken;switch(t){case D.APOSTROPHE:{this.state=B.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case D.NULL:{this._err(K.unexpectedNullCharacter),r.systemId+=pt;break}case D.GREATER_THAN_SIGN:{this._err(K.abruptDoctypeSystemIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=B.DATA;break}case D.EOF:{this._err(K.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const r=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.GREATER_THAN_SIGN:{this.emitCurrentDoctype(r),this.state=B.DATA;break}case D.EOF:{this._err(K.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(K.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const r=this.currentToken;switch(t){case D.GREATER_THAN_SIGN:{this.emitCurrentDoctype(r),this.state=B.DATA;break}case D.NULL:{this._err(K.unexpectedNullCharacter);break}case D.EOF:{this.emitCurrentDoctype(r),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case D.RIGHT_SQUARE_BRACKET:{this.state=B.CDATA_SECTION_BRACKET;break}case D.EOF:{this._err(K.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===D.RIGHT_SQUARE_BRACKET?this.state=B.CDATA_SECTION_END:(this._emitChars("]"),this.state=B.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case D.GREATER_THAN_SIGN:{this.state=B.DATA;break}case D.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=B.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(D.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&g4(this.preprocessor.peek(1))?B.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){g4(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===D.SEMICOLON&&this._err(K.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const NT=new Set([p.DD,p.DT,p.LI,p.OPTGROUP,p.OPTION,p.P,p.RB,p.RP,p.RT,p.RTC]),y4=new Set([...NT,p.CAPTION,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]),Nc=new Set([p.APPLET,p.CAPTION,p.HTML,p.MARQUEE,p.OBJECT,p.TABLE,p.TD,p.TEMPLATE,p.TH]),FV=new Set([...Nc,p.OL,p.UL]),zV=new Set([...Nc,p.BUTTON]),v4=new Set([p.ANNOTATION_XML,p.MI,p.MN,p.MO,p.MS,p.MTEXT]),x4=new Set([p.DESC,p.FOREIGN_OBJECT,p.TITLE]),$V=new Set([p.TR,p.TEMPLATE,p.HTML]),jV=new Set([p.TBODY,p.TFOOT,p.THEAD,p.TEMPLATE,p.HTML]),UV=new Set([p.TABLE,p.TEMPLATE,p.HTML]),HV=new Set([p.TD,p.TH]);class VV{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,r,n){this.treeAdapter=r,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=p.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===p.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===te.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,r){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=r,this.currentTagId=r,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,r,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,r){const n=this._indexOf(t);this.items[n]=r,n===this.stackTop&&(this.current=r)}insertAfter(t,r,n){const i=this._indexOf(t)+1;this.items.splice(i,0,r),this.tagIDs.splice(i,0,n),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(t){let r=this.stackTop+1;do r=this.tagIDs.lastIndexOf(t,r-1);while(r>0&&this.treeAdapter.getNamespaceURI(this.items[r])!==te.HTML);this.shortenToLength(Math.max(r,0))}shortenToLength(t){for(;this.stackTop>=t;){const r=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(r,this.stackTop<t)}}popUntilElementPopped(t){const r=this._indexOf(t);this.shortenToLength(Math.max(r,0))}popUntilPopped(t,r){const n=this._indexOfTagNames(t,r);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Gf,te.HTML)}popUntilTableCellPopped(){this.popUntilPopped(HV,te.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,r){for(let n=this.stackTop;n>=0;n--)if(t.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===r)return n;return-1}clearBackTo(t,r){const n=this._indexOfTagNames(t,r);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(UV,te.HTML)}clearBackToTableBodyContext(){this.clearBackTo(jV,te.HTML)}clearBackToTableRowContext(){this.clearBackTo($V,te.HTML)}remove(t){const r=this._indexOf(t);r>=0&&(r===this.stackTop?this.pop():(this.items.splice(r,1),this.tagIDs.splice(r,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===p.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const r=this._indexOf(t)-1;return r>=0?this.items[r]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===p.HTML}hasInDynamicScope(t,r){for(let n=this.stackTop;n>=0;n--){const i=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case te.HTML:{if(i===t)return!0;if(r.has(i))return!1;break}case te.SVG:{if(x4.has(i))return!1;break}case te.MATHML:{if(v4.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Nc)}hasInListItemScope(t){return this.hasInDynamicScope(t,FV)}hasInButtonScope(t){return this.hasInDynamicScope(t,zV)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const r=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case te.HTML:{if(Gf.has(r))return!0;if(Nc.has(r))return!1;break}case te.SVG:{if(x4.has(r))return!1;break}case te.MATHML:{if(v4.has(r))return!1;break}}}return!0}hasInTableScope(t){for(let r=this.stackTop;r>=0;r--)if(this.treeAdapter.getNamespaceURI(this.items[r])===te.HTML)switch(this.tagIDs[r]){case t:return!0;case p.TABLE:case p.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===te.HTML)switch(this.tagIDs[t]){case p.TBODY:case p.THEAD:case p.TFOOT:return!0;case p.TABLE:case p.HTML:return!1}return!0}hasInSelectScope(t){for(let r=this.stackTop;r>=0;r--)if(this.treeAdapter.getNamespaceURI(this.items[r])===te.HTML)switch(this.tagIDs[r]){case t:return!0;case p.OPTION:case p.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&NT.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&y4.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&y4.has(this.currentTagId);)this.pop()}}const Gd=3;var kn;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(kn||(kn={}));const E4={type:kn.Marker};class qV{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,r){const n=[],i=r.length,s=this.treeAdapter.getTagName(t),a=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const l=this.entries[o];if(l.type===kn.Marker)break;const{element:u}=l;if(this.treeAdapter.getTagName(u)===s&&this.treeAdapter.getNamespaceURI(u)===a){const c=this.treeAdapter.getAttrList(u);c.length===i&&n.push({idx:o,attrs:c})}}return n}_ensureNoahArkCondition(t){if(this.entries.length<Gd)return;const r=this.treeAdapter.getAttrList(t),n=this._getNoahArkConditionCandidates(t,r);if(n.length<Gd)return;const i=new Map(r.map(a=>[a.name,a.value]));let s=0;for(let a=0;a<n.length;a++){const o=n[a];o.attrs.every(l=>i.get(l.name)===l.value)&&(s+=1,s>=Gd&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(E4)}pushElement(t,r){this._ensureNoahArkCondition(t),this.entries.unshift({type:kn.Element,element:t,token:r})}insertElementAfterBookmark(t,r){const n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:kn.Element,element:t,token:r})}removeEntry(t){const r=this.entries.indexOf(t);r!==-1&&this.entries.splice(r,1)}clearToLastMarker(){const t=this.entries.indexOf(E4);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const r=this.entries.find(n=>n.type===kn.Marker||this.treeAdapter.getTagName(n.element)===t);return r&&r.type===kn.Element?r:null}getElementEntry(t){return this.entries.find(r=>r.type===kn.Element&&r.element===t)}}const Ei={createDocument(){return{nodeName:"#document",mode:Br.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,r){return{nodeName:e,tagName:e,attrs:r,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,r){const n=e.childNodes.indexOf(r);e.childNodes.splice(n,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,r,n){const i=e.childNodes.find(s=>s.nodeName==="#documentType");if(i)i.name=t,i.publicId=r,i.systemId=n;else{const s={nodeName:"#documentType",name:t,publicId:r,systemId:n,parentNode:null};Ei.appendChild(e,s)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const r=e.childNodes[e.childNodes.length-1];if(Ei.isTextNode(r)){r.value+=t;return}}Ei.appendChild(e,Ei.createTextNode(t))},insertTextBefore(e,t,r){const n=e.childNodes[e.childNodes.indexOf(r)-1];n&&Ei.isTextNode(n)?n.value+=t:Ei.insertBefore(e,Ei.createTextNode(t),r)},adoptAttributes(e,t){const r=new Set(e.attrs.map(n=>n.name));for(let n=0;n<t.length;n++)r.has(t[n].name)||e.attrs.push(t[n])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},RT="html",GV="about:legacy-compat",WV="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",PT=["+//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//"],ZV=[...PT,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],YV=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),OT=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],KV=[...OT,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function _4(e,t){return t.some(r=>e.startsWith(r))}function XV(e){return e.name===RT&&e.publicId===null&&(e.systemId===null||e.systemId===GV)}function QV(e){if(e.name!==RT)return Br.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===WV)return Br.QUIRKS;let{publicId:r}=e;if(r!==null){if(r=r.toLowerCase(),YV.has(r))return Br.QUIRKS;let n=t===null?ZV:PT;if(_4(r,n))return Br.QUIRKS;if(n=t===null?OT:KV,_4(r,n))return Br.LIMITED_QUIRKS}return Br.NO_QUIRKS}const T4={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},JV="definitionurl",eq="definitionURL",tq=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),rq=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:te.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:te.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:te.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:te.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:te.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:te.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:te.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:te.XML}],["xml:space",{prefix:"xml",name:"space",namespace:te.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:te.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:te.XMLNS}]]),nq=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),iq=new Set([p.B,p.BIG,p.BLOCKQUOTE,p.BODY,p.BR,p.CENTER,p.CODE,p.DD,p.DIV,p.DL,p.DT,p.EM,p.EMBED,p.H1,p.H2,p.H3,p.H4,p.H5,p.H6,p.HEAD,p.HR,p.I,p.IMG,p.LI,p.LISTING,p.MENU,p.META,p.NOBR,p.OL,p.P,p.PRE,p.RUBY,p.S,p.SMALL,p.SPAN,p.STRONG,p.STRIKE,p.SUB,p.SUP,p.TABLE,p.TT,p.U,p.UL,p.VAR]);function sq(e){const t=e.tagID;return t===p.FONT&&e.attrs.some(({name:n})=>n===ws.COLOR||n===ws.SIZE||n===ws.FACE)||iq.has(t)}function LT(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===JV){e.attrs[t].name=eq;break}}function DT(e){for(let t=0;t<e.attrs.length;t++){const r=tq.get(e.attrs[t].name);r!=null&&(e.attrs[t].name=r)}}function n1(e){for(let t=0;t<e.attrs.length;t++){const r=rq.get(e.attrs[t].name);r&&(e.attrs[t].prefix=r.prefix,e.attrs[t].name=r.name,e.attrs[t].namespace=r.namespace)}}function aq(e){const t=nq.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Qa(e.tagName))}function oq(e,t){return t===te.MATHML&&(e===p.MI||e===p.MO||e===p.MN||e===p.MS||e===p.MTEXT)}function lq(e,t,r){if(t===te.MATHML&&e===p.ANNOTATION_XML){for(let n=0;n<r.length;n++)if(r[n].name===ws.ENCODING){const i=r[n].value.toLowerCase();return i===T4.TEXT_HTML||i===T4.APPLICATION_XML}}return t===te.SVG&&(e===p.FOREIGN_OBJECT||e===p.DESC||e===p.TITLE)}function uq(e,t,r,n){return(!n||n===te.HTML)&&lq(e,t,r)||(!n||n===te.MATHML)&&oq(e,t)}const cq="hidden",dq=8,hq=3;var j;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(j||(j={}));const fq={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},MT=new Set([p.TABLE,p.TBODY,p.TFOOT,p.THEAD,p.TR]),w4={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ei,onParseError:null};class k4{constructor(t,r,n=null,i=null){this.fragmentContext=n,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=j.INITIAL,this.originalInsertionMode=j.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={...w4,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=r??this.treeAdapter.createDocument(),this.tokenizer=new BV(this.options,this),this.activeFormattingElements=new qV(this.treeAdapter),this.fragmentContextID=n?Qa(this.treeAdapter.getTagName(n)):p.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new VV(this.document,this.treeAdapter,this)}static parse(t,r){const n=new this(r);return n.tokenizer.write(t,!0),n.document}static getFragmentParser(t,r){const n={...w4,...r};t??(t=n.treeAdapter.createElement(q.TEMPLATE,te.HTML,[]));const i=n.treeAdapter.createElement("documentmock",te.HTML,[]),s=new this(n,i,t);return s.fragmentContextID===p.TEMPLATE&&s.tmplInsertionModeStack.unshift(j.IN_TEMPLATE),s._initTokenizerForFragmentParsing(),s._insertFakeRootElement(),s._resetInsertionMode(),s._findFormInFragmentContext(),s}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),r=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,r),r}_err(t,r,n){var i;if(!this.onParseError)return;const s=(i=t.location)!==null&&i!==void 0?i:fq,a={code:r,startLine:s.startLine,startCol:s.startCol,startOffset:s.startOffset,endLine:n?s.startLine:s.endLine,endCol:n?s.startCol:s.endCol,endOffset:n?s.startOffset:s.endOffset};this.onParseError(a)}onItemPush(t,r,n){var i,s;(s=(i=this.treeAdapter).onItemPush)===null||s===void 0||s.call(i,t),n&&this.openElements.stackTop>0&&this._setContextModes(t,r)}onItemPop(t,r){var n,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(n=this.treeAdapter).onItemPop)===null||i===void 0||i.call(n,t,this.openElements.current),r){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(t,r){const n=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===te.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&t!==void 0&&r!==void 0&&!this._isIntegrationPoint(r,t)}_switchToTextParsing(t,r){this._insertElement(t,te.HTML),this.tokenizer.state=r,this.originalInsertionMode=this.insertionMode,this.insertionMode=j.TEXT}switchToPlaintextParsing(){this.insertionMode=j.TEXT,this.originalInsertionMode=j.IN_BODY,this.tokenizer.state=wt.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===q.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==te.HTML))switch(this.fragmentContextID){case p.TITLE:case p.TEXTAREA:{this.tokenizer.state=wt.RCDATA;break}case p.STYLE:case p.XMP:case p.IFRAME:case p.NOEMBED:case p.NOFRAMES:case p.NOSCRIPT:{this.tokenizer.state=wt.RAWTEXT;break}case p.SCRIPT:{this.tokenizer.state=wt.SCRIPT_DATA;break}case p.PLAINTEXT:{this.tokenizer.state=wt.PLAINTEXT;break}}}_setDocumentType(t){const r=t.name||"",n=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,r,n,i),t.location){const a=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));a&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}}_attachElementToTree(t,r){if(this.options.sourceCodeLocationInfo){const n=r&&{...r,startTag:r};this.treeAdapter.setNodeSourceCodeLocation(t,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const n=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(n??this.document,t)}}_appendElement(t,r){const n=this.treeAdapter.createElement(t.tagName,r,t.attrs);this._attachElementToTree(n,t.location)}_insertElement(t,r){const n=this.treeAdapter.createElement(t.tagName,r,t.attrs);this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID)}_insertFakeElement(t,r){const n=this.treeAdapter.createElement(t,te.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,r)}_insertTemplate(t){const r=this.treeAdapter.createElement(t.tagName,te.HTML,t.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(r,n),this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(q.HTML,te.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,p.HTML)}_appendCommentNode(t,r){const n=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(r,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,t.location)}_insertCharacters(t){let r,n;if(this._shouldFosterParentOnInsertion()?({parent:r,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(r,t.chars,n):this.treeAdapter.insertText(r,t.chars)):(r=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(r,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(r),s=n?i.lastIndexOf(n):i.length,a=i[s-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){const{endLine:l,endCol:u,endOffset:c}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:l,endCol:u,endOffset:c})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}_adoptNodes(t,r){for(let n=this.treeAdapter.getFirstChild(t);n;n=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(r,n)}_setEndLocation(t,r){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&r.location){const n=r.location,i=this.treeAdapter.getTagName(t),s=r.type===qe.END_TAG&&i===r.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,s)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let r,n;return this.openElements.stackTop===0&&this.fragmentContext?(r=this.fragmentContext,n=this.fragmentContextID):{current:r,currentTagId:n}=this.openElements,t.tagID===p.SVG&&this.treeAdapter.getTagName(r)===q.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(r)===te.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===p.MGLYPH||t.tagID===p.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,r,te.HTML)}_processToken(t){switch(t.type){case qe.CHARACTER:{this.onCharacter(t);break}case qe.NULL_CHARACTER:{this.onNullCharacter(t);break}case qe.COMMENT:{this.onComment(t);break}case qe.DOCTYPE:{this.onDoctype(t);break}case qe.START_TAG:{this._processStartTag(t);break}case qe.END_TAG:{this.onEndTag(t);break}case qe.EOF:{this.onEof(t);break}case qe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,r,n){const i=this.treeAdapter.getNamespaceURI(r),s=this.treeAdapter.getAttrList(r);return uq(t,i,s,n)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const r=this.activeFormattingElements.entries.findIndex(i=>i.type===kn.Marker||this.openElements.contains(i.element)),n=r===-1?t-1:r-1;for(let i=n;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=j.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(p.P),this.openElements.popUntilTagNamePopped(p.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case p.TR:{this.insertionMode=j.IN_ROW;return}case p.TBODY:case p.THEAD:case p.TFOOT:{this.insertionMode=j.IN_TABLE_BODY;return}case p.CAPTION:{this.insertionMode=j.IN_CAPTION;return}case p.COLGROUP:{this.insertionMode=j.IN_COLUMN_GROUP;return}case p.TABLE:{this.insertionMode=j.IN_TABLE;return}case p.BODY:{this.insertionMode=j.IN_BODY;return}case p.FRAMESET:{this.insertionMode=j.IN_FRAMESET;return}case p.SELECT:{this._resetInsertionModeForSelect(t);return}case p.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case p.HTML:{this.insertionMode=this.headElement?j.AFTER_HEAD:j.BEFORE_HEAD;return}case p.TD:case p.TH:{if(t>0){this.insertionMode=j.IN_CELL;return}break}case p.HEAD:{if(t>0){this.insertionMode=j.IN_HEAD;return}break}}this.insertionMode=j.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let r=t-1;r>0;r--){const n=this.openElements.tagIDs[r];if(n===p.TEMPLATE)break;if(n===p.TABLE){this.insertionMode=j.IN_SELECT_IN_TABLE;return}}this.insertionMode=j.IN_SELECT}_isElementCausesFosterParenting(t){return MT.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const r=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case p.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(r)===te.HTML)return{parent:this.treeAdapter.getTemplateContent(r),beforeElement:null};break}case p.TABLE:{const n=this.treeAdapter.getParentNode(r);return n?{parent:n,beforeElement:r}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const r=this._findFosterParentingLocation();r.beforeElement?this.treeAdapter.insertBefore(r.parent,t,r.beforeElement):this.treeAdapter.appendChild(r.parent,t)}_isSpecialElement(t,r){const n=this.treeAdapter.getNamespaceURI(t);return OV[n].has(r)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){HG(this,t);return}switch(this.insertionMode){case j.INITIAL:{go(this,t);break}case j.BEFORE_HTML:{Fo(this,t);break}case j.BEFORE_HEAD:{zo(this,t);break}case j.IN_HEAD:{$o(this,t);break}case j.IN_HEAD_NO_SCRIPT:{jo(this,t);break}case j.AFTER_HEAD:{Uo(this,t);break}case j.IN_BODY:case j.IN_CAPTION:case j.IN_CELL:case j.IN_TEMPLATE:{FT(this,t);break}case j.TEXT:case j.IN_SELECT:case j.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case j.IN_TABLE:case j.IN_TABLE_BODY:case j.IN_ROW:{Wd(this,t);break}case j.IN_TABLE_TEXT:{VT(this,t);break}case j.IN_COLUMN_GROUP:{Rc(this,t);break}case j.AFTER_BODY:{Pc(this,t);break}case j.AFTER_AFTER_BODY:{$u(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){UG(this,t);return}switch(this.insertionMode){case j.INITIAL:{go(this,t);break}case j.BEFORE_HTML:{Fo(this,t);break}case j.BEFORE_HEAD:{zo(this,t);break}case j.IN_HEAD:{$o(this,t);break}case j.IN_HEAD_NO_SCRIPT:{jo(this,t);break}case j.AFTER_HEAD:{Uo(this,t);break}case j.TEXT:{this._insertCharacters(t);break}case j.IN_TABLE:case j.IN_TABLE_BODY:case j.IN_ROW:{Wd(this,t);break}case j.IN_COLUMN_GROUP:{Rc(this,t);break}case j.AFTER_BODY:{Pc(this,t);break}case j.AFTER_AFTER_BODY:{$u(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Wf(this,t);return}switch(this.insertionMode){case j.INITIAL:case j.BEFORE_HTML:case j.BEFORE_HEAD:case j.IN_HEAD:case j.IN_HEAD_NO_SCRIPT:case j.AFTER_HEAD:case j.IN_BODY:case j.IN_TABLE:case j.IN_CAPTION:case j.IN_COLUMN_GROUP:case j.IN_TABLE_BODY:case j.IN_ROW:case j.IN_CELL:case j.IN_SELECT:case j.IN_SELECT_IN_TABLE:case j.IN_TEMPLATE:case j.IN_FRAMESET:case j.AFTER_FRAMESET:{Wf(this,t);break}case j.IN_TABLE_TEXT:{bo(this,t);break}case j.AFTER_BODY:{xq(this,t);break}case j.AFTER_AFTER_BODY:case j.AFTER_AFTER_FRAMESET:{Eq(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case j.INITIAL:{_q(this,t);break}case j.BEFORE_HEAD:case j.IN_HEAD:case j.IN_HEAD_NO_SCRIPT:case j.AFTER_HEAD:{this._err(t,K.misplacedDoctype);break}case j.IN_TABLE_TEXT:{bo(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,K.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?VG(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case j.INITIAL:{go(this,t);break}case j.BEFORE_HTML:{Tq(this,t);break}case j.BEFORE_HEAD:{kq(this,t);break}case j.IN_HEAD:{mn(this,t);break}case j.IN_HEAD_NO_SCRIPT:{Cq(this,t);break}case j.AFTER_HEAD:{Nq(this,t);break}case j.IN_BODY:{sr(this,t);break}case j.IN_TABLE:{Da(this,t);break}case j.IN_TABLE_TEXT:{bo(this,t);break}case j.IN_CAPTION:{SG(this,t);break}case j.IN_COLUMN_GROUP:{a1(this,t);break}case j.IN_TABLE_BODY:{F0(this,t);break}case j.IN_ROW:{z0(this,t);break}case j.IN_CELL:{IG(this,t);break}case j.IN_SELECT:{WT(this,t);break}case j.IN_SELECT_IN_TABLE:{RG(this,t);break}case j.IN_TEMPLATE:{OG(this,t);break}case j.AFTER_BODY:{DG(this,t);break}case j.IN_FRAMESET:{MG(this,t);break}case j.AFTER_FRAMESET:{FG(this,t);break}case j.AFTER_AFTER_BODY:{$G(this,t);break}case j.AFTER_AFTER_FRAMESET:{jG(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?qG(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case j.INITIAL:{go(this,t);break}case j.BEFORE_HTML:{wq(this,t);break}case j.BEFORE_HEAD:{Sq(this,t);break}case j.IN_HEAD:{Aq(this,t);break}case j.IN_HEAD_NO_SCRIPT:{Iq(this,t);break}case j.AFTER_HEAD:{Rq(this,t);break}case j.IN_BODY:{B0(this,t);break}case j.TEXT:{gG(this,t);break}case j.IN_TABLE:{ul(this,t);break}case j.IN_TABLE_TEXT:{bo(this,t);break}case j.IN_CAPTION:{AG(this,t);break}case j.IN_COLUMN_GROUP:{CG(this,t);break}case j.IN_TABLE_BODY:{Zf(this,t);break}case j.IN_ROW:{GT(this,t);break}case j.IN_CELL:{NG(this,t);break}case j.IN_SELECT:{ZT(this,t);break}case j.IN_SELECT_IN_TABLE:{PG(this,t);break}case j.IN_TEMPLATE:{LG(this,t);break}case j.AFTER_BODY:{KT(this,t);break}case j.IN_FRAMESET:{BG(this,t);break}case j.AFTER_FRAMESET:{zG(this,t);break}case j.AFTER_AFTER_BODY:{$u(this,t);break}}}onEof(t){switch(this.insertionMode){case j.INITIAL:{go(this,t);break}case j.BEFORE_HTML:{Fo(this,t);break}case j.BEFORE_HEAD:{zo(this,t);break}case j.IN_HEAD:{$o(this,t);break}case j.IN_HEAD_NO_SCRIPT:{jo(this,t);break}case j.AFTER_HEAD:{Uo(this,t);break}case j.IN_BODY:case j.IN_TABLE:case j.IN_CAPTION:case j.IN_COLUMN_GROUP:case j.IN_TABLE_BODY:case j.IN_ROW:case j.IN_CELL:case j.IN_SELECT:case j.IN_SELECT_IN_TABLE:{UT(this,t);break}case j.TEXT:{bG(this,t);break}case j.IN_TABLE_TEXT:{bo(this,t);break}case j.IN_TEMPLATE:{YT(this,t);break}case j.AFTER_BODY:case j.IN_FRAMESET:case j.AFTER_FRAMESET:case j.AFTER_AFTER_BODY:case j.AFTER_AFTER_FRAMESET:{s1(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===D.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case j.IN_HEAD:case j.IN_HEAD_NO_SCRIPT:case j.AFTER_HEAD:case j.TEXT:case j.IN_COLUMN_GROUP:case j.IN_SELECT:case j.IN_SELECT_IN_TABLE:case j.IN_FRAMESET:case j.AFTER_FRAMESET:{this._insertCharacters(t);break}case j.IN_BODY:case j.IN_CAPTION:case j.IN_CELL:case j.IN_TEMPLATE:case j.AFTER_BODY:case j.AFTER_AFTER_BODY:case j.AFTER_AFTER_FRAMESET:{BT(this,t);break}case j.IN_TABLE:case j.IN_TABLE_BODY:case j.IN_ROW:{Wd(this,t);break}case j.IN_TABLE_TEXT:{HT(this,t);break}}}}function mq(e,t){let r=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return r?e.openElements.contains(r.element)?e.openElements.hasInScope(t.tagID)||(r=null):(e.activeFormattingElements.removeEntry(r),r=null):jT(e,t),r}function pq(e,t){let r=null,n=e.openElements.stackTop;for(;n>=0;n--){const i=e.openElements.items[n];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[n])&&(r=i)}return r||(e.openElements.shortenToLength(Math.max(n,0)),e.activeFormattingElements.removeEntry(t)),r}function gq(e,t,r){let n=t,i=e.openElements.getCommonAncestor(t);for(let s=0,a=i;a!==r;s++,a=i){i=e.openElements.getCommonAncestor(a);const o=e.activeFormattingElements.getElementEntry(a),l=o&&s>=hq;!o||l?(l&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(a)):(a=bq(e,o),n===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(n),e.treeAdapter.appendChild(a,n),n=a)}return n}function bq(e,t){const r=e.treeAdapter.getNamespaceURI(t.element),n=e.treeAdapter.createElement(t.token.tagName,r,t.token.attrs);return e.openElements.replace(t.element,n),t.element=n,n}function yq(e,t,r){const n=e.treeAdapter.getTagName(t),i=Qa(n);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(r);else{const s=e.treeAdapter.getNamespaceURI(t);i===p.TEMPLATE&&s===te.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,r)}}function vq(e,t,r){const n=e.treeAdapter.getNamespaceURI(r.element),{token:i}=r,s=e.treeAdapter.createElement(i.tagName,n,i.attrs);e._adoptNodes(t,s),e.treeAdapter.appendChild(t,s),e.activeFormattingElements.insertElementAfterBookmark(s,i),e.activeFormattingElements.removeEntry(r),e.openElements.remove(r.element),e.openElements.insertAfter(t,s,i.tagID)}function i1(e,t){for(let r=0;r<dq;r++){const n=mq(e,t);if(!n)break;const i=pq(e,n);if(!i)break;e.activeFormattingElements.bookmark=n;const s=gq(e,i,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(s),a&&yq(e,a,s),vq(e,i,n)}}function Wf(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function xq(e,t){e._appendCommentNode(t,e.openElements.items[0])}function Eq(e,t){e._appendCommentNode(t,e.document)}function s1(e,t){if(e.stopped=!0,t.location){const r=e.fragmentContext?0:2;for(let n=e.openElements.stackTop;n>=r;n--)e._setEndLocation(e.openElements.items[n],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const n=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(n);if(i&&!i.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){const s=e.openElements.items[1],a=e.treeAdapter.getNodeSourceCodeLocation(s);a&&!a.endTag&&e._setEndLocation(s,t)}}}}function _q(e,t){e._setDocumentType(t);const r=t.forceQuirks?Br.QUIRKS:QV(t);XV(t)||e._err(t,K.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,r),e.insertionMode=j.BEFORE_HTML}function go(e,t){e._err(t,K.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Br.QUIRKS),e.insertionMode=j.BEFORE_HTML,e._processToken(t)}function Tq(e,t){t.tagID===p.HTML?(e._insertElement(t,te.HTML),e.insertionMode=j.BEFORE_HEAD):Fo(e,t)}function wq(e,t){const r=t.tagID;(r===p.HTML||r===p.HEAD||r===p.BODY||r===p.BR)&&Fo(e,t)}function Fo(e,t){e._insertFakeRootElement(),e.insertionMode=j.BEFORE_HEAD,e._processToken(t)}function kq(e,t){switch(t.tagID){case p.HTML:{sr(e,t);break}case p.HEAD:{e._insertElement(t,te.HTML),e.headElement=e.openElements.current,e.insertionMode=j.IN_HEAD;break}default:zo(e,t)}}function Sq(e,t){const r=t.tagID;r===p.HEAD||r===p.BODY||r===p.HTML||r===p.BR?zo(e,t):e._err(t,K.endTagWithoutMatchingOpenElement)}function zo(e,t){e._insertFakeElement(q.HEAD,p.HEAD),e.headElement=e.openElements.current,e.insertionMode=j.IN_HEAD,e._processToken(t)}function mn(e,t){switch(t.tagID){case p.HTML:{sr(e,t);break}case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:{e._appendElement(t,te.HTML),t.ackSelfClosing=!0;break}case p.TITLE:{e._switchToTextParsing(t,wt.RCDATA);break}case p.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,wt.RAWTEXT):(e._insertElement(t,te.HTML),e.insertionMode=j.IN_HEAD_NO_SCRIPT);break}case p.NOFRAMES:case p.STYLE:{e._switchToTextParsing(t,wt.RAWTEXT);break}case p.SCRIPT:{e._switchToTextParsing(t,wt.SCRIPT_DATA);break}case p.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=j.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(j.IN_TEMPLATE);break}case p.HEAD:{e._err(t,K.misplacedStartTagForHeadElement);break}default:$o(e,t)}}function Aq(e,t){switch(t.tagID){case p.HEAD:{e.openElements.pop(),e.insertionMode=j.AFTER_HEAD;break}case p.BODY:case p.BR:case p.HTML:{$o(e,t);break}case p.TEMPLATE:{Us(e,t);break}default:e._err(t,K.endTagWithoutMatchingOpenElement)}}function Us(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==p.TEMPLATE&&e._err(t,K.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,K.endTagWithoutMatchingOpenElement)}function $o(e,t){e.openElements.pop(),e.insertionMode=j.AFTER_HEAD,e._processToken(t)}function Cq(e,t){switch(t.tagID){case p.HTML:{sr(e,t);break}case p.BASEFONT:case p.BGSOUND:case p.HEAD:case p.LINK:case p.META:case p.NOFRAMES:case p.STYLE:{mn(e,t);break}case p.NOSCRIPT:{e._err(t,K.nestedNoscriptInHead);break}default:jo(e,t)}}function Iq(e,t){switch(t.tagID){case p.NOSCRIPT:{e.openElements.pop(),e.insertionMode=j.IN_HEAD;break}case p.BR:{jo(e,t);break}default:e._err(t,K.endTagWithoutMatchingOpenElement)}}function jo(e,t){const r=t.type===qe.EOF?K.openElementsLeftAfterEof:K.disallowedContentInNoscriptInHead;e._err(t,r),e.openElements.pop(),e.insertionMode=j.IN_HEAD,e._processToken(t)}function Nq(e,t){switch(t.tagID){case p.HTML:{sr(e,t);break}case p.BODY:{e._insertElement(t,te.HTML),e.framesetOk=!1,e.insertionMode=j.IN_BODY;break}case p.FRAMESET:{e._insertElement(t,te.HTML),e.insertionMode=j.IN_FRAMESET;break}case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:case p.NOFRAMES:case p.SCRIPT:case p.STYLE:case p.TEMPLATE:case p.TITLE:{e._err(t,K.abandonedHeadElementChild),e.openElements.push(e.headElement,p.HEAD),mn(e,t),e.openElements.remove(e.headElement);break}case p.HEAD:{e._err(t,K.misplacedStartTagForHeadElement);break}default:Uo(e,t)}}function Rq(e,t){switch(t.tagID){case p.BODY:case p.HTML:case p.BR:{Uo(e,t);break}case p.TEMPLATE:{Us(e,t);break}default:e._err(t,K.endTagWithoutMatchingOpenElement)}}function Uo(e,t){e._insertFakeElement(q.BODY,p.BODY),e.insertionMode=j.IN_BODY,M0(e,t)}function M0(e,t){switch(t.type){case qe.CHARACTER:{FT(e,t);break}case qe.WHITESPACE_CHARACTER:{BT(e,t);break}case qe.COMMENT:{Wf(e,t);break}case qe.START_TAG:{sr(e,t);break}case qe.END_TAG:{B0(e,t);break}case qe.EOF:{UT(e,t);break}}}function BT(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function FT(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Pq(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Oq(e,t){const r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(r,t.attrs))}function Lq(e,t){const r=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&r&&(e.treeAdapter.detachNode(r),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,te.HTML),e.insertionMode=j.IN_FRAMESET)}function Dq(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,te.HTML)}function Mq(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Gf.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,te.HTML)}function Bq(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,te.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Fq(e,t){const r=e.openElements.tmplCount>0;(!e.formElement||r)&&(e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,te.HTML),r||(e.formElement=e.openElements.current))}function zq(e,t){e.framesetOk=!1;const r=t.tagID;for(let n=e.openElements.stackTop;n>=0;n--){const i=e.openElements.tagIDs[n];if(r===p.LI&&i===p.LI||(r===p.DD||r===p.DT)&&(i===p.DD||i===p.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==p.ADDRESS&&i!==p.DIV&&i!==p.P&&e._isSpecialElement(e.openElements.items[n],i))break}e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,te.HTML)}function $q(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,te.HTML),e.tokenizer.state=wt.PLAINTEXT}function jq(e,t){e.openElements.hasInScope(p.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,te.HTML),e.framesetOk=!1}function Uq(e,t){const r=e.activeFormattingElements.getElementEntryInScopeWithTagName(q.A);r&&(i1(e,t),e.openElements.remove(r.element),e.activeFormattingElements.removeEntry(r)),e._reconstructActiveFormattingElements(),e._insertElement(t,te.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Hq(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,te.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Vq(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(p.NOBR)&&(i1(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,te.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function qq(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,te.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Gq(e,t){e.treeAdapter.getDocumentMode(e.document)!==Br.QUIRKS&&e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,te.HTML),e.framesetOk=!1,e.insertionMode=j.IN_TABLE}function zT(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,te.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function $T(e){const t=CT(e,ws.TYPE);return t!=null&&t.toLowerCase()===cq}function Wq(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,te.HTML),$T(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Zq(e,t){e._appendElement(t,te.HTML),t.ackSelfClosing=!0}function Yq(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._appendElement(t,te.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Kq(e,t){t.tagName=q.IMG,t.tagID=p.IMG,zT(e,t)}function Xq(e,t){e._insertElement(t,te.HTML),e.skipNextNewLine=!0,e.tokenizer.state=wt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=j.TEXT}function Qq(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,wt.RAWTEXT)}function Jq(e,t){e.framesetOk=!1,e._switchToTextParsing(t,wt.RAWTEXT)}function S4(e,t){e._switchToTextParsing(t,wt.RAWTEXT)}function eG(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,te.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===j.IN_TABLE||e.insertionMode===j.IN_CAPTION||e.insertionMode===j.IN_TABLE_BODY||e.insertionMode===j.IN_ROW||e.insertionMode===j.IN_CELL?j.IN_SELECT_IN_TABLE:j.IN_SELECT}function tG(e,t){e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,te.HTML)}function rG(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,te.HTML)}function nG(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(p.RTC),e._insertElement(t,te.HTML)}function iG(e,t){e._reconstructActiveFormattingElements(),LT(t),n1(t),t.selfClosing?e._appendElement(t,te.MATHML):e._insertElement(t,te.MATHML),t.ackSelfClosing=!0}function sG(e,t){e._reconstructActiveFormattingElements(),DT(t),n1(t),t.selfClosing?e._appendElement(t,te.SVG):e._insertElement(t,te.SVG),t.ackSelfClosing=!0}function A4(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,te.HTML)}function sr(e,t){switch(t.tagID){case p.I:case p.S:case p.B:case p.U:case p.EM:case p.TT:case p.BIG:case p.CODE:case p.FONT:case p.SMALL:case p.STRIKE:case p.STRONG:{Hq(e,t);break}case p.A:{Uq(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{Mq(e,t);break}case p.P:case p.DL:case p.OL:case p.UL:case p.DIV:case p.DIR:case p.NAV:case p.MAIN:case p.MENU:case p.ASIDE:case p.CENTER:case p.FIGURE:case p.FOOTER:case p.HEADER:case p.HGROUP:case p.DIALOG:case p.DETAILS:case p.ADDRESS:case p.ARTICLE:case p.SEARCH:case p.SECTION:case p.SUMMARY:case p.FIELDSET:case p.BLOCKQUOTE:case p.FIGCAPTION:{Dq(e,t);break}case p.LI:case p.DD:case p.DT:{zq(e,t);break}case p.BR:case p.IMG:case p.WBR:case p.AREA:case p.EMBED:case p.KEYGEN:{zT(e,t);break}case p.HR:{Yq(e,t);break}case p.RB:case p.RTC:{rG(e,t);break}case p.RT:case p.RP:{nG(e,t);break}case p.PRE:case p.LISTING:{Bq(e,t);break}case p.XMP:{Qq(e,t);break}case p.SVG:{sG(e,t);break}case p.HTML:{Pq(e,t);break}case p.BASE:case p.LINK:case p.META:case p.STYLE:case p.TITLE:case p.SCRIPT:case p.BGSOUND:case p.BASEFONT:case p.TEMPLATE:{mn(e,t);break}case p.BODY:{Oq(e,t);break}case p.FORM:{Fq(e,t);break}case p.NOBR:{Vq(e,t);break}case p.MATH:{iG(e,t);break}case p.TABLE:{Gq(e,t);break}case p.INPUT:{Wq(e,t);break}case p.PARAM:case p.TRACK:case p.SOURCE:{Zq(e,t);break}case p.IMAGE:{Kq(e,t);break}case p.BUTTON:{jq(e,t);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{qq(e,t);break}case p.IFRAME:{Jq(e,t);break}case p.SELECT:{eG(e,t);break}case p.OPTION:case p.OPTGROUP:{tG(e,t);break}case p.NOEMBED:case p.NOFRAMES:{S4(e,t);break}case p.FRAMESET:{Lq(e,t);break}case p.TEXTAREA:{Xq(e,t);break}case p.NOSCRIPT:{e.options.scriptingEnabled?S4(e,t):A4(e,t);break}case p.PLAINTEXT:{$q(e,t);break}case p.COL:case p.TH:case p.TD:case p.TR:case p.HEAD:case p.FRAME:case p.TBODY:case p.TFOOT:case p.THEAD:case p.CAPTION:case p.COLGROUP:break;default:A4(e,t)}}function aG(e,t){if(e.openElements.hasInScope(p.BODY)&&(e.insertionMode=j.AFTER_BODY,e.options.sourceCodeLocationInfo)){const r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e._setEndLocation(r,t)}}function oG(e,t){e.openElements.hasInScope(p.BODY)&&(e.insertionMode=j.AFTER_BODY,KT(e,t))}function lG(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r))}function uG(e){const t=e.openElements.tmplCount>0,{formElement:r}=e;t||(e.formElement=null),(r||t)&&e.openElements.hasInScope(p.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(p.FORM):r&&e.openElements.remove(r))}function cG(e){e.openElements.hasInButtonScope(p.P)||e._insertFakeElement(q.P,p.P),e._closePElement()}function dG(e){e.openElements.hasInListItemScope(p.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(p.LI),e.openElements.popUntilTagNamePopped(p.LI))}function hG(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r))}function fG(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function mG(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r),e.activeFormattingElements.clearToLastMarker())}function pG(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(q.BR,p.BR),e.openElements.pop(),e.framesetOk=!1}function jT(e,t){const r=t.tagName,n=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const s=e.openElements.items[i],a=e.openElements.tagIDs[i];if(n===a&&(n!==p.UNKNOWN||e.treeAdapter.getTagName(s)===r)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(s,a))break}}function B0(e,t){switch(t.tagID){case p.A:case p.B:case p.I:case p.S:case p.U:case p.EM:case p.TT:case p.BIG:case p.CODE:case p.FONT:case p.NOBR:case p.SMALL:case p.STRIKE:case p.STRONG:{i1(e,t);break}case p.P:{cG(e);break}case p.DL:case p.UL:case p.OL:case p.DIR:case p.DIV:case p.NAV:case p.PRE:case p.MAIN:case p.MENU:case p.ASIDE:case p.BUTTON:case p.CENTER:case p.FIGURE:case p.FOOTER:case p.HEADER:case p.HGROUP:case p.DIALOG:case p.ADDRESS:case p.ARTICLE:case p.DETAILS:case p.SEARCH:case p.SECTION:case p.SUMMARY:case p.LISTING:case p.FIELDSET:case p.BLOCKQUOTE:case p.FIGCAPTION:{lG(e,t);break}case p.LI:{dG(e);break}case p.DD:case p.DT:{hG(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{fG(e);break}case p.BR:{pG(e);break}case p.BODY:{aG(e,t);break}case p.HTML:{oG(e,t);break}case p.FORM:{uG(e);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{mG(e,t);break}case p.TEMPLATE:{Us(e,t);break}default:jT(e,t)}}function UT(e,t){e.tmplInsertionModeStack.length>0?YT(e,t):s1(e,t)}function gG(e,t){var r;t.tagID===p.SCRIPT&&((r=e.scriptHandler)===null||r===void 0||r.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function bG(e,t){e._err(t,K.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Wd(e,t){if(e.openElements.currentTagId!==void 0&&MT.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=j.IN_TABLE_TEXT,t.type){case qe.CHARACTER:{VT(e,t);break}case qe.WHITESPACE_CHARACTER:{HT(e,t);break}}else Dl(e,t)}function yG(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,te.HTML),e.insertionMode=j.IN_CAPTION}function vG(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,te.HTML),e.insertionMode=j.IN_COLUMN_GROUP}function xG(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(q.COLGROUP,p.COLGROUP),e.insertionMode=j.IN_COLUMN_GROUP,a1(e,t)}function EG(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,te.HTML),e.insertionMode=j.IN_TABLE_BODY}function _G(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(q.TBODY,p.TBODY),e.insertionMode=j.IN_TABLE_BODY,F0(e,t)}function TG(e,t){e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function wG(e,t){$T(t)?e._appendElement(t,te.HTML):Dl(e,t),t.ackSelfClosing=!0}function kG(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,te.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Da(e,t){switch(t.tagID){case p.TD:case p.TH:case p.TR:{_G(e,t);break}case p.STYLE:case p.SCRIPT:case p.TEMPLATE:{mn(e,t);break}case p.COL:{xG(e,t);break}case p.FORM:{kG(e,t);break}case p.TABLE:{TG(e,t);break}case p.TBODY:case p.TFOOT:case p.THEAD:{EG(e,t);break}case p.INPUT:{wG(e,t);break}case p.CAPTION:{yG(e,t);break}case p.COLGROUP:{vG(e,t);break}default:Dl(e,t)}}function ul(e,t){switch(t.tagID){case p.TABLE:{e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode());break}case p.TEMPLATE:{Us(e,t);break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TBODY:case p.TD:case p.TFOOT:case p.TH:case p.THEAD:case p.TR:break;default:Dl(e,t)}}function Dl(e,t){const r=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,M0(e,t),e.fosterParentingEnabled=r}function HT(e,t){e.pendingCharacterTokens.push(t)}function VT(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function bo(e,t){let r=0;if(e.hasNonWhitespacePendingCharacterToken)for(;r<e.pendingCharacterTokens.length;r++)Dl(e,e.pendingCharacterTokens[r]);else for(;r<e.pendingCharacterTokens.length;r++)e._insertCharacters(e.pendingCharacterTokens[r]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const qT=new Set([p.CAPTION,p.COL,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]);function SG(e,t){const r=t.tagID;qT.has(r)?e.openElements.hasInTableScope(p.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=j.IN_TABLE,Da(e,t)):sr(e,t)}function AG(e,t){const r=t.tagID;switch(r){case p.CAPTION:case p.TABLE:{e.openElements.hasInTableScope(p.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=j.IN_TABLE,r===p.TABLE&&ul(e,t));break}case p.BODY:case p.COL:case p.COLGROUP:case p.HTML:case p.TBODY:case p.TD:case p.TFOOT:case p.TH:case p.THEAD:case p.TR:break;default:B0(e,t)}}function a1(e,t){switch(t.tagID){case p.HTML:{sr(e,t);break}case p.COL:{e._appendElement(t,te.HTML),t.ackSelfClosing=!0;break}case p.TEMPLATE:{mn(e,t);break}default:Rc(e,t)}}function CG(e,t){switch(t.tagID){case p.COLGROUP:{e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=j.IN_TABLE);break}case p.TEMPLATE:{Us(e,t);break}case p.COL:break;default:Rc(e,t)}}function Rc(e,t){e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=j.IN_TABLE,e._processToken(t))}function F0(e,t){switch(t.tagID){case p.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,te.HTML),e.insertionMode=j.IN_ROW;break}case p.TH:case p.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(q.TR,p.TR),e.insertionMode=j.IN_ROW,z0(e,t);break}case p.CAPTION:case p.COL:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=j.IN_TABLE,Da(e,t));break}default:Da(e,t)}}function Zf(e,t){const r=t.tagID;switch(t.tagID){case p.TBODY:case p.TFOOT:case p.THEAD:{e.openElements.hasInTableScope(r)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=j.IN_TABLE);break}case p.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=j.IN_TABLE,ul(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TD:case p.TH:case p.TR:break;default:ul(e,t)}}function z0(e,t){switch(t.tagID){case p.TH:case p.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,te.HTML),e.insertionMode=j.IN_CELL,e.activeFormattingElements.insertMarker();break}case p.CAPTION:case p.COL:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:case p.TR:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=j.IN_TABLE_BODY,F0(e,t));break}default:Da(e,t)}}function GT(e,t){switch(t.tagID){case p.TR:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=j.IN_TABLE_BODY);break}case p.TABLE:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=j.IN_TABLE_BODY,Zf(e,t));break}case p.TBODY:case p.TFOOT:case p.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(p.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=j.IN_TABLE_BODY,Zf(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TD:case p.TH:break;default:ul(e,t)}}function IG(e,t){const r=t.tagID;qT.has(r)?(e.openElements.hasInTableScope(p.TD)||e.openElements.hasInTableScope(p.TH))&&(e._closeTableCell(),z0(e,t)):sr(e,t)}function NG(e,t){const r=t.tagID;switch(r){case p.TD:case p.TH:{e.openElements.hasInTableScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=j.IN_ROW);break}case p.TABLE:case p.TBODY:case p.TFOOT:case p.THEAD:case p.TR:{e.openElements.hasInTableScope(r)&&(e._closeTableCell(),GT(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:break;default:B0(e,t)}}function WT(e,t){switch(t.tagID){case p.HTML:{sr(e,t);break}case p.OPTION:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._insertElement(t,te.HTML);break}case p.OPTGROUP:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop(),e._insertElement(t,te.HTML);break}case p.HR:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop(),e._appendElement(t,te.HTML),t.ackSelfClosing=!0;break}case p.INPUT:case p.KEYGEN:case p.TEXTAREA:case p.SELECT:{e.openElements.hasInSelectScope(p.SELECT)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),t.tagID!==p.SELECT&&e._processStartTag(t));break}case p.SCRIPT:case p.TEMPLATE:{mn(e,t);break}}}function ZT(e,t){switch(t.tagID){case p.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===p.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===p.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop();break}case p.OPTION:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop();break}case p.SELECT:{e.openElements.hasInSelectScope(p.SELECT)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode());break}case p.TEMPLATE:{Us(e,t);break}}}function RG(e,t){const r=t.tagID;r===p.CAPTION||r===p.TABLE||r===p.TBODY||r===p.TFOOT||r===p.THEAD||r===p.TR||r===p.TD||r===p.TH?(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),e._processStartTag(t)):WT(e,t)}function PG(e,t){const r=t.tagID;r===p.CAPTION||r===p.TABLE||r===p.TBODY||r===p.TFOOT||r===p.THEAD||r===p.TR||r===p.TD||r===p.TH?e.openElements.hasInTableScope(r)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),e.onEndTag(t)):ZT(e,t)}function OG(e,t){switch(t.tagID){case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:case p.NOFRAMES:case p.SCRIPT:case p.STYLE:case p.TEMPLATE:case p.TITLE:{mn(e,t);break}case p.CAPTION:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:{e.tmplInsertionModeStack[0]=j.IN_TABLE,e.insertionMode=j.IN_TABLE,Da(e,t);break}case p.COL:{e.tmplInsertionModeStack[0]=j.IN_COLUMN_GROUP,e.insertionMode=j.IN_COLUMN_GROUP,a1(e,t);break}case p.TR:{e.tmplInsertionModeStack[0]=j.IN_TABLE_BODY,e.insertionMode=j.IN_TABLE_BODY,F0(e,t);break}case p.TD:case p.TH:{e.tmplInsertionModeStack[0]=j.IN_ROW,e.insertionMode=j.IN_ROW,z0(e,t);break}default:e.tmplInsertionModeStack[0]=j.IN_BODY,e.insertionMode=j.IN_BODY,sr(e,t)}}function LG(e,t){t.tagID===p.TEMPLATE&&Us(e,t)}function YT(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):s1(e,t)}function DG(e,t){t.tagID===p.HTML?sr(e,t):Pc(e,t)}function KT(e,t){var r;if(t.tagID===p.HTML){if(e.fragmentContext||(e.insertionMode=j.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===p.HTML){e._setEndLocation(e.openElements.items[0],t);const n=e.openElements.items[1];n&&!(!((r=e.treeAdapter.getNodeSourceCodeLocation(n))===null||r===void 0)&&r.endTag)&&e._setEndLocation(n,t)}}else Pc(e,t)}function Pc(e,t){e.insertionMode=j.IN_BODY,M0(e,t)}function MG(e,t){switch(t.tagID){case p.HTML:{sr(e,t);break}case p.FRAMESET:{e._insertElement(t,te.HTML);break}case p.FRAME:{e._appendElement(t,te.HTML),t.ackSelfClosing=!0;break}case p.NOFRAMES:{mn(e,t);break}}}function BG(e,t){t.tagID===p.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==p.FRAMESET&&(e.insertionMode=j.AFTER_FRAMESET))}function FG(e,t){switch(t.tagID){case p.HTML:{sr(e,t);break}case p.NOFRAMES:{mn(e,t);break}}}function zG(e,t){t.tagID===p.HTML&&(e.insertionMode=j.AFTER_AFTER_FRAMESET)}function $G(e,t){t.tagID===p.HTML?sr(e,t):$u(e,t)}function $u(e,t){e.insertionMode=j.IN_BODY,M0(e,t)}function jG(e,t){switch(t.tagID){case p.HTML:{sr(e,t);break}case p.NOFRAMES:{mn(e,t);break}}}function UG(e,t){t.chars=pt,e._insertCharacters(t)}function HG(e,t){e._insertCharacters(t),e.framesetOk=!1}function XT(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==te.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function VG(e,t){if(sq(t))XT(e),e._startTagOutsideForeignContent(t);else{const r=e._getAdjustedCurrentElement(),n=e.treeAdapter.getNamespaceURI(r);n===te.MATHML?LT(t):n===te.SVG&&(aq(t),DT(t)),n1(t),t.selfClosing?e._appendElement(t,n):e._insertElement(t,n),t.ackSelfClosing=!0}}function qG(e,t){if(t.tagID===p.P||t.tagID===p.BR){XT(e),e._endTagOutsideForeignContent(t);return}for(let r=e.openElements.stackTop;r>0;r--){const n=e.openElements.items[r];if(e.treeAdapter.getNamespaceURI(n)===te.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(n);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(r);break}}}q.AREA,q.BASE,q.BASEFONT,q.BGSOUND,q.BR,q.COL,q.EMBED,q.FRAME,q.HR,q.IMG,q.INPUT,q.KEYGEN,q.LINK,q.META,q.PARAM,q.SOURCE,q.TRACK,q.WBR;const $0=QT("end"),Bn=QT("start");function QT(e){return t;function t(r){const n=r&&r.position&&r.position[e]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function JT(e){const t=Bn(e),r=$0(e);if(t&&r)return{start:t,end:r}}const GG=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,WG=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),C4={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function e7(e,t){const r=nW(e),n=kp("type",{handlers:{root:ZG,element:YG,text:KG,comment:r7,doctype:XG,raw:JG},unknown:eW}),i={parser:r?new k4(C4):k4.getFragmentParser(void 0,C4),handle(o){n(o,i)},stitches:!1,options:t||{}};n(e,i),Ja(i,Bn());const s=r?i.parser.document:i.parser.getFragment(),a=sV(s,{file:i.options.file});return i.stitches&&Yr(a,"comment",function(o,l,u){const c=o;if(c.value.stitch&&u&&l!==void 0){const d=u.children;return d[l]=c.value.stitch,l}}),a.type==="root"&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function t7(e,t){let r=-1;if(e)for(;++r<e.length;)t.handle(e[r])}function ZG(e,t){t7(e.children,t)}function YG(e,t){tW(e,t),t7(e.children,t),rW(e,t)}function KG(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const r={type:qe.CHARACTER,chars:e.value,location:Ml(e)};Ja(t,Bn(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function XG(e,t){const r={type:qe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Ml(e)};Ja(t,Bn(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function QG(e,t){t.stitches=!0;const r=iW(e);if("children"in e&&"children"in r){const n=e7({type:"root",children:e.children},t.options);r.children=n.children}r7({type:"comment",value:{stitch:r}},t)}function r7(e,t){const r=e.value,n={type:qe.COMMENT,data:r,location:Ml(e)};Ja(t,Bn(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function JG(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,n7(t,Bn(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(GG,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const r=t.parser.tokenizer._consume();t.parser.tokenizer._callState(r)}}function eW(e,t){const r=e;if(t.options.passThrough&&t.options.passThrough.includes(r.type))QG(r,t);else{let n="";throw WG.has(r.type)&&(n=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+r.type+"` node"+n)}}function Ja(e,t){n7(e,t);const r=e.parser.tokenizer.currentCharacterToken;r&&r.location&&(r.location.endLine=e.parser.tokenizer.preprocessor.line,r.location.endCol=e.parser.tokenizer.preprocessor.col+1,r.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=r,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=wt.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function n7(e,t){if(t&&t.offset!==void 0){const r={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=r}}function tW(e,t){const r=e.tagName.toLowerCase();if(t.parser.tokenizer.state===wt.PLAINTEXT)return;Ja(t,Bn(e));const n=t.parser.openElements.current;let i="namespaceURI"in n?n.namespaceURI:An.html;i===An.html&&r==="svg"&&(i=An.svg);const s=cV({...e,children:[]},{space:i===An.svg?"svg":"html"}),a={type:qe.START_TAG,tagName:r,tagID:Qa(r),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in s?s.attrs:[],location:Ml(e)};t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=r}function rW(e,t){const r=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&EE.includes(r)||t.parser.tokenizer.state===wt.PLAINTEXT)return;Ja(t,$0(e));const n={type:qe.END_TAG,tagName:r,tagID:Qa(r),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Ml(e)};t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken),r===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===wt.RCDATA||t.parser.tokenizer.state===wt.RAWTEXT||t.parser.tokenizer.state===wt.SCRIPT_DATA)&&(t.parser.tokenizer.state=wt.DATA)}function nW(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Ml(e){const t=Bn(e)||{line:void 0,column:void 0,offset:void 0},r=$0(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:r.line,endCol:r.column,endOffset:r.offset}}function iW(e){return"children"in e?Os({...e,children:[]}):Os(e)}function Yf(e){return function(t,r){return e7(t,{...e,file:r})}}const os=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Ti={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...os,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...os],h2:[["className","sr-only"]],img:[...os,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...os,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...os],table:[...os],ul:[...os,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},wi={}.hasOwnProperty;function sW(e,t){let r={type:"root",children:[]};const n={schema:t?{...Ti,...t}:Ti,stack:[]},i=i7(n,e);return i&&(Array.isArray(i)?i.length===1?r=i[0]:r.children=i:r=i),r}function i7(e,t){if(t&&typeof t=="object"){const r=t;switch(typeof r.type=="string"?r.type:""){case"comment":return aW(e,r);case"doctype":return oW(e,r);case"element":return lW(e,r);case"root":return uW(e,r);case"text":return cW(e,r)}}}function aW(e,t){if(e.schema.allowComments){const r=typeof t.value=="string"?t.value:"",n=r.indexOf("-->"),s={type:"comment",value:n<0?r:r.slice(0,n)};return Bl(s,t),s}}function oW(e,t){if(e.schema.allowDoctypes){const r={type:"doctype"};return Bl(r,t),r}}function lW(e,t){const r=typeof t.tagName=="string"?t.tagName:"";e.stack.push(r);const n=s7(e,t.children),i=dW(e,t.properties);e.stack.pop();let s=!1;if(r&&r!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(r))&&(s=!0,e.schema.ancestors&&wi.call(e.schema.ancestors,r))){const o=e.schema.ancestors[r];let l=-1;for(s=!1;++l<o.length;)e.stack.includes(o[l])&&(s=!0)}if(!s)return e.schema.strip&&!e.schema.strip.includes(r)?n:void 0;const a={type:"element",tagName:r,properties:i,children:n};return Bl(a,t),a}function uW(e,t){const n={type:"root",children:s7(e,t.children)};return Bl(n,t),n}function cW(e,t){const n={type:"text",value:typeof t.value=="string"?t.value:""};return Bl(n,t),n}function s7(e,t){const r=[];if(Array.isArray(t)){const n=t;let i=-1;for(;++i<n.length;){const s=i7(e,n[i]);s&&(Array.isArray(s)?r.push(...s):r.push(s))}}return r}function dW(e,t){const r=e.stack[e.stack.length-1],n=e.schema.attributes,i=e.schema.required,s=n&&wi.call(n,r)?n[r]:void 0,a=n&&wi.call(n,"*")?n["*"]:void 0,o=t&&typeof t=="object"?t:{},l={};let u;for(u in o)if(wi.call(o,u)){const c=o[u];let d=I4(e,N4(s,u),u,c);d==null&&(d=I4(e,N4(a,u),u,c)),d!=null&&(l[u]=d)}if(i&&wi.call(i,r)){const c=i[r];for(u in c)wi.call(c,u)&&!wi.call(l,u)&&(l[u]=c[u])}return l}function I4(e,t,r,n){return t?Array.isArray(n)?hW(e,t,r,n):a7(e,t,r,n):void 0}function hW(e,t,r,n){let i=-1;const s=[];for(;++i<n.length;){const a=a7(e,t,r,n[i]);(typeof a=="number"||typeof a=="string")&&s.push(a)}return s}function a7(e,t,r,n){if(!(typeof n!="boolean"&&typeof n!="number"&&typeof n!="string")&&fW(e,r,n)){if(typeof t=="object"&&t.length>1){let i=!1,s=0;for(;++s<t.length;){const a=t[s];if(a&&typeof a=="object"&&"flags"in a){if(a.test(String(n))){i=!0;break}}else if(a===n){i=!0;break}}if(!i)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(r)?e.schema.clobberPrefix+n:n}}function fW(e,t,r){const n=e.schema.protocols&&wi.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!n||n.length===0)return!0;const i=String(r),s=i.indexOf(":"),a=i.indexOf("?"),o=i.indexOf("#"),l=i.indexOf("/");if(s<0||l>-1&&s>l||a>-1&&s>a||o>-1&&s>o)return!0;let u=-1;for(;++u<n.length;){const c=n[u];if(s===c.length&&i.slice(0,c.length)===c)return!0}return!1}function Bl(e,t){const r=JT(t);t.data&&(e.data=Os(t.data)),r&&(e.position=r)}function N4(e,t){let r,n=-1;if(e)for(;++n<e.length;){const i=e[n],s=typeof i=="string"?i:i[0];if(s===t)return i;s==="data*"&&(r=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return r}function o7(e){return function(t){return sW(t,e)}}function mW(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function pW(e,t,r){const i=Rl((r||{}).ignore||[]),s=gW(t);let a=-1;for(;++a<s.length;)Ll(e,"text",o);function o(u,c){let d=-1,h;for(;++d<c.length;){const f=c[d],m=h?h.children:void 0;if(i(f,m?m.indexOf(f):void 0,h))return;h=f}if(h)return l(u,c)}function l(u,c){const d=c[c.length-1],h=s[a][0],f=s[a][1];let m=0;const y=d.children.indexOf(u);let E=!1,w=[];h.lastIndex=0;let x=h.exec(u.value);for(;x;){const _=x.index,A={index:x.index,input:x.input,stack:[...c,u]};let S=f(...x,A);if(typeof S=="string"&&(S=S.length>0?{type:"text",value:S}:void 0),S===!1?h.lastIndex=_+1:(m!==_&&w.push({type:"text",value:u.value.slice(m,_)}),Array.isArray(S)?w.push(...S):S&&w.push(S),m=_+x[0].length,E=!0),!h.global)break;x=h.exec(u.value)}return E?(m<u.value.length&&w.push({type:"text",value:u.value.slice(m)}),d.children.splice(y,1,...w)):w=[u],y+w.length}}function gW(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let n=-1;for(;++n<r.length;){const i=r[n];t.push([bW(i[0]),yW(i[1])])}return t}function bW(e){return typeof e=="string"?new RegExp(mW(e),"g"):e}function yW(e){return typeof e=="function"?e:function(){return e}}const Zd="phrasing",Yd=["autolink","link","image","label"];function vW(){return{transforms:[SW],enter:{literalAutolink:EW,literalAutolinkEmail:Kd,literalAutolinkHttp:Kd,literalAutolinkWww:Kd},exit:{literalAutolink:kW,literalAutolinkEmail:wW,literalAutolinkHttp:_W,literalAutolinkWww:TW}}}function xW(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Zd,notInConstruct:Yd},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Zd,notInConstruct:Yd},{character:":",before:"[ps]",after:"\\/",inConstruct:Zd,notInConstruct:Yd}]}}function EW(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Kd(e){this.config.enter.autolinkProtocol.call(this,e)}function _W(e){this.config.exit.autolinkProtocol.call(this,e)}function TW(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function wW(e){this.config.exit.autolinkEmail.call(this,e)}function kW(e){this.exit(e)}function SW(e){pW(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,AW],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),CW]],{ignore:["link","linkReference"]})}function AW(e,t,r,n,i){let s="";if(!l7(i)||(/^w/i.test(t)&&(r=t+r,t="",s="http://"),!IW(r)))return!1;const a=NW(r+n);if(!a[0])return!1;const o={type:"link",title:null,url:s+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[o,{type:"text",value:a[1]}]:o}function CW(e,t,r,n){return!l7(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function IW(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function NW(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],n=r.indexOf(")");const i=gc(e,"(");let s=gc(e,")");for(;n!==-1&&i>s;)e+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),s++;return[e,r]}function l7(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||Ps(r)||L0(r))&&(!t||r!==47)}function dn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}u7.peek=zW;function RW(){this.buffer()}function PW(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function OW(){this.buffer()}function LW(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function DW(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=dn(this.sliceSerialize(e)).toLowerCase(),r.label=t}function MW(e){this.exit(e)}function BW(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=dn(this.sliceSerialize(e)).toLowerCase(),r.label=t}function FW(e){this.exit(e)}function zW(){return"["}function u7(e,t,r,n){const i=r.createTracker(n);let s=i.move("[^");const a=r.enter("footnoteReference"),o=r.enter("reference");return s+=i.move(r.safe(r.associationId(e),{after:"]",before:s})),o(),a(),s+=i.move("]"),s}function $W(){return{enter:{gfmFootnoteCallString:RW,gfmFootnoteCall:PW,gfmFootnoteDefinitionLabelString:OW,gfmFootnoteDefinition:LW},exit:{gfmFootnoteCallString:DW,gfmFootnoteCall:MW,gfmFootnoteDefinitionLabelString:BW,gfmFootnoteDefinition:FW}}}function jW(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:u7},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(n,i,s,a){const o=s.createTracker(a);let l=o.move("[^");const u=s.enter("footnoteDefinition"),c=s.enter("label");return l+=o.move(s.safe(s.associationId(n),{before:l,after:"]"})),c(),l+=o.move("]:"),n.children&&n.children.length>0&&(o.shift(4),l+=o.move((t?`
637
- `:" ")+s.indentLines(s.containerFlow(n,o.current()),t?c7:UW))),u(),l}}function UW(e,t,r){return t===0?e:c7(e,t,r)}function c7(e,t,r){return(r?"":" ")+e}const HW=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];d7.peek=ZW;function VW(){return{canContainEols:["delete"],enter:{strikethrough:GW},exit:{strikethrough:WW}}}function qW(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:HW}],handlers:{delete:d7}}}function GW(e){this.enter({type:"delete",children:[]},e)}function WW(e){this.exit(e)}function d7(e,t,r,n){const i=r.createTracker(n),s=r.enter("strikethrough");let a=i.move("~~");return a+=r.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),s(),a}function ZW(){return"~"}function YW(e){return e.length}function KW(e,t){const r=t||{},n=(r.align||[]).concat(),i=r.stringLength||YW,s=[],a=[],o=[],l=[];let u=0,c=-1;for(;++c<e.length;){const b=[],y=[];let E=-1;for(e[c].length>u&&(u=e[c].length);++E<e[c].length;){const w=XW(e[c][E]);if(r.alignDelimiters!==!1){const x=i(w);y[E]=x,(l[E]===void 0||x>l[E])&&(l[E]=x)}b.push(w)}a[c]=b,o[c]=y}let d=-1;if(typeof n=="object"&&"length"in n)for(;++d<u;)s[d]=R4(n[d]);else{const b=R4(n);for(;++d<u;)s[d]=b}d=-1;const h=[],f=[];for(;++d<u;){const b=s[d];let y="",E="";b===99?(y=":",E=":"):b===108?y=":":b===114&&(E=":");let w=r.alignDelimiters===!1?1:Math.max(1,l[d]-y.length-E.length);const x=y+"-".repeat(w)+E;r.alignDelimiters!==!1&&(w=y.length+w+E.length,w>l[d]&&(l[d]=w),f[d]=w),h[d]=x}a.splice(1,0,h),o.splice(1,0,f),c=-1;const m=[];for(;++c<a.length;){const b=a[c],y=o[c];d=-1;const E=[];for(;++d<u;){const w=b[d]||"";let x="",_="";if(r.alignDelimiters!==!1){const A=l[d]-(y[d]||0),S=s[d];S===114?x=" ".repeat(A):S===99?A%2?(x=" ".repeat(A/2+.5),_=" ".repeat(A/2-.5)):(x=" ".repeat(A/2),_=x):_=" ".repeat(A)}r.delimiterStart!==!1&&!d&&E.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&w==="")&&(r.delimiterStart!==!1||d)&&E.push(" "),r.alignDelimiters!==!1&&E.push(x),E.push(w),r.alignDelimiters!==!1&&E.push(_),r.padding!==!1&&E.push(" "),(r.delimiterEnd!==!1||d!==u-1)&&E.push("|")}m.push(r.delimiterEnd===!1?E.join("").replace(/ +$/,""):E.join(""))}return m.join(`
638
- `)}function XW(e){return e==null?"":String(e)}function R4(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function QW(e,t,r,n){const i=r.enter("blockquote"),s=r.createTracker(n);s.move("> "),s.shift(2);const a=r.indentLines(r.containerFlow(e,s.current()),JW);return i(),a}function JW(e,t,r){return">"+(r?"":" ")+e}function eZ(e,t){return P4(e,t.inConstruct,!0)&&!P4(e,t.notInConstruct,!1)}function P4(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let n=-1;for(;++n<t.length;)if(e.includes(t[n]))return!0;return!1}function O4(e,t,r,n){let i=-1;for(;++i<r.unsafe.length;)if(r.unsafe[i].character===`
639
- `&&eZ(r.stack,r.unsafe[i]))return/[ \t]/.test(n.before)?"":" ";return`\\
640
- `}function tZ(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function rZ(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function nZ(e,t,r,n){const i=rZ(r),s=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(tZ(e,r)){const d=r.enter("codeIndented"),h=r.indentLines(s,iZ);return d(),h}const o=r.createTracker(n),l=i.repeat(Math.max(bT(s,i)+1,3)),u=r.enter("codeFenced");let c=o.move(l);if(e.lang){const d=r.enter(`codeFencedLang${a}`);c+=o.move(r.safe(e.lang,{before:c,after:" ",encode:["`"],...o.current()})),d()}if(e.lang&&e.meta){const d=r.enter(`codeFencedMeta${a}`);c+=o.move(" "),c+=o.move(r.safe(e.meta,{before:c,after:`
641
- `,encode:["`"],...o.current()})),d()}return c+=o.move(`
642
- `),s&&(c+=o.move(s+`
643
- `)),c+=o.move(l),u(),c}function iZ(e,t,r){return(r?"":" ")+e}function o1(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function sZ(e,t,r,n){const i=o1(r),s=i==='"'?"Quote":"Apostrophe",a=r.enter("definition");let o=r.enter("label");const l=r.createTracker(n);let u=l.move("[");return u+=l.move(r.safe(r.associationId(e),{before:u,after:"]",...l.current()})),u+=l.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=r.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(r.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(o=r.enter("destinationRaw"),u+=l.move(r.safe(e.url,{before:u,after:e.title?" ":`
644
- `,...l.current()}))),o(),e.title&&(o=r.enter(`title${s}`),u+=l.move(" "+i),u+=l.move(r.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),o()),a(),u}function aZ(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function cl(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ma(e){if(e===null||at(e)||Ps(e))return 1;if(L0(e))return 2}function Oc(e,t,r){const n=Ma(e),i=Ma(t);return n===void 0?i===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:n===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}}h7.peek=oZ;function h7(e,t,r,n){const i=aZ(r),s=r.enter("emphasis"),a=r.createTracker(n),o=a.move(i);let l=a.move(r.containerPhrasing(e,{after:i,before:o,...a.current()}));const u=l.charCodeAt(0),c=Oc(n.before.charCodeAt(n.before.length-1),u,i);c.inside&&(l=cl(u)+l.slice(1));const d=l.charCodeAt(l.length-1),h=Oc(n.after.charCodeAt(0),d,i);h.inside&&(l=l.slice(0,-1)+cl(d));const f=a.move(i);return s(),r.attentionEncodeSurroundingInfo={after:h.outside,before:c.outside},o+l+f}function oZ(e,t,r){return r.options.emphasis||"*"}const lZ={};function l1(e,t){const r=lZ,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,i=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return f7(e,n,i)}function f7(e,t,r){if(uZ(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return L4(e.children,t,r)}return Array.isArray(e)?L4(e,t,r):""}function L4(e,t,r){const n=[];let i=-1;for(;++i<e.length;)n[i]=f7(e[i],t,r);return n.join("")}function uZ(e){return!!(e&&typeof e=="object")}function cZ(e,t){let r=!1;return Yr(e,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return r=!0,Hf}),!!((!e.depth||e.depth<3)&&l1(e)&&(t.options.setext||r))}function dZ(e,t,r,n){const i=Math.max(Math.min(6,e.depth||1),1),s=r.createTracker(n);if(cZ(e,r)){const c=r.enter("headingSetext"),d=r.enter("phrasing"),h=r.containerPhrasing(e,{...s.current(),before:`
645
- `,after:`
646
- `});return d(),c(),h+`
647
- `+(i===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
648
- `))+1))}const a="#".repeat(i),o=r.enter("headingAtx"),l=r.enter("phrasing");s.move(a+" ");let u=r.containerPhrasing(e,{before:"# ",after:`
649
- `,...s.current()});return/^[\t ]/.test(u)&&(u=cl(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,r.options.closeAtx&&(u+=" "+a),l(),o(),u}m7.peek=hZ;function m7(e){return e.value||""}function hZ(){return"<"}p7.peek=fZ;function p7(e,t,r,n){const i=o1(r),s=i==='"'?"Quote":"Apostrophe",a=r.enter("image");let o=r.enter("label");const l=r.createTracker(n);let u=l.move("![");return u+=l.move(r.safe(e.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=r.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(r.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(o=r.enter("destinationRaw"),u+=l.move(r.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),o(),e.title&&(o=r.enter(`title${s}`),u+=l.move(" "+i),u+=l.move(r.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),o()),u+=l.move(")"),a(),u}function fZ(){return"!"}g7.peek=mZ;function g7(e,t,r,n){const i=e.referenceType,s=r.enter("imageReference");let a=r.enter("label");const o=r.createTracker(n);let l=o.move("![");const u=r.safe(e.alt,{before:l,after:"]",...o.current()});l+=o.move(u+"]["),a();const c=r.stack;r.stack=[],a=r.enter("reference");const d=r.safe(r.associationId(e),{before:l,after:"]",...o.current()});return a(),r.stack=c,s(),i==="full"||!u||u!==d?l+=o.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function mZ(){return"!"}b7.peek=pZ;function b7(e,t,r){let n=e.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(n);)i+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++s<r.unsafe.length;){const a=r.unsafe[s],o=r.compilePattern(a);let l;if(a.atBreak)for(;l=o.exec(n);){let u=l.index;n.charCodeAt(u)===10&&n.charCodeAt(u-1)===13&&u--,n=n.slice(0,u)+" "+n.slice(l.index+1)}}return i+n+i}function pZ(){return"`"}function y7(e,t){const r=l1(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}v7.peek=gZ;function v7(e,t,r,n){const i=o1(r),s=i==='"'?"Quote":"Apostrophe",a=r.createTracker(n);let o,l;if(y7(e,r)){const c=r.stack;r.stack=[],o=r.enter("autolink");let d=a.move("<");return d+=a.move(r.containerPhrasing(e,{before:d,after:">",...a.current()})),d+=a.move(">"),o(),r.stack=c,d}o=r.enter("link"),l=r.enter("label");let u=a.move("[");return u+=a.move(r.containerPhrasing(e,{before:u,after:"](",...a.current()})),u+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=r.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(r.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=r.enter("destinationRaw"),u+=a.move(r.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=r.enter(`title${s}`),u+=a.move(" "+i),u+=a.move(r.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),l()),u+=a.move(")"),o(),u}function gZ(e,t,r){return y7(e,r)?"<":"["}x7.peek=bZ;function x7(e,t,r,n){const i=e.referenceType,s=r.enter("linkReference");let a=r.enter("label");const o=r.createTracker(n);let l=o.move("[");const u=r.containerPhrasing(e,{before:l,after:"]",...o.current()});l+=o.move(u+"]["),a();const c=r.stack;r.stack=[],a=r.enter("reference");const d=r.safe(r.associationId(e),{before:l,after:"]",...o.current()});return a(),r.stack=c,s(),i==="full"||!u||u!==d?l+=o.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function bZ(){return"["}function u1(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function yZ(e){const t=u1(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function vZ(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function E7(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function xZ(e,t,r,n){const i=r.enter("list"),s=r.bulletCurrent;let a=e.ordered?vZ(r):u1(r);const o=e.ordered?a==="."?")":".":yZ(r);let l=t&&r.bulletLastUsed?a===r.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&c&&(!c.children||!c.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(l=!0),E7(r)===a&&c){let d=-1;for(;++d<e.children.length;){const h=e.children[d];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(a=o),r.bulletCurrent=a;const u=r.containerFlow(e,n);return r.bulletLastUsed=a,r.bulletCurrent=s,i(),u}function EZ(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function _Z(e,t,r,n){const i=EZ(r);let s=r.bulletCurrent||u1(r);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let a=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const o=r.createTracker(n);o.move(s+" ".repeat(a-s.length)),o.shift(a);const l=r.enter("listItem"),u=r.indentLines(r.containerFlow(e,o.current()),c);return l(),u;function c(d,h,f){return h?(f?"":" ".repeat(a))+d:(f?s:s+" ".repeat(a-s.length))+d}}function TZ(e,t,r,n){const i=r.enter("paragraph"),s=r.enter("phrasing"),a=r.containerPhrasing(e,n);return s(),i(),a}const wZ=Rl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function kZ(e,t,r,n){return(e.children.some(function(a){return wZ(a)})?r.containerPhrasing:r.containerFlow).call(r,e,n)}function SZ(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}_7.peek=AZ;function _7(e,t,r,n){const i=SZ(r),s=r.enter("strong"),a=r.createTracker(n),o=a.move(i+i);let l=a.move(r.containerPhrasing(e,{after:i,before:o,...a.current()}));const u=l.charCodeAt(0),c=Oc(n.before.charCodeAt(n.before.length-1),u,i);c.inside&&(l=cl(u)+l.slice(1));const d=l.charCodeAt(l.length-1),h=Oc(n.after.charCodeAt(0),d,i);h.inside&&(l=l.slice(0,-1)+cl(d));const f=a.move(i+i);return s(),r.attentionEncodeSurroundingInfo={after:h.outside,before:c.outside},o+l+f}function AZ(e,t,r){return r.options.strong||"*"}function CZ(e,t,r,n){return r.safe(e.value,n)}function IZ(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function NZ(e,t,r){const n=(E7(r)+(r.options.ruleSpaces?" ":"")).repeat(IZ(r));return r.options.ruleSpaces?n.slice(0,-1):n}const T7={blockquote:QW,break:O4,code:nZ,definition:sZ,emphasis:h7,hardBreak:O4,heading:dZ,html:m7,image:p7,imageReference:g7,inlineCode:b7,link:v7,linkReference:x7,list:xZ,listItem:_Z,paragraph:TZ,root:kZ,strong:_7,text:CZ,thematicBreak:NZ},D4=document.createElement("i");function c1(e){const t="&"+e+";";D4.innerHTML=t;const r=D4.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function w7(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}const RZ=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function PZ(e){return e.replace(RZ,OZ)}function OZ(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const i=r.charCodeAt(1),s=i===120||i===88;return w7(r.slice(s?2:1),s?16:10)}return c1(r)||e}function LZ(){return{enter:{table:DZ,tableData:M4,tableHeader:M4,tableRow:BZ},exit:{codeText:FZ,table:MZ,tableData:Xd,tableHeader:Xd,tableRow:Xd}}}function DZ(e){const t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function MZ(e){this.exit(e),this.data.inTable=void 0}function BZ(e){this.enter({type:"tableRow",children:[]},e)}function Xd(e){this.exit(e)}function M4(e){this.enter({type:"tableCell",children:[]},e)}function FZ(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,zZ));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function zZ(e,t){return t==="|"?t:e}function $Z(e){const t=e||{},r=t.tableCellPadding,n=t.tablePipeAlign,i=t.stringLength,s=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
650
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:a,tableCell:l,tableRow:o}};function a(f,m,b,y){return u(c(f,b,y),f.align)}function o(f,m,b,y){const E=d(f,b,y),w=u([E]);return w.slice(0,w.indexOf(`
651
- `))}function l(f,m,b,y){const E=b.enter("tableCell"),w=b.enter("phrasing"),x=b.containerPhrasing(f,{...y,before:s,after:s});return w(),E(),x}function u(f,m){return KW(f,{align:m,alignDelimiters:n,padding:r,stringLength:i})}function c(f,m,b){const y=f.children;let E=-1;const w=[],x=m.enter("table");for(;++E<y.length;)w[E]=d(y[E],m,b);return x(),w}function d(f,m,b){const y=f.children;let E=-1;const w=[],x=m.enter("tableRow");for(;++E<y.length;)w[E]=l(y[E],f,m,b);return x(),w}function h(f,m,b){let y=T7.inlineCode(f,m,b);return b.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function jZ(){return{exit:{taskListCheckValueChecked:B4,taskListCheckValueUnchecked:B4,paragraph:HZ}}}function UZ(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:VZ}}}function B4(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function HZ(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const n=r.children[0];if(n&&n.type==="text"){const i=t.children;let s=-1,a;for(;++s<i.length;){const o=i[s];if(o.type==="paragraph"){a=o;break}}a===r&&(n.value=n.value.slice(1),n.value.length===0?r.children.shift():r.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,r.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function VZ(e,t,r,n){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",o=r.createTracker(n);s&&o.move(a);let l=T7.listItem(e,t,r,{...n,...o.current()});return s&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(c){return c+a}}function qZ(){return[vW(),$W(),VW(),LZ(),jZ()]}function GZ(e){return{extensions:[xW(),jW(e),qW(),$Z(e),UZ()]}}function Ir(e,t,r,n){const i=e.length;let s=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,r=r>0?r:0,n.length<1e4)a=Array.from(n),a.unshift(t,r),e.splice(...a);else for(r&&e.splice(t,r);s<n.length;)a=n.slice(s,s+1e4),a.unshift(t,0),e.splice(...a),s+=1e4,t+=1e4}function Fr(e,t){return e.length>0?(Ir(e,e.length,0,t),e):t}const F4={}.hasOwnProperty;function k7(e){const t={};let r=-1;for(;++r<e.length;)WZ(t,e[r]);return t}function WZ(e,t){let r;for(r in t){const i=(F4.call(e,r)?e[r]:void 0)||(e[r]={}),s=t[r];let a;if(s)for(a in s){F4.call(i,a)||(i[a]=[]);const o=s[a];ZZ(i[a],Array.isArray(o)?o:o?[o]:[])}}}function ZZ(e,t){let r=-1;const n=[];for(;++r<t.length;)(t[r].add==="after"?e:n).push(t[r]);Ir(e,0,0,n)}const YZ={tokenize:tY,partial:!0},S7={tokenize:rY,partial:!0},A7={tokenize:nY,partial:!0},C7={tokenize:iY,partial:!0},KZ={tokenize:sY,partial:!0},I7={name:"wwwAutolink",tokenize:JZ,previous:R7},N7={name:"protocolAutolink",tokenize:eY,previous:P7},ui={name:"emailAutolink",tokenize:QZ,previous:O7},Fn={};function XZ(){return{text:Fn}}let ls=48;for(;ls<123;)Fn[ls]=ui,ls++,ls===58?ls=65:ls===91&&(ls=97);Fn[43]=ui;Fn[45]=ui;Fn[46]=ui;Fn[95]=ui;Fn[72]=[ui,N7];Fn[104]=[ui,N7];Fn[87]=[ui,I7];Fn[119]=[ui,I7];function QZ(e,t,r){const n=this;let i,s;return a;function a(d){return!Kf(d)||!O7.call(n,n.previous)||d1(n.events)?r(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(d))}function o(d){return Kf(d)?(e.consume(d),o):d===64?(e.consume(d),l):r(d)}function l(d){return d===46?e.check(KZ,c,u)(d):d===45||d===95||tr(d)?(s=!0,e.consume(d),l):c(d)}function u(d){return e.consume(d),i=!0,l}function c(d){return s&&i&&hr(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):r(d)}}function JZ(e,t,r){const n=this;return i;function i(a){return a!==87&&a!==119||!R7.call(n,n.previous)||d1(n.events)?r(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(YZ,e.attempt(S7,e.attempt(A7,s),r),r)(a))}function s(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function eY(e,t,r){const n=this;let i="",s=!1;return a;function a(d){return(d===72||d===104)&&P7.call(n,n.previous)&&!d1(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),o):r(d)}function o(d){if(hr(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),o;if(d===58){const h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(d),l}return r(d)}function l(d){return d===47?(e.consume(d),s?u:(s=!0,l)):r(d)}function u(d){return d===null||Cc(d)||at(d)||Ps(d)||L0(d)?r(d):e.attempt(S7,e.attempt(A7,c),r)(d)}function c(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function tY(e,t,r){let n=0;return i;function i(a){return(a===87||a===119)&&n<3?(n++,e.consume(a),i):a===46&&n===3?(e.consume(a),s):r(a)}function s(a){return a===null?r(a):t(a)}}function rY(e,t,r){let n,i,s;return a;function a(u){return u===46||u===95?e.check(C7,l,o)(u):u===null||at(u)||Ps(u)||u!==45&&L0(u)?l(u):(s=!0,e.consume(u),a)}function o(u){return u===95?n=!0:(i=n,n=void 0),e.consume(u),a}function l(u){return i||n||!s?r(u):t(u)}}function nY(e,t){let r=0,n=0;return i;function i(a){return a===40?(r++,e.consume(a),i):a===41&&n<r?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?e.check(C7,t,s)(a):a===null||at(a)||Ps(a)?t(a):(e.consume(a),i)}function s(a){return a===41&&n++,e.consume(a),i}}function iY(e,t,r){return n;function n(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),n):o===38?(e.consume(o),s):o===93?(e.consume(o),i):o===60||o===null||at(o)||Ps(o)?t(o):r(o)}function i(o){return o===null||o===40||o===91||at(o)||Ps(o)?t(o):n(o)}function s(o){return hr(o)?a(o):r(o)}function a(o){return o===59?(e.consume(o),n):hr(o)?(e.consume(o),a):r(o)}}function sY(e,t,r){return n;function n(s){return e.consume(s),i}function i(s){return tr(s)?r(s):t(s)}}function R7(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||at(e)}function P7(e){return!hr(e)}function O7(e){return!(e===47||Kf(e))}function Kf(e){return e===43||e===45||e===46||e===95||tr(e)}function d1(e){let t=e.length,r=!1;for(;t--;){const n=e[t][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}function eo(e){const t=[];let r=-1,n=0,i=0;for(;++r<e.length;){const s=e.charCodeAt(r);let a="";if(s===37&&tr(e.charCodeAt(r+1))&&tr(e.charCodeAt(r+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 o=e.charCodeAt(r+1);s<56320&&o>56319&&o<57344?(a=String.fromCharCode(s,o),i=1):a="�"}else a=String.fromCharCode(s);a&&(t.push(e.slice(n,r),encodeURIComponent(a)),n=r+i+1,a=""),i&&(r+=i,i=0)}return t.join("")+e.slice(n)}function j0(e,t,r){const n=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!n.includes(s)&&(t=s(t,r),n.push(s))}return t}const Xf={name:"attention",resolveAll:aY,tokenize:oY};function aY(e,t){let r=-1,n,i,s,a,o,l,u,c;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(n=r;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[n][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;l=e[n][1].end.offset-e[n][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const d={...e[n][1].end},h={...e[r][1].start};z4(d,-l),z4(h,l),a={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},o={type:l>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:h},s={type:l>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[r][1].start}},i={type:l>1?"strong":"emphasis",start:{...a.start},end:{...o.end}},e[n][1].end={...a.start},e[r][1].start={...o.end},u=[],e[n][1].end.offset-e[n][1].start.offset&&(u=Fr(u,[["enter",e[n][1],t],["exit",e[n][1],t]])),u=Fr(u,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",s,t]]),u=Fr(u,j0(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),u=Fr(u,[["exit",s,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[r][1].end.offset-e[r][1].start.offset?(c=2,u=Fr(u,[["enter",e[r][1],t],["exit",e[r][1],t]])):c=0,Ir(e,n-1,r-n+3,u),r=n+u.length-c-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function oY(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=Ma(n);let s;return a;function a(l){return s=l,e.enter("attentionSequence"),o(l)}function o(l){if(l===s)return e.consume(l),o;const u=e.exit("attentionSequence"),c=Ma(l),d=!c||c===2&&i||r.includes(l),h=!i||i===2&&c||r.includes(n);return u._open=!!(s===42?d:d&&(i||!h)),u._close=!!(s===42?h:h&&(c||!d)),t(l)}}function z4(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const lY={name:"autolink",tokenize:uY};function uY(e,t,r){let n=0;return i;function i(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(f){return hr(f)?(e.consume(f),a):f===64?r(f):u(f)}function a(f){return f===43||f===45||f===46||tr(f)?(n=1,o(f)):u(f)}function o(f){return f===58?(e.consume(f),n=0,l):(f===43||f===45||f===46||tr(f))&&n++<32?(e.consume(f),o):(n=0,u(f))}function l(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||Cc(f)?r(f):(e.consume(f),l)}function u(f){return f===64?(e.consume(f),c):PH(f)?(e.consume(f),u):r(f)}function c(f){return tr(f)?d(f):r(f)}function d(f){return f===46?(e.consume(f),n=0,c):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):h(f)}function h(f){if((f===45||tr(f))&&n++<63){const m=f===45?h:d;return e.consume(f),m}return r(f)}}const Fl={partial:!0,tokenize:cY};function cY(e,t,r){return n;function n(s){return Ze(s)?Ge(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||we(s)?t(s):r(s)}}const L7={continuation:{tokenize:hY},exit:fY,name:"blockQuote",tokenize:dY};function dY(e,t,r){const n=this;return i;function i(a){if(a===62){const o=n.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),s}return r(a)}function s(a){return Ze(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function hY(e,t,r){const n=this;return i;function i(a){return Ze(a)?Ge(e,s,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return e.attempt(L7,t,r)(a)}}function fY(e){e.exit("blockQuote")}const D7={name:"characterEscape",tokenize:mY};function mY(e,t,r){return n;function n(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return LH(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(s)}}const M7={name:"characterReference",tokenize:pY};function pY(e,t,r){const n=this;let i=0,s,a;return o;function o(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),s=31,a=tr,c(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,a=OH,c):(e.enter("characterReferenceValue"),s=7,a=Vf,c(d))}function c(d){if(d===59&&i){const h=e.exit("characterReferenceValue");return a===tr&&!c1(n.sliceSerialize(h))?r(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(d)&&i++<s?(e.consume(d),c):r(d)}}const $4={partial:!0,tokenize:bY},j4={concrete:!0,name:"codeFenced",tokenize:gY};function gY(e,t,r){const n=this,i={partial:!0,tokenize:A};let s=0,a=0,o;return l;function l(S){return u(S)}function u(S){const I=n.events[n.events.length-1];return s=I&&I[1].type==="linePrefix"?I[2].sliceSerialize(I[1],!0).length:0,o=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(S)}function c(S){return S===o?(a++,e.consume(S),c):a<3?r(S):(e.exit("codeFencedFenceSequence"),Ze(S)?Ge(e,d,"whitespace")(S):d(S))}function d(S){return S===null||we(S)?(e.exit("codeFencedFence"),n.interrupt?t(S):e.check($4,b,_)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(S))}function h(S){return S===null||we(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(S)):Ze(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ge(e,f,"whitespace")(S)):S===96&&S===o?r(S):(e.consume(S),h)}function f(S){return S===null||we(S)?d(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(S))}function m(S){return S===null||we(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(S)):S===96&&S===o?r(S):(e.consume(S),m)}function b(S){return e.attempt(i,_,y)(S)}function y(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),E}function E(S){return s>0&&Ze(S)?Ge(e,w,"linePrefix",s+1)(S):w(S)}function w(S){return S===null||we(S)?e.check($4,b,_)(S):(e.enter("codeFlowValue"),x(S))}function x(S){return S===null||we(S)?(e.exit("codeFlowValue"),w(S)):(e.consume(S),x)}function _(S){return e.exit("codeFenced"),t(S)}function A(S,I,N){let U=0;return z;function z(Y){return S.enter("lineEnding"),S.consume(Y),S.exit("lineEnding"),Z}function Z(Y){return S.enter("codeFencedFence"),Ze(Y)?Ge(S,V,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Y):V(Y)}function V(Y){return Y===o?(S.enter("codeFencedFenceSequence"),ae(Y)):N(Y)}function ae(Y){return Y===o?(U++,S.consume(Y),ae):U>=a?(S.exit("codeFencedFenceSequence"),Ze(Y)?Ge(S,J,"whitespace")(Y):J(Y)):N(Y)}function J(Y){return Y===null||we(Y)?(S.exit("codeFencedFence"),I(Y)):N(Y)}}}function bY(e,t,r){const n=this;return i;function i(a){return a===null?r(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s)}function s(a){return n.parser.lazy[n.now().line]?r(a):t(a)}}const Qd={name:"codeIndented",tokenize:vY},yY={partial:!0,tokenize:xY};function vY(e,t,r){const n=this;return i;function i(u){return e.enter("codeIndented"),Ge(e,s,"linePrefix",5)(u)}function s(u){const c=n.events[n.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?a(u):r(u)}function a(u){return u===null?l(u):we(u)?e.attempt(yY,a,l)(u):(e.enter("codeFlowValue"),o(u))}function o(u){return u===null||we(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),o)}function l(u){return e.exit("codeIndented"),t(u)}}function xY(e,t,r){const n=this;return i;function i(a){return n.parser.lazy[n.now().line]?r(a):we(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):Ge(e,s,"linePrefix",5)(a)}function s(a){const o=n.events[n.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):we(a)?i(a):r(a)}}const EY={name:"codeText",previous:TY,resolve:_Y,tokenize:wY};function _Y(e){let t=e.length-4,r=3,n,i;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)i===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(i=n):(n===t||e[n][1].type==="lineEnding")&&(e[i][1].type="codeTextData",n!==i+2&&(e[i][1].end=e[n-1][1].end,e.splice(i+2,n-i-2),t-=n-i-2,n=i+2),i=void 0);return e}function TY(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function wY(e,t,r){let n=0,i,s;return a;function a(d){return e.enter("codeText"),e.enter("codeTextSequence"),o(d)}function o(d){return d===96?(e.consume(d),n++,o):(e.exit("codeTextSequence"),l(d))}function l(d){return d===null?r(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),l):d===96?(s=e.enter("codeTextSequence"),i=0,c(d)):we(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("codeTextData"),u(d))}function u(d){return d===null||d===32||d===96||we(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),u)}function c(d){return d===96?(e.consume(d),i++,c):i===n?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(s.type="codeTextData",u(d))}}class kY{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){const n=r??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(t,n):t>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(t,r,n){const i=r||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return n&&yo(this.left,n),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),yo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),yo(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const r=this.left.splice(t,Number.POSITIVE_INFINITY);yo(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);yo(this.left,r.reverse())}}}function yo(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function B7(e){const t={};let r=-1,n,i,s,a,o,l,u;const c=new kY(e);for(;++r<c.length;){for(;r in t;)r=t[r];if(n=c.get(r),r&&n[1].type==="chunkFlow"&&c.get(r-1)[1].type==="listItemPrefix"&&(l=n[1]._tokenizer.events,s=0,s<l.length&&l[s][1].type==="lineEndingBlank"&&(s+=2),s<l.length&&l[s][1].type==="content"))for(;++s<l.length&&l[s][1].type!=="content";)l[s][1].type==="chunkText"&&(l[s][1]._isInFirstContentOfListItem=!0,s++);if(n[0]==="enter")n[1].contentType&&(Object.assign(t,SY(c,r)),r=t[r],u=!0);else if(n[1]._container){for(s=r,i=void 0;s--;)if(a=c.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=s);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(n[1].end={...c.get(i)[1].start},o=c.slice(i,r),o.unshift(n),c.splice(i,r-i+1,o))}}return Ir(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function SY(e,t){const r=e.get(t)[1],n=e.get(t)[2];let i=t-1;const s=[];let a=r._tokenizer;a||(a=n.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const o=a.events,l=[],u={};let c,d,h=-1,f=r,m=0,b=0;const y=[b];for(;f;){for(;e.get(++i)[1]!==f;);s.push(i),f._tokenizer||(c=n.sliceStream(f),f.next||c.push(null),d&&a.defineSkip(f.start),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(c),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=r;++h<o.length;)o[h][0]==="exit"&&o[h-1][0]==="enter"&&o[h][1].type===o[h-1][1].type&&o[h][1].start.line!==o[h][1].end.line&&(b=h+1,y.push(b),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(a.events=[],f?(f._tokenizer=void 0,f.previous=void 0):y.pop(),h=y.length;h--;){const E=o.slice(y[h],y[h+1]),w=s.pop();l.push([w,w+E.length-1]),e.splice(w,2,E)}for(l.reverse(),h=-1;++h<l.length;)u[m+l[h][0]]=m+l[h][1],m+=l[h][1]-l[h][0]-1;return u}const AY={resolve:IY,tokenize:NY},CY={partial:!0,tokenize:RY};function IY(e){return B7(e),e}function NY(e,t){let r;return n;function n(o){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?s(o):we(o)?e.check(CY,a,s)(o):(e.consume(o),i)}function s(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function a(o){return e.consume(o),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,i}}function RY(e,t,r){const n=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ge(e,s,"linePrefix")}function s(a){if(a===null||we(a))return r(a);const o=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):e.interrupt(n.parser.constructs.flow,r,t)(a)}}function F7(e,t,r,n,i,s,a,o,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return d;function d(E){return E===60?(e.enter(n),e.enter(i),e.enter(s),e.consume(E),e.exit(s),h):E===null||E===32||E===41||Cc(E)?r(E):(e.enter(n),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),b(E))}function h(E){return E===62?(e.enter(s),e.consume(E),e.exit(s),e.exit(i),e.exit(n),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),f(E))}function f(E){return E===62?(e.exit("chunkString"),e.exit(o),h(E)):E===null||E===60||we(E)?r(E):(e.consume(E),E===92?m:f)}function m(E){return E===60||E===62||E===92?(e.consume(E),f):f(E)}function b(E){return!c&&(E===null||E===41||at(E))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(n),t(E)):c<u&&E===40?(e.consume(E),c++,b):E===41?(e.consume(E),c--,b):E===null||E===32||E===40||Cc(E)?r(E):(e.consume(E),E===92?y:b)}function y(E){return E===40||E===41||E===92?(e.consume(E),b):b(E)}}function z7(e,t,r,n,i,s){const a=this;let o=0,l;return u;function u(f){return e.enter(n),e.enter(i),e.consume(f),e.exit(i),e.enter(s),c}function c(f){return o>999||f===null||f===91||f===93&&!l||f===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?r(f):f===93?(e.exit(s),e.enter(i),e.consume(f),e.exit(i),e.exit(n),t):we(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===null||f===91||f===93||we(f)||o++>999?(e.exit("chunkString"),c(f)):(e.consume(f),l||(l=!Ze(f)),f===92?h:d)}function h(f){return f===91||f===92||f===93?(e.consume(f),o++,d):d(f)}}function $7(e,t,r,n,i,s){let a;return o;function o(h){return h===34||h===39||h===40?(e.enter(n),e.enter(i),e.consume(h),e.exit(i),a=h===40?41:h,l):r(h)}function l(h){return h===a?(e.enter(i),e.consume(h),e.exit(i),e.exit(n),t):(e.enter(s),u(h))}function u(h){return h===a?(e.exit(s),l(a)):h===null?r(h):we(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),Ge(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===a||h===null||we(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?d:c)}function d(h){return h===a||h===92?(e.consume(h),c):c(h)}}function Ho(e,t){let r;return n;function n(i){return we(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r=!0,n):Ze(i)?Ge(e,n,r?"linePrefix":"lineSuffix")(i):t(i)}}const PY={name:"definition",tokenize:LY},OY={partial:!0,tokenize:DY};function LY(e,t,r){const n=this;let i;return s;function s(f){return e.enter("definition"),a(f)}function a(f){return z7.call(n,e,o,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function o(f){return i=dn(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),l):r(f)}function l(f){return at(f)?Ho(e,u)(f):u(f)}function u(f){return F7(e,c,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function c(f){return e.attempt(OY,d,d)(f)}function d(f){return Ze(f)?Ge(e,h,"whitespace")(f):h(f)}function h(f){return f===null||we(f)?(e.exit("definition"),n.parser.defined.push(i),t(f)):r(f)}}function DY(e,t,r){return n;function n(o){return at(o)?Ho(e,i)(o):r(o)}function i(o){return $7(e,s,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function s(o){return Ze(o)?Ge(e,a,"whitespace")(o):a(o)}function a(o){return o===null||we(o)?t(o):r(o)}}const MY={name:"hardBreakEscape",tokenize:BY};function BY(e,t,r){return n;function n(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return we(s)?(e.exit("hardBreakEscape"),t(s)):r(s)}}const FY={name:"headingAtx",resolve:zY,tokenize:$Y};function zY(e,t){let r=e.length-2,n=3,i,s;return e[n][1].type==="whitespace"&&(n+=2),r-2>n&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&e[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n&&(i={type:"atxHeadingText",start:e[n][1].start,end:e[r][1].end},s={type:"chunkText",start:e[n][1].start,end:e[r][1].end,contentType:"text"},Ir(e,n,r-n+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function $Y(e,t,r){let n=0;return i;function i(c){return e.enter("atxHeading"),s(c)}function s(c){return e.enter("atxHeadingSequence"),a(c)}function a(c){return c===35&&n++<6?(e.consume(c),a):c===null||at(c)?(e.exit("atxHeadingSequence"),o(c)):r(c)}function o(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||we(c)?(e.exit("atxHeading"),t(c)):Ze(c)?Ge(e,o,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),o(c))}function u(c){return c===null||c===35||at(c)?(e.exit("atxHeadingText"),o(c)):(e.consume(c),u)}}const jY=["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"],U4=["pre","script","style","textarea"],UY={concrete:!0,name:"htmlFlow",resolveTo:qY,tokenize:GY},HY={partial:!0,tokenize:ZY},VY={partial:!0,tokenize:WY};function qY(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function GY(e,t,r){const n=this;let i,s,a,o,l;return u;function u(M){return c(M)}function c(M){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(M),d}function d(M){return M===33?(e.consume(M),h):M===47?(e.consume(M),s=!0,b):M===63?(e.consume(M),i=3,n.interrupt?t:L):hr(M)?(e.consume(M),a=String.fromCharCode(M),y):r(M)}function h(M){return M===45?(e.consume(M),i=2,f):M===91?(e.consume(M),i=5,o=0,m):hr(M)?(e.consume(M),i=4,n.interrupt?t:L):r(M)}function f(M){return M===45?(e.consume(M),n.interrupt?t:L):r(M)}function m(M){const pe="CDATA[";return M===pe.charCodeAt(o++)?(e.consume(M),o===pe.length?n.interrupt?t:V:m):r(M)}function b(M){return hr(M)?(e.consume(M),a=String.fromCharCode(M),y):r(M)}function y(M){if(M===null||M===47||M===62||at(M)){const pe=M===47,oe=a.toLowerCase();return!pe&&!s&&U4.includes(oe)?(i=1,n.interrupt?t(M):V(M)):jY.includes(a.toLowerCase())?(i=6,pe?(e.consume(M),E):n.interrupt?t(M):V(M)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(M):s?w(M):x(M))}return M===45||tr(M)?(e.consume(M),a+=String.fromCharCode(M),y):r(M)}function E(M){return M===62?(e.consume(M),n.interrupt?t:V):r(M)}function w(M){return Ze(M)?(e.consume(M),w):z(M)}function x(M){return M===47?(e.consume(M),z):M===58||M===95||hr(M)?(e.consume(M),_):Ze(M)?(e.consume(M),x):z(M)}function _(M){return M===45||M===46||M===58||M===95||tr(M)?(e.consume(M),_):A(M)}function A(M){return M===61?(e.consume(M),S):Ze(M)?(e.consume(M),A):x(M)}function S(M){return M===null||M===60||M===61||M===62||M===96?r(M):M===34||M===39?(e.consume(M),l=M,I):Ze(M)?(e.consume(M),S):N(M)}function I(M){return M===l?(e.consume(M),l=null,U):M===null||we(M)?r(M):(e.consume(M),I)}function N(M){return M===null||M===34||M===39||M===47||M===60||M===61||M===62||M===96||at(M)?A(M):(e.consume(M),N)}function U(M){return M===47||M===62||Ze(M)?x(M):r(M)}function z(M){return M===62?(e.consume(M),Z):r(M)}function Z(M){return M===null||we(M)?V(M):Ze(M)?(e.consume(M),Z):r(M)}function V(M){return M===45&&i===2?(e.consume(M),de):M===60&&i===1?(e.consume(M),xe):M===62&&i===4?(e.consume(M),Re):M===63&&i===3?(e.consume(M),L):M===93&&i===5?(e.consume(M),He):we(M)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(HY,Q,ae)(M)):M===null||we(M)?(e.exit("htmlFlowData"),ae(M)):(e.consume(M),V)}function ae(M){return e.check(VY,J,Q)(M)}function J(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),Y}function Y(M){return M===null||we(M)?ae(M):(e.enter("htmlFlowData"),V(M))}function de(M){return M===45?(e.consume(M),L):V(M)}function xe(M){return M===47?(e.consume(M),a="",Ue):V(M)}function Ue(M){if(M===62){const pe=a.toLowerCase();return U4.includes(pe)?(e.consume(M),Re):V(M)}return hr(M)&&a.length<8?(e.consume(M),a+=String.fromCharCode(M),Ue):V(M)}function He(M){return M===93?(e.consume(M),L):V(M)}function L(M){return M===62?(e.consume(M),Re):M===45&&i===2?(e.consume(M),L):V(M)}function Re(M){return M===null||we(M)?(e.exit("htmlFlowData"),Q(M)):(e.consume(M),Re)}function Q(M){return e.exit("htmlFlow"),t(M)}}function WY(e,t,r){const n=this;return i;function i(a){return we(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):r(a)}function s(a){return n.parser.lazy[n.now().line]?r(a):t(a)}}function ZY(e,t,r){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Fl,t,r)}}const YY={name:"htmlText",tokenize:KY};function KY(e,t,r){const n=this;let i,s,a;return o;function o(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),l}function l(L){return L===33?(e.consume(L),u):L===47?(e.consume(L),A):L===63?(e.consume(L),x):hr(L)?(e.consume(L),N):r(L)}function u(L){return L===45?(e.consume(L),c):L===91?(e.consume(L),s=0,m):hr(L)?(e.consume(L),w):r(L)}function c(L){return L===45?(e.consume(L),f):r(L)}function d(L){return L===null?r(L):L===45?(e.consume(L),h):we(L)?(a=d,xe(L)):(e.consume(L),d)}function h(L){return L===45?(e.consume(L),f):d(L)}function f(L){return L===62?de(L):L===45?h(L):d(L)}function m(L){const Re="CDATA[";return L===Re.charCodeAt(s++)?(e.consume(L),s===Re.length?b:m):r(L)}function b(L){return L===null?r(L):L===93?(e.consume(L),y):we(L)?(a=b,xe(L)):(e.consume(L),b)}function y(L){return L===93?(e.consume(L),E):b(L)}function E(L){return L===62?de(L):L===93?(e.consume(L),E):b(L)}function w(L){return L===null||L===62?de(L):we(L)?(a=w,xe(L)):(e.consume(L),w)}function x(L){return L===null?r(L):L===63?(e.consume(L),_):we(L)?(a=x,xe(L)):(e.consume(L),x)}function _(L){return L===62?de(L):x(L)}function A(L){return hr(L)?(e.consume(L),S):r(L)}function S(L){return L===45||tr(L)?(e.consume(L),S):I(L)}function I(L){return we(L)?(a=I,xe(L)):Ze(L)?(e.consume(L),I):de(L)}function N(L){return L===45||tr(L)?(e.consume(L),N):L===47||L===62||at(L)?U(L):r(L)}function U(L){return L===47?(e.consume(L),de):L===58||L===95||hr(L)?(e.consume(L),z):we(L)?(a=U,xe(L)):Ze(L)?(e.consume(L),U):de(L)}function z(L){return L===45||L===46||L===58||L===95||tr(L)?(e.consume(L),z):Z(L)}function Z(L){return L===61?(e.consume(L),V):we(L)?(a=Z,xe(L)):Ze(L)?(e.consume(L),Z):U(L)}function V(L){return L===null||L===60||L===61||L===62||L===96?r(L):L===34||L===39?(e.consume(L),i=L,ae):we(L)?(a=V,xe(L)):Ze(L)?(e.consume(L),V):(e.consume(L),J)}function ae(L){return L===i?(e.consume(L),i=void 0,Y):L===null?r(L):we(L)?(a=ae,xe(L)):(e.consume(L),ae)}function J(L){return L===null||L===34||L===39||L===60||L===61||L===96?r(L):L===47||L===62||at(L)?U(L):(e.consume(L),J)}function Y(L){return L===47||L===62||at(L)?U(L):r(L)}function de(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),t):r(L)}function xe(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),Ue}function Ue(L){return Ze(L)?Ge(e,He,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):He(L)}function He(L){return e.enter("htmlTextData"),a(L)}}const h1={name:"labelEnd",resolveAll:eK,resolveTo:tK,tokenize:rK},XY={tokenize:nK},QY={tokenize:iK},JY={tokenize:sK};function eK(e){let t=-1;const r=[];for(;++t<e.length;){const n=e[t][1];if(r.push(e[t]),n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd"){const i=n.type==="labelImage"?4:2;n.type="data",t+=i}}return e.length!==r.length&&Ir(e,0,e.length,r),e}function tK(e,t){let r=e.length,n=0,i,s,a,o;for(;r--;)if(i=e[r][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[r][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[r][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=r,i.type!=="labelLink")){n=2;break}}else i.type==="labelEnd"&&(a=r);const l={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[s][1].start},end:{...e[a][1].end}},c={type:"labelText",start:{...e[s+n+2][1].end},end:{...e[a-2][1].start}};return o=[["enter",l,t],["enter",u,t]],o=Fr(o,e.slice(s+1,s+n+3)),o=Fr(o,[["enter",c,t]]),o=Fr(o,j0(t.parser.constructs.insideSpan.null,e.slice(s+n+4,a-3),t)),o=Fr(o,[["exit",c,t],e[a-2],e[a-1],["exit",u,t]]),o=Fr(o,e.slice(a+1)),o=Fr(o,[["exit",l,t]]),Ir(e,s,e.length,o),e}function rK(e,t,r){const n=this;let i=n.events.length,s,a;for(;i--;)if((n.events[i][1].type==="labelImage"||n.events[i][1].type==="labelLink")&&!n.events[i][1]._balanced){s=n.events[i][1];break}return o;function o(h){return s?s._inactive?d(h):(a=n.parser.defined.includes(dn(n.sliceSerialize({start:s.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),l):r(h)}function l(h){return h===40?e.attempt(XY,c,a?c:d)(h):h===91?e.attempt(QY,c,a?u:d)(h):a?c(h):d(h)}function u(h){return e.attempt(JY,c,d)(h)}function c(h){return t(h)}function d(h){return s._balanced=!0,r(h)}}function nK(e,t,r){return n;function n(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return at(d)?Ho(e,s)(d):s(d)}function s(d){return d===41?c(d):F7(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function a(d){return at(d)?Ho(e,l)(d):c(d)}function o(d){return r(d)}function l(d){return d===34||d===39||d===40?$7(e,u,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function u(d){return at(d)?Ho(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):r(d)}}function iK(e,t,r){const n=this;return i;function i(o){return z7.call(n,e,s,a,"reference","referenceMarker","referenceString")(o)}function s(o){return n.parser.defined.includes(dn(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(o):r(o)}function a(o){return r(o)}}function sK(e,t,r){return n;function n(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):r(s)}}const aK={name:"labelStartImage",resolveAll:h1.resolveAll,tokenize:oK};function oK(e,t,r){const n=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),s}function s(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),a):r(o)}function a(o){return o===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(o):t(o)}}const lK={name:"labelStartLink",resolveAll:h1.resolveAll,tokenize:uK};function uK(e,t,r){const n=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(a):t(a)}}const Jd={name:"lineEnding",tokenize:cK};function cK(e,t){return r;function r(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Ge(e,t,"linePrefix")}}const ju={name:"thematicBreak",tokenize:dK};function dK(e,t,r){let n=0,i;return s;function s(u){return e.enter("thematicBreak"),a(u)}function a(u){return i=u,o(u)}function o(u){return u===i?(e.enter("thematicBreakSequence"),l(u)):n>=3&&(u===null||we(u))?(e.exit("thematicBreak"),t(u)):r(u)}function l(u){return u===i?(e.consume(u),n++,l):(e.exit("thematicBreakSequence"),Ze(u)?Ge(e,o,"whitespace")(u):o(u))}}const yr={continuation:{tokenize:pK},exit:bK,name:"list",tokenize:mK},hK={partial:!0,tokenize:yK},fK={partial:!0,tokenize:gK};function mK(e,t,r){const n=this,i=n.events[n.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return o;function o(f){const m=n.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!n.containerState.marker||f===n.containerState.marker:Vf(f)){if(n.containerState.type||(n.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(ju,r,u)(f):u(f);if(!n.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(f)}return r(f)}function l(f){return Vf(f)&&++a<10?(e.consume(f),l):(!n.interrupt||a<2)&&(n.containerState.marker?f===n.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),u(f)):r(f)}function u(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||f,e.check(Fl,n.interrupt?r:c,e.attempt(hK,h,d))}function c(f){return n.containerState.initialBlankLine=!0,s++,h(f)}function d(f){return Ze(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),h):r(f)}function h(f){return n.containerState.size=s+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function pK(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(Fl,i,s);function i(o){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,Ge(e,t,"listItemIndent",n.containerState.size+1)(o)}function s(o){return n.containerState.furtherBlankLines||!Ze(o)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,a(o)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(fK,t,a)(o))}function a(o){return n.containerState._closeFlow=!0,n.interrupt=void 0,Ge(e,e.attempt(yr,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function gK(e,t,r){const n=this;return Ge(e,i,"listItemIndent",n.containerState.size+1);function i(s){const a=n.events[n.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===n.containerState.size?t(s):r(s)}}function bK(e){e.exit(this.containerState.type)}function yK(e,t,r){const n=this;return Ge(e,i,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const a=n.events[n.events.length-1];return!Ze(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):r(s)}}const H4={name:"setextUnderline",resolveTo:vK,tokenize:xK};function vK(e,t){let r=e.length,n,i,s;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){n=r;break}e[r][1].type==="paragraph"&&(i=r)}else e[r][1].type==="content"&&e.splice(r,1),!s&&e[r][1].type==="definition"&&(s=r);const a={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",a,t]),e.splice(s+1,0,["exit",e[n][1],t]),e[n][1].end={...e[s][1].end}):e[n][1]=a,e.push(["exit",a,t]),e}function xK(e,t,r){const n=this;let i;return s;function s(u){let c=n.events.length,d;for(;c--;)if(n.events[c][1].type!=="lineEnding"&&n.events[c][1].type!=="linePrefix"&&n.events[c][1].type!=="content"){d=n.events[c][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||d)?(e.enter("setextHeadingLine"),i=u,a(u)):r(u)}function a(u){return e.enter("setextHeadingLineSequence"),o(u)}function o(u){return u===i?(e.consume(u),o):(e.exit("setextHeadingLineSequence"),Ze(u)?Ge(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||we(u)?(e.exit("setextHeadingLine"),t(u)):r(u)}}const EK={tokenize:IK,partial:!0};function _K(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:SK,continuation:{tokenize:AK},exit:CK}},text:{91:{name:"gfmFootnoteCall",tokenize:kK},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:TK,resolveTo:wK}}}}function TK(e,t,r){const n=this;let i=n.events.length;const s=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a;for(;i--;){const l=n.events[i][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return o;function o(l){if(!a||!a._balanced)return r(l);const u=dn(n.sliceSerialize({start:a.end,end:n.now()}));return u.codePointAt(0)!==94||!s.includes(u.slice(1))?r(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function wK(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},o=[e[r+1],e[r+2],["enter",n,t],e[r+3],e[r+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",n,t]];return e.splice(r,e.length-r+1,...o),e}function kK(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let s=0,a;return o;function o(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?r(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(d){if(s>999||d===93&&!a||d===null||d===91||at(d))return r(d);if(d===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(dn(n.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(d)}return at(d)||(a=!0),s++,e.consume(d),d===92?c:u}function c(d){return d===91||d===92||d===93?(e.consume(d),s++,u):u(d)}}function SK(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let s,a=0,o;return l;function l(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):r(m)}function c(m){if(a>999||m===93&&!o||m===null||m===91||at(m))return r(m);if(m===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return s=dn(n.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return at(m)||(o=!0),a++,e.consume(m),m===92?d:c}function d(m){return m===91||m===92||m===93?(e.consume(m),a++,c):c(m)}function h(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(s)||i.push(s),Ge(e,f,"gfmFootnoteDefinitionWhitespace")):r(m)}function f(m){return t(m)}}function AK(e,t,r){return e.check(Fl,t,e.attempt(EK,t,r))}function CK(e){e.exit("gfmFootnoteDefinition")}function IK(e,t,r){const n=this;return Ge(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const a=n.events[n.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(s):r(s)}}function NK(e){let r=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:s,resolveAll:i};return r==null&&(r=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function i(a,o){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let u=l;for(;u--;)if(a[u][0]==="exit"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[u][1].end.offset-a[u][1].start.offset){a[l][1].type="strikethroughSequence",a[u][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},a[u][1].start),end:Object.assign({},a[l][1].end)},d={type:"strikethroughText",start:Object.assign({},a[u][1].end),end:Object.assign({},a[l][1].start)},h=[["enter",c,o],["enter",a[u][1],o],["exit",a[u][1],o],["enter",d,o]],f=o.parser.constructs.insideSpan.null;f&&Ir(h,h.length,0,j0(f,a.slice(u+1,l),o)),Ir(h,h.length,0,[["exit",d,o],["enter",a[l][1],o],["exit",a[l][1],o],["exit",c,o]]),Ir(a,u-1,l-u+3,h),l=u+h.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function s(a,o,l){const u=this.previous,c=this.events;let d=0;return h;function h(m){return u===126&&c[c.length-1][1].type!=="characterEscape"?l(m):(a.enter("strikethroughSequenceTemporary"),f(m))}function f(m){const b=Ma(u);if(m===126)return d>1?l(m):(a.consume(m),d++,f);if(d<2&&!r)return l(m);const y=a.exit("strikethroughSequenceTemporary"),E=Ma(m);return y._open=!E||E===2&&!!b,y._close=!b||b===2&&!!E,o(m)}}}class RK{constructor(){this.map=[]}add(t,r,n){PK(this,t,r,n)}consume(t){if(this.map.sort(function(s,a){return s[0]-a[0]}),this.map.length===0)return;let r=this.map.length;const n=[];for(;r>0;)r-=1,n.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];n.push(t.slice()),t.length=0;let i=n.pop();for(;i;){for(const s of i)t.push(s);i=n.pop()}this.map.length=0}}function PK(e,t,r,n){let i=0;if(!(r===0&&n.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=r,e.map[i][2].push(...n);return}i+=1}e.map.push([t,r,n])}}function OK(e,t){let r=!1;const n=[];for(;t<e.length;){const i=e[t];if(r){if(i[0]==="enter")i[1].type==="tableContent"&&n.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=n.length-1;n[s]=n[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return n}function LK(){return{flow:{null:{name:"table",tokenize:DK,resolveAll:MK}}}}function DK(e,t,r){const n=this;let i=0,s=0,a;return o;function o(z){let Z=n.events.length-1;for(;Z>-1;){const J=n.events[Z][1].type;if(J==="lineEnding"||J==="linePrefix")Z--;else break}const V=Z>-1?n.events[Z][1].type:null,ae=V==="tableHead"||V==="tableRow"?S:l;return ae===S&&n.parser.lazy[n.now().line]?r(z):ae(z)}function l(z){return e.enter("tableHead"),e.enter("tableRow"),u(z)}function u(z){return z===124||(a=!0,s+=1),c(z)}function c(z){return z===null?r(z):we(z)?s>1?(s=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),f):r(z):Ze(z)?Ge(e,c,"whitespace")(z):(s+=1,a&&(a=!1,i+=1),z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),a=!0,c):(e.enter("data"),d(z)))}function d(z){return z===null||z===124||at(z)?(e.exit("data"),c(z)):(e.consume(z),z===92?h:d)}function h(z){return z===92||z===124?(e.consume(z),d):d(z)}function f(z){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(z):(e.enter("tableDelimiterRow"),a=!1,Ze(z)?Ge(e,m,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):m(z))}function m(z){return z===45||z===58?y(z):z===124?(a=!0,e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),b):A(z)}function b(z){return Ze(z)?Ge(e,y,"whitespace")(z):y(z)}function y(z){return z===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),E):z===45?(s+=1,E(z)):z===null||we(z)?_(z):A(z)}function E(z){return z===45?(e.enter("tableDelimiterFiller"),w(z)):A(z)}function w(z){return z===45?(e.consume(z),w):z===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),x):(e.exit("tableDelimiterFiller"),x(z))}function x(z){return Ze(z)?Ge(e,_,"whitespace")(z):_(z)}function _(z){return z===124?m(z):z===null||we(z)?!a||i!==s?A(z):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(z)):A(z)}function A(z){return r(z)}function S(z){return e.enter("tableRow"),I(z)}function I(z){return z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),I):z===null||we(z)?(e.exit("tableRow"),t(z)):Ze(z)?Ge(e,I,"whitespace")(z):(e.enter("data"),N(z))}function N(z){return z===null||z===124||at(z)?(e.exit("data"),I(z)):(e.consume(z),z===92?U:N)}function U(z){return z===92||z===124?(e.consume(z),N):N(z)}}function MK(e,t){let r=-1,n=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],o=!1,l=0,u,c,d;const h=new RK;for(;++r<e.length;){const f=e[r],m=f[1];f[0]==="enter"?m.type==="tableHead"?(o=!1,l!==0&&(V4(h,t,l,u,c),c=void 0,l=0),u={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(r,0,[["enter",u,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(n=!0,d=void 0,s=[0,0,0,0],a=[0,r+1,0,0],o&&(o=!1,c={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(r,0,[["enter",c,t]])),i=m.type==="tableDelimiterRow"?2:c?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(n=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],d=xu(h,t,s,i,void 0,d),s=[0,0,0,0]),a[2]=r)):m.type==="tableCellDivider"&&(n?n=!1:(s[1]!==0&&(a[0]=a[1],d=xu(h,t,s,i,void 0,d)),s=a,a=[s[1],r,0,0])):m.type==="tableHead"?(o=!0,l=r):m.type==="tableRow"||m.type==="tableDelimiterRow"?(l=r,s[1]!==0?(a[0]=a[1],d=xu(h,t,s,i,r,d)):a[1]!==0&&(d=xu(h,t,a,i,r,d)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(a[3]=r)}for(l!==0&&V4(h,t,l,u,c),h.consume(t.events),r=-1;++r<t.events.length;){const f=t.events[r];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=OK(t.events,r))}return e}function xu(e,t,r,n,i,s){const a=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",o="tableContent";r[0]!==0&&(s.end=Object.assign({},oa(t.events,r[0])),e.add(r[0],0,[["exit",s,t]]));const l=oa(t.events,r[1]);if(s={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(r[1],0,[["enter",s,t]]),r[2]!==0){const u=oa(t.events,r[2]),c=oa(t.events,r[3]),d={type:o,start:Object.assign({},u),end:Object.assign({},c)};if(e.add(r[2],0,[["enter",d,t]]),n!==2){const h=t.events[r[2]],f=t.events[r[3]];if(h[1].end=Object.assign({},f[1].end),h[1].type="chunkText",h[1].contentType="text",r[3]>r[2]+1){const m=r[2]+1,b=r[3]-r[2]-1;e.add(m,b,[])}}e.add(r[3]+1,0,[["exit",d,t]])}return i!==void 0&&(s.end=Object.assign({},oa(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function V4(e,t,r,n,i){const s=[],a=oa(t.events,r);i&&(i.end=Object.assign({},a),s.push(["exit",i,t])),n.end=Object.assign({},a),s.push(["exit",n,t]),e.add(r+1,0,s)}function oa(e,t){const r=e[t],n=r[0]==="enter"?"start":"end";return r[1][n]}const BK={name:"tasklistCheck",tokenize:zK};function FK(){return{text:{91:BK}}}function zK(e,t,r){const n=this;return i;function i(l){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?r(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),s)}function s(l){return at(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):r(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):r(l)}function o(l){return we(l)?t(l):Ze(l)?e.check({tokenize:$K},t,r)(l):r(l)}}function $K(e,t,r){return Ge(e,n,"whitespace");function n(i){return i===null?r(i):t(i)}}function jK(e){return k7([XZ(),_K(),NK(e),LK(),FK()])}const UK={};function HK(e){const t=this,r=e||UK,n=t.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),s=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(jK(r)),s.push(qZ()),a.push(GZ(r))}var VK=Object.defineProperty,qK=Object.defineProperties,GK=Object.getOwnPropertyDescriptors,q4=Object.getOwnPropertySymbols,WK=Object.prototype.hasOwnProperty,ZK=Object.prototype.propertyIsEnumerable,G4=(e,t,r)=>t in e?VK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,j7=(e,t)=>{for(var r in t||(t={}))WK.call(t,r)&&G4(e,r,t[r]);if(q4)for(var r of q4(t))ZK.call(t,r)&&G4(e,r,t[r]);return e},U7=(e,t)=>qK(e,GK(t)),dt={PROSE:0,FENCE_MARKER:1,FENCE_INFO:2,FENCE_BODY:3,CODE_SPAN:4,CODE_SPAN_OPEN:5},YK=/^(`{3,}|~{3,})(.*)$/,KK=e=>e!==void 0&&e>="0"&&e<="9",XK=(e,t)=>{let r=t;if(e[r]==="-"||e[r]==="*"||e[r]==="+")r+=1;else{for(;KK(e[r])&&r-t<9;)r+=1;if(r===t||e[r]!=="."&&e[r]!==")")return-1;r+=1}return e[r]===" "?r+1:-1},QK=(e,t,r)=>{let n=0,i=t,s=!1,a=t;for(;;){for(;a<r&&e[a]===" ";)a+=1;if(e[a]===">"){n+=1,a+=e[a+1]===" "?2:1,i=a,s=!1;continue}let o=a<r?XK(e,a):-1;if(o===-1)return{contentStart:a,listIndent:s?a-i:0,quoteDepth:n};a=o,s=!0}},JK=(e,t,r,n)=>{let i=t;for(let s=0;s<n;s+=1){for(;i<r&&e[i]===" ";)i+=1;if(e[i]!==">")return-1;i+=1,e[i]===" "&&(i+=1)}return i},eX=(e,t,r,n,i)=>{let s=t+n;e.fill(dt.FENCE_MARKER,s,s+i),e.fill(dt.FENCE_INFO,s+i,Math.min(r+1,e.length))},tX=(e,t,r,n)=>{let i=t;for(;i<r&&e[i]===" ";)i+=1;let s=0;for(;i<r&&e[i]===n.char;)i+=1,s+=1;if(s<n.length)return!1;for(;i<r;){if(e[i]!==" "&&e[i]!==" "&&e[i]!=="\r")return!1;i+=1}return!0},rX=(e,t,r,n)=>{let i=n>r&&e[n-1]==="\r"?n-1:n,s=QK(e,r,i),a=e.slice(s.contentStart,i).match(YK);if(!a)return null;let[,o,l]=a,u=o[0];return u==="`"&&l.includes("`")?null:(eX(t,r,n,s.contentStart-r,o.length),{char:u,length:o.length,listIndent:s.listIndent,quoteDepth:s.quoteDepth})},nX=(e,t,r,n)=>{let i=JK(e,t,r,n.quoteDepth);if(i===-1||n.listIndent===0)return i;let s=i;for(;s<r&&e[s]===" ";)s+=1;return s===r||e[s]==="\r"&&s+1===r||s-i>=n.listIndent?i:-1},iX=(e,t)=>{let r=e.length,n=null,i=0;for(;i<r;){let s=e.indexOf(`
652
- `,i);s===-1&&(s=r);let a=n?nX(e,i,s,n):-1;n&&a===-1&&(n=null),n?tX(e,a,s,n)?(t.fill(dt.FENCE_MARKER,i,s),n=null):t.fill(dt.FENCE_BODY,i,Math.min(s+1,r)):n=rX(e,t,i,s),i=s+1}return n},W4=(e,t)=>{let r=t+1;for(;r<e.length&&e[r]==="`";)r+=1;return r},sX=(e,t)=>{let r=t+1;for(;r<e.length&&(e[r]===" "||e[r]===" "||e[r]==="\r");)r+=1;return r<e.length&&e[r]===`
653
- `},aX=(e,t,r)=>{let n=r;for(;;){let i=e.indexOf("`",n);if(i===-1)return-1;let s=i>n&&e[i-1]==="\\"&&t[i-1]===dt.PROSE;if(t[i]===dt.PROSE&&!s)return i;n=i+1}},oX=(e,t)=>{let r=e.length,n=-1,i=0,s=0;for(;s<r;){if(n<0){if(s=aX(e,t,s),s===-1)break;let o=W4(e,s);n=s,i=o-s,s=o;continue}if(t[s]!==dt.PROSE){t.fill(dt.CODE_SPAN_OPEN,n,s),n=-1,s+=1;continue}if(e[s]===`
654
- `&&sX(e,s)){n=-1,s+=1;continue}if(e[s]!=="`"){s+=1;continue}let a=W4(e,s);a-s===i&&(t.fill(dt.CODE_SPAN,n,a),n=-1),s=a}return n>=0?(t.fill(dt.CODE_SPAN_OPEN,n,r),{start:n,runLength:i}):null},lX=e=>{let t=new Uint8Array(e.length),r=iX(e,t),n=oX(e,t);return{text:e,regions:t,openFence:r,openSpan:n,mathMask:null,linkUrlMask:null,htmlTagMask:null}},Qf=null,Uu=null,Qr=e=>{if(Uu!==null&&e===Qf)return Uu;let t=lX(e);return Qf=e,Uu=t,t},uX=()=>{Qf=null,Uu=null},cX=(e,t)=>t>=e.regions.length?e.openFence!==null||e.openSpan!==null:t<0?!1:e.regions[t]!==dt.PROSE,dX=(e,t)=>e.regions[t]===dt.CODE_SPAN,f1=(e,t)=>{let r=Qr(e),n=t+t,i=0;for(let s=e.indexOf(n);s!==-1;s=e.indexOf(n,s))r.regions[s]===dt.PROSE?(i+=1,s+=2):s+=1;return i},m1=new Uint8Array(0),hX=e=>e==="inlineLatex"||e==="blockLatex",fX=(e,t)=>t==="["&&e==="none"?"blockLatex":t==="]"&&e==="blockLatex"?"none":t==="("&&e==="none"?"inlineLatex":t===")"&&e==="inlineLatex"?"none":null,mX=(e,t)=>t?e==="blockDollar"?"none":"blockDollar":e==="blockDollar"?e:e==="inlineDollar"?"none":"inlineDollar",pX=e=>e.includes("$")||e.includes("\\(")||e.includes("\\["),gX=(e,t,r)=>{let n=e[t+1];if(e[t]==="\\"){if(n==="$")return{context:r,length:2};let i=fX(r,n);return i===null?null:{context:i,length:2}}if(e[t]==="$"&&!hX(r)){let i=n==="$";return{context:mX(r,i),length:i?2:1}}return null},bX=e=>{let{text:t,regions:r}=e,n=t.length,i=new Uint8Array(n),s="none",a=0;for(;a<n;){i[a]=s==="none"?0:1;let o=r[a]===dt.PROSE?gX(t,a,s):null;if(o===null){a+=1;continue}s=o.context,o.length===2&&(i[a+1]=s==="none"?0:1),a+=o.length}return i},to=(e,t)=>t<0||t>=e.text.length?!1:(e.mathMask===null&&(e.mathMask=pX(e.text)?bX(e):m1),e.mathMask[t]===1),yX=(e,t,r,n)=>{let{text:i,regions:s}=e,a=new Uint8Array(r-t),o=0;for(let u=r-1;u>=t;u-=1)i[u]===")"&&s[u]===dt.PROSE&&(o=1),a[u-t]=o;let l=!1;for(let u=t;u<r;u+=1)l&&a[u-t]===1&&(n[u]=1),s[u]===dt.PROSE&&(i[u]===")"?l=!1:i[u]==="("&&(l=u>0&&i[u-1]==="]"))},vX=e=>{let{text:t}=e,r=t.length,n=new Uint8Array(r),i=0;for(;i<r;){let s=t.indexOf(`
655
- `,i);s===-1&&(s=r),yX(e,i,s,n),i=s+1}return n},p1=(e,t)=>t<0||t>=e.text.length?!1:(e.linkUrlMask===null&&(e.linkUrlMask=e.text.includes("](")?vX(e):m1),e.linkUrlMask[t]===1),xX=e=>{let{text:t,regions:r}=e,n=t.length,i=new Uint8Array(n),s=!1;for(let a=0;a<n;a+=1){if(t[a]===`
656
- `){s=!1;continue}if(i[a]=s?1:0,r[a]===dt.PROSE){if(t[a]===">")s=!1;else if(t[a]==="<"){let o=t[a+1];s=o!==void 0&&(o>="a"&&o<="z"||o>="A"&&o<="Z"||o==="/")}}}return i},H7=(e,t)=>t<0||t>=e.text.length?!1:(e.htmlTagMask===null&&(e.htmlTagMask=e.text.includes("<")?xX(e):m1),e.htmlTagMask[t]===1),pr=(e,t)=>cX(Qr(e),t),ji=(e,t)=>dX(Qr(e),t),EX=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,_X=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(EX,(t,r,n,i)=>pr(e,i)?t:`${r}\\>${n}`),Ui=(e,{delimiter:t,markerLength:r,regex:n})=>{let i=e.lastIndexOf(t,e.length-2),s=i===-1?e.length-1:i;return e.slice(Math.max(0,s-r+1)).match(n)},TX={delimiter:"*",markerLength:2,regex:/(\*\*)([^*]*\*?)$/},wX={delimiter:"_",markerLength:2,regex:/(__)([^_]*?)$/},kX={delimiter:"*",markerLength:3,regex:/(\*\*\*)([^*]*?)$/},SX={delimiter:"*",markerLength:1,regex:/(\*)([^*]*?)$/},AX={delimiter:"_",markerLength:1,regex:/(_)([^_]*?)$/},CX={delimiter:"~",markerLength:2,regex:/(~~)([^~]*?)$/},IX={delimiter:"_",markerLength:2,regex:/(__)([^_]+)_$/},NX={delimiter:"~",markerLength:2,regex:/(~~)([^~]+)~$/},Hs=/^[\s_~*`]*$/,V7=/^[\s]*[-*+][\s]+$/,RX=/[\p{L}\p{N}_]/u,PX=/^\*{4,}$/,fn=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:RX.test(e)},OX=(e,t)=>{let r=1;for(let n=t-1;n>=0;n-=1)if(e[n]==="]")r+=1;else if(e[n]==="["&&(r-=1,r===0))return n;return-1},q7=(e,t)=>{let r=1;for(let n=t+1;n<e.length;n+=1)if(e[n]==="[")r+=1;else if(e[n]==="]"&&(r-=1,r===0))return n;return-1},LX=(e,t)=>to(Qr(e),t),U0=(e,t,r)=>{let n=0;for(let l=t-1;l>=0;l-=1)if(e[l]===`
657
- `){n=l+1;break}let i=e.length;for(let l=t;l<e.length;l+=1)if(e[l]===`
658
- `){i=l;break}let s=e.substring(n,i),a=0,o=!1;for(let l of s)if(l===r)a+=1;else if(l!==" "&&l!==" "){o=!0;break}return a>=3&&!o},DX=(e,t,r,n)=>r==="\\"||to(e,t)?!0:r!=="*"&&n==="*"?(t<e.text.length-2?e.text[t+2]:"")!=="*":r==="*"||(!r||r===" "||r===" "||r===`
659
- `)&&(!n||n===" "||n===" "||n===`
660
- `),Lc=e=>e===" "||e===" "||e===`
661
- `,MX=(e,t)=>!!(e&&t&&fn(e)&&fn(t)),BX=(e,t,r,n)=>{let i=MX(e,t),s=!!t&&!Lc(t),a=!!e&&!Lc(e);return i&&r%2===0&&!n?{count:!1}:a&&r%2===1||s?{count:!0,inWordAsteriskChain:i}:{count:!1}},G7=e=>{let t=Qr(e),r=0,n=!1,i=e.length;for(let s=0;s<i;s+=1){if(e[s]!=="*"||t.regions[s]!==dt.PROSE){fn(e[s])||(n=!1);continue}let a=s>0?e[s-1]:"",o=s<i-1?e[s+1]:"";if(DX(t,s,a,o))continue;let l=BX(a,o,r,n);l.count&&(r+=1,n=l.inWordAsteriskChain)}return r},FX=(e,t,r,n)=>!!(r==="\\"||to(e,t)||p1(e,t)||H7(e,t)||r==="_"||n==="_"||r&&n&&fn(r)&&fn(n)),zX=e=>{let t=Qr(e),r=0,n=e.length;for(let i=0;i<n;i+=1){if(e[i]!=="_"||t.regions[i]!==dt.PROSE)continue;let s=i>0?e[i-1]:"",a=i<n-1?e[i+1]:"";FX(t,i,s,a)||(r+=1)}return r},$X=e=>{let t=Qr(e),r=0,n=0;for(let i=0;i<e.length;i+=1)e[i]==="*"&&t.regions[i]===dt.PROSE?n+=1:(n>=3&&(r+=Math.floor(n/3)),n=0);return n>=3&&(r+=Math.floor(n/3)),r},g1=e=>f1(e,"*"),Z4=e=>e===""||e===" "||e===" "||e===`
662
- `,jX=(e,t,r,n,i)=>{if(!(Z4(r)&&Z4(n)))return!1;if(t>i.lineEnd){let s=e.indexOf(`
663
- `,t);i.lineEnd=s===-1?e.length:s,i.result=U0(e,t,"_")}return i.result},UX=(e,t,r,n)=>{let i=e.text,s=t,a=!1;s>0&&i[s-1]==="\\"&&(s+=1,a=!0);let o=r-s;if(o<2)return!1;let l=s>0?i[s-1]:"",u=a?"\\":l,c=r<i.length?i[r]:"";return fn(u)&&fn(c)||jX(i,s,u,c,n)||to(e,s)||p1(e,s)||H7(e,s)?!1:Math.floor(o/2)%2===1},Y4=e=>{let t=Qr(e),r=e.length,n={lineEnd:-1,result:!1},i=!1,s=0;for(;s<r;){if(e[s]!=="_"||t.regions[s]!==dt.PROSE){s+=1;continue}let a=s,o=s+1;for(;o<r&&e[o]==="_"&&t.regions[o]===dt.PROSE;)o+=1;s=o,UX(t,a,o,n)&&(i=!i)}return i},HX=(e,t,r)=>{if(!t||Hs.test(t))return!0;let n=e.substring(0,r).lastIndexOf(`
664
- `),i=n===-1?0:n+1,s=e.substring(i,r);return V7.test(s)&&t.includes(`
665
- `)?!0:U0(e,r,"*")},VX=e=>{let t=Ui(e,TX);if(!t)return e;let r=t[2],n=e.lastIndexOf(t[1]);return pr(e,n)||ji(e,n)||HX(e,r,n)?e:g1(e)%2===1?r.endsWith("*")?`${e}*`:`${e}**`:e},qX=(e,t,r)=>{if(!t||Hs.test(t))return!0;let n=e.substring(0,r).lastIndexOf(`
666
- `),i=n===-1?0:n+1,s=e.substring(i,r);return V7.test(s)&&t.includes(`
667
- `)?!0:U0(e,r,"_")},GX=e=>{let t=Ui(e,wX);if(!t){let i=Ui(e,IX);if(i){let s=e.lastIndexOf(i[1]);if(!(pr(e,s)||ji(e,s))&&Y4(e))return`${e}_`}return e}let r=t[2],n=e.lastIndexOf(t[1]);return pr(e,n)||ji(e,n)||qX(e,r,n)?e:Y4(e)?`${e}__`:e},WX=(e,t)=>{let{text:r}=e;return r[t]==="*"&&e.regions[t]===dt.PROSE&&r[t-1]!=="*"&&r[t+1]!=="*"&&r[t-1]!=="\\"&&!to(e,t)},ZX=e=>{let t=Qr(e);for(let r=e.indexOf("*");r!==-1;r=e.indexOf("*",r+1)){if(!WX(t,r))continue;let n=r>0?e[r-1]:"",i=r<e.length-1?e[r+1]:"",s=!n||Lc(n),a=!i||Lc(i);if(!(s&&a)&&!(n&&i&&fn(n)&&fn(i))&&!a)return r}return-1},YX=e=>{if(!Ui(e,SX))return e;let t=ZX(e);if(t===-1||pr(e,t)||ji(e,t))return e;let r=e.substring(t+1);return!r||Hs.test(r)?e:G7(e)%2===1?`${e}*`:e},W7=e=>{let t=Qr(e);for(let r=e.indexOf("_");r!==-1;r=e.indexOf("_",r+1))if(t.regions[r]===dt.PROSE&&e[r-1]!=="_"&&e[r+1]!=="_"&&e[r-1]!=="\\"&&!to(t,r)&&!p1(t,r)){let n=r>0?e[r-1]:"",i=r<e.length-1?e[r+1]:"";if(n&&i&&fn(n)&&fn(i))continue;return r}return-1},KX=e=>{let t=e.length;for(;t>0&&e[t-1]===`
668
- `;)t-=1;if(t<e.length){let r=e.slice(0,t),n=e.slice(t);return`${r}_${n}`}return`${e}_`},XX=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(g1(t)%2!==1)return null;let r=t.indexOf("**"),n=W7(t);return r!==-1&&n!==-1&&r<n?`${t}_**`:null},QX=e=>{if(!Ui(e,AX))return e;let t=W7(e);if(t===-1)return e;let r=e.substring(t+1);if(!r||Hs.test(r)||pr(e,t)||ji(e,t))return e;if(zX(e)%2===1){let n=XX(e);return n!==null?n:KX(e)}return e},JX=e=>{let t=g1(e),r=G7(e);return t%2===0&&r%2===0},eQ=(e,t,r)=>!t||Hs.test(t)||pr(e,r)||ji(e,r)?!0:U0(e,r,"*"),tQ=e=>{if(PX.test(e))return e;let t=Ui(e,kX);if(!t)return e;let r=t[2],n=e.lastIndexOf(t[1]);return eQ(e,r,n)?e:$X(e)%2===1?JX(e)?e:`${e}***`:e},rQ=/<[a-zA-Z/][^>]*$/,nQ=/[a-zA-Z/]/,iQ=e=>e.includes("$")||e.includes("\\(")||e.includes("\\["),sQ=(e,t)=>{let r=e[t+1];return r!==void 0&&nQ.test(r)},aQ=e=>{let t=e.match(rQ);if(!t||t.index===void 0)return e;let r=iQ(e);for(let n=t.index;n<e.length;n+=1)if(!(e[n]!=="<"||!sQ(e,n))&&!pr(e,n)&&!(r&&LX(e,n)))return e.substring(0,n).trimEnd();return e},oQ=e=>{let t=Qr(e);if(t.openFence)return e;let r=t.openSpan;if(!r)return e;let n=e.slice(r.start+r.runLength);if(!n||Hs.test(n))return e;let i=0,s=e.length-1;for(;s>=0&&e[s]==="`";)i+=1,s-=1;return i>=r.runLength?e:e+"`".repeat(r.runLength-i)},lQ=e=>f1(e,"$"),uQ=e=>{let t=Qr(e),r=0;for(let n=0;n<e.length;n+=1){if(e[n]==="\\"){n+=1;continue}t.regions[n]===dt.PROSE&&e[n]==="$"&&(n+1<e.length&&e[n+1]==="$"?n+=1:r+=1)}return r},cQ=e=>{if(e.endsWith("$")&&!e.endsWith("$$"))return`${e}$`;let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
669
- `,t)!==-1&&!e.endsWith(`
670
- `)?`${e}
671
- $$`:`${e}$$`},dQ=e=>lQ(e)%2===0?e:cQ(e),hQ=e=>uQ(e)%2===1?`${e}$`:e,dl="streamdown:incomplete-image",fQ=(e,t,r)=>{if(e.substring(t+2).includes(")"))return null;let n=OX(e,t);if(n===-1||pr(e,n))return null;let i=n>0&&e[n-1]==="!",s=i?n-1:n,a=e.substring(0,s),o=e.substring(n+1,t);return i?`${a}![${o}](${dl})`:r==="text-only"?`${a}${o}`:`${a}[${o}](streamdown:incomplete-link)`},K4=(e,t)=>{for(let r=0;r<t;r++)if(e[r]==="["&&!pr(e,r)){if(r>0&&e[r-1]==="!")continue;let n=q7(e,r);if(n===-1)return r;if(n+1<e.length&&e[n+1]==="("){let i=e.indexOf(")",n+2);i!==-1&&(r=i)}}return t},mQ=(e,t,r)=>{let n=t>0&&e[t-1]==="!",i=n?t-1:t;if(!e.substring(t+1).includes("]")){let s=e.substring(0,i);if(n){let a=e.substring(t+1);return`${s}![${a}](${dl})`}if(r==="text-only"){let a=K4(e,t);return e.substring(0,a)+e.substring(a+1)}return`${e}](streamdown:incomplete-link)`}if(q7(e,t)===-1){let s=e.substring(0,i);if(n){let a=e.substring(t+1);return`${s}![${a}](${dl})`}if(r==="text-only"){let a=K4(e,t);return e.substring(0,a)+e.substring(a+1)}return`${e}](streamdown:incomplete-link)`}return null},pQ=(e,t)=>{let r=e.lastIndexOf("](");if(r!==-1&&!pr(e,r)){let n=fQ(e,r,t);if(n!==null)return n}for(let n=e.lastIndexOf("[");n!==-1;n=n===0?-1:e.lastIndexOf("[",n-1))if(!pr(e,n)){let i=mQ(e,n,t);if(i!==null)return i}return e},gQ=32,Z7=(e,t="protocol")=>{let r=e;for(let n=0;n<gQ;n+=1){let i=pQ(r,t);if(i.length>=r.length)return i;r=i}return r},bQ=/^-{1,2}$/,yQ=/^[\s]*-{1,2}[\s]+$/,vQ=/^={1,2}$/,xQ=/^[\s]*={1,2}[\s]+$/,EQ=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
672
- `);if(t===-1)return e;let r=e.substring(t+1),n=e.substring(0,t),i=r.trim();if(bQ.test(i)&&!r.match(yQ)){let s=n.split(`
673
- `).at(-1);if(s&&s.trim().length>0)return`${e}​`}if(vQ.test(i)&&!r.match(xQ)){let s=n.split(`
674
- `).at(-1);if(s&&s.trim().length>0)return`${e}​`}return e},_Q=/([\p{L}\p{N}_])~(?!~)(?=[\p{L}\p{N}_])/gu,TQ=e=>!e||typeof e!="string"||!e.includes("~")?e:e.replace(_Q,(t,r,n)=>{let i=n+r.length;return pr(e,i)?t:`${r}\\~`}),X4=e=>f1(e,"~"),wQ=e=>{let t=Ui(e,CX);if(t){let r=t[2];if(!r||Hs.test(r))return e;let n=e.lastIndexOf(t[1]);if(pr(e,n)||ji(e,n))return e;if(X4(e)%2===1)return`${e}~~`}else{let r=Ui(e,NX);if(r){let n=e.lastIndexOf(r[0].slice(0,2));if(pr(e,n)||ji(e,n))return e;if(X4(e)%2===1)return`${e}~`}}return e},eh=e=>e!==!1,kQ=e=>e===!0,cr={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},SQ=[{handler:{name:"singleTilde",handle:TQ,priority:cr.SINGLE_TILDE},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:_X,priority:cr.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:aQ,priority:cr.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:EQ,priority:cr.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:Z7,priority:cr.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")||e.endsWith(`](${dl})`)},{handler:{name:"boldItalic",handle:tQ,priority:cr.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:VX,priority:cr.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:GX,priority:cr.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:YX,priority:cr.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:QX,priority:cr.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:oQ,priority:cr.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:wQ,priority:cr.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:dQ,priority:cr.KATEX},optionKey:"katex"},{handler:{name:"inlineKatex",handle:hQ,priority:cr.INLINE_KATEX},optionKey:"inlineKatex"}],AQ=e=>{var t;let r=(t=e==null?void 0:e.linkMode)!=null?t:"protocol";return SQ.filter(({handler:n,optionKey:i})=>n.name==="links"?eh(e==null?void 0:e.links)||eh(e==null?void 0:e.images):n.name==="inlineKatex"?kQ(e==null?void 0:e.inlineKatex):eh(e==null?void 0:e[i])).map(({handler:n,earlyReturn:i})=>n.name==="links"?{handler:U7(j7({},n),{handle:s=>Z7(s,r)}),earlyReturn:r==="protocol"?i:void 0}:{handler:n,earlyReturn:i})},CQ=(e,t)=>{var r;if(!e||typeof e!="string")return e;let n=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=AQ(t),s=((r=t==null?void 0:t.handlers)!=null?r:[]).map(o=>{var l;return{handler:U7(j7({},o),{priority:(l=o.priority)!=null?l:cr.DEFAULT}),earlyReturn:void 0}}),a=[...i,...s].sort((o,l)=>{var u,c;return((u=o.handler.priority)!=null?u:0)-((c=l.handler.priority)!=null?c:0)});try{for(let{handler:o,earlyReturn:l}of a)if(n=o.handle(n),l!=null&&l(n))return n;return n.endsWith(" ")&&!n.endsWith(" ")?n.slice(0,-1):n}finally{uX()}},IQ=CQ;const NQ=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,RQ=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,PQ={};function Q4(e,t){return(PQ.jsx?RQ:NQ).test(e)}var ea={},th,J4;function OQ(){if(J4)return th;J4=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,n=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,o=/^\s+|\s+$/g,l=`
675
- `,u="/",c="*",d="",h="comment",f="declaration";function m(y,E){if(typeof y!="string")throw new TypeError("First argument must be a string");if(!y)return[];E=E||{};var w=1,x=1;function _(J){var Y=J.match(t);Y&&(w+=Y.length);var de=J.lastIndexOf(l);x=~de?J.length-de:x+J.length}function A(){var J={line:w,column:x};return function(Y){return Y.position=new S(J),U(),Y}}function S(J){this.start=J,this.end={line:w,column:x},this.source=E.source}S.prototype.content=y;function I(J){var Y=new Error(E.source+":"+w+":"+x+": "+J);if(Y.reason=J,Y.filename=E.source,Y.line=w,Y.column=x,Y.source=y,!E.silent)throw Y}function N(J){var Y=J.exec(y);if(Y){var de=Y[0];return _(de),y=y.slice(de.length),Y}}function U(){N(r)}function z(J){var Y;for(J=J||[];Y=Z();)Y!==!1&&J.push(Y);return J}function Z(){var J=A();if(!(u!=y.charAt(0)||c!=y.charAt(1))){for(var Y=2;d!=y.charAt(Y)&&(c!=y.charAt(Y)||u!=y.charAt(Y+1));)++Y;if(Y+=2,d===y.charAt(Y-1))return I("End of comment missing");var de=y.slice(2,Y-2);return x+=2,_(de),y=y.slice(Y),x+=2,J({type:h,comment:de})}}function V(){var J=A(),Y=N(n);if(Y){if(Z(),!N(i))return I("property missing ':'");var de=N(s),xe=J({type:f,property:b(Y[0].replace(e,d)),value:de?b(de[0].replace(e,d)):d});return N(a),xe}}function ae(){var J=[];z(J);for(var Y;Y=V();)Y!==!1&&(J.push(Y),z(J));return J}return U(),ae()}function b(y){return y?y.replace(o,d):d}return th=m,th}var ey;function LQ(){if(ey)return ea;ey=1;var e=ea&&ea.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ea,"__esModule",{value:!0}),ea.default=r;const t=e(OQ());function r(n,i){let s=null;if(!n||typeof n!="string")return s;const a=(0,t.default)(n),o=typeof i=="function";return a.forEach(l=>{if(l.type!=="declaration")return;const{property:u,value:c}=l;o?i(u,c,l):c&&(s=s||{},s[u]=c)}),s}return ea}var vo={},ty;function DQ(){if(ty)return vo;ty=1,Object.defineProperty(vo,"__esModule",{value:!0}),vo.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,r=/^[^-]+$/,n=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(u){return!u||r.test(u)||e.test(u)},a=function(u,c){return c.toUpperCase()},o=function(u,c){return"".concat(c,"-")},l=function(u,c){return c===void 0&&(c={}),s(u)?u:(u=u.toLowerCase(),c.reactCompat?u=u.replace(i,o):u=u.replace(n,o),u.replace(t,a))};return vo.camelCase=l,vo}var xo,ry;function MQ(){if(ry)return xo;ry=1;var e=xo&&xo.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(LQ()),r=DQ();function n(i,s){var a={};return!i||typeof i!="string"||(0,t.default)(i,function(o,l){o&&l&&(a[(0,r.camelCase)(o,s)]=l)}),a}return n.default=n,xo=n,xo}var BQ=MQ();const FQ=Gm(BQ);function Vo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ny(e.position):"start"in e||"end"in e?ny(e):"line"in e||"column"in e?Jf(e):""}function Jf(e){return iy(e&&e.line)+":"+iy(e&&e.column)}function ny(e){return Jf(e&&e.start)+"-"+Jf(e&&e.end)}function iy(e){return e&&typeof e=="number"?e:1}class ar extends Error{constructor(t,r,n){super(),typeof r=="string"&&(n=r,r=void 0);let i="",s={},a=!1;if(r&&("line"in r&&"column"in r?s={place:r}:"start"in r&&"end"in r?s={place:r}:"type"in r?s={ancestors:[r],place:r.position}:s={...r}),typeof t=="string"?i=t:!s.cause&&t&&(a=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof n=="string"){const l=n.indexOf(":");l===-1?s.ruleId=n:(s.source=n.slice(0,l),s.ruleId=n.slice(l+1))}if(!s.place&&s.ancestors&&s.ancestors){const l=s.ancestors[s.ancestors.length-1];l&&(s.place=l.position)}const o=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=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=o?o.line:void 0,this.name=Vo(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}}ar.prototype.file="";ar.prototype.name="";ar.prototype.reason="";ar.prototype.message="";ar.prototype.stack="";ar.prototype.column=void 0;ar.prototype.line=void 0;ar.prototype.ancestors=void 0;ar.prototype.cause=void 0;ar.prototype.fatal=void 0;ar.prototype.place=void 0;ar.prototype.ruleId=void 0;ar.prototype.source=void 0;const b1={}.hasOwnProperty,zQ=new Map,$Q=/[A-Z]/g,jQ=new Set(["table","tbody","thead","tfoot","tr"]),UQ=new Set(["td","th"]),Y7="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function HQ(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let n;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=XQ(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=KQ(r,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:n,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?On:Va,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=K7(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function K7(e,t,r){if(t.type==="element")return VQ(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return qQ(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return WQ(e,t,r);if(t.type==="mdxjsEsm")return GQ(e,t);if(t.type==="root")return ZQ(e,t,r);if(t.type==="text")return YQ(e,t)}function VQ(e,t,r){const n=e.schema;let i=n;t.tagName.toLowerCase()==="svg"&&n.space==="html"&&(i=On,e.schema=i),e.ancestors.push(t);const s=Q7(e,t.tagName,!1),a=QQ(e,t);let o=v1(e,t);return jQ.has(t.tagName)&&(o=o.filter(function(l){return typeof l=="string"?!g0(l):!0})),X7(e,a,s,t),y1(a,o),e.ancestors.pop(),e.schema=n,e.create(t,s,a,r)}function qQ(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}hl(e,t.position)}function GQ(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);hl(e,t.position)}function WQ(e,t,r){const n=e.schema;let i=n;t.name==="svg"&&n.space==="html"&&(i=On,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:Q7(e,t.name,!0),a=JQ(e,t),o=v1(e,t);return X7(e,a,s,t),y1(a,o),e.ancestors.pop(),e.schema=n,e.create(t,s,a,r)}function ZQ(e,t,r){const n={};return y1(n,v1(e,t)),e.create(t,e.Fragment,n,r)}function YQ(e,t){return t.value}function X7(e,t,r,n){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=n)}function y1(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function KQ(e,t,r){return n;function n(i,s,a,o){const u=Array.isArray(a.children)?r:t;return o?u(s,a,o):u(s,a)}}function XQ(e,t){return r;function r(n,i,s,a){const o=Array.isArray(s.children),l=Bn(n);return t(i,s,a,o,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function QQ(e,t){const r={};let n,i;for(i in t.properties)if(i!=="children"&&b1.call(t.properties,i)){const s=eJ(e,i,t.properties[i]);if(s){const[a,o]=s;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&UQ.has(t.tagName)?n=o:r[a]=o}}if(n){const s=r.style||(r.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return r}function JQ(e,t){const r={};for(const n of t.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&e.evaluater){const s=n.data.estree.body[0];s.type;const a=s.expression;a.type;const o=a.properties[0];o.type,Object.assign(r,e.evaluater.evaluateExpression(o.argument))}else hl(e,t.position);else{const i=n.name;let s;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&e.evaluater){const o=n.value.data.estree.body[0];o.type,s=e.evaluater.evaluateExpression(o.expression)}else hl(e,t.position);else s=n.value===null?!0:n.value;r[i]=s}return r}function v1(e,t){const r=[];let n=-1;const i=e.passKeys?new Map:zQ;for(;++n<t.children.length;){const s=t.children[n];let a;if(e.passKeys){const l=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(l){const u=i.get(l)||0;a=l+"-"+u,i.set(l,u+1)}}const o=K7(e,s,a);o!==void 0&&r.push(o)}return r}function eJ(e,t,r){const n=Il(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=n.commaSeparated?Sp(r):Ap(r)),n.property==="style"){let i=typeof r=="object"?r:tJ(e,String(r));return e.stylePropertyNameCase==="css"&&(i=rJ(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&n.space?dB[n.property]||n.property:n.attribute,r]}}function tJ(e,t){try{return FQ(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const n=r,i=new ar("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Y7+"#cannot-parse-style-attribute",i}}function Q7(e,t,r){let n;if(!r)n={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,a;for(;++s<i.length;){const o=Q4(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};a=a?{type:"MemberExpression",object:a,property:o,computed:!!(s&&o.type==="Literal"),optional:!1}:o}n=a}else n=Q4(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(n.type==="Literal"){const i=n.value;return b1.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(n);hl(e)}function hl(e,t){const r=new ar("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=Y7+"#cannot-handle-mdx-estrees-without-createevaluater",r}function rJ(e){const t={};let r;for(r in e)b1.call(e,r)&&(t[nJ(r)]=e[r]);return t}function nJ(e){let t=e.replace($Q,iJ);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function iJ(e){return"-"+e.toLowerCase()}const rh={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"]},sJ={tokenize:aJ};function aJ(e){const t=e.attempt(this.parser.constructs.contentInitial,n,i);let r;return t;function n(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Ge(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),s(o)}function s(o){const l=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=l),r=l,a(o)}function a(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return we(o)?(e.consume(o),e.exit("chunkText"),s):(e.consume(o),a)}}const oJ={tokenize:lJ},sy={tokenize:uJ};function lJ(e){const t=this,r=[];let n=0,i,s,a;return o;function o(x){if(n<r.length){const _=r[n];return t.containerState=_[1],e.attempt(_[0].continuation,l,u)(x)}return u(x)}function l(x){if(n++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&w();const _=t.events.length;let A=_,S;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){S=t.events[A][1].end;break}E(n);let I=_;for(;I<t.events.length;)t.events[I][1].end={...S},I++;return Ir(t.events,A+1,0,t.events.slice(_)),t.events.length=I,u(x)}return o(x)}function u(x){if(n===r.length){if(!i)return h(x);if(i.currentConstruct&&i.currentConstruct.concrete)return m(x);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(sy,c,d)(x)}function c(x){return i&&w(),E(n),h(x)}function d(x){return t.parser.lazy[t.now().line]=n!==r.length,a=t.now().offset,m(x)}function h(x){return t.containerState={},e.attempt(sy,f,m)(x)}function f(x){return n++,r.push([t.currentConstruct,t.containerState]),h(x)}function m(x){if(x===null){i&&w(),E(0),e.consume(x);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),b(x)}function b(x){if(x===null){y(e.exit("chunkFlow"),!0),E(0),e.consume(x);return}return we(x)?(e.consume(x),y(e.exit("chunkFlow")),n=0,t.interrupt=void 0,o):(e.consume(x),b)}function y(x,_){const A=t.sliceStream(x);if(_&&A.push(null),x.previous=s,s&&(s.next=x),s=x,i.defineSkip(x.start),i.write(A),t.parser.lazy[x.start.line]){let S=i.events.length;for(;S--;)if(i.events[S][1].start.offset<a&&(!i.events[S][1].end||i.events[S][1].end.offset>a))return;const I=t.events.length;let N=I,U,z;for(;N--;)if(t.events[N][0]==="exit"&&t.events[N][1].type==="chunkFlow"){if(U){z=t.events[N][1].end;break}U=!0}for(E(n),S=I;S<t.events.length;)t.events[S][1].end={...z},S++;Ir(t.events,N+1,0,t.events.slice(I)),t.events.length=S}}function E(x){let _=r.length;for(;_-- >x;){const A=r[_];t.containerState=A[1],A[0].exit.call(t,e)}r.length=x}function w(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function uJ(e,t,r){return Ge(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const cJ={tokenize:dJ};function dJ(e){const t=this,r=e.attempt(Fl,n,e.attempt(this.parser.constructs.flowInitial,i,Ge(e,e.attempt(this.parser.constructs.flow,i,e.attempt(AY,i)),"linePrefix")));return r;function n(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const hJ={resolveAll:e8()},fJ=J7("string"),mJ=J7("text");function J7(e){return{resolveAll:e8(e==="text"?pJ:void 0),tokenize:t};function t(r){const n=this,i=this.parser.constructs[e],s=r.attempt(i,a,o);return a;function a(c){return u(c)?s(c):o(c)}function o(c){if(c===null){r.consume(c);return}return r.enter("data"),r.consume(c),l}function l(c){return u(c)?(r.exit("data"),s(c)):(r.consume(c),l)}function u(c){if(c===null)return!0;const d=i[c];let h=-1;if(d)for(;++h<d.length;){const f=d[h];if(!f.previous||f.previous.call(n,n.previous))return!0}return!1}}}function e8(e){return t;function t(r,n){let i=-1,s;for(;++i<=r.length;)s===void 0?r[i]&&r[i][1].type==="data"&&(s=i,i++):(!r[i]||r[i][1].type!=="data")&&(i!==s+2&&(r[s][1].end=r[i-1][1].end,r.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(r,n):r}}function pJ(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const n=e[r-1][1],i=t.sliceStream(n);let s=i.length,a=-1,o=0,l;for(;s--;){const u=i[s];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)o++,a--;if(a)break;a=-1}else if(u===-2)l=!0,o++;else if(u!==-1){s++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(o=0),o){const u={type:r===e.length||l||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:n.start._bufferIndex+a,_index:n.start._index+s,line:n.end.line,column:n.end.column-o,offset:n.end.offset-o},end:{...n.end}};n.end={...u.start},n.start.offset===n.end.offset?Object.assign(n,u):(e.splice(r,0,["enter",u,t],["exit",u,t]),r+=2)}r++}return e}const gJ={42:yr,43:yr,45:yr,48:yr,49:yr,50:yr,51:yr,52:yr,53:yr,54:yr,55:yr,56:yr,57:yr,62:L7},bJ={91:PY},yJ={[-2]:Qd,[-1]:Qd,32:Qd},vJ={35:FY,42:ju,45:[H4,ju],60:UY,61:H4,95:ju,96:j4,126:j4},xJ={38:M7,92:D7},EJ={[-5]:Jd,[-4]:Jd,[-3]:Jd,33:aK,38:M7,42:Xf,60:[lY,YY],91:lK,92:[MY,D7],93:h1,95:Xf,96:EY},_J={null:[Xf,hJ]},TJ={null:[42,95]},wJ={null:[]},kJ=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:TJ,contentInitial:bJ,disable:wJ,document:gJ,flow:vJ,flowInitial:yJ,insideSpan:_J,string:xJ,text:EJ},Symbol.toStringTag,{value:"Module"}));function SJ(e,t,r){let n={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const i={},s=[];let a=[],o=[];const l={attempt:I(A),check:I(S),consume:w,enter:x,exit:_,interrupt:I(S,{interrupt:!0})},u={code:null,containerState:{},defineSkip:b,events:[],now:m,parser:e,previous:null,sliceSerialize:h,sliceStream:f,write:d};let c=t.tokenize.call(u,l);return t.resolveAll&&s.push(t),u;function d(Z){return a=Fr(a,Z),y(),a[a.length-1]!==null?[]:(N(t,0),u.events=j0(s,u.events,u),u.events)}function h(Z,V){return CJ(f(Z),V)}function f(Z){return AJ(a,Z)}function m(){const{_bufferIndex:Z,_index:V,line:ae,column:J,offset:Y}=n;return{_bufferIndex:Z,_index:V,line:ae,column:J,offset:Y}}function b(Z){i[Z.line]=Z.column,z()}function y(){let Z;for(;n._index<a.length;){const V=a[n._index];if(typeof V=="string")for(Z=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===Z&&n._bufferIndex<V.length;)E(V.charCodeAt(n._bufferIndex));else E(V)}}function E(Z){c=c(Z)}function w(Z){we(Z)?(n.line++,n.column=1,n.offset+=Z===-3?2:1,z()):Z!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===a[n._index].length&&(n._bufferIndex=-1,n._index++)),u.previous=Z}function x(Z,V){const ae=V||{};return ae.type=Z,ae.start=m(),u.events.push(["enter",ae,u]),o.push(ae),ae}function _(Z){const V=o.pop();return V.end=m(),u.events.push(["exit",V,u]),V}function A(Z,V){N(Z,V.from)}function S(Z,V){V.restore()}function I(Z,V){return ae;function ae(J,Y,de){let xe,Ue,He,L;return Array.isArray(J)?Q(J):"tokenize"in J?Q([J]):Re(J);function Re(fe){return Ae;function Ae(ze){const re=ze!==null&&fe[ze],Le=ze!==null&&fe.null,et=[...Array.isArray(re)?re:re?[re]:[],...Array.isArray(Le)?Le:Le?[Le]:[]];return Q(et)(ze)}}function Q(fe){return xe=fe,Ue=0,fe.length===0?de:M(fe[Ue])}function M(fe){return Ae;function Ae(ze){return L=U(),He=fe,fe.partial||(u.currentConstruct=fe),fe.name&&u.parser.constructs.disable.null.includes(fe.name)?oe():fe.tokenize.call(V?Object.assign(Object.create(u),V):u,l,pe,oe)(ze)}}function pe(fe){return Z(He,L),Y}function oe(fe){return L.restore(),++Ue<xe.length?M(xe[Ue]):de}}}function N(Z,V){Z.resolveAll&&!s.includes(Z)&&s.push(Z),Z.resolve&&Ir(u.events,V,u.events.length-V,Z.resolve(u.events.slice(V),u)),Z.resolveTo&&(u.events=Z.resolveTo(u.events,u))}function U(){const Z=m(),V=u.previous,ae=u.currentConstruct,J=u.events.length,Y=Array.from(o);return{from:J,restore:de};function de(){n=Z,u.previous=V,u.currentConstruct=ae,u.events.length=J,o=Y,z()}}function z(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}function AJ(e,t){const r=t.start._index,n=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let a;if(r===i)a=[e[r].slice(n,s)];else{if(a=e.slice(r,i),n>-1){const o=a[0];typeof o=="string"?a[0]=o.slice(n):a.shift()}s>0&&a.push(e[i].slice(0,s))}return a}function CJ(e,t){let r=-1;const n=[];let i;for(;++r<e.length;){const s=e[r];let a;if(typeof s=="string")a=s;else switch(s){case-5:{a="\r";break}case-4:{a=`
676
- `;break}case-3:{a=`\r
677
- `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(s)}i=s===-2,n.push(a)}return n.join("")}function IJ(e){const n={constructs:k7([kJ,...(e||{}).extensions||[]]),content:i(sJ),defined:[],document:i(oJ),flow:i(cJ),lazy:{},string:i(fJ),text:i(mJ)};return n;function i(s){return a;function a(o){return SJ(n,s,o)}}}function NJ(e){for(;!B7(e););return e}const ay=/[\0\t\n\r]/g;function RJ(){let e=1,t="",r=!0,n;return i;function i(s,a,o){const l=[];let u,c,d,h,f;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),d=0,t="",r&&(s.charCodeAt(0)===65279&&d++,r=void 0);d<s.length;){if(ay.lastIndex=d,u=ay.exec(s),h=u&&u.index!==void 0?u.index:s.length,f=s.charCodeAt(h),!u){t=s.slice(d);break}if(f===10&&d===h&&n)l.push(-3),n=void 0;else switch(n&&(l.push(-5),n=void 0),d<h&&(l.push(s.slice(d,h)),e+=h-d),f){case 0:{l.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,l.push(-2);e++<c;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:n=!0,e=1}d=h+1}return o&&(n&&l.push(-5),t&&l.push(t),l.push(null)),l}}const t8={}.hasOwnProperty;function PJ(e,t,r){return t&&typeof t=="object"&&(r=t,t=void 0),OJ(r)(NJ(IJ(r).document().write(RJ()(e,t,!0))))}function OJ(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(_r),autolinkProtocol:U,autolinkEmail:U,atxHeading:s(Rt),blockQuote:s(Le),characterEscape:U,characterReference:U,codeFenced:s(et),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(et,a),codeText:s(Te,a),codeTextData:U,data:U,codeFlowValue:U,definition:s(Ke),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(ot),hardBreakEscape:s(bn),hardBreakTrailing:s(bn),htmlFlow:s(Jr,a),htmlFlowData:U,htmlText:s(Jr,a),htmlTextData:U,image:s($n),label:a,link:s(_r),listItem:s(ao),listItemValue:h,listOrdered:s(en,d),listUnordered:s(en),paragraph:s(oo),reference:M,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(Rt),strong:s(Qi),thematicBreak:s(Se)},exit:{atxHeading:l(),atxHeadingSequence:A,autolink:l(),autolinkEmail:re,autolinkProtocol:ze,blockQuote:l(),characterEscapeValue:z,characterReferenceMarkerHexadecimal:oe,characterReferenceMarkerNumeric:oe,characterReferenceValue:fe,characterReference:Ae,codeFenced:l(y),codeFencedFence:b,codeFencedFenceInfo:f,codeFencedFenceMeta:m,codeFlowValue:z,codeIndented:l(E),codeText:l(Y),codeTextData:z,data:z,definition:l(),definitionDestinationString:_,definitionLabelString:w,definitionTitleString:x,emphasis:l(),hardBreakEscape:l(V),hardBreakTrailing:l(V),htmlFlow:l(ae),htmlFlowData:z,htmlText:l(J),htmlTextData:z,image:l(xe),label:He,labelText:Ue,lineEnding:Z,link:l(de),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:pe,resourceDestinationString:L,resourceTitleString:Re,resource:Q,setextHeading:l(N),setextHeadingLineSequence:I,setextHeadingText:S,strong:l(),thematicBreak:l()}};r8(t,(e||{}).mdastExtensions||[]);const r={};return n;function n(W){let ne={type:"root",children:[]};const Ee={stack:[ne],tokenStack:[],config:t,enter:o,exit:u,buffer:a,resume:c,data:r},ke=[];let $e=-1;for(;++$e<W.length;)if(W[$e][1].type==="listOrdered"||W[$e][1].type==="listUnordered")if(W[$e][0]==="enter")ke.push($e);else{const jt=ke.pop();$e=i(W,jt,$e)}for($e=-1;++$e<W.length;){const jt=t[W[$e][0]];t8.call(jt,W[$e][1].type)&&jt[W[$e][1].type].call(Object.assign({sliceSerialize:W[$e][2].sliceSerialize},Ee),W[$e][1])}if(Ee.tokenStack.length>0){const jt=Ee.tokenStack[Ee.tokenStack.length-1];(jt[1]||oy).call(Ee,void 0,jt[0])}for(ne.position={start:gi(W.length>0?W[0][1].start:{line:1,column:1,offset:0}),end:gi(W.length>0?W[W.length-2][1].end:{line:1,column:1,offset:0})},$e=-1;++$e<t.transforms.length;)ne=t.transforms[$e](ne)||ne;return ne}function i(W,ne,Ee){let ke=ne-1,$e=-1,jt=!1,Ji,jn,lo,uo;for(;++ke<=Ee;){const Tr=W[ke];switch(Tr[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Tr[0]==="enter"?$e++:$e--,uo=void 0;break}case"lineEndingBlank":{Tr[0]==="enter"&&(Ji&&!uo&&!$e&&!lo&&(lo=ke),uo=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:uo=void 0}if(!$e&&Tr[0]==="enter"&&Tr[1].type==="listItemPrefix"||$e===-1&&Tr[0]==="exit"&&(Tr[1].type==="listUnordered"||Tr[1].type==="listOrdered")){if(Ji){let Gs=ke;for(jn=void 0;Gs--;){const Un=W[Gs];if(Un[1].type==="lineEnding"||Un[1].type==="lineEndingBlank"){if(Un[0]==="exit")continue;jn&&(W[jn][1].type="lineEndingBlank",jt=!0),Un[1].type="lineEnding",jn=Gs}else if(!(Un[1].type==="linePrefix"||Un[1].type==="blockQuotePrefix"||Un[1].type==="blockQuotePrefixWhitespace"||Un[1].type==="blockQuoteMarker"||Un[1].type==="listItemIndent"))break}lo&&(!jn||lo<jn)&&(Ji._spread=!0),Ji.end=Object.assign({},jn?W[jn][1].start:Tr[1].end),W.splice(jn||ke,0,["exit",Ji,Tr[2]]),ke++,Ee++}if(Tr[1].type==="listItemPrefix"){const Gs={type:"listItem",_spread:!1,start:Object.assign({},Tr[1].start),end:void 0};Ji=Gs,W.splice(ke,0,["enter",Gs,Tr[2]]),ke++,Ee++,lo=void 0,uo=!0}}}return W[ne][1]._spread=jt,Ee}function s(W,ne){return Ee;function Ee(ke){o.call(this,W(ke),ke),ne&&ne.call(this,ke)}}function a(){this.stack.push({type:"fragment",children:[]})}function o(W,ne,Ee){this.stack[this.stack.length-1].children.push(W),this.stack.push(W),this.tokenStack.push([ne,Ee||void 0]),W.position={start:gi(ne.start),end:void 0}}function l(W){return ne;function ne(Ee){W&&W.call(this,Ee),u.call(this,Ee)}}function u(W,ne){const Ee=this.stack.pop(),ke=this.tokenStack.pop();if(ke)ke[0].type!==W.type&&(ne?ne.call(this,W,ke[0]):(ke[1]||oy).call(this,W,ke[0]));else throw new Error("Cannot close `"+W.type+"` ("+Vo({start:W.start,end:W.end})+"): it’s not open");Ee.position.end=gi(W.end)}function c(){return l1(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h(W){if(this.data.expectingFirstListItemValue){const ne=this.stack[this.stack.length-2];ne.start=Number.parseInt(this.sliceSerialize(W),10),this.data.expectingFirstListItemValue=void 0}}function f(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.lang=W}function m(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.meta=W}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.value=W.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.value=W.replace(/(\r?\n|\r)$/g,"")}function w(W){const ne=this.resume(),Ee=this.stack[this.stack.length-1];Ee.label=ne,Ee.identifier=dn(this.sliceSerialize(W)).toLowerCase()}function x(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.title=W}function _(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.url=W}function A(W){const ne=this.stack[this.stack.length-1];if(!ne.depth){const Ee=this.sliceSerialize(W).length;ne.depth=Ee}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function I(W){const ne=this.stack[this.stack.length-1];ne.depth=this.sliceSerialize(W).codePointAt(0)===61?1:2}function N(){this.data.setextHeadingSlurpLineEnding=void 0}function U(W){const Ee=this.stack[this.stack.length-1].children;let ke=Ee[Ee.length-1];(!ke||ke.type!=="text")&&(ke=qs(),ke.position={start:gi(W.start),end:void 0},Ee.push(ke)),this.stack.push(ke)}function z(W){const ne=this.stack.pop();ne.value+=this.sliceSerialize(W),ne.position.end=gi(W.end)}function Z(W){const ne=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ee=ne.children[ne.children.length-1];Ee.position.end=gi(W.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ne.type)&&(U.call(this,W),z.call(this,W))}function V(){this.data.atHardBreak=!0}function ae(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.value=W}function J(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.value=W}function Y(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.value=W}function de(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const ne=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=ne,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function xe(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const ne=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=ne,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function Ue(W){const ne=this.sliceSerialize(W),Ee=this.stack[this.stack.length-2];Ee.label=PZ(ne),Ee.identifier=dn(ne).toLowerCase()}function He(){const W=this.stack[this.stack.length-1],ne=this.resume(),Ee=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ee.type==="link"){const ke=W.children;Ee.children=ke}else Ee.alt=ne}function L(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.url=W}function Re(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.title=W}function Q(){this.data.inReference=void 0}function M(){this.data.referenceType="collapsed"}function pe(W){const ne=this.resume(),Ee=this.stack[this.stack.length-1];Ee.label=ne,Ee.identifier=dn(this.sliceSerialize(W)).toLowerCase(),this.data.referenceType="full"}function oe(W){this.data.characterReferenceType=W.type}function fe(W){const ne=this.sliceSerialize(W),Ee=this.data.characterReferenceType;let ke;Ee?(ke=w7(ne,Ee==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ke=c1(ne);const $e=this.stack[this.stack.length-1];$e.value+=ke}function Ae(W){const ne=this.stack.pop();ne.position.end=gi(W.end)}function ze(W){z.call(this,W);const ne=this.stack[this.stack.length-1];ne.url=this.sliceSerialize(W)}function re(W){z.call(this,W);const ne=this.stack[this.stack.length-1];ne.url="mailto:"+this.sliceSerialize(W)}function Le(){return{type:"blockquote",children:[]}}function et(){return{type:"code",lang:null,meta:null,value:""}}function Te(){return{type:"inlineCode",value:""}}function Ke(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ot(){return{type:"emphasis",children:[]}}function Rt(){return{type:"heading",depth:0,children:[]}}function bn(){return{type:"break"}}function Jr(){return{type:"html",value:""}}function $n(){return{type:"image",title:null,url:"",alt:null}}function _r(){return{type:"link",title:null,url:"",children:[]}}function en(W){return{type:"list",ordered:W.type==="listOrdered",start:null,spread:W._spread,children:[]}}function ao(W){return{type:"listItem",spread:W._spread,checked:null,children:[]}}function oo(){return{type:"paragraph",children:[]}}function Qi(){return{type:"strong",children:[]}}function qs(){return{type:"text",value:""}}function Se(){return{type:"thematicBreak"}}}function gi(e){return{line:e.line,column:e.column,offset:e.offset}}function r8(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?r8(e,n):LJ(e,n)}}function LJ(e,t){let r;for(r in t)if(t8.call(t,r))switch(r){case"canContainEols":{const n=t[r];n&&e[r].push(...n);break}case"transforms":{const n=t[r];n&&e[r].push(...n);break}case"enter":case"exit":{const n=t[r];n&&Object.assign(e[r],n);break}}}function oy(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Vo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Vo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Vo({start:t.start,end:t.end})+") is still open")}function DJ(e){const t=this;t.parser=r;function r(n){return PJ(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function MJ(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function BJ(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
678
- `}]}function FJ(e,t){const r=t.value?t.value+`
679
- `:"",n={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(n.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:n,children:[{type:"text",value:r}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function zJ(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function $J(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function jJ(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=String(t.identifier).toUpperCase(),i=eo(n.toLowerCase()),s=e.footnoteOrder.indexOf(n);let a,o=e.footnoteCounts.get(n);o===void 0?(o=0,e.footnoteOrder.push(n),a=e.footnoteOrder.length):a=s+1,o+=1,e.footnoteCounts.set(n,o);const l={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+i,id:r+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function UJ(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function HJ(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function n8(e,t){const r=t.referenceType;let n="]";if(r==="collapsed"?n+="[]":r==="full"&&(n+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+n}];const i=e.all(t),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+=n:i.push({type:"text",value:n}),i}function VJ(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return n8(e,t);const i={src:eo(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(i.title=n.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function qJ(e,t){const r={src:eo(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,n),e.applyData(t,n)}function GJ(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const n={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,n),e.applyData(t,n)}function WJ(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return n8(e,t);const i={href:eo(n.url||"")};n.title!==null&&n.title!==void 0&&(i.title=n.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function ZJ(e,t){const r={href:eo(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function YJ(e,t,r){const n=e.all(t),i=r?KJ(r):i8(t),s={},a=[];if(typeof t.checked=="boolean"){const c=n[0];let d;c&&c.type==="element"&&c.tagName==="p"?d=c:(d={type:"element",tagName:"p",properties:{},children:[]},n.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let o=-1;for(;++o<n.length;){const c=n[o];(i||o!==0||c.type!=="element"||c.tagName!=="p")&&a.push({type:"text",value:`
680
- `}),c.type==="element"&&c.tagName==="p"&&!i?a.push(...c.children):a.push(c)}const l=n[n.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
681
- `});const u={type:"element",tagName:"li",properties:s,children:a};return e.patch(t,u),e.applyData(t,u)}function KJ(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const r=e.children;let n=-1;for(;!t&&++n<r.length;)t=i8(r[n])}return t}function i8(e){const t=e.spread;return t??e.children.length>1}function XJ(e,t){const r={},n=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++i<n.length;){const a=n[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(n,!0)};return e.patch(t,s),e.applyData(t,s)}function QJ(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function JJ(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function eee(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function tee(e,t){const r=e.all(t),n=r.shift(),i=[];if(n){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([n],!0)};e.patch(t.children[0],a),i.push(a)}if(r.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},o=Bn(t.children[1]),l=$0(t.children[t.children.length-1]);o&&l&&(a.position={start:o,end:l}),i.push(a)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function ree(e,t,r){const n=r?r.children:void 0,s=(n?n.indexOf(t):1)===0?"th":"td",a=r&&r.type==="table"?r.align:void 0,o=a?a.length:t.children.length;let l=-1;const u=[];for(;++l<o;){const d=t.children[l],h={},f=a?a[l]:void 0;f&&(h.align=f);let m={type:"element",tagName:s,properties:h,children:[]};d&&(m.children=e.all(d),e.patch(d,m),m=e.applyData(d,m)),u.push(m)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,c),e.applyData(t,c)}function nee(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}const ly=9,uy=32;function iee(e){const t=String(e),r=/\r?\n|\r/g;let n=r.exec(t),i=0;const s=[];for(;n;)s.push(cy(t.slice(i,n.index),i>0,!0),n[0]),i=n.index+n[0].length,n=r.exec(t);return s.push(cy(t.slice(i),i>0,!1)),s.join("")}function cy(e,t,r){let n=0,i=e.length;if(t){let s=e.codePointAt(n);for(;s===ly||s===uy;)n++,s=e.codePointAt(n)}if(r){let s=e.codePointAt(i-1);for(;s===ly||s===uy;)i--,s=e.codePointAt(i-1)}return i>n?e.slice(n,i):""}function see(e,t){const r={type:"text",value:iee(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function aee(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const oee={blockquote:MJ,break:BJ,code:FJ,delete:zJ,emphasis:$J,footnoteReference:jJ,heading:UJ,html:HJ,imageReference:VJ,image:qJ,inlineCode:GJ,linkReference:WJ,link:ZJ,listItem:YJ,list:XJ,paragraph:QJ,root:JJ,strong:eee,table:tee,tableCell:nee,tableRow:ree,text:see,thematicBreak:aee,toml:Eu,yaml:Eu,definition:Eu,footnoteDefinition:Eu};function Eu(){}function lee(e,t){const r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function uee(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function cee(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||lee,n=e.options.footnoteBackLabel||uee,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let l=-1;for(;++l<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[l]);if(!u)continue;const c=e.all(u),d=String(u.identifier).toUpperCase(),h=eo(d.toLowerCase());let f=0;const m=[],b=e.footnoteCounts.get(d);for(;b!==void 0&&++f<=b;){m.length>0&&m.push({type:"text",value:" "});let w=typeof r=="string"?r:r(l,f);typeof w=="string"&&(w={type:"text",value:w}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(l,f),className:["data-footnote-backref"]},children:Array.isArray(w)?w:[w]})}const y=c[c.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const w=y.children[y.children.length-1];w&&w.type==="text"?w.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...m)}else c.push(...m);const E={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(c,!0)};e.patch(u,E),o.push(E)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Os(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
682
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
683
- `}]}}const em={}.hasOwnProperty,dee={};function hee(e,t){const r=t||dee,n=new Map,i=new Map,s=new Map,a={...oee,...r.handlers},o={all:u,applyData:mee,definitionById:n,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:a,one:l,options:r,patch:fee,wrap:gee};return Yr(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const d=c.type==="definition"?n:i,h=String(c.identifier).toUpperCase();d.has(h)||d.set(h,c)}}),o;function l(c,d){const h=c.type,f=o.handlers[h];if(em.call(o.handlers,h)&&f)return f(o,c,d);if(o.options.passThrough&&o.options.passThrough.includes(h)){if("children"in c){const{children:b,...y}=c,E=Os(y);return E.children=o.all(c),E}return Os(c)}return(o.options.unknownHandler||pee)(o,c,d)}function u(c){const d=[];if("children"in c){const h=c.children;let f=-1;for(;++f<h.length;){const m=o.one(h[f],c);if(m){if(f&&h[f-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=dy(m.value)),!Array.isArray(m)&&m.type==="element")){const b=m.children[0];b&&b.type==="text"&&(b.value=dy(b.value))}Array.isArray(m)?d.push(...m):d.push(m)}}}return d}}function fee(e,t){e.position&&(t.position=JT(e))}function mee(e,t){let r=t;if(e&&e.data){const n=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;if(typeof n=="string")if(r.type==="element")r.tagName=n;else{const a="children"in r?r.children:[r];r={type:"element",tagName:n,properties:{},children:a}}r.type==="element"&&s&&Object.assign(r.properties,Os(s)),"children"in r&&r.children&&i!==null&&i!==void 0&&(r.children=i)}return r}function pee(e,t){const r=t.data||{},n="value"in t&&!(em.call(r,"hProperties")||em.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function gee(e,t){const r=[];let n=-1;for(t&&r.push({type:"text",value:`
684
- `});++n<e.length;)n&&r.push({type:"text",value:`
685
- `}),r.push(e[n]);return t&&e.length>0&&r.push({type:"text",value:`
686
- `}),r}function dy(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function hy(e,t){const r=hee(e,t),n=r.one(e,void 0),i=cee(r),s=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
687
- `},i),s}function bee(e,t){return e&&"run"in e?async function(r,n){const i=hy(r,{file:n,...t});await e.run(i,n)}:function(r,n){return hy(r,{file:n,...e||t})}}function fy(e){if(e)throw e}var nh,my;function yee(){if(my)return nh;my=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},s=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var c=e.call(u,"constructor"),d=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!c&&!d)return!1;var h;for(h in u);return typeof h>"u"||e.call(u,h)},a=function(u,c){r&&c.name==="__proto__"?r(u,c.name,{enumerable:!0,configurable:!0,value:c.newValue,writable:!0}):u[c.name]=c.newValue},o=function(u,c){if(c==="__proto__")if(e.call(u,c)){if(n)return n(u,c).value}else return;return u[c]};return nh=function l(){var u,c,d,h,f,m,b=arguments[0],y=1,E=arguments.length,w=!1;for(typeof b=="boolean"&&(w=b,b=arguments[1]||{},y=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});y<E;++y)if(u=arguments[y],u!=null)for(c in u)d=o(b,c),h=o(u,c),b!==h&&(w&&h&&(s(h)||(f=i(h)))?(f?(f=!1,m=d&&i(d)?d:[]):m=d&&s(d)?d:{},a(b,{name:c,newValue:l(w,m,h)})):typeof h<"u"&&a(b,{name:c,newValue:h}));return b},nh}var vee=yee();const ih=Gm(vee);function tm(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function xee(){const e=[],t={run:r,use:n};return t;function r(...i){let s=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);o(null,...i);function o(l,...u){const c=e[++s];let d=-1;if(l){a(l);return}for(;++d<i.length;)(u[d]===null||u[d]===void 0)&&(u[d]=i[d]);i=u,c?Eee(c,o)(...u):a(null,...u)}}function n(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Eee(e,t){let r;return n;function n(...a){const o=e.length>a.length;let l;o&&a.push(i);try{l=e.apply(this,a)}catch(u){const c=u;if(o&&r)throw c;return i(c)}o||(l&&l.then&&typeof l.then=="function"?l.then(s,i):l instanceof Error?i(l):s(l))}function i(a,...o){r||(r=!0,t(a,...o))}function s(a){i(null,a)}}const _n={basename:_ee,dirname:Tee,extname:wee,join:kee,sep:"/"};function _ee(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');zl(e);let r=0,n=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){r=i+1;break}}else n<0&&(s=!0,n=i+1);return n<0?"":e.slice(r,n)}if(t===e)return"";let a=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){r=i+1;break}}else a<0&&(s=!0,a=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(n=i):(o=-1,n=a));return r===n?n=a:n<0&&(n=e.length),e.slice(r,n)}function Tee(e){if(zl(e),e.length===0)return".";let t=-1,r=e.length,n;for(;--r;)if(e.codePointAt(r)===47){if(n){t=r;break}}else n||(n=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function wee(e){zl(e);let t=e.length,r=-1,n=0,i=-1,s=0,a;for(;t--;){const o=e.codePointAt(t);if(o===47){if(a){n=t+1;break}continue}r<0&&(a=!0,r=t+1),o===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||r<0||s===0||s===1&&i===r-1&&i===n+1?"":e.slice(i,r)}function kee(...e){let t=-1,r;for(;++t<e.length;)zl(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":See(r)}function See(e){zl(e);const t=e.codePointAt(0)===47;let r=Aee(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function Aee(e,t){let r="",n=0,i=-1,s=0,a=-1,o,l;for(;++a<=e.length;){if(a<e.length)o=e.codePointAt(a);else{if(o===47)break;o=47}if(o===47){if(!(i===a-1||s===1))if(i!==a-1&&s===2){if(r.length<2||n!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(l=r.lastIndexOf("/"),l!==r.length-1){l<0?(r="",n=0):(r=r.slice(0,l),n=r.length-1-r.lastIndexOf("/")),i=a,s=0;continue}}else if(r.length>0){r="",n=0,i=a,s=0;continue}}t&&(r=r.length>0?r+"/..":"..",n=2)}else r.length>0?r+="/"+e.slice(i+1,a):r=e.slice(i+1,a),n=a-i-1;i=a,s=0}else o===46&&s>-1?s++:s=-1}return r}function zl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Cee={cwd:Iee};function Iee(){return"/"}function rm(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Nee(e){if(typeof e=="string")e=new URL(e);else if(!rm(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Ree(e)}function Ree(e){if(e.hostname!==""){const n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const n=t.codePointAt(r+2);if(n===70||n===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const sh=["history","path","basename","stem","extname","dirname"];class Pee{constructor(t){let r;t?rm(t)?r={path:t}:typeof t=="string"||Oee(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":Cee.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<sh.length;){const s=sh[n];s in r&&r[s]!==void 0&&r[s]!==null&&(this[s]=s==="history"?[...r[s]]:r[s])}let i;for(i in r)sh.includes(i)||(this[i]=r[i])}get basename(){return typeof this.path=="string"?_n.basename(this.path):void 0}set basename(t){oh(t,"basename"),ah(t,"basename"),this.path=_n.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?_n.dirname(this.path):void 0}set dirname(t){py(this.basename,"dirname"),this.path=_n.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?_n.extname(this.path):void 0}set extname(t){if(ah(t,"extname"),py(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=_n.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){rm(t)&&(t=Nee(t)),oh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?_n.basename(this.path,this.extname):void 0}set stem(t){oh(t,"stem"),ah(t,"stem"),this.path=_n.join(this.dirname||"",t+(this.extname||""))}fail(t,r,n){const i=this.message(t,r,n);throw i.fatal=!0,i}info(t,r,n){const i=this.message(t,r,n);return i.fatal=void 0,i}message(t,r,n){const i=new ar(t,r,n);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function ah(e,t){if(e&&e.includes(_n.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+_n.sep+"`")}function oh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function py(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Oee(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Lee=(function(e){const n=this.constructor.prototype,i=n[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,n),s}),Dee={}.hasOwnProperty;class x1 extends Lee{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=xee()}copy(){const t=new x1;let r=-1;for(;++r<this.attachers.length;){const n=this.attachers[r];t.use(...n)}return t.data(ih(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(ch("data",this.frozen),this.namespace[t]=r,this):Dee.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ch("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);const i=r.call(t,...n);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=_u(t),n=this.parser||this.Parser;return lh("parse",n),n(String(r),r)}process(t,r){const n=this;return this.freeze(),lh("process",this.parser||this.Parser),uh("process",this.compiler||this.Compiler),r?i(void 0,r):new Promise(i);function i(s,a){const o=_u(t),l=n.parse(o);n.run(l,o,function(c,d,h){if(c||!d||!h)return u(c);const f=d,m=n.stringify(f,h);Fee(m)?h.value=m:h.result=m,u(c,h)});function u(c,d){c||!d?a(c):s?s(d):r(void 0,d)}}}processSync(t){let r=!1,n;return this.freeze(),lh("processSync",this.parser||this.Parser),uh("processSync",this.compiler||this.Compiler),this.process(t,i),by("processSync","process",r),n;function i(s,a){r=!0,fy(s),n=a}}run(t,r,n){gy(t),this.freeze();const i=this.transformers;return!n&&typeof r=="function"&&(n=r,r=void 0),n?s(void 0,n):new Promise(s);function s(a,o){const l=_u(r);i.run(t,l,u);function u(c,d,h){const f=d||t;c?o(c):a?a(f):n(void 0,f,h)}}}runSync(t,r){let n=!1,i;return this.run(t,r,s),by("runSync","run",n),i;function s(a,o){fy(a),i=o,n=!0}}stringify(t,r){this.freeze();const n=_u(r),i=this.compiler||this.Compiler;return uh("stringify",i),gy(t),i(t,n)}use(t,...r){const n=this.attachers,i=this.namespace;if(ch("use",this.frozen),t!=null)if(typeof t=="function")l(t,r);else if(typeof t=="object")Array.isArray(t)?o(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[c,...d]=u;l(c,d)}else a(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function a(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(u.plugins),u.settings&&(i.settings=ih(!0,i.settings,u.settings))}function o(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){const d=u[c];s(d)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,c){let d=-1,h=-1;for(;++d<n.length;)if(n[d][0]===u){h=d;break}if(h===-1)n.push([u,...c]);else if(c.length>0){let[f,...m]=c;const b=n[h][1];tm(b)&&tm(f)&&(f=ih(!0,b,f)),n[h]=[u,f,...m]}}}}const Mee=new x1().freeze();function lh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function uh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ch(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function gy(e){if(!tm(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function by(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function _u(e){return Bee(e)?e:new Pee(e)}function Bee(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Fee(e){return typeof e=="string"||zee(e)}function zee(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function E1(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Vs=E1();function s8(e){Vs=e}var hs={exec:()=>null};function ta(e){let t=[];return r=>{let n=Math.max(0,Math.min(3,r-1)),i=t[n];return i||(i=e(n),t[n]=i),i}}function Me(e,t=""){let r=typeof e=="string"?e:e.source,n={replace:(i,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(Kt.caret,"$1"),r=r.replace(i,a),n},getRegex:()=>new RegExp(r,t)};return n}var $ee=((e="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+e)}catch{return!1}})(),Kt={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:ta(e=>new RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:ta(e=>new RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:ta(e=>new RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:ta(e=>new RegExp(`^ {0,${e}}#`)),htmlBeginRegex:ta(e=>new RegExp(`^ {0,${e}}(?:</?(?:${jl})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,"i")),blockquoteBeginRegex:ta(e=>new RegExp(`^ {0,${e}}>`))},jee=/^(?:[ \t]*(?:\n|$))+/,Uee=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Hee=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,$l=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Vee=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,_1=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,a8=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,o8=Me(a8).replace(/bull/g,_1).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}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),qee=Me(a8).replace(/bull/g,_1).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}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),T1=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Gee=/^[^\n]+/,w1=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Wee=Me(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",w1).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Zee=Me(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,_1).getRegex(),jl="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",k1=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Yee=Me("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",k1).replace("tag",jl).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),l8=e=>Me(T1).replace("hr",$l).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",e).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",jl).getRegex(),Kee=l8(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Xee=l8(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Qee=Me(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Xee).getRegex(),S1={blockquote:Qee,code:Uee,def:Wee,fences:Hee,heading:Vee,hr:$l,html:Yee,lheading:o8,list:Zee,newline:jee,paragraph:Kee,table:hs,text:Gee},yy=Me("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",$l).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",jl).getRegex(),Jee={...S1,lheading:qee,table:yy,paragraph:Me(T1).replace("hr",$l).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",yy).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",jl).getRegex()},ete={...S1,html:Me(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",k1).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:hs,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Me(T1).replace("hr",$l).replace("heading",` *#{1,6} *[^
688
- ]`).replace("lheading",o8).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},tte=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,rte=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,u8=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,nte=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ci=/[\p{P}\p{S}]/u,ro=/[\s\p{P}\p{S}]/u,Ul=/[^\s\p{P}\p{S}]/u,ite=Me(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ro).getRegex(),ste=/[\p{Pi}\p{Ps}"']/u,c8=/(?!~)[\p{P}\p{S}]/u,ate=/(?!~)[\s\p{P}\p{S}]/u,ote=/(?:[^\s\p{P}\p{S}]|~)/u,lte=Me(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",$ee?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),d8=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,ute=Me(d8,"u").replace(/punct/g,ci).getRegex(),cte=Me(d8,"u").replace(/punct/g,c8).getRegex(),dte=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,hte=Me(dte,"u").replace(/openQuote/g,ste).replace(/punct/g,ci).getRegex(),h8="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",fte=Me(h8,"gu").replace(/notPunctSpace/g,Ul).replace(/punctSpace/g,ro).replace(/punct/g,ci).getRegex(),mte=Me(h8,"gu").replace(/notPunctSpace/g,ote).replace(/punctSpace/g,ate).replace(/punct/g,c8).getRegex(),pte="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",gte=Me(pte,"gu").replace(/notPunctSpace/g,Ul).replace(/punctSpace/g,ro).replace(/punct/g,ci).getRegex(),bte=Me("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ul).replace(/punctSpace/g,ro).replace(/punct/g,ci).getRegex(),yte="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",vte=Me(yte,"gu").replace(/notPunctSpace/g,Ul).replace(/punctSpace/g,ro).replace(/punct/g,ci).getRegex(),xte=Me(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,ci).getRegex(),Ete="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",_te=Me(Ete,"gu").replace(/notPunctSpace/g,Ul).replace(/punctSpace/g,ro).replace(/punct/g,ci).getRegex(),Tte=Me(/\\(punct)/,"gu").replace(/punct/g,ci).getRegex(),wte=Me(/^<(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(),kte=Me(k1).replace("(?:-->|$)","-->").getRegex(),Ste=Me("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",kte).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),f8=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,Dc=Me(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",f8).getRegex(),Ate=Me(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label",Dc).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Cte=Me(/^!?\[(label)\]\[(ref)\]/).replace("label",Dc).replace("ref",w1).getRegex(),Ite=Me(/^!?\[(ref)\](?:\[\])?/).replace("ref",w1).getRegex(),vy=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,Nte=Me(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",f8).getRegex(),Rte=Me("reflink|nolink(?!\\()","g").replace("reflink",Me(/^!?\[(label)\]\[(ref)\]/).replace("label",Nte).replace("ref",vy).getRegex()).replace("nolink",Me(/^!?\[(ref)\](?:\[\])?/).replace("ref",vy).getRegex()).getRegex(),xy=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Pte=/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/,Ote=Me(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,Pte).getRegex(),A1={_backpedal:hs,anyPunctuation:Tte,autolink:wte,blockSkip:lte,br:u8,code:rte,del:hs,delLDelim:hs,delRDelim:hs,emStrongLDelim:ute,emStrongRDelimAst:fte,emStrongRDelimUnd:bte,escape:tte,link:Ate,nolink:Ite,punctuation:ite,reflink:Cte,reflinkSearch:Rte,tag:Ste,text:nte,url:hs},Lte={...A1,emStrongLDelim:hte,emStrongRDelimAst:gte,emStrongRDelimUnd:vte,link:Me(/^!?\[(label)\]\((.*?)\)/).replace("label",Dc).getRegex(),reflink:Me(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Dc).getRegex()},nm={...A1,emStrongRDelimAst:mte,emStrongLDelim:cte,delLDelim:xte,delRDelim:_te,url:Me(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",Ote).replace("protocol",xy).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Me(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol",xy).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},Dte={...nm,br:Me(u8).replace("{2,}","*").getRegex(),text:Me(nm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Tu={normal:S1,gfm:Jee,pedantic:ete},Eo={normal:A1,gfm:nm,breaks:Dte,pedantic:Lte},Mte={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ey=e=>Mte[e];function kr(e,t){if(t){if(Kt.escapeTest.test(e))return e.replace(Kt.escapeReplace,Ey)}else if(Kt.escapeTestNoEncode.test(e))return e.replace(Kt.escapeReplaceNoEncode,Ey);return e}function Bte(e){return e.replace(Kt.numericCharacterReference,(t,r,n)=>{let i=r===void 0?Number.parseInt(n,16):Number.parseInt(r,10);return i===0||i>1114111||i>=55296&&i<=57343?"�":String.fromCodePoint(i)})}function _y(e){try{e=encodeURI(e).replace(Kt.percentDecode,"%")}catch{return null}return e}function Ty(e,t){var s;let r=e.replace(Kt.findPipe,(a,o,l)=>{let u=!1,c=o;for(;--c>=0&&l[c]==="\\";)u=!u;return u?"|":" |"}),n=r.split(Kt.splitPipe),i=0;if(n[0].trim()||n.shift(),n.length>0&&!((s=n.at(-1))!=null&&s.trim())&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(Kt.slashPipe,"|");return n}function bi(e,t,r){let n=e.length;if(n===0)return"";let i=0;for(;i<n&&e.charAt(n-i-1)===t;)i++;return e.slice(0,n-i)}function wy(e){let t=e.split(`
689
- `),r=t.length-1;for(;r>=0&&Kt.blankLine.test(t[r]);)r--;return t.length-r<=2?e:t.slice(0,r+1).join(`
690
- `)}function Mc(e){return e.trim().toLowerCase().toUpperCase().toLowerCase()}function ky(e,t){if(e.indexOf(t[0])===-1&&e.indexOf(t[1])===-1)return-1;let r=0;for(let n=0;n<e.length;n++)if(e[n]==="\\")n++;else if(e[n]===t[0])r++;else if(e[n]===t[1]&&(r--,r<0))return n;return r>0?-2:-1}function Sy(e,t=0){let r=t,n="";for(let i of e)if(i===" "){let s=4-r%4;n+=" ".repeat(s),r+=s}else n+=i,r++;return n}function Ay(e,t,r,n,i){let s=t.href,a=t.title||null,o=e[1].replace(i.other.outputLinkReplace,"$1"),l=e[0].charAt(0)==="!";n.state.inLink=!0;let u=n.state.linkEmitted,c=n.state.inRawBlock;n.state.linkEmitted=!1;let d=n.inlineTokens(o),h=n.state.linkEmitted;if(n.state.linkEmitted=u,n.state.inLink=!1,!l){if(h){n.state.inRawBlock=c;return}n.state.linkEmitted=!0}return{type:l?"image":"link",raw:r,href:s,title:a,text:o,tokens:d}}function Fte(e,t,r){let n=e.match(r.other.indentCodeCompensation);if(n===null)return t;let i=n[1];return t.split(`
691
- `).map(s=>{let a=s.match(r.other.beginningSpace);if(a===null)return s;let[o]=a;return s.slice(Math.min(o.length,i.length))}).join(`
692
- `)}function Cy(e,t,r,n){if(!t.includes("<"))return!1;for(let i=0;i<t.length;i++){if(t[i]==="\\"){i++;continue}if(t[i]==="`"){let o=n.inline.code.exec(t.slice(i));if(o){i+=o[0].length-1;continue}}if(t[i]!=="<")continue;let s=e.slice(r+i),a=n.inline.tag.exec(s)||n.inline.autolink.exec(s);if(a){if(a[0].length>t.length-i)return!0;i+=a[0].length-1}}return!1}var Bc=class{constructor(e){G(this,"options");G(this,"rules");G(this,"lexer");this.options=e||Vs}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let r=this.options.pedantic?t[0]:wy(t[0]),n=r.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r,codeBlockStyle:"indented",text:n}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let r=t[0],n=Fte(r,t[3]||"",this.rules);return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let r=t[2].trim();if(this.rules.other.endingHash.test(r)){let n=bi(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceTabChar.test(n))&&(r=n.trim())}return{type:"heading",raw:bi(t[0],`
693
- `),depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:bi(t[0],`
694
- `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let r=bi(t[0],`
695
- `).split(`
696
- `),n="",i="",s=[];for(;r.length>0;){let a=!1,o=[],l;for(l=0;l<r.length;l++)if(this.rules.other.blockquoteStart.test(r[l]))o.push(r[l]),a=!0;else if(!a)o.push(r[l]);else break;r=r.slice(l);let u=o.join(`
697
- `),c=u.replace(this.rules.other.blockquoteSetextReplace,`
698
- $1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
699
- ${u}`:u,i=i?`${i}
700
- ${c}`:c;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,s,!0),this.lexer.state.top=d,r.length===0)break;let h=s.at(-1);if((h==null?void 0:h.type)==="code")break;if((h==null?void 0:h.type)==="blockquote"){let f=h,m=r.join(`
701
- `),b=f.raw+`
702
- `+m.replace(this.rules.other.blockquoteSetextReplace2,""),y=this.blockquote(b);s[s.length-1]=y;let E=b.substring(y.raw.length).replace(/^\n/,""),w=E?E.split(`
703
- `).length:0,x=w?r.slice(0,-w):r;x.length>0&&(n=`${n}
704
- ${x.join(`
705
- `)}`),i=i.substring(0,i.length-f.text.length)+y.text;break}else if((h==null?void 0:h.type)==="list"){let f=h,m=f.raw+`
706
- `+r.join(`
707
- `),b=this.list(m);s[s.length-1]=b,n=n.substring(0,n.length-h.raw.length)+b.raw,i=i.substring(0,i.length-f.raw.length)+b.raw,r=m.substring(s.at(-1).raw.length).split(`
708
- `);continue}}return{type:"blockquote",raw:n,tokens:s,text:i}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim(),n=r.length>1,i={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");let s=this.rules.other.listItemRegex(r),a=!1;for(;e;){let l=!1,u="",c="";if(!(t=s.exec(e))||this.rules.block.hr.test(e))break;u=t[0],e=e.substring(u.length);let d=t[2].split(`
709
- `,1)[0],h=t[1].length,f=this.options.pedantic?Sy(d,h):d.replace(this.rules.other.leadingSpaceTab,E=>Sy(E,h)),m=e.split(`
710
- `,1)[0],b=!f.trim(),y=0;if(this.options.pedantic?(y=2,c=f.trimStart()):b?y=h+1:(y=f.search(this.rules.other.nonSpaceChar),y=y>4?1:y,c=f.slice(y),y+=h),b&&this.rules.other.blankLine.test(m)&&(u+=m+`
711
- `,e=e.substring(m.length+1),l=!0),!l){let E=this.rules.other.nextBulletRegex(y),w=this.rules.other.hrRegex(y),x=this.rules.other.fencesBeginRegex(y),_=this.rules.other.headingBeginRegex(y),A=this.rules.other.htmlBeginRegex(y),S=this.rules.other.blockquoteBeginRegex(y);for(;e;){let I=e.split(`
712
- `,1)[0],N;if(m=I,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),N=m):N=m.replace(this.rules.other.leadingSpaceTab,U=>U.replace(this.rules.other.tabCharGlobal," ")),x.test(m)||_.test(m)||A.test(m)||S.test(m)||E.test(m)||w.test(m))break;if(N.search(this.rules.other.nonSpaceChar)>=y||!m.trim())c+=`
713
- `+N.slice(y);else{if(b||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||x.test(f)||_.test(f)||w.test(f))break;c+=`
714
- `+m}b=!m.trim(),u+=I+`
715
- `,e=e.substring(I.length+1),f=N.slice(y)}}i.loose||(a?i.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(a=!0)),i.items.push({type:"list_item",raw:u,task:!!this.options.gfm&&this.rules.other.listIsTask.test(c),loose:!1,text:c,tokens:[]}),i.raw+=u}let o=i.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let l of i.items)if(this.lexer.state.top=!1,l.tokens=this.lexer.blockTokens(l.text,[]),!i.loose){let u=l.tokens.filter(d=>d.type==="space"),c=u.length>0&&u.some(d=>this.rules.other.anyLine.test(d.raw));i.loose=c}for(let l of i.items){let u=l.tokens[0];if(l.task&&((u==null?void 0:u.type)==="text"||(u==null?void 0:u.type)==="paragraph")){l.text=l.text.replace(this.rules.other.listReplaceTask,""),u.raw=u.raw.replace(this.rules.other.listReplaceTask,""),u.text=u.text.replace(this.rules.other.listReplaceTask,"");for(let d=this.lexer.inlineQueue.length-1;d>=0;d--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[d].src)){this.lexer.inlineQueue[d].src=this.lexer.inlineQueue[d].src.replace(this.rules.other.listReplaceTask,"");break}let c=this.rules.other.listTaskCheckbox.exec(l.raw);if(c){let d={type:"checkbox",raw:c[0]+" ",checked:c[0]!=="[ ]"};l.checked=d.checked,i.loose?l.tokens[0]&&["paragraph","text"].includes(l.tokens[0].type)&&"tokens"in l.tokens[0]&&l.tokens[0].tokens?(l.tokens[0].raw=d.raw+l.tokens[0].raw,l.tokens[0].text=d.raw+l.tokens[0].text,l.tokens[0].tokens.unshift(d)):l.tokens.unshift({type:"paragraph",raw:d.raw,text:d.raw,tokens:[d]}):l.tokens.unshift(d)}}else l.task&&(l.task=!1)}if(i.loose)for(let l of i.items){l.loose=!0;for(let u of l.tokens)u.type==="text"&&(u.type="paragraph")}return i}}html(e){let t=this.rules.block.html.exec(e);if(t){let r=wy(t[0]);return{type:"html",block:!0,raw:r,pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:r}}}def(e){let t=this.rules.block.def.exec(e);if(t){if(!this.rules.other.startAngleBracket.test(t[2])&&ky(t[2],"()")!==-1)return;let r=Mc(t[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:r,raw:bi(t[0],`
716
- `),href:n,title:i}}}table(e){var a;let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let r=Ty(t[1]),n=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=(a=t[3])!=null&&a.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
717
- `):[],s={type:"table",raw:bi(t[0],`
718
- `),header:[],align:[],rows:[]};if(r.length===n.length){for(let o of n)this.rules.other.tableAlignRight.test(o)?s.align.push("right"):this.rules.other.tableAlignCenter.test(o)?s.align.push("center"):this.rules.other.tableAlignLeft.test(o)?s.align.push("left"):s.align.push(null);for(let o=0;o<r.length;o++)s.header.push({text:r[o],tokens:this.lexer.inline(r[o]),header:!0,align:s.align[o]});for(let o of i)s.rows.push(Ty(o,s.header.length).map((l,u)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:s.align[u]})));return s}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let r=t[1].trim();return{type:"heading",raw:bi(t[0],`
719
- `),depth:t[2].charAt(0)==="="?1:2,text:r,tokens:this.lexer.inline(r)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let r=t[1].charAt(t[1].length-1)===`
720
- `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:r,tokens:this.lexer.inline(r)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){if(this.lexer.state.linkParenPossible===!1)return;let t=this.rules.inline.link.exec(e);if(t){let r=t[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&Cy(e,t[1],r,this.rules))return;let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let a=bi(n.slice(0,-1),"\\");if((n.length-a.length)%2===0)return}else{let a=ky(t[2],"()");if(a===-2)return;if(a>-1){let o=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,o).trim(),t[3]=""}}let i=t[2],s="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(i);a&&(i=a[1],s=a[3])}else s=t[3]?t[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?i=i.slice(1):i=i.slice(1,-1)),Ay(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let n=r[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&Cy(e,r[1],n,this.rules))return;let i=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=t[Mc(i)];if(!s){let a=r[0].charAt(0);return{type:"text",raw:a,text:a}}return Ay(r,s,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!(!n||!n[1]&&!n[2]&&!n[3]&&!n[4]||n[4]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[3])||!r||this.rules.inline.punctuation.exec(r))){let i=[...n[0]].length-1,s,a,o=i,l=0,u=n[0][0],c=r===u,d=u==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+i);(n=d.exec(t))!==null;){if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!s)continue;if(a=[...s].length,n[3]||n[4]){o+=a;continue}else if(n[5]||n[6]){if(i%3&&!((i+a)%3)){l+=a;continue}if(c)break}if(o-=a,o>0)continue;a=Math.min(a,a+o+l);let h=[...n[0]][0].length,f=e.slice(0,i+n.index+h+a);if(Math.min(i,a)%2){let b=f.slice(1,-1);return{type:"em",raw:f,text:b,tokens:this.lexer.inlineTokens(b)}}let m=f.slice(2,-2);return{type:"strong",raw:f,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(r),i=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&i&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:t[0],text:r}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,r=""){let n=this.rules.inline.delLDelim.exec(e);if(n&&(!n[1]||!r||this.rules.inline.punctuation.exec(r))){let i=[...n[0]].length-1,s,a,o=i,l=this.rules.inline.delRDelim;for(l.lastIndex=0,t=t.slice(-1*e.length+i);(n=l.exec(t))!==null;){if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!s||(a=[...s].length,a!==i))continue;if(n[3]||n[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let u=[...n[0]][0].length,c=e.slice(0,i+n.index+u+a),d=c.slice(i,-i);return{type:"del",raw:c,text:d,tokens:this.lexer.inlineTokens(d)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let r,n;return t[2]==="@"?(r=t[1],n="mailto:"+r):(r=t[1],n=r),{type:"link",raw:t[0],text:r,href:n,autolink:!0,tokens:[{type:"text",raw:r,text:r}]}}}url(e){var r;let t;if(t=this.rules.inline.url.exec(e)){let n,i;if(t[2]==="@")n=t[0],i="mailto:"+n;else{let s;do s=t[0],t[0]=((r=this.rules.inline._backpedal.exec(t[0]))==null?void 0:r[0])??"";while(s!==t[0]);n=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:n,href:i,autolink:!0,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let r=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:r?t[0]:Bte(t[0]),escaped:r}}}},Xc,m8,Cs,zr=(Cs=class{constructor(t){Ut(this,Xc);G(this,"tokens");G(this,"options");G(this,"state");G(this,"inlineQueue");G(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Vs,this.options.tokenizer=this.options.tokenizer||new Bc,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,linkParenPossible:!0,top:!0};let r={other:Kt,block:Tu.normal,inline:Eo.normal};this.options.pedantic?(r.block=Tu.pedantic,r.inline=Eo.pedantic):this.options.gfm&&(r.block=Tu.gfm,this.options.breaks?r.inline=Eo.breaks:r.inline=Eo.gfm),this.tokenizer.rules=r}static get rules(){return{block:Tu,inline:Eo}}static lex(t,r){return new Cs(r).lex(t)}static lexInline(t,r){return new Cs(r).inlineTokens(t)}lex(t){t=t.replace(Kt.carriageReturn,`
721
- `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],n=!1){var s,a,o;this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(Kt.tabCharGlobal," ").replace(Kt.spaceLine,""));let i=1/0;for(;t;){if(t.length<i)i=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}let l;if((a=(s=this.options.extensions)==null?void 0:s.block)!=null&&a.some(c=>(l=c.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.space(t)){t=t.substring(l.raw.length);let c=r.at(-1);l.raw.length===1&&c!==void 0?c.raw+=`
722
- `:r.push(l);continue}if(l=this.tokenizer.code(t)){t=t.substring(l.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
723
- `)?"":`
724
- `)+l.raw,c.text+=`
725
- `+l.text,this.inlineQueue.at(-1).src=c.text):r.push(l);continue}if(l=this.tokenizer.fences(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.heading(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.hr(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.blockquote(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.list(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.html(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.def(t)){t=t.substring(l.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
726
- `)?"":`
727
- `)+l.raw,c.text+=`
728
- `+l.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[l.tag]||(this.tokens.links[l.tag]={href:l.href,title:l.title},r.push(l));continue}if(l=this.tokenizer.table(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.lheading(t)){t=t.substring(l.raw.length),r.push(l);continue}let u=t;if((o=this.options.extensions)!=null&&o.startBlock){let c=1/0,d=t.slice(1),h;this.options.extensions.startBlock.forEach(f=>{h=f.call({lexer:this},d),typeof h=="number"&&h>=0&&(c=Math.min(c,h))}),c<1/0&&c>=0&&(u=t.substring(0,c+1))}if(this.state.top&&(l=this.tokenizer.paragraph(u))){let c=r.at(-1);n&&(c==null?void 0:c.type)==="paragraph"?(c.raw+=(c.raw.endsWith(`
729
- `)?"":`
730
- `)+l.raw,c.text+=`
731
- `+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(l),n=u.length!==t.length,t=t.substring(l.raw.length);continue}if(l=this.tokenizer.text(t)){t=t.substring(l.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
732
- `)?"":`
733
- `)+l.raw,c.text+=`
734
- `+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(l);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}linkInText(t){if(!t.includes("["))return!1;let r=this.tokenizer.rules.inline.link;for(let n of t.matchAll(this.tokenizer.rules.inline.blockSkip))if(r.test(n[0])&&t.charAt(n.index-1)!=="!")return!0;for(let n of t.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let i=n[0],s=i.lastIndexOf("[");if(!(i.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,Mc(i.slice(s+1,-1))))&&!(s>1&&this.linkInText(i.slice(1,s-1))))return!0}return!1}inlineTokens(t,r=[]){this.tokenizer.lexer=this;let n=this.state.linkParenPossible;this.state.linkParenPossible=n&&t.includes(")");try{return Zl(this,Xc,m8).call(this,t,r)}finally{this.state.linkParenPossible=n}}infiniteLoopError(t){let r="Infinite loop on byte: "+t;if(this.options.silent)console.error(r);else throw new Error(r)}},Xc=new WeakSet,m8=function(t,r){var o,l,u,c,d;let n=t;if(this.tokens.links&&t.includes("[")){let h=this.tokenizer.rules.inline.reflinkSearch,f=m=>{let b=m.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,Mc(m.slice(b+1,-1))))return m;if(b>1&&m.charAt(0)!=="!"){let y=m.slice(1,b-1);if(this.linkInText(y))return"["+y.replace(h,f)+"]["+"a".repeat(m.length-b-2)+"]"}return"["+"a".repeat(m.length-2)+"]"};n=n.replace(h,f)}n=n.replace(this.tokenizer.rules.inline.anyPunctuation,h=>"+".repeat(h.length)),n=n.replace(this.tokenizer.rules.inline.blockSkip,(h,f,m)=>{let b=m?m.length:0;return h.slice(0,b)+"["+"a".repeat(h.length-b-2)+"]"}),n=((l=(o=this.options.hooks)==null?void 0:o.emStrongMask)==null?void 0:l.call({lexer:this},n))??n;let i=!1,s="",a=1/0;for(;t;){if(t.length<a)a=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}i||(s=""),i=!1;let h;if((c=(u=this.options.extensions)==null?void 0:u.inline)!=null&&c.some(m=>(h=m.call({lexer:this},t,r))?(t=t.substring(h.raw.length),r.push(h),!0):!1))continue;if(h=this.tokenizer.escape(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.tag(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.link(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(h.raw.length);let m=r.at(-1);h.type==="text"&&(m==null?void 0:m.type)==="text"?(m.raw+=h.raw,m.text+=h.text):r.push(h);continue}if(h=this.tokenizer.emStrong(t,n,s)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.codespan(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.br(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.del(t,n,s)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.autolink(t)){t=t.substring(h.raw.length),r.push(h);continue}if(!this.state.inLink&&(h=this.tokenizer.url(t))){t=t.substring(h.raw.length),r.push(h);continue}let f=t;if((d=this.options.extensions)!=null&&d.startInline){let m=1/0,b=t.slice(1),y;this.options.extensions.startInline.forEach(E=>{y=E.call({lexer:this},b),typeof y=="number"&&y>=0&&(m=Math.min(m,y))}),m<1/0&&m>=0&&(f=t.substring(0,m+1))}if(h=this.tokenizer.inlineText(f)){t=t.substring(h.raw.length),h.raw.slice(-1)!=="_"&&(s=h.raw.slice(-1)),i=!0;let m=r.at(-1);(m==null?void 0:m.type)==="text"?(m.raw+=h.raw,m.text+=h.text):r.push(h);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return r},Cs),Fc=class{constructor(t){G(this,"options");G(this,"parser");this.options=t||Vs}space(t){return""}code({text:t,lang:r,escaped:n}){var a;let i=(a=(r||"").match(Kt.notSpaceStart))==null?void 0:a[0],s=t?t.replace(Kt.endingNewline,"")+`
735
- `:"";return i?'<pre><code class="language-'+kr(i)+'">'+(n?s:kr(s,!0))+`</code></pre>
736
- `:"<pre><code>"+(n?s:kr(s,!0))+`</code></pre>
737
- `}blockquote({tokens:t}){return`<blockquote>
738
- ${this.parser.parse(t)}</blockquote>
739
- `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
740
- `}hr(t){return`<hr>
741
- `}list(t){let r=t.ordered,n=t.start,i="";for(let o=0;o<t.items.length;o++){let l=t.items[o];i+=this.listitem(l)}let s=r?"ol":"ul",a=r&&n!==1?' start="'+n+'"':"";return"<"+s+a+`>
742
- `+i+"</"+s+`>
743
- `}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
744
- `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
745
- `}table(t){let r="",n="";for(let s=0;s<t.header.length;s++)n+=this.tablecell(t.header[s]);r+=this.tablerow({text:n});let i="";for(let s=0;s<t.rows.length;s++){let a=t.rows[s];n="";for(let o=0;o<a.length;o++)n+=this.tablecell(a[o]);i+=this.tablerow({text:n})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
746
- <thead>
747
- `+r+`</thead>
748
- `+i+`</table>
749
- `}tablerow({text:t}){return`<tr>
750
- ${t}</tr>
751
- `}tablecell(t){let r=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+r+`</${n}>
752
- `}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>${kr(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,text:n,tokens:i,autolink:s}){let a=s?kr(n,!0):this.parser.parseInline(i),o=_y(t);if(o===null)return a;t=kr(o,s);let l='<a href="'+t+'"';return r&&(l+=' title="'+kr(r)+'"'),l+=">"+a+"</a>",l}image({href:t,title:r,text:n,tokens:i}){i&&(n=this.parser.parseInline(i,this.parser.textRenderer));let s=_y(t);if(s===null)return kr(n);t=s;let a=`<img src="${kr(t)}" alt="${kr(n)}"`;return r&&(a+=` title="${kr(r)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:kr(t.text)}},C1=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},on=class im{constructor(t){G(this,"options");G(this,"renderer");G(this,"textRenderer");this.options=t||Vs,this.options.renderer=this.options.renderer||new Fc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new C1}static parse(t,r){return new im(r).parse(t)}static parseInline(t,r){return new im(r).parseInline(t)}parse(t){var n,i;this.renderer.parser=this;let r="";for(let s=0;s<t.length;s++){let a=t[s];if((i=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&i[a.type]){let l=a,u=this.options.extensions.renderers[l.type].call({parser:this},l);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(l.type)){r+=u||"";continue}}let o=a;switch(o.type){case"space":{r+=this.renderer.space(o);break}case"hr":{r+=this.renderer.hr(o);break}case"heading":{r+=this.renderer.heading(o);break}case"code":{r+=this.renderer.code(o);break}case"table":{r+=this.renderer.table(o);break}case"blockquote":{r+=this.renderer.blockquote(o);break}case"list":{r+=this.renderer.list(o);break}case"checkbox":{r+=this.renderer.checkbox(o);break}case"html":{r+=this.renderer.html(o);break}case"def":{r+=this.renderer.def(o);break}case"paragraph":{r+=this.renderer.paragraph(o);break}case"text":{r+=this.renderer.text(o);break}default:{let l='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}parseInline(t,r=this.renderer){var i,s;this.renderer.parser=this;let n="";for(let a=0;a<t.length;a++){let o=t[a];if((s=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&s[o.type]){let u=this.options.extensions.renderers[o.type].call({parser:this},o);if(u!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(o.type)){n+=u||"";continue}}let l=o;switch(l.type){case"escape":{n+=r.text(l);break}case"html":{n+=r.html(l);break}case"link":{n+=r.link(l);break}case"image":{n+=r.image(l);break}case"checkbox":{n+=r.checkbox(l);break}case"strong":{n+=r.strong(l);break}case"em":{n+=r.em(l);break}case"codespan":{n+=r.codespan(l);break}case"br":{n+=r.br(l);break}case"del":{n+=r.del(l);break}case"text":{n+=r.text(l);break}default:{let u='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return n}},Ru,No=(Ru=class{constructor(e){G(this,"options");G(this,"block");this.options=e||Vs}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?zr.lex:zr.lexInline}provideParser(e=this.block){return e?on.parse:on.parseInline}},G(Ru,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),G(Ru,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Ru),zte=class{constructor(...t){G(this,"defaults",E1());G(this,"options",this.setOptions);G(this,"parse",this.parseMarkdown(!0));G(this,"parseInline",this.parseMarkdown(!1));G(this,"Parser",on);G(this,"Renderer",Fc);G(this,"TextRenderer",C1);G(this,"Lexer",zr);G(this,"Tokenizer",Bc);G(this,"Hooks",No);this.use(...t)}walkTokens(t,r){var i,s;let n=[];for(let a of t)switch(n=n.concat(r.call(this,a)),a.type){case"table":{let o=a;for(let l of o.header)n=n.concat(this.walkTokens(l.tokens,r));for(let l of o.rows)for(let u of l)n=n.concat(this.walkTokens(u.tokens,r));break}case"list":{let o=a;n=n.concat(this.walkTokens(o.items,r));break}default:{let o=a;(s=(i=this.defaults.extensions)==null?void 0:i.childTokens)!=null&&s[o.type]?this.defaults.extensions.childTokens[o.type].forEach(l=>{let u=o[l].flat(1/0);n=n.concat(this.walkTokens(u,r))}):o.tokens&&(n=n.concat(this.walkTokens(o.tokens,r)))}}return n}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let i={...n};if(i.async=this.defaults.async||i.async||!1,n.extensions&&(n.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let a=r.renderers[s.name];a?r.renderers[s.name]=function(...o){let l=s.renderer.apply(this,o);return l===!1&&(l=a.apply(this,o)),l}:r.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=r[s.level];a?a.unshift(s.tokenizer):r[s.level]=[s.tokenizer],s.start&&(s.level==="block"?r.startBlock?r.startBlock.push(s.start):r.startBlock=[s.start]:s.level==="inline"&&(r.startInline?r.startInline.push(s.start):r.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(r.childTokens[s.name]=s.childTokens)}),i.extensions=r),n.renderer){let s=this.defaults.renderer||new Fc(this.defaults);for(let a in n.renderer){if(!(a in s))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let o=a,l=n.renderer[o],u=s[o];s[o]=(...c)=>{let d=l.apply(s,c);return d===!1&&(d=u.apply(s,c)),d||""}}i.renderer=s}if(n.tokenizer){let s=this.defaults.tokenizer||new Bc(this.defaults);for(let a in n.tokenizer){if(!(a in s))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let o=a,l=n.tokenizer[o],u=s[o];s[o]=(...c)=>{let d=l.apply(s,c);return d===!1&&(d=u.apply(s,c)),d}}i.tokenizer=s}if(n.hooks){let s=this.defaults.hooks||new No;for(let a in n.hooks){if(!(a in s))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let o=a,l=n.hooks[o],u=s[o];No.passThroughHooks.has(a)?s[o]=c=>{if(this.defaults.async&&No.passThroughHooksRespectAsync.has(a))return(async()=>{let h=await l.call(s,c);return u.call(s,h)})();let d=l.call(s,c);return u.call(s,d)}:s[o]=(...c)=>{if(this.defaults.async)return(async()=>{let h=await l.apply(s,c);return h===!1&&(h=await u.apply(s,c)),h})();let d=l.apply(s,c);return d===!1&&(d=u.apply(s,c)),d}}i.hooks=s}if(n.walkTokens){let s=this.defaults.walkTokens,a=n.walkTokens;i.walkTokens=function(o){let l=[];return l.push(a.call(this,o)),s&&(l=l.concat(s.call(this,o))),l}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return zr.lex(t,r??this.defaults)}parser(t,r){return on.parse(t,r??this.defaults)}parseMarkdown(t){return(r,n)=>{let i={...n},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 r>"u"||r===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=t),s.async)return(async()=>{let o=s.hooks?await s.hooks.preprocess(r):r,l=await(s.hooks?await s.hooks.provideLexer(t):t?zr.lex:zr.lexInline)(o,s),u=s.hooks?await s.hooks.processAllTokens(l):l;s.walkTokens&&await Promise.all(this.walkTokens(u,s.walkTokens));let c=await(s.hooks?await s.hooks.provideParser(t):t?on.parse:on.parseInline)(u,s);return s.hooks?await s.hooks.postprocess(c):c})().catch(a);try{s.hooks&&(r=s.hooks.preprocess(r));let o=(s.hooks?s.hooks.provideLexer(t):t?zr.lex:zr.lexInline)(r,s);s.hooks&&(o=s.hooks.processAllTokens(o)),s.walkTokens&&this.walkTokens(o,s.walkTokens);let l=(s.hooks?s.hooks.provideParser(t):t?on.parse:on.parseInline)(o,s);return s.hooks&&(l=s.hooks.postprocess(l)),l}catch(o){return a(o)}}}onError(t,r){return n=>{if(n.message+=`
753
- Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+kr(n.message+"",!0)+"</pre>";return r?Promise.resolve(i):i}if(r)return Promise.reject(n);throw n}}},Ls=new zte;function nt(e,t){return Ls.parse(e,t)}nt.options=nt.setOptions=function(e){return Ls.setOptions(e),nt.defaults=Ls.defaults,s8(nt.defaults),nt};nt.getDefaults=E1;nt.defaults=Vs;function $te(...e){return Ls.use(...e),nt.defaults=Ls.defaults,s8(nt.defaults),nt}nt.use=$te;nt.walkTokens=function(e,t){return Ls.walkTokens(e,t)};nt.parseInline=Ls.parseInline;nt.Parser=on;nt.parser=on.parse;nt.Renderer=Fc;nt.TextRenderer=C1;nt.Lexer=zr;nt.lexer=zr.lex;nt.Tokenizer=Bc;nt.Hooks=No;nt.parse=nt;nt.options;nt.setOptions;nt.walkTokens;nt.parseInline;on.parse;zr.lex;var jte=300,Ute="300px",Hte=500;function Vte(e={}){let{immediate:t=!1,debounceDelay:r=jte,rootMargin:n=Ute,idleTimeout:i=Hte}=e,[s,a]=k.useState(!1),o=k.useRef(null),l=k.useRef(null),u=k.useRef(null),c=k.useMemo(()=>f=>{let m=Date.now();return window.setTimeout(()=>{f({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-m))})},1)},[]),d=k.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(f,m)=>window.requestIdleCallback(f,m):c,[c]),h=k.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?f=>window.cancelIdleCallback(f):f=>{clearTimeout(f)},[]);return k.useEffect(()=>{if(t){a(!0);return}let f=o.current;if(!f)return;l.current&&(clearTimeout(l.current),l.current=null),u.current&&(h(u.current),u.current=null);let m=()=>{l.current&&(clearTimeout(l.current),l.current=null),u.current&&(h(u.current),u.current=null)},b=x=>{u.current=d(_=>{_.timeRemaining()>0||_.didTimeout?(a(!0),x.disconnect()):u.current=d(()=>{a(!0),x.disconnect()},{timeout:i/2})},{timeout:i})},y=x=>{m(),l.current=window.setTimeout(()=>{var _,A;let S=x.takeRecords();(S.length===0||(A=(_=S.at(-1))==null?void 0:_.isIntersecting)!=null&&A)&&b(x)},r)},E=(x,_)=>{x.isIntersecting?y(_):m()},w=new IntersectionObserver(x=>{for(let _ of x)E(_,w)},{rootMargin:n,threshold:0});return w.observe(f),()=>{l.current&&clearTimeout(l.current),u.current&&h(u.current),w.disconnect()}},[t,r,n,i,h,d]),{shouldRender:s,containerRef:o}}var qte=320,Gte=4,p8=()=>typeof performance>"u"?Date.now():performance.now();function Iy(e){var t,r;let n=(t=e==null?void 0:e.now)!=null?t:p8,i=(r=e==null?void 0:e.maxBacklogMs)!=null?r:qte,s=0,a=0;return{now:n,beginPass(o){a=Math.min(Math.max(s,o),o+i)},mark(){return a},rewind(o){a=o},take(o,l,u){if(o<=0)return{baseDelay:0,step:Math.max(0,l)};let c=Math.max(0,l),d=c===0?0:Math.min(c,Gte),h=Math.max(a,u),f=u+i,m=h+Math.max(0,o-1)*c,b=c;if(m>f&&o>1)if(h<f){let E=f-h;b=Math.max(d,E/(o-1))}else b=d;let y=Math.max(0,Math.round(h-u));return a=h+o*b,{baseDelay:y,step:b}},commitPass(){s=a}}}var g8=/\s/,I1=/^\s+$/,Wte=new Set(["pre","svg","math","annotation"]),Zte=new Set(["img","hr"]),Hl=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",N1=e=>e.some(t=>Hl(t)&&Wte.has(t.tagName)),Yte=e=>{for(let t=e.length-1;t>=0;t--){let r=e[t];if(Hl(r)&&r.tagName==="li")return r}},Kte=(e,t,r,n)=>{e.properties!=null||(e.properties={}),e.properties["data-sd-animate-marker"]=!0;let i=typeof e.properties.style=="string"?`${e.properties.style};`:"";e.properties.style=`${i}--sd-marker-duration:${t}ms;--sd-marker-delay:${Math.round(r)}ms;--sd-marker-easing:${n}`},Xte=new Set(["ul","ol","li"]),b8=e=>{for(let t of e.children)if(Hl(t)){if(t.tagName==="input")return t;if(Xte.has(t.tagName))continue;let r=b8(t);if(r)return r}},y8=(e,t,r,n)=>{e.properties!=null||(e.properties={}),e.properties["data-sd-animate"]=!0;let i=typeof e.properties.style=="string"?`${e.properties.style};`:"";e.properties.style=`${i}--sd-animation:sd-${t.animation};--sd-duration:${r}ms;--sd-easing:${t.easing};--sd-delay:${Math.round(n)}ms`},Qte=(e,t,r,n)=>{let i=b8(e);i&&y8(i,t,r,n)},Jte=(e,t,r,n,i,s)=>{if(N1(t))return;let a=n.prevContentLength,o=i.count;i.count+=1;let l=a>0&&o<a,u=l?0:s.baseDelay+i.newIndex++*s.step;y8(e,r,l?0:r.duration,u)},ere=e=>{var t;for(let r=e.length-1;r>=0;r-=1){let n=e[r];if(Hl(n)){if((t=n.properties)!=null&&t["data-sd-animated"])break;n.properties={...n.properties,"data-sd-animated":!0}}}},v8=e=>{let t=[],r="",n=!1;for(let i of e){let s=g8.test(i);if(s!==n&&r){if(s){r+=i,n=!0;continue}t.push(r),r=""}r+=i,n=s}return r&&t.push(r),t},x8=e=>{let t=[],r="";for(let n of e)g8.test(n)?t.length>0&&!I1.test(t.at(-1))?t[t.length-1]+=n:r+=n:(r&&(t.push(r),r=""),t.push(n));return r&&(t.length>0?t[t.length-1]+=r:t.push(r)),t},Ny=/^[^\s;:'"\\/](?:[^;:'"\\/\r\n]*[^\s;:'"\\/])?$/,tre=(e,t,r,n)=>{let i=`sd-${t.animation}`,s=`${r?0:t.duration}ms`,a;return t.styleObjects?(a={"--sd-animation":i,"--sd-duration":s,"--sd-easing":t.easing},n&&(a["--sd-delay"]=`${Math.round(n)}ms`)):(a=`--sd-animation:${i};--sd-duration:${s};--sd-easing:${t.easing}`,n&&(a+=`;--sd-delay:${Math.round(n)}ms`)),{type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:a},children:[{type:"text",value:e}]}},Ry=(e,t)=>!(e>0&&t<e),sm=e=>Hl(e)&&Zte.has(e.tagName),rre=(e,t,r)=>{let n=0,i=0;return Ll(e,s=>s.type==="text"||sm(s),(s,a)=>{if(N1(a))return Ii;if(sm(s)){Ry(r,i)&&(n+=1),i+=1;return}let o=s.value;if(!o.trim()){i+=o.length;return}let l=t.sep==="char"?x8(o):v8(o);for(let u of l){let c=i;i+=u.length,!I1.test(u)&&Ry(r,c)&&(n+=1)}}),n},nre=(e,t,r,n,i,s)=>{var a;let o=t.at(-1);if(!(o&&"children"in o))return;if(N1(t))return Ii;let l=o,u=l.children.indexOf(e);if(u===-1)return;let c=e.value;if(!c.trim()){i.count+=c.length;return}let d=r.sep==="char"?x8(c):v8(c),h=n.prevContentLength,f=!1,m=Yte(t),b=!!(m&&!((a=m.properties)!=null&&a["data-sd-animate-marker"])),y=!1,E=d.map(w=>{let x=i.count;if(i.count+=w.length,I1.test(w))return{type:"text",value:w};let _=h>0&&x<h,A=_?0:s.baseDelay+i.newIndex++*s.step;if(f=!0,m&&b&&!y){let S=_?0:r.duration;Kte(m,S,A,r.easing),Qte(m,r,S,A),y=!0}return tre(w,r,_,A)});return f&&ere(t),l.children.splice(u,1,...E),u+E.length},ire=0;function sre(e){return E8(e,!1)}var are=e=>E8(e,!0);function E8(e,t){var r,n,i,s,a;let o=(r=e==null?void 0:e.animation)!=null?r:"fadeIn",l=(n=e==null?void 0:e.easing)!=null?n:"ease",u={animation:o,duration:(i=e==null?void 0:e.duration)!=null?i:150,easing:l,sep:(s=e==null?void 0:e.sep)!=null?s:"word",stagger:(a=e==null?void 0:e.stagger)!=null?a:40,styleObjects:t&&Ny.test(o)&&Ny.test(l),timeline:e==null?void 0:e.timeline},c={committedCharCount:0,prevContentLength:0,lastRenderCharCount:0,pendingMark:null},d=ire++,h=()=>f=>{var m;let b={count:0,newIndex:0};c.prevContentLength=c.committedCharCount;let y=u.timeline,E=(m=y==null?void 0:y.now())!=null?m:p8();y&&(c.pendingMark===null?c.pendingMark=y.mark():y.rewind(c.pendingMark));let w=y?y.take(rre(f,u,c.prevContentLength),u.stagger,E):{baseDelay:0,step:u.stagger};Ll(f,x=>x.type==="text"||sm(x),(x,_)=>{if(x.type==="text")return nre(x,_,u,c,b,w);Jte(x,_,u,c,b,w)}),c.lastRenderCharCount=b.count,c.prevContentLength=0};return Object.defineProperty(h,"name",{value:`rehypeAnimate$${d}`}),{name:"animate",type:"animate",rehypePlugin:h,setPrevContentLength(f){c.committedCharCount=f,c.prevContentLength=f},getLastRenderCharCount(){return c.lastRenderCharCount},commit(){c.committedCharCount=c.lastRenderCharCount,c.pendingMark=null}}}sre();var _8=k.createContext(!1),T8=()=>k.useContext(_8),H0=(...e)=>up(Qc(e)),ore=(e,t)=>{if(!e||!t)return t;let r=`${e}:`;return t.split(/\s+/).filter(Boolean).map(n=>n.startsWith(r)?n:`${e}:${n}`).join(" ")},lre=e=>e?(...t)=>ore(e,up(Qc(t))):H0,_a=(e,t,r)=>{let n=typeof t=="string"&&r.startsWith("text/csv")?"\uFEFF":"",i=typeof t=="string"?new Blob([n+t],{type:r}):t,s=URL.createObjectURL(i),a=document.createElement("a");a.href=s,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(s)},am=k.createContext(H0),We=()=>k.useContext(am),ure=8,w8=e=>{if(!(e===void 0||e===0||e===Number.POSITIVE_INFINITY)){if(typeof e=="number")return Number.isFinite(e)&&e>0?`${e}px`:void 0;if(!(e==="0"||e==="none"||e==="Infinity"))return e}},k8=(e,t,r)=>{let n=k.useRef(null),i=k.useRef(!0),s=k.useRef(!1),a=k.useRef(null);return k.useEffect(()=>{let o=n.current;if(!(o&&t))return;let l=()=>{let u=o.scrollHeight-o.scrollTop-o.clientHeight<ure;i.current=u};return o.addEventListener("scroll",l,{passive:!0}),()=>o.removeEventListener("scroll",l)},[t]),k.useEffect(()=>{e&&!s.current&&(i.current=!0),e||(i.current=!0),s.current=e},[e]),k.useEffect(()=>()=>{a.current!==null&&cancelAnimationFrame(a.current)},[]),k.useEffect(()=>{let o=n.current;!(o&&t&&e&&i.current)||a.current!==null||(a.current=requestAnimationFrame(()=>{a.current=null,i.current&&o.scrollTo({top:o.scrollHeight,behavior:"instant"})}))},[e,t,r]),n},cre=H0("block"),dre=H0("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),hre=e=>{let t={};for(let r of e.split(";")){let n=r.indexOf(":");if(n>0){let i=r.slice(0,n).trim(),s=r.slice(n+1).trim();i&&s&&(t[i]=s)}}return t},fre=k.memo(({children:e,result:t,language:r,className:n,maxHeight:i,startLine:s,lineNumbers:a=!0,...o})=>{let l=We(),{isAnimating:u}=k.useContext(Zt),c=w8(i),d=k8(u,!!c,t),h=k.useMemo(()=>l(dre),[l]),f=k.useMemo(()=>l(cre),[l]),m=k.useMemo(()=>{let b={};return t.bg&&(b["--sdm-bg"]=t.bg),t.fg&&(b["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(b,hre(t.rootStyle)),b},[t.bg,t.fg,t.rootStyle]);return v.jsx("div",{className:l(n,c?"overflow-y-auto":null,"overflow-x-auto rounded-md border border-border bg-background p-4 text-sm"),"data-language":r,"data-streamdown":"code-block-body",ref:d,style:c?{maxHeight:c}:void 0,...o,children:v.jsx("pre",{className:l(n,"bg-[var(--sdm-bg,inherit)]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit))]"),style:m,children:v.jsx("code",{className:a?l("[counter-increment:line_0] [counter-reset:line]"):void 0,style:a&&s&&s>1?{counterReset:`line ${s-1}`}:void 0,children:t.tokens.map((b,y)=>v.jsx("span",{className:a?h:f,children:b.length===0||b.length===1&&b[0].content===""?`
754
- `:b.map((E,w)=>{let x={},_=!!E.bgColor;if(E.color&&(x["--sdm-c"]=E.color),E.bgColor&&(x["--sdm-tbg"]=E.bgColor),E.htmlStyle)for(let[A,S]of Object.entries(E.htmlStyle))A==="color"?x["--sdm-c"]=S:A==="background-color"?(x["--sdm-tbg"]=S,_=!0):x[A]=S;return v.jsx("span",{className:l("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",_&&"bg-[var(--sdm-tbg)]",_&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:x,...E.htmlAttrs,children:E.content},w)})},y))})})})}),mre=({className:e,language:t,style:r,isIncomplete:n,...i})=>{let s=We();return v.jsx("div",{className:s("relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":n||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...r},...i})},S8=k.createContext({code:""}),A8=()=>k.useContext(S8),pre=({language:e})=>{let t=We();return v.jsx("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:v.jsx("span",{className:t("ml-1 font-mono lowercase"),children:e})})},gre=e=>{let t=e.length;for(;t>0&&e[t-1]===`
755
- `;)t--;return e.slice(0,t)},bre=k.lazy(()=>O(()=>import("./highlighted-body-KQOG7T2V-ClwcaYX1.js"),__vite__mapDeps([125,126,127,128,129])).then(e=>({default:e.HighlightedCodeBlockBody}))),yre=({code:e,language:t,className:r,children:n,isIncomplete:i=!1,startLine:s,lineNumbers:a,...o})=>{let l=We(),{codeBlockMaxHeight:u}=k.useContext(Zt),c=k.useMemo(()=>gre(e),[e]),d=k.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:c.split(`
756
- `).map(h=>[{content:h,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[c]);return v.jsx(S8.Provider,{value:{code:e},children:v.jsxs(mre,{dir:"ltr",isIncomplete:i,language:t,children:[v.jsx(pre,{language:t}),n?v.jsx("div",{className:l("pointer-events-none absolute top-2 right-2 z-10 flex items-center"),children:v.jsx("div",{className:l("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"code-block-actions",children:n})}):null,v.jsx(k.Suspense,{fallback:v.jsx(fre,{className:r,language:t,lineNumbers:a,maxHeight:u,result:d,startLine:s,...o}),children:v.jsx(bre,{className:r,code:c,isIncomplete:i,language:t,lineNumbers:a,maxHeight:u,raw:d,startLine:s,...o})})]})})},vre=e=>v.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:v.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),xre=e=>v.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:v.jsx("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),Ere=e=>v.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:v.jsx("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),_re=e=>v.jsxs("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[v.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),v.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),v.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),v.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),v.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),v.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),v.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),v.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),v.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),v.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),Tre=e=>v.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:v.jsx("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),wre=e=>v.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:v.jsx("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),kre=e=>v.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:v.jsx("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),Sre=e=>v.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:v.jsx("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),Are=e=>v.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:v.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),Cre=e=>v.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:v.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),Ro={CheckIcon:vre,CopyIcon:xre,DownloadIcon:Ere,ExternalLinkIcon:Sre,Loader2Icon:_re,Maximize2Icon:Tre,RotateCcwIcon:wre,XIcon:kre,ZoomInIcon:Are,ZoomOutIcon:Cre},C8=k.createContext(Ro),Ire=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let r=Object.keys(e),n=Object.keys(t);return r.length!==n.length?!1:r.every(i=>e[i]===t[i])},Py=({icons:e,children:t})=>{let r=k.useRef(e),n=k.useRef(e?{...Ro,...e}:Ro);Ire(r.current,e)||(r.current=e,n.current=e?{...Ro,...e}:Ro);let i=n.current;return v.jsx(C8.Provider,{value:i,children:t})},pn=()=>k.useContext(C8),I8={copyCode:"Copy Code",downloadFile:"Download file",downloadDiagram:"Download diagram",downloadDiagramAsSvg:"Download diagram as SVG",downloadDiagramAsPng:"Download diagram as PNG",downloadDiagramAsMmd:"Download diagram as MMD",viewFullscreen:"View fullscreen",exitFullscreen:"Exit fullscreen",mermaidFormatSvg:"SVG",mermaidFormatPng:"PNG",mermaidFormatMmd:"MMD",zoomIn:"Zoom in",zoomOut:"Zoom out",resetView:"Reset zoom and pan",copyTable:"Copy table",copyTableAsMarkdown:"Copy table as Markdown",copyTableAsCsv:"Copy table as CSV",copyTableAsTsv:"Copy table as TSV",downloadTable:"Download table",downloadTableAsCsv:"Download table as CSV",downloadTableAsMarkdown:"Download table as Markdown",tableFormatMarkdown:"Markdown",tableFormatCsv:"CSV",tableFormatTsv:"TSV",imageNotAvailable:"Image not available",downloadImage:"Download image",openExternalLink:"Open external link?",externalLinkWarning:"You're about to visit an external website.",close:"Close",copyLink:"Copy link",copied:"Copied",openLink:"Open link"},om=k.createContext(I8),zn=()=>k.useContext(om),lm=({onCopy:e,onError:t,timeout:r=2e3,children:n,className:i,code:s,...a})=>{let o=We(),[l,u]=k.useState(!1),c=k.useRef(0),{code:d}=A8(),{isAnimating:h}=k.useContext(Zt),f=zn(),m=s??d,b=async()=>{var w;if(typeof window>"u"||!((w=navigator==null?void 0:navigator.clipboard)!=null&&w.writeText)){t==null||t(new Error("Clipboard API not available"));return}try{l||(await navigator.clipboard.writeText(m),u(!0),e==null||e(),c.current=window.setTimeout(()=>u(!1),r))}catch(x){t==null||t(x)}};k.useEffect(()=>()=>{window.clearTimeout(c.current)},[]);let y=pn(),E=l?y.CheckIcon:y.CopyIcon;return v.jsxs(v.Fragment,{children:[v.jsx("button",{"aria-label":f.copyCode,className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-copy-button",disabled:h,onClick:b,title:f.copyCode,type:"button",...a,children:n??v.jsx(E,{"aria-hidden":"true",size:14})}),l&&v.jsx("output",{"aria-live":"polite",className:"sr-only",children:f.copied})]})},R1=(e,t,r)=>{if(typeof e=="boolean")return r;let n=e[t];if(typeof n!="object")return r;let i=n.download;return typeof i!="object"?r:i.filename||r},Oy=(e,t)=>{if(typeof e=="boolean")return{};let r=e[t];if(typeof r!="object")return{};let n=r.copy;return typeof n!="object"||n===null?{}:{onCopy:n.onCopy,onError:n.onError}},Ly={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},Nre=({onDownload:e,onError:t,language:r,children:n,className:i,code:s,...a})=>{let o=We(),{code:l}=A8(),{isAnimating:u,controls:c}=k.useContext(Zt),d=zn(),h=pn(),f=s??l,m=r&&r in Ly?Ly[r]:"txt",b=`${R1(c,"code","file")}.${m}`,y="text/plain",E=()=>{try{_a(b,f,y),e==null||e()}catch(w){t==null||t(w)}};return v.jsx("button",{"aria-label":d.downloadFile,className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-download-button",disabled:u,onClick:E,title:d.downloadFile,type:"button",...a,children:n??v.jsx(h.DownloadIcon,{size:14})})},Dy=()=>{let{Loader2Icon:e}=pn(),t=We();return v.jsxs("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[v.jsx("div",{className:t("h-[46px] w-full bg-muted/80")}),v.jsx("div",{className:t("flex w-full items-center justify-center p-4"),children:v.jsx(e,{className:t("size-4 animate-spin")})})]})},Rre=/\.[^/.]+$/,Pre=({node:e,className:t,src:r,alt:n,onLoad:i,onError:s,showControls:a=!0,showDownloadControl:o=!0,...l})=>{let{DownloadIcon:u}=pn(),c=We(),d=k.useRef(null),[h,f]=k.useState(!1),[m,b]=k.useState(!1),y=zn(),E=l.width!=null||l.height!=null,w=(h||E)&&!m&&a&&o,x=m&&!E;k.useEffect(()=>{let I=d.current;if(I!=null&&I.complete){let N=I.naturalWidth>0;f(N),b(!N)}},[]);let _=k.useCallback(I=>{f(!0),b(!1),i==null||i(I)},[i]),A=k.useCallback(I=>{f(!1),b(!0),s==null||s(I)},[s]),S=async()=>{if(r)try{let I=await(await fetch(r)).blob(),N=new URL(r,window.location.origin).pathname.split("/").pop()||"",U=N.split(".").pop(),z=N.includes(".")&&U!==void 0&&U.length<=4,Z="";if(z)Z=N;else{let V=I.type,ae="png";V.includes("jpeg")||V.includes("jpg")?ae="jpg":V.includes("png")?ae="png":V.includes("svg")?ae="svg":V.includes("gif")?ae="gif":V.includes("webp")&&(ae="webp"),Z=`${(n||N||"image").replace(Rre,"")}.${ae}`}_a(Z,I,I.type)}catch{window.open(r,"_blank")}};return r?r===dl?v.jsx("div",{className:c("group relative my-4 inline-block"),"data-incomplete":"true","data-streamdown":"image-wrapper",children:v.jsx("div",{className:c("h-24 w-48 animate-pulse rounded-lg bg-muted"),"data-streamdown":"image-placeholder"})}):v.jsxs("div",{className:c("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[v.jsx("img",{alt:n,className:c("max-w-full rounded-lg",x&&"hidden",t),"data-streamdown":"image",onError:A,onLoad:_,ref:d,src:r,...l}),x&&v.jsx("span",{className:c("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:y.imageNotAvailable}),a&&v.jsx("div",{className:c("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"),"data-streamdown":"image-overlay"}),w&&v.jsx("button",{className:c("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:S,title:y.downloadImage,type:"button",children:v.jsx(u,{size:14})})]}):null},P1=e=>{let t=typeof e=="function"?e():e;return t??document.body},qo=0,O1=()=>{qo+=1,qo===1&&(document.body.style.overflow="hidden")},L1=()=>{qo=Math.max(0,qo-1),qo===0&&(document.body.style.overflow="")},Ore=({url:e,isOpen:t,onClose:r,onConfirm:n})=>{let{CheckIcon:i,CopyIcon:s,ExternalLinkIcon:a,XIcon:o}=pn(),l=We(),[u,c]=k.useState(!1),d=zn(),{portal:h}=k.useContext(Zt),f=k.useCallback(async()=>{try{await navigator.clipboard.writeText(e),c(!0),setTimeout(()=>c(!1),2e3)}catch{}},[e]),m=k.useCallback(()=>{n(),r()},[n,r]);if(k.useEffect(()=>{if(t){O1();let y=E=>{E.key==="Escape"&&r()};return document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y),L1()}}},[t,r]),!t||typeof document>"u")return null;let b=v.jsx("div",{className:l("fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm"),"data-streamdown":"link-safety-modal",onClick:r,onKeyDown:y=>{y.key==="Escape"&&r()},role:"button",tabIndex:0,children:v.jsxs("div",{className:l("relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg"),onClick:y=>y.stopPropagation(),onKeyDown:y=>y.stopPropagation(),role:"presentation",children:[v.jsx("button",{className:l("absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:r,title:d.close,type:"button",children:v.jsx(o,{size:16})}),v.jsxs("div",{className:l("flex flex-col gap-2"),children:[v.jsxs("div",{className:l("flex items-center gap-2 font-semibold text-lg"),children:[v.jsx(a,{size:20}),v.jsx("span",{children:d.openExternalLink})]}),v.jsx("p",{className:l("text-muted-foreground text-sm"),children:d.externalLinkWarning})]}),v.jsx("div",{className:l("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),v.jsxs("div",{className:l("flex gap-2"),children:[v.jsx("button",{className:l("flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted"),onClick:f,type:"button",children:u?v.jsxs(v.Fragment,{children:[v.jsx(i,{size:14}),v.jsx("span",{children:d.copied})]}):v.jsxs(v.Fragment,{children:[v.jsx(s,{size:14}),v.jsx("span",{children:d.copyLink})]})}),v.jsxs("button",{className:l("flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90"),onClick:m,type:"button",children:[v.jsx(a,{size:14}),v.jsx("span",{children:d.openLink})]})]})]})});return $a.createPortal(b,P1(h))},um=k.createContext(null),D1=()=>k.useContext(um),x0e=()=>{var e;let t=D1();return(e=t==null?void 0:t.code)!=null?e:null},M1=()=>{var e;let t=D1();return(e=t==null?void 0:t.mermaid)!=null?e:null},Lre=e=>{var t;let r=D1();return r!=null&&r.renderers&&e&&(t=r.renderers.find(n=>Array.isArray(n.language)?n.language.includes(e):n.language===e))!=null?t:null},N8=/<svg\b[^>]*>/i,Dre=/\bviewBox=(['"])(.*?)\1/i,Mre=/[\s,]+/,Bre=/\swidth=(['"]).*?\1/gi,Fre=/\sheight=(['"]).*?\1/gi,My=/\sstyle=(['"])(.*?)\1/i,zre=/^width\s*:/i,$re=/^height\s*:/i,jre=/^max-width\s*:/i,By=/^<svg/i,R8=e=>{let t=e.match(N8);if(!t)return null;let r=t[0].match(Dre),n=r==null?void 0:r[2];if(!n)return null;let i=n.trim().split(Mre).map(o=>Number.parseFloat(o));if(i.length<4||i.slice(0,4).some(Number.isNaN))return null;let s=i[2],a=i[3];return s>0&&a>0?{height:a,width:s}:null},Ure=e=>{let t=e.match(N8);if(!t)return e;try{let r=t[0],n=R8(e);if(!n)return e;let{width:i,height:s}=n,a=r.replace(Bre,"").replace(Fre,""),o=a.match(My),l=`width:${i}px;height:${s}px;max-width:none;`;if(o){let u=o[1],c=o[2].split(";").map(h=>h.trim()).filter(Boolean).filter(h=>!(zre.test(h)||$re.test(h)||jre.test(h))).join(";"),d=`${l}${c?`${c};`:""}`;a=a.replace(My,` style=${u}${d}${u}`)}else a=a.replace(By,`<svg style="${l}"`);return a=a.replace(By,`<svg width="${i}" height="${s}"`),e.replace(r,a)}catch{return e}},Hre=e=>{if(typeof DOMParser>"u"||typeof XMLSerializer>"u")return e;let t=new DOMParser().parseFromString(e,"text/html").querySelector("svg");return t?new XMLSerializer().serializeToString(t):e},Vre=(e,t)=>{var r;let n=(r=void 0)!=null?r:5;return new Promise((i,s)=>{let a="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),o=new Image;o.crossOrigin="anonymous",o.onload=()=>{let l=document.createElement("canvas"),u=o.width*n,c=o.height*n;l.width=u,l.height=c;let d=l.getContext("2d");if(!d){s(new Error("Failed to create 2D canvas context for PNG export"));return}d.drawImage(o,0,0,u,c),l.toBlob(h=>{if(!h){s(new Error("Failed to create PNG blob"));return}i(h)},"image/png")},o.onerror=()=>s(new Error("Failed to load SVG image")),o.src=a})},P8=({chart:e,children:t,className:r,onDownload:n,config:i,onError:s})=>{let a=We(),[o,l]=k.useState(!1),u=k.useRef(null),{isAnimating:c,controls:d}=k.useContext(Zt),h=pn(),f=M1(),m=zn(),b=R1(d,"mermaid","diagram"),y=async E=>{try{if(E==="mmd"){let I=`${b}.mmd`;_a(I,e,"text/plain"),l(!1),n==null||n(E);return}if(!f){s==null||s(new Error("Mermaid plugin not available"));return}let w=f.getMermaid(i),x=e.split("").reduce((I,N)=>(I<<5)-I+N.charCodeAt(0)|0,0),_=`mermaid-${Math.abs(x)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:A}=await w.render(_,e);if(!A){s==null||s(new Error("SVG not found. Please wait for the diagram to render."));return}let S=Hre(A);if(E==="svg"){let I=`${b}.svg`;_a(I,S,"image/svg+xml"),l(!1),n==null||n(E);return}if(E==="png"){let I=await Vre(S);_a(`${b}.png`,I,"image/png"),n==null||n(E),l(!1);return}}catch(w){s==null||s(w)}};return k.useEffect(()=>{let E=w=>{let x=w.composedPath();u.current&&!x.includes(u.current)&&l(!1)};return document.addEventListener("mousedown",E),()=>{document.removeEventListener("mousedown",E)}},[]),v.jsxs("div",{className:a("relative"),ref:u,children:[v.jsx("button",{"aria-label":m.downloadDiagram,className:a("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",r),disabled:c,onClick:()=>l(!o),title:m.downloadDiagram,type:"button",children:t??v.jsx(h.DownloadIcon,{"aria-hidden":"true",size:14})}),o?v.jsxs("div",{className:a("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[v.jsx("button",{"aria-label":m.downloadDiagramAsSvg,className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>y("svg"),title:m.downloadDiagramAsSvg,type:"button",children:m.mermaidFormatSvg}),v.jsx("button",{"aria-label":m.downloadDiagramAsPng,className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>y("png"),title:m.downloadDiagramAsPng,type:"button",children:m.mermaidFormatPng}),v.jsx("button",{"aria-label":m.downloadDiagramAsMmd,className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>y("mmd"),title:m.downloadDiagramAsMmd,type:"button",children:m.mermaidFormatMmd})]}):null]})},qre=({chart:e,config:t,onFullscreen:r,onExit:n,className:i,...s})=>{let{Maximize2Icon:a,XIcon:o}=pn(),l=We(),[u,c]=k.useState(!1),{isAnimating:d,controls:h,portal:f}=k.useContext(Zt),m=zn(),b=(()=>{if(typeof h=="boolean")return h;let x=h.mermaid;return x===!1?!1:x===!0||x===void 0?!0:x.panZoom!==!1})(),y=(()=>{if(typeof h=="boolean")return h;let x=h.mermaid;return x===!1?!1:x===!0||x===void 0?!0:x.download!==!1})(),E=(()=>{if(typeof h=="boolean")return h;let x=h.mermaid;return x===!1?!1:x===!0||x===void 0?!0:x.copy!==!1})(),w=()=>{c(!u)};return k.useEffect(()=>{if(u){O1();let x=_=>{_.key==="Escape"&&c(!1)};return document.addEventListener("keydown",x),()=>{document.removeEventListener("keydown",x),L1()}}},[u]),k.useEffect(()=>{u?r==null||r():n&&n()},[u,r,n]),v.jsxs(v.Fragment,{children:[v.jsx("button",{className:l("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:d,onClick:w,title:m.viewFullscreen,type:"button",...s,"aria-label":m.viewFullscreen,children:v.jsx(a,{"aria-hidden":"true",size:14})}),u?$a.createPortal(v.jsxs("div",{"aria-label":m.viewFullscreen,"aria-modal":"true",className:l("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),"data-streamdown":"mermaid-fullscreen",onClick:w,onKeyDown:x=>{x.key==="Escape"&&w()},role:"dialog",children:[v.jsxs("div",{className:l("absolute top-4 right-4 z-10 flex items-center gap-1"),onClick:x=>x.stopPropagation(),onKeyDown:x=>x.stopPropagation(),role:"presentation",children:[y?v.jsx(P8,{chart:e,config:t}):null,E?v.jsx(lm,{code:e}):null,v.jsx("button",{"aria-label":m.exitFullscreen,className:l("rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:w,title:m.exitFullscreen,type:"button",children:v.jsx(o,{"aria-hidden":"true",size:20})})]}),v.jsx("div",{className:l("flex size-full items-center justify-center p-4"),onClick:x=>x.stopPropagation(),onKeyDown:x=>x.stopPropagation(),role:"presentation",children:v.jsx(vw,{chart:e,className:l("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:b})})]}),P1(f)):null]})};function cm(e){var t;if(e.nodeType===Node.TEXT_NODE)return(t=e.textContent)!=null?t:"";if(e.nodeType!==Node.ELEMENT_NODE)return"";let r=e;return r.tagName==="BR"?`
757
- `:Array.from(r.childNodes).map(cm).join("")}var O8=e=>{let t=[],r=[],n=e.querySelectorAll("thead th");for(let s of n)t.push(cm(s).trim());let i=e.querySelectorAll("tbody tr");for(let s of i){let a=[],o=s.querySelectorAll("td");for(let l of o)a.push(cm(l).trim());r.push(a)}return{headers:t,rows:r}},L8=e=>{var t;if(typeof e!="object")return",";let r=e.table;return typeof r!="object"?",":(t=r.csvSeparator)!=null?t:","},D8=(e,t=",")=>{let r;t==="auto"?Intl.NumberFormat().format(1.1).includes(",")?r=";":r=",":r=t;let{headers:n,rows:i}=e,s=u=>{let c=!1;for(let d of u)if(d===r||d==='"'||d===`
758
- `||d==="\r"){c=!0;break}return c?`"${u.replace(/"/g,'""')}"`:u},a=n.length>0?i.length+1:i.length,o=new Array(a),l=0;n.length>0&&(o[l]=n.map(s).join(r),l+=1);for(let u of i)o[l]=u.map(s).join(r),l+=1;return o.join(`
759
- `)},Gre=e=>{let{headers:t,rows:r}=e,n=o=>{let l=!1;for(let c of o)if(c===" "||c===`
760
- `||c==="\r"){l=!0;break}if(!l)return o;let u=[];for(let c of o)c===" "?u.push("\\t"):c===`
761
- `?u.push("\\n"):c==="\r"?u.push("\\r"):u.push(c);return u.join("")},i=t.length>0?r.length+1:r.length,s=new Array(i),a=0;t.length>0&&(s[a]=t.map(n).join(" "),a+=1);for(let o of r)s[a]=o.map(n).join(" "),a+=1;return s.join(`
762
- `)},dh=e=>{let t=!1;for(let n of e)if(n==="\\"||n==="|"||n===`
763
- `||n==="&"||n==="<"||n===">"){t=!0;break}if(!t)return e;let r=[];for(let n of e)n==="\\"?r.push("\\\\"):n==="|"?r.push("\\|"):n===`
764
- `?r.push("<br>"):n==="&"?r.push("&amp;"):n==="<"?r.push("&lt;"):n===">"?r.push("&gt;"):r.push(n);return r.join("")},M8=e=>{let{headers:t,rows:r}=e;if(t.length===0)return"";let n=new Array(r.length+2),i=0,s=t.map(o=>dh(o));n[i]=`| ${s.join(" | ")} |`,i+=1;let a=new Array(t.length);for(let o=0;o<t.length;o+=1)a[o]="---";n[i]=`| ${a.join(" | ")} |`,i+=1;for(let o of r)if(o.length<t.length){let l=new Array(t.length);for(let u=0;u<t.length;u+=1)l[u]=u<o.length?dh(o[u]):"";n[i]=`| ${l.join(" | ")} |`,i+=1}else{let l=o.map(u=>dh(u));n[i]=`| ${l.join(" | ")} |`,i+=1}return n.join(`
765
- `)},B8=({children:e,className:t,onCopy:r,onError:n,timeout:i=2e3})=>{let s=We(),[a,o]=k.useState(!1),[l,u]=k.useState(!1),c=k.useRef(null),d=k.useRef(0),{isAnimating:h,controls:f}=k.useContext(Zt),m=zn(),b=L8(f),y=async x=>{var _,A;if(typeof window>"u"||!((_=navigator==null?void 0:navigator.clipboard)!=null&&_.write)){n==null||n(new Error("Clipboard API not available"));return}try{let S=(A=c.current)==null?void 0:A.closest('[data-streamdown="table-wrapper"]'),I=S==null?void 0:S.querySelector("table");if(!I){n==null||n(new Error("Table not found"));return}let N=O8(I),U="";x==="csv"?U=D8(N,b):x==="tsv"?U=Gre(N):U=M8(N);let z=new ClipboardItem({"text/plain":new Blob([U],{type:"text/plain"}),"text/html":new Blob([I.outerHTML],{type:"text/html"})});await navigator.clipboard.write([z]),u(!0),o(!1),r==null||r(x),d.current=window.setTimeout(()=>u(!1),i)}catch(S){n==null||n(S)}};k.useEffect(()=>{let x=_=>{let A=_.composedPath();c.current&&!A.includes(c.current)&&o(!1)};return document.addEventListener("mousedown",x),()=>{document.removeEventListener("mousedown",x),window.clearTimeout(d.current)}},[]);let E=pn(),w=l?E.CheckIcon:E.CopyIcon;return v.jsxs("div",{className:s("relative"),ref:c,children:[v.jsx("button",{className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:h,onClick:()=>o(!a),title:m.copyTable,type:"button",children:e??v.jsx(w,{height:14,width:14})}),a?v.jsxs("div",{className:s("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[v.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>y("md"),title:m.copyTableAsMarkdown,type:"button",children:m.tableFormatMarkdown}),v.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>y("csv"),title:m.copyTableAsCsv,type:"button",children:m.tableFormatCsv}),v.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>y("tsv"),title:m.copyTableAsTsv,type:"button",children:m.tableFormatTsv})]}):null]})},F8=({children:e,className:t,onDownload:r,onError:n})=>{let i=We(),[s,a]=k.useState(!1),o=k.useRef(null),{isAnimating:l,controls:u}=k.useContext(Zt),c=zn(),d=pn(),h=L8(u),f=m=>{var b;try{let y=(b=o.current)==null?void 0:b.closest('[data-streamdown="table-wrapper"]'),E=y==null?void 0:y.querySelector("table");if(!E){n==null||n(new Error("Table not found"));return}let w=O8(E),x=m==="csv"?D8(w,h):M8(w),_=m==="csv"?"csv":"md",A=`${R1(u,"table","table")}.${_}`;_a(A,x,m==="csv"?"text/csv":"text/markdown"),a(!1),r==null||r(m)}catch(y){n==null||n(y)}};return k.useEffect(()=>{let m=b=>{let y=b.composedPath();o.current&&!y.includes(o.current)&&a(!1)};return document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m)}},[]),v.jsxs("div",{className:i("relative"),ref:o,children:[v.jsx("button",{className:i("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:l,onClick:()=>a(!s),title:c.downloadTable,type:"button",children:e??v.jsx(d.DownloadIcon,{size:14})}),s?v.jsxs("div",{className:i("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[v.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>f("csv"),title:c.downloadTableAsCsv,type:"button",children:c.tableFormatCsv}),v.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>f("markdown"),title:c.downloadTableAsMarkdown,type:"button",children:c.tableFormatMarkdown})]}):null]})},Wre=({children:e,className:t,showCopy:r=!0,showDownload:n=!0})=>{let{Maximize2Icon:i,XIcon:s}=pn(),a=We(),[o,l]=k.useState(!1),{isAnimating:u,portal:c}=k.useContext(Zt),d=zn(),h=()=>{l(!0)},f=()=>{l(!1)};return k.useEffect(()=>{if(o){O1();let m=b=>{b.key==="Escape"&&l(!1)};return document.addEventListener("keydown",m),()=>{document.removeEventListener("keydown",m),L1()}}},[o]),v.jsxs(v.Fragment,{children:[v.jsx("button",{className:a("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:u,onClick:h,title:d.viewFullscreen,type:"button",children:v.jsx(i,{size:14})}),o?$a.createPortal(v.jsx("div",{"aria-label":d.viewFullscreen,"aria-modal":"true",className:a("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:f,onKeyDown:m=>{m.key==="Escape"&&f()},role:"dialog",children:v.jsxs("div",{className:a("flex h-full flex-col"),"data-streamdown":"table-wrapper",onClick:m=>m.stopPropagation(),onKeyDown:m=>m.stopPropagation(),role:"presentation",children:[v.jsxs("div",{className:a("flex items-center justify-end gap-1 p-4"),children:[r?v.jsx(B8,{}):null,n?v.jsx(F8,{}):null,v.jsx("button",{className:a("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:f,title:d.exitFullscreen,type:"button",children:v.jsx(s,{size:20})})]}),v.jsx("div",{className:a("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:v.jsx("table",{className:a("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),P1(c)):null]})},Zre=({children:e,className:t,maxHeight:r,showControls:n,showCopy:i=!0,showDownload:s=!0,showFullscreen:a=!0,...o})=>{let l=We(),{isAnimating:u}=k.useContext(Zt),c=w8(r),d=k8(u,!!c,e),h=n&&i,f=n&&s,m=n&&a,b=h||f||m;return v.jsxs("div",{className:l("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"),"data-streamdown":"table-wrapper",children:[b?v.jsxs("div",{className:l("flex items-center justify-end gap-1"),children:[h?v.jsx(B8,{}):null,f?v.jsx(F8,{}):null,m?v.jsx(Wre,{showCopy:h,showDownload:f,children:e}):null]}):null,v.jsx("div",{className:l("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),ref:d,style:c?{maxHeight:c}:void 0,children:v.jsx("table",{className:l("w-full divide-y divide-border",t),"data-streamdown":"table",...o,children:e})})]})},Yre=/startLine=(\d+)/,Kre=/\bnoLineNumbers\b/,Xre=k.lazy(()=>O(()=>Promise.resolve().then(()=>a0e),void 0).then(e=>({default:e.Mermaid}))),Qre=/language-([^\s]+)/,Jre="node";function mt(e,t){let r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;let n=e,i=t;for(let s of r)if(s!==Jre&&!Object.is(n[s],i[s]))return!1;return!0}function ene(e,t){var r,n;return((r=e==null?void 0:e.properties)==null?void 0:r.metastring)===((n=t==null?void 0:t.properties)==null?void 0:n.metastring)}var zc=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,hh=(e,t)=>{if(typeof e=="boolean")return e;let r=e.table;return r===!1?!1:r===!0||r===void 0?!0:r[t]!==!1},Fy=(e,t)=>{if(typeof e=="boolean")return e;let r=e.code;return r===!1?!1:r===!0||r===void 0?!0:r[t]!==!1},wu=(e,t)=>{if(typeof e=="boolean")return e;let r=e.mermaid;return r===!1?!1:r===!0||r===void 0?!0:r[t]!==!1},tne=(e,t)=>{if(typeof e=="boolean")return e;let r=e.image;return r===!1?!1:r===!0||r===void 0?!0:r[t]!==!1},B1=k.memo(({children:e,className:t,node:r,...n})=>{let i=We();return v.jsx("ol",{className:i("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...n,children:e})},(e,t)=>mt(e,t));B1.displayName="MarkdownOl";var z8=k.memo(({children:e,className:t,node:r,...n})=>{var i;let s=We(),a=Array.isArray(e)?e.filter(l=>l!==`
766
- `&&l!==""):[e],o=a.length===1&&k.isValidElement(a[0])&&(a[0].type===F1||((i=a[0].props.node)==null?void 0:i.tagname)==="p")?a[0].props.children:e;return v.jsx("li",{className:s("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...n,children:o})},(e,t)=>mt(e,t));z8.displayName="MarkdownLi";var $8=k.memo(({children:e,className:t,node:r,...n})=>{let i=We();return v.jsx("ul",{className:i("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...n,children:e})},(e,t)=>mt(e,t));$8.displayName="MarkdownUl";var j8=k.memo(({className:e,node:t,...r})=>{let n=We();return v.jsx("hr",{className:n("my-6 border-border",e),"data-streamdown":"horizontal-rule",...r})},(e,t)=>mt(e,t));j8.displayName="MarkdownHr";var U8=k.memo(({children:e,className:t,node:r,...n})=>{let i=We();return v.jsx("span",{className:i("font-semibold",t),"data-streamdown":"strong",...n,children:e})},(e,t)=>mt(e,t));U8.displayName="MarkdownStrong";var rne=({children:e,className:t,href:r,node:n,...i})=>{let s=We(),{linkSafety:a}=k.useContext(Zt),[o,l]=k.useState(!1),u=r==="streamdown:incomplete-link",c=k.useCallback(async m=>{if(!(!(a!=null&&a.enabled&&r)||u)){if(m.preventDefault(),a.onLinkCheck&&await a.onLinkCheck(r)){window.open(r,"_blank","noreferrer");return}l(!0)}},[a,r,u]),d=k.useCallback(()=>{r&&window.open(r,"_blank","noreferrer")},[r]),h=k.useCallback(()=>{l(!1)},[]),f={url:r??"",isOpen:o,onClose:h,onConfirm:d};return a!=null&&a.enabled&&r?v.jsxs(v.Fragment,{children:[v.jsx("button",{className:s("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":u,"data-streamdown":"link",onClick:c,type:"button",children:e}),a.renderModal?a.renderModal(f):v.jsx(Ore,{...f})]}):v.jsx("a",{className:s("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":u,"data-streamdown":"link",href:r,rel:"noreferrer",target:"_blank",...i,children:e})},H8=k.memo(rne,(e,t)=>mt(e,t));H8.displayName="MarkdownA";var V8=k.memo(({children:e,className:t,node:r,...n})=>{let i=We();return v.jsx("h1",{className:i("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...n,children:e})},(e,t)=>mt(e,t));V8.displayName="MarkdownH1";var q8=k.memo(({children:e,className:t,node:r,...n})=>{let i=We();return v.jsx("h2",{className:i("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...n,children:e})},(e,t)=>mt(e,t));q8.displayName="MarkdownH2";var G8=k.memo(({children:e,className:t,node:r,...n})=>{let i=We();return v.jsx("h3",{className:i("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...n,children:e})},(e,t)=>mt(e,t));G8.displayName="MarkdownH3";var W8=k.memo(({children:e,className:t,node:r,...n})=>{let i=We();return v.jsx("h4",{className:i("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...n,children:e})},(e,t)=>mt(e,t));W8.displayName="MarkdownH4";var Z8=k.memo(({children:e,className:t,node:r,...n})=>{let i=We();return v.jsx("h5",{className:i("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...n,children:e})},(e,t)=>mt(e,t));Z8.displayName="MarkdownH5";var Y8=k.memo(({children:e,className:t,node:r,...n})=>{let i=We();return v.jsx("h6",{className:i("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...n,children:e})},(e,t)=>mt(e,t));Y8.displayName="MarkdownH6";var K8=k.memo(({children:e,className:t,node:r,...n})=>{let{controls:i,tableMaxHeight:s}=k.useContext(Zt),a=zc(i,"table"),o=hh(i,"copy"),l=hh(i,"download"),u=hh(i,"fullscreen");return v.jsx(Zre,{className:t,maxHeight:s,showControls:a,showCopy:o,showDownload:l,showFullscreen:u,...n,children:e})},(e,t)=>mt(e,t));K8.displayName="MarkdownTable";var X8=k.memo(({children:e,className:t,node:r,...n})=>{let i=We();return v.jsx("thead",{className:i("bg-muted/80",t),"data-streamdown":"table-header",...n,children:e})},(e,t)=>mt(e,t));X8.displayName="MarkdownThead";var Q8=k.memo(({children:e,className:t,node:r,...n})=>{let i=We();return v.jsx("tbody",{className:i("divide-y divide-border",t),"data-streamdown":"table-body",...n,children:e})},(e,t)=>mt(e,t));Q8.displayName="MarkdownTbody";var J8=k.memo(({children:e,className:t,node:r,...n})=>{let i=We();return v.jsx("tr",{className:i("border-border",t),"data-streamdown":"table-row",...n,children:e})},(e,t)=>mt(e,t));J8.displayName="MarkdownTr";var ew=k.memo(({children:e,className:t,node:r,...n})=>{let i=We();return v.jsx("th",{className:i("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...n,children:e})},(e,t)=>mt(e,t));ew.displayName="MarkdownTh";var tw=k.memo(({children:e,className:t,node:r,...n})=>{let i=We();return v.jsx("td",{className:i("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...n,children:e})},(e,t)=>mt(e,t));tw.displayName="MarkdownTd";var rw=k.memo(({children:e,className:t,node:r,...n})=>{let i=We();return v.jsx("blockquote",{className:i("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...n,children:e})},(e,t)=>mt(e,t));rw.displayName="MarkdownBlockquote";var nw=k.memo(({children:e,className:t,node:r,...n})=>{let i=We();return v.jsx("sup",{className:i("text-sm",t),"data-streamdown":"superscript",...n,children:e})},(e,t)=>mt(e,t));nw.displayName="MarkdownSup";var iw=k.memo(({children:e,className:t,node:r,...n})=>{let i=We();return v.jsx("sub",{className:i("text-sm",t),"data-streamdown":"subscript",...n,children:e})},(e,t)=>mt(e,t));iw.displayName="MarkdownSub";var sw=k.memo(({children:e,className:t,node:r,...n})=>{if("data-footnotes"in n){let i=a=>{var o,l;if(!k.isValidElement(a))return!1;let u=Array.isArray(a.props.children)?a.props.children:[a.props.children],c=!1,d=!1;for(let h of u)if(h){if(typeof h=="string")h.trim()!==""&&(c=!0);else if(k.isValidElement(h))if(((o=h.props)==null?void 0:o["data-footnote-backref"])!==void 0)d=!0;else{let f=Array.isArray(h.props.children)?h.props.children:[h.props.children];for(let m of f){if(typeof m=="string"&&m.trim()!==""){c=!0;break}if(k.isValidElement(m)&&((l=m.props)==null?void 0:l["data-footnote-backref"])===void 0){c=!0;break}}}}return d&&!c},s=Array.isArray(e)?e.map(a=>{if(!k.isValidElement(a))return a;if(a.type===B1){let o=(Array.isArray(a.props.children)?a.props.children:[a.props.children]).filter(l=>!i(l));return o.length===0?null:{...a,props:{...a.props,children:o}}}return a}):e;return(Array.isArray(s)?s.some(a=>a!==null):s!==null)?v.jsx("section",{className:t,...n,children:s}):null}return v.jsx("section",{className:t,...n,children:e})},(e,t)=>mt(e,t));sw.displayName="MarkdownSection";var nne=({node:e,className:t,children:r,...n})=>{var i,s;let a=We(),o=!("data-block"in n),{mermaid:l,controls:u,lineNumbers:c}=k.useContext(Zt),d=M1(),h=T8(),f=t==null?void 0:t.match(Qre),m=(i=f==null?void 0:f.at(1))!=null?i:"",b=Lre(m);if(o)return v.jsx("code",{className:a("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...n,children:r});let y=(s=e==null?void 0:e.properties)==null?void 0:s.metastring,E=y==null?void 0:y.match(Yre),w=E?Number.parseInt(E[1],10):void 0,x=w!==void 0&&w>=1?w:void 0,_=!(y&&Kre.test(y))&&c!==!1,A="";if(k.isValidElement(r)&&r.props&&typeof r.props=="object"&&"children"in r.props&&typeof r.props.children=="string"?A=r.props.children:typeof r=="string"&&(A=r),b){let Z=b.component;return v.jsx(k.Suspense,{fallback:v.jsx(Dy,{}),children:v.jsx(Z,{code:A,isIncomplete:h,language:m,meta:y})})}if(m==="mermaid"&&d){let Z=zc(u,"mermaid"),V=wu(u,"download"),ae=wu(u,"copy"),J=wu(u,"fullscreen"),Y=wu(u,"panZoom"),de=Z&&(V||ae||J);return v.jsx(k.Suspense,{fallback:v.jsx(Dy,{}),children:v.jsxs("div",{className:a("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",t),"data-streamdown":"mermaid-block",children:[v.jsx("div",{className:a("flex h-8 items-center text-muted-foreground text-xs"),children:v.jsx("span",{className:a("ml-1 font-mono lowercase"),children:"mermaid"})}),de?v.jsx("div",{className:a("pointer-events-none absolute top-2 right-2 z-10 flex items-center"),children:v.jsxs("div",{className:a("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"mermaid-block-actions",children:[V?v.jsx(P8,{chart:A,config:l==null?void 0:l.config}):null,ae?v.jsx(lm,{code:A,...Oy(u,"mermaid")}):null,J?v.jsx(qre,{chart:A,config:l==null?void 0:l.config}):null]})}):null,v.jsx("div",{className:a("overflow-hidden rounded-md border border-border bg-background"),children:v.jsx(Xre,{chart:A,config:l==null?void 0:l.config,showControls:Y})})]})})}let S=zc(u,"code"),I=Fy(u,"download"),N=Fy(u,"copy"),{"data-block":U,...z}=n;return v.jsx(yre,{className:t,code:A,isIncomplete:h,language:m,lineNumbers:_,startLine:x,...z,children:S?v.jsxs(v.Fragment,{children:[I?v.jsx(Nre,{code:A,language:m}):null,N?v.jsx(lm,{...Oy(u,"code")}):null]}):null})},aw=k.memo(nne,(e,t)=>mt(e,t)&&ene(e.node,t.node));aw.displayName="MarkdownCode";var ine=({node:e,className:t,...r})=>{let{controls:n}=k.useContext(Zt),i=zc(n,"image"),s=i&&tne(n,"download");return v.jsx(Pre,{className:t,node:e,showControls:i,showDownloadControl:s,...r})},ow=k.memo(ine,(e,t)=>mt(e,t));ow.displayName="MarkdownImg";var F1=k.memo(({children:e,node:t,...r})=>{let n=(Array.isArray(e)?e:[e]).filter(i=>i!=null&&i!=="");if(n.length===1&&k.isValidElement(n[0])){let i=n[0].props.node,s=i==null?void 0:i.tagName;if(s==="img")return v.jsx(v.Fragment,{children:e});if(s==="code"&&"data-block"in n[0].props)return v.jsx(v.Fragment,{children:e})}return v.jsx("p",{...r,children:e})},(e,t)=>mt(e,t));F1.displayName="MarkdownParagraph";var sne={ol:B1,li:z8,ul:$8,hr:j8,strong:U8,a:H8,h1:V8,h2:q8,h3:G8,h4:W8,h5:Z8,h6:Y8,table:K8,thead:X8,tbody:Q8,tr:J8,th:ew,td:tw,blockquote:rw,code:aw,img:ow,pre:({children:e})=>k.isValidElement(e)?k.cloneElement(e,{"data-block":"true"}):e,sup:nw,sub:iw,p:F1,section:sw},ane=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,one=new RegExp("\\p{L}","u");function lw(e){let t=e.replace(/(```|~~~)[\s\S]*?\1/g,"").replace(/^#{1,6}\s+/gm,"").replace(/(\*{1,3}|_{1,3})/g,"").replace(/`[^`]*`/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^[\s>*\-+\d.]+/gm,""),r,n=0,i=0;for(let s of t){if(ane.test(s)){r!=null||(r="rtl"),i+=1;continue}one.test(s)&&(r!=null||(r="ltr"),n+=1)}return i>n?"rtl":n>i?"ltr":r??"ltr"}var lne=/^[ \t]{0,3}(`{3,}|~{3,})/,une=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,zy=e=>{let t=e.split(`
767
- `),r=null,n=0;for(let i of t){let s=lne.exec(i);if(r===null){if(s){let a=s[1];r=a[0],n=a.length}}else if(s){let a=s[1],o=a[0],l=a.length;o===r&&l>=n&&(r=null,n=0)}}return r!==null},cne=e=>{let t=e.split(`
768
- `);for(let r of t){let n=r.trim();if(n.length>0&&n.includes("|")&&une.test(n))return!0}return!1},dne=()=>e=>{Yr(e,"html",(t,r,n)=>{!n||typeof r!="number"||(n.children[r]={type:"text",value:t.value})})},$y=[],jy={allowDangerousHtml:!0},ku=new WeakMap,hne=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let r=e.rehypePlugins,n=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(r||n||i)){let c="default";return this.keyCache.set(e,c),c}let s=c=>{if(!c||c.length===0)return"";let d="";for(let h=0;h<c.length;h+=1){let f=c[h];if(h>0&&(d+=","),Array.isArray(f)){let[m,b]=f;if(typeof m=="function"){let y=ku.get(m);y||(y=m.name,ku.set(m,y)),d+=y}else d+=String(m);d+=":",d+=JSON.stringify(b)}else if(typeof f=="function"){let m=ku.get(f);m||(m=f.name,ku.set(f,m)),d+=m}else d+=String(f)}return d},a=s(r),o=s(n),l=i?JSON.stringify(i):"",u=`${o}::${a}::${l}`;return this.keyCache.set(e,u),u}get(e){let t=this.generateCacheKey(e),r=this.cache.get(t);return r&&(this.cache.delete(t),this.cache.set(t,r)),r}set(e,t){let r=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let n=this.cache.keys().next().value;n&&this.cache.delete(n)}this.cache.set(r,t)}clear(){this.cache.clear()}},Uy=new hne,uw=e=>{let t=fne(e),r=e.children||"",n=t.runSync(t.parse(r),r);return xne(n,e)},fne=e=>{let t=Uy.get(e);if(t)return t;let r=pne(e);return Uy.set(e,r),r},mne=e=>e.some(t=>Array.isArray(t)?t[0]===Yf:t===Yf),pne=e=>{let t=e.rehypePlugins||$y,r=e.remarkPlugins||$y,n=mne(t)?r:[...r,dne],i=e.remarkRehypeOptions?{...jy,...e.remarkRehypeOptions}:jy;return Mee().use(DJ).use(n).use(bee,i).use(t)},gne=e=>e,bne=(e,t,r,n)=>{r?e.children.splice(t,1):e.children[t]={type:"text",value:n}},yne=(e,t)=>{var r;for(let n in rh)if(Object.hasOwn(rh,n)&&Object.hasOwn(e.properties,n)){let i=e.properties[n],s=rh[n];(s===null||s.includes(e.tagName))&&(e.properties[n]=(r=t(String(i||""),n,e))!=null?r:void 0)}},vne=(e,t,r,n,i,s)=>{let a=!1;return n?a=!n.includes(e.tagName):i&&(a=i.includes(e.tagName)),!a&&s&&typeof t=="number"&&(a=!s(e,t,r)),a},xne=(e,t)=>{let{allowElement:r,allowedElements:n,disallowedElements:i,skipHtml:s,unwrapDisallowed:a,urlTransform:o}=t;if(r||n||i||s||o){let l=o||gne;Yr(e,(u,c,d)=>{if(u.type==="raw"&&d&&typeof c=="number")return bne(d,c,s,u.value),c;if(u.type==="element"&&(yne(u,l),vne(u,c,d,n,i,r)&&d&&typeof c=="number"))return a&&u.children?d.children.splice(c,1,...u.children):d.children.splice(c,1),c})}return HQ(e,{Fragment:v.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:v.jsx,jsxs:v.jsxs,passKeys:!0,passNode:!0})},Ene=/\[\^[\w-]{1,200}\](?!:)/,_ne=/\[\^[\w-]{1,200}\]:/,Tne=/<([A-Za-z][\w:-]*)[\s>/]/,wne=/^ {0,3}\[[^\]]+\]:/m,kne=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Hy=new Map,Vy=new Map,Sne=e=>{let t=e.toLowerCase(),r=Hy.get(t);if(r)return r;let n=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return Hy.set(t,n),n},Ane=e=>{let t=e.toLowerCase(),r=Vy.get(t);if(r)return r;let n=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return Vy.set(t,n),n},qy=(e,t)=>{if(kne.has(t.toLowerCase()))return 0;let r=e.match(Sne(t));if(!r)return 0;let n=0;for(let i of r)i.trimEnd().endsWith("/>")||(n+=1);return n},Gy=(e,t)=>{let r=e.match(Ane(t));return r?r.length:0},Cne=e=>{let t=0;for(let r=0;r<e.length-1;r+=1)e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},Ine=/\r\n|\r/g,cw=e=>new zr({gfm:!0}).blockTokens(e),ra=null,Nne=`
769
-
770
- `,Rne=e=>{for(let t=e.length-3;t>=0;t-=1)if(e[t].endsWith(Nne))return t+1;return 0},Pne=e=>` ${e}`.slice(1),dw=e=>e.map(Pne),hw=e=>{let t=[],r=[],n=!1;for(let i of e){let s=i.raw,a=t.length;if(r.length>0){t[a-1]+=s;let o=r.at(-1),l=qy(s,o),u=Gy(s,o);for(let c=0;c<l;c+=1)r.push(o);for(let c=0;c<u;c+=1)r.length>0&&r.at(-1)===o&&r.pop();continue}if(i.type==="html"&&i.block){let o=s.match(Tne);if(o){let l=o[1],u=qy(s,l),c=Gy(s,l);u>c&&r.push(l)}}if(i.type==="space"&&a>0){t[a-1]+=s;continue}if(a>0&&!n){let o=t[a-1];if(Cne(o)%2===1){t[a-1]=o+s;continue}}t.push(s),i.type!=="space"&&(n=i.type==="code")}return t},One=(e,t)=>{if(t.length<=e.input.length||t.slice(0,e.input.length)!==e.input||wne.test(t))return null;let r=Rne(e.blocks);if(r===0)return null;let n=e.verifiedCount,i=e.verifiedLength;if(n>r){n=r,i=0;for(let a=0;a<n;a+=1)i+=e.blocks[a].length}for(;n<r&&t.startsWith(e.blocks[n],i);)i+=e.blocks[n].length,n+=1;if(n!==r)return null;let s=dw(hw(cw(t.slice(i))));return{input:t,blocks:e.blocks.slice(0,r).concat(s),verifiedCount:n,verifiedLength:i}},Lne=e=>{let t=Ene.test(e),r=_ne.test(e);if(t||r)return[e];let n=e.includes("\r")?e.replace(Ine,`
771
- `):e;if((ra==null?void 0:ra.input)===n)return ra.blocks;let i=ra?One(ra,n):null,s=i??{input:n,blocks:dw(hw(cw(n))),verifiedCount:0,verifiedLength:0};return ra=s,s.blocks},Dne=/^\n*/,Mne=/\n*$/,dm=/\n\n/g,Bne=(e,t,r)=>{if(!t.includes(`
772
- `))return e+t+r;let n=t.replace(dm,`
773
- <!---->
774
- `).replace(Dne,`
775
-
776
- `).replace(Mne,`
777
-
778
- `);return`${e}${n}${r}
779
-
780
- `},Fne=(e,t)=>{let r=new RegExp(`<(${t})(?=[\\s>/])([^>]*)>`,"gi"),n="",i=0,s=r.exec(e);for(;s;){let a=s[0],o=s[1],l=s.index+a.length,u=e.slice(l);if(new RegExp(`</${o}\\s*>`,"i").test(u)){s=r.exec(e);continue}if(n+=e.slice(i,s.index),u.length===0){n+=a,i=l,s=r.exec(e);continue}if(u.startsWith(`
781
-
782
- `)){let h=u.slice(2).replace(dm,`
783
- <!---->
784
- `);n+=`${a}
785
-
786
- ${h}`,i=e.length;break}if(!u.startsWith(`
787
- `)){n+=a,i=l,s=r.exec(e);continue}let c=u.slice(1);if(c.trim().length===0){n+=a,i=l,s=r.exec(e);continue}let d=c.replace(dm,`
788
- <!---->
789
- `);n+=`${a}
790
-
791
- ${d}`,i=e.length;break}return i===0?e:n+e.slice(i)},zne=(e,t)=>{if(!t.length)return e;let r=e;for(let n of t){let i=new RegExp(`(<${n}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${n}\\s*>)`,"gi");r=r.replace(i,(s,a,o,l)=>Bne(a,o,l)),r=Fne(r,n)}return r},$ne=/([\\`*_~[\]|])/g,jne=e=>e.replace($ne,"\\$1"),Une=(e,t)=>{if(!t.length)return e;let r=e;for(let n of t){let i=new RegExp(`(<${n}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${n}\\s*>)`,"gi");r=r.replace(i,(s,a,o,l)=>{let u=jne(o).replace(/\n\n/g,"&#10;&#10;");return a+u+l})}return r},Hne=new Set(["blockquote","dd","dt","figcaption","h1","h2","h3","h4","h5","h6","li","p","td","th"]),fw=new Set(["code","kbd","pre","samp","var"]);function mw(e){return e.children.map(t=>t.type==="text"?t.value:t.type==="element"&&!fw.has(t.tagName)?mw(t):"").join("")}function Vne(){return e=>{Yr(e,"element",t=>{if(fw.has(t.tagName)){t.properties!=null||(t.properties={}),t.properties.dir="ltr";return}Hne.has(t.tagName)&&(t.properties!=null||(t.properties={}),typeof t.properties.dir!="string"&&(t.properties.dir=lw(mw(t))))})}}var pw=e=>e.type==="text"?e.value:"children"in e&&Array.isArray(e.children)?e.children.map(pw).join(""):"",qne=e=>t=>{if(!e||e.length===0)return;let r=new Set(e.map(n=>n.toLowerCase()));Yr(t,"element",n=>{if(r.has(n.tagName.toLowerCase())){let i=pw(n);n.children=i?[{type:"text",value:i}]:[]}})},Gne=()=>e=>{Yr(e,"code",t=>{var r,n;t.meta&&(t.data=(r=t.data)!=null?r:{},t.data.hProperties={...(n=t.data.hProperties)!=null?n:{},metastring:t.meta})})},Wne=/^([a-zA-Z][a-zA-Z\d+\-.]*:)/,Zne=e=>new Set(e.map(t=>t.trim().toLowerCase()).filter(t=>t.length>0).map(t=>t.endsWith(":")?t:`${t}:`));function Yne(e,t,r){var n,i;let s=(i=(n=e.position)==null?void 0:n.start)==null?void 0:i.offset;if(typeof s=="number"&&r.charCodeAt(s)===91||e.children.length!==1)return!1;let[a]=e.children;if(a.type!=="text")return!1;let o=Wne.exec(e.url);if(!o)return!1;let l=o[1].toLowerCase();return t.has(l)?l==="mailto:"?e.url===`mailto:${a.value}`:e.url===a.value||e.url===`${l}//${a.value}`:!1}var Kne=(e=[])=>{let t=Zne(e);return(r,n)=>{var i;if(t.size===0)return;let s=String((i=n.value)!=null?i:"");Yr(r,"link",(a,o,l)=>{if(!(!l||o===void 0)&&Yne(a,t,s))return l.children.splice(o,1,...a.children),o})}},Wy="data-sd-caret-hidden",Xne=e=>{let t=k.useRef(null),r=k.useRef(null),[n,i]=k.useState(!1);return k.useEffect(()=>i(!0),[]),k.useLayoutEffect(()=>{var s,a;let o=e&&(a=(s=t.current)==null?void 0:s.lastElementChild)!=null?a:null,l=r.current;l!==o&&(l==null||l.removeAttribute(Wy),o==null||o.setAttribute(Wy,""),r.current=o)}),{containerRef:t,showCaret:n||!e}},Zy=/^[a-z]/,Qne=/^[ \t]*<[\w!/?-]/,Jne=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,eie=e=>typeof e!="string"||e.length===0||!Qne.test(e)?e:e.replace(Jne,"$1"),Yy,Ky,Xy,Qy,Jy,e3,Hu={...Ti,clobberPrefix:"",protocols:{...Ti.protocols,href:[...(Ky=(Yy=Ti.protocols)==null?void 0:Yy.href)!=null?Ky:[],"tel","streamdown"],src:[...(Qy=(Xy=Ti.protocols)==null?void 0:Xy.src)!=null?Qy:[],"streamdown"]},attributes:{...Ti.attributes,code:[...(e3=(Jy=Ti.attributes)==null?void 0:Jy.code)!=null?e3:[],"metastring"]}},Ba={raw:Yf,sanitize:[o7,Hu],harden:[GH,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},tie={gfm:[HK,{}],codeMeta:Gne},t3=Object.values(Ba),rie=Object.values(tie),nie={block:" ▋",circle:" ●"},gw=["github-light","github-dark"],bw={enabled:!0},iie={codeBlockMaxHeight:400,shikiTheme:gw,controls:!0,isAnimating:!1,lineNumbers:!0,mode:"streaming",mermaid:void 0,linkSafety:bw,portal:void 0,tableMaxHeight:300},Zt=k.createContext(iie),yw=k.memo(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:r,index:n,isIncomplete:i,dir:s,animatePlugin:a,...o})=>{k.useLayoutEffect(()=>{a==null||a.commit()});let l=typeof e=="string"&&r?eie(e):e,u=v.jsx(uw,{...o,children:l});return v.jsx(_8.Provider,{value:i,children:s?v.jsx("div",{dir:s,style:{display:"contents"},children:u}):u})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete||e.dir!==t.dir)return!1;if(e.components!==t.components){let r=Object.keys(e.components||{}),n=Object.keys(t.components||{});if(r.length!==n.length||r.some(i=>{var s,a;return((s=e.components)==null?void 0:s[i])!==((a=t.components)==null?void 0:a[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins||!!e.animatePlugin!=!!t.animatePlugin)});yw.displayName="Block";var z1=k.memo(({children:e,mode:t="streaming",dir:r,parseIncompleteMarkdown:n=!0,normalizeHtmlIndentation:i=!1,components:s,rehypePlugins:a=t3,remarkPlugins:o=rie,className:l,shikiTheme:u,mermaid:c,codeBlockMaxHeight:d=400,controls:h=!0,isAnimating:f=!1,tableMaxHeight:m=300,animated:b,BlockComponent:y=yw,parseMarkdownIntoBlocksFn:E=Lne,caret:w,plugins:x,remend:_,linkSafety:A=bw,portal:S,lineNumbers:I=!0,allowedTags:N,fallbackComponent:U,literalTagContent:z,disableAutolinkProtocols:Z,translations:V,icons:ae,prefix:J,onAnimationStart:Y,onAnimationEnd:de,...xe})=>{let Ue=k.useId(),He=k.useMemo(()=>lre(J),[J]),L=k.useRef(null),Re=k.useRef(Y),Q=k.useRef(de);Re.current=Y,Q.current=de,k.useEffect(()=>{var Se,W,ne;if(t==="static")return;let Ee=L.current;if(L.current=f,Ee===null){f&&((Se=Re.current)==null||Se.call(Re));return}f&&!Ee?(W=Re.current)==null||W.call(Re):!f&&Ee&&((ne=Q.current)==null||ne.call(Q))},[f,t]);let M=k.useMemo(()=>N?Object.keys(N):[],[N]),pe=k.useMemo(()=>{if(typeof e!="string")return"";let Se=t==="streaming"&&n?IQ(e,_):e;return z&&z.length>0&&(Se=Une(Se,z)),M.length>0&&(Se=zne(Se,M)),Se},[e,t,n,_,M,z]),oe=k.useMemo(()=>E(pe),[pe,E]),fe=k.useMemo(()=>r==="auto"?oe.map(lw):void 0,[oe,r]),Ae=k.useMemo(()=>oe.map((Se,W)=>`${Ue}-${W}`),[oe.length,Ue]),ze=k.useMemo(()=>b===!0?"true":b?JSON.stringify(b):"",[b]),re=k.useRef(null),Le=k.useRef([]),et=k.useRef([]),Te=k.useRef(null),Ke=k.useRef("");if(ze){if(Ke.current!==ze){Ke.current=ze;let Se=ze!=="true"?b.maxBacklogMs:void 0;re.current=Iy({maxBacklogMs:Se}),Le.current=[],et.current=[]}else re.current||(re.current=Iy());f&&re.current&&re.current.beginPass(re.current.now())}else re.current=null,Le.current=[],et.current=[],Ke.current="";k.useLayoutEffect(()=>{var Se;f&&((Se=re.current)==null||Se.commitPass())});let ot=k.useMemo(()=>{var Se,W;return{codeBlockMaxHeight:d,shikiTheme:(W=u??((Se=x==null?void 0:x.code)==null?void 0:Se.getThemes()))!=null?W:gw,controls:h,isAnimating:f,lineNumbers:I,mode:t,mermaid:c,linkSafety:A,portal:S,tableMaxHeight:m}},[d,u,h,f,I,t,c,A,S,x==null?void 0:x.code,m]),Rt=k.useMemo(()=>V?JSON.stringify(V):"",[V]),bn=k.useMemo(()=>({...I8,...V}),[Rt]),Jr=k.useMemo(()=>{let{inlineCode:Se,...W}=s??{},ne={...sne,...W};if(Se){let Ee=ne.code;ne.code=ke=>"data-block"in ke?Ee?k.createElement(Ee,ke):null:k.createElement(Se,ke)}if(U){if(N)for(let ke of Object.keys(N))Object.hasOwn(ne,ke)||(ne[ke]=U);let Ee={configurable:!0,enumerable:!1,value:U,writable:!1};return new Proxy(ne,{getOwnPropertyDescriptor(ke,$e){let jt=Object.getOwnPropertyDescriptor(ke,$e);if(jt)return jt;if(typeof $e=="string"&&Zy.test($e))return Ee},get(ke,$e,jt){return typeof $e=="string"&&Zy.test($e)&&!Object.hasOwn(ke,$e)?U:Reflect.get(ke,$e,jt)}})}return ne},[s,U,N]),$n=k.useMemo(()=>{let Se=[];return x!=null&&x.cjk&&(Se=[...Se,...x.cjk.remarkPluginsBefore]),Se=[...Se,...o],Z&&Z.length>0&&(Se=[...Se,[Kne,Z]]),x!=null&&x.cjk&&(Se=[...Se,...x.cjk.remarkPluginsAfter]),x!=null&&x.math&&(Se=[...Se,x.math.remarkPlugin]),Se},[o,x==null?void 0:x.math,x==null?void 0:x.cjk,Z]),_r=k.useMemo(()=>{var Se;let W=a;if(N&&Object.keys(N).length>0&&a===t3){let ne={...Hu,tagNames:[...(Se=Hu.tagNames)!=null?Se:[],...Object.keys(N)],attributes:{...Hu.attributes,...N}};W=[Ba.raw,[o7,ne],Ba.harden]}return z&&z.length>0&&(W=[...W,[qne,z]]),x!=null&&x.math&&(W=[...W,x.math.rehypePlugin]),r==="auto"&&t==="static"&&(W=[...W,Vne]),W},[a,x==null?void 0:x.math,N,z,r,t]),en=k.useMemo(()=>w&&f?{"--streamdown-caret":`"${nie[w]}"`}:void 0,[w,f]),ao=k.useMemo(()=>{if(!f||oe.length===0)return!1;let Se=oe.at(-1);return zy(Se)||cne(Se)},[f,oe]),{containerRef:oo,showCaret:Qi}=Xne(ao),qs=Se=>{let W=null;if(re.current&&f){if(!Le.current[Se]){let Ee=ze&&ze!=="true"?b:{},{maxBacklogMs:ke,...$e}=Ee;Le.current[Se]=are({...$e,timeline:re.current})}W=Le.current[Se]}Te.current!==_r&&(et.current=[],Te.current=_r),W&&!et.current[Se]&&(et.current[Se]=[..._r,W.rehypePlugin]);let ne=W&&et.current[Se]?et.current[Se]:_r;return{blockAnimatePlugin:W,blockRehypePlugins:ne}};return t==="static"?v.jsx(om.Provider,{value:bn,children:v.jsx(um.Provider,{value:x??null,children:v.jsx(Zt.Provider,{value:ot,children:v.jsx(Py,{icons:ae,children:v.jsx(am.Provider,{value:He,children:v.jsx("div",{className:He("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",l),dir:r==="auto"?void 0:r,children:v.jsx(uw,{components:Jr,rehypePlugins:_r,remarkPlugins:$n,...xe,children:pe})})})})})})}):v.jsx(om.Provider,{value:bn,children:v.jsx(um.Provider,{value:x??null,children:v.jsx(Zt.Provider,{value:ot,children:v.jsx(Py,{icons:ae,children:v.jsx(am.Provider,{value:He,children:v.jsxs("div",{className:He("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",w&&Qi?"[&>*:last-child:not([data-sd-caret-hidden])]:after:inline [&>*:last-child:not([data-sd-caret-hidden])]:after:align-baseline [&>*:last-child:not([data-sd-caret-hidden])]:after:content-[var(--streamdown-caret)]":null,l),ref:oo,style:en,children:[oe.length===0&&w&&f&&v.jsx("span",{}),oe.map((Se,W)=>{var ne;let Ee=W===oe.length-1,ke=f&&Ee&&zy(Se),{blockAnimatePlugin:$e,blockRehypePlugins:jt}=qs(W);return v.jsx(y,{animatePlugin:$e,components:Jr,content:Se,dir:(ne=fe==null?void 0:fe[W])!=null?ne:r!=="auto"?r:void 0,index:W,isIncomplete:ke,rehypePlugins:jt,remarkPlugins:$n,shouldNormalizeHtmlIndentation:i,shouldParseIncompleteMarkdown:n,...xe},Ae[W])})]})})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.lineNumbers===t.lineNumbers&&e.codeBlockMaxHeight===t.codeBlockMaxHeight&&e.tableMaxHeight===t.tableMaxHeight&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&e.disableAutolinkProtocols===t.disableAutolinkProtocols&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir&&e.fallbackComponent===t.fallbackComponent);z1.displayName="Streamdown";var _o=e=>e>0?e:null,sie=(e,t)=>{if(e.endsWith("px"))return _o(Number.parseFloat(e));if(e.endsWith("rem")){let r=Number.parseFloat(getComputedStyle(document.documentElement).fontSize||"16");return _o(Number.parseFloat(e)*r)}if(e.endsWith("em")){let r=Number.parseFloat(getComputedStyle(t).fontSize||"16");return _o(Number.parseFloat(e)*r)}if(e.endsWith("vh"))return _o(Number.parseFloat(e)/100*window.innerHeight);if(e.endsWith("%")){let r=t.parentElement;return r&&r.clientHeight>0?_o(Number.parseFloat(e)/100*r.clientHeight):null}return null},fh=(e,t)=>{let r=t.trim().toLowerCase();return!r||r==="none"||r==="auto"?null:sie(r,e)},aie=/^min\(\s*([^,]+)\s*,\s*([^)]+)\s*\)$/i,oie=(e,t)=>{let r=fh(e,t);if(r!=null)return r;let n=t.trim().match(aie);if(!n)return null;let i=fh(e,n[1].trim()),s=fh(e,n[2].trim());return i==null||s==null?null:Math.min(i,s)},lie=(e,t,r)=>{let n=t.clientWidth;if(!(n>0))return null;if(r){let c=t.clientHeight;if(!(c>0))return null;let d=Math.min(n/e.width,c/e.height,1);return!(d>0)||Number.isNaN(d)?null:{fitZoom:d,viewportHeight:null}}let i=Math.min(n/e.width,1);if(!(i>0)||Number.isNaN(i))return null;let s=e.height*i,a=null,o=t;for(;o&&a==null;){let c=getComputedStyle(o);a=oie(o,c.maxHeight),o=o.parentElement}let l=a!=null?Math.min(s,a):s,u=Math.min(i,l/e.height,1);return!(u>0)||Number.isNaN(u)?null:{fitZoom:u,viewportHeight:l}},uie=({children:e,className:t,contentSize:r,fitKey:n,minZoom:i=.5,maxZoom:s=3,zoomStep:a=.1,showControls:o=!0,initialZoom:l=1,isAutoFit:u=!1,fullscreen:c=!1})=>{let{RotateCcwIcon:d,ZoomInIcon:h,ZoomOutIcon:f}=pn(),m=We(),b=zn(),y=k.useRef(null),E=k.useRef(null),w=k.useRef(!1),[x,_]=k.useState(l),[A,S]=k.useState(i),[I,N]=k.useState(l),[U,z]=k.useState({x:0,y:0}),[Z,V]=k.useState(!1),[ae,J]=k.useState({x:0,y:0}),[Y,de]=k.useState({x:0,y:0}),[xe,Ue]=k.useState(null),He=k.useCallback(re=>{let Le=y.current;if(!Le)return;let et=lie(re,Le,c);if(!et)return;let{fitZoom:Te,viewportHeight:Ke}=et;Ue(Ke),_(Te),S(Math.min(i,Te)),w.current||(N(Te),z({x:0,y:0}))},[c,i]),L=k.useCallback(re=>{N(Le=>Math.max(A,Math.min(s,Le+re))),w.current=!0},[A,s]),Re=k.useCallback(()=>{L(a)},[L,a]),Q=k.useCallback(()=>{L(-a)},[L,a]),M=k.useCallback(()=>{N(x),z({x:0,y:0}),w.current=!1},[x]),pe=k.useCallback(re=>{re.preventDefault();let Le=re.deltaY>0?-a:a;L(Le)},[L,a]),oe=k.useCallback(re=>{if(re.button!==0||re.isPrimary===!1)return;V(!0),w.current=!0,J({x:re.clientX,y:re.clientY}),de(U);let Le=re.currentTarget;Le instanceof HTMLElement&&Le.setPointerCapture(re.pointerId)},[U]),fe=k.useCallback(re=>{if(!Z)return;re.preventDefault();let Le=re.clientX-ae.x,et=re.clientY-ae.y;z({x:Y.x+Le,y:Y.y+et})},[Z,ae,Y]),Ae=k.useCallback(re=>{V(!1);let Le=re.currentTarget;Le instanceof HTMLElement&&Le.releasePointerCapture(re.pointerId)},[]);k.useEffect(()=>{S(i),u||(_(l),N(l),Ue(null))},[l,u,i]),k.useLayoutEffect(()=>{if(!(u&&r))return;He(r);let re=y.current;if(!re||typeof ResizeObserver>"u")return;let Le=new ResizeObserver(()=>{He(r)});return Le.observe(re),()=>{Le.disconnect()}},[He,r,u]),k.useEffect(()=>{u&&(w.current=!1)},[n,u]),k.useEffect(()=>{let re=y.current;if(re)return re.addEventListener("wheel",pe,{passive:!1}),()=>{re.removeEventListener("wheel",pe)}},[pe]),k.useEffect(()=>{let re=E.current;if(re&&Z)return document.body.style.userSelect="none",re.addEventListener("pointermove",fe,{passive:!1}),re.addEventListener("pointerup",Ae),re.addEventListener("pointercancel",Ae),()=>{document.body.style.userSelect="",re.removeEventListener("pointermove",fe),re.removeEventListener("pointerup",Ae),re.removeEventListener("pointercancel",Ae)}},[Z,fe,Ae]);let ze=!c&&u&&xe!=null?{height:xe}:void 0;return v.jsxs("div",{className:m("relative flex flex-col",c?"h-full w-full":"min-h-28 w-full",t),ref:y,style:{cursor:Z?"grabbing":"grab",...ze},children:[o?v.jsxs("div",{className:m("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm",c?"bottom-4 left-4":"bottom-2 left-2"),children:[v.jsx("button",{"aria-label":b.zoomIn,className:m("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:I>=s,onClick:Re,title:b.zoomIn,type:"button",children:v.jsx(h,{"aria-hidden":"true",size:16})}),v.jsx("button",{"aria-label":b.zoomOut,className:m("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:I<=A,onClick:Q,title:b.zoomOut,type:"button",children:v.jsx(f,{"aria-hidden":"true",size:16})}),v.jsx("button",{"aria-label":b.resetView,className:m("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"),onClick:M,title:b.resetView,type:"button",children:v.jsx(d,{"aria-hidden":"true",size:16})})]}):null,v.jsx("div",{className:m("flex h-full w-full flex-1 origin-center items-center justify-center transition-transform duration-150 ease-out"),onPointerDown:oe,ref:E,role:"application",style:{transform:`translate(${U.x}px, ${U.y}px) scale(${I})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},cie=(e,t)=>new Promise(r=>{let n=setTimeout(r,e);t(()=>{clearTimeout(n),r()})}),die=async(e,{chart:t,config:r},n)=>{try{let i=e.getMermaid(r),s=t.split("").reduce((u,c)=>(u<<5)-u+c.charCodeAt(0)|0,0),a=`mermaid-${Math.abs(s)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:o}=await i.render(a,t),l=R8(o);return{ok:!0,svg:n?o:Ure(o),size:l}}catch(i){return{ok:!1,error:i instanceof Error?i.message:"Failed to render Mermaid chart"}}},vw=({chart:e,className:t,config:r,fullscreen:n=!1,showControls:i=!0})=>{let s=We(),[a,o]=k.useState(null),[l,u]=k.useState(!1),[c,d]=k.useState(""),[h,f]=k.useState(null),[m,b]=k.useState(""),[y,E]=k.useState(0),{mermaid:w}=k.useContext(Zt),x=M1(),_=w==null?void 0:w.errorComponent,{shouldRender:A,containerRef:S}=Vte({immediate:n}),I=k.useRef(null),N=k.useRef(!1),U=k.useRef(!1),z=T8(),Z=k.useRef(z),V=k.useRef(null);k.useEffect(()=>(U.current=!0,()=>{var Y;U.current=!1,(Y=V.current)==null||Y.call(V)}),[]),k.useEffect(()=>{var Y;Z.current=z,z||(Y=V.current)==null||Y.call(V)},[z]);let ae=async Y=>{Z.current&&(await cie(Y,de=>{V.current=de}),V.current=null)};if(k.useEffect(()=>{if(!A)return;if(!x){o("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}if(I.current={chart:e,config:r},N.current)return;let Y=(de,xe)=>{xe.ok?(d(xe.svg),f(xe.size),b(xe.svg)):de===I.current&&o(xe.error)};(async()=>{N.current=!0,o(null),u(!0);try{let de=I.current;for(;de;){let xe=performance.now(),Ue=await die(x,de,n);if(!U.current||(Y(de,Ue),Ue.ok&&await ae(performance.now()-xe),!U.current||de===I.current))return;de=I.current}}finally{N.current=!1,U.current&&u(!1)}})()},[e,r,y,A,x]),!(A||c||m))return v.jsx("div",{className:s("my-4 min-h-[200px]",t),ref:S});if(l&&!c&&!m)return v.jsx("div",{className:s("my-4 flex justify-center p-4",t),ref:S,children:v.jsxs("div",{className:s("flex items-center space-x-2 text-muted-foreground"),children:[v.jsx("div",{className:s("h-4 w-4 animate-spin rounded-full border-current border-b-2")}),v.jsx("span",{className:s("text-sm"),children:"Loading diagram..."})]})});if(a&&!c&&!m){let Y=()=>E(de=>de+1);return _?v.jsx("div",{ref:S,children:v.jsx(_,{chart:e,error:a,retry:Y})}):v.jsxs("div",{className:s("rounded-md bg-red-50 p-4",t),ref:S,children:[v.jsxs("p",{className:s("font-mono text-red-700 text-sm"),children:["Mermaid Error: ",a]}),v.jsxs("details",{className:s("mt-2"),children:[v.jsx("summary",{className:s("cursor-pointer text-red-600 text-xs"),children:"Show Code"}),v.jsx("pre",{className:s("mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs"),children:e})]})]})}let J=c||m;return v.jsx("div",{className:s(n?"size-full":"max-h-[min(70vh,40rem)] w-full",t),"data-streamdown":"mermaid",ref:S,children:v.jsx(uie,{className:s(n?"size-full overflow-hidden":"max-h-[min(70vh,40rem)] overflow-hidden",t),contentSize:h,fitKey:e,fullscreen:n,isAutoFit:!0,maxZoom:3,minZoom:.1,showControls:i,zoomStep:.1,children:v.jsx("div",{"aria-label":"Mermaid chart",className:s("flex justify-center",n?"size-full items-center":null),dangerouslySetInnerHTML:{__html:J},role:"img"})})})};const xw={code:K$,math:qH},[hie,fie]=Ba.harden,Ew=[Ba.raw,Ba.sanitize,[hie,{...fie,allowedImagePrefixes:[],allowDataImages:!1}]],mie=({className:e,from:t,...r})=>v.jsx("div",{className:Ie("group flex w-full max-w-[95%] flex-col gap-2",t==="user"?"is-user ml-auto justify-end":"is-assistant",e),...r}),pie=({children:e,className:t,...r})=>v.jsx("div",{className:Ie("is-user:dark flex w-fit min-w-0 max-w-full flex-col gap-2 overflow-hidden text-sm","group-[.is-user]:ml-auto group-[.is-user]:rounded-lg group-[.is-user]:bg-secondary group-[.is-user]:px-4 group-[.is-user]:py-3 group-[.is-user]:text-foreground","group-[.is-assistant]:text-foreground",t),...r,children:e}),_w=k.memo(({className:e,...t})=>v.jsx(z1,{className:Ie("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",e),plugins:xw,rehypePlugins:Ew,...t}),(e,t)=>e.children===t.children&&t.isAnimating===e.isAnimating);_w.displayName="MessageResponse";var r3=1,gie=.9,bie=.8,yie=.17,mh=.1,ph=.999,vie=.9999,xie=.99,Eie=/[\\\/_+.#"@\[\(\{&]/,_ie=/[\\\/_+.#"@\[\(\{&]/g,Tie=/[\s-]/,Tw=/[\s-]/g;function hm(e,t,r,n,i,s,a){if(s===t.length)return i===e.length?r3:xie;var o=`${i},${s}`;if(a[o]!==void 0)return a[o];for(var l=n.charAt(s),u=r.indexOf(l,i),c=0,d,h,f,m;u>=0;)d=hm(e,t,r,n,u+1,s+1,a),d>c&&(u===i?d*=r3:Eie.test(e.charAt(u-1))?(d*=bie,f=e.slice(i,u-1).match(_ie),f&&i>0&&(d*=Math.pow(ph,f.length))):Tie.test(e.charAt(u-1))?(d*=gie,m=e.slice(i,u-1).match(Tw),m&&i>0&&(d*=Math.pow(ph,m.length))):(d*=yie,i>0&&(d*=Math.pow(ph,u-i))),e.charAt(u)!==t.charAt(s)&&(d*=vie)),(d<mh&&r.charAt(u-1)===n.charAt(s+1)||n.charAt(s+1)===n.charAt(s)&&r.charAt(u-1)!==n.charAt(s))&&(h=hm(e,t,r,n,u+1,s+2,a),h*mh>d&&(d=h*mh)),d>c&&(c=d),u=r.indexOf(l,u+1);return a[o]=c,c}function n3(e){return e.toLowerCase().replace(Tw," ")}function wie(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,hm(e,t,n3(e),n3(t),0,0,{})}var kie=Object.defineProperty,gn=(e,t)=>kie(e,"name",{value:t,configurable:!0});function ww(e){const t=k.forwardRef((r,n)=>{let{children:i,...s}=r,a=null,o=!1;const l=[];fm(i)&&typeof Su=="function"&&(i=Su(i._payload)),k.Children.forEach(i,h=>{var f;if(Cw(h)){o=!0;const m=h;let b="child"in m.props?m.props.child:m.props.children;fm(b)&&typeof Su=="function"&&(b=Su(b._payload)),a=Aie(m,b),l.push((f=a==null?void 0:a.props)==null?void 0:f.children)}else l.push(h)}),a?a=k.cloneElement(a,void 0,l):!o&&k.Children.count(i)===1&&k.isValidElement(i)&&(a=i);const u=a?Aw(a):void 0,c=si(n,u);if(!a){if(i||i===0)throw new Error(o?Nie(e):Iie(e));return i}const d=Sw(s,a.props??{});return a.type!==k.Fragment&&(d.ref=n?c:u),k.cloneElement(a,d)});return t.displayName=`${e}.Slot`,t}gn(ww,"createSlot");var kw=Symbol.for("radix.slottable");function Sie(e){const t=gn(r=>"child"in r?r.children(r.child):r.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=kw,t}gn(Sie,"createSlottable");var Aie=gn((e,t)=>{if("child"in e.props){const r=e.props.child;return k.isValidElement(r)?k.cloneElement(r,void 0,e.props.children(r.props.children)):null}return k.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function Sw(e,t){const r={...t};for(const n in t){const i=e[n],s=t[n];/^on[A-Z]/.test(n)?i&&s?r[n]=(...o)=>{const l=s(...o);return i(...o),l}:i&&(r[n]=i):n==="style"?r[n]={...i,...s}:n==="className"&&(r[n]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}gn(Sw,"mergeProps");function Aw(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}gn(Aw,"getElementRef");function Cw(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===kw}gn(Cw,"isSlottable");var Cie=Symbol.for("react.lazy");function fm(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Cie&&"_payload"in e&&Iw(e._payload)}gn(fm,"isLazyComponent");function Iw(e){return typeof e=="object"&&e!==null&&"then"in e}gn(Iw,"isPromiseLike");var Iie=gn(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),Nie=gn(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Su=Ms[" use ".trim().toString()],Rie=Object.defineProperty,Pie=(e,t)=>Rie(e,"name",{value:t,configurable:!0}),Oie=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ki=Oie.reduce((e,t)=>{const r=ww(`Primitive.${t}`),n=k.forwardRef((i,s)=>{const{asChild:a,...o}=i,l=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(l,{...o,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Lie(e,t){e&&$a.flushSync(()=>e.dispatchEvent(t))}Pie(Lie,"dispatchDiscreteCustomEvent");var Die=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{},Mie=Ms[" useId ".trim().toString()]||(()=>{}),Bie=0;function Ta(e){const[t,r]=k.useState(Mie());return Die(()=>{r(n=>n??String(Bie++))},[e]),t?`radix-${t}`:""}var To='[cmdk-group=""]',gh='[cmdk-group-items=""]',Fie='[cmdk-group-heading=""]',Nw='[cmdk-item=""]',i3=`${Nw}:not([aria-disabled="true"])`,mm="cmdk-item-select",la="data-value",zie=(e,t,r)=>wie(e,t,r),Rw=k.createContext(void 0),Vl=()=>k.useContext(Rw),Pw=k.createContext(void 0),$1=()=>k.useContext(Pw),Ow=k.createContext(void 0),Lw=k.forwardRef((e,t)=>{let r=ua(()=>{var Q,M;return{search:"",value:(M=(Q=e.value)!=null?Q:e.defaultValue)!=null?M:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=ua(()=>new Set),i=ua(()=>new Map),s=ua(()=>new Map),a=ua(()=>new Set),o=Dw(e),{label:l,children:u,value:c,onValueChange:d,filter:h,shouldFilter:f,loop:m,disablePointerSelection:b=!1,vimBindings:y=!0,...E}=e,w=Ta(),x=Ta(),_=Ta(),A=k.useRef(null),S=Kie();Ds(()=>{if(c!==void 0){let Q=c.trim();r.current.value=Q,I.emit()}},[c]),Ds(()=>{S(6,ae)},[]);let I=k.useMemo(()=>({subscribe:Q=>(a.current.add(Q),()=>a.current.delete(Q)),snapshot:()=>r.current,setState:(Q,M,pe)=>{var oe,fe,Ae,ze;if(!Object.is(r.current[Q],M)){if(r.current[Q]=M,Q==="search")V(),z(),S(1,Z);else if(Q==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let re=document.getElementById(_);re?re.focus():(oe=document.getElementById(w))==null||oe.focus()}if(S(7,()=>{var re;r.current.selectedItemId=(re=J())==null?void 0:re.id,I.emit()}),pe||S(5,ae),((fe=o.current)==null?void 0:fe.value)!==void 0){let re=M??"";(ze=(Ae=o.current).onValueChange)==null||ze.call(Ae,re);return}}I.emit()}},emit:()=>{a.current.forEach(Q=>Q())}}),[]),N=k.useMemo(()=>({value:(Q,M,pe)=>{var oe;M!==((oe=s.current.get(Q))==null?void 0:oe.value)&&(s.current.set(Q,{value:M,keywords:pe}),r.current.filtered.items.set(Q,U(M,pe)),S(2,()=>{z(),I.emit()}))},item:(Q,M)=>(n.current.add(Q),M&&(i.current.has(M)?i.current.get(M).add(Q):i.current.set(M,new Set([Q]))),S(3,()=>{V(),z(),r.current.value||Z(),I.emit()}),()=>{s.current.delete(Q),n.current.delete(Q),r.current.filtered.items.delete(Q);let pe=J();S(4,()=>{V(),(pe==null?void 0:pe.getAttribute("id"))===Q&&Z(),I.emit()})}),group:Q=>(i.current.has(Q)||i.current.set(Q,new Set),()=>{s.current.delete(Q),i.current.delete(Q)}),filter:()=>o.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>o.current.disablePointerSelection,listId:w,inputId:_,labelId:x,listInnerRef:A}),[]);function U(Q,M){var pe,oe;let fe=(oe=(pe=o.current)==null?void 0:pe.filter)!=null?oe:zie;return Q?fe(Q,r.current.search,M):0}function z(){if(!r.current.search||o.current.shouldFilter===!1)return;let Q=r.current.filtered.items,M=[];r.current.filtered.groups.forEach(oe=>{let fe=i.current.get(oe),Ae=0;fe.forEach(ze=>{let re=Q.get(ze);Ae=Math.max(re,Ae)}),M.push([oe,Ae])});let pe=A.current;Y().sort((oe,fe)=>{var Ae,ze;let re=oe.getAttribute("id"),Le=fe.getAttribute("id");return((Ae=Q.get(Le))!=null?Ae:0)-((ze=Q.get(re))!=null?ze:0)}).forEach(oe=>{let fe=oe.closest(gh);fe?fe.appendChild(oe.parentElement===fe?oe:oe.closest(`${gh} > *`)):pe.appendChild(oe.parentElement===pe?oe:oe.closest(`${gh} > *`))}),M.sort((oe,fe)=>fe[1]-oe[1]).forEach(oe=>{var fe;let Ae=(fe=A.current)==null?void 0:fe.querySelector(`${To}[${la}="${encodeURIComponent(oe[0])}"]`);Ae==null||Ae.parentElement.appendChild(Ae)})}function Z(){let Q=Y().find(pe=>pe.getAttribute("aria-disabled")!=="true"),M=Q==null?void 0:Q.getAttribute(la);I.setState("value",M||void 0)}function V(){var Q,M,pe,oe;if(!r.current.search||o.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let fe=0;for(let Ae of n.current){let ze=(M=(Q=s.current.get(Ae))==null?void 0:Q.value)!=null?M:"",re=(oe=(pe=s.current.get(Ae))==null?void 0:pe.keywords)!=null?oe:[],Le=U(ze,re);r.current.filtered.items.set(Ae,Le),Le>0&&fe++}for(let[Ae,ze]of i.current)for(let re of ze)if(r.current.filtered.items.get(re)>0){r.current.filtered.groups.add(Ae);break}r.current.filtered.count=fe}function ae(){var Q,M,pe;let oe=J();oe&&(((Q=oe.parentElement)==null?void 0:Q.firstChild)===oe&&((pe=(M=oe.closest(To))==null?void 0:M.querySelector(Fie))==null||pe.scrollIntoView({block:"nearest"})),oe.scrollIntoView({block:"nearest"}))}function J(){var Q;return(Q=A.current)==null?void 0:Q.querySelector(`${Nw}[aria-selected="true"]`)}function Y(){var Q;return Array.from(((Q=A.current)==null?void 0:Q.querySelectorAll(i3))||[])}function de(Q){let M=Y()[Q];M&&I.setState("value",M.getAttribute(la))}function xe(Q){var M;let pe=J(),oe=Y(),fe=oe.findIndex(ze=>ze===pe),Ae=oe[fe+Q];(M=o.current)!=null&&M.loop&&(Ae=fe+Q<0?oe[oe.length-1]:fe+Q===oe.length?oe[0]:oe[fe+Q]),Ae&&I.setState("value",Ae.getAttribute(la))}function Ue(Q){let M=J(),pe=M==null?void 0:M.closest(To),oe;for(;pe&&!oe;)pe=Q>0?Zie(pe,To):Yie(pe,To),oe=pe==null?void 0:pe.querySelector(i3);oe?I.setState("value",oe.getAttribute(la)):xe(Q)}let He=()=>de(Y().length-1),L=Q=>{Q.preventDefault(),Q.metaKey?He():Q.altKey?Ue(1):xe(1)},Re=Q=>{Q.preventDefault(),Q.metaKey?de(0):Q.altKey?Ue(-1):xe(-1)};return k.createElement(Ki.div,{ref:t,tabIndex:-1,...E,"cmdk-root":"",onKeyDown:Q=>{var M;(M=E.onKeyDown)==null||M.call(E,Q);let pe=Q.nativeEvent.isComposing||Q.keyCode===229;if(!(Q.defaultPrevented||pe))switch(Q.key){case"n":case"j":{y&&Q.ctrlKey&&L(Q);break}case"ArrowDown":{L(Q);break}case"p":case"k":{y&&Q.ctrlKey&&Re(Q);break}case"ArrowUp":{Re(Q);break}case"Home":{Q.preventDefault(),de(0);break}case"End":{Q.preventDefault(),He();break}case"Enter":{Q.preventDefault();let oe=J();if(oe){let fe=new Event(mm);oe.dispatchEvent(fe)}}}}},k.createElement("label",{"cmdk-label":"",htmlFor:N.inputId,id:N.labelId,style:Qie},l),V0(e,Q=>k.createElement(Pw.Provider,{value:I},k.createElement(Rw.Provider,{value:N},Q))))}),$ie=k.forwardRef((e,t)=>{var r,n;let i=Ta(),s=k.useRef(null),a=k.useContext(Ow),o=Vl(),l=Dw(e),u=(n=(r=l.current)==null?void 0:r.forceMount)!=null?n:a==null?void 0:a.forceMount;Ds(()=>{if(!u)return o.item(i,a==null?void 0:a.id)},[u]);let c=Mw(i,s,[e.value,e.children,s],e.keywords),d=$1(),h=Hi(S=>S.value&&S.value===c.current),f=Hi(S=>u||o.filter()===!1?!0:S.search?S.filtered.items.get(i)>0:!0);k.useEffect(()=>{let S=s.current;if(!(!S||e.disabled))return S.addEventListener(mm,m),()=>S.removeEventListener(mm,m)},[f,e.onSelect,e.disabled]);function m(){var S,I;b(),(I=(S=l.current).onSelect)==null||I.call(S,c.current)}function b(){d.setState("value",c.current,!0)}if(!f)return null;let{disabled:y,value:E,onSelect:w,forceMount:x,keywords:_,...A}=e;return k.createElement(Ki.div,{ref:Ns(s,t),...A,id:i,"cmdk-item":"",role:"option","aria-disabled":!!y,"aria-selected":!!h,"data-disabled":!!y,"data-selected":!!h,onPointerMove:y||o.getDisablePointerSelection()?void 0:b,onClick:y?void 0:m},e.children)}),jie=k.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:i,...s}=e,a=Ta(),o=k.useRef(null),l=k.useRef(null),u=Ta(),c=Vl(),d=Hi(f=>i||c.filter()===!1?!0:f.search?f.filtered.groups.has(a):!0);Ds(()=>c.group(a),[]),Mw(a,o,[e.value,e.heading,l]);let h=k.useMemo(()=>({id:a,forceMount:i}),[i]);return k.createElement(Ki.div,{ref:Ns(o,t),...s,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},r&&k.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},r),V0(e,f=>k.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?u:void 0},k.createElement(Ow.Provider,{value:h},f))))}),Uie=k.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,i=k.useRef(null),s=Hi(a=>!a.search);return!r&&!s?null:k.createElement(Ki.div,{ref:Ns(i,t),...n,"cmdk-separator":"",role:"separator"})}),Hie=k.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,i=e.value!=null,s=$1(),a=Hi(u=>u.search),o=Hi(u=>u.selectedItemId),l=Vl();return k.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),k.createElement(Ki.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":o,id:l.inputId,type:"text",value:i?e.value:a,onChange:u=>{i||s.setState("search",u.target.value),r==null||r(u.target.value)}})}),Vie=k.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...i}=e,s=k.useRef(null),a=k.useRef(null),o=Hi(u=>u.selectedItemId),l=Vl();return k.useEffect(()=>{if(a.current&&s.current){let u=a.current,c=s.current,d,h=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let f=u.offsetHeight;c.style.setProperty("--cmdk-list-height",f.toFixed(1)+"px")})});return h.observe(u),()=>{cancelAnimationFrame(d),h.unobserve(u)}}},[]),k.createElement(Ki.div,{ref:Ns(s,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":o,"aria-label":n,id:l.listId},V0(e,u=>k.createElement("div",{ref:Ns(a,l.listInnerRef),"cmdk-list-sizer":""},u)))}),qie=k.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:i,contentClassName:s,container:a,...o}=e;return k.createElement(Dx,{open:r,onOpenChange:n},k.createElement(Fx,{container:a},k.createElement(zx,{"cmdk-overlay":"",className:i}),k.createElement($x,{"aria-label":e.label,"cmdk-dialog":"",className:s},k.createElement(Lw,{ref:t,...o}))))}),Gie=k.forwardRef((e,t)=>Hi(r=>r.filtered.count===0)?k.createElement(Ki.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Wie=k.forwardRef((e,t)=>{let{progress:r,children:n,label:i="Loading...",...s}=e;return k.createElement(Ki.div,{ref:t,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},V0(e,a=>k.createElement("div",{"aria-hidden":!0},a)))}),no=Object.assign(Lw,{List:Vie,Item:$ie,Input:Hie,Group:jie,Separator:Uie,Dialog:qie,Empty:Gie,Loading:Wie});function Zie(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function Yie(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function Dw(e){let t=k.useRef(e);return Ds(()=>{t.current=e}),t}var Ds=typeof window>"u"?k.useEffect:k.useLayoutEffect;function ua(e){let t=k.useRef();return t.current===void 0&&(t.current=e()),t}function Hi(e){let t=$1(),r=()=>e(t.snapshot());return k.useSyncExternalStore(t.subscribe,r,r)}function Mw(e,t,r,n=[]){let i=k.useRef(),s=Vl();return Ds(()=>{var a;let o=(()=>{var u;for(let c of r){if(typeof c=="string")return c.trim();if(typeof c=="object"&&"current"in c)return c.current?(u=c.current.textContent)==null?void 0:u.trim():i.current}})(),l=n.map(u=>u.trim());s.value(e,o,l),(a=t.current)==null||a.setAttribute(la,o),i.current=o}),i}var Kie=()=>{let[e,t]=k.useState(),r=ua(()=>new Map);return Ds(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,i)=>{r.current.set(n,i),t({})}};function Xie(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function V0({asChild:e,children:t},r){return e&&k.isValidElement(t)?k.cloneElement(Xie(t),{ref:t.ref},r(t.props.children)):r(t)}var Qie={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Jie({className:e,...t}){return v.jsx(no,{"data-slot":"command",className:Ie("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t})}function ese({className:e,...t}){return v.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[v.jsx(uO,{className:"size-4 shrink-0 opacity-50"}),v.jsx(no.Input,{"data-slot":"command-input",className:Ie("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]})}function tse({className:e,...t}){return v.jsx(no.List,{"data-slot":"command-list",className:Ie("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function rse({...e}){return v.jsx(no.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function nse({className:e,...t}){return v.jsx(no.Group,{"data-slot":"command-group",className:Ie("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t})}function ise({className:e,...t}){return v.jsx(no.Item,{"data-slot":"command-item",className:Ie("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",e),...t})}function sse({...e}){return v.jsx(Dx,{"data-slot":"dialog",...e})}function ase({...e}){return v.jsx(cD,{"data-slot":"dialog-trigger",...e})}function ose({...e}){return v.jsx(Fx,{"data-slot":"dialog-portal",...e})}function lse({className:e,...t}){return v.jsx(zx,{"data-slot":"dialog-overlay",className:Ie("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",e),...t})}function use({className:e,children:t,showCloseButton:r=!0,...n}){return v.jsxs(ose,{"data-slot":"dialog-portal",children:[v.jsx(lse,{}),v.jsxs($x,{"data-slot":"dialog-content",className:Ie("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg",e),...n,children:[t,r&&v.jsxs(yD,{"data-slot":"dialog-close",className:"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[v.jsx($5,{}),v.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function cse({className:e,...t}){return v.jsx(gD,{"data-slot":"dialog-title",className:Ie("text-lg leading-none font-semibold",e),...t})}const Bw=e=>v.jsx(sse,{...e}),Fw=e=>v.jsx(ase,{...e}),zw=({className:e,children:t,title:r="Model Selector",...n})=>v.jsxs(use,{"aria-describedby":void 0,className:Ie("outline! border-none! p-0 outline-border! outline-solid!",e),...n,children:[v.jsx(cse,{className:"sr-only",children:r}),v.jsx(Jie,{className:"**:data-[slot=command-input-wrapper]:h-auto",children:t})]}),$w=({className:e,...t})=>v.jsx(ese,{className:Ie("h-auto py-3.5",e),...t}),jw=e=>v.jsx(tse,{...e}),Uw=e=>v.jsx(rse,{...e}),pm=e=>v.jsx(nse,{...e}),gm=e=>v.jsx(ise,{...e}),bm=({className:e,...t})=>v.jsx("span",{className:Ie("flex-1 truncate text-left",e),...t});function dse({className:e,...t}){return v.jsx("textarea",{"data-slot":"textarea",className:Ie("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",e),...t})}function hse({className:e,...t}){return v.jsx("div",{"data-slot":"input-group",role:"group",className:Ie("group/input-group relative flex w-full items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none dark:bg-input/30","h-9 min-w-0 has-[>textarea]:h-auto","has-[>[data-align=inline-start]]:[&>input]:pl-2","has-[>[data-align=inline-end]]:[&>input]:pr-2","has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3","has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3","has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-[3px] has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50","has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",e),...t})}const fse=ap("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]","inline-end":"order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]","block-start":"order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5 [.border-b]:pb-3","block-end":"order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5 [.border-t]:pt-3"}},defaultVariants:{align:"inline-start"}});function mse({className:e,align:t="inline-start",...r}){return v.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:Ie(fse({align:t}),e),onClick:n=>{var i,s;n.target.closest("button")||(s=(i=n.currentTarget.parentElement)==null?void 0:i.querySelector("input"))==null||s.focus()},...r})}const pse=ap("flex items-center gap-2 text-sm shadow-none",{variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-2 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5",sm:"h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function gse({className:e,type:t="button",variant:r="ghost",size:n="xs",...i}){return v.jsx(Hr,{type:t,"data-size":n,variant:r,className:Ie(pse({size:n}),e),...i})}function bse({className:e,...t}){return v.jsx(dse,{"data-slot":"input-group-control",className:Ie("flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent",e),...t})}function yse({className:e,...t}){return v.jsx(oO,{role:"status","aria-label":"Loading",className:Ie("size-4 animate-spin",e),...t})}const vse=({className:e,onSubmit:t,children:r,...n})=>{const i=k.useCallback(s=>{s.preventDefault();const a=s.currentTarget,o=new FormData(a).get("message")||"";a.reset(),t({text:o},s)},[t]);return v.jsx("form",{className:Ie("w-full",e),onSubmit:i,...n,children:v.jsx(hse,{className:"overflow-hidden",children:r})})},xse=({className:e,...t})=>v.jsx("div",{className:Ie("contents",e),...t}),Ese=({onKeyDown:e,className:t,placeholder:r="What would you like to know?",...n})=>{const[i,s]=k.useState(!1),a=k.useCallback(u=>{if(e==null||e(u),u.defaultPrevented||u.key!=="Enter"||u.shiftKey||i||u.nativeEvent.isComposing)return;u.preventDefault();const{form:c}=u.currentTarget,d=c==null?void 0:c.querySelector('button[type="submit"]');d!=null&&d.disabled||c==null||c.requestSubmit()},[e,i]),o=k.useCallback(()=>s(!1),[]),l=k.useCallback(()=>s(!0),[]);return v.jsx(bse,{className:Ie("field-sizing-content max-h-48 min-h-16",t),name:"message",onCompositionEnd:o,onCompositionStart:l,onKeyDown:a,placeholder:r,...n})},_se=({className:e,...t})=>v.jsx(mse,{align:"block-end",className:Ie("justify-between gap-1",e),...t}),Tse=({className:e,...t})=>v.jsx("div",{className:Ie("flex min-w-0 items-center gap-1",e),...t}),wse=({className:e,variant:t="default",size:r="icon-sm",status:n,onStop:i,onClick:s,children:a,...o})=>{const l=n==="submitted"||n==="streaming";let u=v.jsx(sO,{className:"size-4"});n==="submitted"?u=v.jsx(yse,{}):n==="streaming"?u=v.jsx(dO,{className:"size-4"}):n==="error"&&(u=v.jsx($5,{className:"size-4"}));const c=k.useCallback(d=>{if(l&&i){d.preventDefault(),i();return}s==null||s(d)},[l,i,s]);return v.jsx(gse,{"aria-label":l?"Stop":"Submit",className:Ie(e),onClick:c,size:r,type:l&&i?"button":"submit",variant:t,...o,children:a??u})};function Hw({...e}){return v.jsx(jL,{"data-slot":"collapsible",...e})}function Vw({...e}){return v.jsx(HL,{"data-slot":"collapsible-trigger",...e})}function qw({...e}){return v.jsx(VL,{"data-slot":"collapsible-content",...e})}const Gw=k.createContext({});function kse(e){const t=k.useRef(null);return t.current===null&&(t.current=e()),t.current}const Sse=typeof window<"u",s3=Sse?k.useLayoutEffect:k.useEffect,j1=k.createContext(null);function U1(e,t){e.indexOf(t)===-1&&e.push(t)}function $c(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}const di=(e,t,r)=>r>t?t:r<e?e:r;let q0=()=>{};const ii={},H1=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Ww=e=>typeof e=="object"&&e!==null,V1=e=>/^0[^.\s]+$/u.test(e);function Zw(e){let t;return()=>(t===void 0&&(t=e()),t)}const hn=e=>e,ql=(...e)=>e.reduce((t,r)=>n=>r(t(n))),fl=(e,t,r)=>{const n=t-e;return n?(r-e)/n:1};class jc{constructor(){this.subscriptions=[]}add(t){return U1(this.subscriptions,t),()=>this.remove(t)}remove(t){$c(this.subscriptions,t)}notify(t,r,n){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,r,n);else for(let s=0;s<i;s++){const a=this.subscriptions[s];a&&a(t,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Wr=e=>e*1e3,Gr=e=>e/1e3,Yw=(e,t)=>t?e*(1e3/t):0,Kw=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,Ase=1e-7,Cse=12;function Ise(e,t,r,n,i){let s,a,o=0;do a=t+(r-t)/2,s=Kw(a,n,i)-e,s>0?r=a:t=a;while(Math.abs(s)>Ase&&++o<Cse);return a}function Gl(e,t,r,n){if(e===t&&r===n)return hn;const i=s=>Ise(s,0,1,e,r);return s=>s===0||s===1?s:Kw(i(s),t,n)}const Xw=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Qw=e=>t=>1-e(1-t),Jw=Gl(.33,1.53,.69,.99),q1=Qw(Jw),ek=Xw(q1),tk=e=>e>=1?1:(e*=2)<1?.5*q1(e):.5*(2-Math.pow(2,-10*(e-1))),G1=e=>1-Math.sin(Math.acos(e)),rk=Qw(G1),nk=Xw(G1),Nse=Gl(.42,0,1,1),Rse=Gl(0,0,.58,1),W1=Gl(.42,0,.58,1),Pse=e=>Array.isArray(e)&&typeof e[0]!="number",ik=e=>Array.isArray(e)&&typeof e[0]=="number",Ose={linear:hn,easeIn:Nse,easeInOut:W1,easeOut:Rse,circIn:G1,circInOut:nk,circOut:rk,backIn:q1,backInOut:ek,backOut:Jw,anticipate:tk},Lse=e=>typeof e=="string",a3=e=>{if(ik(e)){q0(e.length===4);const[t,r,n,i]=e;return Gl(t,r,n,i)}else if(Lse(e))return Ose[e];return e},Dt={delta:0,timestamp:0,isProcessing:!1};let Vu;function Dse(){Vu=void 0}const Xt={now:()=>(Vu===void 0&&Xt.set(Dt.isProcessing||ii.useManualTiming?Dt.timestamp:performance.now()),Vu),set:e=>{Vu=e,queueMicrotask(Dse)}},wa=e=>Math.round(e*1e5)/1e5,sk=e=>t=>typeof t=="string"&&t.startsWith(e),ak=sk("--"),Mse=sk("var(--"),Z1=e=>Mse(e)?Bse.test(e.split("/*")[0].trim()):!1,Bse=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function o3(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const io={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ml={...io,transform:e=>di(0,1,e)},Au={...io,default:1},Y1=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Fse(e){return e==null}const zse=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,K1=(e,t)=>r=>!!(typeof r=="string"&&zse.test(r)&&r.startsWith(e)||t&&!Fse(r)&&Object.prototype.hasOwnProperty.call(r,t)),ok=(e,t,r)=>n=>{if(typeof n!="string")return n;const[i,s,a,o]=n.match(Y1);return{[e]:parseFloat(i),[t]:parseFloat(s),[r]:parseFloat(a),alpha:o!==void 0?parseFloat(o):1}},$se=e=>di(0,255,e),bh={...io,transform:e=>Math.round($se(e))},ps={test:K1("rgb","red"),parse:ok("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+bh.transform(e)+", "+bh.transform(t)+", "+bh.transform(r)+", "+wa(ml.transform(n))+")"};function jse(e){let t="",r="",n="",i="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),i=e.substring(4,5),t+=t,r+=r,n+=n,i+=i),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const ym={test:K1("#"),parse:jse,transform:ps.transform},Wl=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Wn=Wl("deg"),Nn=Wl("%"),ve=Wl("px"),Use=Wl("vh"),Hse=Wl("vw"),l3={...Nn,parse:e=>Nn.parse(e)/100,transform:e=>Nn.transform(e*100)},ma={test:K1("hsl","hue"),parse:ok("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+Nn.transform(wa(t))+", "+Nn.transform(wa(r))+", "+wa(ml.transform(n))+")"},Mt={test:e=>ps.test(e)||ym.test(e)||ma.test(e),parse:e=>ps.test(e)?ps.parse(e):ma.test(e)?ma.parse(e):ym.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ps.transform(e):ma.transform(e),getAnimatableNone:e=>{const t=Mt.parse(e);return t.alpha=0,Mt.transform(t)}},Vse=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,lk=new RegExp(Y1.source),uk=new RegExp(Vse.source,"i");function qse(e){return isNaN(e)&&typeof e=="string"&&(lk.test(e)||uk.test(e))}const ck="number",dk="color",Gse="var",Wse="var(",u3="${}",Zse=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Yse(e){const t=e.toString();return lk.test(t)||uk.test(t)}function pl(e){const t=e.toString(),r=[],n={color:[],number:[],var:[]},i=[];let s=0;const o=t.replace(Zse,l=>(Mt.test(l)?(n.color.push(s),i.push(dk),r.push(Mt.parse(l))):l.startsWith(Wse)?(n.var.push(s),i.push(Gse),r.push(l)):(n.number.push(s),i.push(ck),r.push(parseFloat(l))),++s,u3)).split(u3);return{values:r,split:o,indexes:n,types:i}}function Kse(e){return pl(e).values}function hk({split:e,types:t}){const r=e.length;return n=>{let i="";for(let s=0;s<r;s++)if(i+=e[s],n[s]!==void 0){const a=t[s];a===ck?i+=wa(n[s]):a===dk?i+=Mt.transform(n[s]):i+=n[s]}return i}}function Xse(e){return hk(pl(e))}const Qse=e=>typeof e=="number"?0:Mt.test(e)?Mt.getAnimatableNone(e):e,Jse=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:Qse(e);function eae(e){const t=pl(e);return hk(t)(t.values.map((n,i)=>Jse(n,t.split[i])))}const Nr={test:qse,parse:Kse,createTransformer:Xse,getAnimatableNone:eae};function yh(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function tae({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let i=0,s=0,a=0;if(!t)i=s=a=r;else{const o=r<.5?r*(1+t):r+t-r*t,l=2*r-o;i=yh(l,o,e+1/3),s=yh(l,o,e),a=yh(l,o,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(a*255),alpha:n}}function Uc(e,t){return r=>r>0?t:e}const tt=(e,t,r)=>e+(t-e)*r,vh=(e,t,r)=>{const n=e*e,i=r*(t*t-n)+n;return i<0?0:Math.sqrt(i)},rae=[ym,ps,ma],nae=e=>rae.find(t=>t.test(e));function c3(e){const t=nae(e);if(!t)return!1;let r=t.parse(e);return t===ma&&(r=tae(r)),r}const d3=(e,t)=>{const r=c3(e),n=c3(t);if(!r||!n)return Uc(e,t);const i={...r};return s=>(i.red=vh(r.red,n.red,s),i.green=vh(r.green,n.green,s),i.blue=vh(r.blue,n.blue,s),i.alpha=tt(r.alpha,n.alpha,s),ps.transform(i))},vm=new Set(["none","hidden"]);function iae(e,t){return vm.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function sae(e,t){return r=>tt(e,t,r)}function X1(e){return typeof e=="number"?sae:typeof e=="string"?Z1(e)?Uc:Mt.test(e)?d3:lae:Array.isArray(e)?fk:typeof e=="object"?Mt.test(e)?d3:aae:Uc}function fk(e,t){const r=[...e],n=r.length,i=e.map((s,a)=>X1(s)(s,t[a]));return s=>{for(let a=0;a<n;a++)r[a]=i[a](s);return r}}function aae(e,t){const r={...e,...t},n={};for(const i in r)e[i]!==void 0&&t[i]!==void 0&&(n[i]=X1(e[i])(e[i],t[i]));return i=>{for(const s in n)r[s]=n[s](i);return r}}function oae(e,t){const r=[],n={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],a=e.indexes[s][n[s]],o=e.values[a]??0;r[i]=o,n[s]++}return r}const lae=(e,t)=>{const r=Nr.createTransformer(t),n=pl(e),i=pl(t);return n.indexes.var.length===i.indexes.var.length&&n.indexes.color.length===i.indexes.color.length&&n.indexes.number.length>=i.indexes.number.length?vm.has(e)&&!i.values.length||vm.has(t)&&!n.values.length?iae(e,t):ql(fk(oae(n,i),i.values),r):Uc(e,t)},h3=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function uae(e,t){const r=h3.exec(e);if(!r)return;const n=h3.exec(t);if(!n||r[2]!==n[2])return;const i=r[2],s=parseFloat(r[1]),a=parseFloat(n[1]);return o=>wa(tt(s,a,o))+i}function Q1(e,t,r){if(typeof e=="number"&&typeof t=="number"&&typeof r=="number")return tt(e,t,r);if(typeof e=="string"&&typeof t=="string"){const i=uae(e,t);if(i)return i}return X1(e)(e,t)}const Cu=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function cae(e){let t=new Set,r=new Set,n=!1,i=!1;const s=new Set;let a={delta:0,timestamp:0,isProcessing:!1};function o(u){s.has(u)&&(r.add(u),e()),u(a)}const l={schedule:(u,c=!1,d=!1)=>{const f=d&&n?t:r;return c&&s.add(u),f.add(u),u},cancel:u=>{r.delete(u),s.delete(u)},process:u=>{if(a=u,n){i=!0;return}n=!0;const c=t;t=r,r=c,t.forEach(o),t.clear(),n=!1,i&&(i=!1,l.process(u))}};return l}const dae=40;function mk(e,t,r={delta:0,timestamp:0,isProcessing:!1}){let n=!1,i=!0;const s=()=>n=!0,a=Cu.reduce((x,_)=>(x[_]=cae(s),x),{}),{setup:o,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:h,render:f,postRender:m}=a,b=()=>{const x=ii.useManualTiming,_=x?r.timestamp:performance.now();n=!1,x||(r.delta=i?1e3/60:Math.max(Math.min(_-r.timestamp,dae),1)),r.timestamp=_,r.isProcessing=!0,o.process(r),l.process(r),u.process(r),c.process(r),d.process(r),h.process(r),f.process(r),m.process(r),r.isProcessing=!1,n&&t&&(i=!1,e(b))},y=()=>{n=!0,i=!0,r.isProcessing||e(b)};return{schedule:Cu.reduce((x,_)=>{const A=a[_];return x[_]=(S,I=!1,N=!1)=>(n||y(),A.schedule(S,I,N)),x},{}),cancel:x=>{for(let _=0;_<Cu.length;_++)a[Cu[_]].cancel(x)},state:r,steps:a}}const{schedule:it,cancel:Vi,steps:xh}=mk(typeof requestAnimationFrame<"u"?requestAnimationFrame:hn,!0,Dt),hae=e=>{const t=({timestamp:r})=>e(r);return{start:(r=!0)=>it.update(t,r),stop:()=>Vi(t),now:()=>Dt.isProcessing?Dt.timestamp:Xt.now()}},pk=(e,t,r=10)=>{let n="";const i=Math.max(Math.round(t/r),2);for(let s=0;s<i;s++)n+=Math.round(e(s/(i-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},J1=2e4;function eg(e,t=50,r=J1,n){let i=0,s=e.next(i);for(;!s.done&&i<r;)i+=t,s=e.next(i);return i>=r?1/0:i}function fae(e,t=100,r){const n=r({...e,keyframes:[0,t]}),i=Math.min(eg(n),J1);return{type:"keyframes",ease:s=>n.next(i*s).value/t,duration:Gr(i)}}const Yt={stiffness:100,damping:10,mass:1,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05},gk=e=>e<0?1/Math.max(1+e,Yt.minDamping):Math.max(1-e,Yt.minDamping);function bk(e,t){if(!(e>1))return 1;const r=Math.sqrt(e*e-1),n=e-r,i=e+r,s=2*r*Math.exp(-t)*(1+t);return yk(a=>i*Math.exp(-n*a)-n*Math.exp(-i*a)-s,a=>Math.exp(-i*a)-Math.exp(-n*a),t)/t}function xm(e,t){return e*Math.sqrt(1-t*t)}const mae=12;function yk(e,t,r){let n=r;for(let i=1;i<mae;i++)n=n-e(n)/t(n);return n}const Eh=.001;function pae({duration:e=Yt.duration,bounce:t=Yt.bounce}){let r,n;const i=gk(t);e=di(Yt.minDuration,Yt.maxDuration,Gr(e)),i<1?(r=u=>{const c=u*i,d=c*e,h=xm(u,i),f=Math.exp(-d);return Eh-c/h*f},n=u=>{const d=u*i*e,h=i*i*u*u*e,f=Math.exp(-d),m=xm(u*u,i);return(-r(u)+Eh>0?-1:1)*-h*f/m}):(r=u=>{const c=Math.exp(-u*e),d=u*e+1;return-Eh+c*d},n=u=>{const c=Math.exp(-u*e),d=-u*(e*e);return c*d});const s=5/e,a=yk(r,n,s),o=a*bk(i,a*e),l=o*o;return{stiffness:l,damping:i*2*Math.sqrt(l),duration:Wr(e)}}const Em=(e,t)=>(t?e>=0:e>0)&&e<1/0;function _h(e,t){if(Em(e,t))return e}function gae(e){const t=_h(e.stiffness),r=_h(e.damping,!0),n=_h(e.mass),i={...e,stiffness:t??Yt.stiffness,damping:r??Yt.damping,mass:n??Yt.mass,isResolvedFromDuration:!1,isTimeDefined:(t??r??n)===void 0&&(e.duration!==void 0||e.bounce!==void 0)};if(i.isTimeDefined){if(e.visualDuration){const s=gk(e.bounce||0),a=2*Math.PI/(e.visualDuration*1.2)*bk(s,2*Math.PI/1.2);i.stiffness=a*a,i.damping=2*s*Math.sqrt(i.stiffness)}else Object.assign(i,pae(i)),i.isResolvedFromDuration=!0;(!Em(i.stiffness)||!Em(i.damping,!0))&&(i.stiffness=Yt.stiffness,i.damping=Yt.damping)}return i}function Hc(e=Yt.visualDuration,t=Yt.bounce){const r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e,n=r.keyframes[0],i=r.keyframes[r.keyframes.length-1],s={done:!1,value:n},{stiffness:a,damping:o,mass:l,duration:u,isResolvedFromDuration:c,isTimeDefined:d}=gae({...r}),h=I=>d?0:-Gr(I),f=o/(2*Math.sqrt(a*l)),m=Gr(Math.sqrt(a/l)),b=f*m,y={target:i,delta:i-n,velocity:h(r.velocity||0)||0,restSpeed:0,restDelta:0},E=()=>{const I=Math.abs(y.delta)<5;y.restSpeed=r.restSpeed||(I?Yt.restSpeed.granular:Yt.restSpeed.default),y.restDelta=r.restDelta||(I?Yt.restDelta.granular:Yt.restDelta.default)};E();let w,x,_;if(f<1){const I=xm(m,f),N={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};_=()=>{N.A=(y.velocity+b*y.delta)/I,N.sinC=b*N.A+y.delta*I,N.cosC=b*y.delta-N.A*I};const U=z=>{z!==N.t&&(N.t=z,N.env=Math.exp(-b*z),N.sin=Math.sin(I*z),N.cos=Math.cos(I*z))};w=z=>(U(z),y.target-N.env*(N.A*N.sin+y.delta*N.cos)),x=z=>(U(z),N.env*(N.sinC*N.sin+N.cosC*N.cos))}else if(f===1){w=N=>y.target-Math.exp(-m*N)*(y.delta+(y.velocity+m*y.delta)*N);const I={C:0};_=()=>{I.C=y.velocity+m*y.delta},x=N=>Math.exp(-m*N)*(m*I.C*N-y.velocity)}else{const I=m*Math.sqrt(f*f-1),N=b-I,U=b+I,z=d?1/0:300/I,Z=(ae,J)=>Math.exp(J>z?-ae*z-b*(J-z):-ae*J),V={S:0,F:0};_=()=>{const ae=(y.velocity+b*y.delta)/I;V.S=(y.delta+ae)/2,V.F=(y.delta-ae)/2},w=ae=>y.target-V.S*Z(N,ae)-V.F*Z(U,ae),x=ae=>N*V.S*Z(N,ae)+U*V.F*Z(U,ae)}_();const A=c&&u||null,S={calculatedDuration:A,retarget:(I,N)=>{y.target=I[I.length-1],y.delta=y.target-I[0],y.velocity=h(N),r.restSpeed&&r.restDelta||E(),S.calculatedDuration=A,s.done=!1,_()},velocity:I=>Wr(x(I)),next:I=>{const N=w(I);if(c)s.done=I>=u;else{const U=Wr(x(I));s.done=Math.abs(U)<=y.restSpeed&&Math.abs(y.target-N)<=y.restDelta}return s.value=s.done?y.target:N,s},toString:()=>{const I=Math.min(eg(S),J1),N=pk(U=>S.next(I*U).value,I,30);return I+"ms "+N},toTransition:()=>{}};return S}Hc.applyToOptions=e=>{const t=fae(e,100,Hc);return e.ease=t.ease,e.duration=Wr(t.duration),e.type="keyframes",e};function _m({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:a,min:o,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],h={done:!1,value:d},f=I=>I<o||I>l,m=I=>o===void 0?l:l===void 0||Math.abs(o-I)<Math.abs(l-I)?o:l;let b=r*t;const y=d+b,E=a===void 0?y:a(y);E!==y&&(b=E-d);const w=I=>-b*Math.exp(-I/n),x=I=>{const N=w(I);h.done=Math.abs(N)<=u,h.value=h.done?E:E+N};let _,A;const S=I=>{f(h.value)&&(_=I,A=Hc({keyframes:[h.value,m(h.value)],velocity:-w(I)/n*1e3,damping:i,stiffness:s,restDelta:u,restSpeed:c}))};return S(0),{calculatedDuration:null,next:I=>{let N=!1;return!A&&_===void 0&&(N=!0,x(I),S(I)),_!==void 0&&I>=_?A.next(I-_):(!N&&x(I),h)}}}function bae(e,t,r){const n=[],i=r||ii.mix||Q1,s=e.length-1;for(let a=0;a<s;a++){let o=i(e[a],e[a+1]);if(t){const l=Array.isArray(t)?t[a]||hn:t;o=ql(l,o)}n.push(o)}return n}function yae(e,t,{clamp:r=!0,ease:n,mixer:i}={}){const s=e.length;if(q0(s===t.length),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=bae(t,n,i),l=o.length,u=c=>{if(a&&c<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(c<e[d+1]);d++);const h=fl(e[d],e[d+1],c);return o[d](h)};return r?c=>u(di(e[0],e[s-1],c)):u}function vae(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const i=fl(0,t,n);e.push(tt(r,1,i))}}function xae(e){const t=[0];return vae(t,e.length-1),t}function Eae(e,t){return e.map(r=>r*t)}function _ae(e,t){return e.map(()=>t||W1).splice(0,e.length-1)}function Go({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){const i=Pse(n)?n.map(a3):a3(n)||W1,s={done:!1,value:t[0]};if(t.length===2&&!Array.isArray(i)&&(!r||r.length!==2||r[0]===0&&r[1]===1)){const[l,u]=t,c=l===u?void 0:(ii.mix||Q1)(l,u);return{calculatedDuration:e,next:d=>(s.value=c?c(i(e>0?di(0,1,d/e):1)):u,s.done=d>=e,s)}}const a=Eae(r&&r.length===t.length?r:xae(t),e),o=yae(a,t,{ease:Array.isArray(i)?i:_ae(t,i)});return{calculatedDuration:e,next:l=>(s.value=o(l),s.done=l>=e,s)}}const Tae=5;function wae(e,t,r){const n=Math.max(t-Tae,0);return Yw(r-e(n),t-n)}function kae(e,t,r=0){return t<=0?r:e.velocity?e.velocity(t):wae(n=>e.next(n).value,t,e.next(t).value)}const Sae=e=>e!==null;function G0(e,{repeat:t,repeatType:r="loop"},n,i=1){const s=e.filter(Sae),o=i<0||t&&r!=="loop"&&t%2===1?0:s.length-1;return!o||n===void 0?s[o]:n}const Aae={decay:_m,inertia:_m,tween:Go,keyframes:Go,spring:Hc};function vk(e){typeof e.type=="string"&&(e.type=Aae[e.type])}function xk(e,t){return{kind:e,animation:t,timestamp:Xt.now(),frameTimestamp:Dt.timestamp,frameIsProcessing:Dt.isProcessing}}function Ek(e,t,r){const n=globalThis.__MOTION_INSPECT__;if(n)try{n({...xk("animation-start",e),options:r?{...t,...r}:t})}catch{}}function Cae(e,t){const r=globalThis.__MOTION_INSPECT__;if(r)try{r({...xk("layout-animation-start",e),node:t})}catch{}}class tg{constructor(){this.isResolved=!1}get finished(){return this._finished||(this._finished=this.isResolved?Promise.resolve():new Promise(t=>{this._resolve=t})),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){var t;this.isResolved=!0,(t=this._resolve)==null||t.call(this)}then(t,r){return this.finished.then(t,r)}}const Iae=e=>e/100;class Vc extends tg{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var n,i;const{motionValue:r}=this.options;r&&r.updatedAt!==Xt.now()&&this.tick(Xt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(n=this.options).onStop)==null||i.call(n))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause(),Ek(this,this.options)}initAnimation(){const{options:t}=this;vk(t);const{type:r=Go,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:a=0}=t;let{keyframes:o}=t;const l=r||Go;l!==Go&&typeof o[0]!="number"&&(this.mixKeyframes=ql(Iae,Q1(o[0],o[1])),o=[0,100]);const u=l(o===t.keyframes?t:{...t,keyframes:o});s==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...o].reverse(),velocity:-a})),u.calculatedDuration===null&&(u.calculatedDuration=eg(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=u}updateTime(t){const r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(t,r=!1){const{generator:n,totalDuration:i,mixKeyframes:s,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:l}=this;if(this.startTime===null)return n.next(0);const{delay:u=0,keyframes:c,repeat:d,repeatType:h,repeatDelay:f,type:m,onUpdate:b,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),r?this.currentTime=t:this.updateTime(t);const E=this.currentTime-u*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?E<0:E>i;this.currentTime=Math.max(E,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let x=this.currentTime,_=n;if(d){const N=Math.min(this.currentTime,i)/o;let U=Math.floor(N),z=N%1;!z&&N>=1&&(z=1),z===1&&U--,U=Math.min(U,d+1),!!(U%2)&&(h==="reverse"?(z=1-z,f&&(z-=f/o)):h==="mirror"&&(_=a)),x=di(0,1,z)*o}let A;w?(this.delayState.value=c[0],A=this.delayState):A=_.next(x),s&&!w&&(A.value=s(A.value));let{done:S}=A;!w&&l!==null&&(S=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const I=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return I&&m!==_m&&(A.value=G0(c,this.options,y,this.speed)),b&&b(A.value),I&&this.finish(),A}then(t,r){return this.finished.then(t,r)}get duration(){return Gr(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Gr(t)}get time(){return Gr(this.currentTime)}set time(t){t=Wr(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){return kae(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(t){const r=this.playbackSpeed!==t;r&&this.driver&&this.updateTime(Xt.now()),this.playbackSpeed=t,r&&this.driver&&(this.time=Gr(this.currentTime))}play(){var i,s;if(this.isStopped)return;const{driver:t=hae,startTime:r}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),(s=(i=this.options).onPlay)==null||s.call(i);const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=r??n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Xt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,r;this.notifyFinished(),this.teardown(),this.state="finished",(r=(t=this.options).onComplete)==null||r.call(t)}cancel(){var t,r;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(r=(t=this.options).onCancel)==null||r.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var r;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(r=this.driver)==null||r.stop(),t.observe(this)}}const Nae=new Set(["brightness","contrast","saturate","opacity"]);function Rae(e){const[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=r.match(Y1)||[];if(!n)return e;const i=r.replace(n,"");let s=Nae.has(t)?1:0;return n!==r&&(s*=100),t+"("+s+i+")"}const Pae=/\b([a-z-]*)\(.*?\)/gu,Tm={...Nr,getAnimatableNone:e=>{const t=e.match(Pae);return t?t.map(Rae).join(" "):e}},wm={...Nr,getAnimatableNone:e=>{const t=Nr.parse(e);return Nr.createTransformer(e)(t.map(n=>typeof n=="number"?0:typeof n=="object"?{...n,alpha:1}:n))}},f3={...io,transform:Math.round},Oae={rotate:Wn,pathRotation:Wn,rotateX:Wn,rotateY:Wn,rotateZ:Wn,scale:Au,scaleX:Au,scaleY:Au,scaleZ:Au,skew:Wn,skewX:Wn,skewY:Wn,distance:ve,translateX:ve,translateY:ve,translateZ:ve,x:ve,y:ve,z:ve,perspective:ve,transformPerspective:ve,opacity:ml,originX:l3,originY:l3,originZ:ve},qc={borderWidth:ve,borderTopWidth:ve,borderRightWidth:ve,borderBottomWidth:ve,borderLeftWidth:ve,borderRadius:ve,borderTopLeftRadius:ve,borderTopRightRadius:ve,borderBottomRightRadius:ve,borderBottomLeftRadius:ve,width:ve,maxWidth:ve,height:ve,maxHeight:ve,top:ve,right:ve,bottom:ve,left:ve,inset:ve,insetBlock:ve,insetBlockStart:ve,insetBlockEnd:ve,insetInline:ve,insetInlineStart:ve,insetInlineEnd:ve,padding:ve,paddingTop:ve,paddingRight:ve,paddingBottom:ve,paddingLeft:ve,paddingBlock:ve,paddingBlockStart:ve,paddingBlockEnd:ve,paddingInline:ve,paddingInlineStart:ve,paddingInlineEnd:ve,margin:ve,marginTop:ve,marginRight:ve,marginBottom:ve,marginLeft:ve,marginBlock:ve,marginBlockStart:ve,marginBlockEnd:ve,marginInline:ve,marginInlineStart:ve,marginInlineEnd:ve,fontSize:ve,backgroundPositionX:ve,backgroundPositionY:ve,...Oae,zIndex:f3,fillOpacity:ml,strokeOpacity:ml,numOctaves:f3},Lae={...qc,color:Mt,backgroundColor:Mt,outlineColor:Mt,fill:Mt,stroke:Mt,borderColor:Mt,borderTopColor:Mt,borderRightColor:Mt,borderBottomColor:Mt,borderLeftColor:Mt,filter:Tm,WebkitFilter:Tm,mask:wm,WebkitMask:wm},_k=e=>Lae[e],Dae=new Set([Tm,wm]);function rg(e,t){let r=_k(e);return Dae.has(r)||(r=Nr),r.getAnimatableNone?r.getAnimatableNone(t):void 0}function Mae(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const gs=e=>e*180/Math.PI,km=e=>{const t=gs(Math.atan2(e[1],e[0]));return Sm(t)},Bae={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:km,rotateZ:km,skewX:e=>gs(Math.atan(e[1])),skewY:e=>gs(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Sm=e=>(e=e%360,e<0&&(e+=360),e),m3=km,p3=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),g3=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Fae={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:p3,scaleY:g3,scale:e=>(p3(e)+g3(e))/2,rotateX:e=>Sm(gs(Math.atan2(e[6],e[5]))),rotateY:e=>Sm(gs(Math.atan2(-e[2],e[0]))),rotateZ:m3,rotate:m3,skewX:e=>gs(Math.atan(e[4])),skewY:e=>gs(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function gl(e){return e.includes("scale")?1:0}function Am(e,t){if(!e||e==="none")return gl(t);const r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,i;if(r)n=Fae,i=r;else{const o=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=Bae,i=o}if(!i)return gl(t);const s=n[t],a=i[1].split(",").map($ae);return typeof s=="function"?s(a):a[s]}const zae=(e,t)=>{const{transform:r="none"}=getComputedStyle(e);return Am(r,t)};function $ae(e){return parseFloat(e.trim())}const so=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Pi=new Set([...so,"pathRotation"]),b3=e=>e===io||e===ve,jae=new Set(["x","y","z"]),Uae=so.filter(e=>!jae.has(e));function Hae(e){const t=[];return Uae.forEach(r=>{const n=e.getValue(r);if(n!==void 0){const i=n.get(),s=r.startsWith("scale")?1:0;if(i===s)return;t.push([r,i]),n.set(s)}}),t}const Vae=new Set(["bottom","right"]);function y3(e,t,r,n,i,s){const a=parseFloat(e);if(!isNaN(a))return a;const{min:o,max:l}=t()[r],u=l-o;return s==="border-box"?u:u-parseFloat(n)-parseFloat(i)}const ks={width:({width:e,paddingLeft:t="0",paddingRight:r="0",boxSizing:n},i)=>y3(e,i,"x",t,r,n),height:({height:e,paddingTop:t="0",paddingBottom:r="0",boxSizing:n},i)=>y3(e,i,"y",t,r,n),top:({top:e})=>parseFloat(e),left:({left:e})=>parseFloat(e),bottom:({top:e},t)=>{const{y:r}=t();return parseFloat(e)+(r.max-r.min)},right:({left:e},t)=>{const{x:r}=t();return parseFloat(e)+(r.max-r.min)},x:({transform:e})=>Am(e,"x"),y:({transform:e})=>Am(e,"y")};ks.translateX=ks.x;ks.translateY=ks.y;const Ss=new Set;let Cm=!1,Im=!1,Nm=!1;function Tk(){if(Im){const e=[],t=new Set,r=new Set;Ss.forEach(i=>{i.needsMeasurement&&(e.push(i),t.add(i.element),Vae.has(i.name)&&r.add(i.element))});const n=new Map;r.forEach(i=>{const s=Hae(i);s.length&&(n.set(i,s),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const s=n.get(i);s&&s.forEach(([a,o])=>{var l;(l=i.getValue(a))==null||l.set(o)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}Im=!1,Cm=!1,Ss.forEach(e=>e.complete(Nm)),Ss.clear()}function wk(){Ss.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Im=!0)})}function qae(){Nm=!0,wk(),Tk(),Nm=!1}function Gae(e,t,r){if(typeof e=="string"){if(H1(e)||V1(e))return parseFloat(e);if(!Nr.test(e)&&Nr.test(r))return rg(t,r)}return e??void 0}class ng{constructor(t,r,n,i,s,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=n,this.motionValue=i,this.element=s,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(Ss.add(this),Cm||(Cm=!0,it.read(wk),it.resolveKeyframes(Tk))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:r,element:n,motionValue:i}=this;if(t[0]===null){const s=i==null?void 0:i.get(),a=t[t.length-1];if(s!==void 0)t[0]=s;else if(n&&r){const o=Gae(n.readValue(r,a),r,a);o!==void 0&&(t[0]=o)}t[0]===void 0&&(t[0]=a),i&&s===void 0&&i.set(t[0])}Mae(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ss.delete(this)}cancel(){this.state==="scheduled"&&(Ss.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Wae=e=>e.startsWith("--");function kk(e,t,r){Wae(t)?e.style.setProperty(t,r):e.style[t]=r}const Zae={};function Sk(e,t){const r=Zw(e);return()=>Zae[t]??r()}const Yae=Sk(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Ak=Sk(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Po=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,v3={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Po([0,.65,.55,1]),circOut:Po([.55,0,1,.45]),backIn:Po([.31,.01,.66,-.59]),backOut:Po([.33,1.53,.69,.99])};function Ck(e,t){if(e)return typeof e=="function"?Ak()?pk(e,t):"ease-out":ik(e)?Po(e):Array.isArray(e)?e.map(r=>Ck(r,t)||v3.easeOut):v3[e]}function Kae(e,t,r,{delay:n=0,duration:i=300,repeat:s=0,repeatType:a="loop",ease:o="easeOut",times:l}={},u=void 0){const c={[t]:r};l&&(c.offset=l);const d=Ck(o,i);Array.isArray(d)&&(c.easing=d);const h={delay:n,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:a==="reverse"?"alternate":"normal"};return u&&(h.pseudoElement=u),e.animate(c,h)}function Ik(e){return typeof e=="function"&&"applyToOptions"in e}function Xae({type:e,...t}){return Ik(e)&&Ak()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Nk extends tg{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:r,name:n,keyframes:i,pseudoElement:s,allowFlatten:a=!1,finalKeyframe:o,onComplete:l}=t;this.isPseudoElement=!!s,this.allowFlatten=a,this.options=t,q0(typeof t.type!="string");const u=Xae(t);this.animation=Kae(r,n,i,u,s),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const c=G0(i,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(c),kk(r,n,c),this.animation.cancel()}l==null||l(),this.notifyFinished()},Ek(this,t,u)}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,r;(r=(t=this.animation).finish)==null||r.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var r,n,i;const t=(r=this.options)==null?void 0:r.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((i=(n=this.animation).commitStyles)==null||i.call(n))}get duration(){var r,n;const t=((n=(r=this.animation.effect)==null?void 0:r.getComputedTiming)==null?void 0:n.call(r).duration)||0;return Gr(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Gr(t)}get time(){return Gr(Number(this.animation.currentTime)||0)}set time(t){const r=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Wr(t),r&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,onAttach:r,observe:n}){var i;return this.allowFlatten&&((i=this.animation.effect)==null||i.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Yae()?(this.animation.timeline=t,r==null||r(this.animation),hn):n(this)}}const Rk={anticipate:tk,backInOut:ek,circInOut:nk};function Qae(e){return e in Rk}function Jae(e){typeof e.ease=="string"&&Qae(e.ease)&&(e.ease=Rk[e.ease])}const Th=10;class eoe extends Nk{constructor(t){Jae(t),vk(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:r,onUpdate:n,onComplete:i,element:s,...a}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}const o=new Vc({...a,autoplay:!1}),l=Math.max(Th,Xt.now()-this.startTime),u=di(0,Th,l-Th),c=o.sample(l).value,{name:d}=this.options;s&&d&&kk(s,d,c),r.setWithVelocity(o.sample(Math.max(0,l-u)).value,c,u),o.stop()}}const x3=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Nr.test(e)||e==="0")&&!e.startsWith("url("));function toe(e){const t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function roe(e,t,r,n){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],a=x3(i,t),o=x3(s,t);return!a||!o?!1:toe(e)||(r==="spring"||Ik(r))&&n}function Rm(e){e.duration=0,e.type="keyframes"}const Pm=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),noe=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function ioe(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&noe.test(e[t]))return!0;return!1}const E3=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),soe=Zw(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function aoe(e){var d;const{motionValue:t,name:r,repeatDelay:n,repeatType:i,damping:s,type:a,keyframes:o}=e;if(!r||!(Pm.has(r)||E3.has(r)))return!1;const l=(d=t==null?void 0:t.owner)==null?void 0:d.current;if(!(l instanceof HTMLElement)&&!(l instanceof SVGElement))return!1;const{onUpdate:u,transformTemplate:c}=t.owner.getProps();return soe()&&(Pm.has(r)||E3.has(r)&&ioe(o))&&(r!=="transform"||!c)&&!u&&!n&&i!=="mirror"&&s!==0&&a!=="inertia"}const ooe=40;class loe extends tg{constructor(t){var l;super(),this.stop=()=>{var u,c;this._animation&&(this._animation.stop(),(u=this.stopTimeline)==null||u.call(this)),(c=this.keyframeResolver)==null||c.cancel()},this.createdAt=Xt.now();const{keyframes:r,name:n,motionValue:i,element:s}=t,a=t;a.autoplay??(a.autoplay=!0),a.delay??(a.delay=0),a.type??(a.type="keyframes"),a.repeat??(a.repeat=0),a.repeatDelay??(a.repeatDelay=0),a.repeatType??(a.repeatType="loop");const o=(s==null?void 0:s.KeyframeResolver)||ng;this.keyframeResolver=new o(r,(u,c,d)=>this.onKeyframesResolved(u,c,a,!d),n,i,s),(l=this.keyframeResolver)==null||l.scheduleResolve()}onKeyframesResolved(t,r,n,i){var y,E;this.keyframeResolver=void 0;const{name:s,type:a,velocity:o,delay:l,isHandoff:u,onUpdate:c}=n;this.resolvedAt=Xt.now();let d=!0;roe(t,s,a,o)||(d=!1,(ii.instantAnimations||!l)&&(c==null||c(G0(t,n,r))),t[0]=t[t.length-1],Rm(n),n.repeat=0);const h=i?this.resolvedAt?this.resolvedAt-this.createdAt>ooe?this.resolvedAt:this.createdAt:this.createdAt:void 0,{onComplete:f}=n;n.startTime??(n.startTime=h),n.finalKeyframe=r,n.keyframes=t,n.onComplete=()=>{f==null||f(),this.notifyFinished()};const m=d&&!u&&aoe(n);let b;if(m){n.element=(E=(y=n.motionValue)==null?void 0:y.owner)==null?void 0:E.current;try{b=new eoe(n)}catch{b=new Vc(n)}}else b=new Vc(n);this.pendingTimeline&&(this.stopTimeline=b.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=b}get finished(){return this._animation?this._animation.finished:super.finished}then(t,r){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),qae()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function Pk(e,t,r,n=0,i=1){const s=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),a=e.size,o=(a-1)*n;return typeof r=="function"?r(s,a):i===1?s*n:o-s*n}const _3=30,uoe=e=>!isNaN(parseFloat(e));class coe{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{const i=Xt.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&(this.notifyChange(),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=Xt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=uoe(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){var n;return t==="change"?this.onChangeSubscribe(r):((n=this.events)[t]||(n[t]=new jc)).add(r)}onChangeSubscribe(t){const{events:r}=this;return!r.change&&!this.changeSubscriber?this.changeSubscriber=t:(r.change||(r.change=new jc,r.change.add(this.changeSubscriber),this.changeSubscriber=void 0),r.change.add(t)),()=>{var n;this.changeSubscriber===t?this.changeSubscriber=void 0:(n=r.change)==null||n.remove(t),this.stopIfUnobserved()}}stopIfUnobserved(){it.read(()=>{var t;!this.changeSubscriber&&!((t=this.events.change)!=null&&t.getSize())&&this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(const t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,r,n){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.notifyChange()}notifyChange(){var n;const{current:t,changeSubscriber:r}=this;r?r(t):(n=this.events.change)==null||n.notify(t)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Xt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>_3)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,_3);return Yw(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{var s;this.hasAnimated=!0;let n=!1,i;i=t(()=>{var a;n=!0,(a=this.events.animationComplete)==null||a.notify(),this.animation===i&&this.clearAnimation(),r()}),n||(this.animation=i),(s=this.events.animationStart)==null||s.notify()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=void 0}destroy(){var t,r;(t=this.dependents)==null||t.clear(),(r=this.events.destroy)==null||r.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Fa(e,t){return new coe(e,t)}function Ok(e,t){if(e!=null&&e.inherit&&t){const{inherit:r,...n}=e;return{...t,...n}}return e}function ig(e,t){const r=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return r!==e?Ok(r,e):r}const doe={type:"spring",stiffness:500,damping:25,restSpeed:10},hoe=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),foe={type:"keyframes",duration:.8},moe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},poe=(e,{keyframes:t})=>t.length>2?foe:Pi.has(e)?e.startsWith("scale")?hoe(t[1]):doe:moe,goe=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function boe(e){for(const t in e)if(!goe.has(t))return!0;return!1}const sg=(e,t,r,n={},i,s)=>a=>{const o=ig(n,e)||{},l=o.delay||n.delay||0;let{elapsed:u=0}=n;u=u-Wr(l);const c={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...o,delay:-u,onUpdate:h=>{t.set(h),o.onUpdate&&o.onUpdate(h)},onComplete:()=>{a(),o.onComplete&&o.onComplete()},name:e,motionValue:t,element:s?void 0:i};boe(o)||Object.assign(c,poe(e,c)),c.duration&&(c.duration=Wr(c.duration)),c.repeatDelay&&(c.repeatDelay=Wr(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Rm(c),c.delay===0&&(d=!0)),(ii.instantAnimations||ii.skipAnimations||i!=null&&i.shouldSkipAnimations||o.skipAnimations)&&(d=!0,Rm(c),c.delay=0),c.allowFlatten=!o.type&&!o.ease,d&&!s&&t.get()!==void 0){const h=G0(c.keyframes,o);if(h!==void 0){it.update(()=>{c.onUpdate(h),c.onComplete()});return}}return o.isSync?new Vc(c):new loe(c)},yoe=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function voe(e){const t=yoe.exec(e);if(!t)return[,];const[,r,n,i]=t;return[`--${r??n}`,i]}function Lk(e,t,r=1){const[n,i]=voe(e);if(!n)return;const s=window.getComputedStyle(t).getPropertyValue(n);if(s){const a=s.trim();return H1(a)?parseFloat(a):a}return Z1(i)?Lk(i,t,r+1):i}function xoe(e){const t=[{},{}];return e==null||e.values.forEach((r,n)=>{t[0][n]=r.get(),t[1][n]=r.getVelocity()}),t}function Dk(e,t,r,n){const i=s=>typeof s=="function"?s(r!==void 0?r:e.custom,...xoe(n)):s;return t=i(t),typeof t=="string"&&(t=e.variants&&e.variants[t]),i(t)}function As(e,t,r){return Dk(e.getProps(),t,r,e)}const Mk=(e,t)=>{var r;return t==="exit"?(r=e.presenceContext)==null?void 0:r.custom:void 0},Bk=new Set(["width","height","top","left","right","bottom",...so]),Eoe=e=>Array.isArray(e);function _oe(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,Fa(r))}function Toe(e){return Eoe(e)?e[e.length-1]||0:e}function woe(e,t){const r=As(e,t);let{transitionEnd:n={},transition:i={},...s}=r||{};s={...s,...n};for(const a in s){const o=Toe(s[a]);_oe(e,a,o)}}const Qt=e=>!!(e&&e.getVelocity);function koe(e){return!!(Qt(e)&&e.add)}function Om(e,t){const r=e.getValue("willChange");if(koe(r))return r.add(t);if(!r&&ii.WillChange){const n=new ii.WillChange("auto");e.addValue("willChange",n),n.add(t)}}function ag(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Soe="framerAppearId",Fk="data-"+ag(Soe);function zk(e){return e.props[Fk]}const Aoe=typeof window<"u";function Coe({protectedKeys:e,needsAnimating:t},r){const n=r in e&&!t[r];return t[r]=!1,n}function $k(e,t,{delay:r=0,transitionOverride:n,type:i}={}){var m;let{transition:s,transitionEnd:a,...o}=t;const l=e.getDefaultTransition();s=s?Ok(s,l):l;const u=s==null?void 0:s.reduceMotion,c=s==null?void 0:s.skipAnimations;n&&(s=n);const d=[],h=i&&((m=e.animationState)==null?void 0:m.getState()[i]),f=s==null?void 0:s.path;f&&f.animateVisualElement(e,o,s,r,d);for(const b in o){const y=e.getValue(b,e.latestValues[b]??null),E=o[b];if(E===void 0||h&&Coe(h,b))continue;const w={delay:r,...ig(s||{},b)};c&&(w.skipAnimations=!0);const x=y.get();if(x!==void 0&&!y.isAnimating()&&!Array.isArray(E)&&E===x&&!w.velocity){it.update(()=>y.set(E));continue}let _=!1;if(Aoe&&window.MotionHandoffAnimation){const I=zk(e);if(I){const N=window.MotionHandoffAnimation(I,b,it);N!==null&&(w.startTime=N,_=!0)}}Om(e,b);const A=u??e.shouldReduceMotion;y.start(sg(b,y,E,A&&Bk.has(b)?{type:!1}:w,e,_));const S=y.animation;S&&d.push(S)}if(a){const b=()=>it.update(()=>{a&&woe(e,a)});d.length?Promise.all(d).then(b):b()}return d}function Lm(e,t,r={}){const n=As(e,t,Mk(e,r.type)),i=r.transitionOverride||((n==null?void 0:n.transition)??(e.getDefaultTransition()||{})),s=()=>Promise.all(n?$k(e,n,r):[]),a=(l=0)=>{const{variantChildren:u}=e,{delayChildren:c=0,staggerChildren:d,staggerDirection:h}=i,f=[];return u==null||u.forEach(m=>{m.notify("AnimationStart",t),f.push(Lm(m,t,{...r,delay:l+(typeof c=="function"?0:c)+Pk(u,m,c,d,h)}).then(()=>m.notify("AnimationComplete",t)))}),Promise.all(f)},{when:o}=i;return o?o==="beforeChildren"?s().then(()=>a()):a().then(s):Promise.all([s(),a(r.delay)])}function Ioe(e,t,r={}){return e.notify("AnimationStart",t),(Array.isArray(t)?Promise.all(t.map(i=>Lm(e,i,r))):typeof t=="string"?Lm(e,t,r):Promise.all($k(e,As(e,t,r.custom),r))).then(()=>{e.notify("AnimationComplete",t)})}const Noe={test:e=>e==="auto",parse:e=>e},Roe=e=>t=>t.test(e),Poe=[io,ve,Nn,Wn,Hse,Use,Noe],T3=e=>Poe.find(Roe(e));function Ooe(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||V1(e):!0}const Loe=new Set(["auto","none","0"]);function Doe(e,t,r){let n=0,i;for(;n<e.length&&!i;){const s=e[n];typeof s=="string"&&!Loe.has(s)&&Yse(s)&&(i=e[n]),n++}if(i&&r)for(const s of t)e[s]!==i&&(e[s]=rg(r,i))}class Moe extends ng{constructor(t,r,n,i,s){super(t,r,n,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:r,name:n}=this;if(!r||!r.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let d=t[c];if(typeof d=="string"&&(d=d.trim(),Z1(d))){const h=Lk(d,r.current);h!==void 0&&(t[c]=h),c===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!Bk.has(n)||t.length!==2)return;const[i,s]=t;if(typeof i=="number"&&typeof s=="number")return;const a=T3(i),o=T3(s),l=o3(i),u=o3(s);if(l!==u&&ks[n]){this.needsMeasurement=!0;return}if(a!==o)if(b3(a)&&b3(o))for(let c=0;c<t.length;c++){const d=t[c];typeof d=="string"&&(t[c]=parseFloat(d))}else ks[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:r}=this,n=[];for(let i=0;i<t.length;i++)(t[i]===null||Ooe(t[i]))&&n.push(i);n.length&&Doe(t,n,r)}measure(){const{element:t,name:r}=this;return ks[r](window.getComputedStyle(t.current),()=>t.measureViewportBox())}measureInitialState(){var s;const{element:t,unresolvedKeyframes:r,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),r[0]=this.measuredOrigin;const i=r[r.length-1];i!==void 0&&((s=this.motionValue)==null||s.jump(i,!1))}measureEndState(){var s,a;const{element:t,unresolvedKeyframes:r}=this;if(!t||!t.current)return;(s=this.motionValue)==null||s.jump(this.measuredOrigin,!1);const n=r.length-1,i=r[n];r[n]=this.measure(),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([o,l])=>{t.getValue(o).set(l)}),this.resolveNoneKeyframes()}}const og=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function Boe(e){return Ww(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}function lg(e){return Ww(e)&&"ownerSVGElement"in e}const Dm=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function jk(e,t,r){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let n=document;const i=(r==null?void 0:r[e])??n.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(n=>n!=null)}const Foe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},zoe=so.length;function $oe(e,t,r){let n="",i=!0;for(let a=0;a<zoe;a++){const o=so[a],l=e[o];if(l===void 0)continue;let u=!0;if(typeof l=="number")u=l===(o.startsWith("scale")?1:0);else{const c=parseFloat(l);u=o.startsWith("scale")?c===1:c===0}if(!u||r){const c=Dm(l,qc[o]);if(!u){i=!1;const d=Foe[o]||o;n+=`${d}(${c}) `}r&&(t[o]=c)}}const s=e.pathRotation;return s&&(i=!1,n+=`rotate(${Dm(s,qc.pathRotation)}) `),n=n.trim(),r?n=r(t,i?"":n):i&&(n="none"),n}function ug(e,t,r){const{style:n,vars:i,transformOrigin:s}=e;let a=!1,o=!1;for(const l in t){const u=t[l];if(Pi.has(l)){a=!0;continue}else if(ak(l)){i[l]=u;continue}else{const c=Dm(u,qc[l]);l.startsWith("origin")?(o=!0,s[l]=c):n[l]=c}}if(t.transform||(a||r?n.transform=$oe(t,e.transform,r):n.transform&&(n.transform="none")),o){const{originX:l="50%",originY:u="50%",originZ:c=0}=s;n.transformOrigin=`${l} ${u} ${c}`}}const joe={offset:"stroke-dashoffset",array:"stroke-dasharray"},Uoe={offset:"strokeDashoffset",array:"strokeDasharray"};function Hoe(e,t,r=1,n=0,i=!0){e.pathLength=1;const s=i?joe:Uoe;e[s.offset]=`${-n}`,e[s.array]=`${t} ${r}`}const Uk=["transform","opacity","offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Hk(e,{attrX:t,attrY:r,attrScale:n,pathLength:i,pathSpacing:s=1,pathOffset:a=0,...o},l,u,c){if(ug(e,o,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:h}=e;for(const f of Uk)d[f]!==void 0&&(h[f]=d[f],delete d[f]);(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),r!==void 0&&(d.y=r),n!==void 0&&(d.scale=n),i!==void 0&&Hoe(d,i,s,a,!1)}function Vk({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function Voe({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function qoe(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function wh(e){return e===void 0||e===1}function Mm({scale:e,scaleX:t,scaleY:r}){return!wh(e)||!wh(t)||!wh(r)}function us(e){return Mm(e)||qk(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function qk(e){return w3(e.x)||w3(e.y)}function w3(e){return e&&e!=="0%"}function Gc(e,t,r){const n=e-r,i=t*n;return r+i}function k3(e,t,r,n,i){return i!==void 0&&(e=Gc(e,i,n)),Gc(e,r,n)+t}function Bm(e,t=0,r=1,n,i){e.min=k3(e.min,t,r,n,i),e.max=k3(e.max,t,r,n,i)}function Gk(e,{x:t,y:r}){Bm(e.x,t.translate,t.scale,t.originPoint),Bm(e.y,r.translate,r.scale,r.originPoint)}const S3=.999999999999,A3=1.0000000000001;function Goe(e,t,r,n=!1){var o;const i=r.length;if(!i)return;t.x=t.y=1;let s,a;for(let l=0;l<i;l++){s=r[l],a=s.projectionDelta;const{visualElement:u}=s.options;u&&u.props.style&&u.props.style.display==="contents"||(n&&s.options.layoutScroll&&s.scroll&&s!==s.root&&(Sn(e.x,-s.scroll.offset.x),Sn(e.y,-s.scroll.offset.y)),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Gk(e,a)),n&&us(s.latestValues)&&qu(e,s.latestValues,(o=s.layout)==null?void 0:o.layoutBox))}t.x<A3&&t.x>S3&&(t.x=1),t.y<A3&&t.y>S3&&(t.y=1)}function Sn(e,t){e.min+=t,e.max+=t}function C3(e,t,r,n,i=.5){const s=tt(e.min,e.max,i);Bm(e,t,r,s,n)}function I3(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function qu(e,t,r){const n=r??e;C3(e.x,I3(t.x,n.x),t.scaleX,t.scale,t.originX),C3(e.y,I3(t.y,n.y),t.scaleY,t.scale,t.originY)}function Wk(e,t){return Vk(qoe(e.getBoundingClientRect(),t))}function Woe(e,t,r){const n=Wk(e,r),{scroll:i}=t;return i&&(Sn(n.x,i.offset.x),Sn(n.y,i.offset.y)),n}const{schedule:cg}=mk(queueMicrotask,!1),an={x:!1,y:!1};function Zk(){return an.x||an.y}function Zoe(e){return e==="x"||e==="y"?an[e]?null:(an[e]=!0,()=>{an[e]=!1}):an.x||an.y?null:(an.x=an.y=!0,()=>{an.x=an.y=!1})}function Yk(e,t){const r=jk(e),n=new AbortController,i={passive:!0,...t,signal:n.signal};return[r,i,()=>n.abort()]}function Yoe(e){return!(e.pointerType==="touch"||Zk())}function Koe(e,t,r={}){const[n,i,s]=Yk(e,r);return n.forEach(a=>{let o=!1,l=!1,u;const c=()=>{a.removeEventListener("pointerleave",m)},d=y=>{u&&(u(y),u=void 0),c()},h=y=>{o=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),l&&(l=!1,d(y))},f=()=>{o=!0,window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",h,i)},m=y=>{if(y.pointerType!=="touch"){if(o){l=!0;return}d(y)}},b=y=>{if(!Yoe(y))return;l=!1;const E=t(a,y);typeof E=="function"&&(u=E,a.addEventListener("pointerleave",m,i))};a.addEventListener("pointerenter",b,i),a.addEventListener("pointerdown",f,i)}),s}const Kk=(e,t)=>t?e===t?!0:Kk(e,t.parentElement):!1,dg=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Xoe=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Qoe(e){return Xoe.has(e.tagName)||e.isContentEditable===!0}const Joe=new Set(["INPUT","SELECT","TEXTAREA"]);function ele(e){return Joe.has(e.tagName)||e.isContentEditable===!0}const Gu=new WeakSet;function N3(e){return t=>{t.key==="Enter"&&e(t)}}function kh(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const tle=(e,t)=>{const r=e.currentTarget;if(!r)return;const n=N3(()=>{if(Gu.has(r))return;kh(r,"down");const i=N3(()=>{kh(r,"up")}),s=()=>kh(r,"cancel");r.addEventListener("keyup",i,t),r.addEventListener("blur",s,t)});r.addEventListener("keydown",n,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),t)};function R3(e){return dg(e)&&!Zk()}const P3=new WeakSet;function rle(e,t,r={}){const[n,i,s]=Yk(e,r),a=o=>{const l=o.currentTarget;if(!R3(o)||P3.has(o))return;Gu.add(l),r.stopPropagation&&P3.add(o);const u=t(l,o),c={...i,capture:!0},d=(m,b)=>{window.removeEventListener("pointerup",h,c),window.removeEventListener("pointercancel",f,c),Gu.has(l)&&Gu.delete(l),R3(m)&&typeof u=="function"&&u(m,{success:b})},h=m=>{d(m,l===window||l===document||r.useGlobalTarget||Kk(l,m.target))},f=m=>{d(m,!1)};window.addEventListener("pointerup",h,c),window.addEventListener("pointercancel",f,c)};return n.forEach(o=>{(r.useGlobalTarget?window:o).addEventListener("pointerdown",a,i),Boe(o)&&(o.addEventListener("focus",u=>tle(u,i)),!Qoe(o)&&!o.hasAttribute("tabindex")&&(o.tabIndex=0))}),s}const Wu=new WeakMap;let _i;const Xk=(e,t,r)=>(n,i)=>i&&i[0]?i[0][e+"Size"]:lg(n)&&"getBBox"in n?n.getBBox()[t]:n[r],nle=Xk("inline","width","offsetWidth"),ile=Xk("block","height","offsetHeight");function sle({target:e,borderBoxSize:t}){var r;(r=Wu.get(e))==null||r.forEach(n=>{n(e,{get width(){return nle(e,t)},get height(){return ile(e,t)}})})}function ale(e){e.forEach(sle)}function ole(){typeof ResizeObserver>"u"||(_i=new ResizeObserver(ale))}function lle(e,t){_i||ole();const r=jk(e);return r.forEach(n=>{let i=Wu.get(n);i||(i=new Set,Wu.set(n,i)),i.add(t),_i==null||_i.observe(n)}),()=>{r.forEach(n=>{const i=Wu.get(n);i==null||i.delete(t),i!=null&&i.size||_i==null||_i.unobserve(n)})}}const Zu=new Set;let pa;function ule(){pa=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Zu.forEach(t=>t(e))},window.addEventListener("resize",pa)}function cle(e){return Zu.add(e),pa||ule(),()=>{Zu.delete(e),!Zu.size&&typeof pa=="function"&&(window.removeEventListener("resize",pa),pa=void 0)}}function O3(e,t){return typeof e=="function"?cle(e):lle(e,t)}function dle(e){return lg(e)&&e.tagName==="svg"}const L3=e=>typeof e=="number"?e:parseFloat(e),D3=()=>({translate:0,scale:1,origin:0,originPoint:0}),ga=()=>({x:D3(),y:D3()}),M3=()=>({min:0,max:0}),Ot=()=>({x:M3(),y:M3()}),hle=new WeakMap;function W0(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function bl(e){return typeof e=="string"||Array.isArray(e)}const hg=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],B3=["initial",...hg];function Z0(e){if(W0(e.animate))return!0;for(let t=0;t<B3.length;t++)if(bl(e[B3[t]]))return!0;return!1}function Qk(e){return!!(Z0(e)||e.variants)}function fle(e,t,r){for(const n in t){const i=t[n],s=r[n];if(Qt(i))e.addValue(n,i);else if(Qt(s))e.addValue(n,Fa(i,{owner:e}));else if(s!==i)if(e.hasValue(n)){const a=e.getValue(n);a.liveStyle===!0?a.jump(i):a.hasAnimated||a.set(i)}else{const a=e.getStaticValue(n);e.addValue(n,Fa(a!==void 0?a:i,{owner:e}))}}for(const n in r)t[n]===void 0&&e.removeValue(n);return t}const Fm={current:null},Jk={current:!1},mle=typeof window<"u";function ple(){if(Jk.current=!0,!!mle)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Fm.current=e.matches;e.addEventListener("change",t),t()}else Fm.current=!1}const F3=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Wc={};function e9(e){Wc=e}function gle(){return Wc}class ble{scrapeMotionValuesFromProps(t,r,n){return{}}constructor({parent:t,props:r,presenceContext:n,reducedMotionConfig:i,skipAnimations:s,blockInitialAnimation:a,visualState:o},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=ng,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=Xt.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,it.render(this.render,!1,!0))};const{latestValues:u,renderState:c}=o;this.latestValues=u,this.baseTarget={...u},this.initialValues=r.initial?{...u}:{},this.renderState=c,this.parent=t,this.props=r,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=s,this.options=l,this.blockInitialAnimation=!!a,this.isControllingVariants=Z0(r),this.isVariantNode=Qk(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...h}=this.scrapeMotionValuesFromProps(r,{},this);for(const f in h){const m=h[f];u[f]!==void 0&&Qt(m)&&m.set(u[f])}}mount(t){var r,n;if(this.hasBeenMounted)for(const i in this.initialValues)(r=this.values.get(i))==null||r.jump(this.initialValues[i]),this.latestValues[i]=this.initialValues[i];if(this.current=t,hle.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.isVariantNode&&!this.isControllingVariants){let i=this;do i=i.props.inherit!==!1&&i.parent;while(i&&!i.isVariantNode);if(i){const{variantChildren:s}=i;s.add(this),this.removeFromVariantTree=()=>s.delete(this)}}this.values.forEach((i,s)=>this.bindToMotionValue(s,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Jk.current||ple(),this.shouldReduceMotion=Fm.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),Vi(this.notifyUpdate),Vi(this.render),this.valueSubscriptions.forEach(r=>r()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const r in this.events)this.events[r].clear();for(const r in this.features){const n=this.features[r];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,r){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),r.accelerate&&Pm.has(t)&&this.current instanceof HTMLElement){const{factory:a,keyframes:o,times:l,ease:u,duration:c}=r.accelerate,d=new Nk({element:this.current,name:t,keyframes:o,times:l,ease:u,duration:Wr(c)}),h=a(d);this.valueSubscriptions.set(t,()=>{h(),d.cancel()});return}const n=Pi.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=r.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&it.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;typeof window<"u"&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{i(),s&&s()})}sortNodePosition(t){return!this.current||!t.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Wc){const r=Wc[t];if(!r)continue;const{isEnabled:n,Feature:i}=r;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ot()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let n=0;n<F3.length;n++){const i=F3[n];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,a=t[s];a&&(this.propEventSubscriptions[i]=this.on(i,a))}this.prevMotionValues=fle(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}addValue(t,r){const n=this.values.get(t);if(r!==n){n&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r);const i=r.get();i!==void 0&&(this.latestValues[t]=i)}}removeValue(t){this.values.delete(t);const r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){var i;if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&r!==void 0&&(n=Fa(r??((i=this.getDefaultValue)==null?void 0:i.call(this,t)),{owner:this}),this.addValue(t,n)),n}readValue(t,r){let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&(H1(n)||V1(n))?n=parseFloat(n):typeof n!="number"&&!Nr.test(n)&&Nr.test(r)&&(n=rg(t,r)),this.setBaseTarget(t,Qt(n)?n.get():n)),Qt(n)?n.get():n}setBaseTarget(t,r){this.baseTarget[t]=r}on(t,r){return this.events[t]||(this.events[t]=new jc),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}scheduleRenderMicrotask(){cg.render(this.render)}}class t9 extends ble{constructor(){super(...arguments),this.KeyframeResolver=Moe}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){const n=t.style;return n?n[r]:void 0}removeValueFromRenderState(t,{vars:r,style:n}){delete r[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Qt(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}}class Xi{constructor(t){this.isMounted=!1,this.node=t}update(){}}function r9(e,{style:t,vars:r},n,i){const s=e.style;let a;for(a in t)s[a]=t[a];i==null||i.applyProjectionStyles(s,n);for(a in r)s.setProperty(a,r[a])}const yl={};function n9(e,{layout:t,layoutId:r}){return Pi.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!yl[e]||e==="opacity")}function fg(e,t,r){var a;const n=e.style,i=t==null?void 0:t.style,s={};if(!n)return s;for(const o in n)(Qt(n[o])||i&&Qt(i[o])||n9(o,e)||((a=r==null?void 0:r.getValue(o))==null?void 0:a.liveStyle)!==void 0)&&(s[o]=n[o]);return s}function yle(e){return window.getComputedStyle(e)}class vle extends t9{constructor(){super(...arguments),this.type="html",this.renderInstance=r9}mount(t){q0(!!t.style),super.mount(t)}readValueFromInstance(t,r){var n;if(Pi.has(r))return(n=this.projection)!=null&&n.isProjecting?gl(r):zae(t,r);{const i=yle(t),s=(ak(r)?i.getPropertyValue(r):i[r])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:r}){return Wk(t,r)}build(t,r,n){ug(t,r,n.transformTemplate)}scrapeMotionValuesFromProps(t,r,n){return fg(t,r,n)}}const i9=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),s9=e=>typeof e=="string"&&e.toLowerCase()==="svg";function xle(e,t,r,n){r9(e,t,void 0,n);for(const i in t.attrs)e.setAttribute(i9.has(i)?i:ag(i),t.attrs[i])}function a9(e,t,r){const n=fg(e,t,r);for(const i in e)if(Qt(e[i])||Qt(t[i])){const s=so.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;n[s]=e[i]}return n}class Ele extends t9{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ot}getBaseTargetFromProps(t,r){return Pi.has(r)?super.getBaseTargetFromProps(t,r)??gl(r):t[r]}getDefaultValue(t){return Pi.has(t)?this.latestValues[t]??gl(t):void 0}readValueFromInstance(t,r){if(Pi.has(r)){const n=_k(r);return n&&n.default||0}if(Uk.includes(r)){const i=getComputedStyle(t)[r];if(typeof i=="string"&&i)return i.trim()}return r=i9.has(r)?r:ag(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,n){return a9(t,r,n)}build(t,r,n){Hk(t,r,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,r,n,i){xle(t,r,n,i)}mount(t){this.isSVGTag=s9(t.tagName),super.mount(t)}}function o9(e,t){if(!Array.isArray(t))return!1;const r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}const _le=[...hg].reverse();function Tle(e){let t=o=>Promise.all(o.map(({animation:l,options:u})=>Ioe(e,l,u))),r=z3(),n=!0,i=!1;function s(o){var w;const{props:l,parent:u,manuallyAnimateOnMount:c}=e,d=n||i,h=[],f=new Set;let m={},b=1/0,y=e;do y=y.props.inherit!==!1&&y.parent;while(y&&!y.isControllingVariants);if(_le.forEach((x,_)=>{var Ue,He;const A=r[x],S=l[x],I=y&&y.props[x],N=S!==void 0?S:bl(I)||I===!1?I:void 0,U=bl(N),z=x===o?A.isActive:null;z===!1&&(b=_);const Z=U&&S===void 0&&!(d&&c);if(A.protectedKeys={...m},!A.isActive&&z===null||!N&&!A.prevProp||W0(N)||typeof N=="boolean")return;if(x==="exit"&&A.isActive&&z!==!0){m={...m,...A.prevResolvedValues};return}const V=wle(A.prevProp,N);let ae=V||U&&(z&&!Z||_>b),J=!1;const Y=Array.isArray(N)?N:[N];let de={};if(z!==!1)for(const L of Y){const{transition:Re,transitionEnd:Q,...M}=As(e,L,Mk(e,x))||{};de={...de,...M,...Q}}const{prevResolvedValues:xe}=A;for(const L in{...xe,...de}){if(L in m)continue;const Re=de[L],Q=xe[L],M=Array.isArray(Re)&&Array.isArray(Q)?!o9(Re,Q)||V:Re!==Q;if(M&&Re==null)f.add(L);else if(M||Re!==void 0&&f.has(L)){ae=!0,f.delete(L)&&(J=!0),A.needsAnimating[L]=!0;const pe=e.getValue(L);pe&&(pe.liveStyle=!1)}else A.protectedKeys[L]=!0}if(A.prevProp=N,A.prevResolvedValues=de,A.isActive&&(m={...m,...de}),ae&&(!(Z&&V)||J))for(const L of Y){const Re={type:x};if(typeof L=="string"&&d&&c&&(u!=null&&u.enteringChildren)){const Q=(He=(Ue=As(u,L))==null?void 0:Ue.transition)==null?void 0:He.delayChildren;Re.delay=Pk(u.enteringChildren,e,Q)}h.push({animation:L,options:Re})}}),f.size){const{initial:x}=l,_={},A=typeof x!="boolean"&&As(e,Array.isArray(x)?x[0]:x,(w=e.presenceContext)==null?void 0:w.custom);A&&A.transition&&(_.transition=A.transition),f.forEach(S=>{const I=e.getValue(S);I&&(I.liveStyle=!0);const N=A&&!Array.isArray(x)?A[S]:void 0,U=e.getBaseTargetFromProps(l,S);_[S]=(N!==void 0?N:U!==void 0&&!Qt(U)?U:e.initialValues[S]===void 0?e.baseTarget[S]:void 0)??null}),h.push({animation:_})}const E=d&&e.blockInitialAnimation||n&&!c&&(l.initial===!1||l.initial===l.animate);return n=i=!1,!E&&h.length?t(h):Promise.resolve()}function a(o,l){var c;if(r[o].isActive===l)return Promise.resolve();(c=e.variantChildren)==null||c.forEach(d=>{var h;return(h=d.animationState)==null?void 0:h.setActive(o,l)}),r[o].isActive=l;const u=s(o);for(const d in r)r[d].protectedKeys={};return u}return{animateChanges:s,setActive:a,setAnimateFunction:o=>{t=o(e)},getState:()=>r,reset:()=>{r=z3(),i=!0}}}function wle(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!o9(t,e):!1}function z3(){const e={};for(const t of hg)e[t]={isActive:t==="animate",protectedKeys:{},needsAnimating:{},prevResolvedValues:{}};return e}function zm(e,t){e.min=t.min,e.max=t.max}function sn(e,t){zm(e.x,t.x),zm(e.y,t.y)}function $3(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const l9=1e-4,kle=1-l9,Sle=1+l9,u9=.01,Ale=0-u9,Cle=0+u9;function mr(e){return e.max-e.min}function Ile(e,t,r){return Math.abs(e-t)<=r}function j3(e,t,r,n=.5){e.origin=n,e.originPoint=tt(t.min,t.max,e.origin),e.scale=mr(r)/mr(t),e.translate=tt(r.min,r.max,e.origin)-e.originPoint,(e.scale>=kle&&e.scale<=Sle||isNaN(e.scale))&&(e.scale=1),(e.translate>=Ale&&e.translate<=Cle||isNaN(e.translate))&&(e.translate=0)}function Wo(e,t,r,n){j3(e.x,t.x,r.x,n?n.originX:void 0),j3(e.y,t.y,r.y,n?n.originY:void 0)}function U3(e,t,r,n=0){const i=n?tt(r.min,r.max,n):r.min;e.min=i+t.min,e.max=e.min+mr(t)}function Nle(e,t,r,n){U3(e.x,t.x,r.x,n==null?void 0:n.x),U3(e.y,t.y,r.y,n==null?void 0:n.y)}function H3(e,t,r,n=0){const i=n?tt(r.min,r.max,n):r.min;e.min=t.min-i,e.max=e.min+mr(t)}function Zc(e,t,r,n){H3(e.x,t.x,r.x,n==null?void 0:n.x),H3(e.y,t.y,r.y,n==null?void 0:n.y)}function V3(e,t,r,n,i){return e-=t,e=Gc(e,1/r,n),i!==void 0&&(e=Gc(e,1/i,n)),e}function Rle(e,t=0,r=1,n=.5,i,s=e,a=e){if(Nn.test(t)&&(t=parseFloat(t),t=tt(a.min,a.max,t/100)-a.min),typeof t!="number")return;let o=tt(s.min,s.max,n);e===s&&(o-=t),e.min=V3(e.min,t,r,o,i),e.max=V3(e.max,t,r,o,i)}function q3(e,t,[r,n,i],s,a){Rle(e,t[r],t[n],t[i],t.scale,s,a)}const Ple=["x","scaleX","originX"],Ole=["y","scaleY","originY"];function G3(e,t,r,n){q3(e.x,t,Ple,r?r.x:void 0,n?n.x:void 0),q3(e.y,t,Ole,r?r.y:void 0,n?n.y:void 0)}function W3(e){return e.translate===0&&e.scale===1}function c9(e){return W3(e.x)&&W3(e.y)}function Z3(e,t){return e.min===t.min&&e.max===t.max}function Lle(e,t){return Z3(e.x,t.x)&&Z3(e.y,t.y)}function Y3(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function d9(e,t){return Y3(e.x,t.x)&&Y3(e.y,t.y)}function K3(e){return mr(e.x)/mr(e.y)}function X3(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Tn(e){return[e("x"),e("y")]}function Q3(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const wo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ve.test(e))e=parseFloat(e);else return e;const r=Q3(e,t.target.x),n=Q3(e,t.target.y);return`${r}% ${n}%`}},Dle={correct:(e,{treeScale:t,projectionDelta:r})=>{const n=e,i=Nr.parse(e);if(i.length>5)return n;const s=Nr.createTransformer(e),a=typeof i[0]!="number"?1:0,o=r.x.scale*t.x,l=r.y.scale*t.y;i[0+a]/=o,i[1+a]/=l;const u=tt(o,l,.5);return typeof i[2+a]=="number"&&(i[2+a]/=u),typeof i[3+a]=="number"&&(i[3+a]/=u),s(i)}};function Mle(e,t,r){let n="";const i=e.x.translate/t.x,s=e.y.translate/t.y,a=(r==null?void 0:r.z)||0;if((i||s||a)&&(n=`translate3d(${i}px, ${s}px, ${a}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){const{transformPerspective:u,rotate:c,pathRotation:d,rotateX:h,rotateY:f,skewX:m,skewY:b}=r;u&&(n=`perspective(${u}px) ${n}`),c&&(n+=`rotate(${c}deg) `),d&&(n+=`rotate(${d}deg) `),h&&(n+=`rotateX(${h}deg) `),f&&(n+=`rotateY(${f}deg) `),m&&(n+=`skewX(${m}deg) `),b&&(n+=`skewY(${b}deg) `)}const o=e.x.scale*t.x,l=e.y.scale*t.y;return(o!==1||l!==1)&&(n+=`scale(${o}, ${l})`),n||"none"}const Ble=og.length,J3=e=>typeof e=="number"||ve.test(e);function Fle(e,t,r,n,i,s){i?(e.opacity=tt(0,r.opacity??1,zle(n)),e.opacityExit=tt(t.opacity??1,0,$le(n))):s&&(e.opacity=tt(t.opacity??1,r.opacity??1,n));for(let a=0;a<Ble;a++){const o=og[a];let l=e6(t,o),u=e6(r,o);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||J3(l)===J3(u)?(e[o]=Math.max(tt(L3(l),L3(u),n),0),(Nn.test(u)||Nn.test(l))&&(e[o]+="%")):e[o]=u}(t.rotate||r.rotate)&&(e.rotate=tt(t.rotate||0,r.rotate||0,n))}function e6(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const zle=h9(0,.5,rk),$le=h9(.5,.95,hn);function h9(e,t,r){return n=>n<e?0:n>t?1:r(fl(e,t,n))}function jle(e,t,r){const n=Qt(e)?e:Fa(e);return n.start(sg("",n,t,r)),n.animation}function vl(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r,n)}const Ule=(e,t)=>e.depth-t.depth;class Hle{constructor(){this.children=[],this.isDirty=!1}add(t){U1(this.children,t),this.isDirty=!0}remove(t){$c(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Ule),this.isDirty=!1,this.children.forEach(t)}}function Vle(e,t){const r=Xt.now(),n=({timestamp:i})=>{const s=i-r;s>=t&&(Vi(n),e(s-t))};return it.setup(n,!0),()=>Vi(n)}function Yu(e){return Qt(e)?e.get():e}class qle{constructor(){this.members=[]}add(t){U1(this.members,t);for(let r=this.members.length-1;r>=0;r--){const n=this.members[r];if(n===t||n===this.lead||n===this.prevLead)continue;const i=n.instance;(!i||i.isConnected===!1)&&!n.snapshot&&($c(this.members,n),n.unmount())}t.scheduleRender()}remove(t){if($c(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){var r;for(let n=this.members.indexOf(t)-1;n>=0;n--){const i=this.members[n];if(i.isPresent!==!1&&((r=i.instance)==null?void 0:r.isConnected)!==!1)return this.promote(i),!0}return!1}promote(t,r){var i;const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.updateSnapshot(),t.scheduleRender();const{layoutDependency:s}=n.options,{layoutDependency:a}=t.options;(s===void 0||s!==a)&&(t.resumeFrom=n,r&&(n.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),(i=t.root)!=null&&i.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var r,n,i,s,a;(n=(r=t.options).onExitComplete)==null||n.call(r),(a=(i=t.resumingFrom)==null?void 0:(s=i.options).onExitComplete)==null||a.call(s)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const Gle={borderRadius:{...wo,applyTo:[...og]},borderTopLeftRadius:wo,borderTopRightRadius:wo,borderBottomLeftRadius:wo,borderBottomRightRadius:wo,boxShadow:Dle},Ku={hasAnimatedSinceResize:!0,hasEverUpdated:!1};Object.assign(yl,{...Gle,...yl});const Sh=["","X","Y","Z"],Wle=1e3;let Zle=0;function Ah(e,t,r,n){const{latestValues:i}=t;i[e]&&(r[e]=i[e],t.setStaticValue(e,0),n&&(n[e]=0))}function f9(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const r=zk(t);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",it,!(i||s))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&f9(n)}function m9({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(a={},o=t==null?void 0:t()){this.id=Zle++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Xle),this.nodes.forEach(iue),this.nodes.forEach(sue),this.nodes.forEach(Qle)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Hle)}addEventListener(a,o){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new jc),this.eventHandlers.get(a).add(o)}notifyListeners(a,...o){const l=this.eventHandlers.get(a);l&&l.notify(...o)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=lg(a)&&!dle(a),this.instance=a;const{layoutId:o,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||o)&&(this.isLayoutDirty=!0),e){let c,d=0;const h=()=>this.root.updateBlockedByResize=!1;it.read(()=>{d=window.innerWidth}),e(a,()=>{const f=window.innerWidth;f!==d&&(d=f,this.root.updateBlockedByResize=!0,c&&c(),c=Vle(h,250),Ku.hasAnimatedSinceResize&&(Ku.hasAnimatedSinceResize=!1,this.nodes.forEach(n6)))})}o&&this.root.registerSharedNode(o,this),this.options.animate!==!1&&u&&(o||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||cue,{onLayoutAnimationStart:b,onLayoutAnimationComplete:y}=u.getProps(),E=!this.targetLayout||!d9(this.targetLayout,f),w=!d&&h;if(this.options.layoutRoot||this.resumeFrom||w||d&&(E||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...ig(m,"layout"),onPlay:b,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(c,w,x.path)}else d||n6(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Vi(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(aue),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&f9(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const d=this.path[c];d.shouldResetTransform=!0,(typeof d.latestValues.x=="string"||typeof d.latestValues.y=="string")&&(d.isLayoutDirty=!0),d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:o,layout:l}=this.options;if(o===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const l=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),l&&this.nodes.forEach(eue),this.nodes.forEach(t6);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(r6);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(tue),this.nodes.forEach(rue),this.nodes.forEach(nue),this.nodes.forEach(Yle),this.nodes.forEach(Kle)):this.nodes.forEach(r6),this.clearAllSnapshots();const o=Xt.now();Dt.delta=di(0,1e3/60,o-Dt.timestamp),Dt.timestamp=o,Dt.isProcessing=!0,xh.update.process(Dt),xh.preRender.process(Dt),xh.render.process(Dt),Dt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,cg.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Jle),this.sharedNodes.forEach(oue)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,it.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){it.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!mr(this.snapshot.measuredBox.x)&&!mr(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected||(this.layoutCorrected=Ot()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:o}=this.options;o&&o.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let o=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(o=!1),o&&this.instance){const l=n(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:l,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,o=this.projectionDelta&&!c9(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;a&&this.instance&&(o||us(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const o=this.measurePageBox();let l=this.removeElementScroll(o);return a&&(l=this.removeTransform(l)),due(l),{animationId:this.root.animationId,measuredBox:o,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:a}=this.options;if(!a)return Ot();const o=a.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(hue))){const{scroll:c}=this.root;c&&(Sn(o.x,c.offset.x),Sn(o.y,c.offset.y))}return o}removeElementScroll(a){var l;const o=Ot();if(sn(o,a),(l=this.scroll)!=null&&l.wasRoot)return o;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:d,options:h}=c;c!==this.root&&d&&h.layoutScroll&&(d.wasRoot&&sn(o,a),Sn(o.x,d.offset.x),Sn(o.y,d.offset.y))}return o}applyTransform(a,o=!1,l){var c,d;const u=l||Ot();sn(u,a);for(let h=0;h<this.path.length;h++){const f=this.path[h];!o&&f.options.layoutScroll&&f.scroll&&f!==f.root&&(Sn(u.x,-f.scroll.offset.x),Sn(u.y,-f.scroll.offset.y)),us(f.latestValues)&&qu(u,f.latestValues,(c=f.layout)==null?void 0:c.layoutBox)}return us(this.latestValues)&&qu(u,this.latestValues,(d=this.layout)==null?void 0:d.layoutBox),u}removeTransform(a){var l;const o=Ot();sn(o,a);for(let u=0;u<this.path.length;u++){const c=this.path[u];if(!us(c.latestValues))continue;let d;c.instance&&(Mm(c.latestValues)&&c.updateSnapshot(),d=Ot(),sn(d,c.measurePageBox())),G3(o,c.latestValues,(l=c.snapshot)==null?void 0:l.layoutBox,d)}return us(this.latestValues)&&G3(o,this.latestValues),o}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Dt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var f;const o=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=o.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=o.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=o.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==o;if(!(a||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:d}=this.options;if(!this.layout||!(c||d))return;this.resolvedRelativeTargetAt=Dt.timestamp;const h=this.getClosestProjectingParent();!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&h&&h.layout?this.createRelativeTarget(h,this.layout.layoutBox,h.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ot(),this.targetWithTransforms=Ot()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Nle(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):sn(this.target,this.layout.layoutBox),Gk(this.target,this.targetDelta)):sn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?this.createRelativeTarget(h,this.target,h.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Mm(this.parent.latestValues)||qk(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,o,l){this.relativeParent=a,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ot(),this.relativeTargetOrigin=Ot(),Zc(this.relativeTargetOrigin,o,l,this.options.layoutAnchor||void 0),sn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var m;const a=this.getLead(),o=!!this.resumingFrom||this!==a;let l=!0;if((this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty)&&(l=!1),o&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Dt.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;sn(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;Goe(this.layoutCorrected,this.treeScale,this.path,o),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Ot());const{target:f}=a;if(!f){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():($3(this.prevProjectionDelta.x,this.projectionDelta.x),$3(this.prevProjectionDelta.y,this.projectionDelta.y)),Wo(this.projectionDelta,this.layoutCorrected,f,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==h||!X3(this.projectionDelta.x,this.prevProjectionDelta.x)||!X3(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",f))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var o;if((o=this.options.visualElement)==null||o.scheduleRender(),a){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ga(),this.projectionDelta=ga(),this.projectionDeltaWithTransform=ga()}setAnimationOrigin(a,o=!1,l){const u=this.snapshot,c=u?u.latestValues:{},d={...this.latestValues},h=ga();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!o;const f=Ot(),m=u?u.source:void 0,b=this.layout?this.layout.source:void 0,y=m!==b,E=this.getStack(),w=!E||E.members.length<=1,x=!!(y&&!w&&this.options.crossfade===!0&&!this.path.some(uue));this.animationProgress=0;let _;const A=l==null?void 0:l.interpolateProjection(a);this.mixTargetDelta=S=>{const I=S/1e3,N=A==null?void 0:A(I);N?(h.x.translate=N.x,h.x.scale=tt(a.x.scale,1,I),h.x.origin=a.x.origin,h.x.originPoint=a.x.originPoint,h.y.translate=N.y,h.y.scale=tt(a.y.scale,1,I),h.y.origin=a.y.origin,h.y.originPoint=a.y.originPoint):(i6(h.x,a.x,I),i6(h.y,a.y,I)),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Zc(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),lue(this.relativeTarget,this.relativeTargetOrigin,f,I),_&&Lle(this.relativeTarget,_)&&(this.isProjectionDirty=!1),_||(_=Ot()),sn(_,this.relativeTarget)),y&&(this.animationValues=d,Fle(d,c,this.latestValues,I,x,w)),N&&N.rotate!==void 0&&(this.animationValues||(this.animationValues=d),this.animationValues.pathRotation=N.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=I},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){var o,l,u;this.notifyListeners("animationStart"),(o=this.currentAnimation)==null||o.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(Vi(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=it.update(()=>{Ku.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Fa(0)),this.motionValue.jump(0,!1),this.currentAnimation=jle(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),a.onUpdate&&a.onUpdate(c)},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),Cae(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Wle),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead(),{targetWithTransforms:o,layout:l,latestValues:u}=a;let{target:c}=a;if(!(!o||!c||!l)){if(this!==a&&this.layout&&l&&p9(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||Ot();const d=mr(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+d;const h=mr(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+h}sn(o,c),qu(o,u),Wo(this.projectionDeltaWithTransform,this.layoutCorrected,o,u)}}registerSharedNode(a,o){this.sharedNodes.has(a)||this.sharedNodes.set(a,new qle),this.sharedNodes.get(a).add(o);const u=o.options.initialPromotionConfig;o.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(o):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())==null?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())==null?void 0:o.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:o,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let o=!1;const{latestValues:l}=a;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(o=!0),!o)return;const u={};l.z&&Ah("z",a,u,this.animationValues);for(let c=0;c<Sh.length;c++)Ah(`rotate${Sh[c]}`,a,u,this.animationValues),Ah(`skew${Sh[c]}`,a,u,this.animationValues);a.render();for(const c in u)a.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);a.scheduleRender()}applyProjectionStyles(a,o){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=Yu(o==null?void 0:o.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=Yu(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!us(this.latestValues)&&(a.transform=l?l({},""):"none",this.hasProjected=!1);return}a.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=Mle(this.projectionDeltaWithTransform,this.treeScale,c);l&&(d=l(c,d)),a.transform=d;const{x:h,y:f}=this.projectionDelta;a.transformOrigin=`${h.origin*100}% ${f.origin*100}% 0`,u.animationValues?a.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:a.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const m in yl){if(c[m]===void 0)continue;const{correct:b,applyTo:y,isCSSVariable:E}=yl[m],w=d==="none"?c[m]:b(c[m],u);if(y){const x=y.length;for(let _=0;_<x;_++)a[y[_]]=w}else E?this.options.visualElement.renderState.vars[m]=w:a[m]=w}this.options.layoutId&&(a.pointerEvents=u===this?Yu(o==null?void 0:o.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var o;return(o=a.currentAnimation)==null?void 0:o.stop()}),this.root.nodes.forEach(t6),this.root.sharedNodes.clear()}}}function Yle(e){e.updateLayout()}function Kle(e){var r;const t=((r=e.resumeFrom)==null?void 0:r.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=e.layout,{animationType:s}=e.options,a=t.source!==e.layout.source;if(s==="size")Tn(d=>{const h=a?t.measuredBox[d]:t.layoutBox[d],f=mr(h);h.min=n[d].min,h.max=h.min+f});else if(s==="x"||s==="y"){const d=s==="x"?"y":"x";zm(a?t.measuredBox[d]:t.layoutBox[d],n[d])}else p9(s,t.layoutBox,n)&&Tn(d=>{const h=a?t.measuredBox[d]:t.layoutBox[d],f=mr(n[d]);h.max=h.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+f)});const o=ga();Wo(o,n,t.layoutBox);const l=ga();a?Wo(l,e.applyTransform(i,!0),t.measuredBox):Wo(l,n,t.layoutBox);const u=!c9(o);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:h,layout:f}=d;if(h&&f){const m=e.options.layoutAnchor||void 0,b=Ot();Zc(b,t.layoutBox,h.layoutBox,m);const y=Ot();Zc(y,n,f.layoutBox,m),d9(b,y)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=b,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:l,layoutDelta:o,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function Xle(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Qle(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Jle(e){e.clearSnapshot()}function t6(e){e.clearMeasurements()}function eue(e){e.isLayoutDirty=!0,e.updateLayout()}function r6(e){e.isLayoutDirty=!1}function tue(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function rue(e){var t;e.relativeTarget&&((t=e.relativeParent)!=null&&t.isLayoutDirty)&&(e.currentAnimation?e.isLayoutDirty=!0:(e.targetDelta=void 0,e.removeRelativeTarget()))}function nue(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function n6(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function iue(e){e.resolveTargetDelta()}function sue(e){e.calcProjection()}function aue(e){e.resetSkewAndRotation()}function oue(e){e.removeLeadSnapshot()}function i6(e,t,r){e.translate=tt(t.translate,0,r),e.scale=tt(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function s6(e,t,r,n){e.min=tt(t.min,r.min,n),e.max=tt(t.max,r.max,n)}function lue(e,t,r,n){s6(e.x,t.x,r.x,n),s6(e.y,t.y,r.y,n)}function uue(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const cue={duration:.45,ease:[.4,0,.1,1]},a6=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),o6=a6("applewebkit/")&&!a6("chrome/")?Math.round:hn;function l6(e){e.min=o6(e.min),e.max=o6(e.max)}function due(e){l6(e.x),l6(e.y)}function p9(e,t,r){return e==="position"||e==="preserve-aspect"&&!Ile(K3(t),K3(r),.2)}function hue(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const fue=m9({attachResizeListener:(e,t)=>vl(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Ch={current:void 0},g9=m9({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ch.current){const e=new fue({});e.mount(window),e.setOptions({layoutScroll:!0}),Ch.current=e}return Ch.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),b9=k.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function mue(e=!0){const t=k.useContext(j1);if(t===null)return[!0,null];const{isPresent:r,onExitComplete:n,register:i}=t,s=k.useId();k.useEffect(()=>{if(e)return i(s)},[e]);const a=k.useCallback(()=>e&&n&&n(s),[s,n,e]);return!r&&n?[!1,a]:[!0]}const y9=k.createContext({strict:!1}),u6={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let c6=!1;function pue(){if(c6)return;const e={};for(const t in u6)e[t]={isEnabled:r=>u6[t].some(n=>!!r[n])};e9(e),c6=!0}function v9(){return pue(),gle()}function gue(e){const t=v9();for(const r in e)t[r]={...t[r],...e[r]};e9(t)}const Y0=k.createContext({});function bue(e,t){if(Z0(e)){const{initial:r,animate:n}=e;return{initial:r===!1||bl(r)?r:void 0,animate:bl(n)?n:void 0}}return e.inherit!==!1?t:{}}function yue(e){const{initial:t,animate:r}=bue(e,k.useContext(Y0));return k.useMemo(()=>({initial:t,animate:r}),[d6(t),d6(r)])}function d6(e){return Array.isArray(e)?e.join(" "):e}const mg=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function x9(e,t,r){for(const n in t)!Qt(t[n])&&!n9(n,r)&&(e[n]=t[n])}function vue({transformTemplate:e},t){return k.useMemo(()=>{const r=mg();return ug(r,t,e),Object.assign({},r.vars,r.style)},[t])}function xue(e,t){const r=e.style||{},n={};return x9(n,r,e),Object.assign(n,vue(e,t)),n}function Eue(e,t){const r={},n=xue(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=n,r}const E9=()=>({...mg(),attrs:{}});function _ue(e,t,r,n){const i=k.useMemo(()=>{const s=E9();return Hk(s,t,s9(n),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};x9(s,e.style,e),i.style={...s,...i.style}}return i}const Tue=new Set(["animate","exit","variants","initial","style","values","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Yc(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Tue.has(e)}function wue(e,t){return e.startsWith("on")?!Yc(e):(t==null?void 0:t(e))??!Yc(e)}function kue(e,t,r,n){const i={};for(const s in e)s==="values"&&typeof e.values=="object"||Qt(e[s])||(wue(s,n)||r===!0&&Yc(s)||!t&&!Yc(s)||e.draggable&&s.startsWith("onDrag"))&&(i[s]=e[s]);return i}const Sue=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function pg(e){return typeof e!="string"||e.includes("-")?!1:!!(Sue.indexOf(e)>-1||/[A-Z]/u.test(e))}function Aue(e,t,r,{latestValues:n},i,s=!1,a,o){const u=(a??pg(e)?_ue:Eue)(t,n,i,e),c=kue(t,typeof e=="string",s,o),d=e!==k.Fragment?{...c,...u,ref:r}:{},{children:h}=t,f=k.useMemo(()=>Qt(h)?h.get():h,[h]);return k.createElement(e,{...d,children:f})}function Cue({scrapeMotionValuesFromProps:e,createRenderState:t},r,n,i){return{latestValues:Iue(r,n,i,e),renderState:t()}}function Iue(e,t,r,n){const i={},s=n(e,{});for(const h in s)i[h]=Yu(s[h]);let{initial:a,animate:o}=e;const l=Z0(e),u=Qk(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),o===void 0&&(o=t.animate));let c=r?r.initial===!1:!1;c=c||a===!1;const d=c?o:a;if(d&&typeof d!="boolean"&&!W0(d)){const h=Array.isArray(d)?d:[d];for(let f=0;f<h.length;f++){const m=Dk(e,h[f]);if(m){const{transitionEnd:b,transition:y,...E}=m;for(const w in E){let x=E[w];if(Array.isArray(x)){const _=c?x.length-1:0;x=x[_]}x!==null&&(i[w]=x)}for(const w in b)i[w]=b[w]}}}return i}const _9=e=>(t,r)=>{const n=k.useContext(Y0),i=k.useContext(j1),s=()=>Cue(e,t,n,i);return r?s():kse(s)},Nue=_9({scrapeMotionValuesFromProps:fg,createRenderState:mg}),Rue=_9({scrapeMotionValuesFromProps:a9,createRenderState:E9}),Pue=Symbol.for("motionComponentSymbol");function Oue(e,t,r){const n=k.useRef(r);k.useInsertionEffect(()=>{n.current=r});const i=k.useRef(null);return k.useCallback(s=>{var o;s&&((o=e.onMount)==null||o.call(e,s)),t&&(s?t.mount(s):t.unmount());const a=n.current;if(typeof a=="function")if(s){const l=a(s);typeof l=="function"&&(i.current=l)}else i.current?(i.current(),i.current=null):a(s);else a&&(a.current=s)},[t])}const T9=k.createContext({});function ca(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Lue(e,t,r,n,i,s){var x,_;const{visualElement:a}=k.useContext(Y0),o=k.useContext(y9),l=k.useContext(j1),u=k.useContext(b9),c=u.reducedMotion,d=u.skipAnimations,h=k.useRef(null),f=k.useRef(!1);n=n||o.renderer,!h.current&&n&&(h.current=n(e,{visualState:t,parent:a,props:r,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,skipAnimations:d,isSVG:s}),f.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const m=h.current,b=k.useContext(T9);m&&!m.projection&&i&&(m.type==="html"||m.type==="svg")&&Due(h.current,r,i,b);const y=k.useRef(!1);k.useInsertionEffect(()=>{m&&y.current&&m.update(r,l)});const E=r[Fk],w=k.useRef(!!E&&typeof window<"u"&&!((x=window.MotionHandoffIsComplete)!=null&&x.call(window,E))&&((_=window.MotionHasOptimisedAnimation)==null?void 0:_.call(window,E)));return s3(()=>{var A;!f.current||!m||((A=m.animationState)==null||A.animateChanges(),m.enteringChildren=void 0)},[]),s3(()=>{f.current=!0,m&&(y.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),w.current&&m.animationState&&m.animationState.animateChanges())}),k.useEffect(()=>{m&&(!w.current&&m.animationState&&m.animationState.animateChanges(),w.current&&(queueMicrotask(()=>{var A;(A=window.MotionHandoffMarkAsComplete)==null||A.call(window,E)}),w.current=!1),m.enteringChildren=void 0)}),m}function Due(e,t,r,n){const{layoutId:i,layout:s,drag:a,dragConstraints:o,layoutScroll:l,layoutRoot:u,layoutAnchor:c,layoutCrossfade:d}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:w9(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!a||o&&ca(o),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:n,crossfade:d,layoutScroll:l,layoutRoot:u,layoutAnchor:c})}function w9(e){if(e)return e.options.allowProjection!==!1?e.projection:w9(e.parent)}function Ih(e,{forwardMotionProps:t=!1,type:r}={},n,i){n&&gue(n);const s=r?r==="svg":pg(e),a=s?Rue:Nue;function o(u,c){let d;const h={...k.useContext(b9),...u,layoutId:Mue(u)},{isStatic:f,isValidProp:m}=h,b=yue(u),y=a(u,f);if(!f&&typeof window<"u"){Bue();const E=Fue(h);d=E.MeasureLayout,b.visualElement=Lue(e,y,h,i,E.ProjectionNode,s)}return v.jsxs(Y0.Provider,{value:b,children:[d&&b.visualElement?v.jsx(d,{visualElement:b.visualElement,...h}):null,Aue(e,u,Oue(y,b.visualElement,c),y,f,t,s,m)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=k.forwardRef(o);return l[Pue]=e,l}function Mue({layoutId:e}){const t=k.useContext(Gw).id;return t&&e!==void 0?t+"-"+e:e}function Bue(e,t){k.useContext(y9).strict}function Fue(e){const t=v9(),{drag:r,layout:n}=t;if(!r&&!n)return{};const i={...r,...n};return{MeasureLayout:r!=null&&r.isEnabled(e)||n!=null&&n.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function zue(e,t){if(typeof Proxy>"u")return Ih;const r=new Map,n=(s,a)=>Ih(s,a,e,t),i=(s,a)=>n(s,a);return new Proxy(i,{get:(s,a)=>a==="create"?n:(r.has(a)||r.set(a,Ih(a,void 0,e,t)),r.get(a))})}const $ue=(e,t)=>t.isSVG??pg(e)?new Ele(t):new vle(t,{allowProjection:e!==k.Fragment});class jue extends Xi{constructor(t){super(t),t.animationState||(t.animationState=Tle(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();W0(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let Uue=0;class Hue extends Xi{constructor(){super(...arguments),this.id=Uue++}update(){var l;const{presenceContext:t,prevPresenceContext:r,animationState:n}=this.node;if(!t||!n)return;const{isPresent:i,onExitComplete:s}=t,a=r==null?void 0:r.isPresent;if(i===a)return;if(i&&a===!1){if(this.exit===!0){const{initial:u}=this.node.getProps();if(u&&!Array.isArray(u)){const{transition:c,transitionEnd:d,...h}=As(this.node,u)||{};for(const f in h)(l=this.node.getValue(f))==null||l.jump(h[f])}this.node.blockInitialAnimation=!1,n.reset(),n.animateChanges()}else n.setActive("exit",!1);this.exit=void 0;return}const o=this.exit=n.setActive("exit",!i);s&&!i&&o.then(()=>{this.exit===o&&(this.exit=!0,s(this.id))})}mount(){const{register:t,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Vue={animation:{Feature:jue},exit:{Feature:Hue}};function K0(e){return{point:{x:e.pageX,y:e.pageY}}}const que=e=>t=>dg(t)&&e(t,K0(t));function Zo(e,t,r,n){return vl(e,t,que(r),n)}const k9=({current:e})=>e?e.ownerDocument.defaultView:null,h6=(e,t)=>Math.abs(e-t);function Gue(e,t){const r=h6(e.x,t.x),n=h6(e.y,t.y);return Math.sqrt(r**2+n**2)}const f6=new Set(["auto","scroll"]);class S9{constructor(t,r,{transformPagePoint:n,contextWindow:i=window,dragSnapToOrigin:s=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=m=>{this.handleScroll(m.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Iu(this.lastRawMoveEventInfo,this.transformPagePoint));const m=Nh(this.lastMoveEventInfo,this.history),b=this.startEvent!==null,y=Gue(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!b&&!y)return;const{point:E}=m;this.history.push({...E,timestamp:Xt.now()});const{onStart:w,onMove:x}=this.handlers;b||(w&&w(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,m)},this.handlePointerMove=(m,b)=>{this.lastMoveEvent=m,this.lastRawMoveEventInfo=b,this.lastMoveEventInfo=Iu(b,this.transformPagePoint),this.hasPendingMove=!0,it.update(this.updatePoint,!0)},this.handlePointerUp=(m,b)=>{this.hasPendingMove&&this.updatePoint(),this.end();const{onEnd:y,onSessionEnd:E,resumeAnimation:w}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&w&&w(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Nh(m.type==="pointercancel"?this.lastMoveEventInfo:Iu(b,this.transformPagePoint),this.history);this.startEvent&&y&&y(m,x),E&&E(m,x)},!dg(t))return;this.dragSnapToOrigin=s,this.handlers=r,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=i||window;const l=K0(t),u=Iu(l,this.transformPagePoint),{point:c}=u,{timestamp:d}=Dt;this.history=[{...c,timestamp:d}];const{onSessionStart:h}=r;h&&h(t,Nh(u,this.history));const f={passive:!0,capture:!0};this.removeListeners=ql(Zo(this.contextWindow,"pointermove",this.handlePointerMove,f),Zo(this.contextWindow,"pointerup",this.handlePointerUp,f),Zo(this.contextWindow,"pointercancel",this.handlePointerUp,f)),o&&this.startScrollTracking(o)}startScrollTracking(t){let r=t.parentElement;for(;r;){const n=getComputedStyle(r);(f6.has(n.overflowX)||f6.has(n.overflowY))&&this.scrollPositions.set(r,{x:r.scrollLeft,y:r.scrollTop}),r=r.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const r=this.scrollPositions.get(t);if(!r)return;const n=t===window,i=n?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:i.x-r.x,y:i.y-r.y};s.x===0&&s.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,i),it.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Vi(this.updatePoint)}}function Iu(e,t){return t?{point:t(e.point)}:e}function m6(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Nh({point:e},t){return{point:e,delta:m6(e,A9(t)),offset:m6(e,Wue(t)),velocity:Zue(t,.1)}}function Wue(e){return e[0]}function A9(e){return e[e.length-1]}function Zue(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null;const i=A9(e);for(;r>=0&&(n=e[r],!(i.timestamp-n.timestamp>Wr(t)));)r--;if(!n)return{x:0,y:0};n===e[0]&&e.length>2&&i.timestamp-n.timestamp>Wr(t)*2&&(n=e[1]);const s=Gr(i.timestamp-n.timestamp);if(s===0)return{x:0,y:0};const a={x:(i.x-n.x)/s,y:(i.y-n.y)/s};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Yue(e,{min:t,max:r},n){return t!==void 0&&e<t?e=n?tt(t,e,n.min):Math.max(e,t):r!==void 0&&e>r&&(e=n?tt(r,e,n.max):Math.min(e,r)),e}function p6(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function Kue(e,{top:t,left:r,bottom:n,right:i}){return{x:p6(e.x,r,i),y:p6(e.y,t,n)}}function g6(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function Xue(e,t){return{x:g6(e.x,t.x),y:g6(e.y,t.y)}}function Que(e,t){let r=.5;const n=mr(e),i=mr(t);return i>n?r=fl(t.min,t.max-n,e.min):n>i&&(r=fl(e.min,e.max-i,t.min)),di(0,1,r)}function Jue(e,t){const r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}const $m=.35;function ece(e=$m){return e===!1?e=0:e===!0&&(e=$m),{x:b6(e,"left","right"),y:b6(e,"top","bottom")}}function b6(e,t,r){return{min:y6(e,t),max:y6(e,r)}}function y6(e,t){return typeof e=="number"?e:e[t]||0}const tce=new WeakMap;class rce{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ot(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:r=!1,distanceThreshold:n}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const s=d=>{r&&this.snapToCursor(d),this.stopAnimation()},a=(d,h)=>{const{drag:f,dragPropagation:m,onDragStart:b}=this.getProps();if(f&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Zoe(f),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Tn(E=>{let w=this.getAxisMotionValue(E).get()||0;if(Nn.test(w)){const{projection:x}=this.visualElement;if(x&&x.layout){const _=x.layout.layoutBox[E];_&&(w=mr(_)*(parseFloat(w)/100))}}this.originPoint[E]=w}),b&&it.update(()=>b(d,h),!1,!0),Om(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},o=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h;const{dragPropagation:f,dragDirectionLock:m,onDirectionLock:b,onDrag:y}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:E}=h;if(m&&this.currentDirection===null){this.currentDirection=ice(E),this.currentDirection!==null&&b&&b(this.currentDirection);return}this.updateAxis("x",h.point,E),this.updateAxis("y",h.point,E),this.visualElement.render(),y&&it.update(()=>y(d,h),!1,!0)},l=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h,this.stop(d,h),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new S9(t,{onSessionStart:s,onStart:a,onMove:o,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:n,contextWindow:k9(this.visualElement),element:this.visualElement.current})}stop(t,r){const n=t||this.latestPointerEvent,i=r||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!n)return;const{velocity:a}=i;this.startAnimation(a);const{onDragEnd:o}=this.getProps();o&&it.postRender(()=>o(n,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,r,n){const{drag:i}=this.getProps();if(!n||!Nu(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let a=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(a=Yue(a,this.constraints[t],this.elastic[t])),s.set(a)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:r}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,i=this.constraints;t&&ca(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=Kue(n.layoutBox,t):this.constraints=!1,this.elastic=ece(r),i!==this.constraints&&!ca(t)&&n&&this.constraints&&!this.hasMutatedConstraints&&Tn(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=Jue(n.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!ca(t))return!1;const n=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());const s=Woe(n,i.root,this.visualElement.getTransformPagePoint());let a=Xue(i.layout.layoutBox,s);if(r){const o=r(Voe(a));this.hasMutatedConstraints=!!o,o&&(a=Vk(o))}return a}startAnimation(t){const{drag:r,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),l=this.constraints||{},u=Tn(c=>{if(!Nu(c,r,this.currentDirection))return;let d=l&&l[c]||{};(a===!0||a===c)&&(d={min:0,max:0});const h=i?200:1e6,f=i?40:1e7,m={type:"inertia",velocity:n?t[c]:0,bounceStiffness:h,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(o)}startAxisValueAnimation(t,r){const n=this.getAxisMotionValue(t);return Om(this.visualElement,t),n.start(sg(t,n,0,r,this.visualElement,!1))}stopAnimation(){Tn(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const r=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps()[r];return i||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor({clientX:t,clientY:r}){var o;const{drag:n}=this.getProps(),i={x:t,y:r},s=((o=this.visualElement.getTransformPagePoint())==null?void 0:o(i))||i,a=this.visualElement.measureViewportBox();Tn(l=>{if(!Nu(l,n,this.currentDirection))return;const u=this.getAxisMotionValue(l),{min:c,max:d}=a[l];u.set((u.get()||0)+s[l]-tt(c,d,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!ca(r)||!n||!this.constraints)return;this.stopAnimation();const i=this.constraints,s={x:0,y:0};Tn(o=>{const l=this.getAxisMotionValue(o).get();s[o]=Que({min:l,max:l},i[o])});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Tn(o=>{const l=this.getAxisMotionValue(o);if(!Nu(o,t,null)||!l.get())return;const{min:u,max:c}=this.constraints[o];l.set(tt(u,c,s[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;tce.set(this.visualElement,this);const t=this.visualElement.current,r=Zo(t,"pointerdown",u=>{const{drag:c,dragListener:d=!0}=this.getProps(),h=u.target,f=h!==t&&ele(h);c&&d&&!f&&this.start(u)});let n;const i=()=>{const{dragConstraints:u}=this.getProps();ca(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),n||(n=nce(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,a=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),it.read(i);const o=vl(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:c})=>{this.isDragging&&c&&(Tn(d=>{const h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=u[d].translate,h.set(h.get()+u[d].translate))}),this.visualElement.render())}));return()=>{o(),r(),a(),l&&l(),n&&n()}}getProps(){const t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:a=$m,dragMomentum:o=!0}=t;return{...t,drag:r,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:a,dragMomentum:o}}}function v6(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function nce(e,t,r){const n=O3(e,v6(r)),i=O3(t,v6(r));return()=>{n(),i()}}function Nu(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function ice(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}class sce extends Xi{constructor(t){super(t),this.removeGroupControls=hn,this.removeListeners=hn,this.controls=new rce(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||hn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:r}=this.node.prevProps||{};t!==r&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Rh=e=>(t,r)=>{e&&it.update(()=>e(t,r),!1,!0)};class ace extends Xi{constructor(){super(...arguments),this.removePointerDownListener=hn}onPointerDown(t){this.session=new S9(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:k9(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:r,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:Rh(t),onStart:Rh(r),onMove:Rh(n),onEnd:(s,a)=>{delete this.session,i&&it.postRender(()=>i(s,a))}}}mount(){this.removePointerDownListener=Zo(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Ph=!1;class oce extends k.Component{componentDidMount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=t;s&&(r.group&&r.group.add(s),n&&n.register&&i&&n.register(s),Ph&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Ku.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:r,visualElement:n,drag:i,isPresent:s}=this.props,{projection:a}=n;return a&&(a.isPresent=s,t.layoutDependency!==r&&a.setOptions({...a.options,layoutDependency:r}),Ph=!0,i||t.layoutDependency!==r||r===void 0||t.isPresent!==s?a.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?a.promote():a.relegate()||it.postRender(()=>{const o=a.getStack();(!o||!o.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:r}=this.props,{projection:n}=t;n&&(n.options.layoutAnchor=r,n.root.didUpdate(),cg.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:i}=t;Ph=!0,i&&(i.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function C9(e){const[t,r]=mue(),n=k.useContext(Gw);return v.jsx(oce,{...e,layoutGroup:n,switchLayoutGroup:k.useContext(T9),isPresent:t,safeToRemove:r})}const lce={pan:{Feature:ace},drag:{Feature:sce,ProjectionNode:g9,MeasureLayout:C9}};function x6(e,t,r){const{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",r==="Start");const i="onHover"+r,s=n[i];s&&it.postRender(()=>s(t,K0(t)))}class uce extends Xi{mount(){const{current:t}=this.node;t&&(this.unmount=Koe(t,(r,n)=>(x6(this.node,n,"Start"),i=>x6(this.node,i,"End"))))}unmount(){}}class cce extends Xi{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ql(vl(this.node.current,"focus",()=>this.onFocus()),vl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function E6(e,t,r){const{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",r==="Start");const i="onTap"+(r==="End"?"":r),s=n[i];s&&it.postRender(()=>s(t,K0(t)))}class dce extends Xi{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:r,propagate:n}=this.node.props;this.unmount=rle(t,(i,s)=>(E6(this.node,s,"Start"),(a,{success:o})=>E6(this.node,a,o?"End":"Cancel")),{useGlobalTarget:r,stopPropagation:(n==null?void 0:n.tap)===!1})}unmount(){}}const jm=new WeakMap,Oh=new WeakMap,hce=e=>{const t=jm.get(e.target);t&&t(e)},fce=e=>{e.forEach(hce)};function mce({root:e,...t}){const r=e||document;Oh.has(r)||Oh.set(r,{});const n=Oh.get(r),i=JSON.stringify(t);return n[i]||(n[i]=new IntersectionObserver(fce,{root:e,...t})),n[i]}function pce(e,t,r){const n=mce(t);return jm.set(e,r),n.observe(e),()=>{jm.delete(e),n.unobserve(e)}}const gce={some:0,all:1};class bce extends Xi{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var l;(l=this.stopObserver)==null||l.call(this);const{viewport:t={}}=this.node.getProps(),{root:r,margin:n,amount:i="some",once:s}=t,a={root:r?r.current:void 0,rootMargin:n,threshold:typeof i=="number"?i:gce[i]},o=u=>{const{isIntersecting:c}=u;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:d,onViewportLeave:h}=this.node.getProps(),f=c?d:h;f&&f(u)};this.stopObserver=pce(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:r}=this.node;["amount","margin","root"].some(yce(t,r))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function yce({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const vce={inView:{Feature:bce},tap:{Feature:dce},focus:{Feature:cce},hover:{Feature:uce}},xce={layout:{ProjectionNode:g9,MeasureLayout:C9}},Ece={...Vue,...vce,...lce,...xce},_ce=zue(Ece,$ue),Tce=_ce,_6=new Map,wce=e=>{let t=_6.get(e);return t||(t=Tce.create(e),_6.set(e,t)),t},kce=({children:e,as:t="p",className:r,duration:n=2,spread:i=2})=>{const s=wce(t),a=k.useMemo(()=>((e==null?void 0:e.length)??0)*i,[e,i]);return v.jsx(s,{animate:{backgroundPosition:"0% center"},className:Ie("relative inline-block bg-[length:250%_100%,auto] bg-clip-text text-transparent","[--bg:linear-gradient(90deg,#0000_calc(50%-var(--spread)),var(--color-background),#0000_calc(50%+var(--spread)))] [background-repeat:no-repeat,padding-box]",r),initial:{backgroundPosition:"100% center"},style:{"--spread":`${a}px`,backgroundImage:"var(--bg), linear-gradient(var(--color-muted-foreground), var(--color-muted-foreground))"},transition:{duration:n,ease:"linear",repeat:Number.POSITIVE_INFINITY},children:e})},Sce=k.memo(kce),I9=k.createContext(null),Ace=()=>{const e=k.useContext(I9);if(!e)throw new Error("Reasoning components must be used within Reasoning");return e},Cce=1e3,Ice=1e3,N9=k.memo(({className:e,isStreaming:t=!1,open:r,defaultOpen:n,onOpenChange:i,duration:s,children:a,...o})=>{const l=n??t,u=n===!1,[c,d]=Jo({defaultProp:l,onChange:i,prop:r}),[h,f]=Jo({defaultProp:void 0,prop:s}),m=k.useRef(t),[b,y]=k.useState(!1),E=k.useRef(null);k.useEffect(()=>{t?(m.current=!0,E.current===null&&(E.current=Date.now())):E.current!==null&&(f(Math.ceil((Date.now()-E.current)/Ice)),E.current=null)},[t,f]),k.useEffect(()=>{t&&!c&&!u&&d(!0)},[t,c,d,u]),k.useEffect(()=>{if(m.current&&!t&&c&&!b){const _=setTimeout(()=>{d(!1),y(!0)},Cce);return()=>clearTimeout(_)}},[t,c,d,b]);const w=k.useCallback(_=>{d(_)},[d]),x=k.useMemo(()=>({duration:h,isOpen:c,isStreaming:t,setIsOpen:d}),[h,c,t,d]);return v.jsx(I9.Provider,{value:x,children:v.jsx(Hw,{className:Ie("not-prose mb-4",e),onOpenChange:w,open:c,...o,children:a})})}),Nce=(e,t)=>e||t===0?v.jsx(Sce,{duration:1,children:"Thinking..."}):t===void 0?v.jsx("p",{children:"Thought for a few seconds"}):v.jsxs("p",{children:["Thought for ",t," seconds"]}),R9=k.memo(({className:e,children:t,getThinkingMessage:r=Nce,...n})=>{const{isStreaming:i,isOpen:s,duration:a}=Ace();return v.jsx(Vw,{className:Ie("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...n,children:t??v.jsxs(v.Fragment,{children:[v.jsx(nO,{className:"size-4"}),r(i,a),v.jsx(E5,{className:Ie("size-4 transition-transform",s?"rotate-180":"rotate-0")})]})})}),P9=k.memo(({className:e,children:t,...r})=>v.jsx(qw,{className:Ie("mt-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...r,children:v.jsx(z1,{plugins:xw,rehypePlugins:Ew,children:t})}));N9.displayName="Reasoning";R9.displayName="ReasoningTrigger";P9.displayName="ReasoningContent";const Rce=({suggestion:e,onClick:t,className:r,variant:n="outline",size:i="sm",children:s,...a})=>{const o=k.useCallback(()=>{t==null||t(e)},[t,e]);return v.jsx(Hr,{className:Ie("cursor-pointer rounded-full px-4",r),onClick:o,size:i,type:"button",variant:n,...a,children:s||e})},Pce=e=>e&&e&1,Oce=e=>e&&e&2,Lce=e=>e&&e&4,Dce=e=>e.map((t,r)=>({key:`line-${r}`,tokens:t.map((n,i)=>({key:`line-${r}-${i}`,token:n}))})),Mce=({token:e})=>v.jsx("span",{className:"dark:!bg-[var(--shiki-dark-bg)] dark:!text-[var(--shiki-dark)]",style:{backgroundColor:e.bgColor,color:e.color,fontStyle:Pce(e.fontStyle)?"italic":void 0,fontWeight:Oce(e.fontStyle)?"bold":void 0,textDecoration:Lce(e.fontStyle)?"underline":void 0,...e.htmlStyle},children:e.content}),Bce=Ie("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-8","before:mr-4","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),Fce=({keyedLine:e,showLineNumbers:t})=>v.jsx("span",{className:t?Bce:"block",children:e.tokens.length===0?`
792
- `:e.tokens.map(({token:r,key:n})=>v.jsx(Mce,{token:r},n))}),T6=new Map,w6=new Map,na=new Map,zce=(e,t)=>{const r=e.slice(0,100),n=e.length>100?e.slice(-100):"";return`${t}:${e.length}:${r}:${n}`},$ce=e=>{const t=T6.get(e);if(t)return t;const r=BE({langs:[e],themes:["github-light","github-dark"]});return T6.set(e,r),r},jce=e=>({bg:"transparent",fg:"inherit",tokens:e.split(`
793
- `).map(t=>t===""?[]:[{color:"inherit",content:t}])}),k6=(e,t,r)=>{var s;const n=zce(e,t),i=w6.get(n);return i||(r&&(na.has(n)||na.set(n,new Set),(s=na.get(n))==null||s.add(r)),$ce(t).then(a=>{const l=a.getLoadedLanguages().includes(t)?t:"text",u=a.codeToTokens(e,{lang:l,themes:{dark:"github-dark",light:"github-light"}}),c={bg:u.bg??"transparent",fg:u.fg??"inherit",tokens:u.tokens};w6.set(n,c);const d=na.get(n);if(d){for(const h of d)h(c);na.delete(n)}}).catch(a=>{console.error("Failed to highlight code:",a),na.delete(n)}),null)},O9=k.memo(({tokenized:e,showLineNumbers:t,className:r})=>{const n=k.useMemo(()=>({backgroundColor:e.bg,color:e.fg}),[e.bg,e.fg]),i=k.useMemo(()=>Dce(e.tokens),[e.tokens]);return v.jsx("pre",{className:Ie("dark:!bg-[var(--shiki-dark-bg)] dark:!text-[var(--shiki-dark)] m-0 p-4 text-sm",r),style:n,children:v.jsx("code",{className:Ie("font-mono text-sm",t&&"[counter-increment:line_0] [counter-reset:line]"),children:i.map(s=>v.jsx(Fce,{keyedLine:s,showLineNumbers:t},s.key))})})},(e,t)=>e.tokenized===t.tokenized&&e.showLineNumbers===t.showLineNumbers&&e.className===t.className);O9.displayName="CodeBlockBody";const Uce=({className:e,language:t,style:r,...n})=>v.jsx("div",{className:Ie("group relative w-full overflow-hidden rounded-md border bg-background text-foreground",e),"data-language":t,style:{containIntrinsicSize:"auto 200px",contentVisibility:"auto",...r},...n}),Hce=({code:e,language:t,showLineNumbers:r=!1})=>{const n=k.useMemo(()=>jce(e),[e]),i=k.useMemo(()=>k6(e,t)??n,[e,t,n]),[s,a]=k.useState(null),o=k.useRef({code:e,language:t});(o.current.code!==e||o.current.language!==t)&&(o.current={code:e,language:t},a(null)),k.useEffect(()=>{let u=!1;return k6(e,t,c=>{u||a(c)}),()=>{u=!0}},[e,t]);const l=s??i;return v.jsx("div",{className:"relative overflow-auto",children:v.jsx(O9,{showLineNumbers:r,tokenized:l})})},Um=({code:e,language:t,showLineNumbers:r=!1,className:n,children:i,...s})=>v.jsxs(Uce,{className:n,language:t,...s,children:[i,v.jsx(Hce,{code:e,language:t,showLineNumbers:r})]}),Vce=({className:e,...t})=>v.jsx(Hw,{className:Ie("group not-prose mb-4 w-full rounded-md border",e),...t}),qce={"approval-requested":"Awaiting Approval","approval-responded":"Responded","input-available":"Running","input-streaming":"Pending","output-available":"Completed","output-denied":"Denied","output-error":"Error"},Gce={"approval-requested":v.jsx(rb,{className:"size-3 text-muted-foreground"}),"approval-responded":v.jsx(eb,{className:"size-3 text-muted-foreground"}),"input-available":v.jsx(rb,{className:"size-3 animate-pulse"}),"input-streaming":v.jsx(iO,{className:"size-3"}),"output-available":v.jsx(eb,{className:"size-3 text-green-600"}),"output-denied":v.jsx(tb,{className:"size-3 text-orange-600"}),"output-error":v.jsx(tb,{className:"size-3 text-red-600"})},Wce=e=>v.jsxs(W9,{children:[Gce[e],qce[e]]}),S6=({className:e,title:t,type:r,state:n,toolName:i,...s})=>{const a=r==="dynamic-tool"?i:r.split("-").slice(1).join("-");return v.jsxs(Vw,{className:Ie("flex w-full items-center justify-between gap-4 p-3",e),...s,children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(fO,{className:"size-4 text-muted-foreground"}),v.jsx("span",{className:"font-medium text-sm",children:t??a}),Wce(n)]}),v.jsx(E5,{className:"size-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-180"})]})},Zce=({className:e,...t})=>v.jsx(qw,{className:Ie("data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 space-y-4 p-4 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...t}),Yce=({className:e,input:t,...r})=>v.jsxs("div",{className:Ie("space-y-2 overflow-hidden",e),...r,children:[v.jsx("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:"Parameters"}),v.jsx("div",{className:"rounded-md bg-muted/50",children:v.jsx(Um,{code:JSON.stringify(t,null,2),language:"json"})})]}),Kce=({className:e,output:t,errorText:r,...n})=>{if(!(t||r))return null;let i=v.jsx("div",{children:t});return typeof t=="object"&&!k.isValidElement(t)?i=v.jsx(Um,{code:JSON.stringify(t,null,2),language:"json"}):typeof t=="string"&&(i=v.jsx(Um,{code:t,language:"json"})),v.jsxs("div",{className:Ie("space-y-2",e),...n,children:[v.jsx("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:r?"Error":"Result"}),v.jsxs("div",{className:Ie("overflow-x-auto rounded-md text-xs [&_table]:w-full",r?"bg-destructive/10 text-destructive":"bg-muted/50 text-foreground"),children:[r&&v.jsx("div",{children:r}),i]})]})},L9="antseed-console-chat";function Yo(e,t){try{const r=localStorage.getItem(`${L9}:${e}`);return r?JSON.parse(r):t}catch{return t}}function Ko(e,t){try{localStorage.setItem(`${L9}:${e}`,JSON.stringify(t))}catch{}}function A6(){return`c${Date.now().toString(36)}${Math.random().toString(36).slice(2,8)}`}function C6(e){return e===null?"?":`$${e<.01?e.toFixed(3):e.toFixed(2)}`}function D9(e){return e===null?"cost unknown":`≈ ${Lh(e??0)}`}function Xce(){const e=k.useRef(null);return k.useLayoutEffect(()=>{const t=e.current;if(!t)return;const r=()=>{const i=t.getBoundingClientRect().top+window.scrollY,s=t.closest("main"),a=s&&parseFloat(getComputedStyle(s).paddingBottom)||0,o=`${Math.max(window.innerWidth<=640?320:448,window.innerHeight-i-a)}px`;t.style.height!==o&&(t.style.height=o)};r();const n=new ResizeObserver(r);return n.observe(document.body),window.addEventListener("resize",r),()=>{n.disconnect(),window.removeEventListener("resize",r)}},[]),e}function Qce({apiKey:e,workspaceName:t,chatCost:r}){var s;if(!e)return v.jsxs("span",{children:["Paid by ",t,"."]});const n=[e.limits.monthly,((s=e.ownerLimits)==null?void 0:s.monthly)??null].filter(a=>a!==null),i=n.length?n.reduce((a,o)=>Number(o)<Number(a)?o:a):null;return v.jsxs("span",{className:"inline-flex flex-wrap items-center gap-x-1.5 gap-y-0.5",children:[v.jsx(aO,{className:"size-3.5"}),v.jsxs("span",{children:["Paid by ",t," with key"]}),v.jsxs("a",{className:"font-medium text-foreground underline-offset-2 hover:underline",href:Zm("keys"),onClick:Wm("keys"),title:`Key ${e.id}`,children:[e.label," ",v.jsxs("span",{className:"font-mono text-muted-foreground",children:["…",e.hint]})]}),v.jsxs("span",{children:["· ",Lh(e.usage.spentThisMonth)," this month",i?` of ${Lh(i)}`:""]}),r!==0&&v.jsxs("span",{children:["· this chat ",D9(r)]})]})}function za(e){return e.name?`${e.name} (${Aa(e.peerId)})`:Aa(e.peerId)}function Jce(e){var r;const t=e.trim().split(/\s+/).filter(Boolean);return((((r=t[0])==null?void 0:r[0])??"?")+(t.length>1?t[t.length-1][0]:"")).toUpperCase()}function Ar({tone:e="neutral",children:t,title:r}){const n={free:"border-success/30 bg-success/10 text-success",tee:"border-info/30 bg-info/10 text-info",neutral:"border-border text-muted-foreground"};return v.jsx("span",{title:r,className:`inline-flex items-center rounded border px-1.5 py-px font-medium text-[10px] leading-4 ${n[e]}`,children:t})}function Kc(e){let t=0;for(const r of e)t=(t*31+r.charCodeAt(0))%360;return`hsl(${t} 65% 55%)`}function Hm({offer:e}){return wl(e)?v.jsx(Ar,{tone:"free",children:"Free"}):v.jsx("span",{className:"text-muted-foreground text-xs",children:Vm(e)})}function e0e({message:e,streaming:t,initials:r}){var a;if(e.role==="user")return v.jsxs("div",{className:"flex items-center justify-end gap-1.5 text-xs",children:[v.jsx("span",{className:"font-medium text-muted-foreground",children:"You"}),v.jsx("span",{className:"flex size-5 items-center justify-center rounded-full bg-foreground font-semibold text-[9px] text-background",children:r})]});const n=e.metadata;if(!n)return null;const i=n.peers,s=n.costUsd===0&&(((a=n.usage)==null?void 0:a.outputTokens)??0)>0;return v.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 text-xs","aria-live":"polite",children:[i.length===0?v.jsx("span",{className:"text-muted-foreground",children:t?n.pinnedPeerId?`Waiting for ${Aa(n.pinnedPeerId)}…`:"Choosing a seller…":"No seller answered"}):i.map((o,l)=>v.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[l>0&&v.jsx("span",{className:"text-muted-foreground",children:"then"}),v.jsx("span",{className:"size-2 rounded-full",style:{background:Kc(o.peerId)},"aria-hidden":"true"}),v.jsx("span",{className:"font-medium text-foreground",title:o.peerId,children:za(o)})]},`${o.peerId}-${l}`)),v.jsx(Ar,{children:n.model}),n.pinnedPeerId&&v.jsx(Ar,{children:"Pinned"}),s&&v.jsx(Ar,{tone:"free",children:"Free"})]})}function t0e({metadata:e}){const t=e==null?void 0:e.usage;return!t||t.inputTokens===0&&t.outputTokens===0?null:v.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 text-muted-foreground text-xs",children:[v.jsx(cO,{className:"size-3.5"}),v.jsxs("span",{children:[vg(t.inputTokens)," in / ",vg(t.outputTokens)," out tokens"]}),v.jsx("span",{children:"·"}),e.costUsd===0?v.jsx(Ar,{tone:"free",children:"Free"}):v.jsx("span",{className:"font-medium text-foreground",title:"At the serving seller's advertised prices; the signed amount is in Logs.",children:D9(e.costUsd)})]})}function M9({filters:e,active:t,onToggle:r,sorts:n,sort:i,onSort:s,count:a}){return v.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 border-b px-3 py-2",children:[e.map(o=>v.jsxs(Hr,{type:"button",size:"xs",variant:t.has(o.id)?"secondary":"ghost","aria-pressed":t.has(o.id),className:t.has(o.id)?"border border-foreground/30":"border border-transparent text-muted-foreground",onClick:()=>r(o.id),children:[t.has(o.id)&&v.jsx(ac,{}),o.label]},o.id)),v.jsx("span",{className:"ml-auto text-muted-foreground text-xs",children:a}),v.jsxs("label",{className:"flex items-center gap-1 text-muted-foreground text-xs",children:["Sort",v.jsx("select",{className:"rounded-md border bg-transparent px-1.5 py-0.5 text-foreground text-xs",value:i,onChange:o=>s(o.target.value),children:n.map(o=>v.jsx("option",{value:o.id,children:o.label},o.id))})]})]})}function B9({free:e,tools:t,reasoning:r,vision:n,tee:i}){return v.jsxs("span",{className:"flex flex-wrap gap-1",children:[e&&v.jsx(Ar,{tone:"free",children:"Free"}),i&&v.jsx(Ar,{tone:"tee",children:"TEE"}),t&&v.jsx(Ar,{children:"Tools"}),r&&v.jsx(Ar,{children:"Reasoning"}),n&&v.jsx(Ar,{children:"Vision"})]})}function F9(e){const[t,r]=k.useState(()=>new Set(Yo(e,[])));return[t,i=>r(s=>{const a=new Set(s);return a.has(i)?a.delete(i):a.add(i),Ko(e,[...a]),a})]}function z9(e,t){const[r,n]=k.useState(()=>Yo(e,t));return[r,i=>{n(i),Ko(e,i)}]}function Vm(e){return wl(e)?"Free":`${C6(e.inputUsdPerMillion)} / ${C6(e.outputUsdPerMillion)} per M`}function r0e({models:e,value:t,onChange:r,className:n}){const[i,s]=k.useState(!1),[a,o]=F9("model-filters"),[l,u]=z9("model-sort","popular"),c=vO(e,a,l);return v.jsxs(Bw,{open:i,onOpenChange:s,children:[v.jsx(Fw,{asChild:!0,children:v.jsxs(Hr,{variant:"outline",size:"sm",className:Ie("max-w-80 justify-between gap-2",n),children:[v.jsx("span",{className:"truncate",children:t?t.name:"Pick a model"}),t&&t.inputUsdPerMillion!==null&&(t.free?v.jsx(Ar,{tone:"free",children:"Free offers"}):v.jsxs("span",{className:"text-muted-foreground text-xs max-sm:hidden",children:["from ",Vm(t)]})),v.jsx(T5,{className:"size-3.5 opacity-60"})]})}),v.jsxs(zw,{title:"Model",className:"sm:max-w-2xl",children:[v.jsx($w,{placeholder:"Search models…"}),v.jsx(M9,{filters:mO,active:a,onToggle:o,sorts:pO,sort:l,onSort:u,count:`${c.length} of ${e.length} models`}),v.jsxs(jw,{className:"max-h-[min(28rem,60vh)]",children:[v.jsxs(Uw,{children:["No model matches.",a.size>0?" Try fewer filters.":""]}),v.jsx(pm,{children:c.map(d=>v.jsxs(gm,{value:`${d.name} ${d.id}`,onSelect:()=>{r(d.id),s(!1)},className:"items-start py-2",children:[v.jsxs("span",{className:"flex min-w-0 flex-col gap-1",children:[v.jsx(bm,{children:d.name}),v.jsx(B9,{free:d.free,tools:d.toolUse,reasoning:d.reasoning,vision:d.vision,tee:d.tee})]}),v.jsxs("span",{className:"ml-auto shrink-0 text-right text-muted-foreground text-xs",children:[d.offers," seller",d.offers===1?"":"s",v.jsx("span",{className:"mt-0.5 block",children:d.free?v.jsx(Ar,{tone:"free",children:"Free offers"}):`from ${Vm(d)}`})]}),(t==null?void 0:t.id)===d.id&&v.jsx(ac,{className:"size-3.5 shrink-0"})]},d.id))})]})]})]})}function qm({children:e}){return v.jsxs("span",{className:"inline-flex items-baseline gap-1.5",children:[v.jsx("span",{className:"size-2 shrink-0 translate-y-[-1px] rounded-full bg-amber-500","aria-hidden":"true"}),v.jsx("span",{children:e})]})}const I6=e=>e.toLowerCase().replace(/[^a-z0-9]/g,"");function $9(e,t,r,n){if(r)return"Checking which seller automatic routing picks…";if(!e)return"No seller passes your routing settings for this model right now.";const i=t==null?void 0:t.peers.find(a=>a.peerId===e.peerId.toLowerCase()),s=za(i||{peerId:e.peerId,name:e.displayName});return v.jsxs("span",{className:"inline-flex flex-wrap items-center gap-1.5 align-middle",children:["Right now:",v.jsx("span",{className:"size-2 rounded-full",style:{background:Kc(e.peerId.toLowerCase())},"aria-hidden":"true"}),v.jsx("span",{className:"font-medium text-foreground",children:s}),v.jsx(Hm,{offer:e}),e.trustScore!==null&&v.jsxs("span",{children:["trust ",Math.round(e.trustScore)]}),n&&!wl(e)&&v.jsxs(qm,{children:["No free seller offers ",(t==null?void 0:t.name)??"this model"," right now, and the wallet has no funds for a paid one."," ",v.jsx("a",{className:"font-medium text-foreground underline underline-offset-2",href:Zm("wallet"),onClick:Wm("wallet"),children:"Add funds"})]})]})}function N6({model:e,value:t,onChange:r,preview:n,previewLoading:i,unfunded:s,className:a,compact:o=!1}){const[l,u]=k.useState(!1),[c,d]=F9("peer-filters"),[h,f]=z9("peer-sort","auto"),m=(e==null?void 0:e.peers.find(_=>_.peerId===t))??null,b=xO(n),y=j5(n),E=y?(e==null?void 0:e.peers.find(_=>_.peerId===y.peerId.toLowerCase()))??null:null,w=(e==null?void 0:e.peers)??[],x=_O(w,c,h,b);return v.jsxs(Bw,{open:l,onOpenChange:u,children:[v.jsx(Fw,{asChild:!0,children:v.jsxs(Hr,{variant:o?"ghost":"outline",size:o?"xs":"sm",className:Ie("max-w-96 justify-between gap-2",a),disabled:!e,children:[m?v.jsx("span",{className:"size-2 rounded-full",style:{background:Kc(m.peerId)},"aria-hidden":"true"}):v.jsx(nb,{className:"size-3.5"}),v.jsx("span",{className:"truncate",children:m?za(m):v.jsxs(v.Fragment,{children:["Auto",E?v.jsxs("span",{className:"text-muted-foreground",children:[" · ",E.name??Aa(E.peerId)]}):""]})}),(m??E)&&!o&&v.jsx(Hm,{offer:m??E}),v.jsx(T5,{className:"size-3.5 opacity-60"})]})}),v.jsxs(zw,{title:"Seller",className:"sm:max-w-2xl",children:[v.jsx($w,{placeholder:"Search sellers…"}),v.jsx(M9,{filters:gO,active:c,onToggle:d,sorts:bO,sort:h,onSort:f,count:`${x.length} of ${w.length} sellers`}),v.jsxs(jw,{className:"max-h-[min(30rem,60vh)]",children:[v.jsxs(Uw,{children:["No seller matches.",c.size>0?" Try fewer filters.":""]}),v.jsx(pm,{heading:"Routing",children:v.jsxs(gm,{value:"auto automatic best offer routing",onSelect:()=>{r(null),u(!1)},className:"items-start py-2",children:[v.jsx(nb,{className:"mt-0.5 size-3.5"}),v.jsxs("span",{className:"flex min-w-0 flex-col",children:[v.jsx(bm,{children:"Auto: the gateway picks the best offer each turn"}),v.jsx("span",{className:"text-muted-foreground text-xs",children:$9(y,e,i,s)})]}),t===null&&v.jsx(ac,{className:"ml-auto size-3.5"})]})}),v.jsx(pm,{heading:`Sellers offering ${(e==null?void 0:e.name)??"this model"}`,children:x.map(_=>{const A=b.get(_.peerId),S=A!==void 0&&!A.eligible;return v.jsxs(gm,{value:`${_.name??""} ${_.peerId}`,onSelect:()=>{r(_.peerId),u(!1)},className:"items-start py-2",children:[v.jsx("span",{className:"mt-1.5 size-2 shrink-0 rounded-full",style:{background:Kc(_.peerId)},"aria-hidden":"true"}),v.jsxs("span",{className:"flex min-w-0 flex-col gap-1",children:[v.jsxs("span",{className:`flex items-center gap-2 ${S?"text-muted-foreground":""}`,children:[v.jsx(bm,{children:za(_)}),(A==null?void 0:A.eligible)&&A.rank!==null&&v.jsxs("span",{className:"text-muted-foreground text-xs",children:["#",A.rank]})]}),v.jsx(B9,{free:wl(_),tools:_.toolUse,reasoning:_.reasoning,vision:_.vision,tee:_.tee}),S&&v.jsxs("span",{className:"text-muted-foreground text-xs",children:["Auto skips it: ",A.reasons[0]??"not eligible",". You can still pin it."]}),!_.toolUse&&v.jsx("span",{className:"text-muted-foreground text-xs",children:"No tools: plain chat when pinned."})]}),v.jsxs("span",{className:"ml-auto flex shrink-0 flex-col items-end gap-0.5 text-muted-foreground text-xs",children:[v.jsx(Hm,{offer:_}),_.reputation!==null&&v.jsxs("span",{children:["trust ",Math.round(_.reputation)]})]}),t===_.peerId&&v.jsx(ac,{className:"size-3.5 shrink-0"})]},_.peerId)})})]})]})]})}function n0e({part:e,onAnswer:t}){const r=e.input,n=typeof(r==null?void 0:r.command)=="string"?r.command:JSON.stringify(e.input,null,2);return v.jsxs("div",{className:"space-y-2 border-t p-3",children:[v.jsx("p",{className:"font-medium text-sm",children:"Run this command on the gateway host?"}),v.jsx("pre",{className:"max-h-48 overflow-auto whitespace-pre-wrap break-all rounded-md bg-muted/50 p-2 font-mono text-xs",children:n}),v.jsx("p",{className:"text-muted-foreground text-xs",children:"It runs as the gateway's user, with access to its files. The model chose it, and a seller or a page it read can steer the model: approve only a command you understand."}),t?v.jsxs("div",{className:"flex gap-2",children:[v.jsx(Hr,{type:"button",size:"sm",variant:"secondary",onClick:()=>t(!0),children:"Approve"}),v.jsx(Hr,{type:"button",size:"sm",variant:"outline",onClick:()=>t(!1),children:"Deny"})]}):v.jsx("p",{className:"text-muted-foreground text-xs",children:"Not run: the conversation moved on."})]})}function i0e({part:e,onApproval:t}){const r=e.state==="approval-requested";return v.jsxs(Vce,{defaultOpen:e.state==="output-error",children:[e.type==="dynamic-tool"?v.jsx(S6,{type:e.type,state:e.state,toolName:e.toolName}):v.jsx(S6,{type:e.type,state:e.state}),v.jsxs(Zce,{children:[v.jsx(Yce,{input:e.input}),v.jsx(Kce,{output:e.output,errorText:e.errorText})]}),r&&v.jsx(n0e,{part:e,onAnswer:t?n=>t(e.approval.id,n):null})]})}function R6({threads:e,loading:t,activeId:r,onOpen:n,onRemove:i}){return e.length===0?v.jsx("p",{className:"px-2 py-3 text-muted-foreground text-xs",children:t?"Loading…":"Your conversations show up here."}):e.map(s=>v.jsxs("div",{className:`group flex items-center gap-1 rounded-md px-2 py-1.5 text-sm ${s.id===r?"bg-muted":"hover:bg-muted/60"}`,children:[v.jsxs("button",{type:"button",className:"min-w-0 flex-1 text-left",onClick:()=>n(s.id),title:s.title,children:[v.jsx("span",{className:"block truncate",children:s.title}),v.jsxs("span",{className:"block truncate text-muted-foreground text-xs",children:[rS(s.updatedAt),s.model?` · ${s.model}`:"",s.peerId?` · ${Aa(s.peerId)}`:""]})]}),v.jsx("button",{type:"button",className:"rounded p-1 text-muted-foreground hover:text-foreground focus-visible:opacity-100 md:opacity-0 md:group-hover:opacity-100","aria-label":`Delete "${s.title}"`,onClick:()=>i(s.id),children:v.jsx(hO,{className:"size-3.5"})})]},s.id))}function s0e(){var Ae,ze,re,Le,et;const{workspace:e,viewer:t,me:r}=Z9(),n=`${e.id}:${r.member.id}`,i=co({queryKey:tn.chatModels(e.id),queryFn:()=>Ws.chat.models(e.id),staleTime:6e4}),[s,a]=k.useState(()=>Yo(`model:${n}`,null)),[o,l]=k.useState(()=>Yo(`peer:${n}`,null)),u=Y9(),c=co({queryKey:tn.chatThreads(e.id),queryFn:()=>Ws.chat.threads(e.id)}),d=co({queryKey:tn.chatContext(e.id),queryFn:()=>Ws.chat.context(e.id),staleTime:3e4}),h=Xce(),[f,m]=k.useState(()=>Yo(`chat:${n}`,A6())),[b,y]=k.useState(!1),E=((Ae=i.data)==null?void 0:Ae.find(Te=>Te.id===s))??(s?(ze=i.data)==null?void 0:ze.find(Te=>I6(Te.id)===I6(s)):void 0)??null,[w,x]=k.useState(null),_=K9(t),A=X9(e.id,_),S=!!A.data&&Number(A.data.available)<=0,I=((re=d.data)==null?void 0:re.key.id)??null,N=co({queryKey:["chat-route-preview",e.id,I,s],queryFn:()=>Ws.network.routePreview({model:s,key:I}),enabled:!!(s&&I),staleTime:3e4});k.useEffect(()=>{var Ke;if(!((Ke=i.data)!=null&&Ke.length)||E)return;const Te=i.data.find(ot=>ot.toolUse)??i.data[0];s&&x(s),a(Te.id)},[i.data,E]),k.useEffect(()=>{Ko(`model:${n}`,s)},[n,s]),k.useEffect(()=>{Ko(`peer:${n}`,o)},[n,o]),k.useEffect(()=>{Ko(`chat:${n}`,f)},[n,f]);const U=k.useRef({workspaceId:e.id,model:s,peerId:o});U.current={workspaceId:e.id,model:s,peerId:o};const z=k.useMemo(()=>new sp({api:`${Q9}/chat`,credentials:"same-origin",headers:{[J9]:"1"},prepareSendMessagesRequest:({id:Te,messages:Ke})=>({body:{...U.current,id:Te,messages:Ke.slice(-1)}})}),[]),{messages:Z,sendMessage:V,status:ae,stop:J,error:Y,setMessages:de,clearError:xe,addToolApprovalResponse:Ue}=qP({id:f,transport:z,sendAutomaticallyWhen:MP}),He=co({queryKey:tn.chatThread(e.id,f),queryFn:()=>Ws.chat.thread(e.id,f),enabled:(c.data??[]).some(Te=>Te.id===f),staleTime:1/0});k.useEffect(()=>{He.data&&(de(He.data.messages),He.data.model&&a(He.data.model),l(He.data.peerId))},[He.data]),k.useEffect(()=>{(ae==="streaming"||ae==="ready")&&Z.length>0&&u.invalidateQueries({queryKey:tn.chatThreads(e.id)}),ae==="ready"&&Z.length>0&&(u.removeQueries({queryKey:tn.chatThread(e.id,f),exact:!0}),u.invalidateQueries({queryKey:tn.chatContext(e.id)}),u.invalidateQueries({queryKey:["chat-route-preview",e.id]}))},[ae]),k.useEffect(()=>{Y&&(u.invalidateQueries({queryKey:tn.chatModels(e.id)}),u.invalidateQueries({queryKey:["chat-route-preview",e.id]}),_&&u.invalidateQueries({queryKey:tn.wallet(e.id)}))},[Y]);const L=ae==="submitted"||ae==="streaming",Re=Z.reduce((Te,Ke)=>{var Rt;const ot=(Rt=Ke.metadata)==null?void 0:Rt.costUsd;return Te===null||ot===null?null:Te+(ot??0)},0),Q=Te=>{const Ke=Te.text.trim();!Ke||!s||L||(u.setQueryData(tn.chatThreads(e.id),(ot=[])=>ot.some(Rt=>Rt.id===f)?ot:[{id:f,title:Ke.replace(/\s+/g," ").slice(0,80),model:s,peerId:o,createdAt:Date.now(),updatedAt:Date.now()},...ot]),V({text:Ke}))},M=Te=>{y(!1),!(Te===f||L)&&(xe(),de([]),m(Te))},pe=()=>{y(!1),J(),xe(),de([]),m(A6())},oe=eS({mutationFn:Te=>Ws.chat.deleteThread(e.id,Te),onSuccess:(Te,Ke)=>{Ke===f&&pe()},invalidate:[tn.chatThreads(e.id)]}),fe=["What are today's top AI news? Search and cite sources.","Read https://antseed.com and explain how it works in 5 bullets.",yg(t)?"Write a Python script that prints the first 20 primes, save it and run it.":"Write a short README for a CLI tool and save it as README.md."];return v.jsxs("div",{ref:h,className:"gc-chat gc-chat-page flex gap-4",children:[v.jsxs("aside",{className:"hidden w-60 shrink-0 flex-col gap-2 md:flex","aria-label":"Conversations",children:[v.jsxs(Hr,{variant:"outline",size:"sm",className:"justify-start gap-2",onClick:pe,disabled:Z.length===0&&!L,children:[v.jsx(od,{className:"size-3.5"})," New chat"]}),v.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:v.jsx(R6,{threads:c.data??[],loading:c.isLoading,activeId:f,onOpen:M,onRemove:Te=>oe.mutate(Te)})})]}),v.jsxs(tS,{isOpen:b,onClose:()=>y(!1),side:"left",title:"Chats",className:"gc-chat gc-chat-history",children:[v.jsxs(Hr,{variant:"outline",size:"sm",className:"mb-2 w-full justify-start gap-2",onClick:pe,children:[v.jsx(od,{className:"size-3.5"})," New chat"]}),v.jsx(R6,{threads:c.data??[],loading:c.isLoading,activeId:f,onOpen:M,onRemove:Te=>oe.mutate(Te)})]}),v.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-3 max-sm:gap-2",children:[v.jsxs("div",{className:"flex flex-wrap items-center gap-2 max-sm:flex-nowrap max-sm:gap-1",children:[v.jsx(Hr,{variant:"ghost",size:"icon-sm",className:"shrink-0 md:hidden",onClick:()=>y(!0),"aria-label":"Chats",children:v.jsx(lO,{className:"size-4"})}),v.jsx("h1",{className:"mr-auto font-semibold text-xl max-sm:sr-only",children:"Chat"}),v.jsx(r0e,{models:i.data??[],value:E,onChange:Te=>{a(Te),l(null),x(null)},className:"max-sm:mx-auto max-sm:min-w-0 max-sm:border-transparent max-sm:bg-transparent max-sm:font-semibold max-sm:shadow-none max-sm:dark:border-transparent max-sm:dark:bg-transparent"}),v.jsx(N6,{model:E,value:o,onChange:l,preview:N.data,previewLoading:N.isLoading,unfunded:S,className:"max-sm:hidden"}),v.jsxs(Hr,{variant:"ghost",size:"sm",className:"shrink-0 md:hidden max-sm:size-8 max-sm:p-0",onClick:pe,disabled:Z.length===0&&!L,"aria-label":"New chat",children:[v.jsx(od,{className:"size-4"})," ",v.jsx("span",{className:"max-sm:sr-only",children:"New"})]})]}),v.jsxs("p",{className:"text-muted-foreground text-xs max-sm:hidden",children:[o&&E?v.jsxs(v.Fragment,{children:["Every turn goes to ",v.jsx("span",{className:"font-medium text-foreground",children:za(E.peers.find(Te=>Te.peerId===o)??{peerId:o,name:null})}),". Each answer shows the peer that served it."]}):v.jsxs(v.Fragment,{children:["The gateway routes each turn to the best offer for ",(E==null?void 0:E.name)??"the model","; each answer shows the seller that served it, and you can pin one to always use it."]})," ","Tools run on the gateway."]}),w&&E&&v.jsx("p",{className:"text-muted-foreground text-xs",children:v.jsxs(qm,{children:["No seller offers ",w," right now (sellers stop offering a model while they are busy), so the chat switched to ",E.name,"."]})}),o&&E&&!E.peers.some(Te=>Te.peerId===o)&&v.jsx("p",{className:"text-muted-foreground text-xs",children:v.jsxs(qm,{children:[Aa(o)," no longer offers ",E.name," (sellers stop offering a model while they are busy)."," ",v.jsx("button",{type:"button",className:"font-medium text-foreground underline underline-offset-2",onClick:()=>l(null),children:"Use Auto"})," or pick another seller."]})}),!o&&v.jsx("p",{className:"text-muted-foreground text-xs max-sm:hidden",children:$9(j5(N.data),E,N.isLoading,S)}),v.jsx("p",{className:"text-muted-foreground text-xs max-sm:hidden",children:v.jsx(Qce,{apiKey:(Le=d.data)==null?void 0:Le.key,workspaceName:((et=d.data)==null?void 0:et.workspaceName)??e.name,chatCost:Re})}),v.jsxs(SD,{className:"gc-chat-conversation rounded-xl border bg-card max-sm:rounded-none max-sm:border-0 max-sm:bg-transparent",children:[v.jsxs(AD,{className:"max-sm:gap-6 max-sm:px-0",children:[Z.length===0?v.jsx(CD,{children:v.jsxs("div",{className:"flex w-full min-w-0 max-w-2xl flex-col items-center gap-2 text-center",children:[v.jsx("h3",{className:"font-medium text-base",children:"Ask anything"}),v.jsx("p",{className:"text-muted-foreground text-sm",children:"The agent can search and read the web and keep files in this chat's scratch space on the gateway."}),v.jsx("div",{className:"mt-3 flex flex-wrap justify-center gap-2",children:fe.map(Te=>v.jsx(Rce,{suggestion:Te,onClick:Ke=>Q({text:Ke}),className:"h-auto min-h-8 max-w-full whitespace-normal py-1.5 max-sm:w-full max-sm:rounded-xl max-sm:text-left"},Te))})]})}):Z.map((Te,Ke)=>{const ot=L&&Ke===Z.length-1;return v.jsxs(mie,{from:Te.role,children:[v.jsx(e0e,{message:Te,streaming:ot,initials:Jce(r.member.label)}),v.jsx(pie,{children:Te.parts.map((Rt,bn)=>{const Jr=`${Te.id}-${bn}`;if(Rt.type==="text")return v.jsx(_w,{children:Rt.text},Jr);if(Rt.type==="reasoning")return v.jsxs(N9,{isStreaming:ot&&bn===Te.parts.length-1,children:[v.jsx(R9,{}),v.jsx(P9,{children:Rt.text})]},Jr);if(Rt.type==="dynamic-tool"||Rt.type.startsWith("tool-")){const $n=!L&&Ke===Z.length-1;return v.jsx(i0e,{part:Rt,onApproval:$n?(_r,en)=>{Ue({id:_r,approved:en})}:null},Jr)}return null})}),Te.role==="assistant"&&v.jsx(t0e,{metadata:Te.metadata})]},Te.id)}),Y&&v.jsx("div",{className:"rounded-lg border border-destructive/40 bg-destructive/5 p-3 text-sm",children:/out of AntSeed credits|insufficient_deposits/i.test(Y.message)?v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"font-medium",children:"No free seller took this, and paid ones need funds."})," ","No free seller offers ",(E==null?void 0:E.name)??"this model"," right now (free sellers stop offering a model while they are busy), and the ",e.name," wallet has no deposits for a paid one."," ",v.jsx("a",{className:"font-medium underline underline-offset-2",href:Zm("wallet"),onClick:Wm("wallet"),children:"Add funds"}),", or pick a model marked ",v.jsx(Ar,{tone:"free",children:"Free"}),"."]}):/model_not_found|not served by this peer/i.test(Y.message)?v.jsxs(v.Fragment,{children:[v.jsxs("span",{className:"font-medium",children:["The seller stopped offering ",(E==null?void 0:E.name)??"this model","."]})," ","Sellers drop a model while they are busy, and the list had not caught up yet. Send again",o?v.jsxs(v.Fragment,{children:[" after switching to ",v.jsx("button",{type:"button",className:"font-medium underline underline-offset-2",onClick:()=>l(null),children:"Auto"})]}):""," to use another seller."]}):v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"font-medium",children:"The request failed."})," ",Y.message]})})]}),v.jsx(ID,{})]}),v.jsxs(vse,{onSubmit:Q,className:"max-sm:[&_[data-slot=input-group]]:rounded-3xl",children:[v.jsx(xse,{children:v.jsx(Ese,{placeholder:E?`Message ${E.name}…`:"Loading models…",className:"max-sm:min-h-10"})}),v.jsxs(_se,{children:[v.jsxs(Tse,{className:"min-w-0",children:[v.jsx(N6,{model:E,value:o,onChange:l,preview:N.data,previewLoading:N.isLoading,unfunded:S,compact:!0,className:"min-w-0 max-w-[65vw] text-muted-foreground sm:hidden"}),v.jsxs("span",{className:"px-2 text-muted-foreground text-xs max-sm:hidden",children:[E?E.toolUse?"Web search, web pages and scratch files":"This model cannot use tools; plain chat":"",E!=null&&E.toolUse&&yg(t)?", plus a shell that asks before each command (admins)":""]})]}),v.jsx(wse,{status:ae,onStop:J,disabled:!s})]})]})]})]})}const _0e=Object.freeze(Object.defineProperty({__proto__:null,default:s0e},Symbol.toStringTag,{value:"Module"})),a0e=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:vw},Symbol.toStringTag,{value:"Module"}));export{_0e as C,x0e as F,Zt as S,fre as a};