diff --git a/.gitattributes b/.gitattributes index a6344aac8c09253b3b630fb776ae94478aa0275b..4efc664bf1f55a8cfdcbef0e83e6c05d534509b3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text *.zip filter=lfs diff=lfs merge=lfs -text *.zst filter=lfs diff=lfs merge=lfs -text *tfevents* filter=lfs diff=lfs merge=lfs -text +dist/purple.avif filter=lfs diff=lfs merge=lfs -text +public/purple.avif filter=lfs diff=lfs merge=lfs -text diff --git a/dist/ai2.svg b/dist/ai2.svg new file mode 100644 index 0000000000000000000000000000000000000000..c36260f920a1cca15c190860f3eb96c6bd774d60 --- /dev/null +++ b/dist/ai2.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 b/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..0acaaff03d4bb7606de02a827aeee338e5a86910 Binary files /dev/null and b/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 differ diff --git a/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff b/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff new file mode 100644 index 0000000000000000000000000000000000000000..b804d7b33a3fa5b2587d2d1d55006aed678e3eb2 Binary files /dev/null and b/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff differ diff --git a/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf b/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf new file mode 100644 index 0000000000000000000000000000000000000000..c6f9a5e7c03f9e64e9c7b4773a8e37ade8eaf406 Binary files /dev/null and b/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf differ diff --git a/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf b/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf new file mode 100644 index 0000000000000000000000000000000000000000..9ff4a5e04421e5107f74c28e27354e0b2a4e7ef8 Binary files /dev/null and b/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf differ diff --git a/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff b/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff new file mode 100644 index 0000000000000000000000000000000000000000..9759710d1d3e16eb10012d56babb73f2479ba9f0 Binary files /dev/null and b/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff differ diff --git a/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 b/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..f390922eceffe1f6dfb81a3dc086a92d98171b02 Binary files /dev/null and b/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 differ diff --git a/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff b/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff new file mode 100644 index 0000000000000000000000000000000000000000..9bdd534fd2beb9b878f0219da9d63ffba56677e2 Binary files /dev/null and b/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff differ diff --git a/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 b/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..75344a1f98e37e2c631e178065854c3a81fb842f Binary files /dev/null and b/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 differ diff --git a/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf b/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf new file mode 100644 index 0000000000000000000000000000000000000000..f522294ff0f3f8c52dfdaef7ebfaa06ebfcfaabf Binary files /dev/null and b/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf differ diff --git a/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf b/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf new file mode 100644 index 0000000000000000000000000000000000000000..4e98259c3b54076d684bf3459baeaeae8dbce97a Binary files /dev/null and b/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf differ diff --git a/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff b/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff new file mode 100644 index 0000000000000000000000000000000000000000..e7730f66275c87c28f26530d89264cffecf90be0 Binary files /dev/null and b/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff differ diff --git a/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 b/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..395f28beac23c7b0f7f3a1e714bd8dac253dd3bc Binary files /dev/null and b/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 differ diff --git a/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf b/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf new file mode 100644 index 0000000000000000000000000000000000000000..b8461b275fae76efd0d21fd0f1aaa696a5b10f9a Binary files /dev/null and b/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf differ diff --git a/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 b/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..735f6948d63c8cc7f8233735bb9c8d843c83d804 Binary files /dev/null and b/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 differ diff --git a/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff b/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff new file mode 100644 index 0000000000000000000000000000000000000000..acab069f90b6fe6301a004e6f8beaf6a0db48bce Binary files /dev/null and b/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff differ diff --git a/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 b/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..ab2ad21da6fbe6c171bb869240954d0ead8f68fd Binary files /dev/null and b/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 differ diff --git a/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff b/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff new file mode 100644 index 0000000000000000000000000000000000000000..f38136ac1cc2dcdc9d9b10b8521487468b1f768c Binary files /dev/null and b/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff differ diff --git a/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf b/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf new file mode 100644 index 0000000000000000000000000000000000000000..4060e627dc341c1854260cbc3f7386e222a4d297 Binary files /dev/null and b/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf differ diff --git a/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 b/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..5931794de4a2a485fa70099bf2659b145976d043 Binary files /dev/null and b/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 differ diff --git a/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf b/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf new file mode 100644 index 0000000000000000000000000000000000000000..dc007977ee709a236d9e82719cf7d4e5577a81b9 Binary files /dev/null and b/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf differ diff --git a/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff b/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff new file mode 100644 index 0000000000000000000000000000000000000000..67807b0bd4f867853271f5917fb3adf377f93f53 Binary files /dev/null and b/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff differ diff --git a/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf b/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf new file mode 100644 index 0000000000000000000000000000000000000000..0e9b0f354ad460202bba554359f5adcc8da666b7 Binary files /dev/null and b/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf differ diff --git a/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff b/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff new file mode 100644 index 0000000000000000000000000000000000000000..6f43b594b6c1d863a0e3f93b001f8dd503316464 Binary files /dev/null and b/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff differ diff --git a/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 b/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..b50920e138807f385d0b0359f4f0f09891f18406 Binary files /dev/null and b/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 differ diff --git a/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 b/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..eb24a7ba282b03d830fa6c63ee897d92a5188736 Binary files /dev/null and b/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 differ diff --git a/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff b/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff new file mode 100644 index 0000000000000000000000000000000000000000..21f5812968c42392a3eaea9b0c6320870b6b8b38 Binary files /dev/null and b/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff differ diff --git a/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf b/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf new file mode 100644 index 0000000000000000000000000000000000000000..dd45e1ed2e18b32c516d9b481ebed3cb8bffa711 Binary files /dev/null and b/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf differ diff --git a/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf b/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf new file mode 100644 index 0000000000000000000000000000000000000000..728ce7a1e2cb689df32c3a6c26e1bd072dcf2acb Binary files /dev/null and b/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf differ diff --git a/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 b/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..29657023adc09956249f6295746c8ce4469b50d3 Binary files /dev/null and b/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 differ diff --git a/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff b/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff new file mode 100644 index 0000000000000000000000000000000000000000..0ae390d74c9f665cf8b1e5ea5483395da7513444 Binary files /dev/null and b/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff differ diff --git a/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff b/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff new file mode 100644 index 0000000000000000000000000000000000000000..eb5159d4c1ca83fb92b3190223698427df0e010c Binary files /dev/null and b/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff differ diff --git a/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf b/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf new file mode 100644 index 0000000000000000000000000000000000000000..70d559b4e937ca1b805eb39f544cbebe3c58ca6f Binary files /dev/null and b/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf differ diff --git a/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 b/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..215c143fd7805a5c2b222bd7892a1a2b09610020 Binary files /dev/null and b/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 differ diff --git a/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf b/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf new file mode 100644 index 0000000000000000000000000000000000000000..2f65a8a3a6d3628d11ea9c26c9077cef672fe427 Binary files /dev/null and b/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf differ diff --git a/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 b/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..cfaa3bda59246b49e94298478d6de3b3208066c8 Binary files /dev/null and b/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 differ diff --git a/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff b/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff new file mode 100644 index 0000000000000000000000000000000000000000..8d47c02d9408d34b2a9d566c0fe0d42bf82fb735 Binary files /dev/null and b/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff differ diff --git a/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 b/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..349c06dc609f896392fd5bc8b364d3bc3efc9330 Binary files /dev/null and b/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 differ diff --git a/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff b/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff new file mode 100644 index 0000000000000000000000000000000000000000..7e02df963621a5e26d53d510f0b4992eebde1c60 Binary files /dev/null and b/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff differ diff --git a/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf b/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf new file mode 100644 index 0000000000000000000000000000000000000000..d5850df98ec19de2eee9ff922ef59586efe471d0 Binary files /dev/null and b/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf differ diff --git a/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf b/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf new file mode 100644 index 0000000000000000000000000000000000000000..537279f6bd2184ed32f1a5168850609147d58ee6 Binary files /dev/null and b/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf differ diff --git a/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff b/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff new file mode 100644 index 0000000000000000000000000000000000000000..31b84829b42edae20d0148eeec0d922dad2108c4 Binary files /dev/null and b/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff differ diff --git a/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 b/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..a90eea85f6f7bded69ff5d40114447a6d8b48cfe Binary files /dev/null and b/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 differ diff --git a/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf b/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf new file mode 100644 index 0000000000000000000000000000000000000000..fd679bf374af72f2a183b97b40c9c7e9e51fbe5e Binary files /dev/null and b/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf differ diff --git a/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 b/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..b3048fc115681ee6c1bc86b0aa158cfbbf59daa3 Binary files /dev/null and b/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 differ diff --git a/dist/assets/KaTeX_Script-Regular-D5yQViql.woff b/dist/assets/KaTeX_Script-Regular-D5yQViql.woff new file mode 100644 index 0000000000000000000000000000000000000000..0e7da821eee0dd05a0a6f0b16c2c1345dc573a84 Binary files /dev/null and b/dist/assets/KaTeX_Script-Regular-D5yQViql.woff differ diff --git a/dist/assets/KaTeX_Size1-Regular-C195tn64.woff b/dist/assets/KaTeX_Size1-Regular-C195tn64.woff new file mode 100644 index 0000000000000000000000000000000000000000..7f292d91184f257054ef77cc1cd3443db757c9cc Binary files /dev/null and b/dist/assets/KaTeX_Size1-Regular-C195tn64.woff differ diff --git a/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf b/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf new file mode 100644 index 0000000000000000000000000000000000000000..871fd7d19d8658f64d8696ed9cdfc82c821ed76d Binary files /dev/null and b/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf differ diff --git a/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 b/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..c5a8462fbfe2c39a7c1857b9e296e62500a8a8a5 Binary files /dev/null and b/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 differ diff --git a/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf b/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf new file mode 100644 index 0000000000000000000000000000000000000000..7a212caf91c0007e826fee2d622bf48acbd30dde Binary files /dev/null and b/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf differ diff --git a/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 b/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..e1bccfe2403a4ed770c1697ae7c15b9e1cd9bc4e Binary files /dev/null and b/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 differ diff --git a/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff b/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff new file mode 100644 index 0000000000000000000000000000000000000000..d241d9be2d317f7b39b401d96c8b18836acea0fa Binary files /dev/null and b/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff differ diff --git a/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff b/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff new file mode 100644 index 0000000000000000000000000000000000000000..e6e9b658dcf1cd031ac82b6b8f312444c55d4fc0 Binary files /dev/null and b/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff differ diff --git a/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf b/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf new file mode 100644 index 0000000000000000000000000000000000000000..00bff3495fa9d2f98c1c9ce436add6a1bcfe87fb Binary files /dev/null and b/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf differ diff --git a/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff b/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff new file mode 100644 index 0000000000000000000000000000000000000000..e1ec5457664f438ce5a1cc6dd8409bf60ca7804b Binary files /dev/null and b/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff differ diff --git a/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf b/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf new file mode 100644 index 0000000000000000000000000000000000000000..74f08921f00f71f413ca42c9d1c90202e672ef38 Binary files /dev/null and b/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf differ diff --git a/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 b/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..680c13085076a2f6c5a7e695935ec3f21cddb65f Binary files /dev/null and b/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 differ diff --git a/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff b/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff new file mode 100644 index 0000000000000000000000000000000000000000..2432419f28936aff53ddfa2a732d027e6a6648fd Binary files /dev/null and b/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff differ diff --git a/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 b/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..771f1af705f5cef5f578b3a1e7d8eff66f9b76b0 Binary files /dev/null and b/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 differ diff --git a/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf b/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf new file mode 100644 index 0000000000000000000000000000000000000000..c83252c5714c71a3e0ec62195884167339a0129b Binary files /dev/null and b/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf differ diff --git a/dist/assets/code-block-OCS4YCEC-Dmmx1Rax.js b/dist/assets/code-block-OCS4YCEC-Dmmx1Rax.js new file mode 100644 index 0000000000000000000000000000000000000000..71c0a00c49dc53a513fe85961fd9faad82c4ee96 --- /dev/null +++ b/dist/assets/code-block-OCS4YCEC-Dmmx1Rax.js @@ -0,0 +1,2 @@ +import{i as e,n as t,o as n,r,s as i,t as a}from"./index-C0oSj8fz.js";var o=i(),s=n(),c=e(`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`),l=e=>{let t={};for(let n of e.split(`;`)){let e=n.indexOf(`:`);if(e>0){let r=n.slice(0,e).trim(),i=n.slice(e+1).trim();r&&i&&(t[r]=i)}}return t},u=(0,o.memo)(({children:t,result:n,language:r,className:i,...a})=>{let u=(0,o.useMemo)(()=>{let e={};return n.bg&&(e[`--sdm-bg`]=n.bg),n.fg&&(e[`--sdm-fg`]=n.fg),n.rootStyle&&Object.assign(e,l(n.rootStyle)),e},[n.bg,n.fg,n.rootStyle]);return(0,s.jsx)(`pre`,{className:e(i,`p-4 text-sm`,`bg-[var(--sdm-bg,transparent)]`,`dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,transparent))]`),"data-language":r,"data-streamdown":`code-block-body`,style:u,...a,children:(0,s.jsx)(`code`,{className:`[counter-increment:line_0] [counter-reset:line]`,children:n.tokens.map((t,n)=>(0,s.jsx)(`span`,{className:c,children:t.map((t,n)=>(0,s.jsx)(`span`,{className:e(`text-[var(--sdm-c,inherit)]`,`dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]`,t.bgColor&&`bg-[var(--sdm-tbg)]`,t.bgColor&&`dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]`),style:{...t.color?{"--sdm-c":t.color}:{},...t.bgColor?{"--sdm-tbg":t.bgColor}:{},...t.htmlStyle},...t.htmlAttrs,children:t.content},n))},n))})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className),d=({className:t,language:n,style:r,...i})=>(0,s.jsx)(`div`,{className:e(`my-4 w-full overflow-hidden rounded-xl border border-border`,t),"data-language":n,"data-streamdown":`code-block`,style:{contentVisibility:`auto`,containIntrinsicSize:`auto 200px`,...r},...i}),f=({language:e,children:t})=>(0,s.jsxs)(`div`,{className:`flex items-center justify-between bg-muted/80 p-3 text-muted-foreground text-xs`,"data-language":e,"data-streamdown":`code-block-header`,children:[(0,s.jsx)(`span`,{className:`ml-1 font-mono lowercase`,children:e}),(0,s.jsx)(`div`,{className:`flex items-center gap-2`,children:t})]}),p=/\n+$/,m=({code:e,language:n,className:i,children:c,...l})=>{let{shikiTheme:m}=(0,o.useContext)(t),h=r(),g=(0,o.useMemo)(()=>e.replace(p,``),[e]),_=(0,o.useMemo)(()=>({bg:`transparent`,fg:`inherit`,tokens:g.split(` +`).map(e=>[{content:e,color:`inherit`,bgColor:`transparent`,htmlStyle:{},offset:0}])}),[g]),[v,y]=(0,o.useState)(_);return(0,o.useEffect)(()=>{if(!h){y(_);return}let e=h.highlight({code:g,language:n,themes:m},e=>{y(e)});if(e){y(e);return}y(_)},[g,n,m,h,_]),(0,s.jsx)(a.Provider,{value:{code:e},children:(0,s.jsxs)(d,{language:n,children:[(0,s.jsx)(f,{language:n,children:c}),(0,s.jsx)(u,{className:i,language:n,result:v,...l})]})})};export{m as CodeBlock}; \ No newline at end of file diff --git a/dist/assets/index-C0oSj8fz.js b/dist/assets/index-C0oSj8fz.js new file mode 100644 index 0000000000000000000000000000000000000000..87647db81387e10e6e0e023af726d7dcfd3a12ad --- /dev/null +++ b/dist/assets/index-C0oSj8fz.js @@ -0,0 +1,415 @@ +var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;li[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),u=(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.")});(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var d=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var ee=Array.isArray;function S(){}var C={H:null,A:null,T:null,S:null},w=Object.prototype.hasOwnProperty;function T(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function te(e,t){return T(e.type,t,e.props)}function ne(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function E(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var D=/\/+/g;function re(e,t){return typeof e==`object`&&e&&e.key!=null?E(``+e.key):t.toString(36)}function ie(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(S,S):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function ae(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,ae(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+re(e,0):a,ee(o)?(i=``,c!=null&&(i=c.replace(D,`$&/`)+`/`),ae(o,r,i,``,function(e){return e})):o!=null&&(ne(o)&&(o=te(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(D,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(ee(e))for(var u=0;u{t.exports=d()})),p=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,ee||(ee=!0,ne());else{var t=n(l);t!==null&&re(x,t.startTime-e)}}var ee=!1,S=-1,C=5,w=-1;function T(){return g?!0:!(e.unstable_now()-wt&&T());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&re(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?ne():ee=!1}}}var ne;if(typeof y==`function`)ne=function(){y(te)};else if(typeof MessageChannel<`u`){var E=new MessageChannel,D=E.port2;E.port1.onmessage=te,ne=function(){D.postMessage(null)}}else ne=function(){_(te,0)};function re(t,n){S=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(S),S=-1):h=!0,re(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,ee||(ee=!0,ne()))),r},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),m=o(((e,t)=>{t.exports=p()})),h=o((e=>{var t=f();function n(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()})),_=o((e=>{var t=m(),n=f(),r=g();function i(e){var t=`https://react.dev/errors/`+e;if(1de||(e.current=ue[de],ue[de]=null,de--)}function me(e,t){de++,ue[de]=e.current,e.current=t}var he=fe(null),ge=fe(null),_e=fe(null),ve=fe(null);function ye(e,t){switch(me(_e,t),me(ge,e),me(he,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?nf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=nf(t),e=rf(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}pe(he),me(he,e)}function k(){pe(he),pe(ge),pe(_e)}function be(e){e.memoizedState!==null&&me(ve,e);var t=he.current,n=rf(t,e.type);t!==n&&(me(ge,e),me(he,n))}function xe(e){ge.current===e&&(pe(he),pe(ge)),ve.current===e&&(pe(ve),pp._currentValue=le)}var Se,Ce;function we(e){if(Se===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Se=t&&t[1]||``,Ce=-1)`:-1i||c[r]!==l[i]){var u=` +`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Te=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?we(n):``}function De(e,t){switch(e.tag){case 26:case 27:case 5:return we(e.type);case 16:return we(`Lazy`);case 13:return e.child!==t&&t!==null?we(`Suspense Fallback`):we(`Suspense`);case 19:return we(`SuspenseList`);case 0:case 15:return Ee(e.type,!1);case 11:return Ee(e.type.render,!1);case 1:return Ee(e.type,!0);case 31:return we(`Activity`);default:return``}}function Oe(e){try{var t=``,n=null;do t+=De(e,n),n=e,e=e.return;while(e);return t}catch(e){return` +Error generating stack: `+e.message+` +`+e.stack}}var ke=Object.prototype.hasOwnProperty,Ae=t.unstable_scheduleCallback,je=t.unstable_cancelCallback,Me=t.unstable_shouldYield,Ne=t.unstable_requestPaint,Pe=t.unstable_now,Fe=t.unstable_getCurrentPriorityLevel,Ie=t.unstable_ImmediatePriority,Le=t.unstable_UserBlockingPriority,Re=t.unstable_NormalPriority,ze=t.unstable_LowPriority,Be=t.unstable_IdlePriority,Ve=t.log,He=t.unstable_setDisableYieldValue,Ue=null,We=null;function Ge(e){if(typeof Ve==`function`&&He(e),We&&typeof We.setStrictMode==`function`)try{We.setStrictMode(Ue,e)}catch{}}var Ke=Math.clz32?Math.clz32:Ye,qe=Math.log,Je=Math.LN2;function Ye(e){return e>>>=0,e===0?32:31-(qe(e)/Je|0)|0}var Xe=256,Ze=262144,Qe=4194304;function $e(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function et(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=$e(n))):i=$e(o):i=$e(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=$e(n))):i=$e(o)):i=$e(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function tt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function nt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function rt(){var e=Qe;return Qe<<=1,!(Qe&62914560)&&(Qe=4194304),e}function it(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function at(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ot(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),vn=!1;if(_n)try{var yn={};Object.defineProperty(yn,`passive`,{get:function(){vn=!0}}),window.addEventListener(`test`,yn,yn),window.removeEventListener(`test`,yn,yn)}catch{vn=!1}var bn=null,xn=null,Sn=null;function Cn(){if(Sn)return Sn;var e,t=xn,n=t.length,r,i=`value`in bn?bn.value:bn.textContent,a=i.length;for(e=0;e=N),P=` `,F=!1;function tr(e,t){switch(e){case`keyup`:return Zn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function nr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var I=!1;function rr(e,t){switch(e){case`compositionend`:return nr(t);case`keypress`:return t.which===32?(F=!0,P):null;case`textInput`:return e=t.data,e===P&&F?null:e;default:return null}}function ir(e,t){if(I)return e===`compositionend`||!Qn&&tr(e,t)?(e=Cn(),Sn=xn=bn=null,I=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Tr(n)}}function Dr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Dr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Or(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Wt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Wt(e.document)}return t}function kr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Ar=_n&&`documentMode`in document&&11>=document.documentMode,jr=null,Mr=null,Nr=null,Pr=!1;function Fr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Pr||jr==null||jr!==Wt(r)||(r=jr,`selectionStart`in r&&kr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Nr&&wr(Nr,r)||(Nr=r,r=Bd(Mr,`onSelect`),0>=o,i-=o,Ei=1<<32-Ke(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Fi&&Oi(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Fi&&Oi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Fi&&Oi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Fi&&Oi(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ne&&ka(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ia(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=pi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=fi(o.type,o.key,o.props,null,e.mode,c),Ia(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=gi(o,e.mode,c),c.return=e,e=c}return s(e);case ne:return o=ka(o),b(e,r,o,c)}if(oe(o))return h(e,r,o,c);if(ie(o)){if(l=ie(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Fa(o),c);if(o.$$typeof===S)return b(e,r,ra(e,o),c);La(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=mi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Pa=0;var i=b(e,t,n,r);return Na=null,i}catch(t){if(t===Ca||t===Ta)throw t;var a=ci(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var za=Ra(!0),Ba=Ra(!1),Va=!1;function Ha(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ua(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Wa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ga(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Kl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=oi(e),ai(e,null,n),t}return ni(e,r,t,n),oi(e)}function Ka(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ct(e,n)}}function qa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ja=!1;function Ya(){if(Ja){var e=ma;if(e!==null)throw e}}function Xa(e,t,n,r){Ja=!1;var i=e.updateQueue;Va=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,m=f!==s.lane;if(m?(Yl&f)===f:(r&f)===f){f!==0&&f===pa&&(Ja=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=p({},d,f);break a;case 2:Va=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),ru|=o,e.lanes=o,e.memoizedState=d}}function Za(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Qa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=se.T,s={};se.T=s,zs(e,!1,t,n);try{var c=i(),l=se.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Rs(e,t,_a(c,r),Tu(e)):Rs(e,t,r,Tu(e))}catch(n){Rs(e,t,{then:function(){},status:`rejected`,reason:n},Tu())}finally{ce.p=a,o!==null&&s.types!==null&&(o.types=s.types),se.T=o}}function Os(){}function ks(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=As(e).queue;Ds(e,a,t,le,n===null?Os:function(){return js(e),n(r)})}function As(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:le,baseState:le,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:le},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function js(e){var t=As(e);t.next===null&&(t=e.alternate.memoizedState),Rs(e,t.next.queue,{},Tu())}function Ms(){return na(pp)}function Ns(){return Fo().memoizedState}function Ps(){return Fo().memoizedState}function Fs(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Tu();e=Wa(n);var r=Ga(t,e,n);r!==null&&(Du(r,t,n),Ka(r,t,n)),t={cache:la()},e.payload=t;return}t=t.return}}function Is(e,t,n){var r=Tu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Bs(e)?Vs(t,n):(n=ri(e,t,n,r),n!==null&&(Du(n,e,r),Hs(n,t,r)))}function Ls(e,t,n){Rs(e,t,n,Tu())}function Rs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Bs(e))Vs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Cr(s,o))return ni(e,t,i,0),ql===null&&ti(),!1}catch{}if(n=ri(e,t,i,r),n!==null)return Du(n,e,r),Hs(n,t,r),!0}return!1}function zs(e,t,n,r){if(r={lane:2,revertLane:wd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Bs(e)){if(t)throw Error(i(479))}else t=ri(e,n,r,2),t!==null&&Du(t,e,2)}function Bs(e){var t=e.alternate;return e===ho||t!==null&&t===ho}function Vs(e,t){yo=vo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Hs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ct(e,n)}}var Us={readContext:na,use:Ro,useCallback:To,useContext:To,useEffect:To,useImperativeHandle:To,useLayoutEffect:To,useInsertionEffect:To,useMemo:To,useReducer:To,useRef:To,useState:To,useDebugValue:To,useDeferredValue:To,useTransition:To,useSyncExternalStore:To,useId:To,useHostTransitionStatus:To,useFormState:To,useActionState:To,useOptimistic:To,useMemoCache:To,useCacheRefresh:To};Us.useEffectEvent=To;var Ws={readContext:na,use:Ro,useCallback:function(e,t){return Po().memoizedState=[e,t===void 0?null:t],e},useContext:na,useEffect:ms,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),fs(4194308,4,bs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return fs(4194308,4,e,t)},useInsertionEffect:function(e,t){fs(4,2,e,t)},useMemo:function(e,t){var n=Po();t=t===void 0?null:t;var r=e();if(bo){Ge(!0);try{e()}finally{Ge(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Po();if(n!==void 0){var i=n(t);if(bo){Ge(!0);try{n(t)}finally{Ge(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Is.bind(null,ho,e),[r.memoizedState,e]},useRef:function(e){var t=Po();return e={current:e},t.memoizedState=e},useState:function(e){e=Xo(e);var t=e.queue,n=Ls.bind(null,ho,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ss,useDeferredValue:function(e,t){return Ts(Po(),e,t)},useTransition:function(){var e=Xo(!1);return e=Ds.bind(null,ho,e.queue,!0,!1),Po().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=ho,a=Po();if(Fi){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),ql===null)throw Error(i(349));Yl&127||Go(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ms(qo.bind(null,r,o,e),[e]),r.flags|=2048,us(9,{destroy:void 0},Ko.bind(null,r,o,n,t),null),n},useId:function(){var e=Po(),t=ql.identifierPrefix;if(Fi){var n=Di,r=Ei;n=(r&~(1<<32-Ke(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=xo++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[mt]=t,o[ht]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Yd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Rc(t)}}return Uc(t),zc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Rc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=_e.current,Hi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ni,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[mt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Kd(e.nodeValue,n)),e||zi(t,!0)}else e=tf(e).createTextNode(r),e[mt]=t,t.stateNode=e}return Uc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Hi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[mt]=t}else Ui(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Uc(t),e=!1}else n=Wi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(uo(t),t):(uo(t),null);if(t.flags&128)throw Error(i(558))}return Uc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Hi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[mt]=t}else Ui(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Uc(t),a=!1}else a=Wi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(uo(t),t):(uo(t),null)}return uo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Vc(t,t.updateQueue),Uc(t),null);case 4:return k(),e===null&&Id(t.stateNode.containerInfo),Uc(t),null;case 10:return Xi(t.type),Uc(t),null;case 19:if(pe(fo),r=t.memoizedState,r===null)return Uc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Hc(r,!1);else{if(nu!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=po(e),o!==null){for(t.flags|=128,Hc(r,!1),e=o.updateQueue,t.updateQueue=e,Vc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)di(n,e),n=n.sibling;return me(fo,fo.current&1|2),Fi&&Oi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Pe()>pu&&(t.flags|=128,a=!0,Hc(r,!1),t.lanes=4194304)}else{if(!a)if(e=po(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Vc(t,e),Hc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Fi)return Uc(t),null}else 2*Pe()-r.renderingStartTime>pu&&n!==536870912&&(t.flags|=128,a=!0,Hc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Uc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Pe(),e.sibling=null,n=fo.current,me(fo,a?n&1|2:n&1),Fi&&Oi(t,r.treeForkCount),e);case 22:case 23:return uo(t),ro(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Uc(t),t.subtreeFlags&6&&(t.flags|=8192)):Uc(t),n=t.updateQueue,n!==null&&Vc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&pe(ya),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Xi(ca),Uc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Gc(e,t){switch(ji(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xi(ca),k(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return xe(t),null;case 31:if(t.memoizedState!==null){if(uo(t),t.alternate===null)throw Error(i(340));Ui()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(uo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Ui()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return pe(fo),null;case 4:return k(),null;case 10:return Xi(t.type),null;case 22:case 23:return uo(t),ro(),e!==null&&pe(ya),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Xi(ca),null;case 25:return null;default:return null}}function Kc(e,t){switch(ji(t),t.tag){case 3:Xi(ca),k();break;case 26:case 27:case 5:xe(t);break;case 4:k();break;case 31:t.memoizedState!==null&&uo(t);break;case 13:uo(t);break;case 19:pe(fo);break;case 10:Xi(t.type);break;case 22:case 23:uo(t),ro(),e!==null&&pe(ya);break;case 24:Xi(ca)}}function qc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){rd(t,t.return,e)}}function Jc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){rd(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){rd(t,t.return,e)}}function Yc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Qa(t,n)}catch(t){rd(e,e.return,t)}}}function Xc(e,t,n){n.props=Zs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){rd(e,t,n)}}function Zc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){rd(e,t,n)}}function Qc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){rd(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){rd(e,t,n)}else n.current=null}function $c(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){rd(e,e.return,t)}}function el(e,t,n){try{var r=e.stateNode;Xd(r,e.type,n,t),r[ht]=t}catch(t){rd(e,e.return,t)}}function tl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&pf(e.type)||e.tag===4}function nl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||tl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&pf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function rl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=cn));else if(r!==4&&(r===27&&pf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(rl(e,t,n),e=e.sibling;e!==null;)rl(e,t,n),e=e.sibling}function il(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&pf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(il(e,t,n),e=e.sibling;e!==null;)il(e,t,n),e=e.sibling}function al(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Yd(t,r,n),t[mt]=e,t[ht]=n}catch(t){rd(e,e.return,t)}}var ol=!1,sl=!1,cl=!1,ll=typeof WeakSet==`function`?WeakSet:Set,ul=null;function dl(e,t){if(e=e.containerInfo,$d=Sp,e=Or(e),kr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(ef={focusedElem:e,selectionRange:n},Sp=!1,ul=t;ul!==null;)if(t=ul,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,ul=e;else for(;ul!==null;){switch(t=ul,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Yd(o,r,n),o[mt]=e,Dt(o),r=o;break a;case`link`:var s=np(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;cg&&(o=g,g=h,h=o);var _=Er(s,h),v=Er(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,se.T=null,n=xu,xu=null;var o=_u,s=yu;if(gu=0,vu=_u=null,yu=0,Kl&6)throw Error(i(331));var c=Kl;if(Kl|=4,Vl(o.current),Nl(o,o.current,s,n),Kl=c,_d(0,!1),We&&typeof We.onPostCommitFiberRoot==`function`)try{We.onPostCommitFiberRoot(Ue,o)}catch{}return!0}finally{ce.p=a,se.T=r,$u(e,t)}}function nd(e,t,n){t=vi(n,t),t=rc(e.stateNode,t,2),e=Ga(e,t,2),e!==null&&(at(e,2),gd(e))}function rd(e,t,n){if(e.tag===3)nd(e,e,n);else for(;t!==null;){if(t.tag===3){nd(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(hu===null||!hu.has(r))){e=vi(n,e),n=ic(2),r=Ga(t,n,2),r!==null&&(ac(n,r,t,e),at(r,2),gd(r));break}}t=t.return}}function id(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Gl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(eu=!0,i.add(n),e=ad.bind(null,e,t,n),t.then(e,e))}function ad(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ql===e&&(Yl&n)===n&&(nu===4||nu===3&&(Yl&62914560)===Yl&&300>Pe()-du?!(Kl&2)&&Pu(e,0):au|=n,su===Yl&&(su=0)),gd(e)}function od(e,t){t===0&&(t=rt()),e=ii(e,t),e!==null&&(at(e,t),gd(e))}function sd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),od(e,n)}function cd(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),od(e,n)}function ld(e,t){return Ae(e,t)}var ud=null,dd=null,fd=!1,pd=!1,md=!1,hd=0;function gd(e){e!==dd&&e.next===null&&(dd===null?ud=dd=e:dd=dd.next=e),pd=!0,fd||(fd=!0,Cd())}function _d(e,t){if(!md&&pd){md=!0;do for(var n=!1,r=ud;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ke(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Sd(r,a))}else a=Yl,a=et(r,r===ql?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||tt(r,a)||(n=!0,Sd(r,a));r=r.next}while(n);md=!1}}function vd(){yd()}function yd(){pd=fd=!1;var e=0;hd!==0&&sf()&&(e=hd);for(var t=Pe(),n=null,r=ud;r!==null;){var i=r.next,a=bd(r,t);a===0?(r.next=null,n===null?ud=i:n.next=i,i===null&&(dd=n)):(n=r,(e!==0||a&3)&&(pd=!0)),r=i}gu!==0&&gu!==5||_d(e,!1),hd!==0&&(hd=0)}function bd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Zd(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function If(e,t,n){var r=Ff;if(r&&typeof t==`string`&&t){var i=Kt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Af.has(i)||(Af.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Yd(t,`link`,e),Dt(t),r.head.appendChild(t)))}}function Lf(e){Mf.D(e),If(`dns-prefetch`,e,null)}function Rf(e,t){Mf.C(e,t),If(`preconnect`,e,t)}function zf(e,t,n){Mf.L(e,t,n);var r=Ff;if(r&&e&&t){var i=`link[rel="preload"][as="`+Kt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Kt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Kt(n.imageSizes)+`"]`)):i+=`[href="`+Kt(e)+`"]`;var a=i;switch(t){case`style`:a=Gf(e);break;case`script`:a=Yf(e)}kf.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),kf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Kf(a))||t===`script`&&r.querySelector(Xf(a))||(t=r.createElement(`link`),Yd(t,`link`,e),Dt(t),r.head.appendChild(t)))}}function Bf(e,t){Mf.m(e,t);var n=Ff;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Kt(r)+`"][href="`+Kt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Yf(e)}if(!kf.has(a)&&(e=p({rel:`modulepreload`,href:e},t),kf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Xf(a)))return}r=n.createElement(`link`),Yd(r,`link`,e),Dt(r),n.head.appendChild(r)}}}function Vf(e,t,n){Mf.S(e,t,n);var r=Ff;if(r&&e){var i=Et(r).hoistableStyles,a=Gf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Kf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=kf.get(a))&&$f(e,n);var c=o=r.createElement(`link`);Dt(c),Yd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Qf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Hf(e,t){Mf.X(e,t);var n=Ff;if(n&&e){var r=Et(n).hoistableScripts,i=Yf(e),a=r.get(i);a||(a=n.querySelector(Xf(i)),a||(e=p({src:e,async:!0},t),(t=kf.get(i))&&ep(e,t),a=n.createElement(`script`),Dt(a),Yd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Uf(e,t){Mf.M(e,t);var n=Ff;if(n&&e){var r=Et(n).hoistableScripts,i=Yf(e),a=r.get(i);a||(a=n.querySelector(Xf(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=kf.get(i))&&ep(e,t),a=n.createElement(`script`),Dt(a),Yd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Wf(e,t,n,r){var a=(a=_e.current)?jf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Gf(n.href),n=Et(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Gf(n.href);var o=Et(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Kf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),kf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},kf.set(e,n),o||Jf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Yf(n),n=Et(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Gf(e){return`href="`+Kt(e)+`"`}function Kf(e){return`link[rel="stylesheet"][`+e+`]`}function qf(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function Jf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Yd(t,`link`,n),Dt(t),e.head.appendChild(t))}function Yf(e){return`[src="`+Kt(e)+`"]`}function Xf(e){return`script[async]`+e}function Zf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Kt(n.href)+`"]`);if(r)return t.instance=r,Dt(r),r;var a=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Dt(r),Yd(r,`style`,a),Qf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Gf(n.href);var o=e.querySelector(Kf(a));if(o)return t.state.loading|=4,t.instance=o,Dt(o),o;r=qf(n),(a=kf.get(a))&&$f(r,a),o=(e.ownerDocument||e).createElement(`link`),Dt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Yd(o,`link`,r),t.state.loading|=4,Qf(o,n.precedence,e),t.instance=o;case`script`:return o=Yf(n.src),(a=e.querySelector(Xf(o)))?(t.instance=a,Dt(a),a):(r=n,(a=kf.get(o))&&(r=p({},n),ep(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Dt(a),Yd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Qf(r,n.precedence,e));return t.instance}function Qf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function ip(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function ap(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function op(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Gf(r.href),a=t.querySelector(Kf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=lp.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Dt(a);return}a=t.ownerDocument||t,r=qf(r),(i=kf.get(i))&&$f(r,i),a=a.createElement(`link`),Dt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Yd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=lp.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var sp=0;function cp(e,t){return e.stylesheets&&e.count===0&&dp(e,e.stylesheets),0sp?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function lp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)dp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var up=null;function dp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,up=new Map,t.forEach(fp,e),up=null,lp.call(e))}function fp(e,t){if(!(t.state.loading&4)){var n=up.get(e);if(n)var r=n.get(null);else{n=new Map,up.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=_()}))(),y=f(),b=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),x=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),ee=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),S=e=>{let t=ee(e);return t.charAt(0).toUpperCase()+t.slice(1)},C={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},w=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},T=(0,y.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,y.createElement)(`svg`,{ref:c,...C,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:b(`lucide`,i),...!a&&!w(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,y.createElement)(e,t)),...Array.isArray(a)?a:[a]])),te=(e,t)=>{let n=(0,y.forwardRef)(({className:n,...r},i)=>(0,y.createElement)(T,{ref:i,iconNode:t,className:b(`lucide-${x(S(e))}`,`lucide-${e}`,n),...r}));return n.displayName=S(e),n},ne=te(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),E=te(`book-open`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]),D=te(`brain`,[[`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`}]]),re=te(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),ie=te(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),ae=te(`clipboard-check`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`m9 14 2 2 4-4`,key:`df797q`}]]),O=te(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),oe=te(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),se=te(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),ce=te(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),le=te(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),ue=te(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),de=te(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),fe=te(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),pe=te(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]),me=0;function he(){return me++}const ge=[{id:`onnx-community/Olmo-Hybrid-Instruct-SFT-7B-ONNX`,label:`Instruct SFT`,thinking:!1},{id:`onnx-community/Olmo-Hybrid-Instruct-DPO-7B-ONNX`,label:`Instruct DPO`,thinking:!1},{id:`onnx-community/Olmo-Hybrid-Think-SFT-7B-ONNX`,label:`Think SFT`,thinking:!0}],_e=(0,y.createContext)(null);var ve=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),ye=o(((e,t)=>{t.exports=ve()})),k=ye(),be=e=>(0,k.jsxs)(`svg`,{...e,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,children:[(0,k.jsx)(`path`,{d:`M2.25 11.535c0-3.407 1.847-6.554 4.844-8.258a9.822 9.822 0 019.687 0c2.997 1.704 4.844 4.851 4.844 8.258 0 5.266-4.337 9.535-9.687 9.535S2.25 16.8 2.25 11.535z`,fill:`#FF9D0B`}),(0,k.jsx)(`path`,{d:`M11.938 20.086c4.797 0 8.687-3.829 8.687-8.551 0-4.722-3.89-8.55-8.687-8.55-4.798 0-8.688 3.828-8.688 8.55 0 4.722 3.89 8.55 8.688 8.55z`,fill:`#FFD21E`}),(0,k.jsx)(`path`,{d:`M11.875 15.113c2.457 0 3.25-2.156 3.25-3.263 0-.576-.393-.394-1.023-.089-.582.283-1.365.675-2.224.675-1.798 0-3.25-1.693-3.25-.586 0 1.107.79 3.263 3.25 3.263h-.003z`,fill:`#FF323D`}),(0,k.jsx)(`path`,{d:`M14.76 9.21c.32.108.445.753.767.585.447-.233.707-.708.659-1.204a1.235 1.235 0 00-.879-1.059 1.262 1.262 0 00-1.33.394c-.322.384-.377.92-.14 1.36.153.283.638-.177.925-.079l-.002.003zm-5.887 0c-.32.108-.448.753-.768.585a1.226 1.226 0 01-.658-1.204c.048-.495.395-.913.878-1.059a1.262 1.262 0 011.33.394c.322.384.377.92.14 1.36-.152.283-.64-.177-.925-.079l.003.003zm1.12 5.34a2.166 2.166 0 011.325-1.106c.07-.02.144.06.219.171l.192.306c.069.1.139.175.209.175.074 0 .15-.074.223-.172l.205-.302c.08-.11.157-.188.234-.165.537.168.986.536 1.25 1.026.932-.724 1.275-1.905 1.275-2.633 0-.508-.306-.426-.81-.19l-.616.296c-.52.24-1.148.48-1.824.48-.676 0-1.302-.24-1.823-.48l-.589-.283c-.52-.248-.838-.342-.838.177 0 .703.32 1.831 1.187 2.56l.18.14z`,fill:`#3A3B45`}),(0,k.jsx)(`path`,{d:`M17.812 10.366a.806.806 0 00.813-.8c0-.441-.364-.8-.813-.8a.806.806 0 00-.812.8c0 .442.364.8.812.8zm-11.624 0a.806.806 0 00.812-.8c0-.441-.364-.8-.812-.8a.806.806 0 00-.813.8c0 .442.364.8.813.8zM4.515 13.073c-.405 0-.765.162-1.017.46a1.455 1.455 0 00-.333.925 1.801 1.801 0 00-.485-.074c-.387 0-.737.146-.985.409a1.41 1.41 0 00-.2 1.722 1.302 1.302 0 00-.447.694c-.06.222-.12.69.2 1.166a1.267 1.267 0 00-.093 1.236c.238.533.81.958 1.89 1.405l.24.096c.768.3 1.473.492 1.478.494.89.243 1.808.375 2.732.394 1.465 0 2.513-.443 3.115-1.314.93-1.342.842-2.575-.274-3.763l-.151-.154c-.692-.684-1.155-1.69-1.25-1.912-.195-.655-.71-1.383-1.562-1.383-.46.007-.889.233-1.15.605-.25-.31-.495-.553-.715-.694a1.87 1.87 0 00-.993-.312zm14.97 0c.405 0 .767.162 1.017.46.216.262.333.588.333.925.158-.047.322-.071.487-.074.388 0 .738.146.985.409a1.41 1.41 0 01.2 1.722c.22.178.377.422.445.694.06.222.12.69-.2 1.166.244.37.279.836.093 1.236-.238.533-.81.958-1.889 1.405l-.239.096c-.77.3-1.475.492-1.48.494-.89.243-1.808.375-2.732.394-1.465 0-2.513-.443-3.115-1.314-.93-1.342-.842-2.575.274-3.763l.151-.154c.695-.684 1.157-1.69 1.252-1.912.195-.655.708-1.383 1.56-1.383.46.007.889.233 1.15.605.25-.31.495-.553.718-.694.244-.162.523-.265.814-.3l.176-.012z`,fill:`#FF9D0B`}),(0,k.jsx)(`path`,{d:`M9.785 20.132c.688-.994.638-1.74-.305-2.667-.945-.928-1.495-2.288-1.495-2.288s-.205-.788-.672-.714c-.468.074-.81 1.25.17 1.971.977.721-.195 1.21-.573.534-.375-.677-1.405-2.416-1.94-2.751-.532-.332-.907-.148-.782.541.125.687 2.357 2.35 2.14 2.707-.218.362-.983-.42-.983-.42S2.953 14.9 2.43 15.46c-.52.558.398 1.026 1.7 1.803 1.308.778 1.41.985 1.225 1.28-.187.295-3.07-2.1-3.34-1.083-.27 1.011 2.943 1.304 2.745 2.006-.2.7-2.265-1.324-2.685-.537-.425.79 2.913 1.718 2.94 1.725 1.075.276 3.813.859 4.77-.522zm4.432 0c-.687-.994-.64-1.74.305-2.667.943-.928 1.493-2.288 1.493-2.288s.205-.788.675-.714c.465.074.807 1.25-.17 1.971-.98.721.195 1.21.57.534.377-.677 1.407-2.416 1.94-2.751.532-.332.91-.148.782.541-.125.687-2.355 2.35-2.137 2.707.215.362.98-.42.98-.42S21.05 14.9 21.57 15.46c.52.558-.395 1.026-1.7 1.803-1.308.778-1.408.985-1.225 1.28.187.295 3.07-2.1 3.34-1.083.27 1.011-2.94 1.304-2.743 2.006.2.7 2.263-1.324 2.685-.537.423.79-2.912 1.718-2.94 1.725-1.077.276-3.815.859-4.77-.522z`,fill:`#FFD21E`})]}),xe=[{Icon:pe,label:`Hybrid Transformer + DeltaNet`},{Icon:E,label:`Fully open 7B parameter model`},{Icon:D,label:`Reasoning and Instruct variants`}];function Se({onStart:e,selectedModel:t,onSelectModel:n,loadedModelId:r}){let[i,a]=(0,y.useState)(!0),[o,s]=(0,y.useState)(!1),c=(0,y.useRef)(null);(0,y.useEffect)(()=>{if(!o)return;let e=e=>{c.current&&!c.current.contains(e.target)&&s(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[o]),(0,y.useEffect)(()=>{let e=setTimeout(()=>a(!1),50);return()=>clearTimeout(e)},[]);let l=r===t.id;return(0,k.jsxs)(`div`,{className:`relative flex h-full min-h-full flex-col overflow-hidden bg-[#0A3235] text-[#FAF2E9]`,children:[(0,k.jsx)(`div`,{className:`absolute pointer-events-none z-[1]`,style:{left:`0`,top:`70%`,width:`800px`,height:`800px`,borderRadius:`50%`,background:`radial-gradient(circle, #0FCB8C22 0%, #10525718 40%, transparent 70%)`,animation:`orb-drift-left 18s ease-in-out infinite`}}),(0,k.jsx)(`div`,{className:`absolute pointer-events-none z-[1]`,style:{right:`0`,top:`75%`,width:`700px`,height:`700px`,borderRadius:`50%`,background:`radial-gradient(circle, #0FCB8C22 0%, #10525718 40%, transparent 70%)`,animation:`orb-drift-right 22s ease-in-out infinite`}}),(0,k.jsx)(`div`,{className:`absolute inset-0 z-0 overflow-hidden pointer-events-none`,children:(0,k.jsx)(`img`,{src:`/purple.avif`,alt:``,className:`absolute left-1/2 bottom-0 -translate-x-1/2 translate-y-1/2 w-[80%] max-w-8xl h-auto select-none`,draggable:!1})}),(0,k.jsx)(`div`,{className:`absolute inset-0 z-50 bg-[#0A3235] transition-opacity duration-1000 pointer-events-none ${i?`opacity-100`:`opacity-0`}`}),(0,k.jsxs)(`div`,{className:`relative z-10 mx-auto flex min-h-full w-full max-w-5xl flex-col items-center justify-center px-6 sm:px-8 lg:px-14`,children:[(0,k.jsx)(`header`,{className:`absolute top-6 left-6 right-6 sm:top-8 sm:left-8 sm:right-8 lg:left-14 lg:right-14 animate-rise-in flex items-start justify-between`,children:(0,k.jsx)(`img`,{src:`/ai2.svg`,alt:`AI2`,className:`h-10 w-auto sm:h-12`,draggable:!1})}),(0,k.jsxs)(`div`,{className:`flex flex-col items-center text-center space-y-8 mb-16`,children:[(0,k.jsxs)(`div`,{className:`animate-rise-in space-y-4 mb-2`,children:[(0,k.jsx)(`p`,{className:`font-support text-xs uppercase tracking-[0.2em] text-[#0FCB8Cb3]`,children:`Fully open hybrid language model by AI2`}),(0,k.jsxs)(`h1`,{className:`text-5xl font-bold leading-[1.0] tracking-tight text-[#FAF2E9] sm:text-7xl lg:text-8xl`,children:[`Olmo `,(0,k.jsx)(`span`,{className:`text-[#0FCB8C]`,children:`WebGPU`})]})]}),(0,k.jsxs)(`p`,{className:`animate-rise-in-delayed max-w-2xl text-base leading-relaxed text-[#FAF2E9b3] sm:text-lg`,children:[`Run`,(0,k.jsx)(`a`,{href:`https://huggingface.co/onnx-community/Olmo-Hybrid-Think-SFT-7B-ONNX`,target:`_blank`,rel:`noreferrer`,className:`mx-1 underline decoration-[#FAF2E94d] underline-offset-4 hover:text-[#0FCB8C] transition-colors`,children:`Olmo Hybrid`}),`directly in your browser, powered by`,(0,k.jsx)(be,{className:`size-7 inline-block ml-1 mb-[1px]`}),(0,k.jsx)(`a`,{href:`https://github.com/huggingface/transformers.js`,target:`_blank`,rel:`noreferrer`,className:`ml-1 underline decoration-[#FAF2E94d] underline-offset-4 hover:text-[#0FCB8C] transition-colors`,children:`Transformers.js`})]}),(0,k.jsx)(`div`,{className:`animate-rise-in-delayed flex flex-wrap justify-center gap-3`,style:{animationDelay:`200ms`},children:xe.map(({Icon:e,label:t})=>(0,k.jsxs)(`div`,{className:`flex items-center gap-2 rounded-full border border-[#FAF2E91a] bg-[#FAF2E90a] px-4 py-2 text-sm text-[#FAF2E9cc]`,children:[(0,k.jsx)(e,{className:`h-3.5 w-3.5 text-[#0FCB8C]`}),t]},t))}),(0,k.jsxs)(`div`,{ref:c,className:`animate-rise-in flex flex-col items-center mt-2 relative`,style:{animationDelay:`300ms`},children:[(0,k.jsxs)(`div`,{className:`inline-flex rounded-xl overflow-hidden`,children:[(0,k.jsxs)(`button`,{onClick:e,className:`inline-flex items-center justify-center gap-2 bg-[#FAF2E9] px-8 py-3.5 text-base font-semibold text-[#0A3235] transition-colors duration-200 hover:bg-[#0FCB8C] cursor-pointer`,children:[l?`Start chatting`:`Load ${t.label}`,(0,k.jsx)(ne,{className:`h-4 w-4`})]}),(0,k.jsx)(`button`,{onClick:()=>s(e=>!e),className:`inline-flex items-center justify-center bg-[#FAF2E9] px-3 py-3.5 text-[#0A3235] border-l border-[#0A323520] transition-colors duration-200 hover:bg-[#0FCB8C] cursor-pointer`,children:(0,k.jsx)(ie,{className:`h-4 w-4`})})]}),o&&(0,k.jsx)(`div`,{className:`absolute top-full mt-2 w-64 rounded-xl border border-[#FAF2E91a] bg-[#0A3235] shadow-xl z-50 overflow-hidden`,children:ge.map(e=>(0,k.jsxs)(`button`,{onClick:()=>{n(e),s(!1)},className:`flex w-full items-center gap-3 px-4 py-3 text-left text-sm text-[#FAF2E9cc] transition-colors hover:bg-[#1052571a] cursor-pointer`,children:[(0,k.jsx)(`span`,{className:`w-4 flex-shrink-0`,children:e.id===t.id&&(0,k.jsx)(re,{className:`h-4 w-4 text-[#0FCB8C]`})}),(0,k.jsxs)(`span`,{className:`flex flex-col`,children:[(0,k.jsx)(`span`,{className:`font-medium text-[#FAF2E9]`,children:e.label}),(0,k.jsx)(`span`,{className:`text-xs text-[#FAF2E980]`,children:e.thinking?`With reasoning`:`No reasoning`})]})]},e.id))}),!l&&(0,k.jsx)(`p`,{className:`mt-3 text-xs text-[#FAF2E980]`,children:`~4.3 GB download, cached locally for future sessions.`})]})]})]})]})}function Ce(){let e=(0,y.useContext)(_e);if(!e)throw Error(`useLLM must be used within `);return e}const we=(function(e){if(e==null)return ke;if(typeof e==`function`)return Oe(e);if(typeof e==`object`)return Array.isArray(e)?Te(e):Ee(e);if(typeof e==`string`)return De(e);throw Error(`Expected function, string, or object as test`)});function Te(e){let t=[],n=-1;for(;++n`:``))+`)`})}return u;function u(){let l=Me,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=Fe(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&de===`*`),c=n.length&&!n.every(e=>e===`*`);if(!e&&(s||c))throw Error(`defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided`);return s=>{Ie(s,We(e,t,n,r,i,a,o))}}function Re(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 ze(e){return typeof e==`string`?e.startsWith(`/`)||e.startsWith(`./`)||e.startsWith(`../`):!1}var Be=new Set([`https:`,`http:`,`irc:`,`ircs:`,`mailto:`,`xmpp:`,`blob:`]),Ve=new Set([`javascript:`,`data:`,`file:`,`vbscript:`]);function He(e,t,n,r=!1,i=!1,a=[]){if(!e)return null;if(typeof e==`string`&&e.startsWith(`#`)&&!i)try{if(new URL(e,`http://example.com`).hash===e)return e}catch{}if(typeof e==`string`&&e.startsWith(`data:`))return i&&r&&e.startsWith(`data:image/`)?e:null;if(typeof e==`string`&&e.startsWith(`blob:`)){try{if(new URL(e).protocol===`blob:`&&e.length>5){let t=e.substring(5);if(t&&t.length>0&&t!==`invalid`)return e}}catch{return null}return null}let o=Re(e,n);if(!o||Ve.has(o.protocol)||!(Be.has(o.protocol)||a.includes(o.protocol)||a.includes(`*`)))return null;if(o.protocol===`mailto:`||!o.protocol.match(/^https?:$/))return o.href;let s=ze(e);return o&&t.some(e=>{let t=Re(e,n);return!t||t.origin!==o.origin?!1:o.href.startsWith(t.href)})?s?o.pathname+o.search+o.hash:o.href:t.includes(`*`)?o.protocol!==`https:`&&o.protocol!==`http:`?null:s?o.pathname+o.search+o.hash:o.href:null}var Ue=Symbol(`node-seen`),We=(e,t,n,r,i,a,o)=>{let s=(c,l,u)=>{if(c.type!==`element`||c[Ue])return!0;if(c.tagName===`a`){let n=He(c.properties.href,t,e,!1,!1,i);return n===null?(c[Ue]=!0,Ie(c,s),u&&typeof l==`number`&&(u.children[l]={type:`element`,tagName:`span`,properties:{title:`Blocked URL: `+String(c.properties.href),class:o},children:[...c.children,{type:`text`,value:` [blocked]`}]}),Ne):(c.properties.href=n,c.properties.target=`_blank`,c.properties.rel=`noopener noreferrer`,!0)}if(c.tagName===`img`){let t=He(c.properties.src,n,e,r,!0,i);return t===null?(c[Ue]=!0,Ie(c,s),u&&typeof l==`number`&&(u.children[l]={type:`element`,tagName:`span`,properties:{class:a},children:[{type:`text`,value:`[Image blocked: `+String(c.properties.alt||`No description`)+`]`}]}),Ne):(c.properties.src=t,!0)}return!0};return s},Ge=typeof self==`object`?self:globalThis,Ke=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new Ge[e](t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new Ge[a](o),i)};return r};const qe=e=>Ke(new Map,e)(0);var Je=``,{toString:Ye}={},{keys:Xe}=Object,Ze=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=Ye.call(e).slice(8,-1);switch(n){case`Array`:return[1,Je];case`Object`:return[2,Je];case`Date`:return[3,Je];case`RegExp`:return[4,Je];case`Map`:return[5,Je];case`Set`:return[6,Je];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},Qe=([e,t])=>e===0&&(t===`function`||t===`symbol`),$e=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=Ze(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of Xe(r))(e||!Qe(Ze(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(Qe(Ze(n))||Qe(Ze(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!Qe(Ze(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a};const et=(e,{json:t,lossy:n}={})=>{let r=[];return $e(!(t||n),!!t,new Map,r)(e),r};var tt=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?qe(et(e,t)):structuredClone(e):(e,t)=>qe(et(e,t)),nt=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};nt.prototype.normal={},nt.prototype.property={},nt.prototype.space=void 0;function rt(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new nt(n,r,t)}function it(e){return e.toLowerCase()}var at=class{constructor(e,t){this.attribute=t,this.property=e}};at.prototype.attribute=``,at.prototype.booleanish=!1,at.prototype.boolean=!1,at.prototype.commaOrSpaceSeparated=!1,at.prototype.commaSeparated=!1,at.prototype.defined=!1,at.prototype.mustUseProperty=!1,at.prototype.number=!1,at.prototype.overloadedBoolean=!1,at.prototype.property=``,at.prototype.spaceSeparated=!1,at.prototype.space=void 0;var ot=s({boolean:()=>ct,booleanish:()=>lt,commaOrSpaceSeparated:()=>pt,commaSeparated:()=>ft,number:()=>A,overloadedBoolean:()=>ut,spaceSeparated:()=>dt}),st=0;const ct=mt(),lt=mt(),ut=mt(),A=mt(),dt=mt(),ft=mt(),pt=mt();function mt(){return 2**++st}var ht=Object.keys(ot),gt=class extends at{constructor(e,t,n,r){let i=-1;if(super(e,t),_t(this,`space`,r),typeof n==`number`)for(;++i4&&n.slice(0,4)===`data`&&At.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(kt,Nt);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!kt.test(e)){let n=e.replace(Ot,Mt);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=gt}return new i(r,t)}function Mt(e){return`-`+e.toLowerCase()}function Nt(e){return e.charAt(1).toUpperCase()}const Pt=rt([yt,St,wt,Tt,Et],`html`),Ft=rt([yt,Ct,wt,Tt,Et],`svg`);function It(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function Lt(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Rt=/[#.]/g;function zt(e,t){let n=e||``,r={},i=0,a,o;for(;i-1&&e<=t.length){let r=0;for(;;){let i=n[r];if(i===void 0){let e=$t(t,n[r-1]);i=e===-1?t.length+1:e+1,n[r]=i}if(i>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}function i(e){if(e&&typeof e.line==`number`&&typeof e.column==`number`&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length1?n[e.line-2]:0)+e.column-1;if(r=55296&&e<=57343}function jn(e){return e>=56320&&e<=57343}function Mn(e,t){return(e-55296)*1024+9216+t}function Nn(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Pn(e){return e>=64976&&e<=65007||On.has(e)}var M;(function(e){e.controlCharacterInInputStream=`control-character-in-input-stream`,e.noncharacterInInputStream=`noncharacter-in-input-stream`,e.surrogateInInputStream=`surrogate-in-input-stream`,e.nonVoidHtmlElementStartTagWithTrailingSolidus=`non-void-html-element-start-tag-with-trailing-solidus`,e.endTagWithAttributes=`end-tag-with-attributes`,e.endTagWithTrailingSolidus=`end-tag-with-trailing-solidus`,e.unexpectedSolidusInTag=`unexpected-solidus-in-tag`,e.unexpectedNullCharacter=`unexpected-null-character`,e.unexpectedQuestionMarkInsteadOfTagName=`unexpected-question-mark-instead-of-tag-name`,e.invalidFirstCharacterOfTagName=`invalid-first-character-of-tag-name`,e.unexpectedEqualsSignBeforeAttributeName=`unexpected-equals-sign-before-attribute-name`,e.missingEndTagName=`missing-end-tag-name`,e.unexpectedCharacterInAttributeName=`unexpected-character-in-attribute-name`,e.unknownNamedCharacterReference=`unknown-named-character-reference`,e.missingSemicolonAfterCharacterReference=`missing-semicolon-after-character-reference`,e.unexpectedCharacterAfterDoctypeSystemIdentifier=`unexpected-character-after-doctype-system-identifier`,e.unexpectedCharacterInUnquotedAttributeValue=`unexpected-character-in-unquoted-attribute-value`,e.eofBeforeTagName=`eof-before-tag-name`,e.eofInTag=`eof-in-tag`,e.missingAttributeValue=`missing-attribute-value`,e.missingWhitespaceBetweenAttributes=`missing-whitespace-between-attributes`,e.missingWhitespaceAfterDoctypePublicKeyword=`missing-whitespace-after-doctype-public-keyword`,e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers=`missing-whitespace-between-doctype-public-and-system-identifiers`,e.missingWhitespaceAfterDoctypeSystemKeyword=`missing-whitespace-after-doctype-system-keyword`,e.missingQuoteBeforeDoctypePublicIdentifier=`missing-quote-before-doctype-public-identifier`,e.missingQuoteBeforeDoctypeSystemIdentifier=`missing-quote-before-doctype-system-identifier`,e.missingDoctypePublicIdentifier=`missing-doctype-public-identifier`,e.missingDoctypeSystemIdentifier=`missing-doctype-system-identifier`,e.abruptDoctypePublicIdentifier=`abrupt-doctype-public-identifier`,e.abruptDoctypeSystemIdentifier=`abrupt-doctype-system-identifier`,e.cdataInHtmlContent=`cdata-in-html-content`,e.incorrectlyOpenedComment=`incorrectly-opened-comment`,e.eofInScriptHtmlCommentLikeText=`eof-in-script-html-comment-like-text`,e.eofInDoctype=`eof-in-doctype`,e.nestedComment=`nested-comment`,e.abruptClosingOfEmptyComment=`abrupt-closing-of-empty-comment`,e.eofInComment=`eof-in-comment`,e.incorrectlyClosedComment=`incorrectly-closed-comment`,e.eofInCdata=`eof-in-cdata`,e.absenceOfDigitsInNumericCharacterReference=`absence-of-digits-in-numeric-character-reference`,e.nullCharacterReference=`null-character-reference`,e.surrogateCharacterReference=`surrogate-character-reference`,e.characterReferenceOutsideUnicodeRange=`character-reference-outside-unicode-range`,e.controlCharacterReference=`control-character-reference`,e.noncharacterCharacterReference=`noncharacter-character-reference`,e.missingWhitespaceBeforeDoctypeName=`missing-whitespace-before-doctype-name`,e.missingDoctypeName=`missing-doctype-name`,e.invalidCharacterSequenceAfterDoctypeName=`invalid-character-sequence-after-doctype-name`,e.duplicateAttribute=`duplicate-attribute`,e.nonConformingDoctype=`non-conforming-doctype`,e.missingDoctype=`missing-doctype`,e.misplacedDoctype=`misplaced-doctype`,e.endTagWithoutMatchingOpenElement=`end-tag-without-matching-open-element`,e.closingOfElementWithOpenChildElements=`closing-of-element-with-open-child-elements`,e.disallowedContentInNoscriptInHead=`disallowed-content-in-noscript-in-head`,e.openElementsLeftAfterEof=`open-elements-left-after-eof`,e.abandonedHeadElementChild=`abandoned-head-element-child`,e.misplacedStartTagForHeadElement=`misplaced-start-tag-for-head-element`,e.nestedNoscriptInHead=`nested-noscript-in-head`,e.eofInElementThatCanContainOnlyText=`eof-in-element-that-can-contain-only-text`})(M||={});var Fn=65536,In=class{constructor(e){this.handler=e,this.html=``,this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=Fn,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:n,col:r,offset:i}=this,a=r+t,o=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let t=this.html.charCodeAt(this.pos+1);if(jn(t))return this.pos++,this._addGap(),Mn(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,j.EOF;return this._err(M.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,j.EOF;let n=this.html.charCodeAt(t);return n===j.CARRIAGE_RETURN?j.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,j.EOF;let e=this.html.charCodeAt(this.pos);return e===j.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,j.LINE_FEED):e===j.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,An(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===j.LINE_FEED||e===j.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){Nn(e)?this._err(M.controlCharacterInInputStream):Pn(e)&&this._err(M.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const zn=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肻\xA0ଷ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)));var Bn=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]]);String.fromCodePoint;function Vn(e){return e>=55296&&e<=57343||e>1114111?65533:Bn.get(e)??e}var Hn;(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`})(Hn||={});var Un=32,Wn;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(Wn||={});function Gn(e){return e>=Hn.ZERO&&e<=Hn.NINE}function Kn(e){return e>=Hn.UPPER_A&&e<=Hn.UPPER_F||e>=Hn.LOWER_A&&e<=Hn.LOWER_F}function qn(e){return e>=Hn.UPPER_A&&e<=Hn.UPPER_Z||e>=Hn.LOWER_A&&e<=Hn.LOWER_Z||Gn(e)}function Jn(e){return e===Hn.EQUALS||qn(e)}var Yn;(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`})(Yn||={});var Xn;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(Xn||={});var Zn=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=Yn.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Xn.Strict}startEntity(e){this.decodeMode=e,this.state=Yn.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case Yn.EntityStart:return e.charCodeAt(t)===Hn.NUM?(this.state=Yn.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=Yn.NamedEntity,this.stateNamedEntity(e,t));case Yn.NumericStart:return this.stateNumericStart(e,t);case Yn.NumericDecimal:return this.stateNumericDecimal(e,t);case Yn.NumericHex:return this.stateNumericHex(e,t);case Yn.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|Un)===Hn.LOWER_X?(this.state=Yn.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=Yn.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*r**+i+Number.parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t>14;for(;t>14,i!==0){if(a===Hn.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==Xn.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&Wn.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)==null||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~Wn.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case Yn.NamedEntity:return this.result!==0&&(this.decodeMode!==Xn.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Yn.NumericDecimal:return this.emitNumericEntity(0,2);case Yn.NumericHex:return this.emitNumericEntity(0,3);case Yn.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Yn.EntityStart:return 0}}};function Qn(e,t,n,r){let i=(t&Wn.BRANCH_LENGTH)>>7,a=t&Wn.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=n,s=o+i-1;for(;o<=s;){let t=o+s>>>1,n=e[t];if(nr)s=t-1;else return e[t+i]}return-1}var N;(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/`})(N||={});var $n;(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`})($n||={});var er;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(er||={});var P;(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`})(P||={});var F;(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`})(F||={});var tr=new Map([[P.A,F.A],[P.ADDRESS,F.ADDRESS],[P.ANNOTATION_XML,F.ANNOTATION_XML],[P.APPLET,F.APPLET],[P.AREA,F.AREA],[P.ARTICLE,F.ARTICLE],[P.ASIDE,F.ASIDE],[P.B,F.B],[P.BASE,F.BASE],[P.BASEFONT,F.BASEFONT],[P.BGSOUND,F.BGSOUND],[P.BIG,F.BIG],[P.BLOCKQUOTE,F.BLOCKQUOTE],[P.BODY,F.BODY],[P.BR,F.BR],[P.BUTTON,F.BUTTON],[P.CAPTION,F.CAPTION],[P.CENTER,F.CENTER],[P.CODE,F.CODE],[P.COL,F.COL],[P.COLGROUP,F.COLGROUP],[P.DD,F.DD],[P.DESC,F.DESC],[P.DETAILS,F.DETAILS],[P.DIALOG,F.DIALOG],[P.DIR,F.DIR],[P.DIV,F.DIV],[P.DL,F.DL],[P.DT,F.DT],[P.EM,F.EM],[P.EMBED,F.EMBED],[P.FIELDSET,F.FIELDSET],[P.FIGCAPTION,F.FIGCAPTION],[P.FIGURE,F.FIGURE],[P.FONT,F.FONT],[P.FOOTER,F.FOOTER],[P.FOREIGN_OBJECT,F.FOREIGN_OBJECT],[P.FORM,F.FORM],[P.FRAME,F.FRAME],[P.FRAMESET,F.FRAMESET],[P.H1,F.H1],[P.H2,F.H2],[P.H3,F.H3],[P.H4,F.H4],[P.H5,F.H5],[P.H6,F.H6],[P.HEAD,F.HEAD],[P.HEADER,F.HEADER],[P.HGROUP,F.HGROUP],[P.HR,F.HR],[P.HTML,F.HTML],[P.I,F.I],[P.IMG,F.IMG],[P.IMAGE,F.IMAGE],[P.INPUT,F.INPUT],[P.IFRAME,F.IFRAME],[P.KEYGEN,F.KEYGEN],[P.LABEL,F.LABEL],[P.LI,F.LI],[P.LINK,F.LINK],[P.LISTING,F.LISTING],[P.MAIN,F.MAIN],[P.MALIGNMARK,F.MALIGNMARK],[P.MARQUEE,F.MARQUEE],[P.MATH,F.MATH],[P.MENU,F.MENU],[P.META,F.META],[P.MGLYPH,F.MGLYPH],[P.MI,F.MI],[P.MO,F.MO],[P.MN,F.MN],[P.MS,F.MS],[P.MTEXT,F.MTEXT],[P.NAV,F.NAV],[P.NOBR,F.NOBR],[P.NOFRAMES,F.NOFRAMES],[P.NOEMBED,F.NOEMBED],[P.NOSCRIPT,F.NOSCRIPT],[P.OBJECT,F.OBJECT],[P.OL,F.OL],[P.OPTGROUP,F.OPTGROUP],[P.OPTION,F.OPTION],[P.P,F.P],[P.PARAM,F.PARAM],[P.PLAINTEXT,F.PLAINTEXT],[P.PRE,F.PRE],[P.RB,F.RB],[P.RP,F.RP],[P.RT,F.RT],[P.RTC,F.RTC],[P.RUBY,F.RUBY],[P.S,F.S],[P.SCRIPT,F.SCRIPT],[P.SEARCH,F.SEARCH],[P.SECTION,F.SECTION],[P.SELECT,F.SELECT],[P.SOURCE,F.SOURCE],[P.SMALL,F.SMALL],[P.SPAN,F.SPAN],[P.STRIKE,F.STRIKE],[P.STRONG,F.STRONG],[P.STYLE,F.STYLE],[P.SUB,F.SUB],[P.SUMMARY,F.SUMMARY],[P.SUP,F.SUP],[P.TABLE,F.TABLE],[P.TBODY,F.TBODY],[P.TEMPLATE,F.TEMPLATE],[P.TEXTAREA,F.TEXTAREA],[P.TFOOT,F.TFOOT],[P.TD,F.TD],[P.TH,F.TH],[P.THEAD,F.THEAD],[P.TITLE,F.TITLE],[P.TR,F.TR],[P.TRACK,F.TRACK],[P.TT,F.TT],[P.U,F.U],[P.UL,F.UL],[P.SVG,F.SVG],[P.VAR,F.VAR],[P.WBR,F.WBR],[P.XMP,F.XMP]]);function nr(e){return tr.get(e)??F.UNKNOWN}var I=F;const rr={[N.HTML]:new Set([I.ADDRESS,I.APPLET,I.AREA,I.ARTICLE,I.ASIDE,I.BASE,I.BASEFONT,I.BGSOUND,I.BLOCKQUOTE,I.BODY,I.BR,I.BUTTON,I.CAPTION,I.CENTER,I.COL,I.COLGROUP,I.DD,I.DETAILS,I.DIR,I.DIV,I.DL,I.DT,I.EMBED,I.FIELDSET,I.FIGCAPTION,I.FIGURE,I.FOOTER,I.FORM,I.FRAME,I.FRAMESET,I.H1,I.H2,I.H3,I.H4,I.H5,I.H6,I.HEAD,I.HEADER,I.HGROUP,I.HR,I.HTML,I.IFRAME,I.IMG,I.INPUT,I.LI,I.LINK,I.LISTING,I.MAIN,I.MARQUEE,I.MENU,I.META,I.NAV,I.NOEMBED,I.NOFRAMES,I.NOSCRIPT,I.OBJECT,I.OL,I.P,I.PARAM,I.PLAINTEXT,I.PRE,I.SCRIPT,I.SECTION,I.SELECT,I.SOURCE,I.STYLE,I.SUMMARY,I.TABLE,I.TBODY,I.TD,I.TEMPLATE,I.TEXTAREA,I.TFOOT,I.TH,I.THEAD,I.TITLE,I.TR,I.TRACK,I.UL,I.WBR,I.XMP]),[N.MATHML]:new Set([I.MI,I.MO,I.MN,I.MS,I.MTEXT,I.ANNOTATION_XML]),[N.SVG]:new Set([I.TITLE,I.FOREIGN_OBJECT,I.DESC]),[N.XLINK]:new Set,[N.XML]:new Set,[N.XMLNS]:new Set},ir=new Set([I.H1,I.H2,I.H3,I.H4,I.H5,I.H6]);new Set([P.STYLE,P.SCRIPT,P.XMP,P.IFRAME,P.NOEMBED,P.NOFRAMES,P.PLAINTEXT]);var L;(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`})(L||={});const ar={DATA:L.DATA,RCDATA:L.RCDATA,RAWTEXT:L.RAWTEXT,SCRIPT_DATA:L.SCRIPT_DATA,PLAINTEXT:L.PLAINTEXT,CDATA_SECTION:L.CDATA_SECTION};function or(e){return e>=j.DIGIT_0&&e<=j.DIGIT_9}function sr(e){return e>=j.LATIN_CAPITAL_A&&e<=j.LATIN_CAPITAL_Z}function cr(e){return e>=j.LATIN_SMALL_A&&e<=j.LATIN_SMALL_Z}function lr(e){return cr(e)||sr(e)}function ur(e){return lr(e)||or(e)}function dr(e){return e+32}function fr(e){return e===j.SPACE||e===j.LINE_FEED||e===j.TABULATION||e===j.FORM_FEED}function pr(e){return fr(e)||e===j.SOLIDUS||e===j.GREATER_THAN_SIGN}function mr(e){return e===j.NULL?M.nullCharacterReference:e>1114111?M.characterReferenceOutsideUnicodeRange:An(e)?M.surrogateCharacterReference:Pn(e)?M.noncharacterCharacterReference:Nn(e)||e===j.CARRIAGE_RETURN?M.controlCharacterReference:null}var hr=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName=``,this.active=!1,this.state=L.DATA,this.returnState=L.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new In(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Zn(zn,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(M.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(M.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=mr(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)==null||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error(`Parser was already resumed`);this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t0&&this._err(M.endTagWithAttributes),e.selfClosing&&this._err(M.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case Ln.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case Ln.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case Ln.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:Ln.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,t)}_emitCodePoint(e){let t=fr(e)?Ln.WHITESPACE_CHARACTER:e===j.NULL?Ln.NULL_CHARACTER:Ln.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(Ln.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=L.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Xn.Attribute:Xn.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===L.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===L.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===L.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case L.DATA:this._stateData(e);break;case L.RCDATA:this._stateRcdata(e);break;case L.RAWTEXT:this._stateRawtext(e);break;case L.SCRIPT_DATA:this._stateScriptData(e);break;case L.PLAINTEXT:this._statePlaintext(e);break;case L.TAG_OPEN:this._stateTagOpen(e);break;case L.END_TAG_OPEN:this._stateEndTagOpen(e);break;case L.TAG_NAME:this._stateTagName(e);break;case L.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case L.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case L.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case L.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case L.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case L.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case L.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case L.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case L.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case L.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case L.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case L.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case L.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case L.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case L.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case L.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case L.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case L.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case L.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case L.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case L.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case L.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case L.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case L.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case L.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case L.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case L.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case L.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case L.BOGUS_COMMENT:this._stateBogusComment(e);break;case L.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case L.COMMENT_START:this._stateCommentStart(e);break;case L.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case L.COMMENT:this._stateComment(e);break;case L.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case L.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case L.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case L.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case L.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case L.COMMENT_END:this._stateCommentEnd(e);break;case L.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case L.DOCTYPE:this._stateDoctype(e);break;case L.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case L.DOCTYPE_NAME:this._stateDoctypeName(e);break;case L.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case L.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case L.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case L.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case L.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case L.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case L.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case L.CDATA_SECTION:this._stateCdataSection(e);break;case L.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case L.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case L.CHARACTER_REFERENCE:this._stateCharacterReference();break;case L.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case j.LESS_THAN_SIGN:this.state=L.TAG_OPEN;break;case j.AMPERSAND:this._startCharacterReference();break;case j.NULL:this._err(M.unexpectedNullCharacter),this._emitCodePoint(e);break;case j.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case j.AMPERSAND:this._startCharacterReference();break;case j.LESS_THAN_SIGN:this.state=L.RCDATA_LESS_THAN_SIGN;break;case j.NULL:this._err(M.unexpectedNullCharacter),this._emitChars(`�`);break;case j.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case j.LESS_THAN_SIGN:this.state=L.RAWTEXT_LESS_THAN_SIGN;break;case j.NULL:this._err(M.unexpectedNullCharacter),this._emitChars(`�`);break;case j.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case j.LESS_THAN_SIGN:this.state=L.SCRIPT_DATA_LESS_THAN_SIGN;break;case j.NULL:this._err(M.unexpectedNullCharacter),this._emitChars(`�`);break;case j.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case j.NULL:this._err(M.unexpectedNullCharacter),this._emitChars(`�`);break;case j.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(lr(e))this._createStartTagToken(),this.state=L.TAG_NAME,this._stateTagName(e);else switch(e){case j.EXCLAMATION_MARK:this.state=L.MARKUP_DECLARATION_OPEN;break;case j.SOLIDUS:this.state=L.END_TAG_OPEN;break;case j.QUESTION_MARK:this._err(M.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=L.BOGUS_COMMENT,this._stateBogusComment(e);break;case j.EOF:this._err(M.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(M.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=L.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(lr(e))this._createEndTagToken(),this.state=L.TAG_NAME,this._stateTagName(e);else switch(e){case j.GREATER_THAN_SIGN:this._err(M.missingEndTagName),this.state=L.DATA;break;case j.EOF:this._err(M.eofBeforeTagName),this._emitChars(``);break;case j.NULL:this._err(M.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case j.EOF:this._err(M.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=L.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===j.SOLIDUS?this.state=L.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:lr(e)?(this._emitChars(`<`),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){lr(e)?(this.state=L.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(``);break;case j.NULL:this._err(M.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case j.EOF:this._err(M.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===j.SOLIDUS?(this.state=L.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(kn.SCRIPT,!1)&&pr(this.preprocessor.peek(kn.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==N.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&--this.tmplCount,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(Tr,N.HTML)}clearBackToTableBodyContext(){this.clearBackTo(wr,N.HTML)}clearBackToTableRowContext(){this.clearBackTo(Cr,N.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===F.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===F.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){let r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case N.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case N.SVG:if(Sr.has(r))return!1;break;case N.MATHML:if(xr.has(r))return!1;break}}return!0}hasInScope(e){return this.hasInDynamicScope(e,vr)}hasInListItemScope(e){return this.hasInDynamicScope(e,yr)}hasInButtonScope(e){return this.hasInDynamicScope(e,br)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case N.HTML:if(ir.has(t))return!0;if(vr.has(t))return!1;break;case N.SVG:if(Sr.has(t))return!1;break;case N.MATHML:if(xr.has(t))return!1;break}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===N.HTML)switch(this.tagIDs[t]){case e:return!0;case F.TABLE:case F.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===N.HTML)switch(this.tagIDs[e]){case F.TBODY:case F.THEAD:case F.TFOOT:return!0;case F.TABLE:case F.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===N.HTML)switch(this.tagIDs[t]){case e:return!0;case F.OPTION:case F.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&gr.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&_r.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&_r.has(this.currentTagId);)this.pop()}},Or=3,kr;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(kr||={});var Ar={type:kr.Marker},jr=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e[e.name,e.value])),i=0;for(let e=0;er.get(e.name)===e.value)&&(i+=1,i>=Or&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(Ar)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:kr.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:kr.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(Ar);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===kr.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===kr.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===kr.Element&&t.element===e)}};const Mr={createDocument(){return{nodeName:`#document`,mode:er.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:`#document-fragment`,childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:`#comment`,data:e,parentNode:null}},createTextNode(e){return{nodeName:`#text`,value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){let r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){let i=e.childNodes.find(e=>e.nodeName===`#documentType`);if(i)i.name=t,i.publicId=n,i.systemId=r;else{let i={nodeName:`#documentType`,name:t,publicId:n,systemId:r,parentNode:null};Mr.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(Mr.isTextNode(n)){n.value+=t;return}}Mr.appendChild(e,Mr.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Mr.isTextNode(r)?r.value+=t:Mr.insertBefore(e,Mr.createTextNode(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(e=>e.name));for(let r=0;re.startsWith(t))}function Hr(e){return e.name===Nr&&e.publicId===null&&(e.systemId===null||e.systemId===Pr)}function Ur(e){if(e.name!==Nr)return er.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===Fr)return er.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Rr.has(n))return er.QUIRKS;let e=t===null?Lr:Ir;if(Vr(n,e))return er.QUIRKS;if(e=t===null?zr:Br,Vr(n,e))return er.LIMITED_QUIRKS}return er.NO_QUIRKS}var Wr={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},Gr=`definitionurl`,Kr=`definitionURL`,qr=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`.split(`.`).map(e=>[e.toLowerCase(),e])),Jr=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:N.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:N.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:N.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:N.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:N.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:N.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:N.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:N.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:N.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:N.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:N.XMLNS}]]);const Yr=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`.split(`.`).map(e=>[e.toLowerCase(),e]));var Xr=new Set([F.B,F.BIG,F.BLOCKQUOTE,F.BODY,F.BR,F.CENTER,F.CODE,F.DD,F.DIV,F.DL,F.DT,F.EM,F.EMBED,F.H1,F.H2,F.H3,F.H4,F.H5,F.H6,F.HEAD,F.HR,F.I,F.IMG,F.LI,F.LISTING,F.MENU,F.META,F.NOBR,F.OL,F.P,F.PRE,F.RUBY,F.S,F.SMALL,F.SPAN,F.STRONG,F.STRIKE,F.SUB,F.SUP,F.TABLE,F.TT,F.U,F.UL,F.VAR]);function Zr(e){let t=e.tagID;return t===F.FONT&&e.attrs.some(({name:e})=>e===$n.COLOR||e===$n.SIZE||e===$n.FACE)||Xr.has(t)}function Qr(e){for(let t=0;t0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)==null||r.call(n,e,this.openElements.current),t){let e,t;this.openElements.stackTop===0&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===N.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,N.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=R.TEXT}switchToPlaintextParsing(){this.insertionMode=R.TEXT,this.originalInsertionMode=R.IN_BODY,this.tokenizer.state=ar.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===P.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==N.HTML))switch(this.fragmentContextID){case F.TITLE:case F.TEXTAREA:this.tokenizer.state=ar.RCDATA;break;case F.STYLE:case F.XMP:case F.IFRAME:case F.NOEMBED:case F.NOFRAMES:case F.NOSCRIPT:this.tokenizer.state=ar.RAWTEXT;break;case F.SCRIPT:this.tokenizer.state=ar.SCRIPT_DATA;break;case F.PLAINTEXT:this.tokenizer.state=ar.PLAINTEXT;break;default:}}_setDocumentType(e){let t=e.name||``,n=e.publicId||``,r=e.systemId||``;if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t??this.document,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,N.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,N.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(P.HTML,N.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,F.HTML)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===Ln.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===F.SVG&&this.treeAdapter.getTagName(t)===P.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===N.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===F.MGLYPH||e.tagID===F.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,N.HTML)}_processToken(e){switch(e.type){case Ln.CHARACTER:this.onCharacter(e);break;case Ln.NULL_CHARACTER:this.onNullCharacter(e);break;case Ln.COMMENT:this.onComment(e);break;case Ln.DOCTYPE:this.onDoctype(e);break;case Ln.START_TAG:this._processStartTag(e);break;case Ln.END_TAG:this.onEndTag(e);break;case Ln.EOF:this.onEof(e);break;case Ln.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e);break}}_isIntegrationPoint(e,t,n){return ii(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===kr.Marker||this.openElements.contains(e.element)),n=t===-1?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=R.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(F.P),this.openElements.popUntilTagNamePopped(F.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case F.TR:this.insertionMode=R.IN_ROW;return;case F.TBODY:case F.THEAD:case F.TFOOT:this.insertionMode=R.IN_TABLE_BODY;return;case F.CAPTION:this.insertionMode=R.IN_CAPTION;return;case F.COLGROUP:this.insertionMode=R.IN_COLUMN_GROUP;return;case F.TABLE:this.insertionMode=R.IN_TABLE;return;case F.BODY:this.insertionMode=R.IN_BODY;return;case F.FRAMESET:this.insertionMode=R.IN_FRAMESET;return;case F.SELECT:this._resetInsertionModeForSelect(e);return;case F.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case F.HTML:this.insertionMode=this.headElement?R.AFTER_HEAD:R.BEFORE_HEAD;return;case F.TD:case F.TH:if(e>0){this.insertionMode=R.IN_CELL;return}break;case F.HEAD:if(e>0){this.insertionMode=R.IN_HEAD;return}break}this.insertionMode=R.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===F.TEMPLATE)break;if(e===F.TABLE){this.insertionMode=R.IN_SELECT_IN_TABLE;return}}this.insertionMode=R.IN_SELECT}_isElementCausesFosterParenting(e){return li.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case F.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===N.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case F.TABLE:{let n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return rr[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Ao(this,e);return}switch(this.insertionMode){case R.INITIAL:wi(this,e);break;case R.BEFORE_HTML:Di(this,e);break;case R.BEFORE_HEAD:Ai(this,e);break;case R.IN_HEAD:Pi(this,e);break;case R.IN_HEAD_NO_SCRIPT:Li(this,e);break;case R.AFTER_HEAD:Bi(this,e);break;case R.IN_BODY:case R.IN_CAPTION:case R.IN_CELL:case R.IN_TEMPLATE:Ui(this,e);break;case R.TEXT:case R.IN_SELECT:case R.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case R.IN_TABLE:case R.IN_TABLE_BODY:case R.IN_ROW:Ra(this,e);break;case R.IN_TABLE_TEXT:Za(this,e);break;case R.IN_COLUMN_GROUP:io(this,e);break;case R.AFTER_BODY:xo(this,e);break;case R.AFTER_AFTER_BODY:Do(this,e);break;default:}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){ko(this,e);return}switch(this.insertionMode){case R.INITIAL:wi(this,e);break;case R.BEFORE_HTML:Di(this,e);break;case R.BEFORE_HEAD:Ai(this,e);break;case R.IN_HEAD:Pi(this,e);break;case R.IN_HEAD_NO_SCRIPT:Li(this,e);break;case R.AFTER_HEAD:Bi(this,e);break;case R.TEXT:this._insertCharacters(e);break;case R.IN_TABLE:case R.IN_TABLE_BODY:case R.IN_ROW:Ra(this,e);break;case R.IN_COLUMN_GROUP:io(this,e);break;case R.AFTER_BODY:xo(this,e);break;case R.AFTER_AFTER_BODY:Do(this,e);break;default:}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){yi(this,e);return}switch(this.insertionMode){case R.INITIAL:case R.BEFORE_HTML:case R.BEFORE_HEAD:case R.IN_HEAD:case R.IN_HEAD_NO_SCRIPT:case R.AFTER_HEAD:case R.IN_BODY:case R.IN_TABLE:case R.IN_CAPTION:case R.IN_COLUMN_GROUP:case R.IN_TABLE_BODY:case R.IN_ROW:case R.IN_CELL:case R.IN_SELECT:case R.IN_SELECT_IN_TABLE:case R.IN_TEMPLATE:case R.IN_FRAMESET:case R.AFTER_FRAMESET:yi(this,e);break;case R.IN_TABLE_TEXT:Qa(this,e);break;case R.AFTER_BODY:bi(this,e);break;case R.AFTER_AFTER_BODY:case R.AFTER_AFTER_FRAMESET:xi(this,e);break;default:}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case R.INITIAL:Ci(this,e);break;case R.BEFORE_HEAD:case R.IN_HEAD:case R.IN_HEAD_NO_SCRIPT:case R.AFTER_HEAD:this._err(e,M.misplacedDoctype);break;case R.IN_TABLE_TEXT:Qa(this,e);break;default:}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,M.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?Mo(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case R.INITIAL:wi(this,e);break;case R.BEFORE_HTML:Ti(this,e);break;case R.BEFORE_HEAD:Oi(this,e);break;case R.IN_HEAD:ji(this,e);break;case R.IN_HEAD_NO_SCRIPT:Fi(this,e);break;case R.AFTER_HEAD:Ri(this,e);break;case R.IN_BODY:Sa(this,e);break;case R.IN_TABLE:qa(this,e);break;case R.IN_TABLE_TEXT:Qa(this,e);break;case R.IN_CAPTION:eo(this,e);break;case R.IN_COLUMN_GROUP:no(this,e);break;case R.IN_TABLE_BODY:ao(this,e);break;case R.IN_ROW:so(this,e);break;case R.IN_CELL:lo(this,e);break;case R.IN_SELECT:fo(this,e);break;case R.IN_SELECT_IN_TABLE:mo(this,e);break;case R.IN_TEMPLATE:go(this,e);break;case R.AFTER_BODY:yo(this,e);break;case R.IN_FRAMESET:So(this,e);break;case R.AFTER_FRAMESET:wo(this,e);break;case R.AFTER_AFTER_BODY:Eo(this,e);break;case R.AFTER_AFTER_FRAMESET:Oo(this,e);break;default:}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?No(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case R.INITIAL:wi(this,e);break;case R.BEFORE_HTML:Ei(this,e);break;case R.BEFORE_HEAD:ki(this,e);break;case R.IN_HEAD:Mi(this,e);break;case R.IN_HEAD_NO_SCRIPT:Ii(this,e);break;case R.AFTER_HEAD:zi(this,e);break;case R.IN_BODY:Pa(this,e);break;case R.TEXT:Ia(this,e);break;case R.IN_TABLE:Ja(this,e);break;case R.IN_TABLE_TEXT:Qa(this,e);break;case R.IN_CAPTION:to(this,e);break;case R.IN_COLUMN_GROUP:ro(this,e);break;case R.IN_TABLE_BODY:oo(this,e);break;case R.IN_ROW:co(this,e);break;case R.IN_CELL:uo(this,e);break;case R.IN_SELECT:po(this,e);break;case R.IN_SELECT_IN_TABLE:ho(this,e);break;case R.IN_TEMPLATE:_o(this,e);break;case R.AFTER_BODY:bo(this,e);break;case R.IN_FRAMESET:Co(this,e);break;case R.AFTER_FRAMESET:To(this,e);break;case R.AFTER_AFTER_BODY:Do(this,e);break;default:}}onEof(e){switch(this.insertionMode){case R.INITIAL:wi(this,e);break;case R.BEFORE_HTML:Di(this,e);break;case R.BEFORE_HEAD:Ai(this,e);break;case R.IN_HEAD:Pi(this,e);break;case R.IN_HEAD_NO_SCRIPT:Li(this,e);break;case R.AFTER_HEAD:Bi(this,e);break;case R.IN_BODY:case R.IN_TABLE:case R.IN_CAPTION:case R.IN_COLUMN_GROUP:case R.IN_TABLE_BODY:case R.IN_ROW:case R.IN_CELL:case R.IN_SELECT:case R.IN_SELECT_IN_TABLE:Fa(this,e);break;case R.TEXT:La(this,e);break;case R.IN_TABLE_TEXT:Qa(this,e);break;case R.IN_TEMPLATE:vo(this,e);break;case R.AFTER_BODY:case R.IN_FRAMESET:case R.AFTER_FRAMESET:case R.AFTER_AFTER_BODY:case R.AFTER_AFTER_FRAMESET:Si(this,e);break;default:}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===j.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case R.IN_HEAD:case R.IN_HEAD_NO_SCRIPT:case R.AFTER_HEAD:case R.TEXT:case R.IN_COLUMN_GROUP:case R.IN_SELECT:case R.IN_SELECT_IN_TABLE:case R.IN_FRAMESET:case R.AFTER_FRAMESET:this._insertCharacters(e);break;case R.IN_BODY:case R.IN_CAPTION:case R.IN_CELL:case R.IN_TEMPLATE:case R.AFTER_BODY:case R.AFTER_AFTER_BODY:case R.AFTER_AFTER_FRAMESET:Hi(this,e);break;case R.IN_TABLE:case R.IN_TABLE_BODY:case R.IN_ROW:Ra(this,e);break;case R.IN_TABLE_TEXT:Xa(this,e);break;default:}}};function fi(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):Na(e,t),n}function pi(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function mi(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);let n=e.activeFormattingElements.getElementEntry(o),s=n&&a>=si;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=hi(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function hi(e,t){let n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function gi(e,t,n){let r=nr(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===F.TEMPLATE&&i===N.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function _i(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function vi(e,t){for(let n=0;n=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function Ci(e,t){e._setDocumentType(t);let n=t.forceQuirks?er.QUIRKS:Ur(t);Hr(t)||e._err(t,M.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=R.BEFORE_HTML}function wi(e,t){e._err(t,M.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,er.QUIRKS),e.insertionMode=R.BEFORE_HTML,e._processToken(t)}function Ti(e,t){t.tagID===F.HTML?(e._insertElement(t,N.HTML),e.insertionMode=R.BEFORE_HEAD):Di(e,t)}function Ei(e,t){let n=t.tagID;(n===F.HTML||n===F.HEAD||n===F.BODY||n===F.BR)&&Di(e,t)}function Di(e,t){e._insertFakeRootElement(),e.insertionMode=R.BEFORE_HEAD,e._processToken(t)}function Oi(e,t){switch(t.tagID){case F.HTML:Sa(e,t);break;case F.HEAD:e._insertElement(t,N.HTML),e.headElement=e.openElements.current,e.insertionMode=R.IN_HEAD;break;default:Ai(e,t)}}function ki(e,t){let n=t.tagID;n===F.HEAD||n===F.BODY||n===F.HTML||n===F.BR?Ai(e,t):e._err(t,M.endTagWithoutMatchingOpenElement)}function Ai(e,t){e._insertFakeElement(P.HEAD,F.HEAD),e.headElement=e.openElements.current,e.insertionMode=R.IN_HEAD,e._processToken(t)}function ji(e,t){switch(t.tagID){case F.HTML:Sa(e,t);break;case F.BASE:case F.BASEFONT:case F.BGSOUND:case F.LINK:case F.META:e._appendElement(t,N.HTML),t.ackSelfClosing=!0;break;case F.TITLE:e._switchToTextParsing(t,ar.RCDATA);break;case F.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,ar.RAWTEXT):(e._insertElement(t,N.HTML),e.insertionMode=R.IN_HEAD_NO_SCRIPT);break;case F.NOFRAMES:case F.STYLE:e._switchToTextParsing(t,ar.RAWTEXT);break;case F.SCRIPT:e._switchToTextParsing(t,ar.SCRIPT_DATA);break;case F.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=R.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(R.IN_TEMPLATE);break;case F.HEAD:e._err(t,M.misplacedStartTagForHeadElement);break;default:Pi(e,t)}}function Mi(e,t){switch(t.tagID){case F.HEAD:e.openElements.pop(),e.insertionMode=R.AFTER_HEAD;break;case F.BODY:case F.BR:case F.HTML:Pi(e,t);break;case F.TEMPLATE:Ni(e,t);break;default:e._err(t,M.endTagWithoutMatchingOpenElement)}}function Ni(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==F.TEMPLATE&&e._err(t,M.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(F.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,M.endTagWithoutMatchingOpenElement)}function Pi(e,t){e.openElements.pop(),e.insertionMode=R.AFTER_HEAD,e._processToken(t)}function Fi(e,t){switch(t.tagID){case F.HTML:Sa(e,t);break;case F.BASEFONT:case F.BGSOUND:case F.HEAD:case F.LINK:case F.META:case F.NOFRAMES:case F.STYLE:ji(e,t);break;case F.NOSCRIPT:e._err(t,M.nestedNoscriptInHead);break;default:Li(e,t)}}function Ii(e,t){switch(t.tagID){case F.NOSCRIPT:e.openElements.pop(),e.insertionMode=R.IN_HEAD;break;case F.BR:Li(e,t);break;default:e._err(t,M.endTagWithoutMatchingOpenElement)}}function Li(e,t){let n=t.type===Ln.EOF?M.openElementsLeftAfterEof:M.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=R.IN_HEAD,e._processToken(t)}function Ri(e,t){switch(t.tagID){case F.HTML:Sa(e,t);break;case F.BODY:e._insertElement(t,N.HTML),e.framesetOk=!1,e.insertionMode=R.IN_BODY;break;case F.FRAMESET:e._insertElement(t,N.HTML),e.insertionMode=R.IN_FRAMESET;break;case F.BASE:case F.BASEFONT:case F.BGSOUND:case F.LINK:case F.META:case F.NOFRAMES:case F.SCRIPT:case F.STYLE:case F.TEMPLATE:case F.TITLE:e._err(t,M.abandonedHeadElementChild),e.openElements.push(e.headElement,F.HEAD),ji(e,t),e.openElements.remove(e.headElement);break;case F.HEAD:e._err(t,M.misplacedStartTagForHeadElement);break;default:Bi(e,t)}}function zi(e,t){switch(t.tagID){case F.BODY:case F.HTML:case F.BR:Bi(e,t);break;case F.TEMPLATE:Ni(e,t);break;default:e._err(t,M.endTagWithoutMatchingOpenElement)}}function Bi(e,t){e._insertFakeElement(P.BODY,F.BODY),e.insertionMode=R.IN_BODY,Vi(e,t)}function Vi(e,t){switch(t.type){case Ln.CHARACTER:Ui(e,t);break;case Ln.WHITESPACE_CHARACTER:Hi(e,t);break;case Ln.COMMENT:yi(e,t);break;case Ln.START_TAG:Sa(e,t);break;case Ln.END_TAG:Pa(e,t);break;case Ln.EOF:Fa(e,t);break;default:}}function Hi(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Ui(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Wi(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Gi(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function Ki(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,N.HTML),e.insertionMode=R.IN_FRAMESET)}function qi(e,t){e.openElements.hasInButtonScope(F.P)&&e._closePElement(),e._insertElement(t,N.HTML)}function Ji(e,t){e.openElements.hasInButtonScope(F.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&ir.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,N.HTML)}function Yi(e,t){e.openElements.hasInButtonScope(F.P)&&e._closePElement(),e._insertElement(t,N.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Xi(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(F.P)&&e._closePElement(),e._insertElement(t,N.HTML),n||(e.formElement=e.openElements.current))}function Zi(e,t){e.framesetOk=!1;let n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let r=e.openElements.tagIDs[t];if(n===F.LI&&r===F.LI||(n===F.DD||n===F.DT)&&(r===F.DD||r===F.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==F.ADDRESS&&r!==F.DIV&&r!==F.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(F.P)&&e._closePElement(),e._insertElement(t,N.HTML)}function Qi(e,t){e.openElements.hasInButtonScope(F.P)&&e._closePElement(),e._insertElement(t,N.HTML),e.tokenizer.state=ar.PLAINTEXT}function $i(e,t){e.openElements.hasInScope(F.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(F.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,N.HTML),e.framesetOk=!1}function ea(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(P.A);n&&(vi(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,N.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ta(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,N.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function na(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(F.NOBR)&&(vi(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,N.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ra(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,N.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function ia(e,t){e.treeAdapter.getDocumentMode(e.document)!==er.QUIRKS&&e.openElements.hasInButtonScope(F.P)&&e._closePElement(),e._insertElement(t,N.HTML),e.framesetOk=!1,e.insertionMode=R.IN_TABLE}function aa(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,N.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function oa(e){let t=Rn(e,$n.TYPE);return t!=null&&t.toLowerCase()===ai}function sa(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,N.HTML),oa(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function ca(e,t){e._appendElement(t,N.HTML),t.ackSelfClosing=!0}function la(e,t){e.openElements.hasInButtonScope(F.P)&&e._closePElement(),e._appendElement(t,N.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function ua(e,t){t.tagName=P.IMG,t.tagID=F.IMG,aa(e,t)}function da(e,t){e._insertElement(t,N.HTML),e.skipNextNewLine=!0,e.tokenizer.state=ar.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=R.TEXT}function fa(e,t){e.openElements.hasInButtonScope(F.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,ar.RAWTEXT)}function pa(e,t){e.framesetOk=!1,e._switchToTextParsing(t,ar.RAWTEXT)}function ma(e,t){e._switchToTextParsing(t,ar.RAWTEXT)}function ha(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,N.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===R.IN_TABLE||e.insertionMode===R.IN_CAPTION||e.insertionMode===R.IN_TABLE_BODY||e.insertionMode===R.IN_ROW||e.insertionMode===R.IN_CELL?R.IN_SELECT_IN_TABLE:R.IN_SELECT}function ga(e,t){e.openElements.currentTagId===F.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,N.HTML)}function _a(e,t){e.openElements.hasInScope(F.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,N.HTML)}function va(e,t){e.openElements.hasInScope(F.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(F.RTC),e._insertElement(t,N.HTML)}function ya(e,t){e._reconstructActiveFormattingElements(),Qr(t),ei(t),t.selfClosing?e._appendElement(t,N.MATHML):e._insertElement(t,N.MATHML),t.ackSelfClosing=!0}function ba(e,t){e._reconstructActiveFormattingElements(),$r(t),ei(t),t.selfClosing?e._appendElement(t,N.SVG):e._insertElement(t,N.SVG),t.ackSelfClosing=!0}function xa(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,N.HTML)}function Sa(e,t){switch(t.tagID){case F.I:case F.S:case F.B:case F.U:case F.EM:case F.TT:case F.BIG:case F.CODE:case F.FONT:case F.SMALL:case F.STRIKE:case F.STRONG:ta(e,t);break;case F.A:ea(e,t);break;case F.H1:case F.H2:case F.H3:case F.H4:case F.H5:case F.H6:Ji(e,t);break;case F.P:case F.DL:case F.OL:case F.UL:case F.DIV:case F.DIR:case F.NAV:case F.MAIN:case F.MENU:case F.ASIDE:case F.CENTER:case F.FIGURE:case F.FOOTER:case F.HEADER:case F.HGROUP:case F.DIALOG:case F.DETAILS:case F.ADDRESS:case F.ARTICLE:case F.SEARCH:case F.SECTION:case F.SUMMARY:case F.FIELDSET:case F.BLOCKQUOTE:case F.FIGCAPTION:qi(e,t);break;case F.LI:case F.DD:case F.DT:Zi(e,t);break;case F.BR:case F.IMG:case F.WBR:case F.AREA:case F.EMBED:case F.KEYGEN:aa(e,t);break;case F.HR:la(e,t);break;case F.RB:case F.RTC:_a(e,t);break;case F.RT:case F.RP:va(e,t);break;case F.PRE:case F.LISTING:Yi(e,t);break;case F.XMP:fa(e,t);break;case F.SVG:ba(e,t);break;case F.HTML:Wi(e,t);break;case F.BASE:case F.LINK:case F.META:case F.STYLE:case F.TITLE:case F.SCRIPT:case F.BGSOUND:case F.BASEFONT:case F.TEMPLATE:ji(e,t);break;case F.BODY:Gi(e,t);break;case F.FORM:Xi(e,t);break;case F.NOBR:na(e,t);break;case F.MATH:ya(e,t);break;case F.TABLE:ia(e,t);break;case F.INPUT:sa(e,t);break;case F.PARAM:case F.TRACK:case F.SOURCE:ca(e,t);break;case F.IMAGE:ua(e,t);break;case F.BUTTON:$i(e,t);break;case F.APPLET:case F.OBJECT:case F.MARQUEE:ra(e,t);break;case F.IFRAME:pa(e,t);break;case F.SELECT:ha(e,t);break;case F.OPTION:case F.OPTGROUP:ga(e,t);break;case F.NOEMBED:case F.NOFRAMES:ma(e,t);break;case F.FRAMESET:Ki(e,t);break;case F.TEXTAREA:da(e,t);break;case F.NOSCRIPT:e.options.scriptingEnabled?ma(e,t):xa(e,t);break;case F.PLAINTEXT:Qi(e,t);break;case F.COL:case F.TH:case F.TD:case F.TR:case F.HEAD:case F.FRAME:case F.TBODY:case F.TFOOT:case F.THEAD:case F.CAPTION:case F.COLGROUP:break;default:xa(e,t)}}function Ca(e,t){if(e.openElements.hasInScope(F.BODY)&&(e.insertionMode=R.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function wa(e,t){e.openElements.hasInScope(F.BODY)&&(e.insertionMode=R.AFTER_BODY,bo(e,t))}function Ta(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function Ea(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(F.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(F.FORM):n&&e.openElements.remove(n))}function Da(e){e.openElements.hasInButtonScope(F.P)||e._insertFakeElement(P.P,F.P),e._closePElement()}function Oa(e){e.openElements.hasInListItemScope(F.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(F.LI),e.openElements.popUntilTagNamePopped(F.LI))}function ka(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function Aa(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function ja(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Ma(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(P.BR,F.BR),e.openElements.pop(),e.framesetOk=!1}function Na(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],a=e.openElements.tagIDs[t];if(r===a&&(r!==F.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,a))break}}function Pa(e,t){switch(t.tagID){case F.A:case F.B:case F.I:case F.S:case F.U:case F.EM:case F.TT:case F.BIG:case F.CODE:case F.FONT:case F.NOBR:case F.SMALL:case F.STRIKE:case F.STRONG:vi(e,t);break;case F.P:Da(e);break;case F.DL:case F.UL:case F.OL:case F.DIR:case F.DIV:case F.NAV:case F.PRE:case F.MAIN:case F.MENU:case F.ASIDE:case F.BUTTON:case F.CENTER:case F.FIGURE:case F.FOOTER:case F.HEADER:case F.HGROUP:case F.DIALOG:case F.ADDRESS:case F.ARTICLE:case F.DETAILS:case F.SEARCH:case F.SECTION:case F.SUMMARY:case F.LISTING:case F.FIELDSET:case F.BLOCKQUOTE:case F.FIGCAPTION:Ta(e,t);break;case F.LI:Oa(e);break;case F.DD:case F.DT:ka(e,t);break;case F.H1:case F.H2:case F.H3:case F.H4:case F.H5:case F.H6:Aa(e);break;case F.BR:Ma(e);break;case F.BODY:Ca(e,t);break;case F.HTML:wa(e,t);break;case F.FORM:Ea(e);break;case F.APPLET:case F.OBJECT:case F.MARQUEE:ja(e,t);break;case F.TEMPLATE:Ni(e,t);break;default:Na(e,t)}}function Fa(e,t){e.tmplInsertionModeStack.length>0?vo(e,t):Si(e,t)}function Ia(e,t){var n;t.tagID===F.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function La(e,t){e._err(t,M.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ra(e,t){if(e.openElements.currentTagId!==void 0&&li.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=R.IN_TABLE_TEXT,t.type){case Ln.CHARACTER:Za(e,t);break;case Ln.WHITESPACE_CHARACTER:Xa(e,t);break}else Ya(e,t)}function za(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,N.HTML),e.insertionMode=R.IN_CAPTION}function Ba(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,N.HTML),e.insertionMode=R.IN_COLUMN_GROUP}function Va(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(P.COLGROUP,F.COLGROUP),e.insertionMode=R.IN_COLUMN_GROUP,no(e,t)}function Ha(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,N.HTML),e.insertionMode=R.IN_TABLE_BODY}function Ua(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(P.TBODY,F.TBODY),e.insertionMode=R.IN_TABLE_BODY,ao(e,t)}function Wa(e,t){e.openElements.hasInTableScope(F.TABLE)&&(e.openElements.popUntilTagNamePopped(F.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Ga(e,t){oa(t)?e._appendElement(t,N.HTML):Ya(e,t),t.ackSelfClosing=!0}function Ka(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,N.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function qa(e,t){switch(t.tagID){case F.TD:case F.TH:case F.TR:Ua(e,t);break;case F.STYLE:case F.SCRIPT:case F.TEMPLATE:ji(e,t);break;case F.COL:Va(e,t);break;case F.FORM:Ka(e,t);break;case F.TABLE:Wa(e,t);break;case F.TBODY:case F.TFOOT:case F.THEAD:Ha(e,t);break;case F.INPUT:Ga(e,t);break;case F.CAPTION:za(e,t);break;case F.COLGROUP:Ba(e,t);break;default:Ya(e,t)}}function Ja(e,t){switch(t.tagID){case F.TABLE:e.openElements.hasInTableScope(F.TABLE)&&(e.openElements.popUntilTagNamePopped(F.TABLE),e._resetInsertionMode());break;case F.TEMPLATE:Ni(e,t);break;case F.BODY:case F.CAPTION:case F.COL:case F.COLGROUP:case F.HTML:case F.TBODY:case F.TD:case F.TFOOT:case F.TH:case F.THEAD:case F.TR:break;default:Ya(e,t)}}function Ya(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Vi(e,t),e.fosterParentingEnabled=n}function Xa(e,t){e.pendingCharacterTokens.push(t)}function Za(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Qa(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n0&&e.openElements.currentTagId===F.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===F.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===F.OPTGROUP&&e.openElements.pop();break;case F.OPTION:e.openElements.currentTagId===F.OPTION&&e.openElements.pop();break;case F.SELECT:e.openElements.hasInSelectScope(F.SELECT)&&(e.openElements.popUntilTagNamePopped(F.SELECT),e._resetInsertionMode());break;case F.TEMPLATE:Ni(e,t);break;default:}}function mo(e,t){let n=t.tagID;n===F.CAPTION||n===F.TABLE||n===F.TBODY||n===F.TFOOT||n===F.THEAD||n===F.TR||n===F.TD||n===F.TH?(e.openElements.popUntilTagNamePopped(F.SELECT),e._resetInsertionMode(),e._processStartTag(t)):fo(e,t)}function ho(e,t){let n=t.tagID;n===F.CAPTION||n===F.TABLE||n===F.TBODY||n===F.TFOOT||n===F.THEAD||n===F.TR||n===F.TD||n===F.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(F.SELECT),e._resetInsertionMode(),e.onEndTag(t)):po(e,t)}function go(e,t){switch(t.tagID){case F.BASE:case F.BASEFONT:case F.BGSOUND:case F.LINK:case F.META:case F.NOFRAMES:case F.SCRIPT:case F.STYLE:case F.TEMPLATE:case F.TITLE:ji(e,t);break;case F.CAPTION:case F.COLGROUP:case F.TBODY:case F.TFOOT:case F.THEAD:e.tmplInsertionModeStack[0]=R.IN_TABLE,e.insertionMode=R.IN_TABLE,qa(e,t);break;case F.COL:e.tmplInsertionModeStack[0]=R.IN_COLUMN_GROUP,e.insertionMode=R.IN_COLUMN_GROUP,no(e,t);break;case F.TR:e.tmplInsertionModeStack[0]=R.IN_TABLE_BODY,e.insertionMode=R.IN_TABLE_BODY,ao(e,t);break;case F.TD:case F.TH:e.tmplInsertionModeStack[0]=R.IN_ROW,e.insertionMode=R.IN_ROW,so(e,t);break;default:e.tmplInsertionModeStack[0]=R.IN_BODY,e.insertionMode=R.IN_BODY,Sa(e,t)}}function _o(e,t){t.tagID===F.TEMPLATE&&Ni(e,t)}function vo(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(F.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Si(e,t)}function yo(e,t){t.tagID===F.HTML?Sa(e,t):xo(e,t)}function bo(e,t){if(t.tagID===F.HTML){if(e.fragmentContext||(e.insertionMode=R.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===F.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!e.treeAdapter.getNodeSourceCodeLocation(n)?.endTag&&e._setEndLocation(n,t)}}else xo(e,t)}function xo(e,t){e.insertionMode=R.IN_BODY,Vi(e,t)}function So(e,t){switch(t.tagID){case F.HTML:Sa(e,t);break;case F.FRAMESET:e._insertElement(t,N.HTML);break;case F.FRAME:e._appendElement(t,N.HTML),t.ackSelfClosing=!0;break;case F.NOFRAMES:ji(e,t);break;default:}}function Co(e,t){t.tagID===F.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==F.FRAMESET&&(e.insertionMode=R.AFTER_FRAMESET))}function wo(e,t){switch(t.tagID){case F.HTML:Sa(e,t);break;case F.NOFRAMES:ji(e,t);break;default:}}function To(e,t){t.tagID===F.HTML&&(e.insertionMode=R.AFTER_AFTER_FRAMESET)}function Eo(e,t){t.tagID===F.HTML?Sa(e,t):Do(e,t)}function Do(e,t){e.insertionMode=R.IN_BODY,Vi(e,t)}function Oo(e,t){switch(t.tagID){case F.HTML:Sa(e,t);break;case F.NOFRAMES:ji(e,t);break;default:}}function ko(e,t){t.chars=`�`,e._insertCharacters(t)}function Ao(e,t){e._insertCharacters(t),e.framesetOk=!1}function jo(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==N.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Mo(e,t){if(Zr(t))jo(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===N.MATHML?Qr(t):r===N.SVG&&(ti(t),$r(t)),ei(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function No(e,t){if(t.tagID===F.P||t.tagID===F.BR){jo(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===N.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}new Set([P.AREA,P.BASE,P.BASEFONT,P.BGSOUND,P.BR,P.COL,P.EMBED,P.FRAME,P.HR,P.IMG,P.INPUT,P.KEYGEN,P.LINK,P.META,P.PARAM,P.SOURCE,P.TRACK,P.WBR]);const Po=Io(`end`),Fo=Io(`start`);function Io(e){return t;function t(t){let n=t&&t.position&&t.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 Lo(e){let t=Fo(e),n=Po(e);if(t&&n)return{start:t,end:n}}var Ro=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,zo=new Set([`mdxFlowExpression`,`mdxJsxFlowElement`,`mdxJsxTextElement`,`mdxTextExpression`,`mdxjsEsm`]),Bo={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Vo(e,t){let n=ts(e),r=pn(`type`,{handlers:{root:Uo,element:Wo,text:Go,comment:Jo,doctype:Ko,raw:Yo},unknown:Xo}),i={parser:n?new di(Bo):di.getFragmentParser(void 0,Bo),handle(e){r(e,i)},stitches:!1,options:t||{}};r(e,i),Zo(i,Fo());let a=rn(n?i.parser.document:i.parser.getFragment(),{file:i.options.file});return i.stitches&&Ie(a,`comment`,function(e,t,n){let r=e;if(r.value.stitch&&n&&t!==void 0){let e=n.children;return e[t]=r.value.stitch,t}}),a.type===`root`&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function Ho(e,t){let n=-1;if(e)for(;++n4&&(t.parser.tokenizer.state=0);let n={type:Ln.CHARACTER,chars:e.value,location:ns(e)};Zo(t,Fo(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Ko(e,t){let n={type:Ln.DOCTYPE,name:`html`,forceQuirks:!1,publicId:``,systemId:``,location:ns(e)};Zo(t,Fo(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function qo(e,t){t.stitches=!0;let n=rs(e);`children`in e&&`children`in n&&(n.children=Vo({type:`root`,children:e.children},t.options).children),Jo({type:`comment`,value:{stitch:n}},t)}function Jo(e,t){let n=e.value,r={type:Ln.COMMENT,data:n,location:ns(e)};Zo(t,Fo(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Yo(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,Qo(t,Fo(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(Ro,`<$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;let e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function Xo(e,t){let n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))qo(n,t);else{let e=``;throw zo.has(n.type)&&(e=". 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"),Error("Cannot compile `"+n.type+"` node"+e)}}function Zo(e,t){Qo(e,t);let n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=ar.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 Qo(e,t){if(t&&t.offset!==void 0){let n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function $o(e,t){let n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===ar.PLAINTEXT)return;Zo(t,Fo(e));let r=t.parser.openElements.current,i=`namespaceURI`in r?r.namespaceURI:en.html;i===en.html&&n===`svg`&&(i=en.svg);let a=_n({...e,children:[]},{space:i===en.svg?`svg`:`html`}),o={type:Ln.START_TAG,tagName:n,tagID:nr(n),selfClosing:!1,ackSelfClosing:!1,attrs:`attrs`in a?a.attrs:[],location:ns(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function es(e,t){let n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Dn.includes(n)||t.parser.tokenizer.state===ar.PLAINTEXT)return;Zo(t,Po(e));let r={type:Ln.END_TAG,tagName:n,tagID:nr(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:ns(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===ar.RCDATA||t.parser.tokenizer.state===ar.RAWTEXT||t.parser.tokenizer.state===ar.SCRIPT_DATA)&&(t.parser.tokenizer.state=ar.DATA)}function ts(e){let t=e.type===`root`?e.children[0]:e;return!!(t&&(t.type===`doctype`||t.type===`element`&&t.tagName.toLowerCase()===`html`))}function ns(e){let t=Fo(e)||{line:void 0,column:void 0,offset:void 0},n=Po(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function rs(e){return`children`in e?tt({...e,children:[]}):tt(e)}function is(e){return function(t,n){return Vo(t,{...e,file:n})}}var as=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`];const os={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...as,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...as],h2:[[`className`,`sr-only`]],img:[...as,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...as,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...as],table:[...as],ul:[...as,[`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`.split(`.`)},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`.split(`.`)};var ss={}.hasOwnProperty;function cs(e,t){let n={type:`root`,children:[]},r=ls({schema:t?{...os,...t}:os,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function ls(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return us(e,n);case`doctype`:return ds(e,n);case`element`:return fs(e,n);case`root`:return ps(e,n);case`text`:return ms(e,n);default:}}}function us(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return xs(r,t),r}}function ds(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return xs(e,t),e}}function fs(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=hs(e,t.children),i=gs(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&ss.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r1){let e=!1,n=0;for(;++n-1&&a>c||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l4&&t.slice(0,4).toLowerCase()===`data`)return n}function Cs(e){return function(t){return cs(t,e)}}function ws(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const Ts=Ls(/[A-Za-z]/),Es=Ls(/[\dA-Za-z]/),Ds=Ls(/[#-'*+\--9=?A-Z^-~]/);function Os(e){return e!==null&&(e<32||e===127)}const ks=Ls(/\d/),As=Ls(/[\dA-Fa-f]/),js=Ls(/[!-/:-@[-`{-~]/);function Ms(e){return e!==null&&e<-2}function Ns(e){return e!==null&&(e<0||e===32)}function Ps(e){return e===-2||e===-1||e===32}const Fs=Ls(/\p{P}|\p{S}/u),Is=Ls(/\s/);function Ls(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Rs(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function zs(e,t,n){let r=we((n||{}).ignore||[]),i=Bs(t),a=-1;for(;++a0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=ws(e,`(`),a=ws(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function ic(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||Is(n)||Fs(n))&&(!t||n!==47)}function ac(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}hc.peek=mc;function oc(){this.buffer()}function sc(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function cc(){this.buffer()}function lc(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function uc(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ac(this.sliceSerialize(e)).toLowerCase(),n.label=t}function dc(e){this.exit(e)}function fc(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ac(this.sliceSerialize(e)).toLowerCase(),n.label=t}function pc(e){this.exit(e)}function mc(){return`[`}function hc(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function gc(){return{enter:{gfmFootnoteCallString:oc,gfmFootnoteCall:sc,gfmFootnoteDefinitionLabelString:cc,gfmFootnoteDefinition:lc},exit:{gfmFootnoteCallString:uc,gfmFootnoteCall:dc,gfmFootnoteDefinitionLabelString:fc,gfmFootnoteDefinition:pc}}}function _c(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:hc},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?` +`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?yc:vc))),s(),o}}function vc(e,t,n){return t===0?e:yc(e,t,n)}function yc(e,t,n){return(n?``:` `)+e}var bc=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];Tc.peek=Ec;function xc(){return{canContainEols:[`delete`],enter:{strikethrough:Cc},exit:{strikethrough:wc}}}function Sc(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:bc}],handlers:{delete:Tc}}}function Cc(e){this.enter({type:`delete`,children:[]},e)}function wc(e){this.exit(e)}function Tc(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function Ec(){return`~`}function Dc(e){return e.length}function Oc(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Dc,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++ul&&(l=e[u].length);++ac[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++dc[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),Mc);return i(),o}function Mc(e,t,n){return`>`+(n?``:` `)+e}function Nc(e,t){return Pc(e,t.inConstruct,!0)&&!Pc(e,t.notInConstruct,!1)}function Pc(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++ro&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function Lc(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 Rc(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function zc(e,t,n,r){let i=Rc(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(Lc(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,Bc);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(Ic(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:` +`,encode:["`"],...s.current()})),t()}return u+=s.move(` +`),a&&(u+=s.move(a+` +`)),u+=s.move(c),l(),u}function Bc(e,t,n){return(n?``:` `)+e}function Vc(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Hc(e,t,n,r){let i=Vc(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:` +`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function Uc(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Wc(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function Gc(e){if(e===null||Ns(e)||Is(e))return 1;if(Fs(e))return 2}function Kc(e,t,n){let r=Gc(e),i=Gc(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}qc.peek=Jc;function qc(e,t,n,r){let i=Uc(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=Kc(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Wc(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=Kc(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Wc(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Jc(e,t,n){return n.options.emphasis||`*`}var Yc={};function Xc(e,t){let n=t||Yc;return Zc(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function Zc(e,t,n){if($c(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return Qc(e.children,t,n)}return Array.isArray(e)?Qc(e,t,n):``}function Qc(e,t,n){let r=[],i=-1;for(;++i`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function al(){return`!`}ol.peek=sl;function ol(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function sl(){return`!`}cl.peek=ll;function cl(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a\u007F]/.test(e.url))}dl.peek=fl;function dl(e,t,n,r){let i=Vc(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(ul(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function fl(e,t,n){return ul(e,n)?`<`:`[`}pl.peek=ml;function pl(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function ml(){return`[`}function hl(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function gl(e){let t=hl(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function _l(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function vl(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function yl(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?_l(n):hl(n),s=e.ordered?o===`.`?`)`:`.`:gl(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),vl(n)===o&&t){let t=-1;for(;++t-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function Sl(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}const Cl=we([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function wl(e,t,n,r){return(e.children.some(function(e){return Cl(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Tl(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}El.peek=Dl;function El(e,t,n,r){let i=Tl(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=Kc(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Wc(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=Kc(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Wc(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Dl(e,t,n){return n.options.strong||`*`}function Ol(e,t,n,r){return n.safe(e.value,r)}function kl(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Al(e,t,n){let r=(vl(n)+(n.options.ruleSpaces?` `:``)).repeat(kl(n));return n.options.ruleSpaces?r.slice(0,-1):r}const jl={blockquote:jc,break:Fc,code:zc,definition:Hc,emphasis:qc,hardBreak:Fc,heading:tl,html:nl,image:il,imageReference:ol,inlineCode:cl,link:dl,linkReference:pl,list:yl,listItem:xl,paragraph:Sl,root:wl,strong:El,text:Ol,thematicBreak:Al};var Ml=document.createElement(`i`);function Nl(e){let t=`&`+e+`;`;Ml.innerHTML=t;let n=Ml.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function Pl(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}var Fl=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Il(e){return e.replace(Fl,Ll)}function Ll(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return Pl(n.slice(t?2:1),t?16:10)}return Nl(n)||e}function Rl(){return{enter:{table:zl,tableData:Ul,tableHeader:Ul,tableRow:Vl},exit:{codeText:Wl,table:Bl,tableData:Hl,tableHeader:Hl,tableRow:Hl}}}function zl(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Bl(e){this.exit(e),this.data.inTable=void 0}function Vl(e){this.enter({type:`tableRow`,children:[]},e)}function Hl(e){this.exit(e)}function Ul(e){this.enter({type:`tableCell`,children:[]},e)}function Wl(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Gl));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Gl(e,t){return t===`|`?t:e}function Kl(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:` +`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(` +`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return Oc(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++ii?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a0?(eu(e,e.length,0,t),e):t}var nu={}.hasOwnProperty;function ru(e){let t={},n=-1;for(;++n0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function Au(e){let t=[],n=-1,r=0,i=0;for(;++n55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function ju(e,t,n){let r=[],i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};Fu(d,-c),Fu(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=tu(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=tu(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=tu(l,ju(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=tu(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=tu(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,eu(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n0&&Ps(t)?Ru(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||Ms(t)?e.check(Yu,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||Ms(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),Ps(t)?Ru(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),Ps(t)?Ru(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||Ms(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function Qu(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}const $u={name:`codeIndented`,tokenize:td};var ed={partial:!0,tokenize:nd};function td(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),Ru(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):Ms(t)?e.attempt(ed,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||Ms(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function nd(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):Ms(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):Ru(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):Ms(e)?i(e):n(e)}}const rd={name:`codeText`,previous:ad,resolve:id,tokenize:od};function id(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return ethis.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&cd(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),cd(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),cd(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function gd(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Os(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||Ms(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||Ns(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):Ms(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||Ms(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Ps(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function vd(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):Ms(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Ru(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||Ms(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function yd(e,t){let n;return r;function r(i){return Ms(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Ps(i)?Ru(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}const bd={name:`definition`,tokenize:Sd};var xd={partial:!0,tokenize:Cd};function Sd(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return _d.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=ac(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return Ns(t)?yd(e,l)(t):l(t)}function l(t){return gd(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(xd,d,d)(t)}function d(t){return Ps(t)?Ru(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||Ms(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Cd(e,t,n){return r;function r(t){return Ns(t)?yd(e,i)(t):n(t)}function i(t){return vd(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Ps(t)?Ru(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||Ms(e)?t(e):n(e)}}const wd={name:`hardBreakEscape`,tokenize:Td};function Td(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return Ms(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}const Ed={name:`headingAtx`,resolve:Dd,tokenize:Od};function Dd(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},eu(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Od(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||Ns(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||Ms(n)?(e.exit(`atxHeading`),t(n)):Ps(n)?Ru(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||Ns(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}const kd=`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`.split(`.`),Ad=[`pre`,`script`,`style`,`textarea`],jd={concrete:!0,name:`htmlFlow`,resolveTo:Pd,tokenize:Fd};var Md={partial:!0,tokenize:Ld},Nd={partial:!0,tokenize:Id};function Pd(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 Fd(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:se):Ts(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):Ts(a)?(e.consume(a),i=4,r.interrupt?t:se):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:se):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:ne:m):n(i)}function h(t){return Ts(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||Ns(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Ad.includes(l)?(i=1,r.interrupt?t(s):ne(s)):kd.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):ne(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||Es(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:ne):n(i)}function v(t){return Ps(t)?(e.consume(t),v):T(t)}function y(t){return t===47?(e.consume(t),T):t===58||t===95||Ts(t)?(e.consume(t),b):Ps(t)?(e.consume(t),y):T(t)}function b(t){return t===45||t===46||t===58||t===95||Es(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),ee):Ps(t)?(e.consume(t),x):y(t)}function ee(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,S):Ps(t)?(e.consume(t),ee):C(t)}function S(t){return t===c?(e.consume(t),c=null,w):t===null||Ms(t)?n(t):(e.consume(t),S)}function C(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||Ns(t)?x(t):(e.consume(t),C)}function w(e){return e===47||e===62||Ps(e)?y(e):n(e)}function T(t){return t===62?(e.consume(t),te):n(t)}function te(t){return t===null||Ms(t)?ne(t):Ps(t)?(e.consume(t),te):n(t)}function ne(t){return t===45&&i===2?(e.consume(t),ie):t===60&&i===1?(e.consume(t),ae):t===62&&i===4?(e.consume(t),ce):t===63&&i===3?(e.consume(t),se):t===93&&i===5?(e.consume(t),oe):Ms(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Md,le,E)(t)):t===null||Ms(t)?(e.exit(`htmlFlowData`),E(t)):(e.consume(t),ne)}function E(t){return e.check(Nd,D,le)(t)}function D(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),re}function re(t){return t===null||Ms(t)?E(t):(e.enter(`htmlFlowData`),ne(t))}function ie(t){return t===45?(e.consume(t),se):ne(t)}function ae(t){return t===47?(e.consume(t),o=``,O):ne(t)}function O(t){if(t===62){let n=o.toLowerCase();return Ad.includes(n)?(e.consume(t),ce):ne(t)}return Ts(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),O):ne(t)}function oe(t){return t===93?(e.consume(t),se):ne(t)}function se(t){return t===62?(e.consume(t),ce):t===45&&i===2?(e.consume(t),se):ne(t)}function ce(t){return t===null||Ms(t)?(e.exit(`htmlFlowData`),le(t)):(e.consume(t),ce)}function le(n){return e.exit(`htmlFlow`),t(n)}}function Id(e,t,n){let r=this;return i;function i(t){return Ms(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Ld(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(zu,t,n)}}const Rd={name:`htmlText`,tokenize:zd};function zd(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):Ts(t)?(e.consume(t),C):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):Ts(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):Ms(t)?(o=d,ae(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?ie(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):Ms(t)?(o=h,ae(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?ie(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?ie(t):Ms(t)?(o=v,ae(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):Ms(t)?(o=y,ae(t)):(e.consume(t),y)}function b(e){return e===62?ie(e):y(e)}function x(t){return Ts(t)?(e.consume(t),ee):n(t)}function ee(t){return t===45||Es(t)?(e.consume(t),ee):S(t)}function S(t){return Ms(t)?(o=S,ae(t)):Ps(t)?(e.consume(t),S):ie(t)}function C(t){return t===45||Es(t)?(e.consume(t),C):t===47||t===62||Ns(t)?w(t):n(t)}function w(t){return t===47?(e.consume(t),ie):t===58||t===95||Ts(t)?(e.consume(t),T):Ms(t)?(o=w,ae(t)):Ps(t)?(e.consume(t),w):ie(t)}function T(t){return t===45||t===46||t===58||t===95||Es(t)?(e.consume(t),T):te(t)}function te(t){return t===61?(e.consume(t),ne):Ms(t)?(o=te,ae(t)):Ps(t)?(e.consume(t),te):w(t)}function ne(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,E):Ms(t)?(o=ne,ae(t)):Ps(t)?(e.consume(t),ne):(e.consume(t),D)}function E(t){return t===i?(e.consume(t),i=void 0,re):t===null?n(t):Ms(t)?(o=E,ae(t)):(e.consume(t),E)}function D(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||Ns(t)?w(t):(e.consume(t),D)}function re(e){return e===47||e===62||Ns(e)?w(e):n(e)}function ie(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function ae(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),O}function O(t){return Ps(t)?Ru(e,oe,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):oe(t)}function oe(t){return e.enter(`htmlTextData`),o(t)}}const Bd={name:`labelEnd`,resolveAll:Wd,resolveTo:Gd,tokenize:Kd};var Vd={tokenize:qd},Hd={tokenize:Jd},Ud={tokenize:Yd};function Wd(e){let t=-1,n=[];for(;++t=3&&(a===null||Ms(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Ps(t)?Ru(e,s,`whitespace`)(t):s(t))}}const af={continuation:{tokenize:lf},exit:df,name:`list`,tokenize:cf};var of={partial:!0,tokenize:ff},sf={partial:!0,tokenize:uf};function cf(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:ks(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(nf,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return ks(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(zu,r.interrupt?n:u,e.attempt(of,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Ps(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function lf(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(zu,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ru(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Ps(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(sf,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ru(e,e.attempt(af,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function uf(e,t,n){let r=this;return Ru(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function df(e){e.exit(this.containerState.type)}function ff(e,t,n){let r=this;return Ru(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!Ps(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}const pf={name:`setextUnderline`,resolveTo:mf,tokenize:hf};function mf(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function hf(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),Ps(t)?Ru(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||Ms(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var gf={tokenize:wf,partial:!0};function _f(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:xf,continuation:{tokenize:Sf},exit:Cf}},text:{91:{name:`gfmFootnoteCall`,tokenize:bf},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:vf,resolveTo:yf}}}}function vf(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=ac(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function yf(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function bf(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||Ns(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(ac(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return Ns(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function xf(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||Ns(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=ac(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return Ns(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),Ru(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Sf(e,t,n){return e.check(zu,t,e.attempt(gf,t,n))}function Cf(e){e.exit(`gfmFootnoteDefinition`)}function wf(e,t,n){let r=this;return Ru(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Tf(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Gc(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Ef=class{constructor(){this.map=[]}add(e,t,n){Df(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function Df(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?ee:c;return a===ee&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):Ms(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):Ps(t)?Ru(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||Ns(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,Ps(t)?Ru(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return Ps(t)?Ru(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||Ms(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return Ps(t)?Ru(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||Ms(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function ee(t){return e.enter(`tableRow`),S(t)}function S(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),S):n===null||Ms(n)?(e.exit(`tableRow`),t(n)):Ps(n)?Ru(e,S,`whitespace`)(n):(e.enter(`data`),C(n))}function C(t){return t===null||t===124||Ns(t)?(e.exit(`data`),S(t)):(e.consume(t),t===92?w:C)}function w(t){return t===92||t===124?(e.consume(t),C):C(t)}}function jf(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Ef;for(;++nn[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},Pf(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Nf(e,t,n,r,i){let a=[],o=Pf(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function Pf(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Ff={name:`tasklistCheck`,tokenize:Lf};function If(){return{text:{91:Ff}}}function Lf(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return Ns(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return Ms(r)?t(r):Ps(r)?e.check({tokenize:Rf},t,n)(r):n(r)}}function Rf(e,t,n){return Ru(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function zf(e){return ru([hu(),_f(),Tf(e),kf(),If()])}var Bf={};function Vf(e){let t=this,n=e||Bf,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(zf(n)),a.push(Ql()),o.push($l(n))}var Hf=Object.defineProperty,Uf=Object.defineProperties,Wf=Object.getOwnPropertyDescriptors,Gf=Object.getOwnPropertySymbols,Kf=Object.prototype.hasOwnProperty,qf=Object.prototype.propertyIsEnumerable,Jf=(e,t,n)=>t in e?Hf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Yf=(e,t)=>{for(var n in t||={})Kf.call(t,n)&&Jf(e,n,t[n]);if(Gf)for(var n of Gf(t))qf.call(t,n)&&Jf(e,n,t[n]);return e},Xf=(e,t)=>Uf(e,Wf(t)),Zf=/(\*\*)([^*]*\*?)$/,Qf=/(__)([^_]*?)$/,$f=/(\*\*\*)([^*]*?)$/,ep=/(\*)([^*]*?)$/,tp=/(_)([^_]*?)$/,np=/(`)([^`]*?)$/,rp=/(~~)([^~]*?)$/,ip=/^[\s_~*`]*$/,ap=/^[\s]*[-*+][\s]+$/,op=/[\p{L}\p{N}_]/u,sp=/^```[^`\n]*```?$/,cp=/^\*{4,}$/,lp=/(__)([^_]+)_$/,up=/(~~)([^~]+)~$/,dp=/__/g,fp=/~~/g,pp=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:op.test(e)},mp=(e,t)=>{let n=!1;for(let r=0;r{let n=1;for(let r=t-1;r>=0;--r)if(e[r]===`]`)n+=1;else if(e[r]===`[`&&(--n,n===0))return r;return-1},gp=(e,t)=>{let n=1;for(let r=t+1;r{let n=!1,r=!1;for(let i=0;i{for(let n=t;n{for(let n=t-1;n>=0;--n){if(e[n]===`)`)return!1;if(e[n]===`(`)return n>0&&e[n-1]===`]`?vp(e,t):!1;if(e[n]===` +`)return!1}return!1},bp=(e,t,n)=>{let r=0;for(let n=t-1;n>=0;--n)if(e[n]===` +`){r=n+1;break}let i=e.length;for(let n=t;n=3&&!s},xp=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,Sp=e=>!e||typeof e!=`string`||!e.includes(`>`)?e:e.replace(xp,(t,n,r,i)=>mp(e,i)?t:`${n}\\>${r}`),Cp=(e,t,n)=>{if(n!==` `&&n!==` `)return!1;let r=0;for(let n=t-1;n>=0;--n)if(e[n]===` +`){r=n+1;break}for(let n=r;nn===`\\`||e.includes(`$`)&&_p(e,t)?!0:n!==`*`&&r===`*`?(t{let t=0,n=e.length;for(let r=0;r0?e[r-1]:``,a=r!!(n===`\\`||e.includes(`$`)&&_p(e,t)||yp(e,t)||n===`_`||r===`_`||n&&r&&pp(n)&&pp(r)),Dp=e=>{let t=0,n=e.length;for(let r=0;r0?e[r-1]:``,a=r{let t=0,n=0;for(let r=0;r=3&&(t+=Math.floor(n/3)),n=0);return n>=3&&(t+=Math.floor(n/3)),t},kp=(e,t,n)=>{if(!t||ip.test(t))return!0;let r=e.substring(0,n).lastIndexOf(` +`),i=r===-1?0:r+1,a=e.substring(i,n);return ap.test(a)&&t.includes(` +`)?!0:bp(e,n,`*`)},Ap=e=>{let t=e.match(Zf);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return mp(e,r)||kp(e,n,r)?e:(e.match(/\*\*/g)||[]).length%2==1?n.endsWith(`*`)?`${e}*`:`${e}**`:e},jp=(e,t,n)=>{if(!t||ip.test(t))return!0;let r=e.substring(0,n).lastIndexOf(` +`),i=r===-1?0:r+1,a=e.substring(i,n);return ap.test(a)&&t.includes(` +`)?!0:bp(e,n,`_`)},Mp=e=>{let t=e.match(Qf);if(!t){let t=e.match(lp);return t&&!mp(e,e.lastIndexOf(t[1]))&&(e.match(dp)||[]).length%2==1?`${e}_`:e}let n=t[2],r=e.lastIndexOf(t[1]);return mp(e,r)||jp(e,n,r)?e:(e.match(/__/g)||[]).length%2==1?`${e}__`:e},Np=e=>{for(let t=0;t0?e[t-1]:``,r=t{if(!e.match(ep))return e;let t=Np(e);if(t===-1||mp(e,t))return e;let n=e.substring(t+1);return!n||ip.test(n)?e:Tp(e)%2==1?`${e}*`:e},Fp=e=>{for(let t=0;t0?e[t-1]:``,r=t{let t=e.length;for(;t>0&&e[t-1]===` +`;)--t;return t{if(!e.endsWith(`**`))return null;let t=e.slice(0,-2);if((t.match(/\*\*/g)||[]).length%2!=1)return null;let n=t.indexOf(`**`),r=Fp(t);return n!==-1&&r!==-1&&n{if(!e.match(tp))return e;let t=Fp(e);if(t===-1||mp(e,t))return e;let n=e.substring(t+1);if(!n||ip.test(n))return e;if(Dp(e)%2==1){let t=Lp(e);return t===null?Ip(e):t}return e},zp=e=>{let t=(e.match(/\*\*/g)||[]).length,n=Tp(e);return t%2==0&&n%2==0},Bp=(e,t,n)=>!t||ip.test(t)||mp(e,n)?!0:bp(e,n,`*`),Vp=e=>{if(cp.test(e))return e;let t=e.match($f);if(!t)return e;let n=t[2];return Bp(e,n,e.lastIndexOf(t[1]))?e:Op(e)%2==1?zp(e)?e:`${e}***`:e},Hp=(e,t)=>{let n=!1,r=!1;for(let i=0;i{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",i=t>1&&e.substring(t-2,t+1)==="```";return n||r||i},Wp=e=>{let t=0;for(let n=0;n]*$/,Kp=e=>{let t=e.match(Gp);return!t||t.index===void 0||Hp(e,t.index)?e:e.substring(0,t.index).trimEnd()},qp=e=>!e.match(sp)||e.includes(` +`)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,Jp=e=>(e.match(/```/g)||[]).length%2==1,Yp=e=>{let t=qp(e);if(t!==null)return t;let n=e.match(np);if(n&&!Jp(e)){let t=n[2];if(!t||ip.test(t))return e;if(Wp(e)%2==1)return`${e}\``}return e},Xp=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",Zp=e=>{let t=0,n=!1;for(let r=0;r{let t=e.indexOf(`$$`);return t!==-1&&e.indexOf(` +`,t)!==-1&&!e.endsWith(` +`)?`${e} +$$`:`${e}$$`},$p=e=>Zp(e)%2==0?e:Qp(e),em=(e,t,n)=>{if(e.substring(t+2).includes(`)`))return null;let r=hp(e,t);if(r===-1||Hp(e,r))return null;let i=r>0&&e[r-1]===`!`,a=i?r-1:r,o=e.substring(0,a);if(i)return o;let s=e.substring(r+1,t);return n===`text-only`?`${o}${s}`:`${o}[${s}](streamdown:incomplete-link)`},tm=(e,t)=>{for(let n=0;n<=t;n++)if(e[n]===`[`&&!Hp(e,n)){if(n>0&&e[n-1]===`!`)continue;let t=gp(e,n);if(t===-1)return n;if(t+1{let r=t>0&&e[t-1]===`!`,i=r?t-1:t,a=e.substring(t+1);if(!a.includes(`]`)){let o=e.substring(0,i);if(r)return o;if(n===`text-only`){let n=tm(e,t);return n===-1?`${o}${a}`:e.substring(0,n)+e.substring(n+1)}return`${e}](streamdown:incomplete-link)`}if(gp(e,t)===-1){let a=e.substring(0,i);if(r)return a;if(n===`text-only`){let n=tm(e,t);return n===-1?`${a}${e.substring(t+1)}`:e.substring(0,n)+e.substring(n+1)}return`${e}](streamdown:incomplete-link)`}return null},rm=(e,t=`protocol`)=>{let n=e.lastIndexOf(`](`);if(n!==-1&&!Hp(e,n)){let r=em(e,n,t);if(r!==null)return r}for(let n=e.length-1;n>=0;--n)if(e[n]===`[`&&!Hp(e,n)){let r=nm(e,n,t);if(r!==null)return r}return e},im=/^-{1,2}$/,am=/^[\s]*-{1,2}[\s]+$/,om=/^={1,2}$/,sm=/^[\s]*={1,2}[\s]+$/,cm=e=>{if(!e||typeof e!=`string`)return e;let t=e.lastIndexOf(` +`);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(im.test(i)&&!n.match(am)){let t=r.split(` +`).at(-1);if(t&&t.trim().length>0)return`${e}\u200B`}if(om.test(i)&&!n.match(sm)){let t=r.split(` +`).at(-1);if(t&&t.trim().length>0)return`${e}\u200B`}return e},lm=e=>{let t=e.match(rp);if(t){let n=t[2];if(!n||ip.test(n))return e;if((e.match(fp)||[]).length%2==1)return`${e}~~`}else if(e.match(up)&&(e.match(fp)||[]).length%2==1)return`${e}~`;return e},um=e=>e!==!1,dm={COMPARISON_OPERATORS:-10,HTML_TAGS:-5,SETEXT_HEADINGS:0,LINKS:10,BOLD_ITALIC:20,BOLD:30,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,DEFAULT:100},fm=[{handler:{name:`comparisonOperators`,handle:Sp,priority:dm.COMPARISON_OPERATORS},optionKey:`comparisonOperators`},{handler:{name:`htmlTags`,handle:Kp,priority:dm.HTML_TAGS},optionKey:`htmlTags`},{handler:{name:`setextHeadings`,handle:cm,priority:dm.SETEXT_HEADINGS},optionKey:`setextHeadings`},{handler:{name:`links`,handle:rm,priority:dm.LINKS},optionKey:`links`,earlyReturn:e=>e.endsWith(`](streamdown:incomplete-link)`)},{handler:{name:`boldItalic`,handle:Vp,priority:dm.BOLD_ITALIC},optionKey:`boldItalic`},{handler:{name:`bold`,handle:Ap,priority:dm.BOLD},optionKey:`bold`},{handler:{name:`italicDoubleUnderscore`,handle:Mp,priority:dm.ITALIC_DOUBLE_UNDERSCORE},optionKey:`italic`},{handler:{name:`italicSingleAsterisk`,handle:Pp,priority:dm.ITALIC_SINGLE_ASTERISK},optionKey:`italic`},{handler:{name:`italicSingleUnderscore`,handle:Rp,priority:dm.ITALIC_SINGLE_UNDERSCORE},optionKey:`italic`},{handler:{name:`inlineCode`,handle:Yp,priority:dm.INLINE_CODE},optionKey:`inlineCode`},{handler:{name:`strikethrough`,handle:lm,priority:dm.STRIKETHROUGH},optionKey:`strikethrough`},{handler:{name:`katex`,handle:$p,priority:dm.KATEX},optionKey:`katex`}],pm=e=>{let t=e?.linkMode??`protocol`;return fm.filter(({handler:t,optionKey:n})=>t.name===`links`?um(e?.links)||um(e?.images):um(e?.[n])).map(({handler:e,earlyReturn:n})=>e.name===`links`?{handler:Xf(Yf({},e),{handle:e=>rm(e,t)}),earlyReturn:t===`protocol`?n:void 0}:{handler:e,earlyReturn:n})},mm=(e,t)=>{if(!e||typeof e!=`string`)return e;let n=e.endsWith(` `)&&!e.endsWith(` `)?e.slice(0,-1):e,r=pm(t),i=(t?.handlers??[]).map(e=>({handler:Xf(Yf({},e),{priority:e.priority??dm.DEFAULT}),earlyReturn:void 0})),a=[...r,...i].sort((e,t)=>(e.handler.priority??dm.DEFAULT)-(t.handler.priority??dm.DEFAULT));for(let{handler:e,earlyReturn:t}of a)if(n=e.handle(n),t!=null&&t(n))return n;return n};function hm(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t{let n=Array(e.length+t.length);for(let t=0;t({classGroupId:e,validator:t}),ym=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),bm=`-`,xm=[],Sm=`arbitrary..`,Cm=e=>{let t=Em(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Tm(e);let n=e.split(bm);return wm(n,n[0]===``&&n.length>1?1:0,t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?_m(i,t):t:i||xm}return n[e]||xm}}},wm=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=wm(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(bm):e.slice(t).join(bm),s=a.length;for(let e=0;ee.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Sm+r:void 0})(),Em=e=>{let{theme:t,classGroups:n}=e;return Dm(n,t)},Dm=(e,t)=>{let n=ym();for(let r in e){let i=e[r];Om(i,n,r,t)}return n},Om=(e,t,n,r)=>{let i=e.length;for(let a=0;a{if(typeof e==`string`){Am(e,t,n);return}if(typeof e==`function`){jm(e,t,n,r);return}Mm(e,t,n,r)},Am=(e,t,n)=>{let r=e===``?t:Nm(t,e);r.classGroupId=n},jm=(e,t,n,r)=>{if(Pm(e)){Om(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(vm(n,e))},Mm=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e{let n=e,r=t.split(bm),i=r.length;for(let e=0;e`isThemeGetter`in e&&e.isThemeGetter===!0,Fm=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},Im=`!`,Lm=`:`,Rm=[],zm=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Bm=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;si?a-i:void 0;return zm(t,l,c,u)};if(t){let e=t+Lm,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):zm(Rm,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Vm=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Hm=e=>({cache:Fm(e.cacheSize),parseClassName:Bm(e),sortModifiers:Vm(e),...Cm(e)}),Um=/\s+/,Wm=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(Um),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+Im:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e0?` `+c:c)}return c},Gm=(...e)=>{let t=0,n,r,i=``;for(;t{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r{let n,r,i,a,o=o=>(n=Hm(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Wm(e,n);return i(e,a),a};return a=o,(...e)=>a(Gm(...e))},Jm=[],Ym=e=>{let t=t=>t[e]||Jm;return t.isThemeGetter=!0,t},Xm=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Zm=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Qm=/^\d+\/\d+$/,$m=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,eh=/\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$/,th=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,nh=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,rh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ih=e=>Qm.test(e),ah=e=>!!e&&!Number.isNaN(Number(e)),oh=e=>!!e&&Number.isInteger(Number(e)),sh=e=>e.endsWith(`%`)&&ah(e.slice(0,-1)),ch=e=>$m.test(e),lh=()=>!0,uh=e=>eh.test(e)&&!th.test(e),dh=()=>!1,fh=e=>nh.test(e),ph=e=>rh.test(e),mh=e=>!gh(e)&&!Sh(e),hh=e=>kh(e,Nh,dh),gh=e=>Xm.test(e),_h=e=>kh(e,Ph,uh),vh=e=>kh(e,Fh,ah),yh=e=>kh(e,jh,dh),bh=e=>kh(e,Mh,ph),xh=e=>kh(e,Lh,fh),Sh=e=>Zm.test(e),Ch=e=>Ah(e,Ph),wh=e=>Ah(e,Ih),Th=e=>Ah(e,jh),Eh=e=>Ah(e,Nh),Dh=e=>Ah(e,Mh),Oh=e=>Ah(e,Lh,!0),kh=(e,t,n)=>{let r=Xm.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Ah=(e,t,n=!1)=>{let r=Zm.exec(e);return r?r[1]?t(r[1]):n:!1},jh=e=>e===`position`||e===`percentage`,Mh=e=>e===`image`||e===`url`,Nh=e=>e===`length`||e===`size`||e===`bg-size`,Ph=e=>e===`length`,Fh=e=>e===`number`,Ih=e=>e===`family-name`,Lh=e=>e===`shadow`,Rh=qm(()=>{let e=Ym(`color`),t=Ym(`font`),n=Ym(`text`),r=Ym(`font-weight`),i=Ym(`tracking`),a=Ym(`leading`),o=Ym(`breakpoint`),s=Ym(`container`),c=Ym(`spacing`),l=Ym(`radius`),u=Ym(`shadow`),d=Ym(`inset-shadow`),f=Ym(`text-shadow`),p=Ym(`drop-shadow`),m=Ym(`blur`),h=Ym(`perspective`),g=Ym(`aspect`),_=Ym(`ease`),v=Ym(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Sh,gh],ee=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],S=()=>[`auto`,`contain`,`none`],C=()=>[Sh,gh,c],w=()=>[ih,`full`,`auto`,...C()],T=()=>[oh,`none`,`subgrid`,Sh,gh],te=()=>[`auto`,{span:[`full`,oh,Sh,gh]},oh,Sh,gh],ne=()=>[oh,`auto`,Sh,gh],E=()=>[`auto`,`min`,`max`,`fr`,Sh,gh],D=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],re=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],ie=()=>[`auto`,...C()],ae=()=>[ih,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...C()],O=()=>[e,Sh,gh],oe=()=>[...b(),Th,yh,{position:[Sh,gh]}],se=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ce=()=>[`auto`,`cover`,`contain`,Eh,hh,{size:[Sh,gh]}],le=()=>[sh,Ch,_h],ue=()=>[``,`none`,`full`,l,Sh,gh],de=()=>[``,ah,Ch,_h],fe=()=>[`solid`,`dashed`,`dotted`,`double`],pe=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],me=()=>[ah,sh,Th,yh],he=()=>[``,`none`,m,Sh,gh],ge=()=>[`none`,ah,Sh,gh],_e=()=>[`none`,ah,Sh,gh],ve=()=>[ah,Sh,gh],ye=()=>[ih,`full`,...C()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[ch],breakpoint:[ch],color:[lh],container:[ch],"drop-shadow":[ch],ease:[`in`,`out`,`in-out`],font:[mh],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[ch],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[ch],shadow:[ch],spacing:[`px`,ah],text:[ch],"text-shadow":[ch],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,ih,gh,Sh,g]}],container:[`container`],columns:[{columns:[ah,gh,Sh,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:x()}],overflow:[{overflow:ee()}],"overflow-x":[{"overflow-x":ee()}],"overflow-y":[{"overflow-y":ee()}],overscroll:[{overscroll:S()}],"overscroll-x":[{"overscroll-x":S()}],"overscroll-y":[{"overscroll-y":S()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:w()}],"inset-x":[{"inset-x":w()}],"inset-y":[{"inset-y":w()}],start:[{start:w()}],end:[{end:w()}],top:[{top:w()}],right:[{right:w()}],bottom:[{bottom:w()}],left:[{left:w()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[oh,`auto`,Sh,gh]}],basis:[{basis:[ih,`full`,`auto`,s,...C()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[ah,ih,`auto`,`initial`,`none`,gh]}],grow:[{grow:[``,ah,Sh,gh]}],shrink:[{shrink:[``,ah,Sh,gh]}],order:[{order:[oh,`first`,`last`,`none`,Sh,gh]}],"grid-cols":[{"grid-cols":T()}],"col-start-end":[{col:te()}],"col-start":[{"col-start":ne()}],"col-end":[{"col-end":ne()}],"grid-rows":[{"grid-rows":T()}],"row-start-end":[{row:te()}],"row-start":[{"row-start":ne()}],"row-end":[{"row-end":ne()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":E()}],"auto-rows":[{"auto-rows":E()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...D(),`normal`]}],"justify-items":[{"justify-items":[...re(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...re()]}],"align-content":[{content:[`normal`,...D()]}],"align-items":[{items:[...re(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...re(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":D()}],"place-items":[{"place-items":[...re(),`baseline`]}],"place-self":[{"place-self":[`auto`,...re()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:ie()}],mx:[{mx:ie()}],my:[{my:ie()}],ms:[{ms:ie()}],me:[{me:ie()}],mt:[{mt:ie()}],mr:[{mr:ie()}],mb:[{mb:ie()}],ml:[{ml:ie()}],"space-x":[{"space-x":C()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":C()}],"space-y-reverse":[`space-y-reverse`],size:[{size:ae()}],w:[{w:[s,`screen`,...ae()]}],"min-w":[{"min-w":[s,`screen`,`none`,...ae()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...ae()]}],h:[{h:[`screen`,`lh`,...ae()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...ae()]}],"max-h":[{"max-h":[`screen`,`lh`,...ae()]}],"font-size":[{text:[`base`,n,Ch,_h]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Sh,vh]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,sh,gh]}],"font-family":[{font:[wh,gh,t]}],"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,Sh,gh]}],"line-clamp":[{"line-clamp":[ah,`none`,Sh,vh]}],leading:[{leading:[a,...C()]}],"list-image":[{"list-image":[`none`,Sh,gh]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Sh,gh]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...fe(),`wavy`]}],"text-decoration-thickness":[{decoration:[ah,`from-font`,`auto`,Sh,_h]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[ah,`auto`,Sh,gh]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:C()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Sh,gh]}],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`,Sh,gh]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:oe()}],"bg-repeat":[{bg:se()}],"bg-size":[{bg:ce()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},oh,Sh,gh],radial:[``,Sh,gh],conic:[oh,Sh,gh]},Dh,bh]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:le()}],"gradient-via-pos":[{via:le()}],"gradient-to-pos":[{to:le()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:ue()}],"rounded-s":[{"rounded-s":ue()}],"rounded-e":[{"rounded-e":ue()}],"rounded-t":[{"rounded-t":ue()}],"rounded-r":[{"rounded-r":ue()}],"rounded-b":[{"rounded-b":ue()}],"rounded-l":[{"rounded-l":ue()}],"rounded-ss":[{"rounded-ss":ue()}],"rounded-se":[{"rounded-se":ue()}],"rounded-ee":[{"rounded-ee":ue()}],"rounded-es":[{"rounded-es":ue()}],"rounded-tl":[{"rounded-tl":ue()}],"rounded-tr":[{"rounded-tr":ue()}],"rounded-br":[{"rounded-br":ue()}],"rounded-bl":[{"rounded-bl":ue()}],"border-w":[{border:de()}],"border-w-x":[{"border-x":de()}],"border-w-y":[{"border-y":de()}],"border-w-s":[{"border-s":de()}],"border-w-e":[{"border-e":de()}],"border-w-t":[{"border-t":de()}],"border-w-r":[{"border-r":de()}],"border-w-b":[{"border-b":de()}],"border-w-l":[{"border-l":de()}],"divide-x":[{"divide-x":de()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":de()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...fe(),`hidden`,`none`]}],"divide-style":[{divide:[...fe(),`hidden`,`none`]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[...fe(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[ah,Sh,gh]}],"outline-w":[{outline:[``,ah,Ch,_h]}],"outline-color":[{outline:O()}],shadow:[{shadow:[``,`none`,u,Oh,xh]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":[`none`,d,Oh,xh]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:de()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[ah,_h]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":[`none`,f,Oh,xh]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[ah,Sh,gh]}],"mix-blend":[{"mix-blend":[...pe(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":pe()}],"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":[ah]}],"mask-image-linear-from-pos":[{"mask-linear-from":me()}],"mask-image-linear-to-pos":[{"mask-linear-to":me()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":me()}],"mask-image-t-to-pos":[{"mask-t-to":me()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":me()}],"mask-image-r-to-pos":[{"mask-r-to":me()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":me()}],"mask-image-b-to-pos":[{"mask-b-to":me()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":me()}],"mask-image-l-to-pos":[{"mask-l-to":me()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":me()}],"mask-image-x-to-pos":[{"mask-x-to":me()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":me()}],"mask-image-y-to-pos":[{"mask-y-to":me()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[Sh,gh]}],"mask-image-radial-from-pos":[{"mask-radial-from":me()}],"mask-image-radial-to-pos":[{"mask-radial-to":me()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"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":b()}],"mask-image-conic-pos":[{"mask-conic":[ah]}],"mask-image-conic-from-pos":[{"mask-conic-from":me()}],"mask-image-conic-to-pos":[{"mask-conic-to":me()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:oe()}],"mask-repeat":[{mask:se()}],"mask-size":[{mask:ce()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Sh,gh]}],filter:[{filter:[``,`none`,Sh,gh]}],blur:[{blur:he()}],brightness:[{brightness:[ah,Sh,gh]}],contrast:[{contrast:[ah,Sh,gh]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Oh,xh]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:[``,ah,Sh,gh]}],"hue-rotate":[{"hue-rotate":[ah,Sh,gh]}],invert:[{invert:[``,ah,Sh,gh]}],saturate:[{saturate:[ah,Sh,gh]}],sepia:[{sepia:[``,ah,Sh,gh]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Sh,gh]}],"backdrop-blur":[{"backdrop-blur":he()}],"backdrop-brightness":[{"backdrop-brightness":[ah,Sh,gh]}],"backdrop-contrast":[{"backdrop-contrast":[ah,Sh,gh]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,ah,Sh,gh]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ah,Sh,gh]}],"backdrop-invert":[{"backdrop-invert":[``,ah,Sh,gh]}],"backdrop-opacity":[{"backdrop-opacity":[ah,Sh,gh]}],"backdrop-saturate":[{"backdrop-saturate":[ah,Sh,gh]}],"backdrop-sepia":[{"backdrop-sepia":[``,ah,Sh,gh]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Sh,gh]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[ah,`initial`,Sh,gh]}],ease:[{ease:[`linear`,`initial`,_,Sh,gh]}],delay:[{delay:[ah,Sh,gh]}],animate:[{animate:[`none`,v,Sh,gh]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Sh,gh]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ge()}],"rotate-x":[{"rotate-x":ge()}],"rotate-y":[{"rotate-y":ge()}],"rotate-z":[{"rotate-z":ge()}],scale:[{scale:_e()}],"scale-x":[{"scale-x":_e()}],"scale-y":[{"scale-y":_e()}],"scale-z":[{"scale-z":_e()}],"scale-3d":[`scale-3d`],skew:[{skew:ve()}],"skew-x":[{"skew-x":ve()}],"skew-y":[{"skew-y":ve()}],transform:[{transform:[Sh,gh,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ye()}],"translate-x":[{"translate-x":ye()}],"translate-y":[{"translate-y":ye()}],"translate-z":[{"translate-z":ye()}],"translate-none":[`translate-none`],accent:[{accent:O()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:O()}],"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`,Sh,gh]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"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`,Sh,gh]}],fill:[{fill:[`none`,...O()]}],"stroke-w":[{stroke:[ah,Ch,_h,vh]}],stroke:[{stroke:[`none`,...O()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}}),zh=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Bh=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Vh={};function Hh(e,t){return((t||Vh).jsx?Bh:zh).test(e)}var Uh=/[ \t\n\f\r]/g;function Wh(e){return typeof e==`object`?e.type===`text`?Gh(e.value):!1:Gh(e)}function Gh(e){return e.replace(Uh,``)===``}var Kh=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=` +`,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),S(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function ee(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function S(){ee(i)}function C(e){var t;for(e||=[];t=w();)t!==!1&&e.push(t);return e}function w(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function T(){var e=y(),t=ee(a);if(t){if(w(),!ee(o))return x(`property missing ':'`);var r=ee(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return ee(c),i}}function te(){var e=[];C(e);for(var t;t=T();)t!==!1&&(e.push(t),C(e));return e}return S(),te()}function _(e){return e?e.replace(l,p):p}t.exports=g})),qh=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(Kh());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),Jh=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),Yh=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(qh()),r=Jh();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i}));function Xh(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Qh(e.position):`start`in e||`end`in e?Qh(e):`line`in e||`column`in e?Zh(e):``}function Zh(e){return $h(e&&e.line)+`:`+$h(e&&e.column)}function Qh(e){return Zh(e&&e.start)+`-`+Zh(e&&e.end)}function $h(e){return e&&typeof e==`number`?e:1}var eg=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=Xh(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};eg.prototype.file=``,eg.prototype.name=``,eg.prototype.reason=``,eg.prototype.message=``,eg.prototype.stack=``,eg.prototype.column=void 0,eg.prototype.line=void 0,eg.prototype.ancestors=void 0,eg.prototype.cause=void 0,eg.prototype.fatal=void 0,eg.prototype.place=void 0,eg.prototype.ruleId=void 0,eg.prototype.source=void 0;var tg=l(Yh(),1),ng={}.hasOwnProperty,rg=new Map,ig=/[A-Z]/g,ag=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),og=new Set([`td`,`th`]),sg=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function cg(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=yg(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=vg(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?Ft:Pt,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=lg(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function lg(e,t,n){if(t.type===`element`)return ug(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return dg(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return pg(e,t,n);if(t.type===`mdxjsEsm`)return fg(e,t);if(t.type===`root`)return mg(e,t,n);if(t.type===`text`)return hg(e,t)}function ug(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Ft,e.schema=i),e.ancestors.push(t);let a=Tg(e,t.tagName,!1),o=bg(e,t),s=Sg(e,t);return ag.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!Wh(e):!0})),gg(e,o,a,t),_g(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function dg(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Eg(e,t.position)}function fg(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Eg(e,t.position)}function pg(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Ft,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Tg(e,t.name,!0),o=xg(e,t),s=Sg(e,t);return gg(e,o,a,t),_g(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function mg(e,t,n){let r={};return _g(r,Sg(e,t)),e.create(t,e.Fragment,r,n)}function hg(e,t){return t.value}function gg(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function _g(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function vg(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function yg(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Fo(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function bg(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&ng.call(t.properties,i)){let a=Cg(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&og.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function xg(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Eg(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Eg(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Sg(e,t){let n=[],r=-1,i=e.passKeys?new Map:rg;for(;++ro))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;er;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Ig(e,t,n){return Ru(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}const Lg={tokenize:Rg};function Rg(e){let t=this,n=e.attempt(zu,r,e.attempt(this.parser.constructs.flowInitial,i,Ru(e,e.attempt(this.parser.constructs.flow,i,e.attempt(dd,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}const zg={resolveAll:Ug()},Bg=Hg(`string`),Vg=Hg(`text`);function Hg(e){return{resolveAll:Ug(e===`text`?Wg:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i$g,contentInitial:()=>qg,disable:()=>e_,document:()=>Kg,flow:()=>Yg,flowInitial:()=>Jg,insideSpan:()=>Qg,string:()=>Xg,text:()=>Zg});const Kg={42:af,43:af,45:af,48:af,49:af,50:af,51:af,52:af,53:af,54:af,55:af,56:af,57:af,62:Vu},qg={91:bd},Jg={[-2]:$u,[-1]:$u,32:$u},Yg={35:Ed,42:nf,45:[pf,nf],60:jd,61:pf,95:nf,96:Xu,126:Xu},Xg={38:qu,92:Gu},Zg={[-5]:ef,[-4]:ef,[-3]:ef,33:Xd,38:qu,42:Mu,60:[Iu,Rd],91:Qd,92:[wd,Gu],93:Bd,95:Mu,96:rd},Qg={null:[Mu,zg]},$g={null:[42,95]},e_={null:[]};function t_(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:S(x),check:S(ee),consume:v,enter:y,exit:b,interrupt:S(ee,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=tu(o,e),g(),o[o.length-1]===null?(C(t,0),l.events=ju(a,l.events,l),l.events):[]}function f(e,t){return r_(p(e),t)}function p(e){return n_(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,T()}function g(){let e;for(;r._index-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function r_(e,t){let n=-1,r=[],i;for(;++n0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||m_).call(a,void 0,e[0])}for(r.position={start:d_(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:d_(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function y_(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function b_(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function x_(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=Au(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function S_(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function C_(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function w_(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function T_(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return w_(e,t);let i={src:Au(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function E_(e,t){let n={src:Au(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function D_(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function O_(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return w_(e,t);let i={href:Au(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function k_(e,t){let n={href:Au(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function A_(e,t,n){let r=e.all(t),i=n?j_(n):M_(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s1}function N_(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=Fo(t.children[1]),o=Po(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function R_(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(U_(t.slice(i),i>0,!1)),a.join(``)}function U_(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===B_||t===V_;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===B_||t===V_;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function W_(e,t){let n={type:`text`,value:H_(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function G_(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const K_={blockquote:g_,break:__,code:v_,delete:y_,emphasis:b_,footnoteReference:x_,heading:S_,html:C_,imageReference:T_,image:E_,inlineCode:D_,linkReference:O_,link:k_,listItem:A_,list:N_,paragraph:P_,root:F_,strong:I_,table:L_,tableCell:z_,tableRow:R_,text:W_,thematicBreak:G_,toml:q_,yaml:q_,definition:q_,footnoteDefinition:q_};function q_(){}function J_(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function Y_(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function X_(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||J_,r=e.options.footnoteBackLabel||Y_,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...tt(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:` +`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:` +`}]}}var Z_={}.hasOwnProperty,Q_={};function $_(e,t){let n=t||Q_,r=new Map,i=new Map,a={all:s,applyData:tv,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...K_,...n.handlers},one:o,options:n,patch:ev,wrap:rv};return Ie(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(Z_.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=tt(n);return r.children=a.all(e),r}return tt(e)}return(a.options.unknownHandler||nv)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r0&&n.push({type:`text`,value:` +`}),n}function iv(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function av(e,t){let n=$_(e,t),r=n.one(e,void 0),i=X_(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:` +`},i)),a}function ov(e,t){return e&&`run`in e?async function(n,r){let i=av(n,{file:r,...t});await e.run(i,r)}:function(n,r){return av(n,{file:r,...e||t})}}function sv(e){if(e)throw e}var cv=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});ft.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}const fv={basename:pv,dirname:mv,extname:hv,join:gv,sep:`/`};function pv(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);yv(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function mv(e){if(yv(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function hv(e){yv(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function gv(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function vv(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function yv(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}const bv={cwd:xv};function xv(){return`/`}function Sv(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Cv(e){if(typeof e==`string`)e=new URL(e);else if(!Sv(e)){let t=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:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return wv(e)}function wv(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n0){let[r,...a]=t,o=n[i][1];lv(o)&&lv(r)&&(r=(0,Mv.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Fv(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Iv(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Lv(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Rv(e){if(!lv(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function zv(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Bv(e){return Vv(e)?e:new Ev(e)}function Vv(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Hv(e){return typeof e==`string`||Uv(e)}function Uv(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}function Wv(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Gv=Wv();function Kv(e){Gv=e}var qv={exec:()=>null};function Jv(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(Xv.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var Yv=(()=>{try{return!0}catch{return!1}})(),Xv={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`),blockquoteBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}>`)},Zv=/^(?:[ \t]*(?:\n|$))+/,Qv=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,$v=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ey=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ty=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ny=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,ry=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,iy=Jv(ry).replace(/bull/g,ny).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),ay=Jv(ry).replace(/bull/g,ny).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),oy=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,sy=/^[^\n]+/,cy=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,ly=Jv(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,cy).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),uy=Jv(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ny).getRegex(),dy=`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`,fy=/|$))/,py=Jv(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,fy).replace(`tag`,dy).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),my=Jv(oy).replace(`hr`,ey).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,dy).getRegex(),hy={blockquote:Jv(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,my).getRegex(),code:Qv,def:ly,fences:$v,heading:ty,hr:ey,html:py,lheading:iy,list:uy,newline:Zv,paragraph:my,table:qv,text:sy},gy=Jv(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,ey).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,dy).getRegex(),_y={...hy,lheading:ay,table:gy,paragraph:Jv(oy).replace(`hr`,ey).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,gy).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,dy).getRegex()},vy={...hy,html:Jv(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,fy).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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:qv,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Jv(oy).replace(`hr`,ey).replace(`heading`,` *#{1,6} *[^ +]`).replace(`lheading`,iy).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},yy=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,by=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,xy=/^( {2,}|\\)\n(?!\s*$)/,Sy=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`+)[^`]+\k(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,Yv?"(?`+)[^`]+\k(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),Py=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Fy=Jv(Py,`u`).replace(/punct/g,Cy).getRegex(),Iy=Jv(Py,`u`).replace(/punct/g,Dy).getRegex(),Ly=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,Ry=Jv(Ly,`gu`).replace(/notPunctSpace/g,Ty).replace(/punctSpace/g,wy).replace(/punct/g,Cy).getRegex(),zy=Jv(Ly,`gu`).replace(/notPunctSpace/g,ky).replace(/punctSpace/g,Oy).replace(/punct/g,Dy).getRegex(),By=Jv(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,Ty).replace(/punctSpace/g,wy).replace(/punct/g,Cy).getRegex(),Vy=Jv(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,Ay).getRegex(),Hy=Jv(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,My).replace(/punctSpace/g,jy).replace(/punct/g,Ay).getRegex(),Uy=Jv(/\\(punct)/,`gu`).replace(/punct/g,Cy).getRegex(),Wy=Jv(/^<(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(),Gy=Jv(fy).replace(`(?:-->|$)`,`-->`).getRegex(),Ky=Jv(`^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^`).replace(`comment`,Gy).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),qy=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Jy=Jv(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace(`label`,qy).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Yy=Jv(/^!?\[(label)\]\[(ref)\]/).replace(`label`,qy).replace(`ref`,cy).getRegex(),Xy=Jv(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,cy).getRegex(),Zy=Jv(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,Yy).replace(`nolink`,Xy).getRegex(),Qy=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,$y={_backpedal:qv,anyPunctuation:Uy,autolink:Wy,blockSkip:Ny,br:xy,code:by,del:qv,delLDelim:qv,delRDelim:qv,emStrongLDelim:Fy,emStrongRDelimAst:Ry,emStrongRDelimUnd:By,escape:yy,link:Jy,nolink:Xy,punctuation:Ey,reflink:Yy,reflinkSearch:Zy,tag:Ky,text:Sy,url:qv},eb={...$y,link:Jv(/^!?\[(label)\]\((.*?)\)/).replace(`label`,qy).getRegex(),reflink:Jv(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,qy).getRegex()},tb={...$y,emStrongRDelimAst:zy,emStrongLDelim:Iy,delLDelim:Vy,delRDelim:Hy,url:Jv(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,Qy).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Jv(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":`>`,'"':`"`,"'":`'`},ob=e=>ab[e];function sb(e,t){if(t){if(Xv.escapeTest.test(e))return e.replace(Xv.escapeReplace,ob)}else if(Xv.escapeTestNoEncode.test(e))return e.replace(Xv.escapeReplaceNoEncode,ob);return e}function cb(e){try{e=encodeURI(e).replace(Xv.percentDecode,`%`)}catch{return null}return e}function lb(e,t){let n=e.replace(Xv.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(Xv.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0?-2:-1}function fb(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function pb(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function mb(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(` +`).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(` +`)}var hb=class{options;rules;lexer;constructor(e){this.options=e||Gv}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 e=t[0].replace(this.rules.other.codeRemoveIndent,``);return{type:`code`,raw:t[0],codeBlockStyle:`indented`,text:this.options.pedantic?e:ub(e,` +`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=mb(e,t[3]||``,this.rules);return{type:`code`,raw:e,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 e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=ub(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:ub(t[0],` +`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=ub(t[0],` +`).split(` +`),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o;for(o=0;o1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=fb(t[2].split(` +`,1)[0],t[1].length),l=e.split(` +`,1)[0],u=!c.trim(),d=0;if(this.options.pedantic?(d=2,s=c.trimStart()):u?d=t[1].length+1:(d=c.search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=c.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(l)&&(r+=l+` +`,e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),i=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d),f=this.rules.other.blockquoteBeginRegex(d);for(;e;){let p=e.split(` +`,1)[0],m;if(l=p,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting,` `),m=l):m=l.replace(this.rules.other.tabCharGlobal,` `),i.test(l)||a.test(l)||o.test(l)||f.test(l)||t.test(l)||n.test(l))break;if(m.search(this.rules.other.nonSpaceChar)>=d||!l.trim())s+=` +`+m.slice(d);else{if(u||c.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(c)||a.test(c)||n.test(c))break;s+=` +`+l}u=!l.trim(),r+=p+` +`,e=e.substring(p.length+1),c=m.slice(d)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0)),i.items.push({type:`list_item`,raw:r,task:!!this.options.gfm&&this.rules.other.listIsTask.test(s),loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e of i.items){if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),e.task){if(e.text=e.text.replace(this.rules.other.listReplaceTask,``),e.tokens[0]?.type===`text`||e.tokens[0]?.type===`paragraph`){e.tokens[0].raw=e.tokens[0].raw.replace(this.rules.other.listReplaceTask,``),e.tokens[0].text=e.tokens[0].text.replace(this.rules.other.listReplaceTask,``);for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,``);break}}let t=this.rules.other.listTaskCheckbox.exec(e.raw);if(t){let n={type:`checkbox`,raw:t[0]+` `,checked:t[0]!==`[ ]`};e.checked=n.checked,i.loose?e.tokens[0]&&[`paragraph`,`text`].includes(e.tokens[0].type)&&`tokens`in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=n.raw+e.tokens[0].raw,e.tokens[0].text=n.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(n)):e.tokens.unshift({type:`paragraph`,raw:n.raw,text:n.raw,tokens:[n]}):e.tokens.unshift(n)}}if(!i.loose){let t=e.tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}}if(i.loose)for(let e of i.items){e.loose=!0;for(let t of e.tokens)t.type===`text`&&(t.type=`paragraph`)}return i}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:`html`,block:!0,raw:t[0],pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:t[0],href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=lb(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(` +`):[],a={type:`table`,raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:`heading`,raw:t[0],depth:t[2].charAt(0)===`=`?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===` +`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=ub(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=db(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),pb(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,`$1`),title:r&&r.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return pb(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=0,c=r[0][0]===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);(r=c.exec(t))!=null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}else if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);let t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){let e=c.slice(1,-1);return{type:`em`,raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}let l=c.slice(2,-2);return{type:`strong`,raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e,t,n=``){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim;for(s.lastIndex=0,t=t.slice(-1*e.length+n);(r=s.exec(t))!=null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},gb=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Gv,this.options.tokenizer=this.options.tokenizer||new hb,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:Xv,block:rb.normal,inline:ib.normal};this.options.pedantic?(t.block=rb.pedantic,t.inline=ib.pedantic):this.options.gfm&&(t.block=rb.gfm,this.options.breaks?t.inline=ib.breaks:t.inline=ib.gfm),this.tokenizer.rules=t}static get rules(){return{block:rb,inline:ib}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(Xv.carriageReturn,` +`),this.blockTokens(e,this.tokens);for(let e=0;e(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);r.raw.length===1&&n!==void 0?n.raw+=` +`:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(` +`)?``:` +`)+r.raw,n.text+=` +`+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(` +`)?``:` +`)+r.raw,n.text+=` +`+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},t.push(r));continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let a=t.at(-1);n&&a?.type===`paragraph`?(a.raw+=(a.raw.endsWith(` +`)?``:` +`)+r.raw,a.text+=` +`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(` +`)?``:` +`)+r.raw,n.text+=` +`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)e.includes(r[0].slice(r[0].lastIndexOf(`[`)+1,-1))&&(n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,r.index)+`++`+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)i=r[2]?r[2].length:0,n=n.slice(0,r.index+i)+`[`+`a`.repeat(r[0].length-i-2)+`]`+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let a=!1,o=``;for(;e;){a||(o=``),a=!1;let r;if(this.options.extensions?.inline?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);r.type===`text`&&n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(i)){e=e.substring(r.raw.length),r.raw.slice(-1)!==`_`&&(o=r.raw.slice(-1)),a=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return t}},_b=class{options;parser;constructor(e){this.options=e||Gv}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(Xv.notSpaceStart)?.[0],i=e.replace(Xv.endingNewline,``)+` +`;return r?`
`+(n?i:sb(i,!0))+`
+`:`
`+(n?i:sb(i,!0))+`
+`}blockquote({tokens:e}){return`
+${this.parser.parse(e)}
+`}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)} +`}hr(e){return`
+`}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t +`+r+` +`}listitem(e){return`
  • ${this.parser.parse(e.tokens)}
  • +`}checkbox({checked:e}){return` `}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    +`}table(e){let t=``,n=``;for(let t=0;t${r}`,` + +`+t+` +`+r+`
    +`}tablerow({text:e}){return` +${e} +`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+` +`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${sb(e,!0)}`}br(e){return`
    `}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=cb(e);if(i===null)return r;e=i;let a=`
    `+r+``,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=cb(e);if(i===null)return sb(n);e=i;let a=`${n}`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:sb(e.text)}},vb=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}},yb=class e{options;renderer;textRenderer;constructor(e){this.options=e||Gv,this.options.renderer=this.options.renderer||new _b,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new vb}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){let t=``;for(let n=0;n{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new _b(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new hb(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new bb;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];bb.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async&&bb.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:t[r]=(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return gb.lex(e,t??this.defaults)}parser(e,t){return yb.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer():e?gb.lex:gb.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser():e?yb.parse:yb.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer():e?gb.lex:gb.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser():e?yb.parse:yb.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=` +Please report this to https://github.com/markedjs/marked.`,e){let e=`

    An error occurred:

    `+sb(n.message+``,!0)+`
    `;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function Sb(e,t){return xb.parse(e,t)}Sb.options=Sb.setOptions=function(e){return xb.setOptions(e),Sb.defaults=xb.defaults,Kv(Sb.defaults),Sb},Sb.getDefaults=Wv,Sb.defaults=Gv,Sb.use=function(...e){return xb.use(...e),Sb.defaults=xb.defaults,Kv(Sb.defaults),Sb},Sb.walkTokens=function(e,t){return xb.walkTokens(e,t)},Sb.parseInline=xb.parseInline,Sb.Parser=yb,Sb.parser=yb.parse,Sb.Renderer=_b,Sb.TextRenderer=vb,Sb.Lexer=gb,Sb.lexer=gb.lex,Sb.Tokenizer=hb,Sb.Hooks=bb,Sb.parse=Sb,Sb.options,Sb.setOptions,Sb.use,Sb.walkTokens,Sb.parseInline,yb.parse,gb.lex;var Cb=`modulepreload`,wb=function(e){return`/`+e},Tb={};const Eb=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=wb(t,n),t in Tb)return;Tb[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:Cb,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};var Db=300,Ob=`300px`,kb=500;function Ab(e={}){let{immediate:t=!1,debounceDelay:n=Db,rootMargin:r=Ob,idleTimeout:i=kb}=e,[a,o]=(0,y.useState)(!1),s=(0,y.useRef)(null),c=(0,y.useRef)(null),l=(0,y.useRef)(null),u=(0,y.useMemo)(()=>e=>{let t=Date.now();return window.setTimeout(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-t))})},1)},[]),d=(0,y.useMemo)(()=>typeof window<`u`&&window.requestIdleCallback?(e,t)=>window.requestIdleCallback(e,t):u,[u]),f=(0,y.useMemo)(()=>typeof window<`u`&&window.cancelIdleCallback?e=>window.cancelIdleCallback(e):e=>{clearTimeout(e)},[]);return(0,y.useEffect)(()=>{if(t){o(!0);return}let e=s.current;if(!e)return;c.current&&=(clearTimeout(c.current),null),l.current&&=(f(l.current),null);let a=()=>{c.current&&=(clearTimeout(c.current),null),l.current&&=(f(l.current),null)},u=e=>{l.current=d(t=>{t.timeRemaining()>0||t.didTimeout?(o(!0),e.disconnect()):l.current=d(()=>{o(!0),e.disconnect()},{timeout:i/2})},{timeout:i})},p=e=>{a(),c.current=window.setTimeout(()=>{var t;let n=e.takeRecords();(n.length===0||(t=n.at(-1)?.isIntersecting)!=null&&t)&&u(e)},n)},m=(e,t)=>{e.isIntersecting?p(t):a()},h=new IntersectionObserver(e=>{for(let t of e)m(t,h)},{rootMargin:r,threshold:0});return h.observe(e),()=>{c.current&&clearTimeout(c.current),l.current&&f(l.current),h.disconnect()}},[t,n,r,i,f,d]),{shouldRender:a,containerRef:s}}var jb=/\s/,Mb=/^\s+$/,Nb=new Set([`code`,`pre`,`svg`,`math`,`annotation`]),Pb=e=>typeof e==`object`&&!!e&&`type`in e&&e.type===`element`,Fb=e=>e.some(e=>Pb(e)&&Nb.has(e.tagName)),Ib=e=>{let t=[],n=``,r=!1;for(let i of e){let e=jb.test(i);e!==r&&n&&(t.push(n),n=``),n+=i,r=e}return n&&t.push(n),t},Lb=e=>{let t=[],n=``;for(let r of e)jb.test(r)?n+=r:(n&&=(t.push(n),``),t.push(r));return n&&t.push(n),t},Rb=(e,t,n,r)=>({type:`element`,tagName:`span`,properties:{"data-sd-animate":!0,style:`--sd-animation:sd-${t};--sd-duration:${n}ms;--sd-easing:${r}`},children:[{type:`text`,value:e}]}),zb=(e,t,n)=>{let r=t.at(-1);if(!(r&&`children`in r))return;if(Fb(t))return Ne;let i=r,a=i.children.indexOf(e);if(a===-1)return;let o=e.value;if(!o.trim())return;let s=(n.sep===`char`?Lb(o):Ib(o)).map(e=>Mb.test(e)?{type:`text`,value:e}:Rb(e,n.animation,n.duration,n.easing));return i.children.splice(a,1,...s),a+s.length};function Bb(e){let t={animation:e?.animation??`fadeIn`,duration:e?.duration??150,easing:e?.easing??`ease`,sep:e?.sep??`word`};return{name:`animate`,type:`animate`,rehypePlugin:()=>e=>{Pe(e,`text`,(e,n)=>zb(e,n,t))}}}Bb();var Vb=e=>(0,k.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,k.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`})}),Hb=e=>(0,k.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,k.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`})}),Ub=e=>(0,k.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,k.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`})}),Wb=e=>(0,k.jsxs)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:[(0,k.jsx)(`path`,{d:`M8 0V4`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,k.jsx)(`path`,{d:`M8 16V12`,opacity:`0.5`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,k.jsx)(`path`,{d:`M3.29773 1.52783L5.64887 4.7639`,opacity:`0.9`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,k.jsx)(`path`,{d:`M12.7023 1.52783L10.3511 4.7639`,opacity:`0.1`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,k.jsx)(`path`,{d:`M12.7023 14.472L10.3511 11.236`,opacity:`0.4`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,k.jsx)(`path`,{d:`M3.29773 14.472L5.64887 11.236`,opacity:`0.6`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,k.jsx)(`path`,{d:`M15.6085 5.52783L11.8043 6.7639`,opacity:`0.2`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,k.jsx)(`path`,{d:`M0.391602 10.472L4.19583 9.23598`,opacity:`0.7`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,k.jsx)(`path`,{d:`M15.6085 10.4722L11.8043 9.2361`,opacity:`0.3`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,k.jsx)(`path`,{d:`M0.391602 5.52783L4.19583 6.7639`,opacity:`0.8`,stroke:`currentColor`,strokeWidth:`1.5`})]}),Gb=e=>(0,k.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,k.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`})}),Kb=e=>(0,k.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,k.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`})}),qb=e=>(0,k.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,k.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`})}),Jb=e=>(0,k.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,k.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`})}),Yb=e=>(0,k.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,k.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`})}),Xb=e=>(0,k.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,k.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`})}),Zb=(...e)=>Rh(gm(e)),Qb=(e,t,n)=>{let r=typeof t==`string`?new Blob([t],{type:n}):t,i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)},$b=(0,y.createContext)({code:``}),ex=()=>(0,y.useContext)($b),tx=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:a,...o})=>{let[s,c]=(0,y.useState)(!1),l=(0,y.useRef)(0),{code:u}=ex(),{isAnimating:d}=(0,y.useContext)(FS),f=a??u,p=async()=>{var r;if(typeof window>`u`||!((r=navigator==null?void 0:navigator.clipboard)!=null&&r.writeText)){t?.(Error(`Clipboard API not available`));return}try{s||(await navigator.clipboard.writeText(f),c(!0),e?.(),l.current=window.setTimeout(()=>c(!1),n))}catch(e){t?.(e)}};(0,y.useEffect)(()=>()=>{window.clearTimeout(l.current)},[]);let m=s?Vb:Hb;return(0,k.jsx)(`button`,{className:Zb(`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:d,onClick:p,title:`Copy Code`,type:`button`,...o,children:r??(0,k.jsx)(m,{size:14})})},nx={"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`},rx=({onDownload:e,onError:t,language:n,children:r,className:i,code:a,...o})=>{let{code:s}=ex(),{isAnimating:c}=(0,y.useContext)(FS),l=a??s,u=`file.${n&&n in nx?nx[n]:`txt`}`,d=()=>{try{Qb(u,l,`text/plain`),e?.()}catch(e){t?.(e)}};return(0,k.jsx)(`button`,{className:Zb(`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:c,onClick:d,title:`Download file`,type:`button`,...o,children:r??(0,k.jsx)(Ub,{size:14})})},ix=()=>(0,k.jsxs)(`div`,{className:`w-full divide-y divide-border overflow-hidden rounded-xl border border-border`,children:[(0,k.jsx)(`div`,{className:`h-[46px] w-full bg-muted/80`}),(0,k.jsx)(`div`,{className:`flex w-full items-center justify-center p-4`,children:(0,k.jsx)(Wb,{className:`size-4 animate-spin`})})]}),ax=/\.[^/.]+$/,ox=({node:e,className:t,src:n,alt:r,...i})=>{let a=async()=>{if(n)try{let e=await(await fetch(n)).blob(),t=new URL(n,window.location.origin).pathname.split(`/`).pop()||``,i=t.split(`.`).pop(),a=t.includes(`.`)&&i!==void 0&&i.length<=4,o=``;if(a)o=t;else{let n=e.type,i=`png`;n.includes(`jpeg`)||n.includes(`jpg`)?i=`jpg`:n.includes(`png`)?i=`png`:n.includes(`svg`)?i=`svg`:n.includes(`gif`)?i=`gif`:n.includes(`webp`)&&(i=`webp`),o=`${(r||t||`image`).replace(ax,``)}.${i}`}Qb(o,e,e.type)}catch{window.open(n,`_blank`)}};return n?(0,k.jsxs)(`div`,{className:`group relative my-4 inline-block`,"data-streamdown":`image-wrapper`,children:[(0,k.jsx)(`img`,{alt:r,className:Zb(`max-w-full rounded-lg`,t),"data-streamdown":`image`,src:n,...i}),(0,k.jsx)(`div`,{className:`pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block`}),(0,k.jsx)(`button`,{className:Zb(`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:a,title:`Download image`,type:`button`,children:(0,k.jsx)(Ub,{size:14})})]}):null},sx=0,cx=()=>{sx+=1,sx===1&&(document.body.style.overflow=`hidden`)},lx=()=>{sx=Math.max(0,sx-1),sx===0&&(document.body.style.overflow=``)},ux=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let[i,a]=(0,y.useState)(!1),o=(0,y.useCallback)(async()=>{try{await navigator.clipboard.writeText(e),a(!0),setTimeout(()=>a(!1),2e3)}catch{}},[e]),s=(0,y.useCallback)(()=>{r(),n()},[r,n]);return(0,y.useEffect)(()=>{if(t){cx();let e=e=>{e.key===`Escape`&&n()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),lx()}}},[t,n]),t?(0,k.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm`,"data-streamdown":`link-safety-modal`,onClick:n,onKeyDown:e=>{e.key===`Escape`&&n()},role:`button`,tabIndex:0,children:(0,k.jsxs)(`div`,{className:`relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg`,onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:[(0,k.jsx)(`button`,{className:`absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground`,onClick:n,title:`Close`,type:`button`,children:(0,k.jsx)(qb,{size:16})}),(0,k.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-2 font-semibold text-lg`,children:[(0,k.jsx)(Jb,{size:20}),(0,k.jsx)(`span`,{children:`Open external link?`})]}),(0,k.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`You're about to visit an external website.`})]}),(0,k.jsx)(`div`,{className:Zb(`break-all rounded-md bg-muted p-3 font-mono text-sm`,e.length>100&&`max-h-32 overflow-y-auto`),children:e}),(0,k.jsxs)(`div`,{className:`flex gap-2`,children:[(0,k.jsx)(`button`,{className:`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:o,type:`button`,children:i?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(Vb,{size:14}),(0,k.jsx)(`span`,{children:`Copied`})]}):(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(Hb,{size:14}),(0,k.jsx)(`span`,{children:`Copy link`})]})}),(0,k.jsxs)(`button`,{className:`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:s,type:`button`,children:[(0,k.jsx)(Jb,{size:14}),(0,k.jsx)(`span`,{children:`Open link`})]})]})]})}):null},dx=(0,y.createContext)(null),fx=()=>(0,y.useContext)(dx),px=()=>fx()?.code??null,mx=()=>fx()?.mermaid??null,hx=(e,t)=>new Promise((t,n)=>{let r=`data:image/svg+xml;base64,`+btoa(unescape(encodeURIComponent(e))),i=new Image;i.crossOrigin=`anonymous`,i.onload=()=>{let e=document.createElement(`canvas`),r=i.width*5,a=i.height*5;e.width=r,e.height=a;let o=e.getContext(`2d`);if(!o){n(Error(`Failed to create 2D canvas context for PNG export`));return}o.drawImage(i,0,0,r,a),e.toBlob(e=>{if(!e){n(Error(`Failed to create PNG blob`));return}t(e)},`image/png`)},i.onerror=()=>n(Error(`Failed to load SVG image`)),i.src=r}),gx=({chart:e,children:t,className:n,onDownload:r,config:i,onError:a})=>{let[o,s]=(0,y.useState)(!1),c=(0,y.useRef)(null),{isAnimating:l}=(0,y.useContext)(FS),u=mx(),d=async t=>{try{if(t===`mmd`){Qb(`diagram.mmd`,e,`text/plain`),s(!1),r?.(t);return}if(!u){a?.(Error(`Mermaid plugin not available`));return}let n=u.getMermaid(i),o=e.split(``).reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0),c=`mermaid-${Math.abs(o)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:l}=await n.render(c,e);if(!l){a?.(Error(`SVG not found. Please wait for the diagram to render.`));return}if(t===`svg`){Qb(`diagram.svg`,l,`image/svg+xml`),s(!1),r?.(t);return}if(t===`png`){Qb(`diagram.png`,await hx(l),`image/png`),r?.(t),s(!1);return}}catch(e){a?.(e)}};return(0,y.useEffect)(()=>{let e=e=>{let t=e.composedPath();c.current&&!t.includes(c.current)&&s(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,k.jsxs)(`div`,{className:`relative`,ref:c,children:[(0,k.jsx)(`button`,{className:Zb(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,n),disabled:l,onClick:()=>s(!o),title:`Download diagram`,type:`button`,children:t??(0,k.jsx)(Ub,{size:14})}),o?(0,k.jsxs)(`div`,{className:`absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg`,children:[(0,k.jsx)(`button`,{className:`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`,onClick:()=>d(`svg`),title:`Download diagram as SVG`,type:`button`,children:`SVG`}),(0,k.jsx)(`button`,{className:`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`,onClick:()=>d(`png`),title:`Download diagram as PNG`,type:`button`,children:`PNG`}),(0,k.jsx)(`button`,{className:`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`,onClick:()=>d(`mmd`),title:`Download diagram as MMD`,type:`button`,children:`MMD`})]}):null]})},_x=0,vx=()=>{_x+=1,_x===1&&(document.body.style.overflow=`hidden`)},yx=()=>{_x=Math.max(0,_x-1),_x===0&&(document.body.style.overflow=``)},bx=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...a})=>{let[o,s]=(0,y.useState)(!1),{isAnimating:c,controls:l}=(0,y.useContext)(FS),u=(()=>{if(typeof l==`boolean`)return l;let e=l.mermaid;return e===!1?!1:e===!0||e===void 0?!0:e.panZoom!==!1})(),d=()=>{s(!o)};return(0,y.useEffect)(()=>{if(o){vx();let e=e=>{e.key===`Escape`&&s(!1)};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),yx()}}},[o]),(0,y.useEffect)(()=>{o?n?.():r&&r()},[o,n,r]),(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`button`,{className:Zb(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,i),disabled:c,onClick:d,title:`View fullscreen`,type:`button`,...a,children:(0,k.jsx)(Gb,{size:14})}),o?(0,k.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm`,onClick:d,onKeyDown:e=>{e.key===`Escape`&&d()},role:`button`,tabIndex:0,children:[(0,k.jsx)(`button`,{className:`absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground`,onClick:d,title:`Exit fullscreen`,type:`button`,children:(0,k.jsx)(qb,{size:20})}),(0,k.jsx)(`div`,{className:`flex size-full items-center justify-center p-4`,onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:(0,k.jsx)(BS,{chart:e,className:`size-full [&_svg]:h-auto [&_svg]:w-auto`,config:t,fullscreen:!0,showControls:u})})]}):null]})},xx=e=>{let t=[],n=[],r=e.querySelectorAll(`thead th`);for(let e of r)t.push(e.textContent?.trim()||``);let i=e.querySelectorAll(`tbody tr`);for(let e of i){let t=[],r=e.querySelectorAll(`td`);for(let e of r)t.push(e.textContent?.trim()||``);n.push(t)}return{headers:t,rows:n}},Sx=e=>{let{headers:t,rows:n}=e,r=e=>{let t=!1,n=!1;for(let r of e){if(r===`"`){t=!0,n=!0;break}(r===`,`||r===` +`)&&(t=!0)}return t?n?`"${e.replace(/"/g,`""`)}"`:`"${e}"`:e},i=t.length>0?n.length+1:n.length,a=Array(i),o=0;t.length>0&&(a[o]=t.map(r).join(`,`),o+=1);for(let e of n)a[o]=e.map(r).join(`,`),o+=1;return a.join(` +`)},Cx=e=>{let{headers:t,rows:n}=e,r=e=>{let t=!1;for(let n of e)if(n===` `||n===` +`||n===`\r`){t=!0;break}if(!t)return e;let n=[];for(let t of e)t===` `?n.push(`\\t`):t===` +`?n.push(`\\n`):t===`\r`?n.push(`\\r`):n.push(t);return n.join(``)},i=t.length>0?n.length+1:n.length,a=Array(i),o=0;t.length>0&&(a[o]=t.map(r).join(` `),o+=1);for(let e of n)a[o]=e.map(r).join(` `),o+=1;return a.join(` +`)},wx=e=>{let t=!1;for(let n of e)if(n===`\\`||n===`|`){t=!0;break}if(!t)return e;let n=[];for(let t of e)t===`\\`?n.push(`\\\\`):t===`|`?n.push(`\\|`):n.push(t);return n.join(``)},Tx=e=>{let{headers:t,rows:n}=e;if(t.length===0)return``;let r=Array(n.length+2),i=0;r[i]=`| ${t.map(e=>wx(e)).join(` | `)} |`,i+=1;let a=Array(t.length);for(let e=0;ewx(e)).join(` | `)} |`,i+=1;return r.join(` +`)},Ex=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let[a,o]=(0,y.useState)(!1),[s,c]=(0,y.useState)(!1),l=(0,y.useRef)(null),u=(0,y.useRef)(0),{isAnimating:d}=(0,y.useContext)(FS),f=async e=>{var t;if(typeof window>`u`||!((t=navigator==null?void 0:navigator.clipboard)!=null&&t.write)){r?.(Error(`Clipboard API not available`));return}try{let t=(l.current?.closest(`[data-streamdown="table-wrapper"]`))?.querySelector(`table`);if(!t){r?.(Error(`Table not found`));return}let a=xx(t),s=e===`csv`?Sx(a):Cx(a),d=new ClipboardItem({"text/plain":new Blob([s],{type:`text/plain`}),"text/html":new Blob([t.outerHTML],{type:`text/html`})});await navigator.clipboard.write([d]),c(!0),o(!1),n?.(e),u.current=window.setTimeout(()=>c(!1),i)}catch(e){r?.(e)}};(0,y.useEffect)(()=>{let e=e=>{let t=e.composedPath();l.current&&!t.includes(l.current)&&o(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e),window.clearTimeout(u.current)}},[]);let p=s?Vb:Hb;return(0,k.jsxs)(`div`,{className:`relative`,ref:l,children:[(0,k.jsx)(`button`,{className:Zb(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,t),disabled:d,onClick:()=>o(!a),title:`Copy table`,type:`button`,children:e??(0,k.jsx)(p,{size:14})}),a?(0,k.jsxs)(`div`,{className:`absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg`,children:[(0,k.jsx)(`button`,{className:`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`,onClick:()=>f(`csv`),title:`Copy table as CSV`,type:`button`,children:`CSV`}),(0,k.jsx)(`button`,{className:`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`,onClick:()=>f(`tsv`),title:`Copy table as TSV`,type:`button`,children:`TSV`})]}):null]})},Dx=({children:e,className:t,onDownload:n,onError:r})=>{let[i,a]=(0,y.useState)(!1),o=(0,y.useRef)(null),{isAnimating:s}=(0,y.useContext)(FS),c=e=>{try{let t=(o.current?.closest(`[data-streamdown="table-wrapper"]`))?.querySelector(`table`);if(!t){r?.(Error(`Table not found`));return}let i=xx(t),s=e===`csv`?Sx(i):Tx(i);Qb(`table.${e===`csv`?`csv`:`md`}`,s,e===`csv`?`text/csv`:`text/markdown`),a(!1),n?.(e)}catch(e){r?.(e)}};return(0,y.useEffect)(()=>{let e=e=>{let t=e.composedPath();o.current&&!t.includes(o.current)&&a(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,k.jsxs)(`div`,{className:`relative`,ref:o,children:[(0,k.jsx)(`button`,{className:Zb(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,t),disabled:s,onClick:()=>a(!i),title:`Download table`,type:`button`,children:e??(0,k.jsx)(Ub,{size:14})}),i?(0,k.jsxs)(`div`,{className:`absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg`,children:[(0,k.jsx)(`button`,{className:`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`,onClick:()=>c(`csv`),title:`Download table as CSV`,type:`button`,children:`CSV`}),(0,k.jsx)(`button`,{className:`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`,onClick:()=>c(`markdown`),title:`Download table as Markdown`,type:`button`,children:`Markdown`})]}):null]})},Ox=({children:e,className:t,showControls:n,...r})=>(0,k.jsxs)(`div`,{className:`my-4 flex flex-col space-y-2`,"data-streamdown":`table-wrapper`,children:[n?(0,k.jsxs)(`div`,{className:`flex items-center justify-end gap-1`,children:[(0,k.jsx)(Ex,{}),(0,k.jsx)(Dx,{})]}):null,(0,k.jsx)(`div`,{className:`overflow-x-auto overscroll-y-auto`,children:(0,k.jsx)(`table`,{className:Zb(`w-full border-collapse border border-border`,t),"data-streamdown":`table`,...r,children:e})})]}),kx=(0,y.lazy)(()=>Eb(()=>import(`./code-block-OCS4YCEC-Dmmx1Rax.js`),[]).then(e=>({default:e.CodeBlock}))),Ax=(0,y.lazy)(()=>Eb(()=>import(`./mermaid-NOHMQCX5-D0R4kLcg.js`),[]).then(e=>({default:e.Mermaid}))),jx=/language-([^\s]+)/;function Mx(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,a=t.position.end;return n?.line===r?.line&&n?.column===r?.column&&i?.line===a?.line&&i?.column===a?.column}function Nx(e,t){return e.className===t.className&&Mx(e.node,t.node)}var Px=(e,t)=>typeof e==`boolean`?e:e[t]!==!1,Fx=(e,t)=>{if(typeof e==`boolean`)return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},Ix=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,k.jsx)(`ol`,{className:Zb(`list-inside list-decimal whitespace-normal [li_&]:pl-6`,t),"data-streamdown":`ordered-list`,...r,children:e}),(e,t)=>Nx(e,t));Ix.displayName=`MarkdownOl`;var Lx=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,k.jsx)(`li`,{className:Zb(`py-1 [&>p]:inline`,t),"data-streamdown":`list-item`,...r,children:e}),(e,t)=>e.className===t.className&&Mx(e.node,t.node));Lx.displayName=`MarkdownLi`;var Rx=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,k.jsx)(`ul`,{className:Zb(`list-inside list-disc whitespace-normal [li_&]:pl-6`,t),"data-streamdown":`unordered-list`,...r,children:e}),(e,t)=>Nx(e,t));Rx.displayName=`MarkdownUl`;var zx=(0,y.memo)(({className:e,node:t,...n})=>(0,k.jsx)(`hr`,{className:Zb(`my-6 border-border`,e),"data-streamdown":`horizontal-rule`,...n}),(e,t)=>Nx(e,t));zx.displayName=`MarkdownHr`;var Bx=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,k.jsx)(`span`,{className:Zb(`font-semibold`,t),"data-streamdown":`strong`,...r,children:e}),(e,t)=>Nx(e,t));Bx.displayName=`MarkdownStrong`;var Vx=(0,y.memo)(({children:e,className:t,href:n,node:r,...i})=>{let{linkSafety:a}=(0,y.useContext)(FS),[o,s]=(0,y.useState)(!1),c=n===`streamdown:incomplete-link`,l=(0,y.useCallback)(async e=>{if(!(!(a!=null&&a.enabled&&n)||c)){if(e.preventDefault(),a.onLinkCheck&&await a.onLinkCheck(n)){window.open(n,`_blank`,`noreferrer`);return}s(!0)}},[a,n,c]),u=(0,y.useCallback)(()=>{n&&window.open(n,`_blank`,`noreferrer`)},[n]),d=(0,y.useCallback)(()=>{s(!1)},[]),f={url:n??``,isOpen:o,onClose:d,onConfirm:u};return a!=null&&a.enabled&&n?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`button`,{className:Zb(`wrap-anywhere appearance-none text-left font-medium text-primary underline`,t),"data-incomplete":c,"data-streamdown":`link`,onClick:l,type:`button`,children:e}),a.renderModal?a.renderModal(f):(0,k.jsx)(ux,{...f})]}):(0,k.jsx)(`a`,{className:Zb(`wrap-anywhere font-medium text-primary underline`,t),"data-incomplete":c,"data-streamdown":`link`,href:n,rel:`noreferrer`,target:`_blank`,...i,children:e})},(e,t)=>Nx(e,t)&&e.href===t.href);Vx.displayName=`MarkdownA`;var Hx=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,k.jsx)(`h1`,{className:Zb(`mt-6 mb-2 font-semibold text-3xl`,t),"data-streamdown":`heading-1`,...r,children:e}),(e,t)=>Nx(e,t));Hx.displayName=`MarkdownH1`;var Ux=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,k.jsx)(`h2`,{className:Zb(`mt-6 mb-2 font-semibold text-2xl`,t),"data-streamdown":`heading-2`,...r,children:e}),(e,t)=>Nx(e,t));Ux.displayName=`MarkdownH2`;var Wx=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,k.jsx)(`h3`,{className:Zb(`mt-6 mb-2 font-semibold text-xl`,t),"data-streamdown":`heading-3`,...r,children:e}),(e,t)=>Nx(e,t));Wx.displayName=`MarkdownH3`;var Gx=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,k.jsx)(`h4`,{className:Zb(`mt-6 mb-2 font-semibold text-lg`,t),"data-streamdown":`heading-4`,...r,children:e}),(e,t)=>Nx(e,t));Gx.displayName=`MarkdownH4`;var Kx=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,k.jsx)(`h5`,{className:Zb(`mt-6 mb-2 font-semibold text-base`,t),"data-streamdown":`heading-5`,...r,children:e}),(e,t)=>Nx(e,t));Kx.displayName=`MarkdownH5`;var qx=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,k.jsx)(`h6`,{className:Zb(`mt-6 mb-2 font-semibold text-sm`,t),"data-streamdown":`heading-6`,...r,children:e}),(e,t)=>Nx(e,t));qx.displayName=`MarkdownH6`;var Jx=(0,y.memo)(({children:e,className:t,node:n,...r})=>{let{controls:i}=(0,y.useContext)(FS);return(0,k.jsx)(Ox,{className:t,showControls:Px(i,`table`),...r,children:e})},(e,t)=>Nx(e,t));Jx.displayName=`MarkdownTable`;var Yx=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,k.jsx)(`thead`,{className:Zb(`bg-muted/80`,t),"data-streamdown":`table-header`,...r,children:e}),(e,t)=>Nx(e,t));Yx.displayName=`MarkdownThead`;var Xx=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,k.jsx)(`tbody`,{className:Zb(`divide-y divide-border bg-muted/40`,t),"data-streamdown":`table-body`,...r,children:e}),(e,t)=>Nx(e,t));Xx.displayName=`MarkdownTbody`;var Zx=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,k.jsx)(`tr`,{className:Zb(`border-border border-b`,t),"data-streamdown":`table-row`,...r,children:e}),(e,t)=>Nx(e,t));Zx.displayName=`MarkdownTr`;var Qx=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,k.jsx)(`th`,{className:Zb(`whitespace-nowrap px-4 py-2 text-left font-semibold text-sm`,t),"data-streamdown":`table-header-cell`,...r,children:e}),(e,t)=>Nx(e,t));Qx.displayName=`MarkdownTh`;var $x=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,k.jsx)(`td`,{className:Zb(`px-4 py-2 text-sm`,t),"data-streamdown":`table-cell`,...r,children:e}),(e,t)=>Nx(e,t));$x.displayName=`MarkdownTd`;var eS=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,k.jsx)(`blockquote`,{className:Zb(`my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic`,t),"data-streamdown":`blockquote`,...r,children:e}),(e,t)=>Nx(e,t));eS.displayName=`MarkdownBlockquote`;var tS=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,k.jsx)(`sup`,{className:Zb(`text-sm`,t),"data-streamdown":`superscript`,...r,children:e}),(e,t)=>Nx(e,t));tS.displayName=`MarkdownSup`;var nS=(0,y.memo)(({children:e,className:t,node:n,...r})=>(0,k.jsx)(`sub`,{className:Zb(`text-sm`,t),"data-streamdown":`subscript`,...r,children:e}),(e,t)=>Nx(e,t));nS.displayName=`MarkdownSub`;var rS=(0,y.memo)(({children:e,className:t,node:n,...r})=>{if(`data-footnotes`in r){let n=e=>{if(!(0,y.isValidElement)(e))return!1;let t=Array.isArray(e.props.children)?e.props.children:[e.props.children],n=!1,r=!1;for(let e of t)if(e){if(typeof e==`string`)e.trim()!==``&&(n=!0);else if((0,y.isValidElement)(e))if(e.props?.[`data-footnote-backref`]!==void 0)r=!0;else{let t=Array.isArray(e.props.children)?e.props.children:[e.props.children];for(let e of t){if(typeof e==`string`&&e.trim()!==``){n=!0;break}if((0,y.isValidElement)(e)&&e.props?.[`data-footnote-backref`]===void 0){n=!0;break}}}}return r&&!n},i=Array.isArray(e)?e.map(e=>{if(!(0,y.isValidElement)(e))return e;if(e.type===Ix){let t=(Array.isArray(e.props.children)?e.props.children:[e.props.children]).filter(e=>!n(e));return t.length===0?null:{...e,props:{...e.props,children:t}}}return e}):e;return(Array.isArray(i)?i.some(e=>e!==null):i!==null)?(0,k.jsx)(`section`,{className:t,...r,children:i}):null}return(0,k.jsx)(`section`,{className:t,...r,children:e})},(e,t)=>Nx(e,t));rS.displayName=`MarkdownSection`;var iS=(0,y.memo)(({node:e,className:t,children:n,...r})=>{let i=!(`data-block`in r),{mermaid:a,controls:o}=(0,y.useContext)(FS),s=mx();if(i)return(0,k.jsx)(`code`,{className:Zb(`rounded bg-muted px-1.5 py-0.5 font-mono text-sm`,t),"data-streamdown":`inline-code`,...r,children:n});let c=(t?.match(jx))?.at(1)??``,l=``;if((0,y.isValidElement)(n)&&n.props&&typeof n.props==`object`&&`children`in n.props&&typeof n.props.children==`string`?l=n.props.children:typeof n==`string`&&(l=n),c===`mermaid`&&s){let e=Px(o,`mermaid`),n=Fx(o,`download`),r=Fx(o,`copy`),i=Fx(o,`fullscreen`),s=Fx(o,`panZoom`),c=e&&(n||r||i);return(0,k.jsx)(y.Suspense,{fallback:(0,k.jsx)(ix,{}),children:(0,k.jsxs)(`div`,{className:Zb(`group relative my-4 h-auto rounded-xl border p-4`,t),"data-streamdown":`mermaid-block`,children:[c?(0,k.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[n?(0,k.jsx)(gx,{chart:l,config:a?.config}):null,r?(0,k.jsx)(tx,{code:l}):null,i?(0,k.jsx)(bx,{chart:l,config:a?.config}):null]}):null,(0,k.jsx)(Ax,{chart:l,config:a?.config,showControls:s})]})})}let u=Px(o,`code`);return(0,k.jsx)(y.Suspense,{fallback:(0,k.jsx)(ix,{}),children:(0,k.jsx)(kx,{className:Zb(`overflow-x-auto border-border border-t`,t),code:l,language:c,children:u?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(rx,{code:l,language:c}),(0,k.jsx)(tx,{})]}):null})})},(e,t)=>e.className===t.className&&Mx(e.node,t.node));iS.displayName=`MarkdownCode`;var aS=(0,y.memo)(ox,(e,t)=>e.className===t.className&&Mx(e.node,t.node));aS.displayName=`MarkdownImg`;var oS=(0,y.memo)(({children:e,className:t,node:n,...r})=>{let i=(Array.isArray(e)?e:[e]).filter(e=>e!=null&&e!==``);if(i.length===1&&(0,y.isValidElement)(i[0])){let t=i[0].props.node?.tagName;if(t===`img`||t===`code`&&`data-block`in i[0].props)return(0,k.jsx)(k.Fragment,{children:e})}return(0,k.jsx)(`p`,{className:t,...r,children:e})},(e,t)=>Nx(e,t));oS.displayName=`MarkdownParagraph`;var sS={ol:Ix,li:Lx,ul:Rx,hr:zx,strong:Bx,a:Vx,h1:Hx,h2:Ux,h3:Wx,h4:Gx,h5:Kx,h6:qx,table:Jx,thead:Yx,tbody:Xx,tr:Zx,th:Qx,td:$x,blockquote:eS,code:iS,img:aS,pre:({children:e})=>(0,y.isValidElement)(e)?(0,y.cloneElement)(e,{"data-block":`true`}):e,sup:tS,sub:nS,p:oS,section:rS},cS=()=>e=>{Ie(e,`html`,(e,t,n)=>{!n||typeof t!=`number`||(n.children[t]={type:`text`,value:e.value})})},lS=[],uS={allowDangerousHtml:!0},dS=new WeakMap,fS=new class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,r=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(n||r||i)){let t=`default`;return this.keyCache.set(e,t),t}let a=e=>{if(!e||e.length===0)return``;let t=``;for(let n=0;n0&&(t+=`,`),Array.isArray(r)){let[e,n]=r;if(typeof e==`function`){let n=dS.get(e);n||(n=e.name,dS.set(e,n)),t+=n}else t+=String(e);t+=`:`,t+=JSON.stringify(n)}else if(typeof r==`function`){let e=dS.get(r);e||(e=r.name,dS.set(r,e)),t+=e}else t+=String(r)}return t},o=a(n),s=`${a(r)}::${o}::${i?JSON.stringify(i):``}`;return this.keyCache.set(e,s),s}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let e=this.cache.keys().next().value;e&&this.cache.delete(e)}this.cache.set(n,t)}clear(){this.cache.clear()}},pS=e=>{let t=mS(e),n=e.children||``;return xS(t.runSync(t.parse(n),n),e)},mS=e=>{let t=fS.get(e);if(t)return t;let n=gS(e);return fS.set(e,n),n},hS=e=>e.some(e=>Array.isArray(e)?e[0]===is:e===is),gS=e=>{let t=e.rehypePlugins||lS,n=e.remarkPlugins||lS,r=hS(t)?n:[...n,cS],i=e.remarkRehypeOptions?{...uS,...e.remarkRehypeOptions}:uS;return Pv().use(h_).use(r).use(ov,i).use(t)},_S=e=>e,vS=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:`text`,value:r}},yS=(e,t)=>{for(let n in Ag)if(Object.hasOwn(Ag,n)&&Object.hasOwn(e.properties,n)){let r=e.properties[n],i=Ag[n];(i===null||i.includes(e.tagName))&&(e.properties[n]=t(String(r||``),n,e)??void 0)}},bS=(e,t,n,r,i,a)=>{let o=!1;return r?o=!r.includes(e.tagName):i&&(o=i.includes(e.tagName)),!o&&a&&typeof t==`number`&&(o=!a(e,t,n)),o},xS=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:a,unwrapDisallowed:o,urlTransform:s}=t;if(n||r||i||a||s){let t=s||_S;Ie(e,(e,s,c)=>{if(e.type===`raw`&&c&&typeof s==`number`)return vS(c,s,a,e.value),s;if(e.type===`element`&&(yS(e,t),bS(e,s,c,r,i,n)&&c&&typeof s==`number`))return o&&e.children?c.children.splice(s,1,...e.children):c.children.splice(s,1),s})}return cg(e,{Fragment:k.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:k.jsx,jsxs:k.jsxs,passKeys:!0,passNode:!0})},SS=/\[\^[\w-]{1,200}\](?!:)/,CS=/\[\^[\w-]{1,200}\]:/,wS=/<\/(\w+)>/,TS=/<(\w+)[\s>]/,ES=new Set([`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`]),DS=e=>{let t=0;for(let n=0;n{let t=SS.test(e),n=CS.test(e);if(t||n)return[e];let r=gb.lex(e,{gfm:!0}),i=[],a=[],o=!1;for(let e of r){let t=e.raw,n=i.length;if(a.length>0){if(i[n-1]+=t,e.type===`html`){let e=t.match(wS);if(e){let t=e[1];a.at(-1)===t&&a.pop()}}continue}if(e.type===`html`&&e.block){let e=t.match(TS);if(e){let n=e[1];t.includes(``)||ES.has(n.toLowerCase())||a.push(n)}}if(n>0&&!o){let e=i[n-1];if(DS(e)%2==1){i[n-1]=e+t;continue}}i.push(t),e.type!==`space`&&(o=e.type===`code`)}return i},kS={...os,protocols:{...os.protocols,href:[...os.protocols?.href??[],`tel`]}},AS={raw:is,sanitize:[Cs,kS],harden:[Le,{allowedImagePrefixes:[`*`],allowedLinkPrefixes:[`*`],allowedProtocols:[`*`],defaultOrigin:void 0,allowDataImages:!0}]},jS={gfm:[Vf,{}]},MS=Object.values(AS),NS=Object.values(jS),PS={block:` ▋`,circle:` ●`},FS=(0,y.createContext)({shikiTheme:[`github-light`,`github-dark`],controls:!0,isAnimating:!1,mode:`streaming`,mermaid:void 0,linkSafety:{enabled:!0}}),IS=(0,y.memo)(({content:e,shouldParseIncompleteMarkdown:t,index:n,...r})=>(0,k.jsx)(pS,{...r,children:e}),(e,t)=>{if(e.content!==t.content||e.index!==t.index)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(n=>e.components?.[n]!==t.components?.[n]))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});IS.displayName=`Block`;var LS=[`github-light`,`github-dark`],RS=(0,y.memo)(({children:e,mode:t=`streaming`,parseIncompleteMarkdown:n=!0,components:r,rehypePlugins:i=MS,remarkPlugins:a=NS,className:o,shikiTheme:s=LS,mermaid:c,controls:l=!0,isAnimating:u=!1,animated:d,BlockComponent:f=IS,parseMarkdownIntoBlocksFn:p=OS,caret:m,plugins:h,remend:g,linkSafety:_={enabled:!0},allowedTags:v,...b})=>{let x=(0,y.useId)(),[ee,S]=(0,y.useTransition)(),C=(0,y.useMemo)(()=>typeof e==`string`?t===`streaming`&&n?mm(e,g):e:``,[e,t,n,g]),w=(0,y.useMemo)(()=>p(C),[C,p]),[T,te]=(0,y.useState)(w);(0,y.useEffect)(()=>{t===`streaming`?S(()=>{te(w)}):te(w)},[w,t]);let ne=t===`streaming`?T:w,E=(0,y.useMemo)(()=>ne.map((e,t)=>`${x}-${t}`),[ne.length,x]),D=(0,y.useMemo)(()=>d?d===!0?Bb():Bb(d):null,[d]),re=(0,y.useMemo)(()=>({shikiTheme:(h?.code)?.getThemes()??s,controls:l,isAnimating:u,mode:t,mermaid:c,linkSafety:_}),[s,l,u,t,c,_,h?.code]),ie=(0,y.useMemo)(()=>({...sS,...r}),[r]),ae=(0,y.useMemo)(()=>{let e=[];return h!=null&&h.cjk&&(e=[...e,...h.cjk.remarkPluginsBefore]),e=[...e,...a],h!=null&&h.cjk&&(e=[...e,...h.cjk.remarkPluginsAfter]),h!=null&&h.math&&(e=[...e,h.math.remarkPlugin]),e},[a,h?.math,h?.cjk]),O=(0,y.useMemo)(()=>{let e=i;if(v&&Object.keys(v).length>0&&i===MS){let t={...kS,tagNames:[...kS.tagNames??[],...Object.keys(v)],attributes:{...kS.attributes,...v}};e=[AS.raw,[Cs,t],AS.harden]}return h!=null&&h.math&&(e=[...e,h.math.rehypePlugin]),D&&u&&(e=[...e,D.rehypePlugin]),e},[i,h?.math,D,u,v]),oe=(0,y.useMemo)(()=>m&&u?{"--streamdown-caret":`"${PS[m]}"`}:void 0,[m,u]);return t===`static`?(0,k.jsx)(dx.Provider,{value:h??null,children:(0,k.jsx)(FS.Provider,{value:re,children:(0,k.jsx)(`div`,{className:Zb(`space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0`,o),children:(0,k.jsx)(pS,{components:ie,rehypePlugins:O,remarkPlugins:ae,...b,children:e})})})}):(0,k.jsx)(dx.Provider,{value:h??null,children:(0,k.jsx)(FS.Provider,{value:re,children:(0,k.jsxs)(`div`,{className:Zb(`space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0`,m?`*:last:after:inline *:last:after:align-baseline *:last:after:content-[var(--streamdown-caret)]`:null,o),style:oe,children:[ne.length===0&&m&&u&&(0,k.jsx)(`span`,{}),ne.map((e,t)=>(0,k.jsx)(f,{components:ie,content:e,index:t,rehypePlugins:O,remarkPlugins:ae,shouldParseIncompleteMarkdown:n,...b},E[t]))]})})})},(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);RS.displayName=`Streamdown`;var zS=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:a=!0,initialZoom:o=1,fullscreen:s=!1})=>{let c=(0,y.useRef)(null),l=(0,y.useRef)(null),[u,d]=(0,y.useState)(o),[f,p]=(0,y.useState)({x:0,y:0}),[m,h]=(0,y.useState)(!1),[g,_]=(0,y.useState)({x:0,y:0}),[v,b]=(0,y.useState)({x:0,y:0}),x=(0,y.useCallback)(e=>{d(t=>Math.max(n,Math.min(r,t+e)))},[n,r]),ee=(0,y.useCallback)(()=>{x(i)},[x,i]),S=(0,y.useCallback)(()=>{x(-i)},[x,i]),C=(0,y.useCallback)(()=>{d(o),p({x:0,y:0})},[o]),w=(0,y.useCallback)(e=>{e.preventDefault(),x(e.deltaY>0?-i:i)},[x,i]),T=(0,y.useCallback)(e=>{if(e.button!==0||e.isPrimary===!1)return;h(!0),_({x:e.clientX,y:e.clientY}),b(f);let t=e.currentTarget;t instanceof HTMLElement&&t.setPointerCapture(e.pointerId)},[f]),te=(0,y.useCallback)(e=>{if(!m)return;e.preventDefault();let t=e.clientX-g.x,n=e.clientY-g.y;p({x:v.x+t,y:v.y+n})},[m,g,v]),ne=(0,y.useCallback)(e=>{h(!1);let t=e.currentTarget;t instanceof HTMLElement&&t.releasePointerCapture(e.pointerId)},[]);return(0,y.useEffect)(()=>{let e=c.current;if(e)return e.addEventListener(`wheel`,w,{passive:!1}),()=>{e.removeEventListener(`wheel`,w)}},[w]),(0,y.useEffect)(()=>{let e=l.current;if(e&&m)return document.body.style.userSelect=`none`,e.addEventListener(`pointermove`,te,{passive:!1}),e.addEventListener(`pointerup`,ne),e.addEventListener(`pointercancel`,ne),()=>{document.body.style.userSelect=``,e.removeEventListener(`pointermove`,te),e.removeEventListener(`pointerup`,ne),e.removeEventListener(`pointercancel`,ne)}},[m,te,ne]),(0,k.jsxs)(`div`,{className:Zb(`relative flex flex-col`,s?`h-full w-full`:`min-h-28 w-full`,t),ref:c,style:{cursor:m?`grabbing`:`grab`},children:[a?(0,k.jsxs)(`div`,{className:Zb(`absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/90 p-1 shadow-sm backdrop-blur-sm`,s?`bottom-4 left-4`:`bottom-2 left-2`),children:[(0,k.jsx)(`button`,{className:`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:u>=r,onClick:ee,title:`Zoom in`,type:`button`,children:(0,k.jsx)(Yb,{size:16})}),(0,k.jsx)(`button`,{className:`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:u<=n,onClick:S,title:`Zoom out`,type:`button`,children:(0,k.jsx)(Xb,{size:16})}),(0,k.jsx)(`button`,{className:`flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground`,onClick:C,title:`Reset zoom and pan`,type:`button`,children:(0,k.jsx)(Kb,{size:16})})]}):null,(0,k.jsx)(`div`,{className:Zb(`flex-1 origin-center transition-transform duration-150 ease-out`,s?`flex h-full w-full items-center justify-center`:`flex w-full items-center justify-center`),onPointerDown:T,ref:l,role:`application`,style:{transform:`translate(${f.x}px, ${f.y}px) scale(${u})`,transformOrigin:`center center`,touchAction:`none`,willChange:`transform`},children:e})]})},BS=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let[a,o]=(0,y.useState)(null),[s,c]=(0,y.useState)(!1),[l,u]=(0,y.useState)(``),[d,f]=(0,y.useState)(``),[p,m]=(0,y.useState)(0),{mermaid:h}=(0,y.useContext)(FS),g=mx(),_=h?.errorComponent,{shouldRender:v,containerRef:b}=Ab({immediate:r});if((0,y.useEffect)(()=>{if(v){if(!g){o(`Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.`);return}(async()=>{try{o(null),c(!0);let t=g.getMermaid(n),r=e.split(``).reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0),i=`mermaid-${Math.abs(r)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:a}=await t.render(i,e);u(a),f(a)}catch(e){d||l||o(e instanceof Error?e.message:`Failed to render Mermaid chart`)}finally{c(!1)}})()}},[e,n,p,v,g]),!(v||l||d))return(0,k.jsx)(`div`,{className:Zb(`my-4 min-h-[200px]`,t),ref:b});if(s&&!l&&!d)return(0,k.jsx)(`div`,{className:Zb(`my-4 flex justify-center p-4`,t),ref:b,children:(0,k.jsxs)(`div`,{className:`flex items-center space-x-2 text-muted-foreground`,children:[(0,k.jsx)(`div`,{className:`h-4 w-4 animate-spin rounded-full border-current border-b-2`}),(0,k.jsx)(`span`,{className:`text-sm`,children:`Loading diagram...`})]})});if(a&&!l&&!d)return _?(0,k.jsx)(`div`,{ref:b,children:(0,k.jsx)(_,{chart:e,error:a,retry:()=>m(e=>e+1)})}):(0,k.jsxs)(`div`,{className:Zb(`rounded-lg border border-red-200 bg-red-50 p-4`,t),ref:b,children:[(0,k.jsxs)(`p`,{className:`font-mono text-red-700 text-sm`,children:[`Mermaid Error: `,a]}),(0,k.jsxs)(`details`,{className:`mt-2`,children:[(0,k.jsx)(`summary`,{className:`cursor-pointer text-red-600 text-xs`,children:`Show Code`}),(0,k.jsx)(`pre`,{className:`mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs`,children:e})]})]});let x=l||d;return(0,k.jsx)(`div`,{className:Zb(`size-full`,t),"data-streamdown":`mermaid`,ref:b,children:(0,k.jsx)(zS,{className:Zb(r?`size-full overflow-hidden`:`my-4 overflow-hidden`,t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:(0,k.jsx)(`div`,{"aria-label":`Mermaid chart`,className:Zb(`flex justify-center`,r?`size-full items-center`:null),dangerouslySetInnerHTML:{__html:x},role:`img`})})})};function VS(e,t){return HS(e,t||{})||{type:`root`,children:[]}}function HS(e,t){let n=US(e,t);return n&&t.afterTransform&&t.afterTransform(e,n),n}function US(e,t){switch(e.nodeType){case 1:return JS(e,t);case 3:return KS(e);case 8:return qS(e);case 9:return WS(e,t);case 10:return GS();case 11:return WS(e,t);default:return}}function WS(e,t){return{type:`root`,children:YS(e,t)}}function GS(){return{type:`doctype`}}function KS(e){return{type:`text`,value:e.nodeValue||``}}function qS(e){return{type:`comment`,value:e.nodeValue||``}}function JS(e,t){let n=e.namespaceURI,r=n===en.svg?Zt:Xt,i=n===en.html?e.tagName.toLowerCase():e.tagName,a=n===en.html&&i===`template`?e.content:e,o=e.getAttributeNames(),s={},c=-1;for(;++cl&&(l=e):e&&(l!==void 0&&l>-1&&c.push(` +`.repeat(l)||` `),l=-1,c.push(e))}return c.join(``)}function hC(e,t,n){return e.type===`element`?gC(e,t,n):e.type===`text`?n.whitespace===`normal`?_C(e,n):vC(e):[]}function gC(e,t,n){let r=bC(e,n),i=e.children||[],a=-1,o=[];if(fC(e))return o;let s,c;for(cC(e)||dC(e)&&$S(t,e,dC)?c=` +`:uC(e)?(s=2,c=2):pC(e)&&(s=1,c=1);++a15?`…`+s.slice(i-15,i):s.slice(0,i),u=a+15":`>`,"<":`<`,'"':`"`,"'":`'`},AC=/[&><"']/g;function jC(e){return String(e).replace(AC,e=>kC[e])}var MC=function e(t){return t.type===`ordgroup`||t.type===`color`?t.body.length===1?e(t.body[0]):t:t.type===`font`?e(t.body):t},NC=function(e){var t=MC(e);return t.type===`mathord`||t.type===`textord`||t.type===`atom`},PC=function(e){if(!e)throw Error(`Expected non-null, but got `+String(e));return e},FC={deflt:EC,escape:jC,hyphenate:OC,getBaseElem:MC,isCharacterBox:NC,protocolFromUrl:function(e){var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?t[2]!==`:`||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():`_relative`}},IC={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 `},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 `,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 `,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 `,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 `,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 `,cliProcessor:e=>e===`Infinity`?1/0:parseInt(e)},globalGroup:{type:`boolean`,cli:!1}};function LC(e){if(e.default)return e.default;var t=e.type,n=Array.isArray(t)?t[0]:t;if(typeof n!=`string`)return n.enum[0];switch(n){case`boolean`:return!1;case`string`:return``;case`number`:return 0;case`object`:return{}}}var RC=class{constructor(e){for(var t in 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,e||={},IC)if(IC.hasOwnProperty(t)){var n=IC[t];this[t]=e[t]===void 0?LC(n):n.processor?n.processor(e[t]):e[t]}}reportNonstrict(e,t,n){var r=this.strict;if(typeof r==`function`&&(r=r(e,t,n)),!(!r||r===`ignore`)){if(r===!0||r===`error`)throw new z(`LaTeX-incompatible input and strict mode is set to 'error': `+(t+` [`+e+`]`),n);r===`warn`?typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)):typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`))}}useStrictBehavior(e,t,n){var r=this.strict;if(typeof r==`function`)try{r=r(e,t,n)}catch{r=`error`}return!r||r===`ignore`?!1:r===!0||r===`error`?!0:r===`warn`?(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)),!1):(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`)),!1)}isTrusted(e){if(e.url&&!e.protocol){var t=FC.protocolFromUrl(e.url);if(t==null)return!1;e.protocol=t}return!!(typeof this.trust==`function`?this.trust(e):this.trust)}},zC=class{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return JC[YC[this.id]]}sub(){return JC[XC[this.id]]}fracNum(){return JC[ZC[this.id]]}fracDen(){return JC[QC[this.id]]}cramp(){return JC[$C[this.id]]}text(){return JC[ew[this.id]]}isTight(){return this.size>=2}},BC=0,VC=1,HC=2,UC=3,WC=4,GC=5,KC=6,qC=7,JC=[new zC(BC,0,!1),new zC(VC,0,!0),new zC(HC,1,!1),new zC(UC,1,!0),new zC(WC,2,!1),new zC(GC,2,!0),new zC(KC,3,!1),new zC(qC,3,!0)],YC=[WC,GC,WC,GC,KC,qC,KC,qC],XC=[GC,GC,GC,GC,qC,qC,qC,qC],ZC=[HC,UC,WC,GC,KC,qC,KC,qC],QC=[UC,UC,GC,GC,qC,qC,qC,qC],$C=[VC,VC,UC,UC,GC,GC,qC,qC],ew=[BC,VC,HC,UC,HC,UC,HC,UC],tw={DISPLAY:JC[BC],TEXT:JC[HC],SCRIPT:JC[WC],SCRIPTSCRIPT:JC[KC]},nw=[{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 rw(e){for(var t=0;t=i[0]&&e<=i[1])return n.name}return null}var iw=[];nw.forEach(e=>e.blocks.forEach(e=>iw.push(...e)));function aw(e){for(var t=0;t=iw[t]&&e<=iw[t+1])return!0;return!1}var ow=80,sw=function(e,t){return`M95,`+(622+e+t)+` +c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 +c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 +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 +s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 +c69,-144,104.5,-217.7,106.5,-221 +l`+e/2.075+` -`+e+` +c5.3,-9.3,12,-14,20,-14 +H400000v`+(40+e)+`H845.2724 +s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 +c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z +M`+(834+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},cw=function(e,t){return`M263,`+(601+e+t)+`c0.7,0,18,39.7,52,119 +c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 +c340,-704.7,510.7,-1060.3,512,-1067 +l`+e/2.084+` -`+e+` +c4.7,-7.3,11,-11,19,-11 +H40000v`+(40+e)+`H1012.3 +s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 +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 +s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 +c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z +M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},lw=function(e,t){return`M983 `+(10+e+t)+` +l`+e/3.13+` -`+e+` +c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+` +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 +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 +c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 +c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 +c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 +c53.7,-170.3,84.5,-266.8,92.5,-289.5z +M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},uw=function(e,t){return`M424,`+(2398+e+t)+` +c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 +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 +s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 +s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 +l`+e/4.223+` -`+e+`c4,-6.7,10,-10,18,-10 H400000 +v`+(40+e)+`H1014.6 +s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 +c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+` `+t+` +h400000v`+(40+e)+`h-400000z`},dw=function(e,t){return`M473,`+(2713+e+t)+` +c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+` -`+e+` +c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7 +s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 +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 +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 +s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, +606zM`+(1001+e)+` `+t+`h400000v`+(40+e)+`H1017.7z`},fw=function(e){var t=e/2;return`M400000 `+e+` H0 L`+t+` 0 l65 45 L145 `+(e-80)+` H400000z`},pw=function(e,t,n){var r=n-54-t-e;return`M702 `+(e+t)+`H400000`+(40+e)+` +H742v`+r+`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 +h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 +c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 +219 661 l218 661zM702 `+t+`H400000v`+(40+e)+`H742z`},mw=function(e,t,n){t=1e3*t;var r=``;switch(e){case`sqrtMain`:r=sw(t,ow);break;case`sqrtSize1`:r=cw(t,ow);break;case`sqrtSize2`:r=lw(t,ow);break;case`sqrtSize3`:r=uw(t,ow);break;case`sqrtSize4`:r=dw(t,ow);break;case`sqrtTall`:r=pw(t,ow,n)}return r},hw=function(e,t){switch(e){case`⎜`:return`M291 0 H417 V`+t+` H291z M291 0 H417 V`+t+` H291z`;case`∣`:return`M145 0 H188 V`+t+` H145z M145 0 H188 V`+t+` H145z`;case`∥`:return`M145 0 H188 V`+t+` H145z M145 0 H188 V`+t+` H145z`+(`M367 0 H410 V`+t+` H367z M367 0 H410 V`+t+` H367z`);case`⎟`:return`M457 0 H583 V`+t+` H457z M457 0 H583 V`+t+` H457z`;case`⎢`:return`M319 0 H403 V`+t+` H319z M319 0 H403 V`+t+` H319z`;case`⎥`:return`M263 0 H347 V`+t+` H263z M263 0 H347 V`+t+` H263z`;case`⎪`:return`M384 0 H504 V`+t+` H384z M384 0 H504 V`+t+` H384z`;case`⏐`:return`M312 0 H355 V`+t+` H312z M312 0 H355 V`+t+` H312z`;case`‖`:return`M257 0 H300 V`+t+` H257z M257 0 H300 V`+t+` H257z`+(`M478 0 H521 V`+t+` H478z M478 0 H521 V`+t+` H478z`);default:return``}},gw={doubleleftarrow:`M262 157 +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 + 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 + 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 +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 + 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 +-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 +-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z +m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l +-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 + 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 +-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 +-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 +-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 +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 +-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 + 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 +-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 +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 + 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 + 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 + l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 +-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 + 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 + 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 + 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 +-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 +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 + 435 0h399565z`,leftgroupunder:`M400000 262 +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 + 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 +-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 +-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 +-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 + 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 +-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 +-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z +m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 + 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 + 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 +-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 + 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 +-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 +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 +-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 +-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 + 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z +M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z +M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 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-70-101l-7-8h399905v-40H95l7-8 +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 + 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z +M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334 +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 +-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 + 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 + 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 +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 + 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 + 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 +-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 +-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z +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 +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 +-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z +m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 +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 +-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z +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 +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 +-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z +m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 +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 +-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 + 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 + 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 +-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 +-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 + 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l +-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 +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 +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 + 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 +-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 + 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 + 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 +-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 +-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 + 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 +-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 + 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 +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 + 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 +-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 +-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 + 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 + 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 +-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z +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 + 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 +-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 + 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z +M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 + 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 +-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 +-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 + 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 +-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 +-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 +-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 + 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 +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 + 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 + 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 +-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 + 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 +-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 + 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 + 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 +-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 +-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 + 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 +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 + 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 +-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 + 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 + 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 + -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 +-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 + 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 + 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 + -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 +3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 +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 +-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 +-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 +H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 +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 +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 +-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 +-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 +-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, +-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, +-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, +-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, +-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 +c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 +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 +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 +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 +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 +c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z +M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-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 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 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-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 +-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 +151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 +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 +c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 +c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z +M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 +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, +-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 +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 +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 +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, +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, +-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z +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 +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, +-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 +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 +M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},_w=function(e,t){switch(e){case`lbrack`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v1759 h347 v-84 +H403z M403 1759 V0 H319 V1759 v`+t+` v1759 h84z`;case`rbrack`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v1759 H0 v84 H347z +M347 1759 V0 H263 V1759 v`+t+` v1759 h84z`;case`vert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z`;case`doublevert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z +M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+` v585 h43z`;case`lfloor`:return`M319 602 V0 H403 V602 v`+t+` v1715 h263 v84 H319z +MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`rfloor`:return`M319 602 V0 H403 V602 v`+t+` v1799 H0 v-84 H319z +MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`lceil`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v602 h84z +M403 1759 V0 H319 V1759 v`+t+` v602 h84z`;case`rceil`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v602 h84z +M347 1759 V0 h-84 V1759 v`+t+` 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 +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, +-36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, +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 +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, +-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 +l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, +-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, +63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 +c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+` +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 +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 +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 +c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 +l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, +-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw Error(`Unknown stretchy delimiter.`)}},vw=class{constructor(e){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=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;te.toText()).join(``)}},yw={"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]}},bw={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]},xw={Å:`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 Sw(e,t){yw[e]=t}function Cw(e,t,n){if(!yw[t])throw Error(`Font metrics not found for font: `+t+`.`);var r=e.charCodeAt(0),i=yw[t][r];if(!i&&e[0]in xw&&(r=xw[e[0]].charCodeAt(0),i=yw[t][r]),!i&&n===`text`&&aw(r)&&(i=yw[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var ww={};function Tw(e){var t=e>=5?0:e>=3?1:2;if(!ww[t]){var n=ww[t]={cssEmPerMu:bw.quad[t]/18};for(var r in bw)bw.hasOwnProperty(r)&&(n[r]=bw[r][t])}return ww[t]}var Ew=[[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]],Dw=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Ow=function(e,t){return t.size<2?e:Ew[e-1][t.size-1]},kw=class e{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||e.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=Dw[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var n={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};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);return new e(n)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Ow(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:Dw[e-1]})}havingBaseStyle(t){t||=this.style.text();var n=Ow(e.BASESIZE,t);return this.size===n&&this.textSize===e.BASESIZE&&this.style===t?this:this.extend({style:t,size:n})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:``})}withTextFontWeight(e){return this.extend({fontWeight:e,font:``})}withTextFontShape(e){return this.extend({fontShape:e,font:``})}sizingClasses(e){return e.size===this.size?[]:[`sizing`,`reset-size`+e.size,`size`+this.size]}baseSizingClasses(){return this.size===e.BASESIZE?[]:[`sizing`,`reset-size`+this.size,`size`+e.BASESIZE]}fontMetrics(){return this._fontMetrics||=Tw(this.size),this._fontMetrics}getColor(){return this.phantom?`transparent`:this.color}};kw.BASESIZE=6;var Aw={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},jw={ex:!0,em:!0,mu:!0},Mw=function(e){return typeof e!=`string`&&(e=e.unit),e in Aw||e in jw||e===`ex`},Nw=function(e,t){var n;if(e.unit in Aw)n=Aw[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit===`mu`)n=t.fontMetrics().cssEmPerMu;else{var r=t.style.isTight()?t.havingStyle(t.style.text()):t;if(e.unit===`ex`)n=r.fontMetrics().xHeight;else if(e.unit===`em`)n=r.fontMetrics().quad;else throw new z(`Invalid unit: '`+e.unit+`'`);r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},B=function(e){return+e.toFixed(4)+`em`},Pw=function(e){return e.filter(e=>e).join(` `)},Fw=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push(`mtight`);var r=t.getColor();r&&(this.style.color=r)}},Iw=function(e){var t=document.createElement(e);for(var n in t.className=Pw(this.classes),this.style)this.style.hasOwnProperty(n)&&(t.style[n]=this.style[n]);for(var r in this.attributes)this.attributes.hasOwnProperty(r)&&t.setAttribute(r,this.attributes[r]);for(var i=0;i/=\x00-\x1f]/,Rw=function(e){var t=`<`+e;this.classes.length&&(t+=` class="`+FC.escape(Pw(this.classes))+`"`);var n=``;for(var r in this.style)this.style.hasOwnProperty(r)&&(n+=FC.hyphenate(r)+`:`+this.style[r]+`;`);for(var i in n&&(t+=` style="`+FC.escape(n)+`"`),this.attributes)if(this.attributes.hasOwnProperty(i)){if(Lw.test(i))throw new z(`Invalid attribute name '`+i+`'`);t+=` `+i+`="`+FC.escape(this.attributes[i])+`"`}t+=`>`;for(var a=0;a`,t},zw=class{constructor(e,t,n,r){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,Fw.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return Iw.call(this,`span`)}toMarkup(){return Rw.call(this,`span`)}},Bw=class{constructor(e,t,n,r){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,Fw.call(this,t,r),this.children=n||[],this.setAttribute(`href`,e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return Iw.call(this,`a`)}toMarkup(){return Rw.call(this,`a`)}},Vw=class{constructor(e,t,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=t,this.src=e,this.classes=[`mord`],this.style=n}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement(`img`);for(var t in e.src=this.src,e.alt=this.alt,e.className=`mord`,this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var e=``+FC.escape(this.alt)+``,e}},Hw={î:`ı̂`,ï:`ı̈`,í:`ı́`,ì:`ı̀`},Uw=class{constructor(e,t,n,r,i,a,o,s){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=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=i||0,this.width=a||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0;var c=rw(this.text.charCodeAt(0));c&&this.classes.push(c+`_fallback`),/[îïíì]/.test(this.text)&&(this.text=Hw[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),t=null;for(var n in this.italic>0&&(t=document.createElement(`span`),t.style.marginRight=B(this.italic)),this.classes.length>0&&(t||=document.createElement(`span`),t.className=Pw(this.classes)),this.style)this.style.hasOwnProperty(n)&&(t||=document.createElement(`span`),t.style[n]=this.style[n]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t=`0&&(n+=`margin-right:`+this.italic+`em;`),this.style)this.style.hasOwnProperty(r)&&(n+=FC.hyphenate(r)+`:`+this.style[r]+`;`);n&&(e=!0,t+=` style="`+FC.escape(n)+`"`);var i=FC.escape(this.text);return e?(t+=`>`,t+=i,t+=``,t):i}},Ww=class{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var n=0;n`;for(var n=0;n`,e}},Gw=class{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);return this.alternate?e.setAttribute(`d`,this.alternate):e.setAttribute(`d`,gw[this.pathName]),e}toMarkup(){return this.alternate?``:``}},Kw=class{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`line`);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e=``,e}};function qw(e){if(e instanceof Uw)return e;throw Error(`Expected symbolNode but got `+String(e)+`.`)}function Jw(e){if(e instanceof zw)return e;throw Error(`Expected span but got `+String(e)+`.`)}var Yw={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Xw={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Zw={math:{},text:{}};function V(e,t,n,r,i,a){Zw[e][i]={font:t,group:n,replace:r},a&&r&&(Zw[e][r]=Zw[e][i])}var H=`math`,U=`text`,W=`main`,G=`ams`,Qw=`accent-token`,$w=`bin`,eT=`close`,tT=`inner`,nT=`mathord`,rT=`op-token`,iT=`open`,aT=`punct`,K=`rel`,oT=`spacing`,q=`textord`;V(H,W,K,`≡`,`\\equiv`,!0),V(H,W,K,`≺`,`\\prec`,!0),V(H,W,K,`≻`,`\\succ`,!0),V(H,W,K,`∼`,`\\sim`,!0),V(H,W,K,`⊥`,`\\perp`),V(H,W,K,`⪯`,`\\preceq`,!0),V(H,W,K,`⪰`,`\\succeq`,!0),V(H,W,K,`≃`,`\\simeq`,!0),V(H,W,K,`∣`,`\\mid`,!0),V(H,W,K,`≪`,`\\ll`,!0),V(H,W,K,`≫`,`\\gg`,!0),V(H,W,K,`≍`,`\\asymp`,!0),V(H,W,K,`∥`,`\\parallel`),V(H,W,K,`⋈`,`\\bowtie`,!0),V(H,W,K,`⌣`,`\\smile`,!0),V(H,W,K,`⊑`,`\\sqsubseteq`,!0),V(H,W,K,`⊒`,`\\sqsupseteq`,!0),V(H,W,K,`≐`,`\\doteq`,!0),V(H,W,K,`⌢`,`\\frown`,!0),V(H,W,K,`∋`,`\\ni`,!0),V(H,W,K,`∝`,`\\propto`,!0),V(H,W,K,`⊢`,`\\vdash`,!0),V(H,W,K,`⊣`,`\\dashv`,!0),V(H,W,K,`∋`,`\\owns`),V(H,W,aT,`.`,`\\ldotp`),V(H,W,aT,`⋅`,`\\cdotp`),V(H,W,q,`#`,`\\#`),V(U,W,q,`#`,`\\#`),V(H,W,q,`&`,`\\&`),V(U,W,q,`&`,`\\&`),V(H,W,q,`ℵ`,`\\aleph`,!0),V(H,W,q,`∀`,`\\forall`,!0),V(H,W,q,`ℏ`,`\\hbar`,!0),V(H,W,q,`∃`,`\\exists`,!0),V(H,W,q,`∇`,`\\nabla`,!0),V(H,W,q,`♭`,`\\flat`,!0),V(H,W,q,`ℓ`,`\\ell`,!0),V(H,W,q,`♮`,`\\natural`,!0),V(H,W,q,`♣`,`\\clubsuit`,!0),V(H,W,q,`℘`,`\\wp`,!0),V(H,W,q,`♯`,`\\sharp`,!0),V(H,W,q,`♢`,`\\diamondsuit`,!0),V(H,W,q,`ℜ`,`\\Re`,!0),V(H,W,q,`♡`,`\\heartsuit`,!0),V(H,W,q,`ℑ`,`\\Im`,!0),V(H,W,q,`♠`,`\\spadesuit`,!0),V(H,W,q,`§`,`\\S`,!0),V(U,W,q,`§`,`\\S`),V(H,W,q,`¶`,`\\P`,!0),V(U,W,q,`¶`,`\\P`),V(H,W,q,`†`,`\\dag`),V(U,W,q,`†`,`\\dag`),V(U,W,q,`†`,`\\textdagger`),V(H,W,q,`‡`,`\\ddag`),V(U,W,q,`‡`,`\\ddag`),V(U,W,q,`‡`,`\\textdaggerdbl`),V(H,W,eT,`⎱`,`\\rmoustache`,!0),V(H,W,iT,`⎰`,`\\lmoustache`,!0),V(H,W,eT,`⟯`,`\\rgroup`,!0),V(H,W,iT,`⟮`,`\\lgroup`,!0),V(H,W,$w,`∓`,`\\mp`,!0),V(H,W,$w,`⊖`,`\\ominus`,!0),V(H,W,$w,`⊎`,`\\uplus`,!0),V(H,W,$w,`⊓`,`\\sqcap`,!0),V(H,W,$w,`∗`,`\\ast`),V(H,W,$w,`⊔`,`\\sqcup`,!0),V(H,W,$w,`◯`,`\\bigcirc`,!0),V(H,W,$w,`∙`,`\\bullet`,!0),V(H,W,$w,`‡`,`\\ddagger`),V(H,W,$w,`≀`,`\\wr`,!0),V(H,W,$w,`⨿`,`\\amalg`),V(H,W,$w,`&`,`\\And`),V(H,W,K,`⟵`,`\\longleftarrow`,!0),V(H,W,K,`⇐`,`\\Leftarrow`,!0),V(H,W,K,`⟸`,`\\Longleftarrow`,!0),V(H,W,K,`⟶`,`\\longrightarrow`,!0),V(H,W,K,`⇒`,`\\Rightarrow`,!0),V(H,W,K,`⟹`,`\\Longrightarrow`,!0),V(H,W,K,`↔`,`\\leftrightarrow`,!0),V(H,W,K,`⟷`,`\\longleftrightarrow`,!0),V(H,W,K,`⇔`,`\\Leftrightarrow`,!0),V(H,W,K,`⟺`,`\\Longleftrightarrow`,!0),V(H,W,K,`↦`,`\\mapsto`,!0),V(H,W,K,`⟼`,`\\longmapsto`,!0),V(H,W,K,`↗`,`\\nearrow`,!0),V(H,W,K,`↩`,`\\hookleftarrow`,!0),V(H,W,K,`↪`,`\\hookrightarrow`,!0),V(H,W,K,`↘`,`\\searrow`,!0),V(H,W,K,`↼`,`\\leftharpoonup`,!0),V(H,W,K,`⇀`,`\\rightharpoonup`,!0),V(H,W,K,`↙`,`\\swarrow`,!0),V(H,W,K,`↽`,`\\leftharpoondown`,!0),V(H,W,K,`⇁`,`\\rightharpoondown`,!0),V(H,W,K,`↖`,`\\nwarrow`,!0),V(H,W,K,`⇌`,`\\rightleftharpoons`,!0),V(H,G,K,`≮`,`\\nless`,!0),V(H,G,K,``,`\\@nleqslant`),V(H,G,K,``,`\\@nleqq`),V(H,G,K,`⪇`,`\\lneq`,!0),V(H,G,K,`≨`,`\\lneqq`,!0),V(H,G,K,``,`\\@lvertneqq`),V(H,G,K,`⋦`,`\\lnsim`,!0),V(H,G,K,`⪉`,`\\lnapprox`,!0),V(H,G,K,`⊀`,`\\nprec`,!0),V(H,G,K,`⋠`,`\\npreceq`,!0),V(H,G,K,`⋨`,`\\precnsim`,!0),V(H,G,K,`⪹`,`\\precnapprox`,!0),V(H,G,K,`≁`,`\\nsim`,!0),V(H,G,K,``,`\\@nshortmid`),V(H,G,K,`∤`,`\\nmid`,!0),V(H,G,K,`⊬`,`\\nvdash`,!0),V(H,G,K,`⊭`,`\\nvDash`,!0),V(H,G,K,`⋪`,`\\ntriangleleft`),V(H,G,K,`⋬`,`\\ntrianglelefteq`,!0),V(H,G,K,`⊊`,`\\subsetneq`,!0),V(H,G,K,``,`\\@varsubsetneq`),V(H,G,K,`⫋`,`\\subsetneqq`,!0),V(H,G,K,``,`\\@varsubsetneqq`),V(H,G,K,`≯`,`\\ngtr`,!0),V(H,G,K,``,`\\@ngeqslant`),V(H,G,K,``,`\\@ngeqq`),V(H,G,K,`⪈`,`\\gneq`,!0),V(H,G,K,`≩`,`\\gneqq`,!0),V(H,G,K,``,`\\@gvertneqq`),V(H,G,K,`⋧`,`\\gnsim`,!0),V(H,G,K,`⪊`,`\\gnapprox`,!0),V(H,G,K,`⊁`,`\\nsucc`,!0),V(H,G,K,`⋡`,`\\nsucceq`,!0),V(H,G,K,`⋩`,`\\succnsim`,!0),V(H,G,K,`⪺`,`\\succnapprox`,!0),V(H,G,K,`≆`,`\\ncong`,!0),V(H,G,K,``,`\\@nshortparallel`),V(H,G,K,`∦`,`\\nparallel`,!0),V(H,G,K,`⊯`,`\\nVDash`,!0),V(H,G,K,`⋫`,`\\ntriangleright`),V(H,G,K,`⋭`,`\\ntrianglerighteq`,!0),V(H,G,K,``,`\\@nsupseteqq`),V(H,G,K,`⊋`,`\\supsetneq`,!0),V(H,G,K,``,`\\@varsupsetneq`),V(H,G,K,`⫌`,`\\supsetneqq`,!0),V(H,G,K,``,`\\@varsupsetneqq`),V(H,G,K,`⊮`,`\\nVdash`,!0),V(H,G,K,`⪵`,`\\precneqq`,!0),V(H,G,K,`⪶`,`\\succneqq`,!0),V(H,G,K,``,`\\@nsubseteqq`),V(H,G,$w,`⊴`,`\\unlhd`),V(H,G,$w,`⊵`,`\\unrhd`),V(H,G,K,`↚`,`\\nleftarrow`,!0),V(H,G,K,`↛`,`\\nrightarrow`,!0),V(H,G,K,`⇍`,`\\nLeftarrow`,!0),V(H,G,K,`⇏`,`\\nRightarrow`,!0),V(H,G,K,`↮`,`\\nleftrightarrow`,!0),V(H,G,K,`⇎`,`\\nLeftrightarrow`,!0),V(H,G,K,`△`,`\\vartriangle`),V(H,G,q,`ℏ`,`\\hslash`),V(H,G,q,`▽`,`\\triangledown`),V(H,G,q,`◊`,`\\lozenge`),V(H,G,q,`Ⓢ`,`\\circledS`),V(H,G,q,`®`,`\\circledR`),V(U,G,q,`®`,`\\circledR`),V(H,G,q,`∡`,`\\measuredangle`,!0),V(H,G,q,`∄`,`\\nexists`),V(H,G,q,`℧`,`\\mho`),V(H,G,q,`Ⅎ`,`\\Finv`,!0),V(H,G,q,`⅁`,`\\Game`,!0),V(H,G,q,`‵`,`\\backprime`),V(H,G,q,`▲`,`\\blacktriangle`),V(H,G,q,`▼`,`\\blacktriangledown`),V(H,G,q,`■`,`\\blacksquare`),V(H,G,q,`⧫`,`\\blacklozenge`),V(H,G,q,`★`,`\\bigstar`),V(H,G,q,`∢`,`\\sphericalangle`,!0),V(H,G,q,`∁`,`\\complement`,!0),V(H,G,q,`ð`,`\\eth`,!0),V(U,W,q,`ð`,`ð`),V(H,G,q,`╱`,`\\diagup`),V(H,G,q,`╲`,`\\diagdown`),V(H,G,q,`□`,`\\square`),V(H,G,q,`□`,`\\Box`),V(H,G,q,`◊`,`\\Diamond`),V(H,G,q,`¥`,`\\yen`,!0),V(U,G,q,`¥`,`\\yen`,!0),V(H,G,q,`✓`,`\\checkmark`,!0),V(U,G,q,`✓`,`\\checkmark`),V(H,G,q,`ℶ`,`\\beth`,!0),V(H,G,q,`ℸ`,`\\daleth`,!0),V(H,G,q,`ℷ`,`\\gimel`,!0),V(H,G,q,`ϝ`,`\\digamma`,!0),V(H,G,q,`ϰ`,`\\varkappa`),V(H,G,iT,`┌`,`\\@ulcorner`,!0),V(H,G,eT,`┐`,`\\@urcorner`,!0),V(H,G,iT,`└`,`\\@llcorner`,!0),V(H,G,eT,`┘`,`\\@lrcorner`,!0),V(H,G,K,`≦`,`\\leqq`,!0),V(H,G,K,`⩽`,`\\leqslant`,!0),V(H,G,K,`⪕`,`\\eqslantless`,!0),V(H,G,K,`≲`,`\\lesssim`,!0),V(H,G,K,`⪅`,`\\lessapprox`,!0),V(H,G,K,`≊`,`\\approxeq`,!0),V(H,G,$w,`⋖`,`\\lessdot`),V(H,G,K,`⋘`,`\\lll`,!0),V(H,G,K,`≶`,`\\lessgtr`,!0),V(H,G,K,`⋚`,`\\lesseqgtr`,!0),V(H,G,K,`⪋`,`\\lesseqqgtr`,!0),V(H,G,K,`≑`,`\\doteqdot`),V(H,G,K,`≓`,`\\risingdotseq`,!0),V(H,G,K,`≒`,`\\fallingdotseq`,!0),V(H,G,K,`∽`,`\\backsim`,!0),V(H,G,K,`⋍`,`\\backsimeq`,!0),V(H,G,K,`⫅`,`\\subseteqq`,!0),V(H,G,K,`⋐`,`\\Subset`,!0),V(H,G,K,`⊏`,`\\sqsubset`,!0),V(H,G,K,`≼`,`\\preccurlyeq`,!0),V(H,G,K,`⋞`,`\\curlyeqprec`,!0),V(H,G,K,`≾`,`\\precsim`,!0),V(H,G,K,`⪷`,`\\precapprox`,!0),V(H,G,K,`⊲`,`\\vartriangleleft`),V(H,G,K,`⊴`,`\\trianglelefteq`),V(H,G,K,`⊨`,`\\vDash`,!0),V(H,G,K,`⊪`,`\\Vvdash`,!0),V(H,G,K,`⌣`,`\\smallsmile`),V(H,G,K,`⌢`,`\\smallfrown`),V(H,G,K,`≏`,`\\bumpeq`,!0),V(H,G,K,`≎`,`\\Bumpeq`,!0),V(H,G,K,`≧`,`\\geqq`,!0),V(H,G,K,`⩾`,`\\geqslant`,!0),V(H,G,K,`⪖`,`\\eqslantgtr`,!0),V(H,G,K,`≳`,`\\gtrsim`,!0),V(H,G,K,`⪆`,`\\gtrapprox`,!0),V(H,G,$w,`⋗`,`\\gtrdot`),V(H,G,K,`⋙`,`\\ggg`,!0),V(H,G,K,`≷`,`\\gtrless`,!0),V(H,G,K,`⋛`,`\\gtreqless`,!0),V(H,G,K,`⪌`,`\\gtreqqless`,!0),V(H,G,K,`≖`,`\\eqcirc`,!0),V(H,G,K,`≗`,`\\circeq`,!0),V(H,G,K,`≜`,`\\triangleq`,!0),V(H,G,K,`∼`,`\\thicksim`),V(H,G,K,`≈`,`\\thickapprox`),V(H,G,K,`⫆`,`\\supseteqq`,!0),V(H,G,K,`⋑`,`\\Supset`,!0),V(H,G,K,`⊐`,`\\sqsupset`,!0),V(H,G,K,`≽`,`\\succcurlyeq`,!0),V(H,G,K,`⋟`,`\\curlyeqsucc`,!0),V(H,G,K,`≿`,`\\succsim`,!0),V(H,G,K,`⪸`,`\\succapprox`,!0),V(H,G,K,`⊳`,`\\vartriangleright`),V(H,G,K,`⊵`,`\\trianglerighteq`),V(H,G,K,`⊩`,`\\Vdash`,!0),V(H,G,K,`∣`,`\\shortmid`),V(H,G,K,`∥`,`\\shortparallel`),V(H,G,K,`≬`,`\\between`,!0),V(H,G,K,`⋔`,`\\pitchfork`,!0),V(H,G,K,`∝`,`\\varpropto`),V(H,G,K,`◀`,`\\blacktriangleleft`),V(H,G,K,`∴`,`\\therefore`,!0),V(H,G,K,`∍`,`\\backepsilon`),V(H,G,K,`▶`,`\\blacktriangleright`),V(H,G,K,`∵`,`\\because`,!0),V(H,G,K,`⋘`,`\\llless`),V(H,G,K,`⋙`,`\\gggtr`),V(H,G,$w,`⊲`,`\\lhd`),V(H,G,$w,`⊳`,`\\rhd`),V(H,G,K,`≂`,`\\eqsim`,!0),V(H,W,K,`⋈`,`\\Join`),V(H,G,K,`≑`,`\\Doteq`,!0),V(H,G,$w,`∔`,`\\dotplus`,!0),V(H,G,$w,`∖`,`\\smallsetminus`),V(H,G,$w,`⋒`,`\\Cap`,!0),V(H,G,$w,`⋓`,`\\Cup`,!0),V(H,G,$w,`⩞`,`\\doublebarwedge`,!0),V(H,G,$w,`⊟`,`\\boxminus`,!0),V(H,G,$w,`⊞`,`\\boxplus`,!0),V(H,G,$w,`⋇`,`\\divideontimes`,!0),V(H,G,$w,`⋉`,`\\ltimes`,!0),V(H,G,$w,`⋊`,`\\rtimes`,!0),V(H,G,$w,`⋋`,`\\leftthreetimes`,!0),V(H,G,$w,`⋌`,`\\rightthreetimes`,!0),V(H,G,$w,`⋏`,`\\curlywedge`,!0),V(H,G,$w,`⋎`,`\\curlyvee`,!0),V(H,G,$w,`⊝`,`\\circleddash`,!0),V(H,G,$w,`⊛`,`\\circledast`,!0),V(H,G,$w,`⋅`,`\\centerdot`),V(H,G,$w,`⊺`,`\\intercal`,!0),V(H,G,$w,`⋒`,`\\doublecap`),V(H,G,$w,`⋓`,`\\doublecup`),V(H,G,$w,`⊠`,`\\boxtimes`,!0),V(H,G,K,`⇢`,`\\dashrightarrow`,!0),V(H,G,K,`⇠`,`\\dashleftarrow`,!0),V(H,G,K,`⇇`,`\\leftleftarrows`,!0),V(H,G,K,`⇆`,`\\leftrightarrows`,!0),V(H,G,K,`⇚`,`\\Lleftarrow`,!0),V(H,G,K,`↞`,`\\twoheadleftarrow`,!0),V(H,G,K,`↢`,`\\leftarrowtail`,!0),V(H,G,K,`↫`,`\\looparrowleft`,!0),V(H,G,K,`⇋`,`\\leftrightharpoons`,!0),V(H,G,K,`↶`,`\\curvearrowleft`,!0),V(H,G,K,`↺`,`\\circlearrowleft`,!0),V(H,G,K,`↰`,`\\Lsh`,!0),V(H,G,K,`⇈`,`\\upuparrows`,!0),V(H,G,K,`↿`,`\\upharpoonleft`,!0),V(H,G,K,`⇃`,`\\downharpoonleft`,!0),V(H,W,K,`⊶`,`\\origof`,!0),V(H,W,K,`⊷`,`\\imageof`,!0),V(H,G,K,`⊸`,`\\multimap`,!0),V(H,G,K,`↭`,`\\leftrightsquigarrow`,!0),V(H,G,K,`⇉`,`\\rightrightarrows`,!0),V(H,G,K,`⇄`,`\\rightleftarrows`,!0),V(H,G,K,`↠`,`\\twoheadrightarrow`,!0),V(H,G,K,`↣`,`\\rightarrowtail`,!0),V(H,G,K,`↬`,`\\looparrowright`,!0),V(H,G,K,`↷`,`\\curvearrowright`,!0),V(H,G,K,`↻`,`\\circlearrowright`,!0),V(H,G,K,`↱`,`\\Rsh`,!0),V(H,G,K,`⇊`,`\\downdownarrows`,!0),V(H,G,K,`↾`,`\\upharpoonright`,!0),V(H,G,K,`⇂`,`\\downharpoonright`,!0),V(H,G,K,`⇝`,`\\rightsquigarrow`,!0),V(H,G,K,`⇝`,`\\leadsto`),V(H,G,K,`⇛`,`\\Rrightarrow`,!0),V(H,G,K,`↾`,`\\restriction`),V(H,W,q,`‘`,"`"),V(H,W,q,`$`,`\\$`),V(U,W,q,`$`,`\\$`),V(U,W,q,`$`,`\\textdollar`),V(H,W,q,`%`,`\\%`),V(U,W,q,`%`,`\\%`),V(H,W,q,`_`,`\\_`),V(U,W,q,`_`,`\\_`),V(U,W,q,`_`,`\\textunderscore`),V(H,W,q,`∠`,`\\angle`,!0),V(H,W,q,`∞`,`\\infty`,!0),V(H,W,q,`′`,`\\prime`),V(H,W,q,`△`,`\\triangle`),V(H,W,q,`Γ`,`\\Gamma`,!0),V(H,W,q,`Δ`,`\\Delta`,!0),V(H,W,q,`Θ`,`\\Theta`,!0),V(H,W,q,`Λ`,`\\Lambda`,!0),V(H,W,q,`Ξ`,`\\Xi`,!0),V(H,W,q,`Π`,`\\Pi`,!0),V(H,W,q,`Σ`,`\\Sigma`,!0),V(H,W,q,`Υ`,`\\Upsilon`,!0),V(H,W,q,`Φ`,`\\Phi`,!0),V(H,W,q,`Ψ`,`\\Psi`,!0),V(H,W,q,`Ω`,`\\Omega`,!0),V(H,W,q,`A`,`Α`),V(H,W,q,`B`,`Β`),V(H,W,q,`E`,`Ε`),V(H,W,q,`Z`,`Ζ`),V(H,W,q,`H`,`Η`),V(H,W,q,`I`,`Ι`),V(H,W,q,`K`,`Κ`),V(H,W,q,`M`,`Μ`),V(H,W,q,`N`,`Ν`),V(H,W,q,`O`,`Ο`),V(H,W,q,`P`,`Ρ`),V(H,W,q,`T`,`Τ`),V(H,W,q,`X`,`Χ`),V(H,W,q,`¬`,`\\neg`,!0),V(H,W,q,`¬`,`\\lnot`),V(H,W,q,`⊤`,`\\top`),V(H,W,q,`⊥`,`\\bot`),V(H,W,q,`∅`,`\\emptyset`),V(H,G,q,`∅`,`\\varnothing`),V(H,W,nT,`α`,`\\alpha`,!0),V(H,W,nT,`β`,`\\beta`,!0),V(H,W,nT,`γ`,`\\gamma`,!0),V(H,W,nT,`δ`,`\\delta`,!0),V(H,W,nT,`ϵ`,`\\epsilon`,!0),V(H,W,nT,`ζ`,`\\zeta`,!0),V(H,W,nT,`η`,`\\eta`,!0),V(H,W,nT,`θ`,`\\theta`,!0),V(H,W,nT,`ι`,`\\iota`,!0),V(H,W,nT,`κ`,`\\kappa`,!0),V(H,W,nT,`λ`,`\\lambda`,!0),V(H,W,nT,`μ`,`\\mu`,!0),V(H,W,nT,`ν`,`\\nu`,!0),V(H,W,nT,`ξ`,`\\xi`,!0),V(H,W,nT,`ο`,`\\omicron`,!0),V(H,W,nT,`π`,`\\pi`,!0),V(H,W,nT,`ρ`,`\\rho`,!0),V(H,W,nT,`σ`,`\\sigma`,!0),V(H,W,nT,`τ`,`\\tau`,!0),V(H,W,nT,`υ`,`\\upsilon`,!0),V(H,W,nT,`ϕ`,`\\phi`,!0),V(H,W,nT,`χ`,`\\chi`,!0),V(H,W,nT,`ψ`,`\\psi`,!0),V(H,W,nT,`ω`,`\\omega`,!0),V(H,W,nT,`ε`,`\\varepsilon`,!0),V(H,W,nT,`ϑ`,`\\vartheta`,!0),V(H,W,nT,`ϖ`,`\\varpi`,!0),V(H,W,nT,`ϱ`,`\\varrho`,!0),V(H,W,nT,`ς`,`\\varsigma`,!0),V(H,W,nT,`φ`,`\\varphi`,!0),V(H,W,$w,`∗`,`*`,!0),V(H,W,$w,`+`,`+`),V(H,W,$w,`−`,`-`,!0),V(H,W,$w,`⋅`,`\\cdot`,!0),V(H,W,$w,`∘`,`\\circ`,!0),V(H,W,$w,`÷`,`\\div`,!0),V(H,W,$w,`±`,`\\pm`,!0),V(H,W,$w,`×`,`\\times`,!0),V(H,W,$w,`∩`,`\\cap`,!0),V(H,W,$w,`∪`,`\\cup`,!0),V(H,W,$w,`∖`,`\\setminus`,!0),V(H,W,$w,`∧`,`\\land`),V(H,W,$w,`∨`,`\\lor`),V(H,W,$w,`∧`,`\\wedge`,!0),V(H,W,$w,`∨`,`\\vee`,!0),V(H,W,q,`√`,`\\surd`),V(H,W,iT,`⟨`,`\\langle`,!0),V(H,W,iT,`∣`,`\\lvert`),V(H,W,iT,`∥`,`\\lVert`),V(H,W,eT,`?`,`?`),V(H,W,eT,`!`,`!`),V(H,W,eT,`⟩`,`\\rangle`,!0),V(H,W,eT,`∣`,`\\rvert`),V(H,W,eT,`∥`,`\\rVert`),V(H,W,K,`=`,`=`),V(H,W,K,`:`,`:`),V(H,W,K,`≈`,`\\approx`,!0),V(H,W,K,`≅`,`\\cong`,!0),V(H,W,K,`≥`,`\\ge`),V(H,W,K,`≥`,`\\geq`,!0),V(H,W,K,`←`,`\\gets`),V(H,W,K,`>`,`\\gt`,!0),V(H,W,K,`∈`,`\\in`,!0),V(H,W,K,``,`\\@not`),V(H,W,K,`⊂`,`\\subset`,!0),V(H,W,K,`⊃`,`\\supset`,!0),V(H,W,K,`⊆`,`\\subseteq`,!0),V(H,W,K,`⊇`,`\\supseteq`,!0),V(H,G,K,`⊈`,`\\nsubseteq`,!0),V(H,G,K,`⊉`,`\\nsupseteq`,!0),V(H,W,K,`⊨`,`\\models`),V(H,W,K,`←`,`\\leftarrow`,!0),V(H,W,K,`≤`,`\\le`),V(H,W,K,`≤`,`\\leq`,!0),V(H,W,K,`<`,`\\lt`,!0),V(H,W,K,`→`,`\\rightarrow`,!0),V(H,W,K,`→`,`\\to`),V(H,G,K,`≱`,`\\ngeq`,!0),V(H,G,K,`≰`,`\\nleq`,!0),V(H,W,oT,`\xA0`,`\\ `),V(H,W,oT,`\xA0`,`\\space`),V(H,W,oT,`\xA0`,`\\nobreakspace`),V(U,W,oT,`\xA0`,`\\ `),V(U,W,oT,`\xA0`,` `),V(U,W,oT,`\xA0`,`\\space`),V(U,W,oT,`\xA0`,`\\nobreakspace`),V(H,W,oT,null,`\\nobreak`),V(H,W,oT,null,`\\allowbreak`),V(H,W,aT,`,`,`,`),V(H,W,aT,`;`,`;`),V(H,G,$w,`⊼`,`\\barwedge`,!0),V(H,G,$w,`⊻`,`\\veebar`,!0),V(H,W,$w,`⊙`,`\\odot`,!0),V(H,W,$w,`⊕`,`\\oplus`,!0),V(H,W,$w,`⊗`,`\\otimes`,!0),V(H,W,q,`∂`,`\\partial`,!0),V(H,W,$w,`⊘`,`\\oslash`,!0),V(H,G,$w,`⊚`,`\\circledcirc`,!0),V(H,G,$w,`⊡`,`\\boxdot`,!0),V(H,W,$w,`△`,`\\bigtriangleup`),V(H,W,$w,`▽`,`\\bigtriangledown`),V(H,W,$w,`†`,`\\dagger`),V(H,W,$w,`⋄`,`\\diamond`),V(H,W,$w,`⋆`,`\\star`),V(H,W,$w,`◃`,`\\triangleleft`),V(H,W,$w,`▹`,`\\triangleright`),V(H,W,iT,`{`,`\\{`),V(U,W,q,`{`,`\\{`),V(U,W,q,`{`,`\\textbraceleft`),V(H,W,eT,`}`,`\\}`),V(U,W,q,`}`,`\\}`),V(U,W,q,`}`,`\\textbraceright`),V(H,W,iT,`{`,`\\lbrace`),V(H,W,eT,`}`,`\\rbrace`),V(H,W,iT,`[`,`\\lbrack`,!0),V(U,W,q,`[`,`\\lbrack`,!0),V(H,W,eT,`]`,`\\rbrack`,!0),V(U,W,q,`]`,`\\rbrack`,!0),V(H,W,iT,`(`,`\\lparen`,!0),V(H,W,eT,`)`,`\\rparen`,!0),V(U,W,q,`<`,`\\textless`,!0),V(U,W,q,`>`,`\\textgreater`,!0),V(H,W,iT,`⌊`,`\\lfloor`,!0),V(H,W,eT,`⌋`,`\\rfloor`,!0),V(H,W,iT,`⌈`,`\\lceil`,!0),V(H,W,eT,`⌉`,`\\rceil`,!0),V(H,W,q,`\\`,`\\backslash`),V(H,W,q,`∣`,`|`),V(H,W,q,`∣`,`\\vert`),V(U,W,q,`|`,`\\textbar`,!0),V(H,W,q,`∥`,`\\|`),V(H,W,q,`∥`,`\\Vert`),V(U,W,q,`∥`,`\\textbardbl`),V(U,W,q,`~`,`\\textasciitilde`),V(U,W,q,`\\`,`\\textbackslash`),V(U,W,q,`^`,`\\textasciicircum`),V(H,W,K,`↑`,`\\uparrow`,!0),V(H,W,K,`⇑`,`\\Uparrow`,!0),V(H,W,K,`↓`,`\\downarrow`,!0),V(H,W,K,`⇓`,`\\Downarrow`,!0),V(H,W,K,`↕`,`\\updownarrow`,!0),V(H,W,K,`⇕`,`\\Updownarrow`,!0),V(H,W,rT,`∐`,`\\coprod`),V(H,W,rT,`⋁`,`\\bigvee`),V(H,W,rT,`⋀`,`\\bigwedge`),V(H,W,rT,`⨄`,`\\biguplus`),V(H,W,rT,`⋂`,`\\bigcap`),V(H,W,rT,`⋃`,`\\bigcup`),V(H,W,rT,`∫`,`\\int`),V(H,W,rT,`∫`,`\\intop`),V(H,W,rT,`∬`,`\\iint`),V(H,W,rT,`∭`,`\\iiint`),V(H,W,rT,`∏`,`\\prod`),V(H,W,rT,`∑`,`\\sum`),V(H,W,rT,`⨂`,`\\bigotimes`),V(H,W,rT,`⨁`,`\\bigoplus`),V(H,W,rT,`⨀`,`\\bigodot`),V(H,W,rT,`∮`,`\\oint`),V(H,W,rT,`∯`,`\\oiint`),V(H,W,rT,`∰`,`\\oiiint`),V(H,W,rT,`⨆`,`\\bigsqcup`),V(H,W,rT,`∫`,`\\smallint`),V(U,W,tT,`…`,`\\textellipsis`),V(H,W,tT,`…`,`\\mathellipsis`),V(U,W,tT,`…`,`\\ldots`,!0),V(H,W,tT,`…`,`\\ldots`,!0),V(H,W,tT,`⋯`,`\\@cdots`,!0),V(H,W,tT,`⋱`,`\\ddots`,!0),V(H,W,q,`⋮`,`\\varvdots`),V(U,W,q,`⋮`,`\\varvdots`),V(H,W,Qw,`ˊ`,`\\acute`),V(H,W,Qw,`ˋ`,`\\grave`),V(H,W,Qw,`¨`,`\\ddot`),V(H,W,Qw,`~`,`\\tilde`),V(H,W,Qw,`ˉ`,`\\bar`),V(H,W,Qw,`˘`,`\\breve`),V(H,W,Qw,`ˇ`,`\\check`),V(H,W,Qw,`^`,`\\hat`),V(H,W,Qw,`⃗`,`\\vec`),V(H,W,Qw,`˙`,`\\dot`),V(H,W,Qw,`˚`,`\\mathring`),V(H,W,nT,``,`\\@imath`),V(H,W,nT,``,`\\@jmath`),V(H,W,q,`ı`,`ı`),V(H,W,q,`ȷ`,`ȷ`),V(U,W,q,`ı`,`\\i`,!0),V(U,W,q,`ȷ`,`\\j`,!0),V(U,W,q,`ß`,`\\ss`,!0),V(U,W,q,`æ`,`\\ae`,!0),V(U,W,q,`œ`,`\\oe`,!0),V(U,W,q,`ø`,`\\o`,!0),V(U,W,q,`Æ`,`\\AE`,!0),V(U,W,q,`Œ`,`\\OE`,!0),V(U,W,q,`Ø`,`\\O`,!0),V(U,W,Qw,`ˊ`,`\\'`),V(U,W,Qw,`ˋ`,"\\`"),V(U,W,Qw,`ˆ`,`\\^`),V(U,W,Qw,`˜`,`\\~`),V(U,W,Qw,`ˉ`,`\\=`),V(U,W,Qw,`˘`,`\\u`),V(U,W,Qw,`˙`,`\\.`),V(U,W,Qw,`¸`,`\\c`),V(U,W,Qw,`˚`,`\\r`),V(U,W,Qw,`ˇ`,`\\v`),V(U,W,Qw,`¨`,`\\"`),V(U,W,Qw,`˝`,`\\H`),V(U,W,Qw,`◯`,`\\textcircled`);var sT={"--":!0,"---":!0,"``":!0,"''":!0};V(U,W,q,`–`,`--`,!0),V(U,W,q,`–`,`\\textendash`),V(U,W,q,`—`,`---`,!0),V(U,W,q,`—`,`\\textemdash`),V(U,W,q,`‘`,"`",!0),V(U,W,q,`‘`,`\\textquoteleft`),V(U,W,q,`’`,`'`,!0),V(U,W,q,`’`,`\\textquoteright`),V(U,W,q,`“`,"``",!0),V(U,W,q,`“`,`\\textquotedblleft`),V(U,W,q,`”`,`''`,!0),V(U,W,q,`”`,`\\textquotedblright`),V(H,W,q,`°`,`\\degree`,!0),V(U,W,q,`°`,`\\degree`),V(U,W,q,`°`,`\\textdegree`,!0),V(H,W,q,`£`,`\\pounds`),V(H,W,q,`£`,`\\mathsterling`,!0),V(U,W,q,`£`,`\\pounds`),V(U,W,q,`£`,`\\textsterling`,!0),V(H,G,q,`✠`,`\\maltese`),V(U,G,q,`✠`,`\\maltese`);for(var cT=`0123456789/@."`,lT=0;lT0)return kT(i,c,r,t,a.concat(l));if(s){var u,d;if(s===`boldsymbol`){var f=jT(i,r,t,a,n);u=f.fontName,d=[f.fontClass]}else o?(u=KT[s].fontName,d=[s]):(u=GT(s,t.fontWeight,t.fontShape),d=[s,t.fontWeight,t.fontShape]);if(OT(i,u,r).metrics)return kT(i,u,r,t,a.concat(d));if(sT.hasOwnProperty(i)&&u.slice(0,10)===`Typewriter`){for(var p=[],m=0;m{if(Pw(e.classes)!==Pw(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(e.classes.length===1){var n=e.classes[0];if(n===`mbin`||n===`mord`)return!1}for(var r in e.style)if(e.style.hasOwnProperty(r)&&e.style[r]!==t.style[r])return!1;for(var i in t.style)if(t.style.hasOwnProperty(i)&&e.style[i]!==t.style[i])return!1;return!0},PT=e=>{for(var t=0;tt&&(t=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>r&&(r=a.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},IT=function(e,t,n,r){var i=new zw(e,t,n,r);return FT(i),i},LT=(e,t,n,r)=>new zw(e,t,n,r),RT=function(e,t,n){var r=IT([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=B(r.height),r.maxFontSize=1,r},zT=function(e,t,n,r){var i=new Bw(e,t,n,r);return FT(i),i},BT=function(e){var t=new vw(e);return FT(t),t},VT=function(e,t){return e instanceof vw?IT([],[e],t):e},HT=function(e){if(e.positionType===`individualShift`){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,i=r,a=1;a{var n=IT([`mspace`],[],t),r=Nw(e,t);return n.style.marginRight=B(r),n},GT=function(e,t,n){var r=``;switch(e){case`amsrm`:r=`AMS`;break;case`textrm`:r=`Main`;break;case`textsf`:r=`SansSerif`;break;case`texttt`:r=`Typewriter`;break;default:r=e}var i=t===`textbf`&&n===`textit`?`BoldItalic`:t===`textbf`?`Bold`:t===`textit`?`Italic`:`Regular`;return r+`-`+i},KT={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`}},qT={vec:[`vec`,.471,.714],oiintSize1:[`oiintSize1`,.957,.499],oiintSize2:[`oiintSize2`,1.472,.659],oiiintSize1:[`oiiintSize1`,1.304,.499],oiiintSize2:[`oiiintSize2`,1.98,.659]},J={fontMap:KT,makeSymbol:kT,mathsym:AT,makeSpan:IT,makeSvgSpan:LT,makeLineSpan:RT,makeAnchor:zT,makeFragment:BT,wrapFragment:VT,makeVList:UT,makeOrd:MT,makeGlue:WT,staticSvg:function(e,t){var[n,r,i]=qT[e],a=LT([`overlay`],[new Ww([new Gw(n)],{width:B(r),height:B(i),style:`width:`+B(r),viewBox:`0 0 `+1e3*r+` `+1e3*i,preserveAspectRatio:`xMinYMin`})],t);return a.height=i,a.style.height=B(i),a.style.width=B(r),a},svgData:qT,tryCombineChars:PT},JT={number:3,unit:`mu`},YT={number:4,unit:`mu`},XT={number:5,unit:`mu`},ZT={mord:{mop:JT,mbin:YT,mrel:XT,minner:JT},mop:{mord:JT,mop:JT,mrel:XT,minner:JT},mbin:{mord:YT,mop:YT,mopen:YT,minner:YT},mrel:{mord:XT,mop:XT,mopen:XT,minner:XT},mopen:{},mclose:{mop:JT,mbin:YT,mrel:XT,minner:JT},mpunct:{mord:JT,mop:JT,mrel:XT,mopen:JT,mclose:JT,mpunct:JT,minner:JT},minner:{mord:JT,mop:JT,mbin:YT,mrel:XT,mopen:JT,mpunct:JT,minner:JT}},QT={mord:{mop:JT},mop:{mord:JT,mop:JT},mbin:{},mrel:{},mopen:{},mclose:{mop:JT},mpunct:{},minner:{mop:JT}},$T={},eE={},tE={};function nE(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:o}=e,s={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:r.allowedInMath===void 0?!0:r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:i},c=0;c{var n=t.classes[0],r=e.classes[0];n===`mbin`&&cE.includes(r)?t.classes[0]=`mord`:r===`mbin`&&sE.includes(n)&&(e.classes[0]=`mord`)},{node:u},d,f),fE(i,(e,t)=>{var n=hE(t),r=hE(e),i=n&&r?e.hasClass(`mtight`)?QT[n][r]:ZT[n][r]:null;if(i)return J.makeGlue(i,c)},{node:u},d,f),i},fE=function e(t,n,r,i,a){i&&t.push(i);for(var o=0;on=>{t.splice(e+1,0,n),o++})(o)}i&&t.pop()},pE=function(e){return e instanceof vw||e instanceof Bw||e instanceof zw&&e.hasClass(`enclosing`)?e:null},mE=function e(t,n){var r=pE(t);if(r){var i=r.children;if(i.length){if(n===`right`)return e(i[i.length-1],`right`);if(n===`left`)return e(i[0],`left`)}}return t},hE=function(e,t){return e?(t&&(e=mE(e,t)),uE[e.classes[0]]||null):null},gE=function(e,t){var n=[`nulldelimiter`].concat(e.baseSizingClasses());return oE(t.concat(n))},_E=function(e,t,n){if(!e)return oE();if(eE[e.type]){var r=eE[e.type](e,t);if(n&&t.size!==n.size){r=oE(t.sizingClasses(n),[r],t);var i=t.sizeMultiplier/n.sizeMultiplier;r.height*=i,r.depth*=i}return r}else throw new z(`Got group of unknown type: '`+e.type+`'`)};function vE(e,t){var n=oE([`base`],e,t),r=oE([`strut`]);return r.style.height=B(n.height+n.depth),n.depth&&(r.style.verticalAlign=B(-n.depth)),n.children.unshift(r),n}function yE(e,t){var n=null;e.length===1&&e[0].type===`tag`&&(n=e[0].tag,e=e[0].body);var r=dE(e,t,`root`),i;r.length===2&&r[1].hasClass(`tag`)&&(i=r.pop());for(var a=[],o=[],s=0;s0&&(a.push(vE(o,t)),o=[]),a.push(r[s]));o.length>0&&a.push(vE(o,t));var l;n?(l=vE(dE(n,t,!0)),l.classes=[`tag`],a.push(l)):i&&a.push(i);var u=oE([`katex-html`],a);if(u.setAttribute(`aria-hidden`,`true`),l){var d=l.children[0];d.style.height=B(u.height+u.depth),u.depth&&(d.style.verticalAlign=B(-u.depth))}return u}function bE(e){return new vw(e)}var xE=class{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=Pw(this.classes));for(var n=0;n0&&(e+=` class ="`+FC.escape(Pw(this.classes))+`"`),e+=`>`;for(var n=0;n`,e}toText(){return this.children.map(e=>e.toText()).join(``)}},SE=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return FC.escape(this.toText())}toText(){return this.text}},Y={MathNode:xE,TextNode:SE,SpaceNode:class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character=` `:e>=.1666&&e<=.1667?this.character=` `:e>=.2222&&e<=.2223?this.character=` `:e>=.2777&&e<=.2778?this.character=`  `:e>=-.05556&&e<=-.05555?this.character=` ⁣`:e>=-.1667&&e<=-.1666?this.character=` ⁣`:e>=-.2223&&e<=-.2222?this.character=` ⁣`:e>=-.2778&&e<=-.2777?this.character=` ⁣`:this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`mspace`);return e.setAttribute(`width`,B(this.width)),e}toMarkup(){return this.character?``+this.character+``:``}toText(){return this.character?this.character:` `}},newDocumentFragment:bE},CE=function(e,t,n){return Zw[t][e]&&Zw[t][e].replace&&e.charCodeAt(0)!==55349&&!(sT.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)===`tt`||n.font&&n.font.slice(4,6)===`tt`))&&(e=Zw[t][e].replace),new Y.TextNode(e)},wE=function(e){return e.length===1?e[0]:new Y.MathNode(`mrow`,e)},TE=function(e,t){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 n=t.font;if(!n||n===`mathnormal`)return null;var r=e.mode;if(n===`mathit`)return`italic`;if(n===`boldsymbol`)return e.type===`textord`?`bold`:`bold-italic`;if(n===`mathbf`)return`bold`;if(n===`mathbb`)return`double-struck`;if(n===`mathsfit`)return`sans-serif-italic`;if(n===`mathfrak`)return`fraktur`;if(n===`mathscr`||n===`mathcal`)return`script`;if(n===`mathsf`)return`sans-serif`;if(n===`mathtt`)return`monospace`;var i=e.text;if([`\\imath`,`\\jmath`].includes(i))return null;Zw[r][i]&&Zw[r][i].replace&&(i=Zw[r][i].replace);var a=J.fontMap[n].fontName;return Cw(i,a,r)?J.fontMap[n].variant:null};function EE(e){if(!e)return!1;if(e.type===`mi`&&e.children.length===1){var t=e.children[0];return t instanceof SE&&t.text===`.`}else if(e.type===`mo`&&e.children.length===1&&e.getAttribute(`separator`)===`true`&&e.getAttribute(`lspace`)===`0em`&&e.getAttribute(`rspace`)===`0em`){var n=e.children[0];return n instanceof SE&&n.text===`,`}else return!1}var DE=function(e,t,n){if(e.length===1){var r=kE(e[0],t);return n&&r instanceof xE&&r.type===`mo`&&(r.setAttribute(`lspace`,`0em`),r.setAttribute(`rspace`,`0em`)),[r]}for(var i=[],a,o=0;o=1&&(a.type===`mn`||EE(a))){var c=s.children[0];c instanceof xE&&c.type===`mn`&&(c.children=[...a.children,...c.children],i.pop())}else if(a.type===`mi`&&a.children.length===1){var l=a.children[0];if(l instanceof SE&&l.text===`̸`&&(s.type===`mo`||s.type===`mi`||s.type===`mn`)){var u=s.children[0];u instanceof SE&&u.text.length>0&&(u.text=u.text.slice(0,1)+`̸`+u.text.slice(1),i.pop())}}}i.push(s),a=s}return i},OE=function(e,t,n){return wE(DE(e,t,n))},kE=function(e,t){if(!e)return new Y.MathNode(`mrow`);if(tE[e.type])return tE[e.type](e,t);throw new z(`Got group of unknown type: '`+e.type+`'`)};function AE(e,t,n,r,i){var a=DE(e,n),o=a.length===1&&a[0]instanceof xE&&[`mrow`,`mtable`].includes(a[0].type)?a[0]:new Y.MathNode(`mrow`,a),s=new Y.MathNode(`annotation`,[new Y.TextNode(t)]);s.setAttribute(`encoding`,`application/x-tex`);var c=new Y.MathNode(`semantics`,[o,s]),l=new Y.MathNode(`math`,[c]);l.setAttribute(`xmlns`,`http://www.w3.org/1998/Math/MathML`),r&&l.setAttribute(`display`,`block`);var u=i?`katex`:`katex-mathml`;return J.makeSpan([u],[l])}var jE=function(e){return new kw({style:e.displayMode?tw.DISPLAY:tw.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},ME=function(e,t){if(t.displayMode){var n=[`katex-display`];t.leqno&&n.push(`leqno`),t.fleqn&&n.push(`fleqn`),e=J.makeSpan(n,[e])}return e},NE=function(e,t,n){var r=jE(n),i;if(n.output===`mathml`)return AE(e,t,r,n.displayMode,!0);if(n.output===`html`){var a=yE(e,r);i=J.makeSpan([`katex`],[a])}else{var o=AE(e,t,r,n.displayMode,!1),s=yE(e,r);i=J.makeSpan([`katex`],[o,s])}return ME(i,n)},PE=function(e,t,n){var r=yE(e,jE(n));return ME(J.makeSpan([`katex`],[r]),n)},FE={widehat:`^`,widecheck:`ˇ`,widetilde:`~`,utilde:`~`,overleftarrow:`←`,underleftarrow:`←`,xleftarrow:`←`,overrightarrow:`→`,underrightarrow:`→`,xrightarrow:`→`,underbrace:`⏟`,overbrace:`⏞`,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":`=`},IE=function(e){var t=new Y.MathNode(`mo`,[new Y.TextNode(FE[e.replace(/^\\/,``)])]);return t.setAttribute(`stretchy`,`true`),t},LE={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],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]},RE=function(e){return e.type===`ordgroup`?e.body.length:1},zE={encloseSpan:function(e,t,n,r,i){var a,o=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(a=J.makeSpan([`stretchy`,t],[],i),t===`fbox`){var s=i.color&&i.getColor();s&&(a.style.borderColor=s)}}else{var c=[];/^[bx]cancel$/.test(t)&&c.push(new Kw({x1:`0`,y1:`0`,x2:`100%`,y2:`100%`,"stroke-width":`0.046em`})),/^x?cancel$/.test(t)&&c.push(new Kw({x1:`0`,y1:`100%`,x2:`100%`,y2:`0`,"stroke-width":`0.046em`}));var l=new Ww(c,{width:`100%`,height:B(o)});a=J.makeSvgSpan([],[l],i)}return a.height=o,a.style.height=B(o),a},mathMLnode:IE,svgSpan:function(e,t){function n(){var n=4e5,r=e.label.slice(1);if([`widehat`,`widecheck`,`widetilde`,`utilde`].includes(r)){var i=RE(e.base),a,o,s;if(i>5)r===`widehat`||r===`widecheck`?(a=420,n=2364,s=.42,o=r+`4`):(a=312,n=2340,s=.34,o=`tilde4`);else{var c=[1,1,2,2,3,3][i];r===`widehat`||r===`widecheck`?(n=[0,1062,2364,2364,2364][c],a=[0,239,300,360,420][c],s=[0,.24,.3,.3,.36,.42][c],o=r+c):(n=[0,600,1033,2339,2340][c],a=[0,260,286,306,312][c],s=[0,.26,.286,.3,.306,.34][c],o=`tilde`+c)}var l=new Ww([new Gw(o)],{width:`100%`,height:B(s),viewBox:`0 0 `+n+` `+a,preserveAspectRatio:`none`});return{span:J.makeSvgSpan([],[l],t),minWidth:0,height:s}}else{var u=[],d=LE[r],[f,p,m]=d,h=m/1e3,g=f.length,_,v;if(g===1){var y=d[3];_=[`hide-tail`],v=[y]}else if(g===2)_=[`halfarrow-left`,`halfarrow-right`],v=[`xMinYMin`,`xMaxYMin`];else if(g===3)_=[`brace-left`,`brace-center`,`brace-right`],v=[`xMinYMin`,`xMidYMin`,`xMaxYMin`];else throw Error(`Correct katexImagesData or update code here to support + `+g+` children.`);for(var b=0;b0&&(r.style.minWidth=B(i)),r}};function BE(e,t){if(!e||e.type!==t)throw Error(`Expected node of type `+t+`, but got `+(e?`node of type `+e.type:String(e)));return e}function VE(e){var t=HE(e);if(!t)throw Error(`Expected node of symbol group type, but got `+(e?`node of type `+e.type:String(e)));return t}function HE(e){return e&&(e.type===`atom`||Xw.hasOwnProperty(e.type))?e:null}var UE=(e,t)=>{var n,r,i;e&&e.type===`supsub`?(r=BE(e.base,`accent`),n=r.base,e.base=n,i=Jw(_E(e,t)),e.base=r):(r=BE(e,`accent`),n=r.base);var a=_E(n,t.havingCrampedStyle()),o=r.isShifty&&FC.isCharacterBox(n),s=0;o&&(s=qw(_E(FC.getBaseElem(n),t.havingCrampedStyle())).skew);var c=r.label===`\\c`,l=c?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),u;if(r.isStretchy)u=zE.svgSpan(r,t),u=J.makeVList({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`elem`,elem:u,wrapperClasses:[`svg-align`],wrapperStyle:s>0?{width:`calc(100% - `+B(2*s)+`)`,marginLeft:B(2*s)}:void 0}]},t);else{var d,f;r.label===`\\vec`?(d=J.staticSvg(`vec`,t),f=J.svgData.vec[1]):(d=J.makeOrd({mode:r.mode,text:r.label},t,`textord`),d=qw(d),d.italic=0,f=d.width,c&&(l+=d.depth)),u=J.makeSpan([`accent-body`],[d]);var p=r.label===`\\textcircled`;p&&(u.classes.push(`accent-full`),l=a.height);var m=s;p||(m-=f/2),u.style.left=B(m),r.label===`\\textcircled`&&(u.style.top=`.2em`),u=J.makeVList({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:-l},{type:`elem`,elem:u}]},t)}var h=J.makeSpan([`mord`,`accent`],[u],t);return i?(i.children[0]=h,i.height=Math.max(h.height,i.height),i.classes[0]=`mord`,i):h},WE=(e,t)=>{var n=e.isStretchy?zE.mathMLnode(e.label):new Y.MathNode(`mo`,[CE(e.label,e.mode)]),r=new Y.MathNode(`mover`,[kE(e.base,t),n]);return r.setAttribute(`accent`,`true`),r},GE=new RegExp([`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`].map(e=>`\\`+e).join(`|`));nE({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 n=iE(t[0]),r=!GE.test(e.funcName),i=!r||e.funcName===`\\widehat`||e.funcName===`\\widetilde`||e.funcName===`\\widecheck`;return{type:`accent`,mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:UE,mathmlBuilder:WE}),nE({type:`accent`,names:[`\\'`,"\\`",`\\^`,`\\~`,`\\=`,`\\u`,`\\.`,`\\"`,`\\c`,`\\r`,`\\H`,`\\v`,`\\textcircled`],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`primitive`]},handler:(e,t)=>{var n=t[0],r=e.parser.mode;return r===`math`&&(e.parser.settings.reportNonstrict(`mathVsTextAccents`,`LaTeX's accent `+e.funcName+` works only in text mode`),r=`text`),{type:`accent`,mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:UE,mathmlBuilder:WE}),nE({type:`accentUnder`,names:[`\\underleftarrow`,`\\underrightarrow`,`\\underleftrightarrow`,`\\undergroup`,`\\underlinesegment`,`\\utilde`],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`accentUnder`,mode:n.mode,label:r,base:i}},htmlBuilder:(e,t)=>{var n=_E(e.base,t),r=zE.svgSpan(e,t),i=e.label===`\\utilde`?.12:0,a=J.makeVList({positionType:`top`,positionData:n.height,children:[{type:`elem`,elem:r,wrapperClasses:[`svg-align`]},{type:`kern`,size:i},{type:`elem`,elem:n}]},t);return J.makeSpan([`mord`,`accentunder`],[a],t)},mathmlBuilder:(e,t)=>{var n=zE.mathMLnode(e.label),r=new Y.MathNode(`munder`,[kE(e.base,t),n]);return r.setAttribute(`accentunder`,`true`),r}});var KE=e=>{var t=new Y.MathNode(`mpadded`,e?[e]:[]);return t.setAttribute(`width`,`+0.6em`),t.setAttribute(`lspace`,`0.3em`),t};nE({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,n){var{parser:r,funcName:i}=e;return{type:`xArrow`,mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,r=t.havingStyle(n.sup()),i=J.wrapFragment(_E(e.body,r,t),t),a=e.label.slice(0,2)===`\\x`?`x`:`cd`;i.classes.push(a+`-arrow-pad`);var o;e.below&&(r=t.havingStyle(n.sub()),o=J.wrapFragment(_E(e.below,r,t),t),o.classes.push(a+`-arrow-pad`));var s=zE.svgSpan(e,t),c=-t.fontMetrics().axisHeight+.5*s.height,l=-t.fontMetrics().axisHeight-.5*s.height-.111;(i.depth>.25||e.label===`\\xleftequilibrium`)&&(l-=i.depth);var u;if(o){var d=-t.fontMetrics().axisHeight+o.height+.5*s.height+.111;u=J.makeVList({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c},{type:`elem`,elem:o,shift:d}]},t)}else u=J.makeVList({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c}]},t);return u.children[0].children[0].children[1].classes.push(`svg-align`),J.makeSpan([`mrel`,`x-arrow`],[u],t)},mathmlBuilder(e,t){var n=zE.mathMLnode(e.label);n.setAttribute(`minsize`,e.label.charAt(0)===`x`?`1.75em`:`3.0em`);var r;if(e.body){var i=KE(kE(e.body,t));if(e.below){var a=KE(kE(e.below,t));r=new Y.MathNode(`munderover`,[n,a,i])}else r=new Y.MathNode(`mover`,[n,i])}else if(e.below){var o=KE(kE(e.below,t));r=new Y.MathNode(`munder`,[n,o])}else r=KE(),r=new Y.MathNode(`mover`,[n,r]);return r}});var qE=J.makeSpan;function JE(e,t){var n=dE(e.body,t,!0);return qE([e.mclass],n,t)}function YE(e,t){var n,r=DE(e.body,t);return e.mclass===`minner`?n=new Y.MathNode(`mpadded`,r):e.mclass===`mord`?e.isCharacterBox?(n=r[0],n.type=`mi`):n=new Y.MathNode(`mi`,r):(e.isCharacterBox?(n=r[0],n.type=`mo`):n=new Y.MathNode(`mo`,r),e.mclass===`mbin`?(n.attributes.lspace=`0.22em`,n.attributes.rspace=`0.22em`):e.mclass===`mpunct`?(n.attributes.lspace=`0em`,n.attributes.rspace=`0.17em`):e.mclass===`mopen`||e.mclass===`mclose`?(n.attributes.lspace=`0em`,n.attributes.rspace=`0em`):e.mclass===`minner`&&(n.attributes.lspace=`0.0556em`,n.attributes.width=`+0.1111em`)),n}nE({type:`mclass`,names:[`\\mathord`,`\\mathbin`,`\\mathrel`,`\\mathopen`,`\\mathclose`,`\\mathpunct`,`\\mathinner`],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`mclass`,mode:n.mode,mclass:`m`+r.slice(5),body:aE(i),isCharacterBox:FC.isCharacterBox(i)}},htmlBuilder:JE,mathmlBuilder:YE});var XE=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`};nE({type:`mclass`,names:[`\\@binrel`],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:`mclass`,mode:n.mode,mclass:XE(t[0]),body:aE(t[1]),isCharacterBox:FC.isCharacterBox(t[1])}}}),nE({type:`mclass`,names:[`\\stackrel`,`\\overset`,`\\underset`],props:{numArgs:2},handler(e,t){var{parser:n,funcName:r}=e,i=t[1],a=t[0],o=r===`\\stackrel`?`mrel`:XE(i),s={type:`op`,mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!==`\\stackrel`,body:aE(i)},c={type:`supsub`,mode:a.mode,base:s,sup:r===`\\underset`?null:a,sub:r===`\\underset`?a:null};return{type:`mclass`,mode:n.mode,mclass:o,body:[c],isCharacterBox:FC.isCharacterBox(c)}},htmlBuilder:JE,mathmlBuilder:YE}),nE({type:`pmb`,names:[`\\pmb`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`pmb`,mode:n.mode,mclass:XE(t[0]),body:aE(t[0])}},htmlBuilder(e,t){var n=dE(e.body,t,!0),r=J.makeSpan([e.mclass],n,t);return r.style.textShadow=`0.02em 0.01em 0.04px`,r},mathmlBuilder(e,t){var n=DE(e.body,t),r=new Y.MathNode(`mstyle`,n);return r.setAttribute(`style`,`text-shadow: 0.02em 0.01em 0.04px`),r}});var ZE={">":`\\\\cdrightarrow`,"<":`\\\\cdleftarrow`,"=":`\\\\cdlongequal`,A:`\\uparrow`,V:`\\downarrow`,"|":`\\Vert`,".":`no arrow`},QE=()=>({type:`styling`,body:[],mode:`math`,style:`display`}),$E=e=>e.type===`textord`&&e.text===`@`,eD=(e,t)=>(e.type===`mathord`||e.type===`atom`)&&e.text===t;function tD(e,t,n){var r=ZE[e];switch(r){case`\\\\cdrightarrow`:case`\\\\cdleftarrow`:return n.callFunction(r,[t[0]],[t[1]]);case`\\uparrow`:case`\\downarrow`:var i=n.callFunction(`\\\\cdleft`,[t[0]],[]),a={type:`atom`,text:r,mode:`math`,family:`rel`},o={type:`ordgroup`,mode:`math`,body:[i,n.callFunction(`\\Big`,[a],[]),n.callFunction(`\\\\cdright`,[t[1]],[])]};return n.callFunction(`\\\\cdparent`,[o],[]);case`\\\\cdlongequal`:return n.callFunction(`\\\\cdlongequal`,[],[]);case`\\Vert`:return n.callFunction(`\\Big`,[{type:`textord`,text:`\\Vert`,mode:`math`}],[]);default:return{type:`textord`,text:` `,mode:`math`}}}function nD(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 n=e.fetch().text;if(n===`&`||n===`\\\\`)e.consume();else if(n===`\\end`){t[t.length-1].length===0&&t.pop();break}else throw new z(`Expected \\\\ or \\cr or \\end`,e.nextToken)}for(var r=[],i=[r],a=0;a-1))if(`<>AV`.indexOf(l)>-1)for(var d=0;d<2;d++){for(var f=!0,p=c+1;pAV=|." after @`,o[c]);var m={type:`styling`,body:[tD(l,u,e)],mode:`math`,style:`display`};r.push(m),s=QE()}a%2==0?r.push(s):r.shift(),r=[],i.push(r)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:`math`,body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:Array(i[0].length).fill({type:`align`,align:`c`,pregap:.25,postgap:.25}),colSeparationType:`CD`,hLinesBeforeRow:Array(i.length+1).fill([])}}nE({type:`cdlabel`,names:[`\\\\cdleft`,`\\\\cdright`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:`cdlabel`,mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=J.wrapFragment(_E(e.label,n,t),t);return r.classes.push(`cd-label-`+e.side),r.style.bottom=B(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new Y.MathNode(`mrow`,[kE(e.label,t)]);return n=new Y.MathNode(`mpadded`,[n]),n.setAttribute(`width`,`0`),e.side===`left`&&n.setAttribute(`lspace`,`-1width`),n.setAttribute(`voffset`,`0.7em`),n=new Y.MathNode(`mstyle`,[n]),n.setAttribute(`displaystyle`,`false`),n.setAttribute(`scriptlevel`,`1`),n}}),nE({type:`cdlabelparent`,names:[`\\\\cdparent`],props:{numArgs:1},handler(e,t){var{parser:n}=e;return{type:`cdlabelparent`,mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=J.wrapFragment(_E(e.fragment,t),t);return n.classes.push(`cd-vert-arrow`),n},mathmlBuilder(e,t){return new Y.MathNode(`mrow`,[kE(e.fragment,t)])}}),nE({type:`textord`,names:[`\\@char`],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,r=BE(t[0],`ordgroup`).body,i=``,a=0;a=1114111)throw new z(`\\@char with invalid code point `+i);return s<=65535?c=String.fromCharCode(s):(s-=65536,c=String.fromCharCode((s>>10)+55296,(s&1023)+56320)),{type:`textord`,mode:n.mode,text:c}}});var rD=(e,t)=>{var n=dE(e.body,t.withColor(e.color),!1);return J.makeFragment(n)},iD=(e,t)=>{var n=DE(e.body,t.withColor(e.color)),r=new Y.MathNode(`mstyle`,n);return r.setAttribute(`mathcolor`,e.color),r};nE({type:`color`,names:[`\\textcolor`],props:{numArgs:2,allowedInText:!0,argTypes:[`color`,`original`]},handler(e,t){var{parser:n}=e,r=BE(t[0],`color-token`).color,i=t[1];return{type:`color`,mode:n.mode,color:r,body:aE(i)}},htmlBuilder:rD,mathmlBuilder:iD}),nE({type:`color`,names:[`\\color`],props:{numArgs:1,allowedInText:!0,argTypes:[`color`]},handler(e,t){var{parser:n,breakOnTokenText:r}=e,i=BE(t[0],`color-token`).color;n.gullet.macros.set(`\\current@color`,i);var a=n.parseExpression(!0,r);return{type:`color`,mode:n.mode,color:i,body:a}},htmlBuilder:rD,mathmlBuilder:iD}),nE({type:`cr`,names:[`\\\\`],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var{parser:r}=e,i=r.gullet.future().text===`[`?r.parseSizeGroup(!0):null,a=!r.settings.displayMode||!r.settings.useStrictBehavior(`newLineInDisplayMode`,`In LaTeX, \\\\ or \\newline does nothing in display mode`);return{type:`cr`,mode:r.mode,newLine:a,size:i&&BE(i,`size`).value}},htmlBuilder(e,t){var n=J.makeSpan([`mspace`],[],t);return e.newLine&&(n.classes.push(`newline`),e.size&&(n.style.marginTop=B(Nw(e.size,t)))),n},mathmlBuilder(e,t){var n=new Y.MathNode(`mspace`);return e.newLine&&(n.setAttribute(`linebreak`,`newline`),e.size&&n.setAttribute(`height`,B(Nw(e.size,t)))),n}});var aD={"\\global":`\\global`,"\\long":`\\\\globallong`,"\\\\globallong":`\\\\globallong`,"\\def":`\\gdef`,"\\gdef":`\\gdef`,"\\edef":`\\xdef`,"\\xdef":`\\xdef`,"\\let":`\\\\globallet`,"\\futurelet":`\\\\globalfuture`},oD=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new z(`Expected a control sequence`,e);return t},sD=e=>{var t=e.gullet.popToken();return t.text===`=`&&(t=e.gullet.popToken(),t.text===` `&&(t=e.gullet.popToken())),t},cD=(e,t,n,r)=>{var i=e.gullet.macros.get(n.text);i??=(n.noexpand=!0,{tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)};nE({type:`internal`,names:[`\\global`,`\\long`,`\\\\globallong`],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(aD[r.text])return(n===`\\global`||n===`\\\\globallong`)&&(r.text=aD[r.text]),BE(t.parseFunction(),`internal`);throw new z(`Invalid token after macro prefix`,r)}}),nE({type:`internal`,names:[`\\def`,`\\gdef`,`\\edef`,`\\xdef`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=t.gullet.popToken(),i=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new z(`Expected a control sequence`,r);for(var a=0,o,s=[[]];t.gullet.future().text!==`{`;)if(r=t.gullet.popToken(),r.text===`#`){if(t.gullet.future().text===`{`){o=t.gullet.future(),s[a].push(`{`);break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new z(`Invalid argument number "`+r.text+`"`);if(parseInt(r.text)!==a+1)throw new z(`Argument number "`+r.text+`" out of order`);a++,s.push([])}else if(r.text===`EOF`)throw new z(`Expected a macro definition`);else s[a].push(r.text);var{tokens:c}=t.gullet.consumeArg();return o&&c.unshift(o),(n===`\\edef`||n===`\\xdef`)&&(c=t.gullet.expandTokens(c),c.reverse()),t.gullet.macros.set(i,{tokens:c,numArgs:a,delimiters:s},n===aD[n]),{type:`internal`,mode:t.mode}}}),nE({type:`internal`,names:[`\\let`,`\\\\globallet`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=oD(t.gullet.popToken());return t.gullet.consumeSpaces(),cD(t,r,sD(t),n===`\\\\globallet`),{type:`internal`,mode:t.mode}}}),nE({type:`internal`,names:[`\\futurelet`,`\\\\globalfuture`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=oD(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return cD(t,r,a,n===`\\\\globalfuture`),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:`internal`,mode:t.mode}}});var lD=function(e,t,n){var r=Cw(Zw.math[e]&&Zw.math[e].replace||e,t,n);if(!r)throw Error(`Unsupported symbol `+e+` and font size `+t+`.`);return r},uD=function(e,t,n,r){var i=n.havingBaseStyle(t),a=J.makeSpan(r.concat(i.sizingClasses(n)),[e],n),o=i.sizeMultiplier/n.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},dD=function(e,t,n){var r=t.havingBaseStyle(n),i=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push(`delimcenter`),e.style.top=B(i),e.height-=i,e.depth+=i},fD=function(e,t,n,r,i,a){var o=uD(J.makeSymbol(e,`Main-Regular`,i,r),t,r,a);return n&&dD(o,r,t),o},pD=function(e,t,n,r){return J.makeSymbol(e,`Size`+t+`-Regular`,n,r)},mD=function(e,t,n,r,i,a){var o=pD(e,t,i,r),s=uD(J.makeSpan([`delimsizing`,`size`+t],[o],r),tw.TEXT,r,a);return n&&dD(s,r,tw.TEXT),s},hD=function(e,t,n){var r=t===`Size1-Regular`?`delim-size1`:`delim-size4`;return{type:`elem`,elem:J.makeSpan([`delimsizinginner`,r],[J.makeSpan([],[J.makeSymbol(e,t,n)])])}},gD=function(e,t,n){var r=yw[`Size4-Regular`][e.charCodeAt(0)]?yw[`Size4-Regular`][e.charCodeAt(0)][4]:yw[`Size1-Regular`][e.charCodeAt(0)][4],i=new Ww([new Gw(`inner`,hw(e,Math.round(1e3*t)))],{width:B(r),height:B(t),style:`width:`+B(r),viewBox:`0 0 `+1e3*r+` `+Math.round(1e3*t),preserveAspectRatio:`xMinYMin`}),a=J.makeSvgSpan([],[i],n);return a.height=t,a.style.height=B(t),a.style.width=B(r),{type:`elem`,elem:a}},_D=.008,vD={type:`kern`,size:-1*_D},yD=[`|`,`\\lvert`,`\\rvert`,`\\vert`],bD=[`\\|`,`\\lVert`,`\\rVert`,`\\Vert`],xD=function(e,t,n,r,i,a){var o,s,c,l,u=``,d=0;o=c=l=e,s=null;var f=`Size1-Regular`;e===`\\uparrow`?c=l=`⏐`:e===`\\Uparrow`?c=l=`‖`:e===`\\downarrow`?o=c=`⏐`:e===`\\Downarrow`?o=c=`‖`:e===`\\updownarrow`?(o=`\\uparrow`,c=`⏐`,l=`\\downarrow`):e===`\\Updownarrow`?(o=`\\Uparrow`,c=`‖`,l=`\\Downarrow`):yD.includes(e)?(c=`∣`,u=`vert`,d=333):bD.includes(e)?(c=`∥`,u=`doublevert`,d=556):e===`[`||e===`\\lbrack`?(o=`⎡`,c=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lbrack`,d=667):e===`]`||e===`\\rbrack`?(o=`⎤`,c=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rbrack`,d=667):e===`\\lfloor`||e===`⌊`?(c=o=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lfloor`,d=667):e===`\\lceil`||e===`⌈`?(o=`⎡`,c=l=`⎢`,f=`Size4-Regular`,u=`lceil`,d=667):e===`\\rfloor`||e===`⌋`?(c=o=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rfloor`,d=667):e===`\\rceil`||e===`⌉`?(o=`⎤`,c=l=`⎥`,f=`Size4-Regular`,u=`rceil`,d=667):e===`(`||e===`\\lparen`?(o=`⎛`,c=`⎜`,l=`⎝`,f=`Size4-Regular`,u=`lparen`,d=875):e===`)`||e===`\\rparen`?(o=`⎞`,c=`⎟`,l=`⎠`,f=`Size4-Regular`,u=`rparen`,d=875):e===`\\{`||e===`\\lbrace`?(o=`⎧`,s=`⎨`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\}`||e===`\\rbrace`?(o=`⎫`,s=`⎬`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lgroup`||e===`⟮`?(o=`⎧`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\rgroup`||e===`⟯`?(o=`⎫`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lmoustache`||e===`⎰`?(o=`⎧`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):(e===`\\rmoustache`||e===`⎱`)&&(o=`⎫`,l=`⎩`,c=`⎪`,f=`Size4-Regular`);var p=lD(o,f,i),m=p.height+p.depth,h=lD(c,f,i),g=h.height+h.depth,_=lD(l,f,i),v=_.height+_.depth,y=0,b=1;if(s!==null){var x=lD(s,f,i);y=x.height+x.depth,b=2}var ee=m+v+y,S=ee+Math.max(0,Math.ceil((t-ee)/(b*g)))*b*g,C=r.fontMetrics().axisHeight;n&&(C*=r.sizeMultiplier);var w=S/2-C,T=[];if(u.length>0){var te=S-m-v,ne=Math.round(S*1e3),E=_w(u,Math.round(te*1e3)),D=new Gw(u,E),re=(d/1e3).toFixed(3)+`em`,ie=(ne/1e3).toFixed(3)+`em`,ae=new Ww([D],{width:re,height:ie,viewBox:`0 0 `+d+` `+ne}),O=J.makeSvgSpan([],[ae],r);O.height=ne/1e3,O.style.width=re,O.style.height=ie,T.push({type:`elem`,elem:O})}else{if(T.push(hD(l,f,i)),T.push(vD),s===null){var oe=S-m-v+2*_D;T.push(gD(c,oe,r))}else{var se=(S-m-v-y)/2+2*_D;T.push(gD(c,se,r)),T.push(vD),T.push(hD(s,f,i)),T.push(vD),T.push(gD(c,se,r))}T.push(vD),T.push(hD(o,f,i))}var ce=r.havingBaseStyle(tw.TEXT),le=J.makeVList({positionType:`bottom`,positionData:w,children:T},ce);return uD(J.makeSpan([`delimsizing`,`mult`],[le],ce),tw.TEXT,r,a)},SD=80,CD=.08,wD=function(e,t,n,r,i){var a=new Ww([new Gw(e,mw(e,r,n))],{width:`400em`,height:B(t),viewBox:`0 0 400000 `+n,preserveAspectRatio:`xMinYMin slice`});return J.makeSvgSpan([`hide-tail`],[a],i)},TD=function(e,t){var n=t.havingBaseSizing(),r=FD(`\\surd`,e*n.sizeMultiplier,ND,n),i=n.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,s=0,c=0,l=0,u;return r.type===`small`?(l=1e3+1e3*a+SD,e<1?i=1:e<1.4&&(i=.7),s=(1+a+CD)/i,c=(1+a)/i,o=wD(`sqrtMain`,s,l,a,t),o.style.minWidth=`0.853em`,u=.833/i):r.type===`large`?(l=(1e3+SD)*kD[r.size],c=(kD[r.size]+a)/i,s=(kD[r.size]+a+CD)/i,o=wD(`sqrtSize`+r.size,s,l,a,t),o.style.minWidth=`1.02em`,u=1/i):(s=e+a+CD,c=e+a,l=Math.floor(1e3*e+a)+SD,o=wD(`sqrtTall`,s,l,a,t),o.style.minWidth=`0.742em`,u=1.056),o.height=c,o.style.height=B(s),{span:o,advanceWidth:u,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},ED=[`(`,`\\lparen`,`)`,`\\rparen`,`[`,`\\lbrack`,`]`,`\\rbrack`,`\\{`,`\\lbrace`,`\\}`,`\\rbrace`,`\\lfloor`,`\\rfloor`,`⌊`,`⌋`,`\\lceil`,`\\rceil`,`⌈`,`⌉`,`\\surd`],DD=[`\\uparrow`,`\\downarrow`,`\\updownarrow`,`\\Uparrow`,`\\Downarrow`,`\\Updownarrow`,`|`,`\\|`,`\\vert`,`\\Vert`,`\\lvert`,`\\rvert`,`\\lVert`,`\\rVert`,`\\lgroup`,`\\rgroup`,`⟮`,`⟯`,`\\lmoustache`,`\\rmoustache`,`⎰`,`⎱`],OD=[`<`,`>`,`\\langle`,`\\rangle`,`/`,`\\backslash`,`\\lt`,`\\gt`],kD=[0,1.2,1.8,2.4,3],AD=function(e,t,n,r,i){if(e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`),ED.includes(e)||OD.includes(e))return mD(e,t,!1,n,r,i);if(DD.includes(e))return xD(e,kD[t],!1,n,r,i);throw new z(`Illegal delimiter: '`+e+`'`)},jD=[{type:`small`,style:tw.SCRIPTSCRIPT},{type:`small`,style:tw.SCRIPT},{type:`small`,style:tw.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4}],MD=[{type:`small`,style:tw.SCRIPTSCRIPT},{type:`small`,style:tw.SCRIPT},{type:`small`,style:tw.TEXT},{type:`stack`}],ND=[{type:`small`,style:tw.SCRIPTSCRIPT},{type:`small`,style:tw.SCRIPT},{type:`small`,style:tw.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4},{type:`stack`}],PD=function(e){if(e.type===`small`)return`Main-Regular`;if(e.type===`large`)return`Size`+e.size+`-Regular`;if(e.type===`stack`)return`Size4-Regular`;throw Error(`Add support for delim type '`+e.type+`' here.`)},FD=function(e,t,n,r){for(var i=Math.min(2,3-r.style.size);it)return n[i]}return n[n.length-1]},ID=function(e,t,n,r,i,a){e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`);var o=OD.includes(e)?jD:ED.includes(e)?ND:MD,s=FD(e,t,o,r);return s.type===`small`?fD(e,s.style,n,r,i,a):s.type===`large`?mD(e,s.size,n,r,i,a):xD(e,t,n,r,i,a)},LD={sqrtImage:TD,sizedDelim:AD,sizeToMaxHeight:kD,customSizedDelim:ID,leftRightDelim:function(e,t,n,r,i,a){var o=r.fontMetrics().axisHeight*r.sizeMultiplier,s=901,c=5/r.fontMetrics().ptPerEm,l=Math.max(t-o,n+o);return ID(e,Math.max(l/500*s,2*l-c),!0,r,i,a)}},RD={"\\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}},zD=`(,\\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,.`.split(`,`);function BD(e,t){var n=HE(e);if(n&&zD.includes(n.text))return n;throw n?new z(`Invalid delimiter '`+n.text+`' after '`+t.funcName+`'`,e):new z(`Invalid delimiter type '`+e.type+`'`,e)}nE({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 n=BD(t[0],e);return{type:`delimsizing`,mode:e.parser.mode,size:RD[e.funcName].size,mclass:RD[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim===`.`?J.makeSpan([e.mclass]):LD.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!==`.`&&t.push(CE(e.delim,e.mode));var n=new Y.MathNode(`mo`,t);e.mclass===`mopen`||e.mclass===`mclose`?n.setAttribute(`fence`,`true`):n.setAttribute(`fence`,`false`),n.setAttribute(`stretchy`,`true`);var r=B(LD.sizeToMaxHeight[e.size]);return n.setAttribute(`minsize`,r),n.setAttribute(`maxsize`,r),n}});function VD(e){if(!e.body)throw Error(`Bug: The leftright ParseNode wasn't fully parsed.`)}nE({type:`leftright-right`,names:[`\\right`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e.parser.gullet.macros.get(`\\current@color`);if(n&&typeof n!=`string`)throw new z(`\\current@color set to non-string in \\right`);return{type:`leftright-right`,mode:e.parser.mode,delim:BD(t[0],e).text,color:n}}}),nE({type:`leftright`,names:[`\\left`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=BD(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect(`\\right`,!1);var a=BE(r.parseFunction(),`leftright-right`);return{type:`leftright`,mode:r.mode,body:i,left:n.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{VD(e);for(var n=dE(e.body,t,!0,[`mopen`,`mclose`]),r=0,i=0,a=!1,o=0;o{VD(e);var n=DE(e.body,t);if(e.left!==`.`){var r=new Y.MathNode(`mo`,[CE(e.left,e.mode)]);r.setAttribute(`fence`,`true`),n.unshift(r)}if(e.right!==`.`){var i=new Y.MathNode(`mo`,[CE(e.right,e.mode)]);i.setAttribute(`fence`,`true`),e.rightColor&&i.setAttribute(`mathcolor`,e.rightColor),n.push(i)}return wE(n)}}),nE({type:`middle`,names:[`\\middle`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=BD(t[0],e);if(!e.parser.leftrightDepth)throw new z(`\\middle without preceding \\left`,n);return{type:`middle`,mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;if(e.delim===`.`)n=gE(t,[]);else{n=LD.sizedDelim(e.delim,1,t,e.mode,[]);var r={delim:e.delim,options:t};n.isMiddle=r}return n},mathmlBuilder:(e,t)=>{var n=e.delim===`\\vert`||e.delim===`|`?CE(`|`,`text`):CE(e.delim,e.mode),r=new Y.MathNode(`mo`,[n]);return r.setAttribute(`fence`,`true`),r.setAttribute(`lspace`,`0.05em`),r.setAttribute(`rspace`,`0.05em`),r}});var HD=(e,t)=>{var n=J.wrapFragment(_E(e.body,t),t),r=e.label.slice(1),i=t.sizeMultiplier,a,o=0,s=FC.isCharacterBox(e.body);if(r===`sout`)a=J.makeSpan([`stretchy`,`sout`]),a.height=t.fontMetrics().defaultRuleThickness/i,o=-.5*t.fontMetrics().xHeight;else if(r===`phase`){var c=Nw({number:.6,unit:`pt`},t),l=Nw({number:.35,unit:`ex`},t),u=t.havingBaseSizing();i/=u.sizeMultiplier;var d=n.height+n.depth+c+l;n.style.paddingLeft=B(d/2+c);var f=Math.floor(1e3*d*i),p=new Ww([new Gw(`phase`,fw(f))],{width:`400em`,height:B(f/1e3),viewBox:`0 0 400000 `+f,preserveAspectRatio:`xMinYMin slice`});a=J.makeSvgSpan([`hide-tail`],[p],t),a.style.height=B(d),o=n.depth+c+l}else{/cancel/.test(r)?s||n.classes.push(`cancel-pad`):r===`angl`?n.classes.push(`anglpad`):n.classes.push(`boxpad`);var m=0,h=0,g=0;/box/.test(r)?(g=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),m=t.fontMetrics().fboxsep+(r===`colorbox`?0:g),h=m):r===`angl`?(g=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),m=4*g,h=Math.max(0,.25-n.depth)):(m=s?.2:0,h=m),a=zE.encloseSpan(n,r,m,h,t),/fbox|boxed|fcolorbox/.test(r)?(a.style.borderStyle=`solid`,a.style.borderWidth=B(g)):r===`angl`&&g!==.049&&(a.style.borderTopWidth=B(g),a.style.borderRightWidth=B(g)),o=n.depth+h,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var _;if(e.backgroundColor)_=J.makeVList({positionType:`individualShift`,children:[{type:`elem`,elem:a,shift:o},{type:`elem`,elem:n,shift:0}]},t);else{var v=/cancel|phase/.test(r)?[`svg-align`]:[];_=J.makeVList({positionType:`individualShift`,children:[{type:`elem`,elem:n,shift:0},{type:`elem`,elem:a,shift:o,wrapperClasses:v}]},t)}return/cancel/.test(r)&&(_.height=n.height,_.depth=n.depth),/cancel/.test(r)&&!s?J.makeSpan([`mord`,`cancel-lap`],[_],t):J.makeSpan([`mord`],[_],t)},UD=(e,t)=>{var n=0,r=new Y.MathNode(e.label.indexOf(`colorbox`)>-1?`mpadded`:`menclose`,[kE(e.body,t)]);switch(e.label){case`\\cancel`:r.setAttribute(`notation`,`updiagonalstrike`);break;case`\\bcancel`:r.setAttribute(`notation`,`downdiagonalstrike`);break;case`\\phase`:r.setAttribute(`notation`,`phasorangle`);break;case`\\sout`:r.setAttribute(`notation`,`horizontalstrike`);break;case`\\fbox`:r.setAttribute(`notation`,`box`);break;case`\\angl`:r.setAttribute(`notation`,`actuarial`);break;case`\\fcolorbox`:case`\\colorbox`:if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute(`width`,`+`+2*n+`pt`),r.setAttribute(`height`,`+`+2*n+`pt`),r.setAttribute(`lspace`,n+`pt`),r.setAttribute(`voffset`,n+`pt`),e.label===`\\fcolorbox`){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute(`style`,`border: `+i+`em solid `+String(e.borderColor))}break;case`\\xcancel`:r.setAttribute(`notation`,`updiagonalstrike downdiagonalstrike`);break}return e.backgroundColor&&r.setAttribute(`mathbackground`,e.backgroundColor),r};nE({type:`enclose`,names:[`\\colorbox`],props:{numArgs:2,allowedInText:!0,argTypes:[`color`,`text`]},handler(e,t,n){var{parser:r,funcName:i}=e,a=BE(t[0],`color-token`).color,o=t[1];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:a,body:o}},htmlBuilder:HD,mathmlBuilder:UD}),nE({type:`enclose`,names:[`\\fcolorbox`],props:{numArgs:3,allowedInText:!0,argTypes:[`color`,`color`,`text`]},handler(e,t,n){var{parser:r,funcName:i}=e,a=BE(t[0],`color-token`).color,o=BE(t[1],`color-token`).color,s=t[2];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:o,borderColor:a,body:s}},htmlBuilder:HD,mathmlBuilder:UD}),nE({type:`enclose`,names:[`\\fbox`],props:{numArgs:1,argTypes:[`hbox`],allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`enclose`,mode:n.mode,label:`\\fbox`,body:t[0]}}}),nE({type:`enclose`,names:[`\\cancel`,`\\bcancel`,`\\xcancel`,`\\sout`,`\\phase`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}},htmlBuilder:HD,mathmlBuilder:UD}),nE({type:`enclose`,names:[`\\angl`],props:{numArgs:1,argTypes:[`hbox`],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:`enclose`,mode:n.mode,label:`\\angl`,body:t[0]}}});var WD={};function GD(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:o}=e,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},c=0;c{if(!e.parser.settings.displayMode)throw new z(`{`+e.envName+`} can be used only in display mode.`)};function YD(e){if(e.indexOf(`ed`)===-1)return e.indexOf(`*`)===-1}function XD(e,t,n){var{hskipBeforeAndAfter:r,addJot:i,cols:a,arraystretch:o,colSeparationType:s,autoTag:c,singleRow:l,emptySingleRow:u,maxNumCols:d,leqno:f}=t;if(e.gullet.beginGroup(),l||e.gullet.macros.set(`\\cr`,`\\\\\\relax`),!o){var p=e.gullet.expandMacroAsText(`\\arraystretch`);if(p==null)o=1;else if(o=parseFloat(p),!o||o<0)throw new z(`Invalid \\arraystretch: `+p)}e.gullet.beginGroup();var m=[],h=[m],g=[],_=[],v=c==null?void 0:[];function y(){c&&e.gullet.macros.set(`\\@eqnsw`,`1`,!0)}function b(){v&&(e.gullet.macros.get(`\\df@tag`)?(v.push(e.subparse([new TC(`\\df@tag`)])),e.gullet.macros.set(`\\df@tag`,void 0,!0)):v.push(!!c&&e.gullet.macros.get(`\\@eqnsw`)===`1`))}for(y(),_.push(qD(e));;){var x=e.parseExpression(!1,l?`\\end`:`\\\\`);e.gullet.endGroup(),e.gullet.beginGroup(),x={type:`ordgroup`,mode:e.mode,body:x},n&&(x={type:`styling`,mode:e.mode,style:n,body:[x]}),m.push(x);var ee=e.fetch().text;if(ee===`&`){if(d&&m.length===d){if(l||s)throw new z(`Too many tab characters: &`,e.nextToken);e.settings.reportNonstrict(`textEnv`,`Too few columns specified in the {array} column argument.`)}e.consume()}else if(ee===`\\end`){b(),m.length===1&&x.type===`styling`&&x.body[0].body.length===0&&(h.length>1||!u)&&h.pop(),_.length0&&(_+=.25),c.push({pos:_,isDashed:e[t]})}for(v(a[0]),n=0;n0&&(w+=g,xe))for(n=0;n=o)){var fe=void 0;(r>0||e.hskipBeforeAndAfter)&&(fe=FC.deflt(se.pregap,d),fe!==0&&(E=J.makeSpan([`arraycolsep`],[]),E.style.width=B(fe),ne.push(E)));var pe=[];for(n=0;n0){for(var _e=J.makeLineSpan(`hline`,t,l),ve=J.makeLineSpan(`hdashline`,t,l),ye=[{type:`elem`,elem:s,shift:0}];c.length>0;){var k=c.pop(),be=k.pos-T;k.isDashed?ye.push({type:`elem`,elem:ve,shift:be}):ye.push({type:`elem`,elem:_e,shift:be})}s=J.makeVList({positionType:`individualShift`,children:ye},t)}if(re.length===0)return J.makeSpan([`mord`],[s],t);var xe=J.makeVList({positionType:`individualShift`,children:re},t);return xe=J.makeSpan([`tag`],[xe],t),J.makeFragment([s,xe])},$D={c:`center `,l:`left `,r:`right `},eO=function(e,t){for(var n=[],r=new Y.MathNode(`mtd`,[],[`mtr-glue`]),i=new Y.MathNode(`mtd`,[],[`mml-eqn-num`]),a=0;a0){var p=e.cols,m=``,h=!1,g=0,_=p.length;p[0].type===`separator`&&(d+=`top `,g=1),p[p.length-1].type===`separator`&&(d+=`bottom `,--_);for(var v=g;v<_;v++)p[v].type===`align`?(f+=$D[p[v].align],h&&(m+=`none `),h=!0):p[v].type===`separator`&&(h&&=(m+=p[v].separator===`|`?`solid `:`dashed `,!1));l.setAttribute(`columnalign`,f.trim()),/[sd]/.test(m)&&l.setAttribute(`columnlines`,m.trim())}if(e.colSeparationType===`align`){for(var y=e.cols||[],b=``,x=1;x0?`left `:``,d+=S[S.length-1].length>0?`right `:``;for(var C=1;C-1?`alignat`:`align`,i=e.envName===`split`,a=XD(e.parser,{cols:n,addJot:!0,autoTag:i?void 0:YD(e.envName),emptySingleRow:!0,colSeparationType:r,maxNumCols:i?2:void 0,leqno:e.parser.settings.leqno},`display`),o,s=0,c={type:`ordgroup`,mode:e.mode,body:[]};if(t[0]&&t[0].type===`ordgroup`){for(var l=``,u=0;u0&&f&&(h=1),n[p]={type:`align`,align:m,pregap:h,postgap:0}}return a.colSeparationType=f?`align`:`alignat`,a};GD({type:`array`,names:[`array`,`darray`],props:{numArgs:1},handler(e,t){var n=(HE(t[0])?[t[0]]:BE(t[0],`ordgroup`).body).map(function(e){var t=VE(e).text;if(`lcr`.indexOf(t)!==-1)return{type:`align`,align:t};if(t===`|`)return{type:`separator`,separator:`|`};if(t===`:`)return{type:`separator`,separator:`:`};throw new z(`Unknown column alignment: `+t,e)}),r={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return XD(e.parser,r,ZD(e.envName))},htmlBuilder:QD,mathmlBuilder:eO}),GD({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(`*`,``)],n=`c`,r={hskipBeforeAndAfter:!1,cols:[{type:`align`,align:n}]};if(e.envName.charAt(e.envName.length-1)===`*`){var i=e.parser;if(i.consumeSpaces(),i.fetch().text===`[`){if(i.consume(),i.consumeSpaces(),n=i.fetch().text,`lcr`.indexOf(n)===-1)throw new z(`Expected l or c or r`,i.nextToken);i.consume(),i.consumeSpaces(),i.expect(`]`),i.consume(),r.cols=[{type:`align`,align:n}]}}var a=XD(e.parser,r,ZD(e.envName)),o=Math.max(0,...a.body.map(e=>e.length));return a.cols=Array(o).fill({type:`align`,align:n}),t?{type:`leftright`,mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:QD,mathmlBuilder:eO}),GD({type:`array`,names:[`smallmatrix`],props:{numArgs:0},handler(e){var t=XD(e.parser,{arraystretch:.5},`script`);return t.colSeparationType=`small`,t},htmlBuilder:QD,mathmlBuilder:eO}),GD({type:`array`,names:[`subarray`],props:{numArgs:1},handler(e,t){var n=(HE(t[0])?[t[0]]:BE(t[0],`ordgroup`).body).map(function(e){var t=VE(e).text;if(`lc`.indexOf(t)!==-1)return{type:`align`,align:t};throw new z(`Unknown column alignment: `+t,e)});if(n.length>1)throw new z(`{subarray} can contain only one column`);var r={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5};if(r=XD(e.parser,r,`script`),r.body.length>0&&r.body[0].length>1)throw new z(`{subarray} can contain only one column`);return r},htmlBuilder:QD,mathmlBuilder:eO}),GD({type:`array`,names:[`cases`,`dcases`,`rcases`,`drcases`],props:{numArgs:0},handler(e){var t=XD(e.parser,{arraystretch:1.2,cols:[{type:`align`,align:`l`,pregap:0,postgap:1},{type:`align`,align:`l`,pregap:0,postgap:0}]},ZD(e.envName));return{type:`leftright`,mode:e.mode,body:[t],left:e.envName.indexOf(`r`)>-1?`.`:`\\{`,right:e.envName.indexOf(`r`)>-1?`\\}`:`.`,rightColor:void 0}},htmlBuilder:QD,mathmlBuilder:eO}),GD({type:`array`,names:[`align`,`align*`,`aligned`,`split`],props:{numArgs:0},handler:tO,htmlBuilder:QD,mathmlBuilder:eO}),GD({type:`array`,names:[`gathered`,`gather`,`gather*`],props:{numArgs:0},handler(e){[`gather`,`gather*`].includes(e.envName)&&JD(e);var t={cols:[{type:`align`,align:`c`}],addJot:!0,colSeparationType:`gather`,autoTag:YD(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return XD(e.parser,t,`display`)},htmlBuilder:QD,mathmlBuilder:eO}),GD({type:`array`,names:[`alignat`,`alignat*`,`alignedat`],props:{numArgs:1},handler:tO,htmlBuilder:QD,mathmlBuilder:eO}),GD({type:`array`,names:[`equation`,`equation*`],props:{numArgs:0},handler(e){JD(e);var t={autoTag:YD(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return XD(e.parser,t,`display`)},htmlBuilder:QD,mathmlBuilder:eO}),GD({type:`array`,names:[`CD`],props:{numArgs:0},handler(e){return JD(e),nD(e.parser)},htmlBuilder:QD,mathmlBuilder:eO}),X(`\\nonumber`,`\\gdef\\@eqnsw{0}`),X(`\\notag`,`\\nonumber`),nE({type:`text`,names:[`\\hline`,`\\hdashline`],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new z(e.funcName+` valid only within array environment`)}});var nO=WD;nE({type:`environment`,names:[`\\begin`,`\\end`],props:{numArgs:1,argTypes:[`text`]},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];if(i.type!==`ordgroup`)throw new z(`Invalid environment name`,i);for(var a=``,o=0;o{var n=e.font,r=t.withFont(n);return _E(e.body,r)},iO=(e,t)=>{var n=e.font,r=t.withFont(n);return kE(e.body,r)},aO={"\\Bbb":`\\mathbb`,"\\bold":`\\mathbf`,"\\frak":`\\mathfrak`,"\\bm":`\\boldsymbol`};nE({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:n,funcName:r}=e,i=iE(t[0]),a=r;return a in aO&&(a=aO[a]),{type:`font`,mode:n.mode,font:a.slice(1),body:i}},htmlBuilder:rO,mathmlBuilder:iO}),nE({type:`mclass`,names:[`\\boldsymbol`,`\\bm`],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,r=t[0],i=FC.isCharacterBox(r);return{type:`mclass`,mode:n.mode,mclass:XE(r),body:[{type:`font`,mode:n.mode,font:`boldsymbol`,body:r}],isCharacterBox:i}}}),nE({type:`font`,names:[`\\rm`,`\\sf`,`\\tt`,`\\bf`,`\\it`,`\\cal`],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:i}=e,{mode:a}=n,o=n.parseExpression(!0,i);return{type:`font`,mode:a,font:`math`+r.slice(1),body:{type:`ordgroup`,mode:n.mode,body:o}}},htmlBuilder:rO,mathmlBuilder:iO});var oO=(e,t)=>{var n=t;return e===`display`?n=n.id>=tw.SCRIPT.id?n.text():tw.DISPLAY:e===`text`&&n.size===tw.DISPLAY.size?n=tw.TEXT:e===`script`?n=tw.SCRIPT:e===`scriptscript`&&(n=tw.SCRIPTSCRIPT),n},sO=(e,t)=>{var n=oO(e.size,t.style),r=n.fracNum(),i=n.fracDen(),a=t.havingStyle(r),o=_E(e.numer,a,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,c=3.5/t.fontMetrics().ptPerEm;o.height=o.height0?3*f:7*f,h=t.fontMetrics().denom1):(d>0?(p=t.fontMetrics().num2,m=f):(p=t.fontMetrics().num3,m=3*f),h=t.fontMetrics().denom2);var g;if(u){var _=t.fontMetrics().axisHeight;p-o.depth-(_+.5*d){var n=new Y.MathNode(`mfrac`,[kE(e.numer,t),kE(e.denom,t)]);if(!e.hasBarLine)n.setAttribute(`linethickness`,`0px`);else if(e.barSize){var r=Nw(e.barSize,t);n.setAttribute(`linethickness`,B(r))}var i=oO(e.size,t.style);if(i.size!==t.style.size){n=new Y.MathNode(`mstyle`,[n]);var a=i.size===tw.DISPLAY.size?`true`:`false`;n.setAttribute(`displaystyle`,a),n.setAttribute(`scriptlevel`,`0`)}if(e.leftDelim!=null||e.rightDelim!=null){var o=[];if(e.leftDelim!=null){var s=new Y.MathNode(`mo`,[new Y.TextNode(e.leftDelim.replace(`\\`,``))]);s.setAttribute(`fence`,`true`),o.push(s)}if(o.push(n),e.rightDelim!=null){var c=new Y.MathNode(`mo`,[new Y.TextNode(e.rightDelim.replace(`\\`,``))]);c.setAttribute(`fence`,`true`),o.push(c)}return wE(o)}return n};nE({type:`genfrac`,names:[`\\dfrac`,`\\frac`,`\\tfrac`,`\\dbinom`,`\\binom`,`\\tbinom`,`\\\\atopfrac`,`\\\\bracefrac`,`\\\\brackfrac`],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=t[1],o,s=null,c=null,l=`auto`;switch(r){case`\\dfrac`:case`\\frac`:case`\\tfrac`:o=!0;break;case`\\\\atopfrac`:o=!1;break;case`\\dbinom`:case`\\binom`:case`\\tbinom`:o=!1,s=`(`,c=`)`;break;case`\\\\bracefrac`:o=!1,s=`\\{`,c=`\\}`;break;case`\\\\brackfrac`:o=!1,s=`[`,c=`]`;break;default:throw Error(`Unrecognized genfrac command`)}switch(r){case`\\dfrac`:case`\\dbinom`:l=`display`;break;case`\\tfrac`:case`\\tbinom`:l=`text`;break}return{type:`genfrac`,mode:n.mode,continued:!1,numer:i,denom:a,hasBarLine:o,leftDelim:s,rightDelim:c,size:l,barSize:null}},htmlBuilder:sO,mathmlBuilder:cO}),nE({type:`genfrac`,names:[`\\cfrac`],props:{numArgs:2},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=t[1];return{type:`genfrac`,mode:n.mode,continued:!0,numer:i,denom:a,hasBarLine:!0,leftDelim:null,rightDelim:null,size:`display`,barSize:null}}}),nE({type:`infix`,names:[`\\over`,`\\choose`,`\\atop`,`\\brace`,`\\brack`],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:n,token:r}=e,i;switch(n){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 Error(`Unrecognized infix genfrac command`)}return{type:`infix`,mode:t.mode,replaceWith:i,token:r}}});var lO=[`display`,`text`,`script`,`scriptscript`],uO=function(e){var t=null;return e.length>0&&(t=e,t=t===`.`?null:t),t};nE({type:`genfrac`,names:[`\\genfrac`],props:{numArgs:6,allowedInArgument:!0,argTypes:[`math`,`math`,`size`,`text`,`math`,`math`]},handler(e,t){var{parser:n}=e,r=t[4],i=t[5],a=iE(t[0]),o=a.type===`atom`&&a.family===`open`?uO(a.text):null,s=iE(t[1]),c=s.type===`atom`&&s.family===`close`?uO(s.text):null,l=BE(t[2],`size`),u,d=null;l.isBlank?u=!0:(d=l.value,u=d.number>0);var f=`auto`,p=t[3];if(p.type===`ordgroup`){if(p.body.length>0){var m=BE(p.body[0],`textord`);f=lO[Number(m.text)]}}else p=BE(p,`textord`),f=lO[Number(p.text)];return{type:`genfrac`,mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:u,barSize:d,leftDelim:o,rightDelim:c,size:f}},htmlBuilder:sO,mathmlBuilder:cO}),nE({type:`infix`,names:[`\\above`],props:{numArgs:1,argTypes:[`size`],infix:!0},handler(e,t){var{parser:n,funcName:r,token:i}=e;return{type:`infix`,mode:n.mode,replaceWith:`\\\\abovefrac`,size:BE(t[0],`size`).value,token:i}}}),nE({type:`genfrac`,names:[`\\\\abovefrac`],props:{numArgs:3,argTypes:[`math`,`size`,`math`]},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=PC(BE(t[1],`infix`).size),o=t[2],s=a.number>0;return{type:`genfrac`,mode:n.mode,numer:i,denom:o,continued:!1,hasBarLine:s,barSize:a,leftDelim:null,rightDelim:null,size:`auto`}},htmlBuilder:sO,mathmlBuilder:cO});var dO=(e,t)=>{var n=t.style,r,i;e.type===`supsub`?(r=e.sup?_E(e.sup,t.havingStyle(n.sup()),t):_E(e.sub,t.havingStyle(n.sub()),t),i=BE(e.base,`horizBrace`)):i=BE(e,`horizBrace`);var a=_E(i.base,t.havingBaseStyle(tw.DISPLAY)),o=zE.svgSpan(i,t),s;if(i.isOver?(s=J.makeVList({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:.1},{type:`elem`,elem:o}]},t),s.children[0].children[0].children[1].classes.push(`svg-align`)):(s=J.makeVList({positionType:`bottom`,positionData:a.depth+.1+o.height,children:[{type:`elem`,elem:o},{type:`kern`,size:.1},{type:`elem`,elem:a}]},t),s.children[0].children[0].children[0].classes.push(`svg-align`)),r){var c=J.makeSpan([`mord`,i.isOver?`mover`:`munder`],[s],t);s=i.isOver?J.makeVList({positionType:`firstBaseline`,children:[{type:`elem`,elem:c},{type:`kern`,size:.2},{type:`elem`,elem:r}]},t):J.makeVList({positionType:`bottom`,positionData:c.depth+.2+r.height+r.depth,children:[{type:`elem`,elem:r},{type:`kern`,size:.2},{type:`elem`,elem:c}]},t)}return J.makeSpan([`mord`,i.isOver?`mover`:`munder`],[s],t)};nE({type:`horizBrace`,names:[`\\overbrace`,`\\underbrace`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:`horizBrace`,mode:n.mode,label:r,isOver:/^\\over/.test(r),base:t[0]}},htmlBuilder:dO,mathmlBuilder:(e,t)=>{var n=zE.mathMLnode(e.label);return new Y.MathNode(e.isOver?`mover`:`munder`,[kE(e.base,t),n])}}),nE({type:`href`,names:[`\\href`],props:{numArgs:2,argTypes:[`url`,`original`],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[1],i=BE(t[0],`url`).url;return n.settings.isTrusted({command:`\\href`,url:i})?{type:`href`,mode:n.mode,href:i,body:aE(r)}:n.formatUnsupportedCmd(`\\href`)},htmlBuilder:(e,t)=>{var n=dE(e.body,t,!1);return J.makeAnchor(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=OE(e.body,t);return n instanceof xE||(n=new xE(`mrow`,[n])),n.setAttribute(`href`,e.href),n}}),nE({type:`href`,names:[`\\url`],props:{numArgs:1,argTypes:[`url`],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=BE(t[0],`url`).url;if(!n.settings.isTrusted({command:`\\url`,url:r}))return n.formatUnsupportedCmd(`\\url`);for(var i=[],a=0;a{var{parser:n,funcName:r,token:i}=e,a=BE(t[0],`raw`).string,o=t[1];n.settings.strict&&n.settings.reportNonstrict(`htmlExtension`,`HTML extension is disabled on strict mode`);var s,c={};switch(r){case`\\htmlClass`:c.class=a,s={command:`\\htmlClass`,class:a};break;case`\\htmlId`:c.id=a,s={command:`\\htmlId`,id:a};break;case`\\htmlStyle`:c.style=a,s={command:`\\htmlStyle`,style:a};break;case`\\htmlData`:for(var l=a.split(`,`),u=0;u{var n=dE(e.body,t,!1),r=[`enclosing`];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=J.makeSpan(r,n,t);for(var a in e.attributes)a!==`class`&&e.attributes.hasOwnProperty(a)&&i.setAttribute(a,e.attributes[a]);return i},mathmlBuilder:(e,t)=>OE(e.body,t)}),nE({type:`htmlmathml`,names:[`\\html@mathml`],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e;return{type:`htmlmathml`,mode:n.mode,html:aE(t[0]),mathml:aE(t[1])}},htmlBuilder:(e,t)=>{var n=dE(e.html,t,!1);return J.makeFragment(n)},mathmlBuilder:(e,t)=>OE(e.mathml,t)});var fO=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:`bp`};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new z(`Invalid size: '`+e+`' in \\includegraphics`);var n={number:+(t[1]+t[2]),unit:t[3]};if(!Mw(n))throw new z(`Invalid unit: '`+n.unit+`' in \\includegraphics.`);return n};nE({type:`includegraphics`,names:[`\\includegraphics`],props:{numArgs:1,numOptionalArgs:1,argTypes:[`raw`,`url`],allowedInText:!1},handler:(e,t,n)=>{var{parser:r}=e,i={number:0,unit:`em`},a={number:.9,unit:`em`},o={number:0,unit:`em`},s=``;if(n[0])for(var c=BE(n[0],`raw`).string.split(`,`),l=0;l{var n=Nw(e.height,t),r=0;e.totalheight.number>0&&(r=Nw(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=Nw(e.width,t));var a={height:B(n+r)};i>0&&(a.width=B(i)),r>0&&(a.verticalAlign=B(-r));var o=new Vw(e.src,e.alt,a);return o.height=n,o.depth=r,o},mathmlBuilder:(e,t)=>{var n=new Y.MathNode(`mglyph`,[]);n.setAttribute(`alt`,e.alt);var r=Nw(e.height,t),i=0;if(e.totalheight.number>0&&(i=Nw(e.totalheight,t)-r,n.setAttribute(`valign`,B(-i))),n.setAttribute(`height`,B(r+i)),e.width.number>0){var a=Nw(e.width,t);n.setAttribute(`width`,B(a))}return n.setAttribute(`src`,e.src),n}}),nE({type:`kern`,names:[`\\kern`,`\\mkern`,`\\hskip`,`\\mskip`],props:{numArgs:1,argTypes:[`size`],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=BE(t[0],`size`);if(n.settings.strict){var a=r[1]===`m`,o=i.value.unit===`mu`;a?(o||n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` supports only mu units, `+(`not `+i.value.unit+` units`)),n.mode!==`math`&&n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` works only in math mode`)):o&&n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` doesn't support mu units`)}return{type:`kern`,mode:n.mode,dimension:i.value}},htmlBuilder(e,t){return J.makeGlue(e.dimension,t)},mathmlBuilder(e,t){var n=Nw(e.dimension,t);return new Y.SpaceNode(n)}}),nE({type:`lap`,names:[`\\mathllap`,`\\mathrlap`,`\\mathclap`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`lap`,mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:(e,t)=>{var n;e.alignment===`clap`?(n=J.makeSpan([],[_E(e.body,t)]),n=J.makeSpan([`inner`],[n],t)):n=J.makeSpan([`inner`],[_E(e.body,t)]);var r=J.makeSpan([`fix`],[]),i=J.makeSpan([e.alignment],[n,r],t),a=J.makeSpan([`strut`]);return a.style.height=B(i.height+i.depth),i.depth&&(a.style.verticalAlign=B(-i.depth)),i.children.unshift(a),i=J.makeSpan([`thinbox`],[i],t),J.makeSpan([`mord`,`vbox`],[i],t)},mathmlBuilder:(e,t)=>{var n=new Y.MathNode(`mpadded`,[kE(e.body,t)]);if(e.alignment!==`rlap`){var r=e.alignment===`llap`?`-1`:`-0.5`;n.setAttribute(`lspace`,r+`width`)}return n.setAttribute(`width`,`0px`),n}}),nE({type:`styling`,names:[`\\(`,`$`],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:r}=e,i=r.mode;r.switchMode(`math`);var a=n===`\\(`?`\\)`:`$`,o=r.parseExpression(!1,a);return r.expect(a),r.switchMode(i),{type:`styling`,mode:r.mode,style:`text`,body:o}}}),nE({type:`text`,names:[`\\)`,`\\]`],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new z(`Mismatched `+e.funcName)}});var pO=(e,t)=>{switch(t.style.size){case tw.DISPLAY.size:return e.display;case tw.TEXT.size:return e.text;case tw.SCRIPT.size:return e.script;case tw.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};nE({type:`mathchoice`,names:[`\\mathchoice`],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:`mathchoice`,mode:n.mode,display:aE(t[0]),text:aE(t[1]),script:aE(t[2]),scriptscript:aE(t[3])}},htmlBuilder:(e,t)=>{var n=dE(pO(e,t),t,!1);return J.makeFragment(n)},mathmlBuilder:(e,t)=>OE(pO(e,t),t)});var mO=(e,t,n,r,i,a,o)=>{e=J.makeSpan([],[e]);var s=n&&FC.isCharacterBox(n),c,l;if(t){var u=_E(t,r.havingStyle(i.sup()),r);l={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-u.depth)}}if(n){var d=_E(n,r.havingStyle(i.sub()),r);c={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-d.height)}}var f;if(l&&c){var p=r.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+o;f=J.makeVList({positionType:`bottom`,positionData:p,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:B(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:B(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]},r)}else if(c){var m=e.height-o;f=J.makeVList({positionType:`top`,positionData:m,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:B(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e}]},r)}else if(l){var h=e.depth+o;f=J.makeVList({positionType:`bottom`,positionData:h,children:[{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:B(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]},r)}else return e;var g=[f];if(c&&a!==0&&!s){var _=J.makeSpan([`mspace`],[],r);_.style.marginRight=B(a),g.unshift(_)}return J.makeSpan([`mop`,`op-limits`],g,r)},hO=[`\\smallint`],gO=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=BE(e.base,`op`),i=!0):a=BE(e,`op`);var o=t.style,s=!1;o.size===tw.DISPLAY.size&&a.symbol&&!hO.includes(a.name)&&(s=!0);var c;if(a.symbol){var l=s?`Size2-Regular`:`Size1-Regular`,u=``;if((a.name===`\\oiint`||a.name===`\\oiiint`)&&(u=a.name.slice(1),a.name=u===`oiint`?`\\iint`:`\\iiint`),c=J.makeSymbol(a.name,l,`math`,t,[`mop`,`op-symbol`,s?`large-op`:`small-op`]),u.length>0){var d=c.italic,f=J.staticSvg(u+`Size`+(s?`2`:`1`),t);c=J.makeVList({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:0},{type:`elem`,elem:f,shift:s?.08:0}]},t),a.name=`\\`+u,c.classes.unshift(`mop`),c.italic=d}}else if(a.body){var p=dE(a.body,t,!0);p.length===1&&p[0]instanceof Uw?(c=p[0],c.classes[0]=`mop`):c=J.makeSpan([`mop`],p,t)}else{for(var m=[],h=1;h{var n;if(e.symbol)n=new xE(`mo`,[CE(e.name,e.mode)]),hO.includes(e.name)&&n.setAttribute(`largeop`,`false`);else if(e.body)n=new xE(`mo`,DE(e.body,t));else{n=new xE(`mi`,[new SE(e.name.slice(1))]);var r=new xE(`mo`,[CE(`⁡`,`text`)]);n=e.parentIsSupSub?new xE(`mrow`,[n,r]):bE([n,r])}return n},vO={"∏":`\\prod`,"∐":`\\coprod`,"∑":`\\sum`,"⋀":`\\bigwedge`,"⋁":`\\bigvee`,"⋂":`\\bigcap`,"⋃":`\\bigcup`,"⨀":`\\bigodot`,"⨁":`\\bigoplus`,"⨂":`\\bigotimes`,"⨄":`\\biguplus`,"⨆":`\\bigsqcup`};nE({type:`op`,names:`\\coprod.\\bigvee.\\bigwedge.\\biguplus.\\bigcap.\\bigcup.\\intop.\\prod.\\sum.\\bigotimes.\\bigoplus.\\bigodot.\\bigsqcup.\\smallint.∏.∐.∑.⋀.⋁.⋂.⋃.⨀.⨁.⨂.⨄.⨆`.split(`.`),props:{numArgs:0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=r;return i.length===1&&(i=vO[i]),{type:`op`,mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:gO,mathmlBuilder:_O}),nE({type:`op`,names:[`\\mathop`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`op`,mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:aE(r)}},htmlBuilder:gO,mathmlBuilder:_O});var yO={"∫":`\\int`,"∬":`\\iint`,"∭":`\\iiint`,"∮":`\\oint`,"∯":`\\oiint`,"∰":`\\oiiint`};nE({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`.split(`.`),props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:gO,mathmlBuilder:_O}),nE({type:`op`,names:[`\\det`,`\\gcd`,`\\inf`,`\\lim`,`\\max`,`\\min`,`\\Pr`,`\\sup`],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:`op`,mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:gO,mathmlBuilder:_O}),nE({type:`op`,names:[`\\int`,`\\iint`,`\\iiint`,`\\oint`,`\\oiint`,`\\oiiint`,`∫`,`∬`,`∭`,`∮`,`∯`,`∰`],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:n}=e,r=n;return r.length===1&&(r=yO[r]),{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:gO,mathmlBuilder:_O});var bO=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=BE(e.base,`operatorname`),i=!0):a=BE(e,`operatorname`);var o;if(a.body.length>0){for(var s=dE(a.body.map(e=>{var t=e.text;return typeof t==`string`?{type:`textord`,mode:e.mode,text:t}:e}),t.withFont(`mathrm`),!0),c=0;c{var{parser:n,funcName:r}=e,i=t[0];return{type:`operatorname`,mode:n.mode,body:aE(i),alwaysHandleSupSub:r===`\\operatornamewithlimits`,limits:!1,parentIsSupSub:!1}},htmlBuilder:bO,mathmlBuilder:(e,t)=>{for(var n=DE(e.body,t.withFont(`mathrm`)),r=!0,i=0;ie.toText()).join(``);n=[new Y.TextNode(s)]}var c=new Y.MathNode(`mi`,n);c.setAttribute(`mathvariant`,`normal`);var l=new Y.MathNode(`mo`,[CE(`⁡`,`text`)]);return e.parentIsSupSub?new Y.MathNode(`mrow`,[c,l]):Y.newDocumentFragment([c,l])}}),X(`\\operatorname`,`\\@ifstar\\operatornamewithlimits\\operatorname@`),rE({type:`ordgroup`,htmlBuilder(e,t){return e.semisimple?J.makeFragment(dE(e.body,t,!1)):J.makeSpan([`mord`],dE(e.body,t,!0),t)},mathmlBuilder(e,t){return OE(e.body,t,!0)}}),nE({type:`overline`,names:[`\\overline`],props:{numArgs:1},handler(e,t){var{parser:n}=e,r=t[0];return{type:`overline`,mode:n.mode,body:r}},htmlBuilder(e,t){var n=_E(e.body,t.havingCrampedStyle()),r=J.makeLineSpan(`overline-line`,t),i=t.fontMetrics().defaultRuleThickness,a=J.makeVList({positionType:`firstBaseline`,children:[{type:`elem`,elem:n},{type:`kern`,size:3*i},{type:`elem`,elem:r},{type:`kern`,size:i}]},t);return J.makeSpan([`mord`,`overline`],[a],t)},mathmlBuilder(e,t){var n=new Y.MathNode(`mo`,[new Y.TextNode(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new Y.MathNode(`mover`,[kE(e.body,t),n]);return r.setAttribute(`accent`,`true`),r}}),nE({type:`phantom`,names:[`\\phantom`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`phantom`,mode:n.mode,body:aE(r)}},htmlBuilder:(e,t)=>{var n=dE(e.body,t.withPhantom(),!1);return J.makeFragment(n)},mathmlBuilder:(e,t)=>{var n=DE(e.body,t);return new Y.MathNode(`mphantom`,n)}}),nE({type:`hphantom`,names:[`\\hphantom`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`hphantom`,mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=J.makeSpan([],[_E(e.body,t.withPhantom())]);if(n.height=0,n.depth=0,n.children)for(var r=0;r{var n=DE(aE(e.body),t),r=new Y.MathNode(`mphantom`,n),i=new Y.MathNode(`mpadded`,[r]);return i.setAttribute(`height`,`0px`),i.setAttribute(`depth`,`0px`),i}}),nE({type:`vphantom`,names:[`\\vphantom`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`vphantom`,mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=J.makeSpan([`inner`],[_E(e.body,t.withPhantom())]),r=J.makeSpan([`fix`],[]);return J.makeSpan([`mord`,`rlap`],[n,r],t)},mathmlBuilder:(e,t)=>{var n=DE(aE(e.body),t),r=new Y.MathNode(`mphantom`,n),i=new Y.MathNode(`mpadded`,[r]);return i.setAttribute(`width`,`0px`),i}}),nE({type:`raisebox`,names:[`\\raisebox`],props:{numArgs:2,argTypes:[`size`,`hbox`],allowedInText:!0},handler(e,t){var{parser:n}=e,r=BE(t[0],`size`).value,i=t[1];return{type:`raisebox`,mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=_E(e.body,t),r=Nw(e.dy,t);return J.makeVList({positionType:`shift`,positionData:-r,children:[{type:`elem`,elem:n}]},t)},mathmlBuilder(e,t){var n=new Y.MathNode(`mpadded`,[kE(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute(`voffset`,r),n}}),nE({type:`internal`,names:[`\\relax`],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:`internal`,mode:t.mode}}}),nE({type:`rule`,names:[`\\rule`],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`size`,`size`,`size`]},handler(e,t,n){var{parser:r}=e,i=n[0],a=BE(t[0],`size`),o=BE(t[1],`size`);return{type:`rule`,mode:r.mode,shift:i&&BE(i,`size`).value,width:a.value,height:o.value}},htmlBuilder(e,t){var n=J.makeSpan([`mord`,`rule`],[],t),r=Nw(e.width,t),i=Nw(e.height,t),a=e.shift?Nw(e.shift,t):0;return n.style.borderRightWidth=B(r),n.style.borderTopWidth=B(i),n.style.bottom=B(a),n.width=r,n.height=i+a,n.depth=-a,n.maxFontSize=i*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=Nw(e.width,t),r=Nw(e.height,t),i=e.shift?Nw(e.shift,t):0,a=t.color&&t.getColor()||`black`,o=new Y.MathNode(`mspace`);o.setAttribute(`mathbackground`,a),o.setAttribute(`width`,B(n)),o.setAttribute(`height`,B(r));var s=new Y.MathNode(`mpadded`,[o]);return i>=0?s.setAttribute(`height`,B(i)):(s.setAttribute(`height`,B(i)),s.setAttribute(`depth`,B(-i))),s.setAttribute(`voffset`,B(i)),s}});function xO(e,t,n){for(var r=dE(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,a=0;a{var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!1,n);return{type:`sizing`,mode:i.mode,size:SO.indexOf(r)+1,body:a}},htmlBuilder:(e,t)=>{var n=t.havingSize(e.size);return xO(e.body,n,t)},mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=DE(e.body,n),i=new Y.MathNode(`mstyle`,r);return i.setAttribute(`mathsize`,B(n.sizeMultiplier)),i}}),nE({type:`smash`,names:[`\\smash`],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:r}=e,i=!1,a=!1,o=n[0]&&BE(n[0],`ordgroup`);if(o)for(var s=``,c=0;c{var n=J.makeSpan([],[_E(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0,n.children))for(var r=0;r{var n=new Y.MathNode(`mpadded`,[kE(e.body,t)]);return e.smashHeight&&n.setAttribute(`height`,`0px`),e.smashDepth&&n.setAttribute(`depth`,`0px`),n}}),nE({type:`sqrt`,names:[`\\sqrt`],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r}=e,i=n[0],a=t[0];return{type:`sqrt`,mode:r.mode,body:a,index:i}},htmlBuilder(e,t){var n=_E(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=J.wrapFragment(n,t);var r=t.fontMetrics().defaultRuleThickness,i=r;t.style.idn.height+n.depth+a&&(a=(a+u-n.height-n.depth)/2);var d=s.height-n.height-a-c;n.style.paddingLeft=B(l);var f=J.makeVList({positionType:`firstBaseline`,children:[{type:`elem`,elem:n,wrapperClasses:[`svg-align`]},{type:`kern`,size:-(n.height+d)},{type:`elem`,elem:s},{type:`kern`,size:c}]},t);if(e.index){var p=t.havingStyle(tw.SCRIPTSCRIPT),m=_E(e.index,p,t),h=.6*(f.height-f.depth),g=J.makeVList({positionType:`shift`,positionData:-h,children:[{type:`elem`,elem:m}]},t),_=J.makeSpan([`root`],[g]);return J.makeSpan([`mord`,`sqrt`],[_,f],t)}else return J.makeSpan([`mord`,`sqrt`],[f],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new Y.MathNode(`mroot`,[kE(n,t),kE(r,t)]):new Y.MathNode(`msqrt`,[kE(n,t)])}});var CO={display:tw.DISPLAY,text:tw.TEXT,script:tw.SCRIPT,scriptscript:tw.SCRIPTSCRIPT};nE({type:`styling`,names:[`\\displaystyle`,`\\textstyle`,`\\scriptstyle`,`\\scriptscriptstyle`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!0,n),o=r.slice(1,r.length-5);return{type:`styling`,mode:i.mode,style:o,body:a}},htmlBuilder(e,t){var n=CO[e.style],r=t.havingStyle(n).withFont(``);return xO(e.body,r,t)},mathmlBuilder(e,t){var n=CO[e.style],r=t.havingStyle(n),i=DE(e.body,r),a=new Y.MathNode(`mstyle`,i),o={display:[`0`,`true`],text:[`0`,`false`],script:[`1`,`false`],scriptscript:[`2`,`false`]}[e.style];return a.setAttribute(`scriptlevel`,o[0]),a.setAttribute(`displaystyle`,o[1]),a}});var wO=function(e,t){var n=e.base;return n?n.type===`op`?n.limits&&(t.style.size===tw.DISPLAY.size||n.alwaysHandleSupSub)?gO:null:n.type===`operatorname`?n.alwaysHandleSupSub&&(t.style.size===tw.DISPLAY.size||n.limits)?bO:null:n.type===`accent`?FC.isCharacterBox(n.base)?UE:null:n.type===`horizBrace`&&!e.sub===n.isOver?dO:null:null};rE({type:`supsub`,htmlBuilder(e,t){var n=wO(e,t);if(n)return n(e,t);var{base:r,sup:i,sub:a}=e,o=_E(r,t),s,c,l=t.fontMetrics(),u=0,d=0,f=r&&FC.isCharacterBox(r);if(i){var p=t.havingStyle(t.style.sup());s=_E(i,p,t),f||(u=o.height-p.fontMetrics().supDrop*p.sizeMultiplier/t.sizeMultiplier)}if(a){var m=t.havingStyle(t.style.sub());c=_E(a,m,t),f||(d=o.depth+m.fontMetrics().subDrop*m.sizeMultiplier/t.sizeMultiplier)}var h=t.style===tw.DISPLAY?l.sup1:t.style.cramped?l.sup3:l.sup2,g=t.sizeMultiplier,_=B(.5/l.ptPerEm/g),v=null;if(c){var y=e.base&&e.base.type===`op`&&e.base.name&&(e.base.name===`\\oiint`||e.base.name===`\\oiiint`);(o instanceof Uw||y)&&(v=B(-o.italic))}var b;if(s&&c){u=Math.max(u,h,s.depth+.25*l.xHeight),d=Math.max(d,l.sub2);var x=4*l.defaultRuleThickness;if(u-s.depth-(c.height-d)0&&(u+=ee,d-=ee)}var S=[{type:`elem`,elem:c,shift:d,marginRight:_,marginLeft:v},{type:`elem`,elem:s,shift:-u,marginRight:_}];b=J.makeVList({positionType:`individualShift`,children:S},t)}else if(c){d=Math.max(d,l.sub1,c.height-.8*l.xHeight);var C=[{type:`elem`,elem:c,marginLeft:v,marginRight:_}];b=J.makeVList({positionType:`shift`,positionData:d,children:C},t)}else if(s)u=Math.max(u,h,s.depth+.25*l.xHeight),b=J.makeVList({positionType:`shift`,positionData:-u,children:[{type:`elem`,elem:s,marginRight:_}]},t);else throw Error(`supsub must have either sup or sub.`);var w=hE(o,`right`)||`mord`;return J.makeSpan([w],[o,J.makeSpan([`msupsub`],[b])],t)},mathmlBuilder(e,t){var n=!1,r,i;e.base&&e.base.type===`horizBrace`&&(i=!!e.sup,i===e.base.isOver&&(n=!0,r=e.base.isOver)),e.base&&(e.base.type===`op`||e.base.type===`operatorname`)&&(e.base.parentIsSupSub=!0);var a=[kE(e.base,t)];e.sub&&a.push(kE(e.sub,t)),e.sup&&a.push(kE(e.sup,t));var o;if(n)o=r?`mover`:`munder`;else if(!e.sub){var s=e.base;o=s&&s.type===`op`&&s.limits&&(t.style===tw.DISPLAY||s.alwaysHandleSupSub)||s&&s.type===`operatorname`&&s.alwaysHandleSupSub&&(s.limits||t.style===tw.DISPLAY)?`mover`:`msup`}else if(e.sup){var c=e.base;o=c&&c.type===`op`&&c.limits&&t.style===tw.DISPLAY||c&&c.type===`operatorname`&&c.alwaysHandleSupSub&&(t.style===tw.DISPLAY||c.limits)?`munderover`:`msubsup`}else{var l=e.base;o=l&&l.type===`op`&&l.limits&&(t.style===tw.DISPLAY||l.alwaysHandleSupSub)||l&&l.type===`operatorname`&&l.alwaysHandleSupSub&&(l.limits||t.style===tw.DISPLAY)?`munder`:`msub`}return new Y.MathNode(o,a)}}),rE({type:`atom`,htmlBuilder(e,t){return J.mathsym(e.text,e.mode,t,[`m`+e.family])},mathmlBuilder(e,t){var n=new Y.MathNode(`mo`,[CE(e.text,e.mode)]);if(e.family===`bin`){var r=TE(e,t);r===`bold-italic`&&n.setAttribute(`mathvariant`,r)}else e.family===`punct`?n.setAttribute(`separator`,`true`):(e.family===`open`||e.family===`close`)&&n.setAttribute(`stretchy`,`false`);return n}});var TO={mi:`italic`,mn:`normal`,mtext:`normal`};rE({type:`mathord`,htmlBuilder(e,t){return J.makeOrd(e,t,`mathord`)},mathmlBuilder(e,t){var n=new Y.MathNode(`mi`,[CE(e.text,e.mode,t)]),r=TE(e,t)||`italic`;return r!==TO[n.type]&&n.setAttribute(`mathvariant`,r),n}}),rE({type:`textord`,htmlBuilder(e,t){return J.makeOrd(e,t,`textord`)},mathmlBuilder(e,t){var n=CE(e.text,e.mode,t),r=TE(e,t)||`normal`,i=e.mode===`text`?new Y.MathNode(`mtext`,[n]):/[0-9]/.test(e.text)?new Y.MathNode(`mn`,[n]):e.text===`\\prime`?new Y.MathNode(`mo`,[n]):new Y.MathNode(`mi`,[n]);return r!==TO[i.type]&&i.setAttribute(`mathvariant`,r),i}});var EO={"\\nobreak":`nobreak`,"\\allowbreak":`allowbreak`},DO={" ":{},"\\ ":{},"~":{className:`nobreak`},"\\space":{},"\\nobreakspace":{className:`nobreak`}};rE({type:`spacing`,htmlBuilder(e,t){if(DO.hasOwnProperty(e.text)){var n=DO[e.text].className||``;if(e.mode===`text`){var r=J.makeOrd(e,t,`textord`);return r.classes.push(n),r}else return J.makeSpan([`mspace`,n],[J.mathsym(e.text,e.mode,t)],t)}else if(EO.hasOwnProperty(e.text))return J.makeSpan([`mspace`,EO[e.text]],[],t);else throw new z(`Unknown type of space "`+e.text+`"`)},mathmlBuilder(e,t){var n;if(DO.hasOwnProperty(e.text))n=new Y.MathNode(`mtext`,[new Y.TextNode(`\xA0`)]);else if(EO.hasOwnProperty(e.text))return new Y.MathNode(`mspace`);else throw new z(`Unknown type of space "`+e.text+`"`);return n}});var OO=()=>{var e=new Y.MathNode(`mtd`,[]);return e.setAttribute(`width`,`50%`),e};rE({type:`tag`,mathmlBuilder(e,t){var n=new Y.MathNode(`mtable`,[new Y.MathNode(`mtr`,[OO(),new Y.MathNode(`mtd`,[OE(e.body,t)]),OO(),new Y.MathNode(`mtd`,[OE(e.tag,t)])])]);return n.setAttribute(`width`,`100%`),n}});var kO={"\\text":void 0,"\\textrm":`textrm`,"\\textsf":`textsf`,"\\texttt":`texttt`,"\\textnormal":`textrm`},AO={"\\textbf":`textbf`,"\\textmd":`textmd`},jO={"\\textit":`textit`,"\\textup":`textup`},MO=(e,t)=>{var n=e.font;return n?kO[n]?t.withTextFontFamily(kO[n]):AO[n]?t.withTextFontWeight(AO[n]):n===`\\emph`?t.fontShape===`textit`?t.withTextFontShape(`textup`):t.withTextFontShape(`textit`):t.withTextFontShape(jO[n]):t};nE({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:n,funcName:r}=e,i=t[0];return{type:`text`,mode:n.mode,body:aE(i),font:r}},htmlBuilder(e,t){var n=MO(e,t),r=dE(e.body,n,!0);return J.makeSpan([`mord`,`text`],r,n)},mathmlBuilder(e,t){var n=MO(e,t);return OE(e.body,n)}}),nE({type:`underline`,names:[`\\underline`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`underline`,mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=_E(e.body,t),r=J.makeLineSpan(`underline-line`,t),i=t.fontMetrics().defaultRuleThickness,a=J.makeVList({positionType:`top`,positionData:n.height,children:[{type:`kern`,size:i},{type:`elem`,elem:r},{type:`kern`,size:3*i},{type:`elem`,elem:n}]},t);return J.makeSpan([`mord`,`underline`],[a],t)},mathmlBuilder(e,t){var n=new Y.MathNode(`mo`,[new Y.TextNode(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new Y.MathNode(`munder`,[kE(e.body,t),n]);return r.setAttribute(`accentunder`,`true`),r}}),nE({type:`vcenter`,names:[`\\vcenter`],props:{numArgs:1,argTypes:[`original`],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:`vcenter`,mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=_E(e.body,t),r=t.fontMetrics().axisHeight,i=.5*(n.height-r-(n.depth+r));return J.makeVList({positionType:`shift`,positionData:i,children:[{type:`elem`,elem:n}]},t)},mathmlBuilder(e,t){return new Y.MathNode(`mpadded`,[kE(e.body,t)],[`vcenter`])}}),nE({type:`verb`,names:[`\\verb`],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new z(`\\verb ended by end of line instead of matching delimiter`)},htmlBuilder(e,t){for(var n=NO(e),r=[],i=t.havingStyle(t.style.text()),a=0;ae.body.replace(/ /g,e.star?`␣`:`\xA0`),PO=$T,FO=`[ \r + ]`,IO=`\\\\[a-zA-Z@]+`,LO=`\\\\[^\ud800-\udfff]`,RO=`(`+IO+`)`+FO+`*`,zO=`\\\\( +|[ \r ]+ +?)[ \r ]*`,BO=`[̀-ͯ]`,VO=RegExp(BO+`+$`),HO=`(`+FO+`+)|`+(zO+`|`)+`([!-\\[\\]-‧‪-퟿豈-￿]`+(BO+`*`)+`|[\ud800-\udbff][\udc00-\udfff]`+(BO+`*`)+`|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5`+(`|`+RO)+(`|`+LO+`)`),UO=class{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(HO,`g`),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new TC(`EOF`,new wC(this,t,t));var n=this.tokenRegex.exec(e);if(n===null||n.index!==t)throw new z(`Unexpected character: '`+e[t]+`'`,new TC(e[t],new wC(this,t,t+1)));var r=n[6]||n[3]||(n[2]?`\\ `:` `);if(this.catcodes[r]===14){var i=e.indexOf(` +`,this.tokenRegex.lastIndex);return i===-1?(this.tokenRegex.lastIndex=e.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=i+1,this.lex()}return new TC(r,new wC(this,t,this.tokenRegex.lastIndex))}},WO=class{constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new z(`Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug`);var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(e[t]==null?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,n){if(n===void 0&&(n=!1),n){for(var r=0;r0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(e)&&(i[e]=this.current[e])}t==null?delete this.current[e]:this.current[e]=t}},GO=KD;X(`\\noexpand`,function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),X(`\\expandafter`,function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),X(`\\@firstoftwo`,function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),X(`\\@secondoftwo`,function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),X(`\\@ifnextchar`,function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),X(`\\@ifstar`,`\\@ifnextchar *{\\@firstoftwo{#1}}`),X(`\\TextOrMath`,function(e){var t=e.consumeArgs(2);return e.mode===`text`?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var KO={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};X(`\\char`,function(e){var t=e.popToken(),n,r=``;if(t.text===`'`)n=8,t=e.popToken();else if(t.text===`"`)n=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]===`\\`)r=t.text.charCodeAt(1);else if(t.text===`EOF`)throw new z("\\char` missing argument");else r=t.text.charCodeAt(0);else n=10;if(n){if(r=KO[t.text],r==null||r>=n)throw new z(`Invalid base-`+n+` digit `+t.text);for(var i;(i=KO[e.future().text])!=null&&i{var i=e.consumeArg().tokens;if(i.length!==1)throw new z(`\\newcommand's first argument must be a macro name`);var a=i[0].text,o=e.isDefined(a);if(o&&!t)throw new z(`\\newcommand{`+a+`} attempting to redefine `+(a+`; use \\renewcommand`));if(!o&&!n)throw new z(`\\renewcommand{`+a+`} when command `+a+` does not yet exist; use \\newcommand`);var s=0;if(i=e.consumeArg().tokens,i.length===1&&i[0].text===`[`){for(var c=``,l=e.expandNextToken();l.text!==`]`&&l.text!==`EOF`;)c+=l.text,l=e.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new z(`Invalid number of arguments: `+c);s=parseInt(c),i=e.consumeArg().tokens}return o&&r||e.macros.set(a,{tokens:i,numArgs:s}),``};X(`\\newcommand`,e=>qO(e,!1,!0,!1)),X(`\\renewcommand`,e=>qO(e,!0,!1,!1)),X(`\\providecommand`,e=>qO(e,!0,!0,!0)),X(`\\message`,e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(e=>e.text).join(``)),``}),X(`\\errmessage`,e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(e=>e.text).join(``)),``}),X(`\\show`,e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),PO[n],Zw.math[n],Zw.text[n]),``}),X(`\\bgroup`,`{`),X(`\\egroup`,`}`),X(`~`,`\\nobreakspace`),X(`\\lq`,"`"),X(`\\rq`,`'`),X(`\\aa`,`\\r a`),X(`\\AA`,`\\r A`),X(`\\textcopyright`,"\\html@mathml{\\textcircled{c}}{\\char`©}"),X(`\\copyright`,`\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}`),X(`\\textregistered`,"\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),X(`ℬ`,`\\mathscr{B}`),X(`ℰ`,`\\mathscr{E}`),X(`ℱ`,`\\mathscr{F}`),X(`ℋ`,`\\mathscr{H}`),X(`ℐ`,`\\mathscr{I}`),X(`ℒ`,`\\mathscr{L}`),X(`ℳ`,`\\mathscr{M}`),X(`ℛ`,`\\mathscr{R}`),X(`ℭ`,`\\mathfrak{C}`),X(`ℌ`,`\\mathfrak{H}`),X(`ℨ`,`\\mathfrak{Z}`),X(`\\Bbbk`,`\\Bbb{k}`),X(`·`,`\\cdotp`),X(`\\llap`,`\\mathllap{\\textrm{#1}}`),X(`\\rlap`,`\\mathrlap{\\textrm{#1}}`),X(`\\clap`,`\\mathclap{\\textrm{#1}}`),X(`\\mathstrut`,`\\vphantom{(}`),X(`\\underbar`,`\\underline{\\text{#1}}`),X(`\\not`,`\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}`),X(`\\neq`,"\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),X(`\\ne`,`\\neq`),X(`≠`,`\\neq`),X(`\\notin`,"\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),X(`∉`,`\\notin`),X(`≘`,"\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),X(`≙`,"\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),X(`≚`,"\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),X(`≛`,"\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),X(`≝`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),X(`≞`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),X(`≟`,"\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),X(`⟂`,`\\perp`),X(`‼`,`\\mathclose{!\\mkern-0.8mu!}`),X(`∌`,`\\notni`),X(`⌜`,`\\ulcorner`),X(`⌝`,`\\urcorner`),X(`⌞`,`\\llcorner`),X(`⌟`,`\\lrcorner`),X(`©`,`\\copyright`),X(`®`,`\\textregistered`),X(`️`,`\\textregistered`),X(`\\ulcorner`,`\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}`),X(`\\urcorner`,`\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}`),X(`\\llcorner`,`\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}`),X(`\\lrcorner`,`\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}`),X(`\\vdots`,`{\\varvdots\\rule{0pt}{15pt}}`),X(`⋮`,`\\vdots`),X(`\\varGamma`,`\\mathit{\\Gamma}`),X(`\\varDelta`,`\\mathit{\\Delta}`),X(`\\varTheta`,`\\mathit{\\Theta}`),X(`\\varLambda`,`\\mathit{\\Lambda}`),X(`\\varXi`,`\\mathit{\\Xi}`),X(`\\varPi`,`\\mathit{\\Pi}`),X(`\\varSigma`,`\\mathit{\\Sigma}`),X(`\\varUpsilon`,`\\mathit{\\Upsilon}`),X(`\\varPhi`,`\\mathit{\\Phi}`),X(`\\varPsi`,`\\mathit{\\Psi}`),X(`\\varOmega`,`\\mathit{\\Omega}`),X(`\\substack`,`\\begin{subarray}{c}#1\\end{subarray}`),X(`\\colon`,`\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax`),X(`\\boxed`,`\\fbox{$\\displaystyle{#1}$}`),X(`\\iff`,`\\DOTSB\\;\\Longleftrightarrow\\;`),X(`\\implies`,`\\DOTSB\\;\\Longrightarrow\\;`),X(`\\impliedby`,`\\DOTSB\\;\\Longleftarrow\\;`),X(`\\dddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}`),X(`\\ddddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}`);var JO={",":`\\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`};X(`\\dots`,function(e){var t=`\\dotso`,n=e.expandAfterFuture().text;return n in JO?t=JO[n]:(n.slice(0,4)===`\\not`||n in Zw.math&&[`bin`,`rel`].includes(Zw.math[n].group))&&(t=`\\dotsb`),t});var YO={")":!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};X(`\\dotso`,function(e){return e.future().text in YO?`\\ldots\\,`:`\\ldots`}),X(`\\dotsc`,function(e){var t=e.future().text;return t in YO&&t!==`,`?`\\ldots\\,`:`\\ldots`}),X(`\\cdots`,function(e){return e.future().text in YO?`\\@cdots\\,`:`\\@cdots`}),X(`\\dotsb`,`\\cdots`),X(`\\dotsm`,`\\cdots`),X(`\\dotsi`,`\\!\\cdots`),X(`\\dotsx`,`\\ldots\\,`),X(`\\DOTSI`,`\\relax`),X(`\\DOTSB`,`\\relax`),X(`\\DOTSX`,`\\relax`),X(`\\tmspace`,`\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax`),X(`\\,`,`\\tmspace+{3mu}{.1667em}`),X(`\\thinspace`,`\\,`),X(`\\>`,`\\mskip{4mu}`),X(`\\:`,`\\tmspace+{4mu}{.2222em}`),X(`\\medspace`,`\\:`),X(`\\;`,`\\tmspace+{5mu}{.2777em}`),X(`\\thickspace`,`\\;`),X(`\\!`,`\\tmspace-{3mu}{.1667em}`),X(`\\negthinspace`,`\\!`),X(`\\negmedspace`,`\\tmspace-{4mu}{.2222em}`),X(`\\negthickspace`,`\\tmspace-{5mu}{.277em}`),X(`\\enspace`,`\\kern.5em `),X(`\\enskip`,`\\hskip.5em\\relax`),X(`\\quad`,`\\hskip1em\\relax`),X(`\\qquad`,`\\hskip2em\\relax`),X(`\\tag`,`\\@ifstar\\tag@literal\\tag@paren`),X(`\\tag@paren`,`\\tag@literal{({#1})}`),X(`\\tag@literal`,e=>{if(e.macros.get(`\\df@tag`))throw new z(`Multiple \\tag`);return`\\gdef\\df@tag{\\text{#1}}`}),X(`\\bmod`,`\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}`),X(`\\pod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)`),X(`\\pmod`,`\\pod{{\\rm mod}\\mkern6mu#1}`),X(`\\mod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1`),X(`\\newline`,`\\\\\\relax`),X(`\\TeX`,`\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}`);var XO=B(yw[`Main-Regular`][84][1]-.7*yw[`Main-Regular`][65][1]);X(`\\LaTeX`,`\\textrm{\\html@mathml{`+(`L\\kern-.36em\\raisebox{`+XO+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{LaTeX}}`),X(`\\KaTeX`,`\\textrm{\\html@mathml{`+(`K\\kern-.17em\\raisebox{`+XO+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{KaTeX}}`),X(`\\hspace`,`\\@ifstar\\@hspacer\\@hspace`),X(`\\@hspace`,`\\hskip #1\\relax`),X(`\\@hspacer`,`\\rule{0pt}{0pt}\\hskip #1\\relax`),X(`\\ordinarycolon`,`:`),X(`\\vcentcolon`,`\\mathrel{\\mathop\\ordinarycolon}`),X(`\\dblcolon`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}`),X(`\\coloneqq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}`),X(`\\Coloneqq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}`),X(`\\coloneq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}`),X(`\\Coloneq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}`),X(`\\eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}`),X(`\\Eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}`),X(`\\eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}`),X(`\\Eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}`),X(`\\colonapprox`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}`),X(`\\Colonapprox`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}`),X(`\\colonsim`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}`),X(`\\Colonsim`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}`),X(`∷`,`\\dblcolon`),X(`∹`,`\\eqcolon`),X(`≔`,`\\coloneqq`),X(`≕`,`\\eqqcolon`),X(`⩴`,`\\Coloneqq`),X(`\\ratio`,`\\vcentcolon`),X(`\\coloncolon`,`\\dblcolon`),X(`\\colonequals`,`\\coloneqq`),X(`\\coloncolonequals`,`\\Coloneqq`),X(`\\equalscolon`,`\\eqqcolon`),X(`\\equalscoloncolon`,`\\Eqqcolon`),X(`\\colonminus`,`\\coloneq`),X(`\\coloncolonminus`,`\\Coloneq`),X(`\\minuscolon`,`\\eqcolon`),X(`\\minuscoloncolon`,`\\Eqcolon`),X(`\\coloncolonapprox`,`\\Colonapprox`),X(`\\coloncolonsim`,`\\Colonsim`),X(`\\simcolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),X(`\\simcoloncolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}`),X(`\\approxcolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),X(`\\approxcoloncolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}`),X(`\\notni`,"\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),X(`\\limsup`,`\\DOTSB\\operatorname*{lim\\,sup}`),X(`\\liminf`,`\\DOTSB\\operatorname*{lim\\,inf}`),X(`\\injlim`,`\\DOTSB\\operatorname*{inj\\,lim}`),X(`\\projlim`,`\\DOTSB\\operatorname*{proj\\,lim}`),X(`\\varlimsup`,`\\DOTSB\\operatorname*{\\overline{lim}}`),X(`\\varliminf`,`\\DOTSB\\operatorname*{\\underline{lim}}`),X(`\\varinjlim`,`\\DOTSB\\operatorname*{\\underrightarrow{lim}}`),X(`\\varprojlim`,`\\DOTSB\\operatorname*{\\underleftarrow{lim}}`),X(`\\gvertneqq`,`\\html@mathml{\\@gvertneqq}{≩}`),X(`\\lvertneqq`,`\\html@mathml{\\@lvertneqq}{≨}`),X(`\\ngeqq`,`\\html@mathml{\\@ngeqq}{≱}`),X(`\\ngeqslant`,`\\html@mathml{\\@ngeqslant}{≱}`),X(`\\nleqq`,`\\html@mathml{\\@nleqq}{≰}`),X(`\\nleqslant`,`\\html@mathml{\\@nleqslant}{≰}`),X(`\\nshortmid`,`\\html@mathml{\\@nshortmid}{∤}`),X(`\\nshortparallel`,`\\html@mathml{\\@nshortparallel}{∦}`),X(`\\nsubseteqq`,`\\html@mathml{\\@nsubseteqq}{⊈}`),X(`\\nsupseteqq`,`\\html@mathml{\\@nsupseteqq}{⊉}`),X(`\\varsubsetneq`,`\\html@mathml{\\@varsubsetneq}{⊊}`),X(`\\varsubsetneqq`,`\\html@mathml{\\@varsubsetneqq}{⫋}`),X(`\\varsupsetneq`,`\\html@mathml{\\@varsupsetneq}{⊋}`),X(`\\varsupsetneqq`,`\\html@mathml{\\@varsupsetneqq}{⫌}`),X(`\\imath`,`\\html@mathml{\\@imath}{ı}`),X(`\\jmath`,`\\html@mathml{\\@jmath}{ȷ}`),X(`\\llbracket`,"\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),X(`\\rrbracket`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),X(`⟦`,`\\llbracket`),X(`⟧`,`\\rrbracket`),X(`\\lBrace`,"\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),X(`\\rBrace`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),X(`⦃`,`\\lBrace`),X(`⦄`,`\\rBrace`),X(`\\minuso`,"\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),X(`⦵`,`\\minuso`),X(`\\darr`,`\\downarrow`),X(`\\dArr`,`\\Downarrow`),X(`\\Darr`,`\\Downarrow`),X(`\\lang`,`\\langle`),X(`\\rang`,`\\rangle`),X(`\\uarr`,`\\uparrow`),X(`\\uArr`,`\\Uparrow`),X(`\\Uarr`,`\\Uparrow`),X(`\\N`,`\\mathbb{N}`),X(`\\R`,`\\mathbb{R}`),X(`\\Z`,`\\mathbb{Z}`),X(`\\alef`,`\\aleph`),X(`\\alefsym`,`\\aleph`),X(`\\Alpha`,`\\mathrm{A}`),X(`\\Beta`,`\\mathrm{B}`),X(`\\bull`,`\\bullet`),X(`\\Chi`,`\\mathrm{X}`),X(`\\clubs`,`\\clubsuit`),X(`\\cnums`,`\\mathbb{C}`),X(`\\Complex`,`\\mathbb{C}`),X(`\\Dagger`,`\\ddagger`),X(`\\diamonds`,`\\diamondsuit`),X(`\\empty`,`\\emptyset`),X(`\\Epsilon`,`\\mathrm{E}`),X(`\\Eta`,`\\mathrm{H}`),X(`\\exist`,`\\exists`),X(`\\harr`,`\\leftrightarrow`),X(`\\hArr`,`\\Leftrightarrow`),X(`\\Harr`,`\\Leftrightarrow`),X(`\\hearts`,`\\heartsuit`),X(`\\image`,`\\Im`),X(`\\infin`,`\\infty`),X(`\\Iota`,`\\mathrm{I}`),X(`\\isin`,`\\in`),X(`\\Kappa`,`\\mathrm{K}`),X(`\\larr`,`\\leftarrow`),X(`\\lArr`,`\\Leftarrow`),X(`\\Larr`,`\\Leftarrow`),X(`\\lrarr`,`\\leftrightarrow`),X(`\\lrArr`,`\\Leftrightarrow`),X(`\\Lrarr`,`\\Leftrightarrow`),X(`\\Mu`,`\\mathrm{M}`),X(`\\natnums`,`\\mathbb{N}`),X(`\\Nu`,`\\mathrm{N}`),X(`\\Omicron`,`\\mathrm{O}`),X(`\\plusmn`,`\\pm`),X(`\\rarr`,`\\rightarrow`),X(`\\rArr`,`\\Rightarrow`),X(`\\Rarr`,`\\Rightarrow`),X(`\\real`,`\\Re`),X(`\\reals`,`\\mathbb{R}`),X(`\\Reals`,`\\mathbb{R}`),X(`\\Rho`,`\\mathrm{P}`),X(`\\sdot`,`\\cdot`),X(`\\sect`,`\\S`),X(`\\spades`,`\\spadesuit`),X(`\\sub`,`\\subset`),X(`\\sube`,`\\subseteq`),X(`\\supe`,`\\supseteq`),X(`\\Tau`,`\\mathrm{T}`),X(`\\thetasym`,`\\vartheta`),X(`\\weierp`,`\\wp`),X(`\\Zeta`,`\\mathrm{Z}`),X(`\\argmin`,`\\DOTSB\\operatorname*{arg\\,min}`),X(`\\argmax`,`\\DOTSB\\operatorname*{arg\\,max}`),X(`\\plim`,`\\DOTSB\\mathop{\\operatorname{plim}}\\limits`),X(`\\bra`,`\\mathinner{\\langle{#1}|}`),X(`\\ket`,`\\mathinner{|{#1}\\rangle}`),X(`\\braket`,`\\mathinner{\\langle{#1}\\rangle}`),X(`\\Bra`,`\\left\\langle#1\\right|`),X(`\\Ket`,`\\left|#1\\right\\rangle`);var ZO=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,i=t.consumeArg().tokens,a=t.consumeArg().tokens,o=t.macros.get(`|`),s=t.macros.get(`\\|`);t.macros.beginGroup();var c=t=>n=>{e&&(n.macros.set(`|`,o),i.length&&n.macros.set(`\\|`,s));var a=t;return!t&&i.length&&n.future().text===`|`&&(n.popToken(),a=!0),{tokens:a?i:r,numArgs:0}};t.macros.set(`|`,c(!1)),i.length&&t.macros.set(`\\|`,c(!0));var l=t.consumeArg().tokens,u=t.expandTokens([...a,...l,...n]);return t.macros.endGroup(),{tokens:u.reverse(),numArgs:0}};X(`\\bra@ket`,ZO(!1)),X(`\\bra@set`,ZO(!0)),X(`\\Braket`,`\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}`),X(`\\Set`,`\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}`),X(`\\set`,`\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}`),X(`\\angln`,`{\\angl n}`),X(`\\blue`,`\\textcolor{##6495ed}{#1}`),X(`\\orange`,`\\textcolor{##ffa500}{#1}`),X(`\\pink`,`\\textcolor{##ff00af}{#1}`),X(`\\red`,`\\textcolor{##df0030}{#1}`),X(`\\green`,`\\textcolor{##28ae7b}{#1}`),X(`\\gray`,`\\textcolor{gray}{#1}`),X(`\\purple`,`\\textcolor{##9d38bd}{#1}`),X(`\\blueA`,`\\textcolor{##ccfaff}{#1}`),X(`\\blueB`,`\\textcolor{##80f6ff}{#1}`),X(`\\blueC`,`\\textcolor{##63d9ea}{#1}`),X(`\\blueD`,`\\textcolor{##11accd}{#1}`),X(`\\blueE`,`\\textcolor{##0c7f99}{#1}`),X(`\\tealA`,`\\textcolor{##94fff5}{#1}`),X(`\\tealB`,`\\textcolor{##26edd5}{#1}`),X(`\\tealC`,`\\textcolor{##01d1c1}{#1}`),X(`\\tealD`,`\\textcolor{##01a995}{#1}`),X(`\\tealE`,`\\textcolor{##208170}{#1}`),X(`\\greenA`,`\\textcolor{##b6ffb0}{#1}`),X(`\\greenB`,`\\textcolor{##8af281}{#1}`),X(`\\greenC`,`\\textcolor{##74cf70}{#1}`),X(`\\greenD`,`\\textcolor{##1fab54}{#1}`),X(`\\greenE`,`\\textcolor{##0d923f}{#1}`),X(`\\goldA`,`\\textcolor{##ffd0a9}{#1}`),X(`\\goldB`,`\\textcolor{##ffbb71}{#1}`),X(`\\goldC`,`\\textcolor{##ff9c39}{#1}`),X(`\\goldD`,`\\textcolor{##e07d10}{#1}`),X(`\\goldE`,`\\textcolor{##a75a05}{#1}`),X(`\\redA`,`\\textcolor{##fca9a9}{#1}`),X(`\\redB`,`\\textcolor{##ff8482}{#1}`),X(`\\redC`,`\\textcolor{##f9685d}{#1}`),X(`\\redD`,`\\textcolor{##e84d39}{#1}`),X(`\\redE`,`\\textcolor{##bc2612}{#1}`),X(`\\maroonA`,`\\textcolor{##ffbde0}{#1}`),X(`\\maroonB`,`\\textcolor{##ff92c6}{#1}`),X(`\\maroonC`,`\\textcolor{##ed5fa6}{#1}`),X(`\\maroonD`,`\\textcolor{##ca337c}{#1}`),X(`\\maroonE`,`\\textcolor{##9e034e}{#1}`),X(`\\purpleA`,`\\textcolor{##ddd7ff}{#1}`),X(`\\purpleB`,`\\textcolor{##c6b9fc}{#1}`),X(`\\purpleC`,`\\textcolor{##aa87ff}{#1}`),X(`\\purpleD`,`\\textcolor{##7854ab}{#1}`),X(`\\purpleE`,`\\textcolor{##543b78}{#1}`),X(`\\mintA`,`\\textcolor{##f5f9e8}{#1}`),X(`\\mintB`,`\\textcolor{##edf2df}{#1}`),X(`\\mintC`,`\\textcolor{##e0e5cc}{#1}`),X(`\\grayA`,`\\textcolor{##f6f7f7}{#1}`),X(`\\grayB`,`\\textcolor{##f0f1f2}{#1}`),X(`\\grayC`,`\\textcolor{##e3e5e6}{#1}`),X(`\\grayD`,`\\textcolor{##d6d8da}{#1}`),X(`\\grayE`,`\\textcolor{##babec2}{#1}`),X(`\\grayF`,`\\textcolor{##888d93}{#1}`),X(`\\grayG`,`\\textcolor{##626569}{#1}`),X(`\\grayH`,`\\textcolor{##3b3e40}{#1}`),X(`\\grayI`,`\\textcolor{##21242c}{#1}`),X(`\\kaBlue`,`\\textcolor{##314453}{#1}`),X(`\\kaGreen`,`\\textcolor{##71B307}{#1}`);var QO={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},$O=class{constructor(e,t,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=t,this.expansionCount=0,this.feed(e),this.macros=new WO(GO,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new UO(e,this.settings)}switchMode(e){this.mode=e}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(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,r;if(e){if(this.consumeSpaces(),this.future().text!==`[`)return null;t=this.popToken(),{tokens:r,end:n}=this.consumeArg([`]`])}else ({tokens:r,start:t,end:n}=this.consumeArg());return this.pushToken(new TC(`EOF`,n.loc)),this.pushTokens(r),new TC(``,wC.range(t,n))}consumeSpaces(){for(;this.future().text===` `;)this.stack.pop()}consumeArg(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var r=this.future(),i,a=0,o=0;do{if(i=this.popToken(),t.push(i),i.text===`{`)++a;else if(i.text===`}`){if(--a,a===-1)throw new z(`Extra }`,i)}else if(i.text===`EOF`)throw new z(`Unexpected end of input in a macro argument, expected '`+(e&&n?e[o]:`}`)+`'`,i);if(e&&n)if((a===0||a===1&&e[o]===`{`)&&i.text===e[o]){if(++o,o===e.length){t.splice(-o,o);break}}else o=0}while(a!==0||n);return r.text===`{`&&t[t.length-1].text===`}`&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:r,end:i}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new z(`The length of delimiters doesn't match the number of args!`);for(var n=t[0],r=0;rthis.settings.maxExpand)throw new z(`Too many expansions: infinite loop or need to increase maxExpand setting`)}expandOnce(e){var t=this.popToken(),n=t.text,r=t.noexpand?null:this._getExpansion(n);if(r==null||e&&r.unexpandable){if(e&&r==null&&n[0]===`\\`&&!this.isDefined(n))throw new z(`Undefined control sequence: `+n);return this.pushToken(t),!1}this.countExpansion(1);var i=r.tokens,a=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs){i=i.slice();for(var o=i.length-1;o>=0;--o){var s=i[o];if(s.text===`#`){if(o===0)throw new z(`Incomplete placeholder at end of macro body`,s);if(s=i[--o],s.text===`#`)i.splice(o+1,1);else if(/^[1-9]$/.test(s.text))i.splice(o,2,...a[s.text-1]);else throw new z(`Not a valid argument number`,s)}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text=`\\relax`),e}throw Error()}expandMacro(e){return this.macros.has(e)?this.expandTokens([new TC(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var r=this.stack.pop();r.treatAsRelax&&=(r.noexpand=!1,!1),t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(e=>e.text).join(``)}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var r=typeof t==`function`?t(this):t;if(typeof r==`string`){var i=0;if(r.indexOf(`#`)!==-1)for(var a=r.replace(/##/g,``);a.indexOf(`#`+(i+1))!==-1;)++i;for(var o=new UO(r,this.settings),s=[],c=o.lex();c.text!==`EOF`;)s.push(c),c=o.lex();return s.reverse(),{tokens:s,numArgs:i}}return r}isDefined(e){return this.macros.has(e)||PO.hasOwnProperty(e)||Zw.math.hasOwnProperty(e)||Zw.text.hasOwnProperty(e)||QO.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t==null?PO.hasOwnProperty(e)&&!PO[e].primitive:typeof t==`string`||typeof t==`function`||!t.unexpandable}},ek=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,tk=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`,ᵝ:`β`,ᵞ:`γ`,ᵟ:`δ`,ᵠ:`ϕ`,ᵡ:`χ`,ᶿ:`θ`}),nk={"́":{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`}},rk={á:`á`,à:`à`,ä:`ä`,ǟ:`ǟ`,ã:`ã`,ā:`ā`,ă:`ă`,ắ:`ắ`,ằ:`ằ`,ẵ:`ẵ`,ǎ:`ǎ`,â:`â`,ấ:`ấ`,ầ:`ầ`,ẫ:`ẫ`,ȧ:`ȧ`,ǡ:`ǡ`,å:`å`,ǻ:`ǻ`,ḃ:`ḃ`,ć:`ć`,ḉ:`ḉ`,č:`č`,ĉ:`ĉ`,ċ:`ċ`,ç:`ç`,ď:`ď`,ḋ:`ḋ`,ḑ:`ḑ`,é:`é`,è:`è`,ë:`ë`,ẽ:`ẽ`,ē:`ē`,ḗ:`ḗ`,ḕ:`ḕ`,ĕ:`ĕ`,ḝ:`ḝ`,ě:`ě`,ê:`ê`,ế:`ế`,ề:`ề`,ễ:`ễ`,ė:`ė`,ȩ:`ȩ`,ḟ:`ḟ`,ǵ:`ǵ`,ḡ:`ḡ`,ğ:`ğ`,ǧ:`ǧ`,ĝ:`ĝ`,ġ:`ġ`,ģ:`ģ`,ḧ:`ḧ`,ȟ:`ȟ`,ĥ:`ĥ`,ḣ:`ḣ`,ḩ:`ḩ`,í:`í`,ì:`ì`,ï:`ï`,ḯ:`ḯ`,ĩ:`ĩ`,ī:`ī`,ĭ:`ĭ`,ǐ:`ǐ`,î:`î`,ǰ:`ǰ`,ĵ:`ĵ`,ḱ:`ḱ`,ǩ:`ǩ`,ķ:`ķ`,ĺ:`ĺ`,ľ:`ľ`,ļ:`ļ`,ḿ:`ḿ`,ṁ:`ṁ`,ń:`ń`,ǹ:`ǹ`,ñ:`ñ`,ň:`ň`,ṅ:`ṅ`,ņ:`ņ`,ó:`ó`,ò:`ò`,ö:`ö`,ȫ:`ȫ`,õ:`õ`,ṍ:`ṍ`,ṏ:`ṏ`,ȭ:`ȭ`,ō:`ō`,ṓ:`ṓ`,ṑ:`ṑ`,ŏ:`ŏ`,ǒ:`ǒ`,ô:`ô`,ố:`ố`,ồ:`ồ`,ỗ:`ỗ`,ȯ:`ȯ`,ȱ:`ȱ`,ő:`ő`,ṕ:`ṕ`,ṗ:`ṗ`,ŕ:`ŕ`,ř:`ř`,ṙ:`ṙ`,ŗ:`ŗ`,ś:`ś`,ṥ:`ṥ`,š:`š`,ṧ:`ṧ`,ŝ:`ŝ`,ṡ:`ṡ`,ş:`ş`,ẗ:`ẗ`,ť:`ť`,ṫ:`ṫ`,ţ:`ţ`,ú:`ú`,ù:`ù`,ü:`ü`,ǘ:`ǘ`,ǜ:`ǜ`,ǖ:`ǖ`,ǚ:`ǚ`,ũ:`ũ`,ṹ:`ṹ`,ū:`ū`,ṻ:`ṻ`,ŭ:`ŭ`,ǔ:`ǔ`,û:`û`,ů:`ů`,ű:`ű`,ṽ:`ṽ`,ẃ:`ẃ`,ẁ:`ẁ`,ẅ:`ẅ`,ŵ:`ŵ`,ẇ:`ẇ`,ẘ:`ẘ`,ẍ:`ẍ`,ẋ:`ẋ`,ý:`ý`,ỳ:`ỳ`,ÿ:`ÿ`,ỹ:`ỹ`,ȳ:`ȳ`,ŷ:`ŷ`,ẏ:`ẏ`,ẙ:`ẙ`,ź:`ź`,ž:`ž`,ẑ:`ẑ`,ż:`ż`,Á:`Á`,À:`À`,Ä:`Ä`,Ǟ:`Ǟ`,Ã:`Ã`,Ā:`Ā`,Ă:`Ă`,Ắ:`Ắ`,Ằ:`Ằ`,Ẵ:`Ẵ`,Ǎ:`Ǎ`,Â:`Â`,Ấ:`Ấ`,Ầ:`Ầ`,Ẫ:`Ẫ`,Ȧ:`Ȧ`,Ǡ:`Ǡ`,Å:`Å`,Ǻ:`Ǻ`,Ḃ:`Ḃ`,Ć:`Ć`,Ḉ:`Ḉ`,Č:`Č`,Ĉ:`Ĉ`,Ċ:`Ċ`,Ç:`Ç`,Ď:`Ď`,Ḋ:`Ḋ`,Ḑ:`Ḑ`,É:`É`,È:`È`,Ë:`Ë`,Ẽ:`Ẽ`,Ē:`Ē`,Ḗ:`Ḗ`,Ḕ:`Ḕ`,Ĕ:`Ĕ`,Ḝ:`Ḝ`,Ě:`Ě`,Ê:`Ê`,Ế:`Ế`,Ề:`Ề`,Ễ:`Ễ`,Ė:`Ė`,Ȩ:`Ȩ`,Ḟ:`Ḟ`,Ǵ:`Ǵ`,Ḡ:`Ḡ`,Ğ:`Ğ`,Ǧ:`Ǧ`,Ĝ:`Ĝ`,Ġ:`Ġ`,Ģ:`Ģ`,Ḧ:`Ḧ`,Ȟ:`Ȟ`,Ĥ:`Ĥ`,Ḣ:`Ḣ`,Ḩ:`Ḩ`,Í:`Í`,Ì:`Ì`,Ï:`Ï`,Ḯ:`Ḯ`,Ĩ:`Ĩ`,Ī:`Ī`,Ĭ:`Ĭ`,Ǐ:`Ǐ`,Î:`Î`,İ:`İ`,Ĵ:`Ĵ`,Ḱ:`Ḱ`,Ǩ:`Ǩ`,Ķ:`Ķ`,Ĺ:`Ĺ`,Ľ:`Ľ`,Ļ:`Ļ`,Ḿ:`Ḿ`,Ṁ:`Ṁ`,Ń:`Ń`,Ǹ:`Ǹ`,Ñ:`Ñ`,Ň:`Ň`,Ṅ:`Ṅ`,Ņ:`Ņ`,Ó:`Ó`,Ò:`Ò`,Ö:`Ö`,Ȫ:`Ȫ`,Õ:`Õ`,Ṍ:`Ṍ`,Ṏ:`Ṏ`,Ȭ:`Ȭ`,Ō:`Ō`,Ṓ:`Ṓ`,Ṑ:`Ṑ`,Ŏ:`Ŏ`,Ǒ:`Ǒ`,Ô:`Ô`,Ố:`Ố`,Ồ:`Ồ`,Ỗ:`Ỗ`,Ȯ:`Ȯ`,Ȱ:`Ȱ`,Ő:`Ő`,Ṕ:`Ṕ`,Ṗ:`Ṗ`,Ŕ:`Ŕ`,Ř:`Ř`,Ṙ:`Ṙ`,Ŗ:`Ŗ`,Ś:`Ś`,Ṥ:`Ṥ`,Š:`Š`,Ṧ:`Ṧ`,Ŝ:`Ŝ`,Ṡ:`Ṡ`,Ş:`Ş`,Ť:`Ť`,Ṫ:`Ṫ`,Ţ:`Ţ`,Ú:`Ú`,Ù:`Ù`,Ü:`Ü`,Ǘ:`Ǘ`,Ǜ:`Ǜ`,Ǖ:`Ǖ`,Ǚ:`Ǚ`,Ũ:`Ũ`,Ṹ:`Ṹ`,Ū:`Ū`,Ṻ:`Ṻ`,Ŭ:`Ŭ`,Ǔ:`Ǔ`,Û:`Û`,Ů:`Ů`,Ű:`Ű`,Ṽ:`Ṽ`,Ẃ:`Ẃ`,Ẁ:`Ẁ`,Ẅ:`Ẅ`,Ŵ:`Ŵ`,Ẇ:`Ẇ`,Ẍ:`Ẍ`,Ẋ:`Ẋ`,Ý:`Ý`,Ỳ:`Ỳ`,Ÿ:`Ÿ`,Ỹ:`Ỹ`,Ȳ:`Ȳ`,Ŷ:`Ŷ`,Ẏ:`Ẏ`,Ź:`Ź`,Ž:`Ž`,Ẑ:`Ẑ`,Ż:`Ż`,ά:`ά`,ὰ:`ὰ`,ᾱ:`ᾱ`,ᾰ:`ᾰ`,έ:`έ`,ὲ:`ὲ`,ή:`ή`,ὴ:`ὴ`,ί:`ί`,ὶ:`ὶ`,ϊ:`ϊ`,ΐ:`ΐ`,ῒ:`ῒ`,ῑ:`ῑ`,ῐ:`ῐ`,ό:`ό`,ὸ:`ὸ`,ύ:`ύ`,ὺ:`ὺ`,ϋ:`ϋ`,ΰ:`ΰ`,ῢ:`ῢ`,ῡ:`ῡ`,ῠ:`ῠ`,ώ:`ώ`,ὼ:`ὼ`,Ύ:`Ύ`,Ὺ:`Ὺ`,Ϋ:`Ϋ`,Ῡ:`Ῡ`,Ῠ:`Ῠ`,Ώ:`Ώ`,Ὼ:`Ὼ`},ik=class e{constructor(e,t){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 $O(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new z(`Expected '`+e+`', got '`+this.fetch().text+`'`,this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken??=this.gullet.expandNextToken(),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set(`\\color`,`\\textcolor`);try{var e=this.parseExpression(!1);return this.expect(`EOF`),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new TC(`}`)),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect(`}`),this.nextToken=t,n}parseExpression(t,n){for(var r=[];;){this.mode===`math`&&this.consumeSpaces();var i=this.fetch();if(e.endOfExpression.indexOf(i.text)!==-1||n&&i.text===n||t&&PO[i.text]&&PO[i.text].infix)break;var a=this.parseAtom(n);if(!a)break;a.type!==`internal`&&r.push(a)}return this.mode===`text`&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t=-1,n,r=0;r=0&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Latin-1/Unicode text character "`+t[0]+`" used in math mode`,e);var o=Zw[this.mode][t].group,s=wC.range(e),c;if(Yw.hasOwnProperty(o)){var l=o;c={type:`atom`,mode:this.mode,family:l,loc:s,text:t}}else c={type:o,mode:this.mode,loc:s,text:t};a=c}else if(t.charCodeAt(0)>=128)this.settings.strict&&(aw(t.charCodeAt(0))?this.mode===`math`&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Unicode text character "`+t[0]+`" used in math mode`,e):this.settings.reportNonstrict(`unknownSymbol`,`Unrecognized Unicode character "`+t[0]+`"`+(` (`+t.charCodeAt(0)+`)`),e)),a={type:`textord`,mode:`text`,loc:wC.range(e),text:t};else return null;if(this.consume(),i)for(var u=0;u{i(t)},[t]),(0,k.jsxs)(`div`,{className:`mb-3`,children:[(0,k.jsxs)(`button`,{onClick:()=>i(e=>!e),className:`flex items-center gap-2 text-xs text-[#0A323580] hover:text-[#0A3235] transition-colors cursor-pointer`,children:[(0,k.jsx)(D,{className:`h-3.5 w-3.5`}),t?(0,k.jsx)(`span`,{className:`thinking-shimmer font-medium`,children:`Thinking…`}):(0,k.jsxs)(`span`,{children:[`Thought for `,n,`s`]}),(0,k.jsx)(ie,{className:`h-3 w-3 transition-transform duration-200 ${r?``:`-rotate-90`}`})]}),r&&(0,k.jsx)(`div`,{className:`mt-2 rounded-lg border border-[#0A32351a] bg-[#FAF2E9] px-3 py-2 text-xs text-[#0A323580] whitespace-pre-wrap`,children:e.trim()})]})}var kk=Dk({singleDollarTextMath:!0}),Ak=[{prefix:`\\boxed{`,args:1},{prefix:`\\text{`,args:1},{prefix:`\\textbf{`,args:1},{prefix:`\\mathbf{`,args:1},{prefix:`\\mathrm{`,args:1},{prefix:`\\frac{`,args:2}];function jk(e,t){let n=1,r=t;for(;r0;)e[r]===`{`?n++:e[r]===`}`&&n--,r++;return r}function Mk(e){let t=``,n=0,r=null;for(;ne.startsWith(t.prefix,n));if(i){let r=jk(e,n+i.prefix.length);for(let t=1;t{await navigator.clipboard.writeText(e.content),m(!0),setTimeout(()=>m(!1),2e3)},[e.content]);(0,y.useEffect)(()=>{l&&h.current&&(h.current.focus(),h.current.style.height=`auto`,h.current.style.height=h.current.scrollHeight+`px`)},[l]);let _=(0,y.useCallback)(()=>{f(e.content),u(!0)},[e.content]),v=(0,y.useCallback)(()=>{u(!1),f(e.content)},[e.content]),b=(0,y.useCallback)(()=>{let e=d.trim();e&&(u(!1),a(t,e))},[d,a,t]),x=(0,y.useCallback)(e=>{e.key===`Escape`&&v(),e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),b())},[v,b]);return l?(0,k.jsx)(`div`,{className:`flex justify-end`,children:(0,k.jsxs)(`div`,{className:`w-full max-w-[80%] flex flex-col gap-2`,children:[(0,k.jsx)(`textarea`,{ref:h,value:d,onChange:e=>{f(e.target.value),e.target.style.height=`auto`,e.target.style.height=e.target.scrollHeight+`px`},onKeyDown:x,className:`w-full rounded-xl border border-[#0A32351a] bg-white px-4 py-3 text-sm text-[#0A3235] placeholder-[#0A323580] focus:border-[#105257] focus:outline-none focus:ring-1 focus:ring-[#105257] resize-none shadow-sm`,rows:1}),(0,k.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,k.jsxs)(`button`,{onClick:v,className:`flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-xs font-medium text-[#0A323580] hover:text-[#0A3235] border border-[#0A32351a] hover:bg-[#0A32350d] transition-colors cursor-pointer`,children:[(0,k.jsx)(fe,{className:`h-3 w-3`}),`Cancel`]}),(0,k.jsxs)(`button`,{onClick:b,disabled:!d.trim(),className:`flex items-center gap-1.5 rounded-lg bg-[#0A3235] px-3 py-1.5 text-xs font-medium text-[#FAF2E9] hover:bg-[#105257] disabled:opacity-40 transition-colors cursor-pointer`,children:[(0,k.jsx)(re,{className:`h-3 w-3`}),`Update`]})]})]})}):(0,k.jsxs)(`div`,{className:`group flex items-start gap-2 ${s?`justify-end`:`justify-start`}`,children:[s&&!i&&(0,k.jsx)(`button`,{onClick:_,className:`mt-3 opacity-0 group-hover:opacity-100 transition-opacity text-[#0A323580] hover:text-[#0A3235] cursor-pointer`,title:`Edit message`,children:(0,k.jsx)(se,{className:`h-3.5 w-3.5`})}),(0,k.jsxs)(`div`,{className:`max-w-[80%] rounded-2xl px-4 py-3 text-sm leading-relaxed ${s?`bg-[#0A3235] text-[#FAF2E9] rounded-br-md whitespace-pre-wrap`:`bg-white text-[#0A3235] rounded-bl-md border border-[#0A32351a] shadow-sm`}`,children:[!s&&e.reasoning&&(0,k.jsx)(Ok,{reasoning:e.reasoning,isThinking:c,thinkingSeconds:r??0}),e.content?s?e.content:(0,k.jsx)(RS,{plugins:{math:kk},parseIncompleteMarkdown:!1,isAnimating:n,children:Nk(e.content)}):!s&&!n?(0,k.jsx)(`p`,{className:`italic text-[#0A323580]`,children:`No response`}):null]}),!s&&!n&&!i&&(0,k.jsxs)(`div`,{className:`mt-3 flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity`,children:[e.content&&(0,k.jsx)(`button`,{onClick:g,className:`rounded-md p-1 text-[#0A323580] hover:text-[#0A3235] hover:bg-[#0A32350d] transition-colors cursor-pointer`,title:`Copy response`,children:p?(0,k.jsx)(ae,{className:`h-3.5 w-3.5`}):(0,k.jsx)(O,{className:`h-3.5 w-3.5`})}),(0,k.jsx)(`button`,{onClick:()=>o(t),className:`rounded-md p-1 text-[#0A323580] hover:text-[#0A3235] hover:bg-[#0A32350d] transition-colors cursor-pointer`,title:`Retry`,children:(0,k.jsx)(le,{className:`h-3.5 w-3.5`})})]})]})}function Fk(){let{status:e,tps:t,isGenerating:n}=Ce();return e.state===`loading`?(0,k.jsxs)(`div`,{className:`flex flex-col items-center gap-2 py-12 text-[#0A323580]`,children:[(0,k.jsx)(oe,{className:`h-8 w-8 animate-spin text-[#F0529C]`}),(0,k.jsx)(`p`,{className:`text-sm`,children:e.message??`Loading model…`}),e.progress!=null&&(0,k.jsx)(`div`,{className:`w-64 h-2 bg-[#0A32351a] rounded-full overflow-hidden`,children:(0,k.jsx)(`div`,{className:`h-full bg-[#F0529C]`,style:{width:`${e.progress}%`}})})]}):e.state===`error`?(0,k.jsxs)(`div`,{className:`py-12 text-center text-sm text-red-600`,children:[`Error loading model: `,e.error]}):n&&t>0?(0,k.jsxs)(`div`,{className:`text-center text-xs text-[#0A323580] py-1`,children:[t,` tokens/s`]}):null}var Ik=[{label:`Solve x² + x - 12 = 0`,prompt:`Solve x^2 + x - 12 = 0`},{label:`Explain quantum computing`,prompt:`Explain quantum computing in simple terms. What makes it different from classical computing, and what are some real-world applications?`},{label:`Write a Python quicksort`,prompt:`Write a clean, well-commented Python implementation of the quicksort algorithm. Include an example of how to use it.`},{label:`Solve a logic puzzle`,prompt:`Five people were eating apples, A finished before B, but behind C. D finished before E, but behind B. What was the finishing order?`}];function Lk({showDisclaimer:e,animated:t}){let{send:n,stop:r,status:i,isGenerating:a}=Ce(),o=i.state===`ready`,[s,c]=(0,y.useState)(``),l=(0,y.useRef)(null),u=(0,y.useCallback)(e=>{e?.preventDefault();let t=s.trim();!t||!o||a||(c(``),l.current&&(l.current.style.height=`7.5rem`),n(t))},[s,o,a,n]),d=(0,y.useCallback)(e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),u())},[u]);return(0,k.jsxs)(`div`,{className:`w-full ${t?`animate-rise-in-delayed`:``}`,children:[(0,k.jsx)(`form`,{onSubmit:u,className:`mx-auto max-w-3xl`,children:(0,k.jsxs)(`div`,{className:`relative`,children:[(0,k.jsx)(`textarea`,{ref:l,className:`w-full rounded-xl border border-[#0A32351a] bg-white px-4 py-3 pb-11 text-[15px] text-[#0A3235] placeholder-[#0A323580] focus:border-[#105257] focus:outline-none focus:ring-1 focus:ring-[#105257] disabled:opacity-50 resize-none max-h-40 shadow-sm`,style:{minHeight:`7.5rem`,height:`7.5rem`},placeholder:o?`Type a message…`:`Loading model…`,value:s,onChange:e=>{c(e.target.value),e.target.style.height=`7.5rem`,e.target.style.height=Math.max(e.target.scrollHeight,120)+`px`},onKeyDown:d,disabled:!o,autoFocus:!0}),(0,k.jsx)(`div`,{className:`absolute bottom-2 left-2 right-2 flex items-center justify-end pb-3 px-2`,children:a?(0,k.jsx)(`button`,{type:`button`,onClick:r,className:`flex items-center justify-center rounded-lg text-[#0A323580] hover:text-[#0A3235] transition-colors cursor-pointer`,title:`Stop generating`,children:(0,k.jsx)(de,{className:`h-4 w-4 fill-current`})}):(0,k.jsx)(`button`,{type:`submit`,disabled:!o||!s.trim(),className:`flex items-center justify-center rounded-lg text-[#0A323580] hover:text-[#0A3235] disabled:opacity-30 transition-colors cursor-pointer`,title:`Send message`,children:(0,k.jsx)(ue,{className:`h-4 w-4`})})})]})}),e&&(0,k.jsx)(`p`,{className:`mx-auto max-w-3xl mt-1 text-center text-xs text-[#0A323580]`,children:`No chats are sent to a server. Everything runs locally in your browser. AI can make mistakes. Check important info.`})]})}function Rk({onGoHome:e}){let{messages:t,isGenerating:n,send:r,status:i,clearChat:a}=Ce(),o=(0,y.useRef)(null),[s,c]=(0,y.useState)(0),l=(0,y.useRef)(null),u=(0,y.useRef)(new Map),d=(0,y.useRef)(!1),f=(0,y.useRef)(t),p=(0,y.useRef)(s);f.current=t,p.current=s;let m=i.state===`ready`,h=t.length>0,g=m&&h&&!n;(0,y.useEffect)(()=>{let e=o.current;e&&e.scrollTo({top:e.scrollHeight,behavior:`smooth`})},[t]),(0,y.useEffect)(()=>{if(d.current&&!n){let e=f.current.at(-1);e?.role===`assistant`&&e.reasoning&&p.current>0&&u.current.set(e.id,p.current)}d.current=n},[n]),(0,y.useEffect)(()=>{if(!n){l.current=null;return}l.current=Date.now(),c(0);let e=setInterval(()=>{l.current&&c(Math.round((Date.now()-l.current)/1e3))},500);return()=>clearInterval(e)},[n]);let _=t.at(-1);return(0,y.useEffect)(()=>{n&&_?.role===`assistant`&&_.content&&(l.current=null)},[n,_?.role,_?.content]),(0,k.jsxs)(`div`,{className:`flex h-full flex-col brand-surface text-[#0A3235]`,children:[(0,k.jsxs)(`header`,{className:`flex-none flex items-center justify-between border-b border-[#0A32351a] px-6 py-3 h-14`,children:[(0,k.jsx)(`button`,{onClick:e,className:`cursor-pointer transition-transform duration-300 hover:scale-[1.02]`,title:`Back to home`,children:(0,k.jsx)(`img`,{src:`/ai2.svg`,alt:`AI2`,className:`h-6 w-auto`,draggable:!1})}),(0,k.jsxs)(`button`,{onClick:a,className:`flex items-center gap-1.5 rounded-lg px-2.5 py-1.5 text-xs text-[#0A323580] hover:text-[#0A3235] hover:bg-[#0A32350d] transition-opacity duration-300 cursor-pointer ${g?`opacity-100`:`opacity-0 pointer-events-none`}`,title:`New chat`,children:[(0,k.jsx)(ce,{className:`h-3.5 w-3.5`}),`New chat`]})]}),h?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`main`,{ref:o,className:`min-h-0 flex-1 overflow-y-auto px-4 py-6 animate-fade-in`,children:(0,k.jsxs)(`div`,{className:`mx-auto flex max-w-3xl flex-col gap-4`,children:[!m&&(0,k.jsx)(Fk,{}),t.map((e,r)=>{let i=r===t.length-1&&e.role===`assistant`;return(0,k.jsx)(Pk,{msg:e,index:r,isStreaming:n&&i,thinkingSeconds:i?s:u.current.get(e.id),isGenerating:n},e.id)})]})}),(0,k.jsxs)(`footer`,{className:`flex-none px-4 py-3 animate-fade-in relative`,children:[m&&(0,k.jsx)(`div`,{className:`absolute bottom-full left-0 right-0 flex justify-center pointer-events-none mb-[-8px]`,children:(0,k.jsx)(`div`,{className:`pointer-events-auto`,children:(0,k.jsx)(Fk,{})})}),(0,k.jsx)(Lk,{showDisclaimer:!0,animated:!0})]})]}):(0,k.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center px-4`,children:[(0,k.jsx)(`div`,{className:`mb-8 text-center animate-rise-in`,children:(0,k.jsx)(`p`,{className:`text-3xl font-medium text-[#0A3235]`,children:`What can I help you with?`})}),(0,k.jsx)(Lk,{showDisclaimer:!1,animated:!0}),(0,k.jsx)(`div`,{className:`mt-6 flex flex-wrap justify-center gap-2 max-w-3xl animate-rise-in-delayed`,children:Ik.map(({label:e,prompt:t})=>(0,k.jsx)(`button`,{onClick:()=>r(t),className:`rounded-lg border border-[#0A32351a] bg-white px-3 py-2 text-xs text-[#0A323580] hover:text-[#0A3235] hover:border-[#105257] transition-colors cursor-pointer shadow-sm`,children:e},e))})]})]})}function zk(){let{status:e,loadModel:t,selectedModel:n,setSelectedModel:r,loadedModelId:i}=Ce(),[a,o]=(0,y.useState)(!1),[s,c]=(0,y.useState)(!1),l=e.state===`ready`&&i===n.id,u=a&&!l&&e.state!==`error`;return(0,y.useEffect)(()=>{l&&a&&c(!0)},[l,a]),(0,k.jsxs)(`div`,{className:`relative h-screen w-screen bg-[#0A3235]`,children:[(0,k.jsx)(`div`,{className:`absolute inset-0 z-10 transition-opacity duration-700 ${a?`opacity-0 pointer-events-none`:`opacity-100`}`,children:(0,k.jsx)(Se,{onStart:()=>{o(!0),t()},isLoading:u,showChat:s,selectedModel:n,onSelectModel:r,loadedModelId:i})}),(0,k.jsx)(`div`,{className:`absolute inset-0 z-10 transition-opacity duration-700 ${s?`opacity-100`:`opacity-0 pointer-events-none`}`,children:a&&(0,k.jsx)(Rk,{onGoHome:()=>{c(!1),setTimeout(()=>o(!1),700)}})}),(0,k.jsx)(`div`,{className:`absolute inset-0 z-30 flex flex-col items-center justify-center transition-opacity duration-700 bg-[#0A3235] ${u?`opacity-100`:`opacity-0 pointer-events-none`}`,children:(0,k.jsxs)(`div`,{className:`flex w-full max-w-md flex-col items-center px-6 transition-all duration-700 ${u?`opacity-100 translate-y-0`:`opacity-0 translate-y-4`}`,children:[(0,k.jsx)(`img`,{src:`/ai2.svg`,alt:`AI2`,className:`mb-8 h-9 w-auto`,draggable:!1}),(0,k.jsx)(oe,{className:`h-10 w-10 animate-spin text-[#F0529C]`}),(0,k.jsx)(`p`,{className:`mt-4 text-sm tracking-wide text-[#FAF2E9b3]`,children:e.state===`loading`?e.message??`Loading model…`:e.state===`error`?`Error`:`Initializing…`}),(0,k.jsx)(`div`,{className:`mt-4 h-1.5 w-full rounded-full bg-[#FAF2E91a] overflow-hidden`,children:(0,k.jsx)(`div`,{className:`h-full rounded-full bg-[linear-gradient(90deg,#105257_0%,#F0529C_60%,#B11BE8_100%)] transition-[width] ease-out`,style:{width:`${e.state===`ready`?100:e.state===`loading`&&e.progress!=null?e.progress:0}%`}})}),e.state===`error`&&(0,k.jsx)(`p`,{className:`mt-3 text-sm text-red-400`,children:e.error})]})})]})}var Bk=s({InferenceSession:()=>VA,TRACE:()=>MA,TRACE_EVENT_BEGIN:()=>IA,TRACE_EVENT_END:()=>LA,TRACE_FUNC_BEGIN:()=>PA,TRACE_FUNC_END:()=>FA,Tensor:()=>AA,default:()=>vN,env:()=>cA,registerBackend:()=>Qk}),Vk=Object.defineProperty,Hk=Object.getOwnPropertyDescriptor,Uk=Object.getOwnPropertyNames,Wk=Object.prototype.hasOwnProperty,Gk=(e=>typeof u<`u`?u:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof u<`u`?u:e)[t]}):e)(function(e){if(typeof u<`u`)return u.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)}),Kk=(e,t)=>()=>(e&&(t=e(e=0)),t),qk=(e,t)=>{for(var n in t)Vk(e,n,{get:t[n],enumerable:!0})},Jk=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of Uk(t))!Wk.call(e,i)&&i!==n&&Vk(e,i,{get:()=>t[i],enumerable:!(r=Hk(t,i))||r.enumerable});return e},Yk=e=>Jk(Vk({},`__esModule`,{value:!0}),e),Xk,Zk,Qk,$k,eA,tA=Kk(()=>{Xk=new Map,Zk=[],Qk=(e,t,n)=>{if(t&&typeof t.init==`function`&&typeof t.createInferenceSessionHandler==`function`){let r=Xk.get(e);if(r===void 0)Xk.set(e,{backend:t,priority:n});else{if(r.priority>n)return;if(r.priority===n&&r.backend!==t)throw Error(`cannot register backend "${e}" using priority ${n}`)}if(n>=0){let t=Zk.indexOf(e);t!==-1&&Zk.splice(t,1);for(let t=0;t{let t=Xk.get(e);if(!t)return`backend not found.`;if(t.initialized)return t.backend;if(t.aborted)return t.error;{let n=!!t.initPromise;try{return n||(t.initPromise=t.backend.init(e)),await t.initPromise,t.initialized=!0,t.backend}catch(e){return n||(t.error=`${e}`,t.aborted=!0),t.error}finally{delete t.initPromise}}},eA=async e=>{let t=e.executionProviders||[],n=t.map(e=>typeof e==`string`?e:e.name),r=n.length===0?Zk:n,i,a=[],o=new Set;for(let e of r){let t=await $k(e);typeof t==`string`?a.push({name:e,err:t}):(i||=t,i===t&&o.add(e))}if(!i)throw Error(`no available backend found. ERR: ${a.map(e=>`[${e.name}] ${e.err}`).join(`, `)}`);for(let{name:e,err:t}of a)n.includes(e)&&console.warn(`removing requested execution provider "${e}" from session options because it is not available: ${t}`);let s=t.filter(e=>o.has(typeof e==`string`?e:e.name));return[i,new Proxy(e,{get:(e,t)=>t===`executionProviders`?s:Reflect.get(e,t)})]}}),nA=Kk(()=>{tA()}),rA,iA=Kk(()=>{rA=`1.24.0-dev.20251116-b39e144322`}),aA,oA,sA=Kk(()=>{iA(),aA=`warning`,oA={wasm:{},webgl:{},webgpu:{},versions:{common:rA},set logLevel(e){if(e!==void 0){if(typeof e!=`string`||[`verbose`,`info`,`warning`,`error`,`fatal`].indexOf(e)===-1)throw Error(`Unsupported logging level: ${e}`);aA=e}},get logLevel(){return aA}},Object.defineProperty(oA,`logLevel`,{enumerable:!0})}),cA,lA=Kk(()=>{sA(),cA=oA}),uA,dA,fA=Kk(()=>{uA=(e,t)=>{let n=typeof document<`u`?document.createElement(`canvas`):new OffscreenCanvas(1,1);n.width=e.dims[3],n.height=e.dims[2];let r=n.getContext(`2d`);if(r!=null){let i,a;t?.tensorLayout!==void 0&&t.tensorLayout===`NHWC`?(i=e.dims[2],a=e.dims[3]):(i=e.dims[3],a=e.dims[2]);let o=t?.format===void 0?`RGB`:t.format,s=t?.norm,c,l;s===void 0||s.mean===void 0?c=[255,255,255,255]:typeof s.mean==`number`?c=[s.mean,s.mean,s.mean,s.mean]:(c=[s.mean[0],s.mean[1],s.mean[2],0],s.mean[3]!==void 0&&(c[3]=s.mean[3])),s===void 0||s.bias===void 0?l=[0,0,0,0]:typeof s.bias==`number`?l=[s.bias,s.bias,s.bias,s.bias]:(l=[s.bias[0],s.bias[1],s.bias[2],0],s.bias[3]!==void 0&&(l[3]=s.bias[3]));let u=a*i,d=0,f=u,p=u*2,m=-1;o===`RGBA`?(d=0,f=u,p=u*2,m=u*3):o===`RGB`?(d=0,f=u,p=u*2):o===`RBG`&&(d=0,p=u,f=u*2);for(let t=0;t{let n=typeof document<`u`?document.createElement(`canvas`).getContext(`2d`):new OffscreenCanvas(1,1).getContext(`2d`),r;if(n!=null){let i,a,o;t?.tensorLayout!==void 0&&t.tensorLayout===`NHWC`?(i=e.dims[2],a=e.dims[1],o=e.dims[3]):(i=e.dims[3],a=e.dims[2],o=e.dims[1]);let s=t!==void 0&&t.format!==void 0?t.format:`RGB`,c=t?.norm,l,u;c===void 0||c.mean===void 0?l=[255,255,255,255]:typeof c.mean==`number`?l=[c.mean,c.mean,c.mean,c.mean]:(l=[c.mean[0],c.mean[1],c.mean[2],255],c.mean[3]!==void 0&&(l[3]=c.mean[3])),c===void 0||c.bias===void 0?u=[0,0,0,0]:typeof c.bias==`number`?u=[c.bias,c.bias,c.bias,c.bias]:(u=[c.bias[0],c.bias[1],c.bias[2],0],c.bias[3]!==void 0&&(u[3]=c.bias[3]));let d=a*i;if(t!==void 0&&(t.format!==void 0&&o===4&&t.format!==`RGBA`||o===3&&t.format!==`RGB`&&t.format!==`BGR`))throw Error(`Tensor format doesn't match input tensor dims`);let f=0,p=1,m=2,h=3,g=0,_=d,v=d*2,y=-1;s===`RGBA`?(g=0,_=d,v=d*2,y=d*3):s===`RGB`?(g=0,_=d,v=d*2):s===`RBG`&&(g=0,v=d,_=d*2),r=n.createImageData(i,a);for(let t=0;t{kA(),pA=(e,t)=>{if(e===void 0)throw Error(`Image buffer must be defined`);if(t.height===void 0||t.width===void 0)throw Error(`Image height and width must be defined`);if(t.tensorLayout===`NHWC`)throw Error(`NHWC Tensor layout is not supported yet`);let{height:n,width:r}=t,i=t.norm??{mean:255,bias:0},a,o;a=typeof i.mean==`number`?[i.mean,i.mean,i.mean,i.mean]:[i.mean[0],i.mean[1],i.mean[2],i.mean[3]??255],o=typeof i.bias==`number`?[i.bias,i.bias,i.bias,i.bias]:[i.bias[0],i.bias[1],i.bias[2],i.bias[3]??0];let s=t.format===void 0?`RGBA`:t.format,c=t.tensorFormat!==void 0&&t.tensorFormat!==void 0?t.tensorFormat:`RGB`,l=n*r,u=c===`RGBA`?new Float32Array(l*4):new Float32Array(l*3),d=4,f=0,p=1,m=2,h=3,g=0,_=l,v=l*2,y=-1;s===`RGB`&&(d=3,f=0,p=1,m=2,h=-1),c===`RGBA`?y=l*3:c===`RBG`?(g=0,v=l,_=l*2):c===`BGR`&&(v=0,_=l,g=l*2);for(let t=0;t{let n=typeof HTMLImageElement<`u`&&e instanceof HTMLImageElement,r=typeof ImageData<`u`&&e instanceof ImageData,i=typeof ImageBitmap<`u`&&e instanceof ImageBitmap,a=typeof e==`string`,o,s=t??{},c=()=>{if(typeof document<`u`)return document.createElement(`canvas`);if(typeof OffscreenCanvas<`u`)return new OffscreenCanvas(1,1);throw Error(`Canvas is not supported`)},l=e=>typeof HTMLCanvasElement<`u`&&e instanceof HTMLCanvasElement||e instanceof OffscreenCanvas?e.getContext(`2d`):null;if(n){let n=c();n.width=e.width,n.height=e.height;let r=l(n);if(r!=null){let n=e.height,i=e.width;if(t!==void 0&&t.resizedHeight!==void 0&&t.resizedWidth!==void 0&&(n=t.resizedHeight,i=t.resizedWidth),t!==void 0){if(s=t,t.tensorFormat!==void 0)throw Error(`Image input config format must be RGBA for HTMLImageElement`);s.tensorFormat=`RGBA`,s.height=n,s.width=i}else s.tensorFormat=`RGBA`,s.height=n,s.width=i;r.drawImage(e,0,0),o=r.getImageData(0,0,i,n).data}else throw Error(`Can not access image data`)}else if(r){let n,r;if(t!==void 0&&t.resizedWidth!==void 0&&t.resizedHeight!==void 0?(n=t.resizedHeight,r=t.resizedWidth):(n=e.height,r=e.width),t!==void 0&&(s=t),s.format=`RGBA`,s.height=n,s.width=r,t!==void 0){let t=c();t.width=r,t.height=n;let i=l(t);if(i!=null)i.putImageData(e,0,0),o=i.getImageData(0,0,r,n).data;else throw Error(`Can not access image data`)}else o=e.data}else if(i){if(t===void 0)throw Error(`Please provide image config with format for Imagebitmap`);let n=c();n.width=e.width,n.height=e.height;let r=l(n);if(r!=null){let t=e.height,n=e.width;return r.drawImage(e,0,0,n,t),o=r.getImageData(0,0,n,t).data,s.height=t,s.width=n,pA(o,s)}else throw Error(`Can not access image data`)}else{if(a)return new Promise((t,n)=>{let r=c(),i=l(r);if(!e||!i)return n();let a=new Image;a.crossOrigin=`Anonymous`,a.src=e,a.onload=()=>{r.width=a.width,r.height=a.height,i.drawImage(a,0,0,r.width,r.height);let e=i.getImageData(0,0,r.width,r.height);s.height=r.height,s.width=r.width,t(pA(e.data,s))}});throw Error(`Input data provided is not supported - aborted tensor creation`)}if(o!==void 0)return pA(o,s);throw Error(`Input data provided is not supported - aborted tensor creation`)},hA=(e,t)=>{let{width:n,height:r,download:i,dispose:a}=t;return new OA({location:`texture`,type:`float32`,texture:e,dims:[1,r,n,4],download:i,dispose:a})},gA=(e,t)=>{let{dataType:n,dims:r,download:i,dispose:a}=t;return new OA({location:`gpu-buffer`,type:n??`float32`,gpuBuffer:e,dims:r,download:i,dispose:a})},_A=(e,t)=>{let{dataType:n,dims:r,download:i,dispose:a}=t;return new OA({location:`ml-tensor`,type:n??`float32`,mlTensor:e,dims:r,download:i,dispose:a})},vA=(e,t,n)=>new OA({location:`cpu-pinned`,type:e,data:t,dims:n??[t.length]})}),bA,xA,SA,CA,wA=Kk(()=>{bA=new Map([[`float32`,Float32Array],[`uint8`,Uint8Array],[`int8`,Int8Array],[`uint16`,Uint16Array],[`int16`,Int16Array],[`int32`,Int32Array],[`bool`,Uint8Array],[`float64`,Float64Array],[`uint32`,Uint32Array],[`int4`,Uint8Array],[`uint4`,Uint8Array]]),xA=new Map([[Float32Array,`float32`],[Uint8Array,`uint8`],[Int8Array,`int8`],[Uint16Array,`uint16`],[Int16Array,`int16`],[Int32Array,`int32`],[Float64Array,`float64`],[Uint32Array,`uint32`]]),SA=!1,CA=()=>{if(!SA){SA=!0;let e=typeof BigInt64Array<`u`&&BigInt64Array.from,t=typeof BigUint64Array<`u`&&BigUint64Array.from,n=globalThis.Float16Array,r=typeof n<`u`&&n.from;e&&(bA.set(`int64`,BigInt64Array),xA.set(BigInt64Array,`int64`)),t&&(bA.set(`uint64`,BigUint64Array),xA.set(BigUint64Array,`uint64`)),r?(bA.set(`float16`,n),xA.set(n,`float16`)):bA.set(`float16`,Uint16Array)}}}),TA,EA,DA=Kk(()=>{kA(),TA=e=>{let t=1;for(let n=0;n{switch(e.location){case`cpu`:return new OA(e.type,e.data,t);case`cpu-pinned`:return new OA({location:`cpu-pinned`,data:e.data,type:e.type,dims:t});case`texture`:return new OA({location:`texture`,texture:e.texture,type:e.type,dims:t});case`gpu-buffer`:return new OA({location:`gpu-buffer`,gpuBuffer:e.gpuBuffer,type:e.type,dims:t});case`ml-tensor`:return new OA({location:`ml-tensor`,mlTensor:e.mlTensor,type:e.type,dims:t});default:throw Error(`tensorReshape: tensor location ${e.location} is not supported`)}}}),OA,kA=Kk(()=>{fA(),yA(),wA(),DA(),OA=class{constructor(e,t,n){CA();let r,i;if(typeof e==`object`&&`location`in e)switch(this.dataLocation=e.location,r=e.type,i=e.dims,e.location){case`cpu-pinned`:{let t=bA.get(r);if(!t)throw TypeError(`unsupported type "${r}" to create tensor from pinned buffer`);if(!(e.data instanceof t))throw TypeError(`buffer should be of type ${t.name}`);this.cpuData=e.data;break}case`texture`:if(r!==`float32`)throw TypeError(`unsupported type "${r}" to create tensor from texture`);this.gpuTextureData=e.texture,this.downloader=e.download,this.disposer=e.dispose;break;case`gpu-buffer`:if(r!==`float32`&&r!==`float16`&&r!==`int32`&&r!==`int64`&&r!==`uint32`&&r!==`uint8`&&r!==`bool`&&r!==`uint4`&&r!==`int4`)throw TypeError(`unsupported type "${r}" to create tensor from gpu buffer`);this.gpuBufferData=e.gpuBuffer,this.downloader=e.download,this.disposer=e.dispose;break;case`ml-tensor`:if(r!==`float32`&&r!==`float16`&&r!==`int32`&&r!==`int64`&&r!==`uint32`&&r!==`uint64`&&r!==`int8`&&r!==`uint8`&&r!==`bool`&&r!==`uint4`&&r!==`int4`)throw TypeError(`unsupported type "${r}" to create tensor from MLTensor`);this.mlTensorData=e.mlTensor,this.downloader=e.download,this.disposer=e.dispose;break;default:throw Error(`Tensor constructor: unsupported location '${this.dataLocation}'`)}else{let a,o;if(typeof e==`string`)if(r=e,o=n,e===`string`){if(!Array.isArray(t))throw TypeError(`A string tensor's data must be a string array.`);a=t}else{let n=bA.get(e);if(n===void 0)throw TypeError(`Unsupported tensor type: ${e}.`);if(Array.isArray(t)){if(e===`float16`&&n===Uint16Array||e===`uint4`||e===`int4`)throw TypeError(`Creating a ${e} tensor from number array is not supported. Please use ${n.name} as data.`);a=e===`uint64`||e===`int64`?n.from(t,BigInt):n.from(t)}else if(t instanceof n)a=t;else if(t instanceof Uint8ClampedArray)if(e===`uint8`)a=Uint8Array.from(t);else throw TypeError(`A Uint8ClampedArray tensor's data must be type of uint8`);else if(e===`float16`&&t instanceof Uint16Array&&n!==Uint16Array)a=new globalThis.Float16Array(t.buffer,t.byteOffset,t.length);else throw TypeError(`A ${r} tensor's data must be type of ${n}`)}else if(o=t,Array.isArray(e)){if(e.length===0)throw TypeError(`Tensor type cannot be inferred from an empty array.`);let t=typeof e[0];if(t===`string`)r=`string`,a=e;else if(t===`boolean`)r=`bool`,a=Uint8Array.from(e);else throw TypeError(`Invalid element type of data array: ${t}.`)}else if(e instanceof Uint8ClampedArray)r=`uint8`,a=Uint8Array.from(e);else{let t=xA.get(e.constructor);if(t===void 0)throw TypeError(`Unsupported type for tensor data: ${e.constructor}.`);r=t,a=e}if(o===void 0)o=[a.length];else if(!Array.isArray(o))throw TypeError(`A tensor's dims must be a number array`);i=o,this.cpuData=a,this.dataLocation=`cpu`}let a=TA(i);if(this.cpuData&&a!==this.cpuData.length&&!((r===`uint4`||r===`int4`)&&Math.ceil(a/2)===this.cpuData.length))throw Error(`Tensor's size(${a}) does not match data length(${this.cpuData.length}).`);this.type=r,this.dims=i,this.size=a}static async fromImage(e,t){return mA(e,t)}static fromTexture(e,t){return hA(e,t)}static fromGpuBuffer(e,t){return gA(e,t)}static fromMLTensor(e,t){return _A(e,t)}static fromPinnedBuffer(e,t,n){return vA(e,t,n)}toDataURL(e){return uA(this,e)}toImageData(e){return dA(this,e)}get data(){if(this.ensureValid(),!this.cpuData)throw Error("The data is not on CPU. Use `getData()` to download GPU data to CPU, or use `texture` or `gpuBuffer` property to access the GPU data directly.");return this.cpuData}get location(){return this.dataLocation}get texture(){if(this.ensureValid(),!this.gpuTextureData)throw Error(`The data is not stored as a WebGL texture.`);return this.gpuTextureData}get gpuBuffer(){if(this.ensureValid(),!this.gpuBufferData)throw Error(`The data is not stored as a WebGPU buffer.`);return this.gpuBufferData}get mlTensor(){if(this.ensureValid(),!this.mlTensorData)throw Error(`The data is not stored as a WebNN MLTensor.`);return this.mlTensorData}async getData(e){switch(this.ensureValid(),this.dataLocation){case`cpu`:case`cpu-pinned`:return this.data;case`texture`:case`gpu-buffer`:case`ml-tensor`:if(!this.downloader)throw Error(`The current tensor is not created with a specified data downloader.`);if(this.isDownloading)throw Error(`The current tensor is being downloaded.`);try{this.isDownloading=!0;let t=await this.downloader();return this.downloader=void 0,this.dataLocation=`cpu`,this.cpuData=t,e&&this.disposer&&(this.disposer(),this.disposer=void 0),t}finally{this.isDownloading=!1}default:throw Error(`cannot get data from location: ${this.dataLocation}`)}}dispose(){if(this.isDownloading)throw Error(`The current tensor is being downloaded.`);this.disposer&&=(this.disposer(),void 0),this.cpuData=void 0,this.gpuTextureData=void 0,this.gpuBufferData=void 0,this.mlTensorData=void 0,this.downloader=void 0,this.isDownloading=void 0,this.dataLocation=`none`}ensureValid(){if(this.dataLocation===`none`)throw Error(`The tensor is disposed.`)}reshape(e){if(this.ensureValid(),this.downloader||this.disposer)throw Error(`Cannot reshape a tensor that owns GPU resource.`);return EA(this,e)}}}),AA,jA=Kk(()=>{kA(),AA=OA}),MA,NA,PA,FA,IA,LA,RA=Kk(()=>{sA(),MA=(e,t)=>{(typeof oA.trace>`u`?!oA.wasm.trace:!oA.trace)||console.timeStamp(`${e}::ORT::${t}`)},NA=(e,t)=>{let n=Error().stack?.split(/\r\n|\r|\n/g)||[],r=!1;for(let i=0;i{(typeof oA.trace>`u`?!oA.wasm.trace:!oA.trace)||NA(`BEGIN`,e)},FA=e=>{(typeof oA.trace>`u`?!oA.wasm.trace:!oA.trace)||NA(`END`,e)},IA=e=>{(typeof oA.trace>`u`?!oA.wasm.trace:!oA.trace)||console.time(`ORT::${e}`)},LA=e=>{(typeof oA.trace>`u`?!oA.wasm.trace:!oA.trace)||console.timeEnd(`ORT::${e}`)}}),zA,BA=Kk(()=>{tA(),jA(),RA(),zA=class e{constructor(e){this.handler=e}async run(e,t,n){PA(),IA(`InferenceSession.run`);let r={},i={};if(typeof e!=`object`||!e||e instanceof AA||Array.isArray(e))throw TypeError(`'feeds' must be an object that use input names as keys and OnnxValue as corresponding values.`);let a=!0;if(typeof t==`object`){if(t===null)throw TypeError(`Unexpected argument[1]: cannot be null.`);if(t instanceof AA)throw TypeError(`'fetches' cannot be a Tensor`);if(Array.isArray(t)){if(t.length===0)throw TypeError(`'fetches' cannot be an empty array.`);a=!1;for(let e of t){if(typeof e!=`string`)throw TypeError(`'fetches' must be a string array or an object.`);if(this.outputNames.indexOf(e)===-1)throw RangeError(`'fetches' contains invalid output name: ${e}.`);r[e]=null}if(typeof n==`object`&&n)i=n;else if(typeof n<`u`)throw TypeError(`'options' must be an object.`)}else{let e=!1,o=Object.getOwnPropertyNames(t);for(let n of this.outputNames)if(o.indexOf(n)!==-1){let i=t[n];(i===null||i instanceof AA)&&(e=!0,a=!1,r[n]=i)}if(e){if(typeof n==`object`&&n)i=n;else if(typeof n<`u`)throw TypeError(`'options' must be an object.`)}else i=t}}else if(typeof t<`u`)throw TypeError(`Unexpected argument[1]: must be 'fetches' or 'options'.`);for(let t of this.inputNames)if(typeof e[t]>`u`)throw Error(`input '${t}' is missing in 'feeds'.`);if(a)for(let e of this.outputNames)r[e]=null;let o=await this.handler.run(e,r,i),s={};for(let e in o)if(Object.hasOwnProperty.call(o,e)){let t=o[e];t instanceof AA?s[e]=t:s[e]=new AA(t.type,t.data,t.dims)}return LA(`InferenceSession.run`),FA(),s}async release(){return this.handler.dispose()}static async create(t,n,r,i){PA(),IA(`InferenceSession.create`);let a,o={};if(typeof t==`string`){if(a=t,typeof n==`object`&&n)o=n;else if(typeof n<`u`)throw TypeError(`'options' must be an object.`)}else if(t instanceof Uint8Array){if(a=t,typeof n==`object`&&n)o=n;else if(typeof n<`u`)throw TypeError(`'options' must be an object.`)}else if(t instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&t instanceof SharedArrayBuffer){let e=t,s=0,c=t.byteLength;if(typeof n==`object`&&n)o=n;else if(typeof n==`number`){if(s=n,!Number.isSafeInteger(s))throw RangeError(`'byteOffset' must be an integer.`);if(s<0||s>=e.byteLength)throw RangeError(`'byteOffset' is out of range [0, ${e.byteLength}).`);if(c=t.byteLength-s,typeof r==`number`){if(c=r,!Number.isSafeInteger(c))throw RangeError(`'byteLength' must be an integer.`);if(c<=0||s+c>e.byteLength)throw RangeError(`'byteLength' is out of range (0, ${e.byteLength-s}].`);if(typeof i==`object`&&i)o=i;else if(typeof i<`u`)throw TypeError(`'options' must be an object.`)}else if(typeof r<`u`)throw TypeError(`'byteLength' must be a number.`)}else if(typeof n<`u`)throw TypeError(`'options' must be an object.`);a=new Uint8Array(e,s,c)}else throw TypeError(`Unexpected argument[0]: must be 'path' or 'buffer'.`);let[s,c]=await eA(o),l=await s.createInferenceSessionHandler(a,c);return LA(`InferenceSession.create`),FA(),new e(l)}startProfiling(){this.handler.startProfiling()}endProfiling(){this.handler.endProfiling()}get inputNames(){return this.handler.inputNames}get outputNames(){return this.handler.outputNames}get inputMetadata(){return this.handler.inputMetadata}get outputMetadata(){return this.handler.outputMetadata}}}),VA,HA=Kk(()=>{BA(),VA=zA}),UA=Kk(()=>{}),WA=Kk(()=>{}),GA=Kk(()=>{}),KA=Kk(()=>{}),qA={};qk(qA,{InferenceSession:()=>VA,TRACE:()=>MA,TRACE_EVENT_BEGIN:()=>IA,TRACE_EVENT_END:()=>LA,TRACE_FUNC_BEGIN:()=>PA,TRACE_FUNC_END:()=>FA,Tensor:()=>AA,env:()=>cA,registerBackend:()=>Qk});var JA=Kk(()=>{nA(),lA(),HA(),jA(),UA(),WA(),RA(),GA(),KA()}),YA=Kk(()=>{}),XA={};qk(XA,{default:()=>$A});var ZA,QA,$A,ej=Kk(()=>{HM(),Aj(),bj(),ZA=`ort-wasm-proxy-worker`,QA=globalThis.self?.name===ZA,QA&&(self.onmessage=e=>{let{type:t,in:n}=e.data;try{switch(t){case`init-wasm`:Oj(n.wasm).then(()=>{AM(n).then(()=>{postMessage({type:t})},e=>{postMessage({type:t,err:e})})},e=>{postMessage({type:t,err:e})});break;case`init-ep`:{let{epName:e,env:r}=n;jM(r,e).then(()=>{postMessage({type:t})},e=>{postMessage({type:t,err:e})});break}case`copy-from`:{let{buffer:e}=n,r=FM(e);postMessage({type:t,out:r});break}case`create`:{let{model:e,options:r}=n;IM(e,r).then(e=>{postMessage({type:t,out:e})},e=>{postMessage({type:t,err:e})});break}case`release`:LM(n),postMessage({type:t});break;case`run`:{let{sessionId:e,inputIndices:r,inputs:i,outputIndices:a,options:o}=n;zM(e,r,i,a,Array(a.length).fill(null),o).then(e=>{e.some(e=>e[3]!==`cpu`)?postMessage({type:t,err:`Proxy does not support non-cpu tensor location.`}):postMessage({type:t,out:e},VM([...i,...e]))},e=>{postMessage({type:t,err:e})});break}case`end-profiling`:BM(n),postMessage({type:t});break;default:}}catch(e){postMessage({type:t,err:e})}}),$A=QA?null:e=>new Worker(e??lj,{type:`module`,name:ZA})}),tj={};qk(tj,{default:()=>rj});async function nj(e={}){var t=e,n=!!globalThis.window,r=!!globalThis.WorkerGlobalScope,i=r&&self.name?.startsWith(`em-pthread`);t.mountExternalData=(e,n)=>{e.startsWith(`./`)&&(e=e.substring(2)),(t.Uc||=new Map).set(e,n)},t.unmountExternalData=()=>{delete t.Uc},globalThis.SharedArrayBuffer??new WebAssembly.Memory({initial:0,maximum:0,Be:!0}).buffer.constructor;let a=()=>{let e=e=>(...t)=>{let n=ln;return t=e(...t),ln==n?t:new Promise((e,t)=>{gn={resolve:e,reject:t}})};(()=>{for(let n of[`_OrtAppendExecutionProvider`,`_OrtCreateSession`,`_OrtRun`,`_OrtRunWithBinding`,`_OrtBindInput`])t[n]=e(t[n])})(),typeof jsepRunAsync<`u`&&(t._OrtRun=jsepRunAsync(t._OrtRun),t._OrtRunWithBinding=jsepRunAsync(t._OrtRunWithBinding)),a=void 0};t.asyncInit=()=>{a?.()};var o,s,c=(e,t)=>{throw t},l=import.meta.url,u=``;if(n||r){try{u=new URL(`.`,l).href}catch{}r&&(s=e=>{var t=new XMLHttpRequest;return t.open(`GET`,e,!1),t.responseType=`arraybuffer`,t.send(null),new Uint8Array(t.response)}),o=async e=>{if(ee(e))return new Promise((t,n)=>{var r=new XMLHttpRequest;r.open(`GET`,e,!0),r.responseType=`arraybuffer`,r.onload=()=>{r.status==200||r.status==0&&r.response?t(r.response):n(r.status)},r.onerror=n,r.send(null)});var t=await fetch(e,{credentials:`same-origin`});if(t.ok)return t.arrayBuffer();throw Error(t.status+` : `+t.url)}}var d,f,p,m,h,g,_=console.log.bind(console),v=console.error.bind(console),y=_,b=v,x=!1,ee=e=>e.startsWith(`file://`);function S(){je.buffer!=w.buffer&&ce()}if(i){let e=function(n){try{var r=n.data,i=r.Oc;if(i===`load`){let n=[];self.onmessage=e=>n.push(e),g=()=>{postMessage({Oc:`loaded`});for(let t of n)e(t);self.onmessage=e};for(let e of r.de)t[e]&&!t[e].proxy||(t[e]=(...t)=>{postMessage({Oc:`callHandler`,ce:e,args:t})},e==`print`&&(y=t[e]),e==`printErr`&&(b=t[e]));je=r.je,ce(),f=r.ke,fe(),Lo()}else if(i===`run`){(function(e){var t=(S(),D)[e+52>>>2>>>0];e=(S(),D)[e+56>>>2>>>0],ta(t,t-e),na(t)})(r.Nc),Gi(r.Nc,0,0,1,0,0),Oe(),Zt(r.Nc),C||=(Si(),!0);try{Me(r.he,r.Wc)}catch(e){if(e!=`unwind`)throw e}}else r.target!==`setimmediate`&&(i===`checkMailbox`?C&&Qt():i&&(b(`worker: received unknown command ${i}`),b(r)))}catch(e){throw Ki(),e}};var C=!1;self.onunhandledrejection=e=>{throw e.reason||e},self.onmessage=e}var w,T,te,ne,E,D,re,ie,ae,O,oe,se=!1;function ce(){var e=je.buffer;t.HEAP8=w=new Int8Array(e),te=new Int16Array(e),t.HEAPU8=T=new Uint8Array(e),ne=new Uint16Array(e),t.HEAP32=E=new Int32Array(e),t.HEAPU32=D=new Uint32Array(e),re=new Float32Array(e),ie=new Float64Array(e),ae=new BigInt64Array(e),O=new BigUint64Array(e)}function le(){se=!0,i?g():Xa._b()}function ue(e){throw b(e=`Aborted(`+e+`)`),x=!0,e=new WebAssembly.RuntimeError(e+`. Build with -sASSERTIONS for more info.`),h?.(e),e}function de(){return{a:{f:Ie,J:Re,k:Ue,p:We,l:Ge,ta:Ke,b:qe,ca:Je,Ka:Xe,s:Ze,da:nt,_a:rt,Ga:it,Ia:at,$a:ot,Ya:st,Ra:ct,Xa:lt,pa:ut,Ha:A,Yb:dt,Za:ft,Fa:pt,eb:mt,Da:St,Tb:Ct,Rb:jt,Ca:Nt,M:Pt,H:Ft,Sb:Rt,ka:Kt,Ub:qt,Ua:Jt,Wb:$t,La:tn,Pb:nn,la:rn,Ta:Zt,bb:an,U:yn,n:En,c:Et,sb:Dn,w:On,L:j,z:kn,j:An,o:jn,tb:Mn,G:Nn,T:Pn,g:M,u:Fn,m:In,i:Ln,Oa:Rn,Pa:Hn,Qa:Un,Ma:Wn,Na:Gn,Qb:Jn,fb:Yn,db:Qn,Y:er,rb:P,ma:F,cb:Xn,gb:tr,ab:nr,Xb:I,N:qn,hb:rr,X:ir,Vb:L,ob:Er,C:Dr,sa:Or,ra:kr,qb:Ar,W:jr,v:Mr,nb:Nr,mb:Pr,lb:Fr,pb:Ir,kb:Lr,jb:Rr,ib:zr,Va:Ur,Wa:Wr,Ja:Se,ea:Gr,oa:Kr,Sa:qr,na:Yr,Db:Fo,xa:Do,Eb:Po,ya:Eo,F:go,e:no,r:eo,x:$a,D:po,Ib:Co,ba:xo,B:io,za:wo,$:Oo,ha:So,Fb:Mo,Gb:jo,Ba:_o,Aa:bo,Jb:vo,wa:No,aa:To,d:ro,A:ao,q:to,Cb:Io,t:so,y:mo,I:oo,E:co,K:ho,S:ko,ja:fo,_:Ao,Kb:uo,Lb:lo,P:yo,h:Xr,a:je,Ob:be,Hb:Zr,ia:Qr,O:$r,qa:ei,Mb:ti,Q:ni,zb:ri,Ab:ii,ua:ai,fa:oi,R:si,Ea:R,va:ci,Z:li,xb:ui,Zb:di,V:fi,Bb:pi,ub:mi,vb:gi,wb:_i,ga:vi,yb:yi,Nb:bi}}}async function fe(){function e(e,n){var r=Xa=e.exports;e={};for(let[t,n]of Object.entries(r))typeof n==`function`?(r=sn(n),e[t]=r):e[t]=n;return Xa=e,Xa=function(){var e=Xa,t=e=>t=>e(t)>>>0,n=e=>()=>e()>>>0;return(e=Object.assign({},e)).$b=t(e.$b),e.Cc=n(e.Cc),e.Ec=t(e.Ec),e.rd=(e=>(t,n)=>e(t,n)>>>0)(e.rd),e.wd=t(e.wd),e.xd=n(e.xd),e.Bd=t(e.Bd),e}(),Te.push(Xa.id),xi=(e=Xa).$b,Si=e.ac,t._OrtInit=e.bc,t._OrtGetLastError=e.cc,t._OrtCreateSessionOptions=e.dc,t._OrtAppendExecutionProvider=e.ec,t._OrtAddFreeDimensionOverride=e.fc,t._OrtAddSessionConfigEntry=e.gc,t._OrtReleaseSessionOptions=e.hc,t._OrtCreateSession=e.ic,t._OrtReleaseSession=e.jc,t._OrtGetInputOutputCount=e.kc,t._OrtGetInputOutputMetadata=e.lc,t._OrtFree=e.mc,t._OrtCreateTensor=e.nc,t._OrtGetTensorData=e.oc,t._OrtReleaseTensor=e.pc,t._OrtCreateRunOptions=e.qc,t._OrtAddRunConfigEntry=e.rc,t._OrtReleaseRunOptions=e.sc,t._OrtCreateBinding=e.tc,t._OrtBindInput=e.uc,t._OrtBindOutput=e.vc,t._OrtClearBoundOutputs=e.wc,t._OrtReleaseBinding=e.xc,t._OrtRunWithBinding=e.yc,t._OrtRun=e.zc,t._OrtEndProfiling=e.Ac,Ci=t._OrtGetWebGpuDevice=e.Bc,wi=e.Cc,Ti=t._free=e.Dc,Ei=t._malloc=e.Ec,Di=t._wgpuBufferRelease=e.Fc,Oi=t._wgpuCreateInstance=e.Gc,ki=e.Hc,Ai=e.Ic,ji=e.Jc,Mi=e.Kc,Ni=e.Lc,Pi=e.Pc,Fi=e.Zc,Ii=e._c,Li=e.$c,Ri=e.bd,zi=e.cd,Bi=e.dd,Vi=e.ed,Hi=e.fd,Ui=e.gd,Wi=e.hd,Gi=e.kd,Ki=e.ld,qi=e.md,Ji=e.nd,Yi=e.od,Xi=e.pd,Zi=e.qd,Qi=e.rd,$i=e.sd,ea=e.td,ta=e.ud,na=e.vd,ra=e.wd,ia=e.xd,aa=e.yd,oa=e.zd,sa=e.Ad,ca=e.Bd,la=e.Cd,ua=e.Dd,da=e.Ed,fa=e.Fd,pa=e.Gd,ma=e.Hd,ha=e.Id,ga=e.Jd,_a=e.Kd,va=e.Ld,ya=e.Md,ba=e.Nd,xa=e.Od,Sa=e.Pd,Ca=e.Qd,wa=e.Rd,Ta=e.Td,Ea=e.Ud,Da=e.Vd,Oa=e.Wd,ka=e.Yd,Aa=e.Zd,ja=e._d,Ma=e.$d,Na=e.ae,Pa=e.be,Fa=e.pe,Ia=e.qe,La=e.re,Ra=e.se,za=e.te,Ba=e.ue,Va=e.ve,Ha=e.we,Ua=e.xe,Wa=e.ye,Ga=e.ze,Ka=e.Xe,qa=e.Ye,Ja=e.Ze,Ya=e._e,f=n,Xa}var n,r=de();return t.instantiateWasm?new Promise(n=>{t.instantiateWasm(r,(t,r)=>{n(e(t,r))})}):i?e(new WebAssembly.Instance(f,de()),f):(oe??=t.locateFile?t.locateFile?t.locateFile(`ort-wasm-simd-threaded.asyncify.wasm`,u):u+`ort-wasm-simd-threaded.asyncify.wasm`:new URL(`/assets/ort-wasm-simd-threaded.asyncify-COni_aV6.wasm`,``+import.meta.url).href,n=await async function(e){var t=oe;if(!d&&!ee(t))try{var n=fetch(t,{credentials:`same-origin`});return await WebAssembly.instantiateStreaming(n,e)}catch(e){b(`wasm streaming compile failed: ${e}`),b(`falling back to ArrayBuffer instantiation`)}return async function(e,t){try{var n=await async function(e){if(!d)try{var t=await o(e);return new Uint8Array(t)}catch{}if(e==oe&&d)e=new Uint8Array(d);else{if(!s)throw`both async and sync fetching of the wasm failed`;e=s(e)}return e}(e);return await WebAssembly.instantiate(n,t)}catch(e){b(`failed to asynchronously prepare wasm: ${e}`),ue(e)}}(t,e)}(r),e(n.instance,n.module))}class pe{name=`ExitStatus`;constructor(e){this.message=`Program terminated with exit(${e})`,this.status=e}}var me=e=>{e.terminate(),e.onmessage=()=>{}},he=[],ge=0,_e=null,ve=e=>{Ce.length==0&&(Ae(),ke(Ce[0]));var t=Ce.pop();if(!t)return 6;we.push(t),Ee[e.Nc]=t,t.Nc=e.Nc;var n={Oc:`run`,he:e.ge,Wc:e.Wc,Nc:e.Nc};return t.postMessage(n,e.Yc),0},ye=0,k=(e,t,...n)=>{var r,i=16*n.length,a=ia(),o=ra(i),s=o>>>3;for(r of n)typeof r==`bigint`?((S(),ae)[s++>>>0]=1n,(S(),ae)[s++>>>0]=r):((S(),ae)[s++>>>0]=0n,(S(),ie)[s++>>>0]=r);return e=qi(e,0,i,o,t),na(a),e};function be(e){if(i)return k(0,1,e);if(p=e,!(0{if(p=e,i)throw xe(e),`unwind`;be(e)},Ce=[],we=[],Te=[],Ee={},De=e=>{var t=e.Nc;delete Ee[t],Ce.push(e),we.splice(we.indexOf(e),1),e.Nc=0,Ji(t)};function Oe(){Te.forEach(e=>e())}var ke=e=>new Promise(n=>{e.onmessage=r=>{var i=r.data;if(r=i.Oc,i.Vc&&i.Vc!=wi()){var a=Ee[i.Vc];a?a.postMessage(i,i.Yc):b(`Internal error! Worker sent a message "${r}" to target pthread ${i.Vc}, but that thread no longer exists!`)}else r===`checkMailbox`?Qt():r===`spawnThread`?ve(i):r===`cleanupThread`?Yt(()=>{De(Ee[i.ie])}):r===`loaded`?(e.loaded=!0,n(e)):i.target===`setimmediate`?e.postMessage(i):r===`uncaughtException`?e.onerror(i.error):r===`callHandler`?t[i.ce](...i.args):r&&b(`worker sent an unknown command ${r}`)},e.onerror=e=>{throw b(`worker sent an error! ${e.filename}:${e.lineno}: ${e.message}`),e};var r,i=[];for(r of[])t.propertyIsEnumerable(r)&&i.push(r);e.postMessage({Oc:`load`,de:i,je,ke:f})});function Ae(){var e=new Worker((()=>{let e=URL;return import.meta.url>`file:`&&import.meta.url<`file;`?new e(`ort.webgpu.bundle.min.mjs`,import.meta.url):new URL(import.meta.url)})(),{type:`module`,workerData:`em-pthread`,name:`em-pthread`});Ce.push(e)}var je,Me=(e,t)=>{ye=0,e=ua(e,t),0-9007199254740992>e||9007199254740992>>=0);return(S(),w)[t.Qc+12>>>0]==0&&(ze(t,!0),Pe--),Be(t,!1),Ne.push(t),ca(e)}var Le=0,Re=()=>{$i(0,0);var e=Ne.pop();aa(e.Xc),Le=0};function ze(e,t){t=t?1:0,(S(),w)[e.Qc+12>>>0]=t}function Be(e,t){t=t?1:0,(S(),w)[e.Qc+13>>>0]=t}class Ve{constructor(e){this.Xc=e,this.Qc=e-24}}var He=e=>{var t=Le;if(!t)return ea(0),0;var n=new Ve(t);(S(),D)[n.Qc+16>>>2>>>0]=t;var r=(S(),D)[n.Qc+4>>>2>>>0];if(!r)return ea(0),t;for(var i of e){if(i===0||i===r)break;if(sa(i,r,n.Qc+16))return ea(i),t}return ea(r),t};function Ue(){return He([])}function We(e){return He([e>>>0])}function Ge(e,t,n,r){return He([e>>>0,t>>>0,n>>>0,r>>>0])}var Ke=()=>{var e=Ne.pop();e||ue(`no exception to throw`);var t=e.Xc;throw(S(),w)[e.Qc+13>>>0]==0&&(Ne.push(e),Be(e,!0),ze(e,!1),Pe++),oa(t),Le=t};function qe(e,t,n){var r=new Ve(e>>>=0);throw t>>>=0,n>>>=0,(S(),D)[r.Qc+16>>>2>>>0]=0,(S(),D)[r.Qc+4>>>2>>>0]=t,(S(),D)[r.Qc+8>>>2>>>0]=n,oa(e),Pe++,Le=e}var Je=()=>Pe;function Ye(e,t,n,r){return i?k(2,1,e,t,n,r):Xe(e,t,n,r)}function Xe(e,t,n,r){if(e>>>=0,t>>>=0,n>>>=0,r>>>=0,!globalThis.SharedArrayBuffer)return 6;var a=[];return i&&a.length===0?Ye(e,t,n,r):(e={ge:n,Nc:e,Wc:r,Yc:a},i?(e.Oc=`spawnThread`,postMessage(e,a),0):ve(e))}function Ze(e){throw Le||=e>>>0,Le}var Qe=globalThis.TextDecoder&&new TextDecoder,$e=(e,t,n,r)=>{if(n=t+n,r)return n;for(;e[t]&&!(t>=n);)++t;return t},et=(e,t=0,n,r)=>{if(16<(n=$e(e,t>>>=0,n,r))-t&&e.buffer&&Qe)return Qe.decode(e.buffer instanceof ArrayBuffer?e.subarray(t,n):e.slice(t,n));for(r=``;t(i=(240&i)==224?(15&i)<<12|a<<6|o:(7&i)<<18|a<<12|o<<6|63&e[t++])?r+=String.fromCharCode(i):(i-=65536,r+=String.fromCharCode(55296|i>>10,56320|1023&i))}}else r+=String.fromCharCode(i)}return r},tt=(e,t,n)=>(e>>>=0)?et((S(),T),e,t,n):``;function nt(e,t,n){return i?k(3,1,e,t,n):0}function rt(e,t){if(i)return k(4,1,e,t)}function it(e,t){if(i)return k(5,1,e,t)}function at(e,t,n){if(i)return k(6,1,e,t,n)}function ot(e,t,n){return i?k(7,1,e,t,n):0}function st(e,t){if(i)return k(8,1,e,t)}function ct(e,t,n){if(i)return k(9,1,e,t,n)}function lt(e,t,n,r){if(i)return k(10,1,e,t,n,r)}function ut(e,t,n,r){if(i)return k(11,1,e,t,n,r)}function A(e,t,n,r){if(i)return k(12,1,e,t,n,r)}function dt(e){if(i)return k(13,1,e)}function ft(e,t){if(i)return k(14,1,e,t)}function pt(e,t,n){if(i)return k(15,1,e,t,n)}var mt=()=>ue(``),ht=e=>{e>>>=0;for(var t=``;;){var n=(S(),T)[e++>>>0];if(!n)return t;t+=String.fromCharCode(n)}},gt={},_t={},vt={},yt=class extends Error{constructor(e){super(e),this.name=`BindingError`}};function bt(e,t,n={}){return function(e,t,n={}){var r=t.name;if(!e)throw new yt(`type "${r}" must have a positive integer typeid pointer`);if(_t.hasOwnProperty(e)){if(n.ee)return;throw new yt(`Cannot register type '${r}' twice`)}_t[e]=t,delete vt[e],gt.hasOwnProperty(e)&&(t=gt[e],delete gt[e],t.forEach(e=>e()))}(e,t,n)}var xt=(e,t,n)=>{switch(t){case 1:return n?e=>(S(),w)[e>>>0]:e=>(S(),T)[e>>>0];case 2:return n?e=>(S(),te)[e>>>1>>>0]:e=>(S(),ne)[e>>>1>>>0];case 4:return n?e=>(S(),E)[e>>>2>>>0]:e=>(S(),D)[e>>>2>>>0];case 8:return n?e=>(S(),ae)[e>>>3>>>0]:e=>(S(),O)[e>>>3>>>0];default:throw TypeError(`invalid integer width (${t}): ${e}`)}};function St(e,t,n,r,i){e>>>=0,n>>>=0,t=ht(t>>>0);let a=e=>e;if(r=r===0n){let e=8*n;a=t=>BigInt.asUintN(e,t),i=a(i)}bt(e,{name:t,Mc:a,Sc:(e,t)=>(typeof t==`number`&&(t=BigInt(t)),t),Rc:xt(t,n,!r),Tc:null})}function Ct(e,t,n,r){bt(e>>>=0,{name:t=ht(t>>>0),Mc:function(e){return!!e},Sc:function(e,t){return t?n:r},Rc:function(e){return this.Mc((S(),T)[e>>>0])},Tc:null})}var wt=[],Tt=[0,1,,1,null,1,!0,1,!1,1];function Et(e){9<(e>>>=0)&&--Tt[e+1]==0&&(Tt[e]=void 0,wt.push(e))}var Dt=e=>{if(!e)throw new yt(`Cannot use deleted val. handle = ${e}`);return Tt[e]},Ot=e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:let t=wt.pop()||Tt.length;return Tt[t]=e,Tt[t+1]=1,t}};function kt(e){return this.Mc((S(),D)[e>>>2>>>0])}var At={name:`emscripten::val`,Mc:e=>{var t=Dt(e);return Et(e),t},Sc:(e,t)=>Ot(t),Rc:kt,Tc:null};function jt(e){return bt(e>>>0,At)}var Mt=(e,t)=>{switch(t){case 4:return function(e){return this.Mc((S(),re)[e>>>2>>>0])};case 8:return function(e){return this.Mc((S(),ie)[e>>>3>>>0])};default:throw TypeError(`invalid float width (${t}): ${e}`)}};function Nt(e,t,n){n>>>=0,bt(e>>>=0,{name:t=ht(t>>>0),Mc:e=>e,Sc:(e,t)=>t,Rc:Mt(t,n),Tc:null})}function Pt(e,t,n,r,i){e>>>=0,n>>>=0,t=ht(t>>>0);let a=e=>e;if(r===0){var o=32-8*n;a=e=>e<>>o,i=a(i)}bt(e,{name:t,Mc:a,Sc:(e,t)=>t,Rc:xt(t,n,r!==0),Tc:null})}function Ft(e,t,n){function r(e){var t=(S(),D)[e>>>2>>>0];return e=(S(),D)[e+4>>>2>>>0],new i((S(),w).buffer,e,t)}var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][t];bt(e>>>=0,{name:n=ht(n>>>0),Mc:r,Rc:r},{ee:!0})}var It=(e,t,n)=>{var r=(S(),T);if(t>>>=0,0=o){if(t>=n)break;r[t++>>>0]=o}else if(2047>=o){if(t+1>=n)break;r[t++>>>0]=192|o>>6,r[t++>>>0]=128|63&o}else if(65535>=o){if(t+2>=n)break;r[t++>>>0]=224|o>>12,r[t++>>>0]=128|o>>6&63,r[t++>>>0]=128|63&o}else{if(t+3>=n)break;r[t++>>>0]=240|o>>18,r[t++>>>0]=128|o>>12&63,r[t++>>>0]=128|o>>6&63,r[t++>>>0]=128|63&o,a++}}r[t>>>0]=0,e=t-i}else e=0;return e},Lt=e=>{for(var t=0,n=0;n=r?t++:2047>=r?t+=2:55296<=r&&57343>=r?(t+=4,++n):t+=3}return t};function Rt(e,t){bt(e>>>=0,{name:t=ht(t>>>0),Mc(e){var t=(S(),D)[e>>>2>>>0];return t=tt(e+4,t,!0),Ti(e),t},Sc(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var n=typeof t==`string`;if(!(n||ArrayBuffer.isView(t)&&t.BYTES_PER_ELEMENT==1))throw new yt(`Cannot pass non-string to std::string`);var r=n?Lt(t):t.length,i=Ei(4+r+1),a=i+4;return(S(),D)[i>>>2>>>0]=r,n?It(t,a,r+1):(S(),T).set(t,a>>>0),e!==null&&e.push(Ti,i),i},Rc:kt,Tc(e){Ti(e)}})}var zt=globalThis.TextDecoder?new TextDecoder(`utf-16le`):void 0,Bt=(e,t,n)=>{if(e>>>=1,16<(t=$e((S(),ne),e,t/2,n))-e&&zt)return zt.decode((S(),ne).slice(e,t));for(n=``;e>>0];n+=String.fromCharCode(r)}return n},Vt=(e,t,n)=>{if(n??=2147483647,2>n)return 0;var r=t;n=(n-=2)<2*e.length?n/2:e.length;for(var i=0;i>>1>>>0]=a,t+=2}return(S(),te)[t>>>1>>>0]=0,t-r},Ht=e=>2*e.length,Ut=(e,t,n)=>{var r=``;e>>>=2;for(var i=0;!(i>=t/4);i++){var a=(S(),D)[e+i>>>0];if(!a&&!n)break;r+=String.fromCodePoint(a)}return r},Wt=(e,t,n)=>{if(t>>>=0,n??=2147483647,4>n)return 0;var r=t;n=r+n-4;for(var i=0;i>>2>>>0]=a,(t+=4)+4>n)break}return(S(),E)[t>>>2>>>0]=0,t-r},Gt=e=>{for(var t=0,n=0;n>>=0,t>>>=0,n=ht(n>>>=0),t===2)var r=Bt,i=Vt,a=Ht;else r=Ut,i=Wt,a=Gt;bt(e,{name:n,Mc:e=>{var n=(S(),D)[e>>>2>>>0];return n=r(e+4,n*t,!0),Ti(e),n},Sc:(e,r)=>{if(typeof r!=`string`)throw new yt(`Cannot pass non-string to C++ string type ${n}`);var o=a(r),s=Ei(4+o+t);return(S(),D)[s>>>2>>>0]=o/t,i(r,s+4,o+t),e!==null&&e.push(Ti,s),s},Rc:kt,Tc(e){Ti(e)}})}function qt(e,t){bt(e>>>=0,{fe:!0,name:t=ht(t>>>0),Mc:()=>{},Sc:()=>{}})}function Jt(e){Gi(e>>>0,!r,1,!n,131072,!1),Oe()}var Yt=e=>{if(!x)try{if(e(),!(0Number((navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)||[])[2]);function Zt(e){e>>>=0,Xt||(Atomics.waitAsync((S(),E),e>>>2,e).value.then(Qt),e+=128,Atomics.store((S(),E),e>>>2,1))}var Qt=()=>Yt(()=>{var e=wi();e&&(Zt(e),Zi())});function $t(e,t){(e>>>=0)==t>>>0?setTimeout(Qt):i?postMessage({Vc:e,Oc:`checkMailbox`}):(e=Ee[e])&&e.postMessage({Oc:`checkMailbox`})}var en=[];function tn(e,t,n,r,i){for(t>>>=0,i>>>=0,en.length=0,n=i>>>3,r=i+r>>>3;n>>0]?(S(),ae)[n++>>>0]:(S(),ie)[n++>>>0];en.push(a)}return(t?Qa[t]:Za[e])(...en)}var nn=()=>{ye=0};function rn(e){e>>>=0,i?postMessage({Oc:`cleanupThread`,ie:e}):De(Ee[e])}function an(e){}var on=e=>{try{e()}catch(e){ue(e)}};function sn(e){var t=(...t)=>{dn.push(e);try{return e(...t)}finally{x||(dn.pop(),ln&&cn===1&&dn.length===0&&(cn=0,ye+=1,on(qa),typeof Fibers<`u`&&Fibers.De()))}};return mn.set(e,t),t}var cn=0,ln=null,un=0,dn=[],fn=new Map,pn=new Map,mn=new Map,hn=0,gn=null,_n=[],vn=e=>function(e){if(!x){if(cn===0){var t=!1,n=!1;e((e=0)=>{if(!x&&(un=e,t=!0,n)){cn=2,on(()=>Ja(ln)),typeof MainLoop<`u`&&MainLoop.Xd&&MainLoop.resume(),e=!1;try{var r=function(){var e=(S(),E)[ln+8>>>2>>>0];return e=pn.get(e),e=mn.get(e),--ye,e()}()}catch(t){r=t,e=!0}var i=!1;if(!ln){var a=gn;a&&(gn=null,(e?a.reject:a.resolve)(r),i=!0)}if(e&&!i)throw r}}),n=!0,t||(cn=1,ln=function(){var e=Ei(65548),t=e+12;if((S(),D)[e>>>2>>>0]=t,(S(),D)[e+4>>>2>>>0]=t+65536,t=dn[0],!fn.has(t)){var n=hn++;fn.set(t,n),pn.set(n,t)}return t=fn.get(t),(S(),E)[e+8>>>2>>>0]=t,e}(),typeof MainLoop<`u`&&MainLoop.Xd&&MainLoop.pause(),on(()=>Ka(ln)))}else cn===2?(cn=0,on(Ya),Ti(ln),ln=null,_n.forEach(Yt)):ue(`invalid state: ${cn}`);return un}}(t=>{e().then(t)});function yn(e){return e>>>=0,vn(async()=>Ot(await Dt(e)))}var bn=[],xn=e=>{var t=bn.length;return bn.push(e),t},Sn=(e,t)=>{for(var n=Array(e),r=0;r>>2>>>0],o=_t[a];if(o===void 0)throw e=`parameter ${r}`,a=xi(a),t=ht(a),Ti(a),new yt(`${e} has unknown type ${t}`);n[i]=o}return n},Cn=(e,t,n)=>{var r=[];return e=e(r,n),r.length&&((S(),D)[t>>>2>>>0]=Ot(r)),e},wn={},Tn=e=>{var t=wn[e];return t===void 0?ht(e):t};function En(e,t,n){var[r,...i]=Sn(e,t>>>0);t=r.Sc.bind(r);var a=i.map(e=>e.Rc.bind(e));e--;var o={toValue:Dt};switch(e=a.map((e,t)=>{var n=`argFromPtr${t}`;return o[n]=e,`${n}(args${t?`+`+8*t:``})`}),n){case 0:var s=`toValue(handle)`;break;case 2:s=`new (toValue(handle))`;break;case 3:s=``;break;case 1:o.getStringOrSymbol=Tn,s=`toValue(handle)[getStringOrSymbol(methodName)]`}return s+=`(${e})`,r.fe||(o.toReturnWire=t,o.emval_returnValue=Cn,s=`return emval_returnValue(toReturnWire, destructorsRef, ${s})`),s=`return function (handle, methodName, destructorsRef, args) { + ${s} + }`,n=Function(Object.keys(o),s)(...Object.values(o)),s=`methodCaller<(${i.map(e=>e.name)}) => ${r.name}>`,xn(Object.defineProperty(n,`name`,{value:s}))}function Dn(e,t){return t>>>=0,(e=Dt(e>>>0))==Dt(t)}function On(e){return(e>>>=0)?(e=Tn(e),Ot(globalThis[e])):Ot(globalThis)}function j(e){return e=Tn(e>>>0),Ot(t[e])}function kn(e,t){return t>>>=0,e=Dt(e>>>0),t=Dt(t),Ot(e[t])}function An(e){9<(e>>>=0)&&(Tt[e+1]+=1)}function jn(e,t,n,r,i){return bn[e>>>0](t>>>0,n>>>0,r>>>0,i>>>0)}function Mn(e,t,n,r,i){return jn(e>>>0,t>>>0,n>>>0,r>>>0,i>>>0)}function Nn(){return Ot([])}function Pn(e){e=Dt(e>>>0);for(var t=Array(e.length),n=0;n>>0))}function Fn(){return Ot({})}function In(e){for(var t=Dt(e>>>=0);t.length;){var n=t.pop();t.pop()(n)}Et(e)}function Ln(e,t,n){t>>>=0,n>>>=0,e=Dt(e>>>0),t=Dt(t),n=Dt(n),e[t]=n}function Rn(e,t){e=Fe(e),t>>>=0,e=new Date(1e3*e),(S(),E)[t>>>2>>>0]=e.getUTCSeconds(),(S(),E)[t+4>>>2>>>0]=e.getUTCMinutes(),(S(),E)[t+8>>>2>>>0]=e.getUTCHours(),(S(),E)[t+12>>>2>>>0]=e.getUTCDate(),(S(),E)[t+16>>>2>>>0]=e.getUTCMonth(),(S(),E)[t+20>>>2>>>0]=e.getUTCFullYear()-1900,(S(),E)[t+24>>>2>>>0]=e.getUTCDay(),e=(e.getTime()-Date.UTC(e.getUTCFullYear(),0,1,0,0,0,0))/864e5|0,(S(),E)[t+28>>>2>>>0]=e}var zn=e=>e%4==0&&(e%100!=0||e%400==0),Bn=[0,31,60,91,121,152,182,213,244,274,305,335],Vn=[0,31,59,90,120,151,181,212,243,273,304,334];function Hn(e,t){e=Fe(e),t>>>=0,e=new Date(1e3*e),(S(),E)[t>>>2>>>0]=e.getSeconds(),(S(),E)[t+4>>>2>>>0]=e.getMinutes(),(S(),E)[t+8>>>2>>>0]=e.getHours(),(S(),E)[t+12>>>2>>>0]=e.getDate(),(S(),E)[t+16>>>2>>>0]=e.getMonth(),(S(),E)[t+20>>>2>>>0]=e.getFullYear()-1900,(S(),E)[t+24>>>2>>>0]=e.getDay();var n=(zn(e.getFullYear())?Bn:Vn)[e.getMonth()]+e.getDate()-1|0;(S(),E)[t+28>>>2>>>0]=n,(S(),E)[t+36>>>2>>>0]=-60*e.getTimezoneOffset(),n=new Date(e.getFullYear(),6,1).getTimezoneOffset();var r=new Date(e.getFullYear(),0,1).getTimezoneOffset();e=0|(n!=r&&e.getTimezoneOffset()==Math.min(r,n)),(S(),E)[t+32>>>2>>>0]=e}function Un(e){e>>>=0;var t=new Date((S(),E)[e+20>>>2>>>0]+1900,(S(),E)[e+16>>>2>>>0],(S(),E)[e+12>>>2>>>0],(S(),E)[e+8>>>2>>>0],(S(),E)[e+4>>>2>>>0],(S(),E)[e>>>2>>>0],0),n=(S(),E)[e+32>>>2>>>0],r=t.getTimezoneOffset(),i=new Date(t.getFullYear(),6,1).getTimezoneOffset(),a=new Date(t.getFullYear(),0,1).getTimezoneOffset(),o=Math.min(a,i);return 0>n?(S(),E)[e+32>>>2>>>0]=+(i!=a&&o==r):0>>2>>>0]=t.getDay(),n=(zn(t.getFullYear())?Bn:Vn)[t.getMonth()]+t.getDate()-1|0,(S(),E)[e+28>>>2>>>0]=n,(S(),E)[e>>>2>>>0]=t.getSeconds(),(S(),E)[e+4>>>2>>>0]=t.getMinutes(),(S(),E)[e+8>>>2>>>0]=t.getHours(),(S(),E)[e+12>>>2>>>0]=t.getDate(),(S(),E)[e+16>>>2>>>0]=t.getMonth(),(S(),E)[e+20>>>2>>>0]=t.getYear(),e=t.getTime(),BigInt(isNaN(e)?-1:e/1e3)}function Wn(e,t,n,r,a,o,s){return i?k(16,1,e,t,n,r,a,o,s):-52}function Gn(e,t,n,r,a,o){if(i)return k(17,1,e,t,n,r,a,o)}var Kn={},qn=()=>performance.timeOrigin+performance.now();function Jn(e,t){return i?k(18,1,e,t):(Kn[e]&&(clearTimeout(Kn[e].id),delete Kn[e]),t&&(Kn[e]={id:setTimeout(()=>{delete Kn[e],Yt(()=>Xi(e,performance.timeOrigin+performance.now()))},t),Ce:t}),0)}function Yn(e,t,n,r){e>>>=0,t>>>=0,n>>>=0,r>>>=0;var i=new Date().getFullYear(),a=new Date(i,0,1).getTimezoneOffset();i=new Date(i,6,1).getTimezoneOffset();var o=Math.max(a,i);(S(),D)[e>>>2>>>0]=60*o,(S(),E)[t>>>2>>>0]=+(a!=i),e=(t=e=>{var t=Math.abs(e);return`UTC${0<=e?`-`:`+`}${String(Math.floor(t/60)).padStart(2,`0`)}${String(t%60).padStart(2,`0`)}`})(a),t=t(i),iDate.now(),Zn=1;function Qn(e,t,n){if(n>>>=0,!(0<=e&&3>=e))return 28;if(e===0)e=Date.now();else{if(!Zn)return 52;e=performance.timeOrigin+performance.now()}return e=Math.round(1e6*e),(S(),ae)[n>>>3>>>0]=BigInt(e),0}var N=[],$n=(e,t)=>{N.length=0;for(var n;n=(S(),T)[e++>>>0];){var r=n!=105;t+=(r&=n!=112)&&t%8?4:0,N.push(n==112?(S(),D)[t>>>2>>>0]:n==106?(S(),ae)[t>>>3>>>0]:n==105?(S(),E)[t>>>2>>>0]:(S(),ie)[t>>>3>>>0]),t+=r?8:4}return N};function er(e,t,n){return e>>>=0,t=$n(t>>>0,n>>>0),Qa[e](...t)}function P(e,t,n){return e>>>=0,t=$n(t>>>0,n>>>0),Qa[e](...t)}var F=()=>{};function tr(e,t){return b(tt(e>>>0,t>>>0))}var nr=()=>{throw ye+=1,`unwind`};function I(){return 4294901760}var rr=()=>1,ir=()=>navigator.hardwareConcurrency;function L(e){e>>>=0;var t=(S(),T).length;if(e<=t||4294901760=n;n*=2){var r=t*(1+.2/n);r=Math.min(r,e+100663296);e:{r=(Math.min(4294901760,65536*Math.ceil(Math.max(e,r)/65536))-je.buffer.byteLength+65535)/65536|0;try{je.grow(r),ce();var i=1;break e}catch{}i=void 0}if(i)return!0}return!1}var ar=e=>{var t=Lt(e)+1,n=ra(t);return It(e,n,t),n},or=(e,t)=>{(S(),D)[e>>>2>>>0]=t;var n=(S(),D)[e>>>2>>>0];(S(),D)[e+4>>>2>>>0]=(t-n)/4294967296},sr=e=>(S(),D)[e>>>2>>>0]+4294967296*(S(),E)[e+4>>>2>>>0],cr=[],lr=(e,t)=>{cr[e>>>0]=t},ur=[],dr=[],fr=(e,t)=>{dr[e]=new Promise(n=>t.finally(()=>n(e)))},pr=e=>{if(e)return cr[e>>>0]},mr=(e,t)=>{for(e=(S(),D)[e>>>2>>>0];e;e=(S(),D)[e>>>2>>>0])t[(S(),E)[e+4>>>2>>>0]](e)},hr=(e,t,n)=>{(S(),D)[e>>>2>>>0]=t,(S(),D)[e+4>>>2>>>0]=n},gr=e=>{var t=(S(),D)[e>>>2>>>0];return e=(S(),D)[e+4>>>2>>>0],tt(t,e)},_r=e=>{var t=(S(),D)[e>>>2>>>0];return e=(S(),D)[e+4>>>2>>>0],t?tt(t,e):e===0?``:void 0},vr=e=>{var t=_r(e+4),n=(n=(S(),D)[e+12>>>2>>>0])?pr(n):`auto`;if(e+=16){var r=pr((S(),D)[e+4>>>2>>>0]),i=(S(),D)[e+16>>>2>>>0],a=(S(),D)[e+20>>>2>>>0];if(i){for(var o={},s=0;s>>3>>>0]}i=o}else i=void 0;e={module:r,constants:i,entryPoint:_r(e+8)}}else e=void 0;return{label:t,layout:n,compute:e}},yr=(e,t)=>{function n(n,r){n=e[n],(S(),D)[t+r>>>2>>>0]=n}n(`maxTextureDimension1D`,4),n(`maxTextureDimension2D`,8),n(`maxTextureDimension3D`,12),n(`maxTextureArrayLayers`,16),n(`maxBindGroups`,20),n(`maxBindGroupsPlusVertexBuffers`,24),n(`maxBindingsPerBindGroup`,28),n(`maxDynamicUniformBuffersPerPipelineLayout`,32),n(`maxDynamicStorageBuffersPerPipelineLayout`,36),n(`maxSampledTexturesPerShaderStage`,40),n(`maxSamplersPerShaderStage`,44),n(`maxStorageBuffersPerShaderStage`,48),n(`maxStorageTexturesPerShaderStage`,52),n(`maxUniformBuffersPerShaderStage`,56),n(`minUniformBufferOffsetAlignment`,80),n(`minStorageBufferOffsetAlignment`,84),or(t+64,e.maxUniformBufferBindingSize),or(t+72,e.maxStorageBufferBindingSize),n(`maxVertexBuffers`,88),or(t+96,e.maxBufferSize),n(`maxVertexAttributes`,104),n(`maxVertexBufferArrayStride`,108),n(`maxInterStageShaderVariables`,112),n(`maxColorAttachments`,116),n(`maxColorAttachmentBytesPerSample`,120),n(`maxComputeWorkgroupStorageSize`,124),n(`maxComputeInvocationsPerWorkgroup`,128),n(`maxComputeWorkgroupSizeX`,132),n(`maxComputeWorkgroupSizeY`,136),n(`maxComputeWorkgroupSizeZ`,140),n(`maxComputeWorkgroupsPerDimension`,144),e.Ae!==void 0&&n(`maxImmediateSize`,148)},br=[,`validation`,`out-of-memory`,`internal`],xr=[,`compatibility`,`core`],Sr={1:`core-features-and-limits`,2:`depth-clip-control`,3:`depth32float-stencil8`,4:`texture-compression-bc`,5:`texture-compression-bc-sliced-3d`,6:`texture-compression-etc2`,7:`texture-compression-astc`,8:`texture-compression-astc-sliced-3d`,9:`timestamp-query`,10:`indirect-first-instance`,11:`shader-f16`,12:`rg11b10ufloat-renderable`,13:`bgra8unorm-storage`,14:`float32-filterable`,15:`float32-blendable`,16:`clip-distances`,17:`dual-source-blending`,18:`subgroups`,19:`texture-formats-tier1`,20:`texture-formats-tier2`,21:`primitive-index`,22:`texture-component-swizzle`,327692:`chromium-experimental-unorm16-texture-formats`,327729:`chromium-experimental-multi-draw-indirect`},Cr=[,`low-power`,`high-performance`],wr=[,`occlusion`,`timestamp`],Tr={undefined:1,unknown:1,destroyed:2};function Er(e,t,n,r,i,a){t=Fe(t),n=Fe(n),r>>>=0,i>>>=0,a>>>=0;var o=pr(e>>>0);if(e={},a){var s=(S(),D)[a+12>>>2>>>0];if(s){var c=(S(),D)[a+16>>>2>>>0];e.requiredFeatures=Array.from((S(),D).subarray(c>>>2>>>0,c+4*s>>>2>>>0),e=>Sr[e])}var l=(S(),D)[a+20>>>2>>>0];if(l){let t=function(e,t,n=!1){t=l+t,(t=(S(),D)[t>>>2>>>0])==4294967295||n&&t==0||(u[e]=t)},n=function(e,t){t=l+t;var n=(S(),D)[t>>>2>>>0],r=(S(),D)[t+4>>>2>>>0];n==4294967295&&r==4294967295||(u[e]=sr(t))};var u={};t(`maxTextureDimension1D`,4),t(`maxTextureDimension2D`,8),t(`maxTextureDimension3D`,12),t(`maxTextureArrayLayers`,16),t(`maxBindGroups`,20),t(`maxBindGroupsPlusVertexBuffers`,24),t(`maxDynamicUniformBuffersPerPipelineLayout`,32),t(`maxDynamicStorageBuffersPerPipelineLayout`,36),t(`maxSampledTexturesPerShaderStage`,40),t(`maxSamplersPerShaderStage`,44),t(`maxStorageBuffersPerShaderStage`,48),t(`maxStorageTexturesPerShaderStage`,52),t(`maxUniformBuffersPerShaderStage`,56),t(`minUniformBufferOffsetAlignment`,80),t(`minStorageBufferOffsetAlignment`,84),n(`maxUniformBufferBindingSize`,64),n(`maxStorageBufferBindingSize`,72),t(`maxVertexBuffers`,88),n(`maxBufferSize`,96),t(`maxVertexAttributes`,104),t(`maxVertexBufferArrayStride`,108),t(`maxInterStageShaderVariables`,112),t(`maxColorAttachments`,116),t(`maxColorAttachmentBytesPerSample`,120),t(`maxComputeWorkgroupStorageSize`,124),t(`maxComputeInvocationsPerWorkgroup`,128),t(`maxComputeWorkgroupSizeX`,132),t(`maxComputeWorkgroupSizeY`,136),t(`maxComputeWorkgroupSizeZ`,140),t(`maxComputeWorkgroupsPerDimension`,144),t(`maxImmediateSize`,148,!0),e.requiredLimits=u}(s=(S(),D)[a+24>>>2>>>0])&&(s={label:_r(s+4)},e.defaultQueue=s),e.label=_r(a+4)}ye+=1,fr(t,o.requestDevice(e).then(e=>{--ye,Yt(()=>{cr[i>>>0]=e.queue,cr[r>>>0]=e,fr(n,e.lost.then(t=>{Yt(()=>{e.onuncapturederror=()=>{};var r=ia(),i=ar(t.message);zi(n,Tr[t.reason],i),na(r)})})),e.onuncapturederror=e=>{var t=5;e.error instanceof GPUValidationError?t=2:e.error instanceof GPUOutOfMemoryError?t=3:e.error instanceof GPUInternalError&&(t=4);var n=ia();e=ar(e.error.message),Wi(r,t,e),na(n)},`adapterInfo`in e||(e.adapterInfo=o.info),Ui(t,1,r,0)})},e=>{--ye,Yt(()=>{var i=ia(),a=ar(e.message);Ui(t,3,r,a),n&&zi(n,4,a),na(i)})}))}function Dr(e){var t=pr(e>>>=0),n=ur[e];if(n){for(var r=0;r>>=0;var r=pr(e>>>=0);n==4294967295&&(n=void 0);try{var i=r.getMappedRange(t>>>0,n)}catch{return 0}var a=Qi(16,i.byteLength);return(S(),T).set(new Uint8Array(i),a>>>0),ur[e].push(()=>Ti(a)),a}function kr(e,t,n){n>>>=0;var r=pr(e>>>=0);n==4294967295&&(n=void 0);try{var i=r.getMappedRange(t>>>0,n)}catch{return 0}var a=Qi(16,i.byteLength);return(S(),T).fill(0,a,i.byteLength),ur[e].push(()=>{new Uint8Array(i).set((S(),T).subarray(a>>>0,a+i.byteLength>>>0)),Ti(a)}),a}function Ar(e,t,n,r,i){e>>>=0,t=Fe(t),n=Fe(n),i>>>=0;var a=pr(e);ur[e]=[],i==4294967295&&(i=void 0),ye+=1,fr(t,a.mapAsync(n,r>>>0,i).then(()=>{--ye,Yt(()=>{Bi(t,1,0)})},n=>{--ye,Yt(()=>{ia();var r=ar(n.message);Bi(t,n.name===`AbortError`?4:n.name===`OperationError`?3:0,r),delete ur[e]})}))}function jr(e){var t=pr(e>>>=0),n=ur[e];if(n){for(var r=0;r>>0]}function Nr(e,t,n){e>>>=0,t>>>=0,n>>>=0;var r=!!(S(),D)[t+32>>>2>>>0];t={label:_r(t+4),usage:(S(),D)[t+16>>>2>>>0],size:sr(t+24),mappedAtCreation:r},e=pr(e);try{var i=e.createBuffer(t)}catch{return!1}return cr[n>>>0]=i,r&&(ur[n]=[]),!0}function Pr(e,t,n,r){e>>>=0,t=Fe(t),r>>>=0,n=vr(n>>>0),e=pr(e),ye+=1,fr(t,e.createComputePipelineAsync(n).then(e=>{--ye,Yt(()=>{cr[r>>>0]=e,Ri(t,1,r,0)})},e=>{--ye,Yt(()=>{var n=ia(),i=ar(e.message);Ri(t,e.reason===`validation`?3:e.reason===`internal`?4:0,r,i),na(n)})}))}function Fr(e,t,n){e>>>=0,t>>>=0,n>>>=0;var r=(S(),D)[t>>>2>>>0],i=(S(),E)[r+4>>>2>>>0];t={label:_r(t+4),code:``},i===2&&(t.code=gr(r+8)),e=pr(e).createShaderModule(t),cr[n>>>0]=e}var Ir=e=>{(e=pr(e)).onuncapturederror=null,e.destroy()};function Lr(e,t){t=Fe(t),e=pr(e>>>0),ye+=1,fr(t,e.popErrorScope().then(e=>{--ye,Yt(()=>{var n=5;e?e instanceof GPUValidationError?n=2:e instanceof GPUOutOfMemoryError?n=3:e instanceof GPUInternalError&&(n=4):n=1;var r=ia(),i=e?ar(e.message):0;Vi(t,1,n,i),na(r)})},e=>{--ye,Yt(()=>{var n=ia(),r=ar(e.message);Vi(t,1,5,r),na(n)})}))}function Rr(e,t,n,r){if(t=Fe(t),r>>>=0,n>>>=0){var i={featureLevel:xr[(S(),E)[n+4>>>2>>>0]],powerPreference:Cr[(S(),E)[n+8>>>2>>>0]],forceFallbackAdapter:!!(S(),D)[n+12>>>2>>>0]};(e=(S(),D)[n>>>2>>>0])!==0&&(S(),i.Fe=!!(S(),D)[e+8>>>2>>>0])}`gpu`in navigator?(ye+=1,fr(t,navigator.gpu.requestAdapter(i).then(e=>{--ye,Yt(()=>{if(e)cr[r>>>0]=e,Hi(t,1,r,0);else{var n=ia(),i=ar(`WebGPU not available on this browser (requestAdapter returned null)`);Hi(t,3,r,i),na(n)}})},e=>{--ye,Yt(()=>{var n=ia(),i=ar(e.message);Hi(t,4,r,i),na(n)})}))):(i=ia(),e=ar(`WebGPU not available on this browser (navigator.gpu is not available)`),Hi(t,3,r,e),na(i))}function zr(e,t,n){return e>>>=0,t>>>=0,n>>>=0,vn(async()=>{var r=[];if(n){var i=(S(),E)[n>>>2>>>0];r.length=t+1,r[t]=new Promise(e=>setTimeout(e,i,0))}else r.length=t;for(var a=0;a{if(!Br){var e,t={USER:`web_user`,LOGNAME:`web_user`,PATH:`/`,PWD:`/`,HOME:`/home/web_user`,LANG:(globalThis.navigator?.language??`C`).replace(`-`,`_`)+`.UTF-8`,_:`./this.program`};for(e in Vr)Vr[e]===void 0?delete t[e]:t[e]=Vr[e];var n=[];for(e in t)n.push(`${e}=${t[e]}`);Br=n}return Br};function Ur(e,t){if(i)return k(19,1,e,t);e>>>=0,t>>>=0;var n,r=0,a=0;for(n of Hr()){var o=t+r;(S(),D)[e+a>>>2>>>0]=o,r+=It(n,o,1/0)+1,a+=4}return 0}function Wr(e,t){if(i)return k(20,1,e,t);e>>>=0,t>>>=0;var n=Hr();for(var r of((S(),D)[e>>>2>>>0]=n.length,e=0,n))e+=Lt(r)+1;return(S(),D)[t>>>2>>>0]=e,0}function Gr(e){return i?k(21,1,e):52}function Kr(e,t,n,r){return i?k(22,1,e,t,n,r):52}function qr(e,t,n,r){return i?k(23,1,e,t,n,r):70}var Jr=[null,[],[]];function Yr(e,t,n,r){if(i)return k(24,1,e,t,n,r);t>>>=0,n>>>=0,r>>>=0;for(var a=0,o=0;o>>2>>>0],c=(S(),D)[t+4>>>2>>>0];t+=8;for(var l=0;l>>0],f=Jr[u];d===0||d===10?((u===1?y:b)(et(f)),f.length=0):f.push(d)}a+=c}return(S(),D)[r>>>2>>>0]=a,0}function Xr(e){return e>>>0}function Zr(e,t){return yr(pr(e>>>0).limits,t>>>0),1}function Qr(e,t){return pr(e>>>0).features.has(Sr[t])}function $r(e){return BigInt(pr(e>>>0).size)}function ei(e){return BigInt(pr(e>>>0).usage)}function ti(e,t){if(e>>>=0,t>>>=0){var n=_r(t+4);n={label:n,timestampWrites:t=(t=(S(),D)[t+12>>>2>>>0])===0?void 0:{querySet:pr((S(),D)[t+4>>>2>>>0]),beginningOfPassWriteIndex:(S(),D)[t+8>>>2>>>0],endOfPassWriteIndex:(S(),D)[t+12>>>2>>>0]}}}return t=pr(e),e=Ni(0),n=t.beginComputePass(n),cr[e>>>0]=n,e}function ni(e,t,n,r,i,a){n=Fe(n),i=Fe(i),a=Fe(a),pr(e>>>0).copyBufferToBuffer(pr(t>>>0),n,pr(r>>>0),i,a)}function ri(e){var t=pr(e>>>0);return e=ji(0),t=t.finish(),cr[e>>>0]=t,e}function ii(e,t,n,r,i,a){a=Fe(a),pr(e>>>0).resolveQuerySet(pr(t>>>0),n,r,pr(i>>>0),a)}function ai(e,t,n,r){pr(e>>>0).dispatchWorkgroups(t,n,r)}function oi(e,t,n){n=Fe(n),pr(e>>>0).dispatchWorkgroupsIndirect(pr(t>>>0),n)}function si(e){pr(e>>>0).end()}function R(e,t,n,r,i){r>>>=0,i>>>=0,e=pr(e>>>0),n=pr(n>>>0),r==0?e.setBindGroup(t,n):e.setBindGroup(t,n,(S(),D),i>>>2,r)}function ci(e,t){pr(e>>>0).setPipeline(pr(t>>>0))}function li(e,t,n){pr(e>>>0).Ee(pr(t>>>0),n)}function ui(e,t){var n=pr(e>>>0);return e=Ai(0),t=n.getBindGroupLayout(t),cr[e>>>0]=t,e}function di(e,t){function n(e){var t=(S(),D)[e+8>>>2>>>0],n=(S(),D)[e+32>>>2>>>0],r=(S(),D)[e+36>>>2>>>0],i=0;return mr(e,{327681:e=>{i=(S(),D)[e+8>>>2>>>0]}}),t?((n=sr(e+24))==-1&&(n=void 0),t={buffer:pr(t),offset:sr(e+16),size:n}):t=pr(n||r||i),{binding:(S(),D)[e+4>>>2>>>0],resource:t}}e>>>=0,t={label:_r(4+(t>>>=0)),layout:pr((S(),D)[t+12>>>2>>>0]),entries:function(e,t){for(var r=[],i=0;i>>2>>>0],(S(),D)[t+20>>>2>>>0])},e=pr(e);var r=ki(0);return lr(r,e.createBindGroup(t)),r}function fi(e,t){var n;return e>>>=0,(t>>>=0)&&(n={label:_r(t+4)}),t=pr(e),e=Mi(0),n=t.createCommandEncoder(n),cr[e>>>0]=n,e}function pi(e,t){e>>>=0,t>>>=0,t={type:wr[(S(),E)[t+12>>>2>>>0]],count:(S(),D)[t+16>>>2>>>0]};var n=pr(e);return e=Pi(0),t=n.createQuerySet(t),cr[e>>>0]=t,e}function mi(e,t){e=pr(e>>>0).adapterInfo,t>>>=0,(S(),D)[t+52>>>2>>>0]=e.subgroupMinSize,(S(),D)[t+56>>>2>>>0]=e.subgroupMaxSize;var n=e.vendor+e.architecture+e.device+e.description,r=Lt(n)+1,i=Ei(r);return i&&It(n,i,r),n=i,r=Lt(e.vendor),hr(t+4,n,r),n+=r,r=Lt(e.architecture),hr(t+12,n,r),n+=r,r=Lt(e.device),hr(t+20,n,r),hr(t+28,n+r,Lt(e.description)),(S(),E)[t+36>>>2>>>0]=2,e=e.isFallbackAdapter?3:4,(S(),E)[t+40>>>2>>>0]=e,(S(),D)[t+44>>>2>>>0]=0,(S(),D)[t+48>>>2>>>0]=0,1}var hi={"core-features-and-limits":1,"depth-clip-control":2,"depth32float-stencil8":3,"texture-compression-bc":4,"texture-compression-bc-sliced-3d":5,"texture-compression-etc2":6,"texture-compression-astc":7,"texture-compression-astc-sliced-3d":8,"timestamp-query":9,"indirect-first-instance":10,"shader-f16":11,"rg11b10ufloat-renderable":12,"bgra8unorm-storage":13,"float32-filterable":14,"float32-blendable":15,"clip-distances":16,"dual-source-blending":17,subgroups:18,"texture-formats-tier1":19,"texture-formats-tier2":20,"primitive-index":21,"texture-component-swizzle":22,"chromium-experimental-unorm16-texture-formats":327692,"chromium-experimental-multi-draw-indirect":327729};function gi(e,t){t>>>=0;var n=pr(e>>>0);e=Ei(4*n.features.size);var r=0,i=0;for(let t of n.features)0<=(n=hi[t])&&((S(),E)[e+r>>>2>>>0]=n,r+=4,i++);(S(),D)[t+4>>>2>>>0]=e,(S(),D)[t>>>2>>>0]=i}function _i(e,t){return yr(pr(e>>>0).limits,t>>>0),1}function vi(e,t){pr(e>>>0).pushErrorScope(br[t])}function yi(e,t,n){t>>>=0,n>>>=0,e=pr(e>>>0),t=Array.from((S(),E).subarray(n>>>2>>>0,n+4*t>>>2>>>0),e=>pr(e)),e.submit(t)}function bi(e,t,n,r,i){n=Fe(n),r>>>=0,i>>>=0,e=pr(e>>>0),t=pr(t>>>0),r=(S(),T).subarray(r>>>0,r+i>>>0),e.writeBuffer(t,n,r,0,i)}i||function(){for(var e=t.numThreads-1;e--;)Ae();he.push(async()=>{var e=async function(){if(!i)return Promise.all(Ce.map(ke))}();ge++,await e,--ge==0&&_e&&(e=_e,_e=null,e())})}(),i||(je=new WebAssembly.Memory({initial:256,maximum:65536,shared:!0}),ce()),t.wasmBinary&&(d=t.wasmBinary),t.stackSave=()=>ia(),t.stackRestore=e=>na(e),t.stackAlloc=e=>ra(e),t.setValue=function(e,t,n=`i8`){switch(n.endsWith(`*`)&&(n=`*`),n){case`i1`:case`i8`:(S(),w)[e>>>0]=t;break;case`i16`:(S(),te)[e>>>1>>>0]=t;break;case`i32`:(S(),E)[e>>>2>>>0]=t;break;case`i64`:(S(),ae)[e>>>3>>>0]=BigInt(t);break;case`float`:(S(),re)[e>>>2>>>0]=t;break;case`double`:(S(),ie)[e>>>3>>>0]=t;break;case`*`:(S(),D)[e>>>2>>>0]=t;break;default:ue(`invalid type for setValue: ${n}`)}},t.getValue=function(e,t=`i8`){switch(t.endsWith(`*`)&&(t=`*`),t){case`i1`:case`i8`:return(S(),w)[e>>>0];case`i16`:return(S(),te)[e>>>1>>>0];case`i32`:return(S(),E)[e>>>2>>>0];case`i64`:return(S(),ae)[e>>>3>>>0];case`float`:return(S(),re)[e>>>2>>>0];case`double`:return(S(),ie)[e>>>3>>>0];case`*`:return(S(),D)[e>>>2>>>0];default:ue(`invalid type for getValue: ${t}`)}},t.UTF8ToString=tt,t.stringToUTF8=It,t.lengthBytesUTF8=Lt;var xi,Si,Ci,wi,Ti,Ei,Di,Oi,ki,Ai,ji,Mi,Ni,Pi,Fi,Ii,Li,Ri,zi,Bi,Vi,Hi,Ui,Wi,Gi,Ki,qi,Ji,Yi,Xi,Zi,Qi,$i,ea,ta,na,ra,ia,aa,oa,sa,ca,la,ua,da,fa,pa,ma,ha,ga,_a,va,ya,ba,xa,Sa,Ca,wa,Ta,Ea,Da,Oa,ka,Aa,ja,Ma,Na,Pa,Fa,Ia,La,Ra,za,Ba,Va,Ha,Ua,Wa,Ga,Ka,qa,Ja,Ya,Xa,Za=[be,xe,Ye,nt,rt,it,at,ot,st,ct,lt,ut,A,dt,ft,pt,Wn,Gn,Jn,Ur,Wr,Gr,Kr,qr,Yr],Qa={923180:(e,n,r,i,a)=>{if(t===void 0||!t.Uc)return 1;if((e=tt(Number(e>>>0))).startsWith(`./`)&&(e=e.substring(2)),!(e=t.Uc.get(e)))return 2;if(n=Number(n>>>0),r=Number(r>>>0),i=Number(i>>>0),n+r>e.byteLength)return 3;try{let o=e.subarray(n,n+r);switch(a){case 0:(S(),T).set(o,i>>>0);break;case 1:t.ad?t.ad(i,o):t.oe(i,o);break;default:return 4}return 0}catch{return 4}},924004:(e,n,r)=>{t.Sd(e,(S(),T).subarray(n>>>0,n+r>>>0))},924068:()=>t.me(),924110:e=>{t.jd(e)},924147:()=>typeof wasmOffsetConverter<`u`};function $a(e,t,n,r){var i=ia();try{return va(e,t,n,r)}catch(e){if(na(i),e!==e+0)throw e;$i(1,0)}}function eo(e,t,n){var r=ia();try{return ha(e,t,n)}catch(e){if(na(r),e!==e+0)throw e;$i(1,0)}}function to(e,t,n){var r=ia();try{la(e,t,n)}catch(e){if(na(r),e!==e+0)throw e;$i(1,0)}}function no(e,t){var n=ia();try{return ua(e,t)}catch(e){if(na(n),e!==e+0)throw e;$i(1,0)}}function ro(e){var t=ia();try{da(e)}catch(e){if(na(t),e!==e+0)throw e;$i(1,0)}}function io(e,t,n,r,i,a,o){var s=ia();try{return ma(e,t,n,r,i,a,o)}catch(e){if(na(s),e!==e+0)throw e;$i(1,0)}}function ao(e,t){var n=ia();try{ya(e,t)}catch(e){if(na(n),e!==e+0)throw e;$i(1,0)}}function oo(e,t,n,r,i,a){var o=ia();try{fa(e,t,n,r,i,a)}catch(e){if(na(o),e!==e+0)throw e;$i(1,0)}}function so(e,t,n,r){var i=ia();try{_a(e,t,n,r)}catch(e){if(na(i),e!==e+0)throw e;$i(1,0)}}function co(e,t,n,r,i,a,o){var s=ia();try{xa(e,t,n,r,i,a,o)}catch(e){if(na(s),e!==e+0)throw e;$i(1,0)}}function lo(e,t,n,r,i,a,o){var s=ia();try{Sa(e,t,n,r,i,a,o)}catch(e){if(na(s),e!==e+0)throw e;$i(1,0)}}function uo(e,t,n,r,i,a,o,s){var c=ia();try{ja(e,t,n,r,i,a,o,s)}catch(e){if(na(c),e!==e+0)throw e;$i(1,0)}}function fo(e,t,n,r,i,a,o,s,c,l,u,d){var f=ia();try{Ca(e,t,n,r,i,a,o,s,c,l,u,d)}catch(e){if(na(f),e!==e+0)throw e;$i(1,0)}}function po(e,t,n,r,i){var a=ia();try{return ba(e,t,n,r,i)}catch(e){if(na(a),e!==e+0)throw e;$i(1,0)}}function mo(e,t,n,r,i){var a=ia();try{pa(e,t,n,r,i)}catch(e){if(na(a),e!==e+0)throw e;$i(1,0)}}function ho(e,t,n,r,i,a,o,s){var c=ia();try{ga(e,t,n,r,i,a,o,s)}catch(e){if(na(c),e!==e+0)throw e;$i(1,0)}}function go(e){var t=ia();try{return Ma(e)}catch(e){if(na(t),e!==e+0)throw e;$i(1,0)}}function _o(e,t,n){var r=ia();try{return Na(e,t,n)}catch(e){if(na(r),e!==e+0)throw e;$i(1,0)}}function vo(e,t){var n=ia();try{return Ga(e,t)}catch(e){if(na(n),e!==e+0)throw e;return $i(1,0),0n}}function yo(e,t,n,r,i){var a=ia();try{Pa(e,t,n,r,i)}catch(e){if(na(a),e!==e+0)throw e;$i(1,0)}}function bo(e){var t=ia();try{return wa(e)}catch(e){if(na(t),e!==e+0)throw e;return $i(1,0),0n}}function xo(e,t,n,r,i,a){var o=ia();try{return ka(e,t,n,r,i,a)}catch(e){if(na(o),e!==e+0)throw e;$i(1,0)}}function So(e,t,n,r,i,a){var o=ia();try{return Fa(e,t,n,r,i,a)}catch(e){if(na(o),e!==e+0)throw e;$i(1,0)}}function Co(e,t,n,r,i,a){var o=ia();try{return Ia(e,t,n,r,i,a)}catch(e){if(na(o),e!==e+0)throw e;$i(1,0)}}function wo(e,t,n,r,i,a,o,s){var c=ia();try{return Aa(e,t,n,r,i,a,o,s)}catch(e){if(na(c),e!==e+0)throw e;$i(1,0)}}function To(e,t,n,r,i){var a=ia();try{return La(e,t,n,r,i)}catch(e){if(na(a),e!==e+0)throw e;return $i(1,0),0n}}function Eo(e,t,n,r){var i=ia();try{return Ra(e,t,n,r)}catch(e){if(na(i),e!==e+0)throw e;$i(1,0)}}function Do(e,t,n,r){var i=ia();try{return za(e,t,n,r)}catch(e){if(na(i),e!==e+0)throw e;$i(1,0)}}function Oo(e,t,n,r,i,a,o,s,c,l,u,d){var f=ia();try{return Ba(e,t,n,r,i,a,o,s,c,l,u,d)}catch(e){if(na(f),e!==e+0)throw e;$i(1,0)}}function ko(e,t,n,r,i,a,o,s,c,l,u){var d=ia();try{Va(e,t,n,r,i,a,o,s,c,l,u)}catch(e){if(na(d),e!==e+0)throw e;$i(1,0)}}function Ao(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){var g=ia();try{Ha(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h)}catch(e){if(na(g),e!==e+0)throw e;$i(1,0)}}function jo(e,t,n,r){var i=ia();try{return Ua(e,t,n,r)}catch(e){if(na(i),e!==e+0)throw e;$i(1,0)}}function Mo(e,t,n,r,i){var a=ia();try{return Wa(e,t,n,r,i)}catch(e){if(na(a),e!==e+0)throw e;$i(1,0)}}function No(e,t,n){var r=ia();try{return Ea(e,t,n)}catch(e){if(na(r),e!==e+0)throw e;return $i(1,0),0n}}function Po(e,t,n){var r=ia();try{return Ta(e,t,n)}catch(e){if(na(r),e!==e+0)throw e;$i(1,0)}}function Fo(e,t,n){var r=ia();try{return Da(e,t,n)}catch(e){if(na(r),e!==e+0)throw e;$i(1,0)}}function Io(e,t,n,r){var i=ia();try{Oa(e,t,n,r)}catch(e){if(na(i),e!==e+0)throw e;$i(1,0)}}function Lo(){if(0{let n=new WeakMap,r,i,a=1;t.webgpuRegisterDevice=e=>{if(i!==void 0)throw Error(`another WebGPU EP inference session is being created.`);if(e){var t=n.get(e);if(!t){let r=((e,t=0)=>{var n=Li(t);return t=Ii(t,n),cr[n>>>0]=e.queue,cr[t>>>0]=e,t})(e,t=Oi(0));t=[a++,t,r],n.set(e,t)}return r=e,i=t[0],t}r=void 0,i=0};let o=new Map;t.webgpuOnCreateSession=t=>{if(i!==void 0){var n=i;if(i=void 0,t){let i=Ci(n);o.set(t,i),n===0&&e(r??pr(i))}r=void 0}},t.webgpuOnReleaseSession=e=>{o.delete(e)};let s=Symbol(`gpuBufferMetadata`);t.webgpuRegisterBuffer=(e,t,n)=>{if(n)return e[s]=[n,NaN],n;if(n=e[s])return n[1]++,n[0];if((t=o.get(t))===void 0)throw Error(`Invalid session handle passed to webgpuRegisterBuffer`);return t=((e,t=0)=>(e.mapState===`unmapped`||ue(),t=Fi(t),cr[t>>>0]=e,t))(e,t),e[s]=[t,1],t},t.webgpuUnregisterBuffer=e=>{let t=e[s];if(!t)throw Error(`Buffer is not registered`);t[1]--,t[1]===0&&(Di(t[0]),delete e[s])},t.webgpuGetBuffer=e=>pr(e),t.webgpuCreateDownloader=(e,t,n)=>{if((n=o.get(n))===void 0)throw Error(`Invalid session handle passed to webgpuRegisterBuffer`);let r=pr(n),i=16*Math.ceil(Number(t)/16);return async()=>{let n=r.createBuffer({size:i,usage:9});try{let a=r.createCommandEncoder();return a.copyBufferToBuffer(e,0,n,0,i),r.queue.submit([a.finish()]),await n.mapAsync(GPUMapMode.READ),n.getMappedRange().slice(0,t)}finally{n.destroy()}}},t.ad=(e,t)=>{var n=t.buffer;let a=t.byteOffset,o=t.byteLength;if(t=16*Math.ceil(Number(o)/16),e=pr(e),!r){var s=Ci(i);r=pr(s)}let c=(s=r.createBuffer({mappedAtCreation:!0,size:t,usage:6})).getMappedRange();new Uint8Array(c).set(new Uint8Array(n,a,o)),s.unmap(),(n=r.createCommandEncoder()).copyBufferToBuffer(s,0,e,0,t),r.queue.submit([n.finish()]),s.destroy()}},t.webnnInit=e=>{let n=e[0];[t.me,t.jd,t.webnnEnsureTensor,t.Sd,t.webnnDownloadTensor,t.le,t.webnnEnableTraceEvent]=e.slice(1),t.webnnReleaseTensorId=t.jd,t.webnnUploadTensor=t.Sd,t.webnnRegisterMLContext=t.le,t.webnnOnRunStart=e=>n.onRunStart(e),t.webnnOnRunEnd=n.onRunEnd.bind(n),t.webnnOnReleaseSession=e=>{n.onReleaseSession(e)},t.webnnCreateMLTensorDownloader=(e,t)=>n.createMLTensorDownloader(e,t),t.webnnRegisterMLTensor=(e,t,r,i)=>n.registerMLTensor(e,t,r,i),t.webnnCreateMLContext=e=>n.createMLContext(e),t.webnnRegisterMLConstant=(e,r,i,a,o,s)=>n.registerMLConstant(e,r,i,a,o,t.Uc,s),t.webnnRegisterGraphInput=n.registerGraphInput.bind(n),t.webnnIsGraphInput=n.isGraphInput.bind(n),t.webnnRegisterGraphOutput=n.registerGraphOutput.bind(n),t.webnnIsGraphOutput=n.isGraphOutput.bind(n),t.webnnCreateTemporaryTensor=n.createTemporaryTensor.bind(n),t.webnnIsGraphInputOutputTypeSupported=n.isGraphInputOutputTypeSupported.bind(n)},se?t:new Promise((e,t)=>{m=e,h=t})}var rj,ij,aj=Kk(()=>{rj=nj,ij=globalThis.self?.name?.startsWith(`em-pthread`),ij&&nj()}),oj,sj,cj,lj,uj,dj,fj,pj,mj,hj,gj,_j,vj,yj,bj=Kk(()=>{YA(),oj=typeof location>`u`?void 0:location.origin,sj=import.meta.url>`file:`&&import.meta.url<`file;`,cj=()=>{if(sj){let e=URL;return new URL(new e(`ort.webgpu.bundle.min.mjs`,import.meta.url).href,oj).href}return import.meta.url},lj=cj(),uj=()=>{if(lj&&!lj.startsWith(`blob:`))return lj.substring(0,lj.lastIndexOf(`/`)+1)},dj=(e,t)=>{try{let n=t??lj;return(n?new URL(e,n):new URL(e)).origin===oj}catch{return!1}},fj=(e,t)=>{let n=t??lj;try{return(n?new URL(e,n):new URL(e)).href}catch{return}},pj=(e,t)=>`${t??`./`}${e}`,mj=async e=>{let t=await(await fetch(e,{credentials:`same-origin`})).blob();return URL.createObjectURL(t)},hj=async e=>(await Eb(async()=>{let{default:t}=await import(e);return{default:t}},[])).default,gj=(ej(),Yk(XA)).default,_j=async()=>{if(!lj)throw Error(`Failed to load proxy worker: cannot determine the script source URL.`);if(dj(lj))return[void 0,gj()];let e=await mj(lj);return[e,gj(e)]},vj=(aj(),Yk(tj)).default,yj=async(e,t,n,r)=>{let i=vj&&!(e||t);if(i)if(lj)i=dj(lj)||r&&!n;else if(r&&!n)i=!0;else throw Error(`cannot determine the script source URL.`);if(i)return[void 0,vj];{let r=`ort-wasm-simd-threaded.asyncify.mjs`,i=e??fj(r,t),a=n&&i&&!dj(i,t),o=a?await mj(i):i??pj(r,t);return[a?o:void 0,await hj(o)]}}}),xj,Sj,Cj,wj,Tj,Ej,Dj,Oj,kj,Aj=Kk(()=>{bj(),Sj=!1,Cj=!1,wj=!1,Tj=()=>{if(typeof SharedArrayBuffer>`u`)return!1;try{return typeof MessageChannel<`u`&&new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]))}catch{return!1}},Ej=()=>{try{return WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,30,1,28,0,65,0,253,15,253,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,253,186,1,26,11]))}catch{return!1}},Dj=()=>{try{return WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,19,1,17,0,65,1,253,15,65,2,253,15,65,3,253,15,253,147,2,11]))}catch{return!1}},Oj=async e=>{if(Sj)return Promise.resolve();if(Cj)throw Error(`multiple calls to 'initializeWebAssembly()' detected.`);if(wj)throw Error(`previous call to 'initializeWebAssembly()' failed.`);Cj=!0;let t=e.initTimeout,n=e.numThreads;if(e.simd!==!1){if(e.simd===`relaxed`){if(!Dj())throw Error(`Relaxed WebAssembly SIMD is not supported in the current environment.`)}else if(!Ej())throw Error(`WebAssembly SIMD is not supported in the current environment.`)}let r=Tj();n>1&&!r&&(typeof self<`u`&&!self.crossOriginIsolated&&console.warn(`env.wasm.numThreads is set to `+n+`, but this will not work unless you enable crossOriginIsolated mode. See https://web.dev/cross-origin-isolation-guide/ for more info.`),console.warn(`WebAssembly multi-threading is not supported in the current environment. Falling back to single-threading.`),e.numThreads=n=1);let i=e.wasmPaths,a=typeof i==`string`?i:void 0,o=i?.mjs,s=o?.href??o,c=i?.wasm,l=c?.href??c,u=e.wasmBinary,[d,f]=await yj(s,a,n>1,!!u||!!l),p=!1,m=[];if(t>0&&m.push(new Promise(e=>{setTimeout(()=>{p=!0,e()},t)})),m.push(new Promise((e,t)=>{let r={numThreads:n};if(u)r.wasmBinary=u,r.locateFile=e=>e;else if(l||a)r.locateFile=e=>l??a+e;else if(s&&s.indexOf(`blob:`)!==0)r.locateFile=e=>new URL(e,s).href;else if(d){let e=uj();e&&(r.locateFile=t=>e+t)}f(r).then(t=>{Cj=!1,Sj=!0,xj=t,e(),d&&URL.revokeObjectURL(d)},e=>{Cj=!1,wj=!0,t(e)})})),await Promise.race(m),p)throw Error(`WebAssembly backend initializing failed due to timeout: ${t}ms`)},kj=()=>{if(Sj&&xj)return xj;throw Error(`WebAssembly is not initialized yet.`)}}),jj,Mj,Nj,Pj=Kk(()=>{Aj(),jj=(e,t)=>{let n=kj(),r=n.lengthBytesUTF8(e)+1,i=n._malloc(r);return n.stringToUTF8(e,i,r),t.push(i),i},Mj=(e,t,n,r)=>{if(typeof e==`object`&&e){if(n.has(e))throw Error(`Circular reference in options`);n.add(e)}Object.entries(e).forEach(([e,i])=>{let a=t?t+e:e;if(typeof i==`object`)Mj(i,a+`.`,n,r);else if(typeof i==`string`||typeof i==`number`)r(a,i.toString());else if(typeof i==`boolean`)r(a,i?`1`:`0`);else throw Error(`Can't handle extra config type: ${typeof i}`)})},Nj=e=>{let t=kj(),n=t.stackSave();try{let n=t.PTR_SIZE,r=t.stackAlloc(2*n);t._OrtGetLastError(r,r+n);let i=Number(t.getValue(r,n===4?`i32`:`i64`)),a=t.getValue(r+n,`*`),o=a?t.UTF8ToString(a):``;throw Error(`${e} ERROR_CODE: ${i}, ERROR_MESSAGE: ${o}`)}finally{t.stackRestore(n)}}}),Fj,Ij=Kk(()=>{Aj(),Pj(),Fj=e=>{let t=kj(),n=0,r=[],i=e||{};try{if(e?.logSeverityLevel===void 0)i.logSeverityLevel=2;else if(typeof e.logSeverityLevel!=`number`||!Number.isInteger(e.logSeverityLevel)||e.logSeverityLevel<0||e.logSeverityLevel>4)throw Error(`log severity level is not valid: ${e.logSeverityLevel}`);if(e?.logVerbosityLevel===void 0)i.logVerbosityLevel=0;else if(typeof e.logVerbosityLevel!=`number`||!Number.isInteger(e.logVerbosityLevel))throw Error(`log verbosity level is not valid: ${e.logVerbosityLevel}`);e?.terminate===void 0&&(i.terminate=!1);let a=0;return e?.tag!==void 0&&(a=jj(e.tag,r)),n=t._OrtCreateRunOptions(i.logSeverityLevel,i.logVerbosityLevel,!!i.terminate,a),n===0&&Nj(`Can't create run options.`),e?.extra!==void 0&&Mj(e.extra,``,new WeakSet,(e,i)=>{let a=jj(e,r),o=jj(i,r);t._OrtAddRunConfigEntry(n,a,o)!==0&&Nj(`Can't set a run config entry: ${e} - ${i}.`)}),[n,r]}catch(e){throw n!==0&&t._OrtReleaseRunOptions(n),r.forEach(e=>t._free(e)),e}}}),Lj,Rj,zj,Bj,Vj,Hj,Uj,Wj=Kk(()=>{Aj(),Pj(),Lj=e=>{switch(e){case`disabled`:return 0;case`basic`:return 1;case`extended`:return 2;case`layout`:return 3;case`all`:return 99;default:throw Error(`unsupported graph optimization level: ${e}`)}},Rj=e=>{switch(e){case`sequential`:return 0;case`parallel`:return 1;default:throw Error(`unsupported execution mode: ${e}`)}},zj=e=>{e.extra||={},e.extra.session||(e.extra.session={});let t=e.extra.session;t.use_ort_model_bytes_directly||=`1`,e.executionProviders&&e.executionProviders.some(e=>(typeof e==`string`?e:e.name)===`webgpu`)&&(e.enableMemPattern=!1)},Bj=(e,t,n,r)=>{let i=jj(t,r),a=jj(n,r);kj()._OrtAddSessionConfigEntry(e,i,a)!==0&&Nj(`Can't set a session config entry: ${t} - ${n}.`)},Vj=(e,t,n,r)=>{let i=jj(t,r),a=jj(n,r);e.push([i,a])},Hj=async(e,t,n)=>{let r=t.executionProviders;for(let i of r){let r=typeof i==`string`?i:i.name,a=[];switch(r){case`webnn`:if(r=`WEBNN`,typeof i!=`string`){let t=i?.deviceType;t&&Bj(e,`deviceType`,t,n)}break;case`webgpu`:{r=`WebGPU`;let e;if(typeof i!=`string`){let r=i;if(r.device)if(typeof GPUDevice<`u`&&r.device instanceof GPUDevice)e=r.device;else throw Error(`Invalid GPU device set in WebGPU EP options.`);let{enableGraphCapture:o}=t;if(typeof o==`boolean`&&o&&Vj(a,`enableGraphCapture`,`1`,n),typeof r.preferredLayout==`string`&&Vj(a,`preferredLayout`,r.preferredLayout,n),r.forceCpuNodeNames){let e=Array.isArray(r.forceCpuNodeNames)?r.forceCpuNodeNames:[r.forceCpuNodeNames];Vj(a,`forceCpuNodeNames`,e.join(` +`),n)}r.validationMode&&Vj(a,`validationMode`,r.validationMode,n)}let o=kj().webgpuRegisterDevice(e);if(o){let[e,t,r]=o;Vj(a,`deviceId`,e.toString(),n),Vj(a,`webgpuInstance`,t.toString(),n),Vj(a,`webgpuDevice`,r.toString(),n)}}break;case`wasm`:case`cpu`:continue;default:throw Error(`not supported execution provider: ${r}`)}let o=jj(r,n),s=a.length,c=0,l=0;if(s>0){c=kj()._malloc(s*kj().PTR_SIZE),n.push(c),l=kj()._malloc(s*kj().PTR_SIZE),n.push(l);for(let e=0;e{let t=kj(),n=0,r=[],i=e||{};zj(i);try{let e=Lj(i.graphOptimizationLevel??`all`),a=Rj(i.executionMode??`sequential`),o=typeof i.logId==`string`?jj(i.logId,r):0,s=i.logSeverityLevel??2;if(!Number.isInteger(s)||s<0||s>4)throw Error(`log severity level is not valid: ${s}`);let c=i.logVerbosityLevel??0;if(!Number.isInteger(c)||c<0||c>4)throw Error(`log verbosity level is not valid: ${c}`);let l=typeof i.optimizedModelFilePath==`string`?jj(i.optimizedModelFilePath,r):0;if(n=t._OrtCreateSessionOptions(e,!!i.enableCpuMemArena,!!i.enableMemPattern,a,!!i.enableProfiling,0,o,s,c,l),n===0&&Nj(`Can't create session options.`),i.executionProviders&&await Hj(n,i,r),i.enableGraphCapture!==void 0){if(typeof i.enableGraphCapture!=`boolean`)throw Error(`enableGraphCapture must be a boolean value: ${i.enableGraphCapture}`);Bj(n,`enableGraphCapture`,i.enableGraphCapture.toString(),r)}if(i.freeDimensionOverrides)for(let[e,a]of Object.entries(i.freeDimensionOverrides)){if(typeof e!=`string`)throw Error(`free dimension override name must be a string: ${e}`);if(typeof a!=`number`||!Number.isInteger(a)||a<0)throw Error(`free dimension override value must be a non-negative integer: ${a}`);let i=jj(e,r);t._OrtAddFreeDimensionOverride(n,i,a)!==0&&Nj(`Can't set a free dimension override: ${e} - ${a}.`)}return i.extra!==void 0&&Mj(i.extra,``,new WeakSet,(e,t)=>{Bj(n,e,t,r)}),[n,r]}catch(e){throw n!==0&&t._OrtReleaseSessionOptions(n)!==0&&Nj(`Can't release session options.`),r.forEach(e=>t._free(e)),e}}}),Gj,Kj,qj,Jj,Yj,Xj,Zj,Qj,$j=Kk(()=>{Gj=e=>{switch(e){case`int8`:return 3;case`uint8`:return 2;case`bool`:return 9;case`int16`:return 5;case`uint16`:return 4;case`int32`:return 6;case`uint32`:return 12;case`float16`:return 10;case`float32`:return 1;case`float64`:return 11;case`string`:return 8;case`int64`:return 7;case`uint64`:return 13;case`int4`:return 22;case`uint4`:return 21;default:throw Error(`unsupported data type: ${e}`)}},Kj=e=>{switch(e){case 3:return`int8`;case 2:return`uint8`;case 9:return`bool`;case 5:return`int16`;case 4:return`uint16`;case 6:return`int32`;case 12:return`uint32`;case 10:return`float16`;case 1:return`float32`;case 11:return`float64`;case 8:return`string`;case 7:return`int64`;case 13:return`uint64`;case 22:return`int4`;case 21:return`uint4`;default:throw Error(`unsupported data type: ${e}`)}},qj=(e,t)=>{let n=[-1,4,1,1,2,2,4,8,-1,1,2,8,4,8,-1,-1,-1,-1,-1,-1,-1,.5,.5][e],r=typeof t==`number`?t:t.reduce((e,t)=>e*t,1);return n>0?Math.ceil(r*n):void 0},Jj=e=>{switch(e){case`float16`:return typeof Float16Array<`u`&&Float16Array.from?Float16Array:Uint16Array;case`float32`:return Float32Array;case`uint8`:return Uint8Array;case`int8`:return Int8Array;case`uint16`:return Uint16Array;case`int16`:return Int16Array;case`int32`:return Int32Array;case`bool`:return Uint8Array;case`float64`:return Float64Array;case`uint32`:return Uint32Array;case`int64`:return BigInt64Array;case`uint64`:return BigUint64Array;default:throw Error(`unsupported type: ${e}`)}},Yj=e=>{switch(e){case`verbose`:return 0;case`info`:return 1;case`warning`:return 2;case`error`:return 3;case`fatal`:return 4;default:throw Error(`unsupported logging level: ${e}`)}},Xj=e=>e===`float32`||e===`float16`||e===`int32`||e===`int64`||e===`uint32`||e===`uint8`||e===`bool`||e===`uint4`||e===`int4`,Zj=e=>e===`float32`||e===`float16`||e===`int32`||e===`int64`||e===`uint32`||e===`uint64`||e===`int8`||e===`uint8`||e===`bool`||e===`uint4`||e===`int4`,Qj=e=>{switch(e){case`none`:return 0;case`cpu`:return 1;case`cpu-pinned`:return 2;case`texture`:return 3;case`gpu-buffer`:return 4;case`ml-tensor`:return 5;default:throw Error(`unsupported data location: ${e}`)}}}),eM,tM=Kk(()=>{YA(),eM=async e=>{if(typeof e==`string`){let t=await fetch(e);if(!t.ok)throw Error(`failed to load external data file: ${e}`);let n=t.headers.get(`Content-Length`),r=n?parseInt(n,10):0;if(r<1073741824)return new Uint8Array(await t.arrayBuffer());{if(!t.body)throw Error(`failed to load external data file: ${e}, no response body.`);let n=t.body.getReader(),i;try{i=new ArrayBuffer(r)}catch(e){if(e instanceof RangeError){let e=Math.ceil(r/65536);i=new WebAssembly.Memory({initial:e,maximum:e}).buffer}else throw e}let a=0;for(;;){let{done:e,value:t}=await n.read();if(e)break;let r=t.byteLength;new Uint8Array(i,a,r).set(t),a+=r}return new Uint8Array(i,0,r)}}else return e instanceof Blob?new Uint8Array(await e.arrayBuffer()):e instanceof Uint8Array?e:new Uint8Array(e)}}),nM,rM=Kk(()=>{$j(),nM=(e,t)=>new(Jj(t))(e)}),iM,aM,oM,sM,cM,lM,uM,dM=Kk(()=>{$j(),iM=[`V`,`I`,`W`,`E`,`F`],aM=(e,t)=>{console.log(`[${iM[e]},${new Date().toISOString()}]${t}`)},cM=(e,t)=>{oM=e,sM=t},lM=(e,t)=>{let n=Yj(e);n>=Yj(oM)&&aM(n,typeof t==`function`?t():t)},uM=(...e)=>{sM&&lM(...e)}}),fM,pM,mM,hM,gM,_M,vM,yM,bM,xM,SM,CM=Kk(()=>{$j(),dM(),fM=new Map([[`float32`,32],[`float16`,16],[`int32`,32],[`uint32`,32],[`int64`,64],[`uint64`,64],[`int8`,8],[`uint8`,8],[`int4`,4],[`uint4`,4]]),pM=(e,t)=>{if(t===`int32`)return e;let n=fM.get(t);if(!n)throw Error(`WebNN backend does not support data type: ${t}`);let r=n/8;if(e.byteLength%r!==0)throw Error(`Invalid Uint8Array length - must be a multiple of ${r}.`);let i=e.byteLength/r,a=new(Jj(t))(e.buffer,e.byteOffset,i);switch(t){case`int64`:case`uint64`:{let e=new Int32Array(i);for(let t=0;t2147483647n||n<-2147483648n)throw Error(`Can not convert int64 data to int32 - value out of range.`);e[t]=Number(n)}return new Uint8Array(e.buffer)}case`int8`:case`uint8`:case`uint32`:{if(t===`uint32`&&a.some(e=>e>2147483647))throw Error(`Can not convert uint32 data to int32 - value out of range.`);let e=Int32Array.from(a,Number);return new Uint8Array(e.buffer)}default:throw Error(`Unsupported data conversion from ${t} to 'int32'`)}},mM=(e,t)=>{if(t===`int32`)return e;if(e.byteLength%4!=0)throw Error(`Invalid Uint8Array length - must be a multiple of 4 (int32).`);let n=e.byteLength/4,r=new Int32Array(e.buffer,e.byteOffset,n);switch(t){case`int64`:{let e=BigInt64Array.from(r,BigInt);return new Uint8Array(e.buffer)}case`uint64`:{if(r.some(e=>e<0))throw Error(`Can not convert int32 data to uin64 - negative value found.`);let e=BigUint64Array.from(r,BigInt);return new Uint8Array(e.buffer)}case`int8`:{if(r.some(e=>e<-128||e>127))throw Error(`Can not convert int32 data to int8 - value out of range.`);let e=Int8Array.from(r,Number);return new Uint8Array(e.buffer)}case`uint8`:if(r.some(e=>e<0||e>255))throw Error(`Can not convert int32 data to uint8 - value out of range.`);return Uint8Array.from(r,Number);case`uint32`:{if(r.some(e=>e<0))throw Error(`Can not convert int32 data to uint32 - negative value found.`);let e=Uint32Array.from(r,Number);return new Uint8Array(e.buffer)}default:throw Error(`Unsupported data conversion from 'int32' to ${t}`)}},hM=1,gM=()=>hM++,_M=new Map([[`int8`,`int32`],[`uint8`,`int32`],[`uint32`,`int32`],[`int64`,`int32`]]),vM=(e,t)=>{let n=fM.get(e);if(!n)throw Error(`WebNN backend does not support data type: ${e}`);return t.length>0?Math.ceil(t.reduce((e,t)=>e*t)*n/8):0},yM=class{constructor(e){this.isDataConverted=!1;let{sessionId:t,context:n,tensor:r,dataType:i,shape:a,fallbackDataType:o}=e;this.sessionId=t,this.mlContext=n,this.mlTensor=r,this.dataType=i,this.tensorShape=a,this.fallbackDataType=o}get tensor(){return this.mlTensor}get type(){return this.dataType}get fallbackType(){return this.fallbackDataType}get shape(){return this.tensorShape}get byteLength(){return vM(this.dataType,this.tensorShape)}destroy(){uM(`verbose`,()=>`[WebNN] TensorWrapper.destroy`),this.mlTensor.destroy()}write(e){this.mlContext.writeTensor(this.mlTensor,e)}async read(e){if(this.fallbackDataType){let t=await this.mlContext.readTensor(this.mlTensor),n=mM(new Uint8Array(t),this.dataType);if(e){(e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)).set(n);return}else return n.buffer}else return e?this.mlContext.readTensor(this.mlTensor,e):this.mlContext.readTensor(this.mlTensor)}canReuseTensor(e,t,n){return this.mlContext===e&&this.dataType===t&&this.tensorShape.length===n.length&&this.tensorShape.every((e,t)=>e===n[t])}setIsDataConverted(e){this.isDataConverted=e}},bM=class{constructor(e,t){this.tensorManager=e,this.wrapper=t}get tensorWrapper(){return this.wrapper}releaseTensor(){this.tensorWrapper&&(this.tensorManager.releaseTensor(this.tensorWrapper),this.wrapper=void 0)}async ensureTensor(e,t,n,r){let i=this.tensorManager.getMLContext(e),a=this.tensorManager.getMLOpSupportLimits(e),o;if(!a?.input.dataTypes.includes(t)){if(o=_M.get(t),!o||a?.input.dataTypes.includes(o))throw Error(`WebNN backend does not support data type: ${t}`);uM(`verbose`,()=>`[WebNN] TensorIdTracker.ensureTensor: fallback dataType from ${t} to ${o}`)}if(this.wrapper){if(this.wrapper.canReuseTensor(i,t,n))return this.wrapper.tensor;if(r){if(this.wrapper.byteLength!==vM(t,n))throw Error(`Unable to copy data to tensor with different size.`);this.activeUpload=new Uint8Array(await this.wrapper.read())}this.tensorManager.releaseTensor(this.wrapper)}let s=typeof MLTensorUsage>`u`?void 0:MLTensorUsage.READ|MLTensorUsage.WRITE;return this.wrapper=await this.tensorManager.getCachedTensor(e,t,n,s,!0,!0,o),r&&this.activeUpload&&(this.wrapper.write(this.activeUpload),this.activeUpload=void 0),this.wrapper.tensor}upload(e){let t=e;if(this.wrapper){if(this.wrapper.fallbackType)if(this.wrapper.fallbackType===`int32`)t=pM(e,this.wrapper.type),this.wrapper.setIsDataConverted(!0);else throw Error(`Unsupported fallback data type: ${this.wrapper.fallbackType}`);if(e.byteLength===this.wrapper.byteLength){this.wrapper.write(t);return}else uM(`verbose`,()=>`Data size does not match tensor size. Releasing tensor.`),this.releaseTensor()}this.activeUpload?this.activeUpload.set(t):this.activeUpload=new Uint8Array(t)}async download(e){if(this.activeUpload){let t=this.wrapper?.isDataConverted?mM(this.activeUpload,this.wrapper?.type):this.activeUpload;if(e){e instanceof ArrayBuffer?new Uint8Array(e).set(t):new Uint8Array(e.buffer,e.byteOffset,e.byteLength).set(t);return}else return t.buffer}if(!this.wrapper)throw Error(`Tensor has not been created.`);return e?this.wrapper.read(e):this.wrapper.read()}},xM=class{constructor(e){this.backend=e,this.tensorTrackersById=new Map,this.freeTensors=[],this.externalTensors=new Set}getMLContext(e){let t=this.backend.getMLContext(e);if(!t)throw Error(`MLContext not found for session.`);return t}getMLOpSupportLimits(e){return this.backend.getMLOpSupportLimits(e)}reserveTensorId(){let e=gM();return this.tensorTrackersById.set(e,new bM(this)),e}releaseTensorId(e){let t=this.tensorTrackersById.get(e);t&&(this.tensorTrackersById.delete(e),t.tensorWrapper&&this.releaseTensor(t.tensorWrapper))}async ensureTensor(e,t,n,r,i){uM(`verbose`,()=>`[WebNN] TensorManager.ensureTensor {tensorId: ${t}, dataType: ${n}, shape: ${r}, copyOld: ${i}}`);let a=this.tensorTrackersById.get(t);if(!a)throw Error(`Tensor not found.`);return a.ensureTensor(e,n,r,i)}upload(e,t){let n=this.tensorTrackersById.get(e);if(!n)throw Error(`Tensor not found.`);n.upload(t)}async download(e,t){uM(`verbose`,()=>`[WebNN] TensorManager.download {tensorId: ${e}, dstBuffer: ${t?.byteLength}}`);let n=this.tensorTrackersById.get(e);if(!n)throw Error(`Tensor not found.`);return n.download(t)}releaseTensorsForSession(e){for(let t of this.freeTensors)t.sessionId===e&&t.destroy();this.freeTensors=this.freeTensors.filter(t=>t.sessionId!==e)}registerTensor(e,t,n,r){let i=this.getMLContext(e),a=gM(),o=new yM({sessionId:e,context:i,tensor:t,dataType:n,shape:r});return this.tensorTrackersById.set(a,new bM(this,o)),this.externalTensors.add(o),a}async getCachedTensor(e,t,n,r,i,a,o){let s=this.getMLContext(e);for(let[r,i]of this.freeTensors.entries())if(i.canReuseTensor(s,t,n)){uM(`verbose`,()=>`[WebNN] Reusing tensor {dataType: ${t}, ${o?`fallbackDataType: ${o},`:``} shape: ${n}`);let i=this.freeTensors.splice(r,1)[0];return i.sessionId=e,i}uM(`verbose`,()=>`[WebNN] MLContext.createTensor {dataType: ${t}, ${o?`fallbackDataType: ${o},`:``} shape: ${n}}`);let c=await s.createTensor({dataType:o??t,shape:n,dimensions:n,usage:r,writable:i,readable:a});return new yM({sessionId:e,context:s,tensor:c,dataType:t,shape:n,fallbackDataType:o})}releaseTensor(e){this.externalTensors.has(e)&&this.externalTensors.delete(e),this.freeTensors.push(e)}},SM=(...e)=>new xM(...e)}),wM={};qk(wM,{WebNNBackend:()=>DM});var TM,EM,DM,OM=Kk(()=>{$j(),Aj(),rM(),CM(),dM(),TM=new Map([[1,`float32`],[10,`float16`],[6,`int32`],[12,`uint32`],[7,`int64`],[13,`uint64`],[22,`int4`],[21,`uint4`],[3,`int8`],[2,`uint8`],[9,`uint8`]]),EM=(e,t)=>{if(e===t)return!0;if(e===void 0||t===void 0)return!1;let n=Object.keys(e).sort(),r=Object.keys(t).sort();return n.length===r.length&&n.every((n,i)=>n===r[i]&&e[n]===t[n])},DM=class{constructor(e){this.tensorManager=SM(this),this.mlContextBySessionId=new Map,this.sessionIdsByMLContext=new Map,this.mlContextCache=[],this.sessionGraphInputs=new Map,this.sessionGraphOutputs=new Map,this.temporaryGraphInputs=[],this.temporaryGraphOutputs=[],this.temporarySessionTensorIds=new Map,this.mlOpSupportLimitsBySessionId=new Map,cM(e.logLevel,!!e.debug)}get currentSessionId(){if(this.activeSessionId===void 0)throw Error(`No active session`);return this.activeSessionId}onRunStart(e){uM(`verbose`,()=>`[WebNN] onRunStart {sessionId: ${e}}`),this.activeSessionId=e}onRunEnd(e){uM(`verbose`,()=>`[WebNN] onRunEnd {sessionId: ${e}}`);let t=this.temporarySessionTensorIds.get(e);if(t){for(let e of t)uM(`verbose`,()=>`[WebNN] releasing temporary tensor {tensorId: ${e}}`),this.tensorManager.releaseTensorId(e);this.temporarySessionTensorIds.delete(e),this.activeSessionId=void 0}}async createMLContext(e){if(e instanceof GPUDevice){let t=this.mlContextCache.findIndex(t=>t.gpuDevice===e);if(t!==-1)return this.mlContextCache[t].mlContext;{let t=await navigator.ml.createContext(e);return this.mlContextCache.push({gpuDevice:e,mlContext:t}),t}}else if(e===void 0){let e=this.mlContextCache.findIndex(e=>e.options===void 0&&e.gpuDevice===void 0);if(e!==-1)return this.mlContextCache[e].mlContext;{let e=await navigator.ml.createContext();return this.mlContextCache.push({mlContext:e}),e}}let t=this.mlContextCache.findIndex(t=>EM(t.options,e));if(t!==-1)return this.mlContextCache[t].mlContext;{let t=await navigator.ml.createContext(e);return this.mlContextCache.push({options:e,mlContext:t}),t}}registerMLContext(e,t){this.mlContextBySessionId.set(e,t);let n=this.sessionIdsByMLContext.get(t);n||(n=new Set,this.sessionIdsByMLContext.set(t,n)),n.add(e),this.mlOpSupportLimitsBySessionId.has(e)||this.mlOpSupportLimitsBySessionId.set(e,t.opSupportLimits()),this.temporaryGraphInputs.length>0&&(this.sessionGraphInputs.set(e,this.temporaryGraphInputs),this.temporaryGraphInputs=[]),this.temporaryGraphOutputs.length>0&&(this.sessionGraphOutputs.set(e,this.temporaryGraphOutputs),this.temporaryGraphOutputs=[])}onReleaseSession(e){this.sessionGraphInputs.delete(e),this.sessionGraphOutputs.delete(e);let t=this.mlContextBySessionId.get(e);if(!t)return;this.tensorManager.releaseTensorsForSession(e),this.mlContextBySessionId.delete(e),this.mlOpSupportLimitsBySessionId.delete(e);let n=this.sessionIdsByMLContext.get(t);if(n.delete(e),n.size===0){this.sessionIdsByMLContext.delete(t);let e=this.mlContextCache.findIndex(e=>e.mlContext===t);e!==-1&&this.mlContextCache.splice(e,1)}}getMLContext(e){return this.mlContextBySessionId.get(e)}getMLOpSupportLimits(e){return this.mlOpSupportLimitsBySessionId.get(e)}reserveTensorId(){return this.tensorManager.reserveTensorId()}releaseTensorId(e){uM(`verbose`,()=>`[WebNN] releaseTensorId {tensorId: ${e}}`),this.tensorManager.releaseTensorId(e)}async ensureTensor(e,t,n,r,i){let a=TM.get(n);if(!a)throw Error(`Unsupported ONNX data type: ${n}`);return this.tensorManager.ensureTensor(e??this.currentSessionId,t,a,r,i)}async createTemporaryTensor(e,t,n){uM(`verbose`,()=>`[WebNN] createTemporaryTensor {onnxDataType: ${t}, shape: ${n}}`);let r=TM.get(t);if(!r)throw Error(`Unsupported ONNX data type: ${t}`);let i=this.tensorManager.reserveTensorId();await this.tensorManager.ensureTensor(e,i,r,n,!1);let a=this.temporarySessionTensorIds.get(e);return a?a.push(i):this.temporarySessionTensorIds.set(e,[i]),i}uploadTensor(e,t){if(!kj().shouldTransferToMLTensor)throw Error(`Trying to upload to a MLTensor while shouldTransferToMLTensor is false`);uM(`verbose`,()=>`[WebNN] uploadTensor {tensorId: ${e}, data: ${t.byteLength}}`),this.tensorManager.upload(e,t)}async downloadTensor(e,t){return this.tensorManager.download(e,t)}createMLTensorDownloader(e,t){return async()=>{let n=await this.tensorManager.download(e);return nM(n,t)}}registerMLTensor(e,t,n,r){let i=TM.get(n);if(!i)throw Error(`Unsupported ONNX data type: ${n}`);let a=this.tensorManager.registerTensor(e,t,i,r);return uM(`verbose`,()=>`[WebNN] registerMLTensor {tensor: ${t}, dataType: ${i}, dimensions: ${r}} -> {tensorId: ${a}}`),a}registerMLConstant(e,t,n,r,i,a,o=!1){if(!a)throw Error(`External mounted files are not available.`);let s=e;e.startsWith(`./`)&&(s=e.substring(2));let c=a.get(s);if(!c)throw Error(`File with name ${s} not found in preloaded files.`);if(t+n>c.byteLength)throw Error(`Out of bounds: data offset and length exceed the external file data size.`);let l=c.slice(t,t+n).buffer,u;switch(i.dataType){case`float32`:u=new Float32Array(l);break;case`float16`:u=typeof Float16Array<`u`&&Float16Array.from?new Float16Array(l):new Uint16Array(l);break;case`int32`:u=new Int32Array(l);break;case`uint32`:u=new Uint32Array(l);break;case`int64`:if(o){let e=pM(new Uint8Array(l),`int64`);u=new Int32Array(e.buffer),i.dataType=`int32`}else u=new BigInt64Array(l);break;case`uint64`:u=new BigUint64Array(l);break;case`int8`:u=new Int8Array(l);break;case`int4`:case`uint4`:case`uint8`:u=new Uint8Array(l);break;default:throw Error(`Unsupported data type: ${i.dataType} in creating WebNN Constant from external data.`)}return uM(`verbose`,()=>`[WebNN] registerMLConstant {dataType: ${i.dataType}, shape: ${i.shape}}} ${o?`(Note: it was int64 data type and registered to int32 as workaround)`:``}`),r.constant(i,u)}registerGraphInput(e){this.temporaryGraphInputs.push(e)}registerGraphOutput(e){this.temporaryGraphOutputs.push(e)}isGraphInput(e,t){let n=this.sessionGraphInputs.get(e);return n?n.includes(t):!1}isGraphOutput(e,t){let n=this.sessionGraphOutputs.get(e);return n?n.includes(t):!1}isGraphInputOutputTypeSupported(e,t,n=!0){let r=TM.get(Gj(t)),i=this.mlOpSupportLimitsBySessionId.get(e);return typeof r>`u`?!1:n?!!i?.input.dataTypes.includes(r):!!i?.output.dataTypes.includes(r)}flush(){}}}),kM,AM,jM,MM,NM,PM,FM,IM,LM,RM,zM,BM,VM,HM=Kk(()=>{JA(),Ij(),Wj(),$j(),Aj(),Pj(),tM(),kM=(e,t)=>{kj()._OrtInit(e,t)!==0&&Nj(`Can't initialize onnxruntime.`)},AM=async e=>{kM(e.wasm.numThreads,Yj(e.logLevel))},jM=async(e,t)=>{kj().asyncInit?.();let n=e.webgpu.adapter;if(t===`webgpu`){if(typeof navigator>`u`||!navigator.gpu)throw Error(`WebGPU is not supported in current environment`);if(n){if(typeof n.limits!=`object`||typeof n.features!=`object`||typeof n.requestDevice!=`function`)throw Error("Invalid GPU adapter set in `env.webgpu.adapter`. It must be a GPUAdapter object.")}else{let t=e.webgpu.powerPreference;if(t!==void 0&&t!==`low-power`&&t!==`high-performance`)throw Error(`Invalid powerPreference setting: "${t}"`);let r=e.webgpu.forceFallbackAdapter;if(r!==void 0&&typeof r!=`boolean`)throw Error(`Invalid forceFallbackAdapter setting: "${r}"`);if(n=await navigator.gpu.requestAdapter({powerPreference:t,forceFallbackAdapter:r}),!n)throw Error(`Failed to get GPU adapter. You may need to enable flag "--enable-unsafe-webgpu" if you are using Chrome.`)}}if(t===`webnn`&&(typeof navigator>`u`||!navigator.ml))throw Error(`WebNN is not supported in current environment`);if(t===`webgpu`&&kj().webgpuInit(t=>{e.webgpu.device=t}),t===`webnn`){let t=new(OM(),Yk(wM)).WebNNBackend(e);kj().webnnInit([t,()=>t.reserveTensorId(),e=>t.releaseTensorId(e),async(e,n,r,i,a)=>t.ensureTensor(e,n,r,i,a),(e,n)=>{t.uploadTensor(e,n)},async(e,n)=>t.downloadTensor(e,n),(e,n)=>t.registerMLContext(e,n),!!e.trace])}},MM=new Map,NM=e=>{let t=kj(),n=t.stackSave();try{let n=t.PTR_SIZE,r=t.stackAlloc(2*n);t._OrtGetInputOutputCount(e,r,r+n)!==0&&Nj(`Can't get session input/output count.`);let i=n===4?`i32`:`i64`;return[Number(t.getValue(r,i)),Number(t.getValue(r+n,i))]}finally{t.stackRestore(n)}},PM=(e,t)=>{let n=kj(),r=n.stackSave(),i=0;try{let r=n.PTR_SIZE,a=n.stackAlloc(2*r);n._OrtGetInputOutputMetadata(e,t,a,a+r)!==0&&Nj(`Can't get session input/output metadata.`);let o=Number(n.getValue(a,`*`));i=Number(n.getValue(a+r,`*`));let s=n.HEAP32[i/4];if(s===0)return[o,0];let c=n.HEAPU32[i/4+1],l=[];for(let e=0;e{let t=kj(),n=t._malloc(e.byteLength);if(n===0)throw Error(`Can't create a session. failed to allocate a buffer of size ${e.byteLength}.`);return t.HEAPU8.set(e,n),[n,e.byteLength]},IM=async(e,t)=>{let n,r,i=kj();Array.isArray(e)?[n,r]=e:e.buffer===i.HEAPU8.buffer?[n,r]=[e.byteOffset,e.byteLength]:[n,r]=FM(e);let a=0,o=0,s=0,c=[],l=[],u=[];try{if([o,c]=await Uj(t),t?.externalData&&i.mountExternalData){let e=[];for(let n of t.externalData){let t=typeof n==`string`?n:n.path;e.push(eM(typeof n==`string`?n:n.data).then(e=>{i.mountExternalData(t,e)}))}await Promise.all(e)}for(let e of t?.executionProviders??[])if((typeof e==`string`?e:e.name)===`webnn`){if(i.shouldTransferToMLTensor=!1,typeof e!=`string`){let t=e,n=t?.context,r=t?.gpuDevice,a=t?.deviceType,o=t?.powerPreference;n?i.currentContext=n:r?i.currentContext=await i.webnnCreateMLContext(r):i.currentContext=await i.webnnCreateMLContext({deviceType:a,powerPreference:o})}else i.currentContext=await i.webnnCreateMLContext();break}a=await i._OrtCreateSession(n,r,o),i.webgpuOnCreateSession?.(a),a===0&&Nj(`Can't create a session.`),i.jsepOnCreateSession?.(),i.currentContext&&(i.webnnRegisterMLContext(a,i.currentContext),i.currentContext=void 0,i.shouldTransferToMLTensor=!0);let[e,d]=NM(a),f=!!t?.enableGraphCapture,p=[],m=[],h=[],g=[],_=[];for(let t=0;te===`gpu-buffer`||e===`ml-tensor`||e===`ml-tensor-cpu-output`)&&(s=i._OrtCreateBinding(a),s===0&&Nj(`Can't create IO binding.`),v={handle:s,outputPreferredLocations:_,outputPreferredLocationsEncoded:_.map(e=>e===`ml-tensor-cpu-output`?`ml-tensor`:e).map(e=>Qj(e))}),MM.set(a,[a,l,u,v,f,!1]),[a,p,m,h,g]}catch(e){throw l.forEach(e=>i._OrtFree(e)),u.forEach(e=>i._OrtFree(e)),s!==0&&i._OrtReleaseBinding(s)!==0&&Nj(`Can't release IO binding.`),a!==0&&i._OrtReleaseSession(a)!==0&&Nj(`Can't release session.`),e}finally{i._free(n),o!==0&&i._OrtReleaseSessionOptions(o)!==0&&Nj(`Can't release session options.`),c.forEach(e=>i._free(e)),i.unmountExternalData?.()}},LM=e=>{let t=kj(),n=MM.get(e);if(!n)throw Error(`cannot release session. invalid session id: ${e}`);let[r,i,a,o,s]=n;o&&(s&&t._OrtClearBoundOutputs(o.handle)!==0&&Nj(`Can't clear bound outputs.`),t._OrtReleaseBinding(o.handle)!==0&&Nj(`Can't release IO binding.`)),t.jsepOnReleaseSession?.(e),t.webnnOnReleaseSession?.(e),t.webgpuOnReleaseSession?.(e),i.forEach(e=>t._OrtFree(e)),a.forEach(e=>t._OrtFree(e)),t._OrtReleaseSession(r)!==0&&Nj(`Can't release session.`),MM.delete(e)},RM=async(e,t,n,r,i,a,o=!1)=>{if(!e){t.push(0);return}let s=kj(),c=s.PTR_SIZE,l=e[0],u=e[1],d=e[3],f=d,p,m;if(l===`string`&&(d===`gpu-buffer`||d===`ml-tensor`))throw Error(`String tensor is not supported on GPU.`);if(o&&d!==`gpu-buffer`)throw Error(`External buffer must be provided for input/output index ${a} when enableGraphCapture is true.`);if(d===`gpu-buffer`){let t=e[2].gpuBuffer;m=qj(Gj(l),u);{let e=s.webgpuRegisterBuffer;if(!e)throw Error(`Tensor location "gpu-buffer" is not supported without using WebGPU.`);p=e(t,r)}}else if(d===`ml-tensor`){let t=e[2].mlTensor;m=qj(Gj(l),u);let n=s.webnnRegisterMLTensor;if(!n)throw Error(`Tensor location "ml-tensor" is not supported without using WebNN.`);p=n(r,t,Gj(l),u)}else{let t=e[2];if(Array.isArray(t)){m=c*t.length,p=s._malloc(m),n.push(p);for(let e=0;es.setValue(g+t*c,e,c===4?`i32`:`i64`));let e=s._OrtCreateTensor(Gj(l),p,m,g,u.length,Qj(f));e===0&&Nj(`Can't create tensor for input/output. session=${r}, index=${a}.`),t.push(e)}finally{s.stackRestore(h)}},zM=async(e,t,n,r,i,a)=>{let o=kj(),s=o.PTR_SIZE,c=MM.get(e);if(!c)throw Error(`cannot run inference. invalid session id: ${e}`);let l=c[0],u=c[1],d=c[2],f=c[3],p=c[4],m=c[5],h=t.length,g=r.length,_=0,v=[],y=[],b=[],x=[],ee=[],S=o.stackSave(),C=o.stackAlloc(h*s),w=o.stackAlloc(h*s),T=o.stackAlloc(g*s),te=o.stackAlloc(g*s);try{[_,v]=Fj(a),IA(`wasm prepareInputOutputTensor`);for(let r=0;re*t,1);u=Kj(a);let _=f?.outputPreferredLocations[r[t]];if(u===`string`){if(_===`gpu-buffer`||_===`ml-tensor`)throw Error(`String tensor is not supported on GPU.`);let e=[];for(let t=0;t0){let t=o.webgpuGetBuffer;if(!t)throw Error(`preferredLocation "gpu-buffer" is not supported without using WebGPU.`);let r=t(d),i=qj(a,g);if(i===void 0||!Xj(u))throw Error(`Unsupported data type: ${u}`);l=!0;{o.webgpuRegisterBuffer(r,e,d);let t=o.webgpuCreateDownloader(r,i,e);S.push([u,h,{gpuBuffer:r,download:async()=>{let e=await t();return new(Jj(u))(e)},dispose:()=>{o._OrtReleaseTensor(n)!==0&&Nj(`Can't release tensor.`)}},`gpu-buffer`])}}else if(_===`ml-tensor`&&g>0){let t=o.webnnEnsureTensor,r=o.webnnIsGraphInputOutputTypeSupported;if(!t||!r)throw Error(`preferredLocation "ml-tensor" is not supported without using WebNN.`);if(qj(a,g)===void 0||!Zj(u))throw Error(`Unsupported data type: ${u}`);if(!r(e,u,!1))throw Error(`preferredLocation "ml-tensor" for ${u} output is not supported by current WebNN Context.`);let i=await t(e,d,a,h,!1);l=!0,S.push([u,h,{mlTensor:i,download:o.webnnCreateMLTensorDownloader(d,u),dispose:()=>{o.webnnReleaseTensorId(d),o._OrtReleaseTensor(n)}},`ml-tensor`])}else if(_===`ml-tensor-cpu-output`&&g>0){let e=o.webnnCreateMLTensorDownloader(d,u)(),t=S.length;l=!0,ne.push((async()=>{let r=[t,await e];return o.webnnReleaseTensorId(d),o._OrtReleaseTensor(n),r})()),S.push([u,h,[],`cpu`])}else{let e=new(Jj(u))(g);new Uint8Array(e.buffer,e.byteOffset,e.byteLength).set(o.HEAPU8.subarray(d,d+e.byteLength)),S.push([u,h,e,`cpu`])}}finally{o.stackRestore(a),u===`string`&&d&&o._free(d),l||o._OrtReleaseTensor(n)}}f&&!p&&(o._OrtClearBoundOutputs(f.handle)!==0&&Nj(`Can't clear bound outputs.`),MM.set(e,[l,u,d,f,p,!1]));for(let[e,t]of await Promise.all(ne))S[e][2]=t;return LA(`wasm ProcessOutputTensor`),S}finally{o.webnnOnRunEnd?.(l),o.stackRestore(S),n.forEach(e=>{e&&e[3]===`gpu-buffer`&&o.webgpuUnregisterBuffer(e[2].gpuBuffer)}),i.forEach(e=>{e&&e[3]===`gpu-buffer`&&o.webgpuUnregisterBuffer(e[2].gpuBuffer)}),y.forEach(e=>o._OrtReleaseTensor(e)),b.forEach(e=>o._OrtReleaseTensor(e)),x.forEach(e=>o._free(e)),_!==0&&o._OrtReleaseRunOptions(_),v.forEach(e=>o._free(e))}},BM=e=>{let t=kj(),n=MM.get(e);if(!n)throw Error(`invalid session id`);let r=n[0],i=t._OrtEndProfiling(r);i===0&&Nj(`Can't get an profile file name.`),t._OrtFree(i)},VM=e=>{let t=[];for(let n of e){let e=n[2];!Array.isArray(e)&&`buffer`in e&&t.push(e.buffer)}return t}}),UM,WM,GM,KM,qM,JM,YM,XM,ZM,QM,$M,eN,tN,nN,rN,iN,aN,oN,sN=Kk(()=>{JA(),HM(),Aj(),bj(),UM=()=>!!cA.wasm.proxy&&typeof document<`u`,GM=!1,KM=!1,qM=!1,XM=new Map,ZM=(e,t)=>{let n=XM.get(e);n?n.push(t):XM.set(e,[t])},QM=()=>{if(GM||!KM||qM||!WM)throw Error(`worker not ready`)},$M=e=>{switch(e.data.type){case`init-wasm`:GM=!1,e.data.err?(qM=!0,YM[1](e.data.err)):(KM=!0,YM[0]()),JM&&=(URL.revokeObjectURL(JM),void 0);break;case`init-ep`:case`copy-from`:case`create`:case`release`:case`run`:case`end-profiling`:{let t=XM.get(e.data.type);e.data.err?t.shift()[1](e.data.err):t.shift()[0](e.data.out);break}default:}},eN=async()=>{if(!KM){if(GM)throw Error(`multiple calls to 'initWasm()' detected.`);if(qM)throw Error(`previous call to 'initWasm()' failed.`);if(GM=!0,UM())return new Promise((e,t)=>{WM?.terminate(),_j().then(([n,r])=>{try{WM=r,WM.onerror=e=>t(e),WM.onmessage=$M,YM=[e,t];let i={type:`init-wasm`,in:cA};!i.in.wasm.wasmPaths&&(n||sj)&&(i.in.wasm.wasmPaths={wasm:new URL(`/assets/ort-wasm-simd-threaded.asyncify-COni_aV6.wasm`,``+import.meta.url).href}),WM.postMessage(i),JM=n}catch(e){t(e)}},t)});try{await Oj(cA.wasm),await AM(cA),KM=!0}catch(e){throw qM=!0,e}finally{GM=!1}}},tN=async e=>{if(UM())return QM(),new Promise((t,n)=>{ZM(`init-ep`,[t,n]);let r={type:`init-ep`,in:{epName:e,env:cA}};WM.postMessage(r)});await jM(cA,e)},nN=async e=>UM()?(QM(),new Promise((t,n)=>{ZM(`copy-from`,[t,n]);let r={type:`copy-from`,in:{buffer:e}};WM.postMessage(r,[e.buffer])})):FM(e),rN=async(e,t)=>{if(UM()){if(t?.preferredOutputLocation)throw Error(`session option "preferredOutputLocation" is not supported for proxy.`);return QM(),new Promise((n,r)=>{ZM(`create`,[n,r]);let i={type:`create`,in:{model:e,options:{...t}}},a=[];e instanceof Uint8Array&&a.push(e.buffer),WM.postMessage(i,a)})}else return IM(e,t)},iN=async e=>{if(UM())return QM(),new Promise((t,n)=>{ZM(`release`,[t,n]);let r={type:`release`,in:e};WM.postMessage(r)});LM(e)},aN=async(e,t,n,r,i,a)=>{if(UM()){if(n.some(e=>e[3]!==`cpu`))throw Error(`input tensor on GPU is not supported for proxy.`);if(i.some(e=>e))throw Error(`pre-allocated output tensor is not supported for proxy.`);return QM(),new Promise((i,o)=>{ZM(`run`,[i,o]);let s=n,c={type:`run`,in:{sessionId:e,inputIndices:t,inputs:s,outputIndices:r,options:a}};WM.postMessage(c,VM(s))})}else return zM(e,t,n,r,i,a)},oN=async e=>{if(UM())return QM(),new Promise((t,n)=>{ZM(`end-profiling`,[t,n]);let r={type:`end-profiling`,in:e};WM.postMessage(r)});BM(e)}}),cN,lN,uN,dN=Kk(()=>{JA(),sN(),$j(),YA(),tM(),cN=(e,t)=>{switch(e.location){case`cpu`:return[e.type,e.dims,e.data,`cpu`];case`gpu-buffer`:return[e.type,e.dims,{gpuBuffer:e.gpuBuffer},`gpu-buffer`];case`ml-tensor`:return[e.type,e.dims,{mlTensor:e.mlTensor},`ml-tensor`];default:throw Error(`invalid data location: ${e.location} for ${t()}`)}},lN=e=>{switch(e[3]){case`cpu`:return new AA(e[0],e[2],e[1]);case`gpu-buffer`:{let t=e[0];if(!Xj(t))throw Error(`not supported data type: ${t} for deserializing GPU tensor`);let{gpuBuffer:n,download:r,dispose:i}=e[2];return AA.fromGpuBuffer(n,{dataType:t,dims:e[1],download:r,dispose:i})}case`ml-tensor`:{let t=e[0];if(!Zj(t))throw Error(`not supported data type: ${t} for deserializing MLTensor tensor`);let{mlTensor:n,download:r,dispose:i}=e[2];return AA.fromMLTensor(n,{dataType:t,dims:e[1],download:r,dispose:i})}default:throw Error(`invalid data location: ${e[3]}`)}},uN=class{async fetchModelAndCopyToWasmMemory(e){return nN(await eM(e))}async loadModel(e,t){PA();let n;n=typeof e==`string`?await this.fetchModelAndCopyToWasmMemory(e):e,[this.sessionId,this.inputNames,this.outputNames,this.inputMetadata,this.outputMetadata]=await rN(n,t),FA()}async dispose(){return iN(this.sessionId)}async run(e,t,n){PA();let r=[],i=[];Object.entries(e).forEach(e=>{let t=e[0],n=e[1],a=this.inputNames.indexOf(t);if(a===-1)throw Error(`invalid input '${t}'`);r.push(n),i.push(a)});let a=[],o=[];Object.entries(t).forEach(e=>{let t=e[0],n=e[1],r=this.outputNames.indexOf(t);if(r===-1)throw Error(`invalid output '${t}'`);a.push(n),o.push(r)});let s=r.map((e,t)=>cN(e,()=>`input "${this.inputNames[i[t]]}"`)),c=a.map((e,t)=>e?cN(e,()=>`output "${this.outputNames[o[t]]}"`):null),l=await aN(this.sessionId,i,s,o,c,n),u={};for(let e=0;emN,initializeFlags:()=>pN,wasmBackend:()=>hN});var pN,mN,hN,gN=Kk(()=>{JA(),sN(),dN(),pN=()=>{(typeof cA.wasm.initTimeout!=`number`||cA.wasm.initTimeout<0)&&(cA.wasm.initTimeout=0);let e=cA.wasm.simd;if(typeof e!=`boolean`&&e!==void 0&&e!==`fixed`&&e!==`relaxed`&&(console.warn(`Property "env.wasm.simd" is set to unknown value "${e}". Reset it to \`false\` and ignore SIMD feature checking.`),cA.wasm.simd=!1),typeof cA.wasm.proxy!=`boolean`&&(cA.wasm.proxy=!1),typeof cA.wasm.trace!=`boolean`&&(cA.wasm.trace=!1),typeof cA.wasm.numThreads!=`number`||!Number.isInteger(cA.wasm.numThreads)||cA.wasm.numThreads<=0)if(typeof self<`u`&&!self.crossOriginIsolated)cA.wasm.numThreads=1;else{let e=typeof navigator>`u`?Gk(`node:os`).cpus().length:navigator.hardwareConcurrency;cA.wasm.numThreads=Math.min(4,Math.ceil((e||1)/2))}},mN=class{async init(e){pN(),await eN(),await tN(e)}async createInferenceSessionHandler(e,t){let n=new uN;return await n.loadModel(e,t),n}},hN=new mN});JA(),JA(),JA();var _N=`1.25.0-dev.20260303-e7e64dc112`,vN=qA;{let e=(gN(),Yk(fN)).wasmBackend;Qk(`webgpu`,e,5),Qk(`webnn`,e,5),Qk(`cpu`,e,10),Qk(`wasm`,e,10)}Object.defineProperty(cA.versions,`web`,{value:_N,enumerable:!0});var yN=`warning`;Object.defineProperty({wasm:{},webgl:{},webgpu:{},versions:{common:`1.24.3`},set logLevel(e){if(e!==void 0){if(typeof e!=`string`||[`verbose`,`info`,`warning`,`error`,`fatal`].indexOf(e)===-1)throw Error(`Unsupported logging level: ${e}`);yN=e}},get logLevel(){return yN}},`logLevel`,{enumerable:!0});const bN=(e,t)=>{let n=typeof document<`u`?document.createElement(`canvas`):new OffscreenCanvas(1,1);n.width=e.dims[3],n.height=e.dims[2];let r=n.getContext(`2d`);if(r!=null){let i,a;t?.tensorLayout!==void 0&&t.tensorLayout===`NHWC`?(i=e.dims[2],a=e.dims[3]):(i=e.dims[3],a=e.dims[2]);let o=t?.format===void 0?`RGB`:t.format,s=t?.norm,c,l;s===void 0||s.mean===void 0?c=[255,255,255,255]:typeof s.mean==`number`?c=[s.mean,s.mean,s.mean,s.mean]:(c=[s.mean[0],s.mean[1],s.mean[2],0],s.mean[3]!==void 0&&(c[3]=s.mean[3])),s===void 0||s.bias===void 0?l=[0,0,0,0]:typeof s.bias==`number`?l=[s.bias,s.bias,s.bias,s.bias]:(l=[s.bias[0],s.bias[1],s.bias[2],0],s.bias[3]!==void 0&&(l[3]=s.bias[3]));let u=a*i,d=0,f=u,p=u*2,m=-1;o===`RGBA`?(d=0,f=u,p=u*2,m=u*3):o===`RGB`?(d=0,f=u,p=u*2):o===`RBG`&&(d=0,p=u,f=u*2);for(let t=0;t{let n=typeof document<`u`?document.createElement(`canvas`).getContext(`2d`):new OffscreenCanvas(1,1).getContext(`2d`),r;if(n!=null){let i,a,o;t?.tensorLayout!==void 0&&t.tensorLayout===`NHWC`?(i=e.dims[2],a=e.dims[1],o=e.dims[3]):(i=e.dims[3],a=e.dims[2],o=e.dims[1]);let s=t===void 0||t.format===void 0?`RGB`:t.format,c=t?.norm,l,u;c===void 0||c.mean===void 0?l=[255,255,255,255]:typeof c.mean==`number`?l=[c.mean,c.mean,c.mean,c.mean]:(l=[c.mean[0],c.mean[1],c.mean[2],255],c.mean[3]!==void 0&&(l[3]=c.mean[3])),c===void 0||c.bias===void 0?u=[0,0,0,0]:typeof c.bias==`number`?u=[c.bias,c.bias,c.bias,c.bias]:(u=[c.bias[0],c.bias[1],c.bias[2],0],c.bias[3]!==void 0&&(u[3]=c.bias[3]));let d=a*i;if(t!==void 0&&(t.format!==void 0&&o===4&&t.format!==`RGBA`||o===3&&t.format!==`RGB`&&t.format!==`BGR`))throw Error(`Tensor format doesn't match input tensor dims`);let f=0,p=1,m=2,h=3,g=0,_=d,v=d*2,y=-1;s===`RGBA`?(g=0,_=d,v=d*2,y=d*3):s===`RGB`?(g=0,_=d,v=d*2):s===`RBG`&&(g=0,v=d,_=d*2),r=n.createImageData(i,a);for(let t=0;t{if(e===void 0)throw Error(`Image buffer must be defined`);if(t.height===void 0||t.width===void 0)throw Error(`Image height and width must be defined`);if(t.tensorLayout===`NHWC`)throw Error(`NHWC Tensor layout is not supported yet`);let{height:n,width:r}=t,i=t.norm??{mean:255,bias:0},a,o;a=typeof i.mean==`number`?[i.mean,i.mean,i.mean,i.mean]:[i.mean[0],i.mean[1],i.mean[2],i.mean[3]??255],o=typeof i.bias==`number`?[i.bias,i.bias,i.bias,i.bias]:[i.bias[0],i.bias[1],i.bias[2],i.bias[3]??0];let s=t.format===void 0?`RGBA`:t.format,c=t.tensorFormat===void 0||t.tensorFormat===void 0?`RGB`:t.tensorFormat,l=n*r,u=c===`RGBA`?new Float32Array(l*4):new Float32Array(l*3),d=4,f=0,p=1,m=2,h=3,g=0,_=l,v=l*2,y=-1;s===`RGB`&&(d=3,f=0,p=1,m=2,h=-1),c===`RGBA`?y=l*3:c===`RBG`?(g=0,v=l,_=l*2):c===`BGR`&&(v=0,_=l,g=l*2);for(let t=0;t{let n=typeof HTMLImageElement<`u`&&e instanceof HTMLImageElement,r=typeof ImageData<`u`&&e instanceof ImageData,i=typeof ImageBitmap<`u`&&e instanceof ImageBitmap,a=typeof e==`string`,o,s=t??{},c=()=>{if(typeof document<`u`)return document.createElement(`canvas`);if(typeof OffscreenCanvas<`u`)return new OffscreenCanvas(1,1);throw Error(`Canvas is not supported`)},l=e=>typeof HTMLCanvasElement<`u`&&e instanceof HTMLCanvasElement||e instanceof OffscreenCanvas?e.getContext(`2d`):null;if(n){let n=c();n.width=e.width,n.height=e.height;let r=l(n);if(r!=null){let n=e.height,i=e.width;if(t!==void 0&&t.resizedHeight!==void 0&&t.resizedWidth!==void 0&&(n=t.resizedHeight,i=t.resizedWidth),t!==void 0){if(s=t,t.tensorFormat!==void 0)throw Error(`Image input config format must be RGBA for HTMLImageElement`);s.tensorFormat=`RGBA`,s.height=n,s.width=i}else s.tensorFormat=`RGBA`,s.height=n,s.width=i;r.drawImage(e,0,0),o=r.getImageData(0,0,i,n).data}else throw Error(`Can not access image data`)}else if(r){let n,r;if(t!==void 0&&t.resizedWidth!==void 0&&t.resizedHeight!==void 0?(n=t.resizedHeight,r=t.resizedWidth):(n=e.height,r=e.width),t!==void 0&&(s=t),s.format=`RGBA`,s.height=n,s.width=r,t!==void 0){let t=c();t.width=r,t.height=n;let i=l(t);if(i!=null)i.putImageData(e,0,0),o=i.getImageData(0,0,r,n).data;else throw Error(`Can not access image data`)}else o=e.data}else if(i){if(t===void 0)throw Error(`Please provide image config with format for Imagebitmap`);let n=c();n.width=e.width,n.height=e.height;let r=l(n);if(r!=null){let t=e.height,n=e.width;return r.drawImage(e,0,0,n,t),o=r.getImageData(0,0,n,t).data,s.height=t,s.width=n,SN(o,s)}else throw Error(`Can not access image data`)}else if(a)return new Promise((t,n)=>{let r=c(),i=l(r);if(!e||!i)return n();let a=new Image;a.crossOrigin=`Anonymous`,a.src=e,a.onload=()=>{r.width=a.width,r.height=a.height,i.drawImage(a,0,0,r.width,r.height);let e=i.getImageData(0,0,r.width,r.height);s.height=r.height,s.width=r.width,t(SN(e.data,s))}});else throw Error(`Input data provided is not supported - aborted tensor creation`);if(o!==void 0)return SN(o,s);throw Error(`Input data provided is not supported - aborted tensor creation`)},wN=(e,t)=>{let{width:n,height:r,download:i,dispose:a}=t;return new PN({location:`texture`,type:`float32`,texture:e,dims:[1,r,n,4],download:i,dispose:a})},TN=(e,t)=>{let{dataType:n,dims:r,download:i,dispose:a}=t;return new PN({location:`gpu-buffer`,type:n??`float32`,gpuBuffer:e,dims:r,download:i,dispose:a})},EN=(e,t)=>{let{dataType:n,dims:r,download:i,dispose:a}=t;return new PN({location:`ml-tensor`,type:n??`float32`,mlTensor:e,dims:r,download:i,dispose:a})},DN=(e,t,n)=>new PN({location:`cpu-pinned`,type:e,data:t,dims:n??[t.length]}),ON=new Map([[`float32`,Float32Array],[`uint8`,Uint8Array],[`int8`,Int8Array],[`uint16`,Uint16Array],[`int16`,Int16Array],[`int32`,Int32Array],[`bool`,Uint8Array],[`float64`,Float64Array],[`uint32`,Uint32Array],[`int4`,Uint8Array],[`uint4`,Uint8Array]]),kN=new Map([[Float32Array,`float32`],[Uint8Array,`uint8`],[Int8Array,`int8`],[Uint16Array,`uint16`],[Int16Array,`int16`],[Int32Array,`int32`],[Float64Array,`float64`],[Uint32Array,`uint32`]]);var AN=!1;const jN=()=>{if(!AN){AN=!0;let e=typeof BigInt64Array<`u`&&BigInt64Array.from,t=typeof BigUint64Array<`u`&&BigUint64Array.from,n=globalThis.Float16Array,r=n!==void 0&&n.from;e&&(ON.set(`int64`,BigInt64Array),kN.set(BigInt64Array,`int64`)),t&&(ON.set(`uint64`,BigUint64Array),kN.set(BigUint64Array,`uint64`)),r?(ON.set(`float16`,n),kN.set(n,`float16`)):ON.set(`float16`,Uint16Array)}},MN=e=>{let t=1;for(let n=0;n{switch(e.location){case`cpu`:return new PN(e.type,e.data,t);case`cpu-pinned`:return new PN({location:`cpu-pinned`,data:e.data,type:e.type,dims:t});case`texture`:return new PN({location:`texture`,texture:e.texture,type:e.type,dims:t});case`gpu-buffer`:return new PN({location:`gpu-buffer`,gpuBuffer:e.gpuBuffer,type:e.type,dims:t});case`ml-tensor`:return new PN({location:`ml-tensor`,mlTensor:e.mlTensor,type:e.type,dims:t});default:throw Error(`tensorReshape: tensor location ${e.location} is not supported`)}};var PN=class{constructor(e,t,n){jN();let r,i;if(typeof e==`object`&&`location`in e)switch(this.dataLocation=e.location,r=e.type,i=e.dims,e.location){case`cpu-pinned`:{let t=ON.get(r);if(!t)throw TypeError(`unsupported type "${r}" to create tensor from pinned buffer`);if(!(e.data instanceof t))throw TypeError(`buffer should be of type ${t.name}`);this.cpuData=e.data;break}case`texture`:if(r!==`float32`)throw TypeError(`unsupported type "${r}" to create tensor from texture`);this.gpuTextureData=e.texture,this.downloader=e.download,this.disposer=e.dispose;break;case`gpu-buffer`:if(r!==`float32`&&r!==`float16`&&r!==`int32`&&r!==`int64`&&r!==`uint32`&&r!==`uint8`&&r!==`bool`&&r!==`uint4`&&r!==`int4`)throw TypeError(`unsupported type "${r}" to create tensor from gpu buffer`);this.gpuBufferData=e.gpuBuffer,this.downloader=e.download,this.disposer=e.dispose;break;case`ml-tensor`:if(r!==`float32`&&r!==`float16`&&r!==`int32`&&r!==`int64`&&r!==`uint32`&&r!==`uint64`&&r!==`int8`&&r!==`uint8`&&r!==`bool`&&r!==`uint4`&&r!==`int4`)throw TypeError(`unsupported type "${r}" to create tensor from MLTensor`);this.mlTensorData=e.mlTensor,this.downloader=e.download,this.disposer=e.dispose;break;default:throw Error(`Tensor constructor: unsupported location '${this.dataLocation}'`)}else{let a,o;if(typeof e==`string`)if(r=e,o=n,e===`string`){if(!Array.isArray(t))throw TypeError(`A string tensor's data must be a string array.`);a=t}else{let n=ON.get(e);if(n===void 0)throw TypeError(`Unsupported tensor type: ${e}.`);if(Array.isArray(t)){if(e===`float16`&&n===Uint16Array||e===`uint4`||e===`int4`)throw TypeError(`Creating a ${e} tensor from number array is not supported. Please use ${n.name} as data.`);a=e===`uint64`||e===`int64`?n.from(t,BigInt):n.from(t)}else if(t instanceof n)a=t;else if(t instanceof Uint8ClampedArray)if(e===`uint8`)a=Uint8Array.from(t);else throw TypeError(`A Uint8ClampedArray tensor's data must be type of uint8`);else if(e===`float16`&&t instanceof Uint16Array&&n!==Uint16Array)a=new globalThis.Float16Array(t.buffer,t.byteOffset,t.length);else throw TypeError(`A ${r} tensor's data must be type of ${n}`)}else if(o=t,Array.isArray(e)){if(e.length===0)throw TypeError(`Tensor type cannot be inferred from an empty array.`);let t=typeof e[0];if(t===`string`)r=`string`,a=e;else if(t===`boolean`)r=`bool`,a=Uint8Array.from(e);else throw TypeError(`Invalid element type of data array: ${t}.`)}else if(e instanceof Uint8ClampedArray)r=`uint8`,a=Uint8Array.from(e);else{let t=kN.get(e.constructor);if(t===void 0)throw TypeError(`Unsupported type for tensor data: ${e.constructor}.`);r=t,a=e}if(o===void 0)o=[a.length];else if(!Array.isArray(o))throw TypeError(`A tensor's dims must be a number array`);i=o,this.cpuData=a,this.dataLocation=`cpu`}let a=MN(i);if(this.cpuData&&a!==this.cpuData.length&&!((r===`uint4`||r===`int4`)&&Math.ceil(a/2)===this.cpuData.length))throw Error(`Tensor's size(${a}) does not match data length(${this.cpuData.length}).`);this.type=r,this.dims=i,this.size=a}static async fromImage(e,t){return CN(e,t)}static fromTexture(e,t){return wN(e,t)}static fromGpuBuffer(e,t){return TN(e,t)}static fromMLTensor(e,t){return EN(e,t)}static fromPinnedBuffer(e,t,n){return DN(e,t,n)}toDataURL(e){return bN(this,e)}toImageData(e){return xN(this,e)}get data(){if(this.ensureValid(),!this.cpuData)throw Error("The data is not on CPU. Use `getData()` to download GPU data to CPU, or use `texture` or `gpuBuffer` property to access the GPU data directly.");return this.cpuData}get location(){return this.dataLocation}get texture(){if(this.ensureValid(),!this.gpuTextureData)throw Error(`The data is not stored as a WebGL texture.`);return this.gpuTextureData}get gpuBuffer(){if(this.ensureValid(),!this.gpuBufferData)throw Error(`The data is not stored as a WebGPU buffer.`);return this.gpuBufferData}get mlTensor(){if(this.ensureValid(),!this.mlTensorData)throw Error(`The data is not stored as a WebNN MLTensor.`);return this.mlTensorData}async getData(e){switch(this.ensureValid(),this.dataLocation){case`cpu`:case`cpu-pinned`:return this.data;case`texture`:case`gpu-buffer`:case`ml-tensor`:if(!this.downloader)throw Error(`The current tensor is not created with a specified data downloader.`);if(this.isDownloading)throw Error(`The current tensor is being downloaded.`);try{this.isDownloading=!0;let t=await this.downloader();return this.downloader=void 0,this.dataLocation=`cpu`,this.cpuData=t,e&&this.disposer&&(this.disposer(),this.disposer=void 0),t}finally{this.isDownloading=!1}default:throw Error(`cannot get data from location: ${this.dataLocation}`)}}dispose(){if(this.isDownloading)throw Error(`The current tensor is being downloaded.`);this.disposer&&=(this.disposer(),void 0),this.cpuData=void 0,this.gpuTextureData=void 0,this.gpuBufferData=void 0,this.mlTensorData=void 0,this.downloader=void 0,this.isDownloading=void 0,this.dataLocation=`none`}ensureValid(){if(this.dataLocation===`none`)throw Error(`The tensor is disposed.`)}reshape(e){if(this.ensureValid(),this.downloader||this.disposer)throw Error(`Cannot reshape a tensor that owns GPU resource.`);return NN(this,e)}};const FN=PN;var IN=Object.defineProperty,LN=(e,t)=>{for(var n in t)IN(e,n,{get:t[n],enumerable:!0})},RN={},zN={},BN={},VN=`4.0.0-next.6`,HN=typeof self<`u`,UN=!hP(RN),WN=!hP(zN),GN=HN&&`caches`in self,KN=globalThis.Deno!==void 0;globalThis.Bun;var qN=KN&&GN&&!UN,JN=typeof process<`u`,YN=JN&&process?.release?.name===`node`&&!qN,XN=typeof window<`u`&&window.document!==void 0,ZN=HN&&[`DedicatedWorkerGlobalScope`,`ServiceWorkerGlobalScope`,`SharedWorkerGlobalScope`].includes(self.constructor?.name),QN=XN||ZN||qN,$N=YN||typeof navigator<`u`&&`gpu`in navigator,eP=typeof navigator<`u`&&`ml`in navigator,tP=typeof crypto<`u`&&typeof crypto.getRandomValues==`function`,nP=typeof chrome<`u`&&chrome.runtime!==void 0&&typeof chrome.runtime.id==`string`,rP=typeof ServiceWorkerGlobalScope<`u`&&HN&&self instanceof ServiceWorkerGlobalScope,iP=(()=>{if(typeof navigator>`u`)return!1;let e=navigator.userAgent,t=(navigator.vendor||``).indexOf(`Apple`)>-1,n=!e.match(/CriOS|FxiOS|EdgiOS|OPiOS|mercury|brave/i)&&!e.includes(`Chrome`)&&!e.includes(`Android`);return t&&n})(),aP=Object.freeze({IS_BROWSER_ENV:XN,IS_WEBWORKER_ENV:ZN,IS_WEB_ENV:QN,IS_SERVICE_WORKER_ENV:rP,IS_DENO_WEB_RUNTIME:qN,IS_WEB_CACHE_AVAILABLE:GN,IS_WEBGPU_AVAILABLE:$N,IS_WEBNN_AVAILABLE:eP,IS_SAFARI:iP,IS_PROCESS_AVAILABLE:JN,IS_NODE_ENV:YN,IS_FS_AVAILABLE:UN,IS_PATH_AVAILABLE:WN,IS_CRYPTO_AVAILABLE:tP,IS_CHROME_AVAILABLE:nP}),oP=UN&&WN,sP=`./`;if(oP){let e=Object(import.meta).url;e?sP=zN.dirname(zN.dirname(BN.fileURLToPath(e))):typeof __dirname<`u`&&(sP=zN.dirname(__dirname))}var cP=oP?zN.join(sP,`/.cache/`):null,lP=`/models/`,uP=oP?zN.join(sP,lP):lP,dP=typeof globalThis.fetch==`function`?globalThis.fetch.bind(globalThis):void 0,fP=Object.freeze({DEBUG:10,INFO:20,WARNING:30,ERROR:40,NONE:50}),pP=fP.WARNING,mP={version:VN,backends:{onnx:{}},get logLevel(){return pP},set logLevel(e){pP=e,mP.backends.onnx?.setLogLevel?.(e)},allowRemoteModels:!0,remoteHost:`https://huggingface.co/`,remotePathTemplate:`{model}/resolve/{revision}/`,allowLocalModels:!(XN||ZN||qN),localModelPath:uP,useFS:UN,useBrowserCache:GN,useFSCache:UN,cacheDir:cP,useCustomCache:!1,customCache:null,useWasmCache:GN||UN,cacheKey:`transformers-cache`,fetch:dP};function hP(e){return Object.keys(e).length===0}function gP(e,t){e&&e(t)}function _P(e){return Number.isInteger(e)||typeof e==`bigint`}function vP(e){return e==null||e===-1}function yP(e){let t=[],n=e;for(;Array.isArray(n);)t.push(n.length),n=n[0];return t}function bP(...e){return Array.prototype.concat.apply([],e)}function xP(...e){return e.reduce((e,t)=>e.flatMap(e=>t.map(t=>[e,t])))}function SP(e,t){return Math.abs((e+t)%(2*t)-t)}function CP(e,t){return Object.assign({},...t.map(t=>{if(e[t]!==void 0)return{[t]:e[t]}}))}function wP(e,t){let n=0;for(let r of e)r===t&&++n;return n}var TP={error(...e){mP.logLevel<=fP.ERROR&&console.error(...e)},warn(...e){mP.logLevel<=fP.WARNING&&console.warn(...e)},info(...e){mP.logLevel<=fP.INFO&&console.log(...e)},debug(...e){mP.logLevel<=fP.DEBUG&&console.log(...e)},log(...e){this.info(...e)}},EP=class{constructor(e){this.trie=this._build_trie(e)}_build_trie(e){let t=Object.create(null);for(let n of e){let e=t;for(let t=0;tr&&t.push(e.slice(r,i)),t.push(o),i+=o.length,r=i):++i}return r{let e=[...Array.from({length:94},(e,t)=>t+33),...Array.from({length:12},(e,t)=>t+161),...Array.from({length:82},(e,t)=>t+174)],t=e.slice(),n=0;for(let r=0;r<256;++r)e.includes(r)||(e.push(r),t.push(256+n),n+=1);let r=t.map(e=>String.fromCharCode(e));return Object.fromEntries(e.map((e,t)=>[e,r[t]]))})(),kP=(e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[t,e])))(OP),AP=`.,!?…。,、।۔،`,jP=new Map([[`(?i:'s|'t|'re|'ve|'m|'ll|'d)`,`(?:'([sS]|[tT]|[rR][eE]|[vV][eE]|[mM]|[lL][lL]|[dD]))`],[`(?i:[sdmt]|ll|ve|re)`,`(?:[sS]|[dD]|[mM]|[tT]|[lL][lL]|[vV][eE]|[rR][eE])`],[`[^\\r\\n\\p{L}\\p{N}]?+`,`[^\\r\\n\\p{L}\\p{N}]?`],[`[^\\s\\p{L}\\p{N}]++`,`[^\\s\\p{L}\\p{N}]+`],[`(?>\\p{Nd}{510})`,`(?:\\p{Nd}{510})`],[`\\p{Nd}{3}+`,`(?:\\p{Nd}{3})+`],[`\\G`,``],[` ?[^(\\s|[${AP}])]+`,` ?[^\\s${AP}]+`]]),MP=`\\p{P}\\u0021-\\u002F\\u003A-\\u0040\\u005B-\\u0060\\u007B-\\u007E`,NP=e=>e.replace(/ \./g,`.`).replace(/ \?/g,`?`).replace(/ \!/g,`!`).replace(/ ,/g,`,`).replace(/ \' /g,`'`).replace(/ n't/g,`n't`).replace(/ 'm/g,`'m`).replace(/ 's/g,`'s`).replace(/ 've/g,`'ve`).replace(/ 're/g,`'re`),PP=(e,t=!0)=>{if(e.Regex!==void 0){let t=e.Regex.replace(/\\([#&~])/g,`$1`);t=t.replace(/\\A/g,`^`).replace(/\\z/g,`$`).replace(/\\Z/g,`(?=\\r?\\n?$)`);for(let[e,n]of jP)t=t.replaceAll(e,n);try{return new RegExp(t,`gu`)}catch(e){if(!(e instanceof SyntaxError)||!e.message.toLowerCase().includes(`invalid property name`))throw e;let n=!1,r=t.replace(/(\\[pP])\{([^}=]+)\}/g,(e,t,r)=>{try{return RegExp(`\\p{${r}}`,`u`),`${t}{${r}}`}catch{return n=!0,`${t}{Script=${r}}`}});if(!n)throw e;try{return new RegExp(r,`gu`)}catch{throw e}}}else if(e.String!==void 0){let n=FP(e.String);return new RegExp(t?n:`(${n})`,`gu`)}else return console.warn(`Unknown pattern type:`,e),null},FP=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),IP=(e,t,n)=>{let r=[],i=0;for(;ie>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=63744&&e<=64255||e>=194560&&e<=195103,RP=e=>Number.isInteger(e)||typeof e==`bigint`,zP=e=>{let t=0;for(let n of e)++t;return t},BP=e=>WP(e.toLowerCase()),VP=(...e)=>Array.prototype.concat.apply([],e),HP=e=>new Map(Object.entries(e)),UP=(e,t)=>{let n=[],r=0;for(let i of e.matchAll(t)){let t=i[0];r0&&n.push(t),r=i.index+t.length}return re.replace(/\p{M}/gu,``),GP=(e,t,n=[])=>{if(!e||Array.isArray(e)||typeof e!=`object`)return`${t} must be a valid object`;for(let r of n)if(!(r in e))return`${t} must contain a "${r}" property`;return null},KP=e=>e.match(/\S+/g)||[],qP=class{constructor(){let e=function(...t){return e._call(...t)};return Object.setPrototypeOf(e,new.target.prototype)}},JP=class extends qP{constructor(e){super(),this.config=e}_call(e){return this.normalize(e)}},YP=class extends JP{tokenize_chinese_chars(e){let t=[];for(let n=0;ne.normalize(`NFKC`)).join(`~`):e.normalize(`NFKC`),e}},ZP=class extends JP{constructor(e){super(e),this.normalizers=(e.normalizers??[]).map(e=>lF(e))}normalize(e){return this.normalizers.reduce((e,t)=>t?t.normalize(e):e,e)}},QP=class extends JP{normalize(e){let t=PP(this.config.pattern??{});return t===null?e:e.replaceAll(t,this.config.content??``)}},$P=class extends JP{constructor(){super(...arguments),this.form=`NFC`}normalize(e){return e=e.normalize(this.form),e}},eF=class extends $P{constructor(){super(...arguments),this.form=`NFC`}},tF=class extends $P{constructor(){super(...arguments),this.form=`NFD`}},nF=class extends $P{constructor(){super(...arguments),this.form=`NFKC`}},rF=class extends $P{constructor(){super(...arguments),this.form=`NFKD`}},iF=class extends JP{normalize(e){return this.config.strip_left&&this.config.strip_right?e=e.trim():(this.config.strip_left&&(e=e.trimStart()),this.config.strip_right&&(e=e.trimEnd())),e}},aF=class extends JP{normalize(e){return WP(e)}},oF=class extends JP{normalize(e){return e.toLowerCase()}},sF=class extends JP{normalize(e){return e=this.config.prepend+e,e}};function cF(e){if(e===null)return null;switch(e.type){case`BertNormalizer`:return new YP(e);case`Precompiled`:return new XP(e);case`Sequence`:return new ZP(e);case`Replace`:return new QP(e);case`NFC`:return new eF(e);case`NFD`:return new tF(e);case`NFKC`:return new nF(e);case`NFKD`:return new rF(e);case`Strip`:return new iF(e);case`StripAccents`:return new aF(e);case`Lowercase`:return new oF(e);case`Prepend`:return new sF(e);default:throw Error(`Unknown Normalizer type: ${e.type}`)}}var lF=cF,uF=class extends qP{pre_tokenize(e,t){return(Array.isArray(e)?e.map(e=>this.pre_tokenize_text(e,t)):this.pre_tokenize_text(e,t)).flat()}_call(e,t){return this.pre_tokenize(e,t)}},dF=class extends uF{constructor(e){super(),this.config=e,this.add_prefix_space=this.config.add_prefix_space??!1,this.trim_offsets=this.config.trim_offsets??!1,this.use_regex=this.config.use_regex??!0,this.pattern=/'s|'t|'re|'ve|'m|'ll|'d| ?\p{L}+| ?\p{N}+| ?[^\s\p{L}\p{N}]+|\s+(?!\S)|\s+/gu,this.byte_encoder=OP,this.text_encoder=new TextEncoder}pre_tokenize_text(e,t){return this.add_prefix_space&&!e.startsWith(` `)&&(e=` `+e),(this.use_regex?e.match(this.pattern)||[]:[e]).map(e=>Array.from(this.text_encoder.encode(e),e=>this.byte_encoder[e]).join(``))}},fF=class extends uF{pre_tokenize_text(e,t){return e.match(/\w+|[^\w\s]+/g)||[]}},pF=class extends uF{constructor(e){super(),this.replacement=e.replacement??`▁`,this.str_rep=e.str_rep||this.replacement,this.prepend_scheme=e.prepend_scheme??`always`}pre_tokenize_text(e,t){let{section_index:n=void 0}=t??{},r=e.replaceAll(` `,this.str_rep);return!r.startsWith(this.replacement)&&(this.prepend_scheme===`always`||this.prepend_scheme===`first`&&n===0)&&(r=this.str_rep+r),[r]}},mF=class extends uF{constructor(e){super(),this.config=e,this.pattern=PP(this.config.pattern??{},this.config.invert??!0)}pre_tokenize_text(e){return this.pattern===null?[]:this.config.invert?e.match(this.pattern)||[]:this.config.behavior?.toLowerCase()===`removed`?e.split(this.pattern).filter(e=>e):UP(e,this.pattern)}},hF=class extends uF{constructor(e){super(),this.config=e,this.pattern=RegExp(`[^${MP}]+|[${MP}]+`,`gu`)}pre_tokenize_text(e){return e.match(this.pattern)||[]}},gF=class extends uF{constructor(e){super(),this.config=e;let t=`[^\\d]+|\\d${this.config.individual_digits?``:`+`}`;this.pattern=new RegExp(t,`gu`)}pre_tokenize_text(e){return e.match(this.pattern)||[]}},_F=class extends uF{constructor(){super(),this.pattern=RegExp(`[^\\s${MP}]+|[${MP}]`,`gu`)}pre_tokenize_text(e,t){return e.trim().match(this.pattern)||[]}},vF=class extends uF{constructor(e){super(),this.config=e,this.pattern=PP(this.config.pattern??{}),this.content=this.config.content??``}pre_tokenize_text(e){return this.pattern===null?[e]:[e.replaceAll(this.pattern,this.config.content??``)]}},yF=class extends uF{constructor(e){super(),this.tokenizers=(e.pretokenizers??[]).map(e=>CF(e))}pre_tokenize_text(e,t){return this.tokenizers.reduce((e,n)=>n?n.pre_tokenize(e,t):e,[e])}},bF=class extends uF{pre_tokenize_text(e){return KP(e)}},xF=class extends uF{constructor(e){super(),this.config=e,this._length=e.length}pre_tokenize_text(e){let t=[];for(let n=0;nthis.max_input_chars_per_word){t.push(this.unk_token);continue}let r=!1,i=0,a=[];for(;i0&&(r=this.config.continuing_subword_prefix+r),this.tokens_to_ids.has(r)){n=r;break}--t}if(n===null){r=!0;break}a.push(n),i=t}r?t.push(this.unk_token):t.push(...a)}return t}},EF=class e{constructor(e,t){this.is_leaf=e,this.children=t}static default(){return new e(!1,new Map)}},DF=class{constructor(){this.root=EF.default()}extend(e){for(let t of e)this.push(t)}push(e){let t=this.root;for(let n of e){let e=t.children.get(n);e===void 0&&(e=EF.default(),t.children.set(n,e)),t=e}t.is_leaf=!0}*common_prefix_search(e){let t=this.root;if(t===void 0)return;let n=``;for(let r of e){if(n+=r,t=t.children.get(r),t===void 0)return;t.is_leaf&&(yield n)}}},OF=class e{constructor(e,t,n,r,i){this.token_id=e,this.node_id=t,this.pos=n,this.length=r,this.score=i,this.prev=null,this.backtrace_score=0}clone(){let t=new e(this.token_id,this.node_id,this.pos,this.length,this.score);return t.prev=this.prev,t.backtrace_score=this.backtrace_score,t}},kF=class{constructor(e,t,n){this.chars=Array.from(e),this.len=this.chars.length,this.bos_token_id=t,this.eos_token_id=n,this.nodes=[],this.begin_nodes=Array.from({length:this.len+1},()=>[]),this.end_nodes=Array.from({length:this.len+1},()=>[]);let r=new OF(this.bos_token_id??0,0,0,0,0),i=new OF(this.eos_token_id??0,1,this.len,0,0);this.nodes.push(r.clone()),this.nodes.push(i.clone()),this.begin_nodes[this.len].push(i),this.end_nodes[0].push(r)}insert(e,t,n,r){let i=this.nodes.length,a=new OF(r,i,e,t,n);this.begin_nodes[e].push(a),this.end_nodes[e+t].push(a),this.nodes.push(a)}viterbi(){let e=this.len,t=0;for(;t<=e;){if(this.begin_nodes[t].length==0)return[];for(let e of this.begin_nodes[t]){e.prev=null;let n=0,r=null;for(let i of this.end_nodes[t]){let t=i.backtrace_score+e.score;(r===null||t>n)&&(r=i.clone(),n=t)}if(r!==null)e.prev=r,e.backtrace_score=n;else return[]}++t}let n=[],r=this.begin_nodes[e][0].prev;if(r===null)return[];let i=r.clone();for(;i.prev!==null;)n.push(i.clone()),i=i.clone().prev.clone();return n.reverse(),n}piece(e){return this.chars.slice(e.pos,e.pos+e.length).join(``)}tokens(){return this.viterbi().map(e=>this.piece(e))}token_ids(){return this.viterbi().map(e=>e.token_id)}};function AF(e){if(e.length===0)throw Error(`Array must not be empty`);let t=e[0],n=0;for(let r=1;r[e,t])),this.bos_token=` `,this.bos_token_id=this.tokens_to_ids.get(this.bos_token),this.eos_token=t,this.eos_token_id=this.tokens_to_ids.get(this.eos_token),this.unk_token=this.vocab[this.unk_token_id],this.min_score=AF(this.scores)[0],this.unk_score=this.min_score-10,this.scores[this.unk_token_id]=this.unk_score,this.trie=new DF,this.trie.extend(this.vocab),this.fuse_unk=!0}populate_nodes(e){let t=e.chars,n=0;for(;ne>t,t=1/0){this._heap=[],this._comparator=e,this._max_size=t}get size(){return this._heap.length}is_empty(){return this.size===0}peek(){return this._heap[0]}push(...e){return this.extend(e)}extend(e){for(let t of e)if(this.size0&&this._swap(0,t),this._heap.pop(),this._sift_down(),e}replace(e){let t=this.peek();return this._heap[0]=e,this._sift_down(),t}_parent(e){return(e+1>>>1)-1}_left(e){return(e<<1)+1}_right(e){return e+1<<1}_greater(e,t){return this._comparator(this._heap[e],this._heap[t])}_swap(e,t){let n=this._heap[e];this._heap[e]=this._heap[t],this._heap[t]=n}_sift_up(){this._sift_up_from(this.size-1)}_sift_up_from(e){for(;e>0&&this._greater(e,this._parent(e));)this._swap(e,this._parent(e)),e=this._parent(e)}_sift_down(){let e=0;for(;this._left(e)this.capacity&&this.cache.delete(this.cache.keys().next().value)}clear(){this.cache.clear()}},PF=class extends wF{constructor(e){super(e),this.tokens_to_ids=HP(e.vocab),this.unk_token_id=this.tokens_to_ids.get(e.unk_token),this.unk_token=e.unk_token,this.vocab=Array(this.tokens_to_ids.size);for(let[e,t]of this.tokens_to_ids)this.vocab[t]=e;this.merges=Array.isArray(e.merges[0])?e.merges:e.merges.map(e=>e.split(` `,2)),this.bpe_ranks=new Map(this.merges.map((e,t)=>[JSON.stringify(e),t])),this.end_of_word_suffix=e.end_of_word_suffix,this.continuing_subword_suffix=e.continuing_subword_suffix??null,this.byte_fallback=this.config.byte_fallback??!1,this.byte_fallback&&(this.text_encoder=new TextEncoder),this.ignore_merges=this.config.ignore_merges??!1,this.max_length_to_cache=256,this.cache_capacity=1e4,this.cache=new NF(this.cache_capacity)}clear_cache(){this.cache.clear()}bpe(e){if(e.length===0)return[];let t=this.cache.get(e);if(t!==void 0)return t;let n=Array.from(e);this.end_of_word_suffix&&(n[n.length-1]+=this.end_of_word_suffix);let r=[];if(n.length>1){let e=new MF((e,t)=>e.score`<0x${e.toString(16).toUpperCase().padStart(2,`0`)}>`);e.every(e=>this.tokens_to_ids.has(e))?t.push(...e):t.push(this.unk_token)}else t.push(this.unk_token)}return t}},FF=class extends wF{constructor(e,t){super(e);let n=e.vocab;this.tokens_to_ids=HP(t.target_lang?n[t.target_lang]:n),this.bos_token=t.bos_token,this.bos_token_id=this.tokens_to_ids.get(this.bos_token),this.eos_token=t.eos_token,this.eos_token_id=this.tokens_to_ids.get(this.eos_token),this.pad_token=t.pad_token,this.pad_token_id=this.tokens_to_ids.get(this.pad_token),this.unk_token=t.unk_token,this.unk_token_id=this.tokens_to_ids.get(this.unk_token),this.vocab=Array(this.tokens_to_ids.size);for(let[e,t]of this.tokens_to_ids)this.vocab[t]=e}encode(e){return e}};function IF(e,t){switch(e.type){case`WordPiece`:return new TF(e);case`Unigram`:return new jF(e,t.eos_token);case`BPE`:return new PF(e);default:if(e.vocab)return Array.isArray(e.vocab)?new jF(e,t.eos_token):Object.hasOwn(e,`continuing_subword_prefix`)&&Object.hasOwn(e,`unk_token`)?Object.hasOwn(e,`merges`)?new PF(e):new TF(e):new FF(e,{target_lang:t.target_lang,bos_token:t.bos_token,eos_token:t.eos_token,pad_token:t.pad_token,unk_token:t.unk_token});throw Error(`Unknown TokenizerModel type: ${e?.type}`)}}var LF=IF,RF=class extends qP{constructor(e){super(),this.config=e}_call(e,...t){return this.post_process(e,...t)}},zF=class extends RF{post_process(e,t=null,n=!0){let r=t===null?this.config.single:this.config.pair,i=[],a=[];for(let o of r)`SpecialToken`in o?n&&(i.push(o.SpecialToken.id),a.push(o.SpecialToken.type_id)):`Sequence`in o&&(o.Sequence.id===`A`?(i=VP(i,e),a=VP(a,Array(e.length).fill(o.Sequence.type_id))):o.Sequence.id===`B`&&(i=VP(i,t),a=VP(a,Array(t.length).fill(o.Sequence.type_id))));return{tokens:i,token_type_ids:a}}},BF=class extends RF{post_process(e,t=null){return{tokens:e,tokens_pair:t}}},VF=class extends RF{constructor(e){super(e),this.sep=e.sep,this.cls=e.cls}post_process(e,t=null,n=!0){n&&(e=VP([this.cls[0]],e,[this.sep[0]]));let r=Array(e.length).fill(0);if(t){let i=[],a=n?[this.sep[0]]:[];e=VP(e,i,t,a),r=VP(r,Array(t.length+i.length+a.length).fill(1))}return{tokens:e,token_type_ids:r}}},HF=class extends RF{constructor(e){super(e),this.sep=e.sep,this.cls=e.cls}post_process(e,t,n=!0){n&&(e=VP([this.cls[0]],e,[this.sep[0]]));let r=Array(e.length).fill(0);if(t){let i=n?[this.sep[0]]:[],a=n?[this.sep[0]]:[];e=VP(e,i,t,a),r=VP(r,Array(t.length+i.length+a.length).fill(1))}return{tokens:e,token_type_ids:r}}},UF=class extends RF{constructor(e){super(e),this.processors=(e.processors??[]).map(e=>GF(e))}post_process(e,t=null,n=!0){let r={tokens:e,tokens_pair:t};for(let e of this.processors)r=e.post_process(r.tokens,r.tokens_pair,n);return r}};function WF(e){if(e===null)return null;switch(e.type){case`TemplateProcessing`:return new zF(e);case`ByteLevel`:return new BF(e);case`BertProcessing`:return new VF(e);case`RobertaProcessing`:return new HF(e);case`Sequence`:return new UF(e);default:throw Error(`Unknown PostProcessor type: ${e.type}`)}}var GF=WF,KF=class extends qP{constructor(e){super(),this.config=e,this.added_tokens=[],this.end_of_word_suffix=null,this.trim_offsets=`trim_offsets`in e?e.trim_offsets:!1}_call(e){return this.decode(e)}decode(e){return this.decode_chain(e).join(``)}},qF=class extends KF{constructor(e){super(e),this.byte_decoder=kP,this.text_decoder=new TextDecoder(`utf-8`,{fatal:!1,ignoreBOM:!0}),this.end_of_word_suffix=null}convert_tokens_to_string(e){let t=e.join(``),n=new Uint8Array([...t].map(e=>this.byte_decoder[e]));return this.text_decoder.decode(n)}decode_chain(e){let t=[],n=[];for(let r of e)this.added_tokens.find(e=>e.content===r)===void 0?n.push(r):(n.length>0&&(t.push(this.convert_tokens_to_string(n)),n=[]),t.push(r));return n.length>0&&t.push(this.convert_tokens_to_string(n)),t}},JF=class extends KF{constructor(e){super(e),this.cleanup=e.cleanup}decode_chain(e){return e.map((e,t)=>{if(t!==0){let t=this.config.prefix;e=t&&e.startsWith(t)?e.replace(t,``):` `+e}return this.cleanup&&(e=NP(e)),e})}},YF=class extends KF{constructor(e){super(e),this.replacement=e.replacement??`▁`}decode_chain(e){let t=[];for(let n=0;nt.replaceAll(this.suffix,n===e.length-1?``:` `))}},ZF=class extends KF{constructor(e){super(e),this.pad_token=e.pad_token??``,this.word_delimiter_token=e.word_delimiter_token??``,this.cleanup=e.cleanup}convert_tokens_to_string(e){if(e.length===0)return``;let t=[e[0]];for(let n=1;ne!==this.pad_token).join(``);return this.cleanup&&(n=NP(n).replaceAll(this.word_delimiter_token,` `).trim()),n}decode_chain(e){return[this.convert_tokens_to_string(e)]}},QF=class extends KF{constructor(e){super(e),this.decoders=(e.decoders??[]).map(e=>iI(e))}decode_chain(e){return this.decoders.reduce((e,t)=>t.decode_chain(e),e)}},$F=class extends KF{decode_chain(e){let t=PP(this.config.pattern),n=this.config.content??``;return t===null?e:e.map(e=>e.replaceAll(t,n))}},eI=class extends KF{decode_chain(e){return[e.join(``)]}},tI=class extends KF{constructor(e){super(e),this.content=e.content??``,this.start=e.start??0,this.stop=e.stop??0}decode_chain(e){return e.map(e=>{let t=0;for(let n=0;n`)){let t=parseInt(r.slice(3,5),16);isNaN(t)||(e=t)}if(e!==null)n.push(e);else{if(n.length>0){let e=this.text_decoder.decode(Uint8Array.from(n));t.push(e),n=[]}t.push(r)}}if(n.length>0){let e=this.text_decoder.decode(Uint8Array.from(n));t.push(e),n=[]}return t}};function rI(e){if(e===null)return null;switch(e.type){case`ByteLevel`:return new qF(e);case`WordPiece`:return new JF(e);case`Metaspace`:return new YF(e);case`BPEDecoder`:return new XF(e);case`CTC`:return new ZF(e);case`Sequence`:return new QF(e);case`Replace`:return new $F(e);case`Fuse`:return new eI(e);case`Strip`:return new tI(e);case`ByteFallback`:return new nI(e);default:throw Error(`Unknown Decoder type: ${e.type}`)}}var iI=rI,aI=class{constructor(e,t){let n=GP(e,`Tokenizer`,[`model`,`decoder`,`post_processor`,`pre_tokenizer`,`normalizer`]);if(n)throw Error(n);let r=GP(t,`Config`);if(r)throw Error(r);this.tokenizer=e,this.config=t,this.normalizer=lF(this.tokenizer.normalizer),this.pre_tokenizer=CF(this.tokenizer.pre_tokenizer),this.model=LF(this.tokenizer.model,this.config),this.post_processor=GF(this.tokenizer.post_processor),this.decoder=iI(this.tokenizer.decoder),this.special_tokens=[],this.all_special_ids=[],this.added_tokens=[];let i=[],a=[];this.added_tokens_map=new Map;for(let e of this.tokenizer.added_tokens){let t=new DP(e);if(this.added_tokens.push(t),this.model.tokens_to_ids.set(t.content,t.id),this.model.vocab[t.id]=t.content,t.special&&(this.special_tokens.push(t.content),this.all_special_ids.push(t.id)),this.added_tokens_map.set(t.content,t),t.normalized&&this.normalizer!==null){let e=this.normalizer(t.content);a.push(e),this.added_tokens_map.set(e,t)}else i.push(t.content)}(this.config.additional_special_tokens??[]).forEach(e=>{this.special_tokens.includes(e)||this.special_tokens.push(e)}),this.decoder&&(this.decoder.added_tokens=this.added_tokens,this.decoder.end_of_word_suffix=this.model.end_of_word_suffix),this.splitter_unnormalized=new EP(i),this.splitter_normalized=new EP(a),this.remove_space=this.config.remove_space,this.clean_up_tokenization_spaces=this.config.clean_up_tokenization_spaces??!0,this.do_lowercase_and_remove_accent=this.config.do_lowercase_and_remove_accent??!1}encode(e,{text_pair:t=null,add_special_tokens:n=!0,return_token_type_ids:r=null}={}){let{tokens:i,token_type_ids:a}=this.tokenize_helper(e,{text_pair:t,add_special_tokens:n}),o=i.map(e=>this.added_tokens_map.get(e)?.id??this.model.tokens_to_ids.get(e)??this.model.unk_token_id),s={ids:o,tokens:i,attention_mask:Array(o.length).fill(1)};return r&&a&&(s.token_type_ids=a),s}decode(e,t={}){if(!Array.isArray(e)||e.length===0||!RP(e[0]))throw Error(`token_ids must be a non-empty array of integers.`);let n=e.map(e=>this.model.vocab[Number(e)]??this.model.unk_token);t.skip_special_tokens&&(n=n.filter(e=>!this.special_tokens.includes(e)));let r=this.decoder?this.decoder(n):n.join(` `);return this.decoder&&this.decoder.end_of_word_suffix&&(r=r.replaceAll(this.decoder.end_of_word_suffix,` `),t.skip_special_tokens&&(r=r.trim())),(t.clean_up_tokenization_spaces??this.clean_up_tokenization_spaces)&&(r=NP(r)),r}tokenize(e,{text_pair:t=null,add_special_tokens:n=!1}={}){return this.tokenize_helper(e,{text_pair:t,add_special_tokens:n}).tokens}encode_text(e){if(e===null)return null;let t=this.splitter_unnormalized.split(e);return t.forEach((e,n)=>{let r=this.added_tokens_map.get(e);r&&(r.lstrip&&n>0&&(t[n-1]=t[n-1].trimEnd()),r.rstrip&&n{if(e.length===0)return[];if(this.added_tokens_map.has(e))return[e];if(this.remove_space===!0&&(e=e.trim().split(/\s+/).join(` `)),this.do_lowercase_and_remove_accent&&(e=BP(e)),this.normalizer!==null&&(e=this.normalizer(e)),e.length===0)return[];let n=this.splitter_normalized.split(e);return n.forEach((e,t)=>{let r=this.added_tokens_map.get(e);r&&(r.lstrip&&t>0&&(n[t-1]=n[t-1].trimEnd()),r.rstrip&&t{if(e.length===0)return[];if(this.added_tokens_map.has(e))return[e];let n=this.pre_tokenizer===null?[e]:this.pre_tokenizer(e,{section_index:t});return this.model(n)})})}tokenize_helper(e,{text_pair:t=null,add_special_tokens:n=!0}){let r=this.encode_text(e),i=this.encode_text(t||null);return this.post_processor?this.post_processor(r,i,n):{tokens:VP(r??[],i??[])}}token_to_id(e){return this.model.tokens_to_ids.get(e)}id_to_token(e){return this.model.vocab[e]}get_added_tokens_decoder(){let e=new Map;for(let t of this.added_tokens)e.set(t.id,t);return e}get_vocab(e=!0){let t=new Map;for(let n=0;n=`,Z.ComparisonBinaryOperator],[`==`,Z.ComparisonBinaryOperator],[`!=`,Z.ComparisonBinaryOperator],[`<`,Z.ComparisonBinaryOperator],[`>`,Z.ComparisonBinaryOperator],[`+`,Z.AdditiveBinaryOperator],[`-`,Z.AdditiveBinaryOperator],[`~`,Z.AdditiveBinaryOperator],[`*`,Z.MultiplicativeBinaryOperator],[`/`,Z.MultiplicativeBinaryOperator],[`%`,Z.MultiplicativeBinaryOperator],[`=`,Z.Equals]],dI=new Map([[`n`,` +`],[`t`,` `],[`r`,`\r`],[`b`,`\b`],[`f`,`\f`],[`v`,`\v`],[`'`,`'`],[`"`,`"`],[`\\`,`\\`]]);function fI(e,t={}){return e.endsWith(` +`)&&(e=e.slice(0,-1)),t.lstrip_blocks&&(e=e.replace(/^[ \t]*({[#%-])/gm,`$1`)),t.trim_blocks&&(e=e.replace(/([#%-]})\n/g,`$1`)),e.replace(/{%\s*(end)?generation\s*%}/gs,``)}function pI(e,t={}){let n=[],r=fI(e,t),i=0,a=0,o=e=>{let t=``;for(;e(r[i]);){if(r[i]===`\\`){if(++i,i>=r.length)throw SyntaxError(`Unexpected end of input`);let e=r[i++],n=dI.get(e);if(n===void 0)throw SyntaxError(`Unexpected escaped character: ${e}`);t+=n;continue}if(t+=r[i++],i>=r.length)throw SyntaxError(`Unexpected end of input`)}return t},s=()=>{let e=n.at(-1);e&&e.type===Z.Text&&(e.value=e.value.trimEnd(),e.value===``&&n.pop())},c=()=>{for(;i0){n.push(new oI(e,Z.Text));continue}}if(r[i]===`{`&&r[i+1]===`#`){i+=2;let e=r[i]===`-`;e&&++i;let t=``;for(;r[i]!==`#`||r[i+1]!==`}`;){if(i+2>=r.length)throw SyntaxError(`Missing end of comment tag`);t+=r[i++]}let a=t.endsWith(`-`);a&&(t=t.slice(0,-1)),e&&s(),n.push(new oI(t,Z.Comment)),i+=2,a&&c();continue}if(r.slice(i,i+3)===`{%-`){s(),n.push(new oI(`{%`,Z.OpenStatement)),i+=3;continue}if(r.slice(i,i+3)===`{{-`){s(),n.push(new oI(`{{`,Z.OpenExpression)),a=0,i+=3;continue}if(o(lI),r.slice(i,i+3)===`-%}`){n.push(new oI(`%}`,Z.CloseStatement)),i+=3,c();continue}if(r.slice(i,i+3)===`-}}`){n.push(new oI(`}}`,Z.CloseExpression)),i+=3,c();continue}let t=r[i];if(t===`-`||t===`+`){let e=n.at(-1)?.type;if(e===Z.Text||e===void 0)throw SyntaxError(`Unexpected character: ${t}`);switch(e){case Z.Identifier:case Z.NumericLiteral:case Z.StringLiteral:case Z.CloseParen:case Z.CloseSquareBracket:break;default:{++i;let e=o(cI);n.push(new oI(`${t}${e}`,e.length>0?Z.NumericLiteral:Z.UnaryOperator));continue}}}for(let[e,t]of uI)if(!(e===`}}`&&a>0)&&r.slice(i,i+e.length)===e){n.push(new oI(e,t)),t===Z.OpenExpression?a=0:t===Z.OpenCurlyBracket?++a:t===Z.CloseCurlyBracket&&--a,i+=e.length;continue main}if(t===`'`||t===`"`){++i;let e=o(e=>e!==t);n.push(new oI(e,Z.StringLiteral)),++i;continue}if(cI(t)){let e=o(cI);if(r[i]===`.`&&cI(r[i+1])){++i;let t=o(cI);e=`${e}.${t}`}n.push(new oI(e,Z.NumericLiteral));continue}if(sI(t)){let e=o(sI);n.push(new oI(e,Z.Identifier));continue}throw SyntaxError(`Unexpected character: ${t}`)}return n}var mI=class{type=`Statement`},hI=class extends mI{constructor(e){super(),this.body=e}type=`Program`},gI=class extends mI{constructor(e,t,n){super(),this.test=e,this.body=t,this.alternate=n}type=`If`},_I=class extends mI{constructor(e,t,n,r){super(),this.loopvar=e,this.iterable=t,this.body=n,this.defaultBlock=r}type=`For`},vI=class extends mI{type=`Break`},yI=class extends mI{type=`Continue`},bI=class extends mI{constructor(e,t,n){super(),this.assignee=e,this.value=t,this.body=n}type=`Set`},xI=class extends mI{constructor(e,t,n){super(),this.name=e,this.args=t,this.body=n}type=`Macro`},SI=class extends mI{constructor(e){super(),this.value=e}type=`Comment`},CI=class extends mI{type=`Expression`},wI=class extends CI{constructor(e,t,n){super(),this.object=e,this.property=t,this.computed=n}type=`MemberExpression`},TI=class extends CI{constructor(e,t){super(),this.callee=e,this.args=t}type=`CallExpression`},EI=class extends CI{constructor(e){super(),this.value=e}type=`Identifier`},DI=class extends CI{constructor(e){super(),this.value=e}type=`Literal`},OI=class extends DI{type=`IntegerLiteral`},kI=class extends DI{type=`FloatLiteral`},AI=class extends DI{type=`StringLiteral`},jI=class extends DI{type=`ArrayLiteral`},MI=class extends DI{type=`TupleLiteral`},NI=class extends DI{type=`ObjectLiteral`},PI=class extends CI{constructor(e,t,n){super(),this.operator=e,this.left=t,this.right=n}type=`BinaryExpression`},FI=class extends CI{constructor(e,t){super(),this.operand=e,this.filter=t}type=`FilterExpression`},II=class extends mI{constructor(e,t){super(),this.filter=e,this.body=t}type=`FilterStatement`},LI=class extends CI{constructor(e,t){super(),this.lhs=e,this.test=t}type=`SelectExpression`},RI=class extends CI{constructor(e,t,n){super(),this.operand=e,this.negate=t,this.test=n}type=`TestExpression`},zI=class extends CI{constructor(e,t){super(),this.operator=e,this.argument=t}type=`UnaryExpression`},BI=class extends CI{constructor(e=void 0,t=void 0,n=void 0){super(),this.start=e,this.stop=t,this.step=n}type=`SliceExpression`},VI=class extends CI{constructor(e,t){super(),this.key=e,this.value=t}type=`KeywordArgumentExpression`},HI=class extends CI{constructor(e){super(),this.argument=e}type=`SpreadExpression`},UI=class extends mI{constructor(e,t,n){super(),this.call=e,this.callerArgs=t,this.body=n}type=`CallStatement`},WI=class extends CI{constructor(e,t,n){super(),this.condition=e,this.trueExpr=t,this.falseExpr=n}type=`Ternary`};function GI(e){let t=new hI([]),n=0;function r(t,r){let i=e[n++];if(!i||i.type!==t)throw Error(`Parser Error: ${r}. ${i.type} !== ${t}.`);return i}function i(e){if(!c(e))throw SyntaxError(`Expected ${e}`);++n}function a(){switch(e[n].type){case Z.Comment:return new SI(e[n++].value);case Z.Text:return l();case Z.OpenStatement:return u();case Z.OpenExpression:return d();default:throw SyntaxError(`Unexpected token type: ${e[n].type}`)}}function o(...t){return n+t.length<=e.length&&t.every((t,r)=>t===e[n+r].type)}function s(...t){return e[n]?.type===Z.OpenStatement&&e[n+1]?.type===Z.Identifier&&t.includes(e[n+1]?.value)}function c(...t){return n+t.length<=e.length&&t.every((t,r)=>e[n+r].type===`Identifier`&&t===e[n+r].value)}function l(){return new AI(r(Z.Text,`Expected text token`).value)}function u(){if(r(Z.OpenStatement,`Expected opening statement token`),e[n].type!==Z.Identifier)throw SyntaxError(`Unknown statement, got ${e[n].type}`);let t=e[n].value,c;switch(t){case`set`:++n,c=f();break;case`if`:++n,c=p(),r(Z.OpenStatement,`Expected {% token`),i(`endif`),r(Z.CloseStatement,`Expected %} token`);break;case`macro`:++n,c=m(),r(Z.OpenStatement,`Expected {% token`),i(`endmacro`),r(Z.CloseStatement,`Expected %} token`);break;case`for`:++n,c=g(),r(Z.OpenStatement,`Expected {% token`),i(`endfor`),r(Z.CloseStatement,`Expected %} token`);break;case`call`:{++n;let e=null;o(Z.OpenParen)&&(e=T());let t=ae();if(t.type!==`Identifier`)throw SyntaxError(`Expected identifier following call statement`);let l=T();r(Z.CloseStatement,`Expected closing statement token`);let u=[];for(;!s(`endcall`);)u.push(a());r(Z.OpenStatement,`Expected '{%'`),i(`endcall`),r(Z.CloseStatement,`Expected closing statement token`),c=new UI(new TI(t,l),e,u);break}case`break`:++n,r(Z.CloseStatement,`Expected closing statement token`),c=new vI;break;case`continue`:++n,r(Z.CloseStatement,`Expected closing statement token`),c=new yI;break;case`filter`:{++n;let e=ae();e instanceof EI&&o(Z.OpenParen)&&(e=w(e)),r(Z.CloseStatement,`Expected closing statement token`);let t=[];for(;!s(`endfilter`);)t.push(a());r(Z.OpenStatement,`Expected '{%'`),i(`endfilter`),r(Z.CloseStatement,`Expected '%}'`),c=new II(e,t);break}default:throw SyntaxError(`Unknown statement type: ${t}`)}return c}function d(){r(Z.OpenExpression,`Expected opening expression token`);let e=_();return r(Z.CloseExpression,`Expected closing expression token`),e}function f(){let e=h(),t=null,c=[];if(o(Z.Equals))++n,t=h();else{for(r(Z.CloseStatement,`Expected %} token`);!s(`endset`);)c.push(a());r(Z.OpenStatement,`Expected {% token`),i(`endset`)}return r(Z.CloseStatement,`Expected closing statement token`),new bI(e,t,c)}function p(){let e=_();r(Z.CloseStatement,`Expected closing statement token`);let t=[],i=[];for(;!s(`elif`,`else`,`endif`);)t.push(a());if(s(`elif`)){++n,++n;let e=p();i.push(e)}else if(s(`else`))for(++n,++n,r(Z.CloseStatement,`Expected closing statement token`);!s(`endif`);)i.push(a());return new gI(e,t,i)}function m(){let e=ae();if(e.type!==`Identifier`)throw SyntaxError(`Expected identifier following macro statement`);let t=T();r(Z.CloseStatement,`Expected closing statement token`);let n=[];for(;!s(`endmacro`);)n.push(a());return new xI(e,t,n)}function h(e=!1){let t=e?ae:_,r=[t()],i=o(Z.Comma);for(;i&&(++n,r.push(t()),o(Z.Comma)););return i?new MI(r):r[0]}function g(){let e=h(!0);if(!(e instanceof EI||e instanceof MI))throw SyntaxError(`Expected identifier/tuple for the loop variable, got ${e.type} instead`);if(!c(`in`))throw SyntaxError("Expected `in` keyword following loop variable");++n;let t=_();r(Z.CloseStatement,`Expected closing statement token`);let i=[];for(;!s(`endfor`,`else`);)i.push(a());let o=[];if(s(`else`))for(++n,++n,r(Z.CloseStatement,`Expected closing statement token`);!s(`endfor`);)o.push(a());return new _I(e,t,i,o)}function _(){return v()}function v(){let e=y();if(c(`if`)){++n;let t=y();return c(`else`)?(++n,new WI(t,e,v())):new LI(e,t)}return e}function y(){let t=b();for(;c(`or`);){let r=e[n];++n;let i=b();t=new PI(r,t,i)}return t}function b(){let t=x();for(;c(`and`);){let r=e[n];++n;let i=x();t=new PI(r,t,i)}return t}function x(){let t;for(;c(`not`);){let r=e[n];++n,t=new zI(r,x())}return t??ee()}function ee(){let t=S();for(;;){let r;if(c(`not`,`in`))r=new oI(`not in`,Z.Identifier),n+=2;else if(c(`in`))r=e[n++];else if(o(Z.ComparisonBinaryOperator))r=e[n++];else break;let i=S();t=new PI(r,t,i)}return t}function S(){let t=D();for(;o(Z.AdditiveBinaryOperator);){let r=e[n];++n;let i=D();t=new PI(r,t,i)}return t}function C(){let e=E(ae());return o(Z.OpenParen)?w(e):e}function w(e){let t=new TI(e,T());return t=E(t),o(Z.OpenParen)&&(t=w(t)),t}function T(){r(Z.OpenParen,`Expected opening parenthesis for arguments list`);let e=te();return r(Z.CloseParen,`Expected closing parenthesis for arguments list`),e}function te(){let t=[];for(;!o(Z.CloseParen);){let r;if(e[n].type===Z.MultiplicativeBinaryOperator&&e[n].value===`*`)++n,r=new HI(_());else if(r=_(),o(Z.Equals)){if(++n,!(r instanceof EI))throw SyntaxError(`Expected identifier for keyword argument`);let e=_();r=new VI(r,e)}t.push(r),o(Z.Comma)&&++n}return t}function ne(){let e=[],t=!1;for(;!o(Z.CloseSquareBracket);)o(Z.Colon)?(e.push(void 0),++n,t=!0):(e.push(_()),o(Z.Colon)&&(++n,t=!0));if(e.length===0)throw SyntaxError(`Expected at least one argument for member/slice expression`);if(t){if(e.length>3)throw SyntaxError(`Expected 0-3 arguments for slice expression`);return new BI(...e)}return e[0]}function E(t){for(;o(Z.Dot)||o(Z.OpenSquareBracket);){let i=e[n];++n;let a,o=i.type===Z.OpenSquareBracket;if(o)a=ne(),r(Z.CloseSquareBracket,`Expected closing square bracket`);else if(a=ae(),a.type!==`Identifier`)throw SyntaxError(`Expected identifier following dot operator`);t=new wI(t,a,o)}return t}function D(){let t=re();for(;o(Z.MultiplicativeBinaryOperator);){let r=e[n++],i=re();t=new PI(r,t,i)}return t}function re(){let e=ie();for(;c(`is`);){++n;let t=c(`not`);t&&++n;let r=ae();if(!(r instanceof EI))throw SyntaxError(`Expected identifier for the test`);e=new RI(e,t,r)}return e}function ie(){let e=C();for(;o(Z.Pipe);){++n;let t=ae();if(!(t instanceof EI))throw SyntaxError(`Expected identifier for the filter`);o(Z.OpenParen)&&(t=w(t)),e=new FI(e,t)}return e}function ae(){let t=e[n++];switch(t.type){case Z.NumericLiteral:{let e=t.value;return e.includes(`.`)?new kI(Number(e)):new OI(Number(e))}case Z.StringLiteral:{let r=t.value;for(;o(Z.StringLiteral);)r+=e[n++].value;return new AI(r)}case Z.Identifier:return new EI(t.value);case Z.OpenParen:{let e=h();return r(Z.CloseParen,"Expected closing parenthesis, got ${tokens[current].type} instead."),e}case Z.OpenSquareBracket:{let e=[];for(;!o(Z.CloseSquareBracket);)e.push(_()),o(Z.Comma)&&++n;return++n,new jI(e)}case Z.OpenCurlyBracket:{let e=new Map;for(;!o(Z.CloseCurlyBracket);){let t=_();r(Z.Colon,`Expected colon between key and value in object literal`);let i=_();e.set(t,i),o(Z.Comma)&&++n}return++n,new NI(e)}default:throw SyntaxError(`Unexpected token: ${t.type}`)}}for(;n0)for(let i=e;it;i+=n)r.push(i);return r}function qI(e,t,n,r=1){let i=Math.sign(r);i>=0?(t=(t??=0)<0?Math.max(e.length+t,0):Math.min(t,e.length),n=(n??=e.length)<0?Math.max(e.length+n,0):Math.min(n,e.length)):(t=(t??=e.length-1)<0?Math.max(e.length+t,-1):Math.min(t,e.length-1),n=(n??=-1)<-1?Math.max(e.length+n,-1):Math.min(n,e.length-1));let a=[];for(let o=t;i*oe.toUpperCase())}function YI(e){return XI(new Date,e)}function XI(e,t){let n=new Intl.DateTimeFormat(void 0,{month:`long`}),r=new Intl.DateTimeFormat(void 0,{month:`short`}),i=e=>e<10?`0`+e:e.toString();return t.replace(/%[YmdbBHM%]/g,t=>{switch(t){case`%Y`:return e.getFullYear().toString();case`%m`:return i(e.getMonth()+1);case`%d`:return i(e.getDate());case`%b`:return r.format(e);case`%B`:return n.format(e);case`%H`:return i(e.getHours());case`%M`:return i(e.getMinutes());case`%%`:return`%`;default:return t}})}function ZI(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function QI(e,t,n,r){if(r===0)return e;let i=r==null||r<0?1/0:r,a=t.length===0?RegExp(`(?=)`,`gu`):new RegExp(ZI(t),`gu`);return e.replaceAll(a,e=>i>0?(--i,n):e)}var $I=class extends Error{},eL=class extends Error{},tL=class{type=`RuntimeValue`;value;builtins=new Map;constructor(e=void 0){this.value=e}__bool__(){return new aL(!!this.value)}toString(){return String(this.value)}},nL=class extends tL{type=`IntegerValue`},rL=class extends tL{type=`FloatValue`;toString(){return this.value%1==0?this.value.toFixed(1):this.value.toString()}},iL=class extends tL{type=`StringValue`;builtins=new Map([[`upper`,new pL(()=>new iL(this.value.toUpperCase()))],[`lower`,new pL(()=>new iL(this.value.toLowerCase()))],[`strip`,new pL(()=>new iL(this.value.trim()))],[`title`,new pL(()=>new iL(JI(this.value)))],[`capitalize`,new pL(()=>new iL(this.value.charAt(0).toUpperCase()+this.value.slice(1)))],[`length`,new nL(this.value.length)],[`rstrip`,new pL(()=>new iL(this.value.trimEnd()))],[`lstrip`,new pL(()=>new iL(this.value.trimStart()))],[`startswith`,new pL(e=>{if(e.length===0)throw Error(`startswith() requires at least one argument`);let t=e[0];if(t instanceof iL)return new aL(this.value.startsWith(t.value));if(t instanceof dL){for(let e of t.value){if(!(e instanceof iL))throw Error(`startswith() tuple elements must be strings`);if(this.value.startsWith(e.value))return new aL(!0)}return new aL(!1)}throw Error(`startswith() argument must be a string or tuple of strings`)})],[`endswith`,new pL(e=>{if(e.length===0)throw Error(`endswith() requires at least one argument`);let t=e[0];if(t instanceof iL)return new aL(this.value.endsWith(t.value));if(t instanceof dL){for(let e of t.value){if(!(e instanceof iL))throw Error(`endswith() tuple elements must be strings`);if(this.value.endsWith(e.value))return new aL(!0)}return new aL(!1)}throw Error(`endswith() argument must be a string or tuple of strings`)})],[`split`,new pL(e=>{let t=e[0]??new mL;if(!(t instanceof iL||t instanceof mL))throw Error(`sep argument must be a string or null`);let n=e[1]??new nL(-1);if(!(n instanceof nL))throw Error(`maxsplit argument must be a number`);let r=[];if(t instanceof mL){let e=this.value.trimStart();for(let{0:t,index:i}of e.matchAll(/\S+/g)){if(n.value!==-1&&r.length>=n.value&&i!==void 0){r.push(t+e.slice(i+t.length));break}r.push(t)}}else{if(t.value===``)throw Error(`empty separator`);r=this.value.split(t.value),n.value!==-1&&r.length>n.value&&r.push(r.splice(n.value).join(t.value))}return new dL(r.map(e=>new iL(e)))})],[`replace`,new pL(e=>{if(e.length<2)throw Error(`replace() requires at least two arguments`);let t=e[0],n=e[1];if(!(t instanceof iL&&n instanceof iL))throw Error(`replace() arguments must be strings`);let r;if(r=e.length>2?e[2].type===`KeywordArgumentsValue`?e[2].value.get(`count`)??new mL:e[2]:new mL,!(r instanceof nL||r instanceof mL))throw Error(`replace() count argument must be a number or null`);return new iL(QI(this.value,t.value,n.value,r.value))})]])},aL=class extends tL{type=`BooleanValue`},oL=/[\x7f-\uffff]/g;function sL(e){return e.replace(oL,e=>`\\u`+e.charCodeAt(0).toString(16).padStart(4,`0`))}function cL(e,t={},n=0,r=!0){let{indent:i=null,ensureAscii:a=!1,separators:o=null,sortKeys:s=!1}=t,c,l;switch(o?[c,l]=o:i?(c=`,`,l=`: `):(c=`, `,l=`: `),e.type){case`NullValue`:return`null`;case`UndefinedValue`:return r?`null`:`undefined`;case`IntegerValue`:case`FloatValue`:case`BooleanValue`:return JSON.stringify(e.value);case`StringValue`:{let t=JSON.stringify(e.value);return a&&(t=sL(t)),t}case`ArrayValue`:case`ObjectValue`:{let o=i?` `.repeat(i):``,u=` +`+o.repeat(n),d=u+o;if(e.type===`ArrayValue`){let a=e.value.map(e=>cL(e,t,n+1,r));return i?`[${d}${a.join(`${c}${d}`)}${u}]`:`[${a.join(c)}]`}else{let o=Array.from(e.value.entries());s&&(o=o.sort(([e],[t])=>e.localeCompare(t)));let f=o.map(([e,o])=>{let s=JSON.stringify(e);a&&(s=sL(s));let c=`${s}${l}${cL(o,t,n+1,r)}`;return i?`${d}${c}`:c});return i?`{${f.join(c)}${u}}`:`{${f.join(c)}}`}}default:throw Error(`Cannot convert to JSON: ${e.type}`)}}var lL=class extends tL{type=`ObjectValue`;__bool__(){return new aL(this.value.size>0)}builtins=new Map([[`get`,new pL(([e,t])=>{if(!(e instanceof iL))throw Error(`Object key must be a string: got ${e.type}`);return this.value.get(e.value)??t??new mL})],[`items`,new pL(()=>this.items())],[`keys`,new pL(()=>this.keys())],[`values`,new pL(()=>this.values())],[`dictsort`,new pL(e=>{let t=new Map,n=e.filter(e=>e instanceof uL?(t=e.value,!1):!0),r=n.at(0)??t.get(`case_sensitive`)??new aL(!1);if(!(r instanceof aL))throw Error(`case_sensitive must be a boolean`);let i=n.at(1)??t.get(`by`)??new iL(`key`);if(!(i instanceof iL))throw Error(`by must be a string`);if(![`key`,`value`].includes(i.value))throw Error(`by must be either 'key' or 'value'`);let a=n.at(2)??t.get(`reverse`)??new aL(!1);if(!(a instanceof aL))throw Error(`reverse must be a boolean`);return new dL(Array.from(this.value.entries()).map(([e,t])=>new dL([new iL(e),t])).sort((e,t)=>{let n=i.value===`key`?0:1,o=e.value[n],s=t.value[n],c=yL(o,s,r.value);return a.value?-c:c}))})]]);items(){return new dL(Array.from(this.value.entries()).map(([e,t])=>new dL([new iL(e),t])))}keys(){return new dL(Array.from(this.value.keys()).map(e=>new iL(e)))}values(){return new dL(Array.from(this.value.values()))}toString(){return cL(this,{},0,!1)}},uL=class extends lL{type=`KeywordArgumentsValue`},dL=class extends tL{type=`ArrayValue`;builtins=new Map([[`length`,new nL(this.value.length)]]);__bool__(){return new aL(this.value.length>0)}toString(){return cL(this,{},0,!1)}},fL=class extends dL{type=`TupleValue`},pL=class extends tL{type=`FunctionValue`},mL=class extends tL{type=`NullValue`},hL=class extends tL{type=`UndefinedValue`},gL=class{constructor(e){this.parent=e}variables=new Map([[`namespace`,new pL(e=>{if(e.length===0)return new lL(new Map);if(e.length!==1||!(e[0]instanceof lL))throw Error("`namespace` expects either zero arguments or a single object argument");return e[0]})]]);tests=new Map([[`boolean`,e=>e.type===`BooleanValue`],[`callable`,e=>e instanceof pL],[`odd`,e=>{if(!(e instanceof nL))throw Error(`cannot odd on ${e.type}`);return e.value%2!=0}],[`even`,e=>{if(!(e instanceof nL))throw Error(`cannot even on ${e.type}`);return e.value%2==0}],[`false`,e=>e.type===`BooleanValue`&&!e.value],[`true`,e=>e.type===`BooleanValue`&&e.value],[`none`,e=>e.type===`NullValue`],[`string`,e=>e.type===`StringValue`],[`number`,e=>e instanceof nL||e instanceof rL],[`integer`,e=>e instanceof nL],[`iterable`,e=>e.type===`ArrayValue`||e.type===`StringValue`],[`mapping`,e=>e.type===`ObjectValue`],[`lower`,e=>{let t=e.value;return e.type===`StringValue`&&t===t.toLowerCase()}],[`upper`,e=>{let t=e.value;return e.type===`StringValue`&&t===t.toUpperCase()}],[`none`,e=>e.type===`NullValue`],[`defined`,e=>e.type!==`UndefinedValue`],[`undefined`,e=>e.type===`UndefinedValue`],[`equalto`,(e,t)=>e.value===t.value],[`eq`,(e,t)=>e.value===t.value]]);set(e,t){return this.declareVariable(e,xL(t))}declareVariable(e,t){if(this.variables.has(e))throw SyntaxError(`Variable already declared: ${e}`);return this.variables.set(e,t),t}setVariable(e,t){return this.variables.set(e,t),t}resolve(e){if(this.variables.has(e))return this;if(this.parent)return this.parent.resolve(e);throw Error(`Unknown variable: ${e}`)}lookupVariable(e){try{return this.resolve(e).variables.get(e)??new hL}catch{return new hL}}};function _L(e){e.set(`false`,!1),e.set(`true`,!0),e.set(`none`,null),e.set(`raise_exception`,e=>{throw Error(e)}),e.set(`range`,KI),e.set(`strftime_now`,YI),e.set(`True`,!0),e.set(`False`,!1),e.set(`None`,null)}function vL(e,t){let n=t.split(`.`),r=e;for(let e of n)if(r instanceof lL)r=r.value.get(e)??new hL;else if(r instanceof dL){let t=parseInt(e,10);if(!isNaN(t)&&t>=0&&te instanceof nL||e instanceof rL||e instanceof aL,i=e=>e instanceof aL?e.value?1:0:e.value;if(r(e)&&r(t)){let n=i(e),r=i(t);return nr?1:0}if(e.type!==t.type)throw Error(`Cannot compare different types: ${e.type} and ${t.type}`);switch(e.type){case`StringValue`:{let r=e.value,i=t.value;return n||(r=r.toLowerCase(),i=i.toLowerCase()),ri?1:0}default:throw Error(`Cannot compare type: ${e.type}`)}}var bL=class{global;constructor(e){this.global=e??new gL}run(e){return this.evaluate(e,this.global)}evaluateBinaryExpression(e,t){let n=this.evaluate(e.left,t);switch(e.operator.value){case`and`:return n.__bool__().value?this.evaluate(e.right,t):n;case`or`:return n.__bool__().value?n:this.evaluate(e.right,t)}let r=this.evaluate(e.right,t);switch(e.operator.value){case`==`:return new aL(n.value==r.value);case`!=`:return new aL(n.value!=r.value)}if(n instanceof hL||r instanceof hL){if(r instanceof hL&&[`in`,`not in`].includes(e.operator.value))return new aL(e.operator.value===`not in`);throw Error(`Cannot perform operation ${e.operator.value} on undefined values`)}else if(n instanceof mL||r instanceof mL)throw Error(`Cannot perform operation on null values`);else if(e.operator.value===`~`)return new iL(n.value.toString()+r.value.toString());else if((n instanceof nL||n instanceof rL)&&(r instanceof nL||r instanceof rL)){let t=n.value,i=r.value;switch(e.operator.value){case`+`:case`-`:case`*`:{let a=e.operator.value===`+`?t+i:e.operator.value===`-`?t-i:t*i;return n instanceof rL||r instanceof rL?new rL(a):new nL(a)}case`/`:return new rL(t/i);case`%`:{let e=t%i;return n instanceof rL||r instanceof rL?new rL(e):new nL(e)}case`<`:return new aL(t`:return new aL(t>i);case`>=`:return new aL(t>=i);case`<=`:return new aL(t<=i)}}else if(n instanceof dL&&r instanceof dL)switch(e.operator.value){case`+`:return new dL(n.value.concat(r.value))}else if(r instanceof dL){let t=r.value.find(e=>e.value===n.value)!==void 0;switch(e.operator.value){case`in`:return new aL(t);case`not in`:return new aL(!t)}}if(n instanceof iL||r instanceof iL)switch(e.operator.value){case`+`:return new iL(n.value.toString()+r.value.toString())}if(n instanceof iL&&r instanceof iL)switch(e.operator.value){case`in`:return new aL(r.value.includes(n.value));case`not in`:return new aL(!r.value.includes(n.value))}if(n instanceof iL&&r instanceof lL)switch(e.operator.value){case`in`:return new aL(r.value.has(n.value));case`not in`:return new aL(!r.value.has(n.value))}throw SyntaxError(`Unknown operator "${e.operator.value}" between ${n.type} and ${r.type}`)}evaluateArguments(e,t){let n=[],r=new Map;for(let i of e)if(i.type===`SpreadExpression`){let e=i,r=this.evaluate(e.argument,t);if(!(r instanceof dL))throw Error(`Cannot unpack non-iterable type: ${r.type}`);for(let e of r.value)n.push(e)}else if(i.type===`KeywordArgumentExpression`){let e=i;r.set(e.key.value,this.evaluate(e.value,t))}else{if(r.size>0)throw Error(`Positional arguments must come before keyword arguments`);n.push(this.evaluate(i,t))}return[n,r]}applyFilter(e,t,n){if(t.type===`Identifier`){let r=t;if(r.value===`tojson`)return new iL(cL(e,{}));if(e instanceof dL)switch(r.value){case`list`:return e;case`first`:return e.value[0];case`last`:return e.value[e.value.length-1];case`length`:return new nL(e.value.length);case`reverse`:return new dL(e.value.slice().reverse());case`sort`:return new dL(e.value.slice().sort((e,t)=>yL(e,t,!1)));case`join`:return new iL(e.value.map(e=>e.value).join(``));case`string`:return new iL(cL(e,{},0,!1));case`unique`:{let t=new Set,n=[];for(let r of e.value)t.has(r.value)||(t.add(r.value),n.push(r));return new dL(n)}default:throw Error(`Unknown ArrayValue filter: ${r.value}`)}else if(e instanceof iL)switch(r.value){case`length`:case`upper`:case`lower`:case`title`:case`capitalize`:{let t=e.builtins.get(r.value);if(t instanceof pL)return t.value([],n);if(t instanceof nL)return t;throw Error(`Unknown StringValue filter: ${r.value}`)}case`trim`:return new iL(e.value.trim());case`indent`:return new iL(e.value.split(` +`).map((e,t)=>t===0||e.length===0?e:` `+e).join(` +`));case`join`:case`string`:return e;case`int`:{let t=parseInt(e.value,10);return new nL(isNaN(t)?0:t)}case`float`:{let t=parseFloat(e.value);return new rL(isNaN(t)?0:t)}default:throw Error(`Unknown StringValue filter: ${r.value}`)}else if(e instanceof nL||e instanceof rL)switch(r.value){case`abs`:return e instanceof nL?new nL(Math.abs(e.value)):new rL(Math.abs(e.value));case`int`:return new nL(Math.floor(e.value));case`float`:return new rL(e.value);default:throw Error(`Unknown NumericValue filter: ${r.value}`)}else if(e instanceof lL)switch(r.value){case`items`:return new dL(Array.from(e.value.entries()).map(([e,t])=>new dL([new iL(e),t])));case`length`:return new nL(e.value.size);default:{let t=e.builtins.get(r.value);if(t)return t instanceof pL?t.value([],n):t;throw Error(`Unknown ObjectValue filter: ${r.value}`)}}else if(e instanceof aL)switch(r.value){case`bool`:return new aL(e.value);case`int`:return new nL(e.value?1:0);case`float`:return new rL(e.value?1:0);case`string`:return new iL(e.value?`true`:`false`);default:throw Error(`Unknown BooleanValue filter: ${r.value}`)}throw Error(`Cannot apply filter "${r.value}" to type: ${e.type}`)}else if(t.type===`CallExpression`){let r=t;if(r.callee.type!==`Identifier`)throw Error(`Unknown filter: ${r.callee.type}`);let i=r.callee.value;if(i===`tojson`){let[,t]=this.evaluateArguments(r.args,n),i=t.get(`indent`)??new mL;if(!(i instanceof nL||i instanceof mL))throw Error(`If set, indent must be a number`);let a=t.get(`ensure_ascii`)??new aL(!1);if(!(a instanceof aL))throw Error(`If set, ensure_ascii must be a boolean`);let o=t.get(`sort_keys`)??new aL(!1);if(!(o instanceof aL))throw Error(`If set, sort_keys must be a boolean`);let s=t.get(`separators`)??new mL,c=null;if(s instanceof dL||s instanceof fL){if(s.value.length!==2)throw Error(`separators must be a tuple of two strings`);let[e,t]=s.value;if(!(e instanceof iL)||!(t instanceof iL))throw Error(`separators must be a tuple of two strings`);c=[e.value,t.value]}else if(!(s instanceof mL))throw Error(`If set, separators must be a tuple of two strings`);return new iL(cL(e,{indent:i.value,ensureAscii:a.value,sortKeys:o.value,separators:c}))}else if(i===`join`){let t;if(e instanceof iL)t=Array.from(e.value);else if(e instanceof dL)t=e.value.map(e=>e.value);else throw Error(`Cannot apply filter "${i}" to type: ${e.type}`);let[a,o]=this.evaluateArguments(r.args,n),s=a.at(0)??o.get(`separator`)??new iL(``);if(!(s instanceof iL))throw Error(`separator must be a string`);return new iL(t.join(s.value))}else if(i===`int`||i===`float`){let[t,a]=this.evaluateArguments(r.args,n),o=t.at(0)??a.get(`default`)??(i===`int`?new nL(0):new rL(0));if(e instanceof iL){let t=i===`int`?parseInt(e.value,10):parseFloat(e.value);return isNaN(t)?o:i===`int`?new nL(t):new rL(t)}else if(e instanceof nL||e instanceof rL)return e;else if(e instanceof aL)return i===`int`?new nL(e.value?1:0):new rL(e.value?1:0);else throw Error(`Cannot apply filter "${i}" to type: ${e.type}`)}else if(i===`default`){let[t,i]=this.evaluateArguments(r.args,n),a=t[0]??new iL(``),o=t[1]??i.get(`boolean`)??new aL(!1);if(!(o instanceof aL))throw Error("`default` filter flag must be a boolean");return e instanceof hL||o.value&&!e.__bool__().value?a:e}if(e instanceof dL){switch(i){case`sort`:{let[t,i]=this.evaluateArguments(r.args,n),a=t.at(0)??i.get(`reverse`)??new aL(!1);if(!(a instanceof aL))throw Error(`reverse must be a boolean`);let o=t.at(1)??i.get(`case_sensitive`)??new aL(!1);if(!(o instanceof aL))throw Error(`case_sensitive must be a boolean`);let s=t.at(2)??i.get(`attribute`)??new mL;if(!(s instanceof iL||s instanceof nL||s instanceof mL))throw Error(`attribute must be a string, integer, or null`);let c=e=>s instanceof mL?e:vL(e,s instanceof nL?String(s.value):s.value);return new dL(e.value.slice().sort((e,t)=>{let n=yL(c(e),c(t),o.value);return a.value?-n:n}))}case`selectattr`:case`rejectattr`:{let t=i===`selectattr`;if(e.value.some(e=>!(e instanceof lL)))throw Error(`\`${i}\` can only be applied to array of objects`);if(r.args.some(e=>e.type!==`StringLiteral`))throw Error(`arguments of \`${i}\` must be strings`);let[a,o,s]=r.args.map(e=>this.evaluate(e,n)),c;if(o){let e=n.tests.get(o.value);if(!e)throw Error(`Unknown test: ${o.value}`);c=e}else c=(...e)=>e[0].__bool__().value;return new dL(e.value.filter(e=>{let n=e.value.get(a.value),r=n?c(n,s):!1;return t?r:!r}))}case`map`:{let[,t]=this.evaluateArguments(r.args,n);if(t.has(`attribute`)){let n=t.get(`attribute`);if(!(n instanceof iL))throw Error(`attribute must be a string`);let r=t.get(`default`);return new dL(e.value.map(e=>{if(!(e instanceof lL))throw Error(`items in map must be an object`);let t=vL(e,n.value);return t instanceof hL?r??new hL:t}))}else throw Error("`map` expressions without `attribute` set are not currently supported.")}}throw Error(`Unknown ArrayValue filter: ${i}`)}else if(e instanceof iL){switch(i){case`indent`:{let[t,i]=this.evaluateArguments(r.args,n),a=t.at(0)??i.get(`width`)??new nL(4);if(!(a instanceof nL))throw Error(`width must be a number`);let o=t.at(1)??i.get(`first`)??new aL(!1),s=t.at(2)??i.get(`blank`)??new aL(!1),c=e.value.split(` +`),l=` `.repeat(a.value);return new iL(c.map((e,t)=>!o.value&&t===0||!s.value&&e.length===0?e:l+e).join(` +`))}case`replace`:{let t=e.builtins.get(`replace`);if(!(t instanceof pL))throw Error(`replace filter not available`);let[i,a]=this.evaluateArguments(r.args,n);return t.value([...i,new uL(a)],n)}}throw Error(`Unknown StringValue filter: ${i}`)}else if(e instanceof lL){let t=e.builtins.get(i);if(t&&t instanceof pL){let[e,i]=this.evaluateArguments(r.args,n);return i.size>0&&e.push(new uL(i)),t.value(e,n)}throw Error(`Unknown ObjectValue filter: ${i}`)}else throw Error(`Cannot apply filter "${i}" to type: ${e.type}`)}throw Error(`Unknown filter: ${t.type}`)}evaluateFilterExpression(e,t){let n=this.evaluate(e.operand,t);return this.applyFilter(n,e.filter,t)}evaluateTestExpression(e,t){let n=this.evaluate(e.operand,t),r=t.tests.get(e.test.value);if(!r)throw Error(`Unknown test: ${e.test.value}`);let i=r(n);return new aL(e.negate?!i:i)}evaluateSelectExpression(e,t){return this.evaluate(e.test,t).__bool__().value?this.evaluate(e.lhs,t):new hL}evaluateUnaryExpression(e,t){let n=this.evaluate(e.argument,t);switch(e.operator.value){case`not`:return new aL(!n.value);default:throw SyntaxError(`Unknown operator: ${e.operator.value}`)}}evaluateTernaryExpression(e,t){return this.evaluate(e.condition,t).__bool__().value?this.evaluate(e.trueExpr,t):this.evaluate(e.falseExpr,t)}evalProgram(e,t){return this.evaluateBlock(e.body,t)}evaluateBlock(e,t){let n=``;for(let r of e){let e=this.evaluate(r,t);e.type!==`NullValue`&&e.type!==`UndefinedValue`&&(n+=e.toString())}return new iL(n)}evaluateIdentifier(e,t){return t.lookupVariable(e.value)}evaluateCallExpression(e,t){let[n,r]=this.evaluateArguments(e.args,t);r.size>0&&n.push(new uL(r));let i=this.evaluate(e.callee,t);if(i.type!==`FunctionValue`)throw Error(`Cannot call something that is not a function: got ${i.type}`);return i.value(n,t)}evaluateSliceExpression(e,t,n){if(!(e instanceof dL||e instanceof iL))throw Error(`Slice object must be an array or string`);let r=this.evaluate(t.start,n),i=this.evaluate(t.stop,n),a=this.evaluate(t.step,n);if(!(r instanceof nL||r instanceof hL))throw Error(`Slice start must be numeric or undefined`);if(!(i instanceof nL||i instanceof hL))throw Error(`Slice stop must be numeric or undefined`);if(!(a instanceof nL||a instanceof hL))throw Error(`Slice step must be numeric or undefined`);return e instanceof dL?new dL(qI(e.value,r.value,i.value,a.value)):new iL(qI(Array.from(e.value),r.value,i.value,a.value).join(``))}evaluateMemberExpression(e,t){let n=this.evaluate(e.object,t),r;if(e.computed){if(e.property.type===`SliceExpression`)return this.evaluateSliceExpression(n,e.property,t);r=this.evaluate(e.property,t)}else r=new iL(e.property.value);let i;if(n instanceof lL){if(!(r instanceof iL))throw Error(`Cannot access property with non-string: got ${r.type}`);i=n.value.get(r.value)??n.builtins.get(r.value)}else if(n instanceof dL||n instanceof iL)if(r instanceof nL)i=n.value.at(r.value),n instanceof iL&&(i=new iL(n.value.at(r.value)));else if(r instanceof iL)i=n.builtins.get(r.value);else throw Error(`Cannot access property with non-string/non-number: got ${r.type}`);else{if(!(r instanceof iL))throw Error(`Cannot access property with non-string: got ${r.type}`);i=n.builtins.get(r.value)}return i instanceof tL?i:new hL}evaluateSet(e,t){let n=e.value?this.evaluate(e.value,t):this.evaluateBlock(e.body,t);if(e.assignee.type===`Identifier`){let r=e.assignee.value;t.setVariable(r,n)}else if(e.assignee.type===`TupleLiteral`){let r=e.assignee;if(!(n instanceof dL))throw Error(`Cannot unpack non-iterable type in set: ${n.type}`);let i=n.value;if(i.length!==r.value.length)throw Error(`Too ${r.value.length>i.length?`few`:`many`} items to unpack in set`);for(let e=0;et.setVariable(e.loopvar.value,c);else if(e.loopvar.type===`TupleLiteral`){let t=e.loopvar;if(c.type!==`ArrayValue`)throw Error(`Cannot unpack non-iterable type: ${c.type}`);let n=c;if(t.value.length!==n.value.length)throw Error(`Too ${t.value.length>n.value.length?`few`:`many`} items to unpack`);l=e=>{for(let r=0;r0?a[t-1]:new hL],[`nextitem`,t{let r=new gL(n);t=t.slice();let i;t.at(-1)?.type===`KeywordArgumentsValue`&&(i=t.pop());for(let n=0;n{let r=new gL(n);if(e.callerArgs)for(let n=0;nthis.evaluate(e,t)));case`TupleLiteral`:return new fL(e.value.map(e=>this.evaluate(e,t)));case`ObjectLiteral`:{let n=new Map;for(let[r,i]of e.value){let e=this.evaluate(r,t);if(!(e instanceof iL))throw Error(`Object keys must be strings: got ${e.type}`);n.set(e.value,this.evaluate(i,t))}return new lL(n)}case`Identifier`:return this.evaluateIdentifier(e,t);case`CallExpression`:return this.evaluateCallExpression(e,t);case`MemberExpression`:return this.evaluateMemberExpression(e,t);case`UnaryExpression`:return this.evaluateUnaryExpression(e,t);case`BinaryExpression`:return this.evaluateBinaryExpression(e,t);case`FilterExpression`:return this.evaluateFilterExpression(e,t);case`FilterStatement`:return this.evaluateFilterStatement(e,t);case`TestExpression`:return this.evaluateTestExpression(e,t);case`SelectExpression`:return this.evaluateSelectExpression(e,t);case`Ternary`:return this.evaluateTernaryExpression(e,t);case`Comment`:return new mL;default:throw SyntaxError(`Unknown node type: ${e.type}`)}}};function xL(e){switch(typeof e){case`number`:return Number.isInteger(e)?new nL(e):new rL(e);case`string`:return new iL(e);case`boolean`:return new aL(e);case`undefined`:return new hL;case`object`:return e===null?new mL:Array.isArray(e)?new dL(e.map(xL)):new lL(new Map(Object.entries(e).map(([e,t])=>[e,xL(t)])));case`function`:return new pL((t,n)=>xL(e(...t.map(e=>e.value))??null));default:throw Error(`Cannot convert to runtime value: ${e}`)}}var SL=` +`,CL=`{%- `,wL=` -%}`;function TL(e){switch(e.operator.type){case`MultiplicativeBinaryOperator`:return 4;case`AdditiveBinaryOperator`:return 3;case`ComparisonBinaryOperator`:return 2;case`Identifier`:return e.operator.value===`and`?1:e.operator.value===`in`||e.operator.value===`not in`?2:0}return 0}function EL(e,t=` `){let n=typeof t==`number`?` `.repeat(t):t;return OL(e.body,0,n).replace(/\n$/,``)}function DL(...e){return CL+e.join(` `)+wL}function OL(e,t,n){return e.map(e=>kL(e,t,n)).join(SL)}function kL(e,t,n){let r=n.repeat(t);switch(e.type){case`Program`:return OL(e.body,t,n);case`If`:return AL(e,t,n);case`For`:return jL(e,t,n);case`Set`:return ML(e,t,n);case`Macro`:return NL(e,t,n);case`Break`:return r+DL(`break`);case`Continue`:return r+DL(`continue`);case`CallStatement`:return PL(e,t,n);case`FilterStatement`:return FL(e,t,n);case`Comment`:return r+`{# `+e.value+` #}`;default:return r+`{{- `+IL(e)+` -}}`}}function AL(e,t,n){let r=n.repeat(t),i=[],a=e;for(;a&&(i.push({test:a.test,body:a.body}),a.alternate.length===1&&a.alternate[0].type===`If`);)a=a.alternate[0];let o=r+DL(`if`,IL(i[0].test))+SL+OL(i[0].body,t+1,n);for(let e=1;e0&&(o+=SL+r+DL(`else`)+SL+OL(a.alternate,t+1,n)),o+=SL+r+DL(`endif`),o}function jL(e,t,n){let r=n.repeat(t),i=``;if(e.iterable.type===`SelectExpression`){let t=e.iterable;i=`${IL(t.lhs)} if ${IL(t.test)}`}else i=IL(e.iterable);let a=r+DL(`for`,IL(e.loopvar),`in`,i)+SL+OL(e.body,t+1,n);return e.defaultBlock.length>0&&(a+=SL+r+DL(`else`)+SL+OL(e.defaultBlock,t+1,n)),a+=SL+r+DL(`endfor`),a}function ML(e,t,n){let r=n.repeat(t),i=IL(e.assignee),a=e.value?IL(e.value):``,o=r+DL(`set`,`${i}${e.value?` = `+a:``}`);return e.body.length===0?o:o+SL+OL(e.body,t+1,n)+SL+r+DL(`endset`)}function NL(e,t,n){let r=n.repeat(t),i=e.args.map(IL).join(`, `);return r+DL(`macro`,`${e.name.value}(${i})`)+SL+OL(e.body,t+1,n)+SL+r+DL(`endmacro`)}function PL(e,t,n){let r=n.repeat(t),i=e.callerArgs&&e.callerArgs.length>0?`(${e.callerArgs.map(IL).join(`, `)})`:``,a=IL(e.call),o=r+DL(`call${i}`,a)+SL;return o+=OL(e.body,t+1,n)+SL,o+=r+DL(`endcall`),o}function FL(e,t,n){let r=n.repeat(t),i=r+DL(`filter`,e.filter.type===`Identifier`?e.filter.value:IL(e.filter))+SL;return i+=OL(e.body,t+1,n)+SL,i+=r+DL(`endfilter`),i}function IL(e,t=-1){switch(e.type){case`SpreadExpression`:return`*${IL(e.argument)}`;case`Identifier`:return e.value;case`IntegerLiteral`:return`${e.value}`;case`FloatLiteral`:return`${e.value}`;case`StringLiteral`:return JSON.stringify(e.value);case`BinaryExpression`:{let n=e,r=TL(n),i=IL(n.left,r),a=IL(n.right,r+1),o=`${i} ${n.operator.value} ${a}`;return r`${IL(e)}: ${IL(t)}`).join(`, `)}}`;case`SliceExpression`:{let t=e;return`${t.start?IL(t.start):``}:${t.stop?IL(t.stop):``}${t.step?`:${IL(t.step)}`:``}`}case`KeywordArgumentExpression`:{let t=e;return`${t.key.value}=${IL(t.value)}`}case`Ternary`:{let n=e,r=`${IL(n.trueExpr)} if ${IL(n.condition,0)} else ${IL(n.falseExpr)}`;return t>-1?`(${r})`:r}default:throw Error(`Unknown expression type: ${e.type}`)}}var LL=class{parsed;constructor(e){this.parsed=GI(pI(e,{lstrip_blocks:!0,trim_blocks:!0}))}render(e){let t=new gL;if(_L(t),e)for(let[n,r]of Object.entries(e))t.set(n,r);return new bL(t).run(this.parsed).value}format(e){return EL(this.parsed,e?.indent||` `)}},RL=class{constructor(){let e=function(...t){return e._call(...t)};return Object.setPrototypeOf(e,new.target.prototype)}_call(...e){throw Error(`Must implement _call method in subclass`)}},zL={txt:`text/plain`,html:`text/html`,css:`text/css`,js:`text/javascript`,json:`application/json`,png:`image/png`,jpg:`image/jpeg`,jpeg:`image/jpeg`,gif:`image/gif`},BL=class e{constructor(e){if(this.filePath=e,this.headers=new Headers,this.exists=RN.existsSync(e),this.exists){this.status=200,this.statusText=`OK`;let t=RN.statSync(e);this.headers.set(`content-length`,t.size.toString()),this.updateContentType();let n=RN.createReadStream(e);this.body=new ReadableStream({start(e){n.on(`data`,t=>e.enqueue(t)),n.on(`end`,()=>e.close()),n.on(`error`,t=>e.error(t))},cancel(){n.destroy()}})}else this.status=404,this.statusText=`Not Found`,this.body=null}updateContentType(){let e=this.filePath.toString().split(`.`).pop().toLowerCase();this.headers.set(`content-type`,zL[e]??`application/octet-stream`)}clone(){let t=new e(this.filePath);return t.exists=this.exists,t.status=this.status,t.statusText=this.statusText,t.headers=new Headers(this.headers),t}async arrayBuffer(){return(await RN.promises.readFile(this.filePath)).buffer}async blob(){let e=await RN.promises.readFile(this.filePath);return new Blob([e],{type:this.headers.get(`content-type`)})}async text(){return await RN.promises.readFile(this.filePath,`utf8`)}async json(){return JSON.parse(await this.text())}},VL=class{constructor(e){this._mt=new Uint32Array(624),this._idx=625,this._gauss_next=null,this._random_fn=this.random.bind(this),this.seed(e)}seed(e){if(e==null)if(aP.IS_CRYPTO_AVAILABLE){let t=new Uint32Array(1);crypto.getRandomValues(t),e=t[0]}else e=Date.now()>>>0;let t=this._mt,n=(e,t)=>Math.imul(e,t)>>>0,r=[];for(let t=e||0;t>0;t=Math.floor(t/4294967296))r.push(t&4294967295);r.length||r.push(0),t[0]=19650218;for(let e=1;e<624;++e)t[e]=n(1812433253,t[e-1]^t[e-1]>>>30)+e>>>0;let i=1,a=0;for(let e=Math.max(624,r.length);e>0;--e,++i,++a)i>=624&&(t[0]=t[623],i=1),a>=r.length&&(a=0),t[i]=(t[i]^n(t[i-1]^t[i-1]>>>30,1664525))+r[a]+a>>>0;for(let e=623;e>0;--e,++i)i>=624&&(t[0]=t[623],i=1),t[i]=(t[i]^n(t[i-1]^t[i-1]>>>30,1566083941))-i>>>0;t[0]=2147483648,this._idx=624,this._gauss_next=null}_int32(){let e=this._mt;if(this._idx>=624){for(let t=0;t<624;++t){let n=e[t]&2147483648|e[(t+1)%624]&2147483647;e[t]=(e[(t+397)%624]^n>>>1^(n&1?2567483615:0))>>>0}this._idx=0}let t=e[this._idx++];return t^=t>>>11,t^=t<<7&2636928640,t^=t<<15&4022730752,t^=t>>>18,t>>>0}random(){return((this._int32()>>>5)*67108864+(this._int32()>>>6))/9007199254740992}gauss(e=0,t=1){let n=this._gauss_next;if(this._gauss_next=null,n===null){let e=this.random()*2*Math.PI,t=Math.sqrt(-2*Math.log(1-this.random()));n=Math.cos(e)*t,this._gauss_next=Math.sin(e)*t}return e+n*t}shuffle(e){for(let t=e.length-1;t>0;--t){let n=32-Math.clz32(t+1),r=this._int32()>>>32-n;for(;r>t;)r=this._int32()>>>32-n;let i=e[t];e[t]=e[r],e[r]=i}}choices(e,t){return e[HL(this._random_fn,t)]}};function HL(e,t){let n=0;for(let e=0;eHL(WL.random,e),KL=new VL,qL=class{constructor(e){this.path=e}async match(e){let t=new BL(zN.join(this.path,e));if(t.exists)return t}async put(e,t,n=void 0){let r=zN.join(this.path,e),i=r+`.tmp.${aP.IS_PROCESS_AVAILABLE?process.pid:Date.now()}.${KL._int32().toString(36)}`;try{let e=t.headers.get(`Content-Length`),a=parseInt(e??`0`),o=0;await RN.promises.mkdir(zN.dirname(r),{recursive:!0});let s=RN.createWriteStream(i),c=t.body.getReader();for(;;){let{done:e,value:t}=await c.read();if(e)break;await new Promise((e,n)=>{s.write(t,t=>{if(t){n(t);return}e()})}),o+=t.length;let r=a?o/a*100:0;n?.({progress:r,loaded:o,total:a})}await new Promise((e,t)=>{s.close(n=>n?t(n):e())}),await RN.promises.rename(i,r)}catch(e){try{await RN.promises.unlink(i)}catch{}throw e}}async delete(e){let t=zN.join(this.path,e);try{return await RN.promises.unlink(t),!0}catch{return!1}}},JL={400:`Bad request error occurred while trying to load file`,401:`Unauthorized access to file`,403:`Forbidden access to file`,404:`Could not locate file`,408:`Request timeout error occurred while trying to load file`,500:`Internal server error error occurred while trying to load file`,502:`Bad gateway error occurred while trying to load file`,503:`Service unavailable error occurred while trying to load file`,504:`Gateway timeout error occurred while trying to load file`},YL=100,XL=/^(\b[\w\-.]+\b\/)?\b[\w\-.]{1,96}\b$/;function ZL(...e){return e=e.map((t,n)=>(n&&(t=t.replace(RegExp(`^/`),``)),n!==e.length-1&&(t=t.replace(RegExp(`/$`),``)),t)),e.join(`/`)}function QL(e,t=null,n=null){let r;try{r=new URL(e)}catch{return!1}return!(t&&!t.includes(r.protocol)||n&&!n.includes(r.hostname))}function $L(e){return!(!XL.test(e)||e.includes(`..`)||e.includes(`--`)||e.endsWith(`.git`)||e.endsWith(`.ipynb`))}function eR(e,t,n){if(!n)return null;let r=JL[e]??`Error (${e}) occurred while trying to load file`;throw Error(`${r}: "${t}".`)}async function tR(e,t,n){let r=e.headers.get(`Content-Length`),i=r?parseInt(r,10):n??0;r===null&&!n&&TP.warn(`Unable to determine content-length from response headers. Will expand buffer when needed.`);let a=new Uint8Array(i),o=0,s=e.body.getReader();async function c(){let{done:e,value:n}=await s.read();if(e)return;let r=o+n.length;if(r>i){i=r;let e=new Uint8Array(i);e.set(a),a=e}return a.set(n,o),o=r,t({progress:o/i*100,loaded:o,total:i}),c()}return await c(),a}function nR(e){return QL(e,[`blob:`])}function rR(e){let t;if(typeof location<`u`&&location.href)t=location.href;else if(import.meta.url)t=import.meta.url;else return e;return new URL(e,t).href}async function iR(e=null){let t=null;if(mP.useCustomCache){if(!mP.customCache)throw Error("`env.useCustomCache=true`, but `env.customCache` is not defined.");if(!mP.customCache.match||!mP.customCache.put)throw Error("`env.customCache` must be an object which implements the `match` and `put` functions of the Web Cache API. For more information, see https://developer.mozilla.org/en-US/docs/Web/API/Cache");t=mP.customCache}if(!t&&mP.useBrowserCache){if(typeof caches>`u`)throw Error(`Browser cache is not available in this environment.`);try{t=await caches.open(mP.cacheKey)}catch(e){TP.warn(`An error occurred while opening the browser cache:`,e)}}if(!t&&mP.useFSCache){if(!aP.IS_FS_AVAILABLE)throw Error(`File System Cache is not available in this environment.`);t=new qL(e??mP.cacheDir)}return t}async function aR(e,...t){for(let n of t)try{let t=await e.match(n);if(t)return t}catch{continue}}async function oR(e){if(!QL(e,[`http:`,`https:`]))return null;let t=lR(e);return t.set(`Range`,`bytes=0-0`),mP.fetch(e,{method:`GET`,headers:t})}async function sR(e,t,n={}){let r=await iR(n?.cache_dir),{localPath:i,remoteURL:a,proposedCacheKey:o,validModelId:s}=uR(e,t,n,r),c=await dR(r,i,o);if(c!==void 0&&typeof c!=`string`){let e=c.headers.get(`content-length`),t=c.headers.get(`content-type`);return{exists:!0,size:e?parseInt(e,10):void 0,contentType:t||void 0,fromCache:!0}}if(mP.allowLocalModels&&!QL(i,[`http:`,`https:`]))try{let e=await cR(i);if(typeof e!=`string`&&e.status!==404){let t=e.headers.get(`content-length`),n=e.headers.get(`content-type`);return{exists:!0,size:t?parseInt(t,10):void 0,contentType:n||void 0,fromCache:!1}}}catch{}if(mP.allowRemoteModels&&!n.local_files_only&&s)try{let e=await oR(a);if(e&&e.status>=200&&e.status<300){let t,n=e.headers.get(`content-type`);if(e.status===206){let n=e.headers.get(`content-range`);if(n){let e=n.match(/bytes \d+-\d+\/(\d+)/);e&&(t=parseInt(e[1],10))}}else if(e.status===200)try{await e.body?.cancel()}catch{}if(t===void 0){let n=e.headers.get(`content-length`);t=n?parseInt(n,10):void 0}return{exists:!0,size:t,contentType:n||void 0,fromCache:!1}}}catch(e){TP.warn(`Unable to fetch file metadata for "${a}": ${e}`)}return{exists:!1,fromCache:!1}}async function cR(e){return mP.useFS&&!QL(e,[`http:`,`https:`,`blob:`])?new BL(e instanceof URL?e.protocol===`file:`?e.pathname:e.toString():e):mP.fetch(e,{headers:lR(e)})}function lR(e){let t=typeof process<`u`&&process?.release?.name===`node`,n=new Headers;if(t){let t=!!{}?.TESTING_REMOTELY,r=mP.version;if(n.set(`User-Agent`,`transformers.js/${r}; is_ci/${t};`),QL(e,[`http:`,`https:`],[`huggingface.co`,`hf.co`])){let e={}?.HF_TOKEN??{}?.HF_ACCESS_TOKEN;e&&n.set(`Authorization`,`Bearer ${e}`)}}return n}function uR(e,t,n={},r=null){let i=n.revision??`main`,a=ZL(e,t),o=$L(e),s=o?ZL(mP.localModelPath,a):a,c=ZL(mP.remoteHost,mP.remotePathTemplate.replaceAll(`{model}`,e).replaceAll(`{revision}`,encodeURIComponent(i)),t);return{requestURL:a,localPath:s,remoteURL:c,proposedCacheKey:r instanceof qL?i===`main`?a:ZL(e,i,t):c,validModelId:o}}async function dR(e,t,n){if(e)return await aR(e,t,n)}async function fR(e,t,n,r,i,a,o={}){if(await n.match(r)===void 0)if(a)typeof i!=`string`&&await n.put(r,new Response(a,{headers:i.headers})).catch(e=>{TP.warn(`Unable to add response to browser cache: ${e}.`)});else{let a=o.progress_callback?n=>gP(o.progress_callback,{status:`progress`,name:e,file:t,...n}):void 0;await n.put(r,i,a)}}async function pR(e,t,n=!0,r={},i=!1,a=null){let{requestURL:o,localPath:s,remoteURL:c,proposedCacheKey:l,validModelId:u}=uR(e,t,r,a),d,f=!1,p;p=await dR(a,s,l);let m=p!==void 0;if(!m){if(mP.allowLocalModels){if(!QL(o,[`http:`,`https:`]))try{p=await cR(s),d=s}catch(e){TP.warn(`Unable to load from local path "${s}": "${e}"`)}else if(r.local_files_only)throw Error(`\`local_files_only=true\`, but attempted to load a remote file from: ${o}.`);else if(!mP.allowRemoteModels)throw Error(`\`env.allowRemoteModels=false\`, but attempted to load a remote file from: ${o}.`)}if(p===void 0||typeof p!=`string`&&p.status===404){if(r.local_files_only||!mP.allowRemoteModels){if(n)throw Error(`\`local_files_only=true\` or \`env.allowRemoteModels=false\` and file was not found locally at "${s}".`);return null}if(!u)throw Error(`Local file missing at "${s}" and download aborted due to invalid model ID "${e}".`);if(p=await cR(c),p.status!==200)return eR(p.status,c,n);d=l}f=a&&typeof Response<`u`&&p instanceof Response&&p.status===200}gP(r.progress_callback,{status:`download`,name:e,file:t});let h;if(!(aP.IS_NODE_ENV&&i)){let n;if(typeof p!=`string`)if(!r.progress_callback)n=new Uint8Array(await p.arrayBuffer());else if(m&&typeof navigator<`u`&&/firefox/i.test(navigator.userAgent))n=new Uint8Array(await p.arrayBuffer()),gP(r.progress_callback,{status:`progress`,name:e,file:t,progress:100,loaded:n.length,total:n.length});else{let i,a=p.headers.get(`content-length`);if(a)i=parseInt(a,10);else try{let n=await sR(e,t,r);n.size&&(i=n.size)}catch{}n=await tR(p,n=>{gP(r.progress_callback,{status:`progress`,name:e,file:t,...n})},i)}h=n}if(f&&d&&typeof p!=`string`&&await fR(e,t,a,d,p,h,r),gP(r.progress_callback,{status:`done`,name:e,file:t}),h){if(!aP.IS_NODE_ENV&&i)throw Error(`Cannot return path in a browser environment.`);return h}if(p instanceof BL)return p.filePath;let g=await a?.match(d);if(g instanceof BL)return g.filePath;if(g instanceof Response)return new Uint8Array(await g.arrayBuffer());if(typeof g==`string`)return g;throw Error(`Unable to get model file path or buffer.`)}async function mR(e,t,n=!0,r={},i=!1){if(!mP.allowLocalModels){if(r.local_files_only)throw Error("Invalid configuration detected: local models are disabled (`env.allowLocalModels=false`) but you have requested to only use local models (`local_files_only=true`).");if(!mP.allowRemoteModels)throw Error("Invalid configuration detected: both local and remote models are disabled. Fix by setting `env.allowLocalModels` or `env.allowRemoteModels` to `true`.")}return gP(r.progress_callback,{status:`initiate`,name:e,file:t}),await pR(e,t,n,r,i,await iR(r?.cache_dir))}async function hR(e,t,n=!0,r={}){let i=await mR(e,t,n,r,!1);return i===null?null:new TextDecoder(`utf-8`).decode(i)}async function gR(e,t,n=!0,r={}){let i=await hR(e,t,n,r);return i===null?{}:JSON.parse(i)}function _R(e,[t,n,r],[i,a],o=`bilinear`,s=!1){let c=a/r,l=i/n,u=new e.constructor(i*a*t),d=n*r,f=i*a;for(let o=0;o=0;--e)i[e]=a,r[e]=t[n[e]],a*=r[e];let a=n.map((e,t)=>i[n.indexOf(t)]),o=new e.constructor(e.length);for(let n=0;n=0;--e)r+=i%t[e]*a[e],i=Math.floor(i/t[e]);o[r]=e[n]}return[o,r]}function yR(e){let t=SR(e)[0],n=e.map(e=>Math.exp(e-t)),r=n.reduce((e,t)=>e+t,0);return n.map(e=>e/r)}function bR(e){let t=SR(e)[0],n=0;for(let r=0;re-t-r)}function xR(e){if(e.length===0)throw Error(`Array must not be empty`);let t=e[0],n=0;for(let r=1;rt&&(t=e[r],n=r);return[t,n]}function CR(e){return e>0&&(e&e-1)==0}var wR=class{constructor(e){if(this.size=e|0,this.size<=1||!CR(this.size))throw Error(`FFT size must be a power of two larger than 1`);this._csize=e<<1,this.table=new Float64Array(this.size*2);for(let e=0;ee;e<<=1)++t;this._width=t%2==0?t-1:t,this._bitrev=new Int32Array(1<>>t&3)<>>1);for(let t=0;t>>1]=e[t];return n}toComplexArray(e,t){let n=t||this.createComplexArray();for(let t=0;t>>1],n[t+1]=0;return n}transform(e,t){if(e===t)throw Error(`Input and output buffers must be different`);this._transform4(e,t,1)}realTransform(e,t){if(e===t)throw Error(`Input and output buffers must be different`);this._realTransform4(e,t,1)}inverseTransform(e,t){if(e===t)throw Error(`Input and output buffers must be different`);this._transform4(e,t,-1);for(let t=0;t>=2;i>=2;i>>=2){a=r/i<<1;let t=a>>>2;for(o=0;o>>1,i>>>1)}else for(o=0,s=0;o>>1,i>>>1,n)}let l=this.table;for(i>>=2;i>=2;i>>=2){a=r/i<<1;let t=a>>>1,s=t>>>1,c=s>>>1;for(o=0;o>>1;for(let t=2;t>1;++t){let n=(t+1-e)**2/2,r=Math.sqrt(s**2+c**2)**n,o=n*Math.atan2(c,s),l=2*t;i[l]=r*Math.cos(o),i[l+1]=r*Math.sin(o),a[l]=i[l],a[l+1]=-i[l+1]}this._slicedChirpBuffer=i.subarray(t,n),this._f=new wR(r>>1),this._f.transform(this._chirpBuffer,a)}_transform(e,t,n){let r=this._buffer1,i=this._buffer2,a=this._outBuffer1,o=this._outBuffer2,s=this._chirpBuffer,c=this._slicedChirpBuffer,l=this._a;if(n)for(let e=0;e>1];r[e]=i*c[e],r[n]=i*c[n]}else for(let e=0;e=e.length&&(i=2*(e.length-1)-i),r[a++]=e[i]}r.sort(),n[t]=r[i]}return n}function OR(e,t){let n=10**t;return Math.round(e*n)/n}function kR(e){let t=Math.round(e);return Math.abs(e)%1==.5?t%2==0?t:t-1:t}function AR(e){let t=e.length,n=e[0].length,r=[t+1,n+1],i=Array.from({length:r[0]},()=>Array(r[1]).fill(1/0));i[0][0]=0;let a=Array.from({length:r[0]},()=>Array(r[1]).fill(-1));for(let t=1;t0||s>0;)switch(c.push(o-1),l.push(s-1),a[o][s]){case 0:--o,--s;break;case 1:--o;break;case 2:--s;break;default:throw Error(`Internal error in dynamic time warping. Unexpected trace[${o}, ${s}]. Please file a bug report.`)}return c.reverse(),l.reverse(),[c,l]}var jR=(function(){let e=null;return function(t){if(!e){e=new Float32Array(65536);let t=new ArrayBuffer(4),n=new Uint32Array(t),r=new Float32Array(t);for(let t=0;t>10,s=t&1023;if(o===31)i=a|2139095040|s<<13;else if(o===0)if(s===0)i=a;else{let e=113;for(;!(s&1024);)s<<=1,--e;s&=-1025,i=a|e<<23|s<<13}else i=a|o+112<<23|s<<13;n[0]=i,e[t]=r[0]}}let n=t.length,r=e,i=new Float32Array(n);for(let e=0;eNR});var NR={};async function PR(e){let t=e.split(`/`).pop(),n;try{if(n=await iR(),n){let t=await n.match(e);if(t)return t}}catch(e){TP.warn(`Failed to load ${t} from cache:`,e)}let r=await mP.fetch(e);if(!r.ok)throw Error(`Failed to fetch ${t}: ${r.status} ${r.statusText}`);if(n)try{await n.put(e,r.clone())}catch(e){TP.warn(`Failed to cache ${t}:`,e)}return r}async function FR(e){let t=await PR(e);if(!t||typeof t==`string`)return null;try{return await t.arrayBuffer()}catch(e){return TP.warn(`Failed to read WASM binary:`,e),null}}async function IR(e){if(aP.IS_SERVICE_WORKER_ENV||aP.IS_CHROME_AVAILABLE)return e;let t=await PR(e);if(!t||typeof t==`string`)return null;try{let e=await t.text();e=e.replaceAll(`globalThis.process?.versions?.node`,`false`);let n=new Blob([e],{type:`text/javascript`});return URL.createObjectURL(n)}catch(e){return TP.warn(`Failed to read WASM factory:`,e),null}}var LR=Object.freeze({auto:null,gpu:null,cpu:`cpu`,wasm:`wasm`,webgpu:`webgpu`,cuda:`cuda`,dml:`dml`,coreml:`coreml`,webnn:{name:`webnn`,deviceType:`cpu`},"webnn-npu":{name:`webnn`,deviceType:`npu`},"webnn-gpu":{name:`webnn`,deviceType:`gpu`},"webnn-cpu":{name:`webnn`,deviceType:`cpu`}});function RR(e){return e<=fP.DEBUG?0:e<=fP.INFO?2:e<=fP.WARNING||e<=fP.ERROR?3:4}var zR={0:`verbose`,1:`info`,2:`warning`,3:`error`,4:`fatal`},BR=[],VR,HR,UR=Symbol.for(`onnxruntime`);if(UR in globalThis)HR=globalThis[UR];else if(aP.IS_NODE_ENV){switch(HR=MR,process.platform){case`win32`:BR.push(`dml`);break;case`linux`:process.arch===`x64`&&BR.push(`cuda`);break;case`darwin`:BR.push(`coreml`);break}BR.push(`webgpu`),BR.push(`cpu`),VR=[`cpu`]}else HR=Bk,aP.IS_WEBNN_AVAILABLE&&BR.push(`webnn-npu`,`webnn-gpu`,`webnn-cpu`,`webnn`),aP.IS_WEBGPU_AVAILABLE&&BR.push(`webgpu`),BR.push(`wasm`),VR=[`wasm`];var WR=HR.InferenceSession;function GR(e=null){if(!e)return VR;switch(e){case`auto`:return BR;case`gpu`:return BR.filter(e=>[`webgpu`,`cuda`,`dml`,`webnn-gpu`].includes(e))}if(BR.includes(e))return[LR[e]??e];throw Error(`Unsupported device: "${e}". Should be one of: ${BR.join(`, `)}.`)}var KR=Promise.resolve(),qR=null;async function JR(){if(qR)return qR;if(!(mP.useWasmCache&&typeof $R?.wasm?.wasmPaths==`object`&&$R?.wasm?.wasmPaths?.wasm&&$R?.wasm?.wasmPaths?.mjs)){if(aP.IS_DENO_WEB_RUNTIME)throw Error(`env.useWasmCache=false is not supported in Deno's web runtime. Remove the useWasmCache override.`);return qR=Promise.resolve(),qR}return qR=(async()=>{let e=$R.wasm.wasmPaths,t=!1;await Promise.all([e.wasm&&!nR(e.wasm)?(async()=>{try{let n=await FR(rR(e.wasm));n&&($R.wasm.wasmBinary=n,t=!0)}catch(e){TP.warn(`Failed to pre-load WASM binary:`,e)}})():Promise.resolve(),e.mjs&&!nR(e.mjs)?(async()=>{try{let t=await IR(rR(e.mjs));t&&($R.wasm.wasmPaths.mjs=t)}catch(e){TP.warn(`Failed to pre-load WASM factory:`,e)}})():Promise.resolve()]),t||($R.wasm.wasmPaths.mjs=e.mjs)})(),qR}async function YR(e,t,n){await JR();let r=RR(mP.logLevel??fP.WARNING),i=()=>WR.create(e,{logSeverityLevel:r,...t}),a=await(aP.IS_WEB_ENV?KR=KR.then(i):i());return a.config=n,a}var XR=Promise.resolve();async function ZR(e,t){let n=()=>e.run(t);return aP.IS_WEB_ENV?XR=XR.then(n):n()}function QR(e){return e instanceof HR.Tensor}var $R=HR?.env;function ez(){return $R?.wasm?.proxy}if($R){let e=function(e){$R.logLevel=zR[RR(e)]};if($R.wasm){if(!(typeof ServiceWorkerGlobalScope<`u`&&self instanceof ServiceWorkerGlobalScope)&&$R.versions?.web&&!$R.wasm.wasmPaths){let e=`https://cdn.jsdelivr.net/npm/onnxruntime-web@${$R.versions.web}/dist/`;$R.wasm.wasmPaths=aP.IS_SAFARI?{mjs:`${e}ort-wasm-simd-threaded.mjs`,wasm:`${e}ort-wasm-simd-threaded.wasm`}:{mjs:`${e}ort-wasm-simd-threaded.asyncify.mjs`,wasm:`${e}ort-wasm-simd-threaded.asyncify.wasm`}}$R.wasm.proxy=!1}$R.webgpu&&($R.webgpu.powerPreference=`high-performance`),e(mP.logLevel??fP.WARNING),mP.backends.onnx={...$R,setLogLevel:e}}var tz=async(e,t,n)=>{let r=await YR(new Uint8Array(e),t);return(async e=>{let t=ez(),i=await ZR(r,Object.fromEntries(Object.entries(e).map(([e,n])=>[e,(t?n.clone():n).ort_tensor])));return Array.isArray(n)?n.map(e=>new pz(i[e])):new pz(i[n])})},nz=class{static session_options={};static get nearest_interpolate_4d(){return this._nearest_interpolate_4d||=tz([8,10,18,0,58,129,1,10,41,10,1,120,10,0,10,0,10,1,115,18,1,121,34,6,82,101,115,105,122,101,42,18,10,4,109,111,100,101,34,7,110,101,97,114,101,115,116,160,1,3,18,1,114,90,31,10,1,120,18,26,10,24,8,1,18,20,10,3,18,1,98,10,3,18,1,99,10,3,18,1,104,10,3,18,1,119,90,15,10,1,115,18,10,10,8,8,7,18,4,10,2,8,4,98,31,10,1,121,18,26,10,24,8,1,18,20,10,3,18,1,98,10,3,18,1,99,10,3,18,1,104,10,3,18,1,119,66,2,16,21],this.session_options,`y`),this._nearest_interpolate_4d}static get bilinear_interpolate_4d(){return this._bilinear_interpolate_4d||=tz([8,9,18,0,58,128,1,10,40,10,1,120,10,0,10,0,10,1,115,18,1,121,34,6,82,101,115,105,122,101,42,17,10,4,109,111,100,101,34,6,108,105,110,101,97,114,160,1,3,18,1,114,90,31,10,1,120,18,26,10,24,8,1,18,20,10,3,18,1,98,10,3,18,1,99,10,3,18,1,104,10,3,18,1,119,90,15,10,1,115,18,10,10,8,8,7,18,4,10,2,8,4,98,31,10,1,121,18,26,10,24,8,1,18,20,10,3,18,1,98,10,3,18,1,99,10,3,18,1,104,10,3,18,1,119,66,2,16,20],this.session_options,`y`),this._bilinear_interpolate_4d}static get bicubic_interpolate_4d(){return this._bicubic_interpolate_4d||=tz([8,9,18,0,58,127,10,39,10,1,120,10,0,10,0,10,1,115,18,1,121,34,6,82,101,115,105,122,101,42,16,10,4,109,111,100,101,34,5,99,117,98,105,99,160,1,3,18,1,114,90,31,10,1,120,18,26,10,24,8,1,18,20,10,3,18,1,98,10,3,18,1,99,10,3,18,1,104,10,3,18,1,119,90,15,10,1,115,18,10,10,8,8,7,18,4,10,2,8,4,98,31,10,1,121,18,26,10,24,8,1,18,20,10,3,18,1,98,10,3,18,1,99,10,3,18,1,104,10,3,18,1,119,66,2,16,20],this.session_options,`y`),this._bicubic_interpolate_4d}static get matmul(){return this._matmul||=tz([8,9,18,0,58,55,10,17,10,1,97,10,1,98,18,1,99,34,6,77,97,116,77,117,108,18,1,114,90,9,10,1,97,18,4,10,2,8,1,90,9,10,1,98,18,4,10,2,8,1,98,9,10,1,99,18,4,10,2,8,1,66,2,16,20],this.session_options,`c`),this._matmul}static get stft(){return this._stft||=tz([8,7,18,0,58,148,1,10,38,10,1,115,10,1,106,10,1,119,10,1,108,18,1,111,34,4,83,84,70,84,42,15,10,8,111,110,101,115,105,100,101,100,24,1,160,1,2,18,1,115,90,26,10,1,115,18,21,10,19,8,1,18,15,10,3,18,1,98,10,3,18,1,115,10,3,18,1,99,90,11,10,1,106,18,6,10,4,8,7,18,0,90,16,10,1,119,18,11,10,9,8,1,18,5,10,3,18,1,119,90,11,10,1,108,18,6,10,4,8,7,18,0,98,31,10,1,111,18,26,10,24,8,1,18,20,10,3,18,1,98,10,3,18,1,102,10,3,18,1,100,10,3,18,1,99,66,2,16,17],this.session_options,`o`),this._stft}static get rfft(){return this._rfft||=tz([8,9,18,0,58,97,10,33,10,1,120,10,0,10,1,97,18,1,121,34,3,68,70,84,42,15,10,8,111,110,101,115,105,100,101,100,24,1,160,1,2,18,1,100,90,21,10,1,120,18,16,10,14,8,1,18,10,10,3,18,1,115,10,3,18,1,99,90,11,10,1,97,18,6,10,4,8,7,18,0,98,21,10,1,121,18,16,10,14,8,1,18,10,10,3,18,1,115,10,3,18,1,99,66,2,16,20],this.session_options,`y`),this._rfft}static get top_k(){return this._top_k||=tz([8,10,18,0,58,73,10,18,10,1,120,10,1,107,18,1,118,18,1,105,34,4,84,111,112,75,18,1,116,90,9,10,1,120,18,4,10,2,8,1,90,15,10,1,107,18,10,10,8,8,7,18,4,10,2,8,1,98,9,10,1,118,18,4,10,2,8,1,98,9,10,1,105,18,4,10,2,8,7,66,2,16,21],this.session_options,[`v`,`i`]),this._top_k}static get slice(){return this._slice||=tz([8,7,18,0,58,96,10,25,10,1,120,10,1,115,10,1,101,10,1,97,10,1,116,18,1,121,34,5,83,108,105,99,101,18,1,114,90,9,10,1,120,18,4,10,2,8,1,90,9,10,1,115,18,4,10,2,8,7,90,9,10,1,101,18,4,10,2,8,7,90,9,10,1,97,18,4,10,2,8,7,90,9,10,1,116,18,4,10,2,8,7,98,9,10,1,121,18,4,10,2,8,1,66,2,16,13],this.session_options,`y`),this._slice}},rz=Object.freeze({auto:`auto`,gpu:`gpu`,cpu:`cpu`,wasm:`wasm`,webgpu:`webgpu`,cuda:`cuda`,dml:`dml`,coreml:`coreml`,webnn:`webnn`,"webnn-npu":`webnn-npu`,"webnn-gpu":`webnn-gpu`,"webnn-cpu":`webnn-cpu`}),iz=aP.IS_NODE_ENV?`cpu`:`wasm`;function az(e,t,{warn:n}={}){return e?typeof e==`string`?e:e.hasOwnProperty(t)?e[t]:(n&&n(`device not specified for "${t}". Using the default device (${iz}).`),iz):iz}var oz=(function(){let e;return async function(){if(e===void 0)if(!aP.IS_WEBGPU_AVAILABLE)e=!1;else try{e=(await navigator.gpu.requestAdapter()).features.has(`shader-f16`)}catch{e=!1}return e}})(),sz=Object.freeze({auto:`auto`,fp32:`fp32`,fp16:`fp16`,q8:`q8`,int8:`int8`,uint8:`uint8`,q4:`q4`,bnb4:`bnb4`,q4f16:`q4f16`}),cz=sz.fp32,lz=Object.freeze({[rz.wasm]:sz.q8}),uz=Object.freeze({[sz.fp32]:``,[sz.fp16]:`_fp16`,[sz.int8]:`_int8`,[sz.uint8]:`_uint8`,[sz.q8]:`_quantized`,[sz.q4]:`_q4`,[sz.q4f16]:`_q4f16`,[sz.bnb4]:`_bnb4`});function dz(e,t,n,{configDtype:r=null,warn:i}={}){let a,o=!1;e&&typeof e!=`string`?e.hasOwnProperty(t)?a=e[t]:(a=null,o=!0):a=e;let s;if(a===sz.auto){if(r){let e=typeof r==`string`?r:r?.[t];if(e&&e!==sz.auto&&sz.hasOwnProperty(e))return e}s=lz[n]??cz}else s=a&&sz.hasOwnProperty(a)?a:lz[n]??cz;return o&&i&&i(`dtype not specified for "${t}". Using the default dtype (${s}) for this device (${n}).`),s}var fz=Object.freeze({float32:Float32Array,float16:typeof Float16Array<`u`?Float16Array:Uint16Array,float64:Float64Array,string:Array,int8:Int8Array,uint8:Uint8Array,int16:Int16Array,uint16:Uint16Array,int32:Int32Array,uint32:Uint32Array,int64:BigInt64Array,uint64:BigUint64Array,bool:Uint8Array,uint4:Uint8Array,int4:Int8Array}),pz=class e{get dims(){return this.ort_tensor.dims}set dims(e){this.ort_tensor.dims=e}get type(){return this.ort_tensor.type}get data(){return this.ort_tensor.data}get size(){return this.ort_tensor.size}get location(){return this.ort_tensor.location}ort_tensor;constructor(...e){return QR(e[0])?this.ort_tensor=e[0]:this.ort_tensor=new FN(e[0],e[1],e[2]),new Proxy(this,{get:(e,t)=>{if(typeof t==`string`){let n=Number(t);if(Number.isInteger(n))return e._getitem(n)}return e[t]},set:(e,t,n)=>e[t]=n})}dispose(){this.ort_tensor.dispose()}*[Symbol.iterator](){let[e,...t]=this.dims;if(t.length>0){let n=t.reduce((e,t)=>e*t);for(let r=0;r0){let e=r.reduce((e,t)=>e*t);return this._subarray(t,e,r)}else return new e(this.type,[this.data[t]],r)}indexOf(e){let t=this.data;for(let n=0;na)throw Error(`Invalid slice: ${i}`);let o=[Math.max(t,0),Math.min(a,this.dims[e])];r.push(o),n.push(o[1]-o[0])}else throw Error(`Invalid slice: ${i}`)}let i=r.map(([e,t])=>t-e),a=i.reduce((e,t)=>e*t),o=this.data,s=new o.constructor(a),c=this.stride(),l=!0;for(let e=1;e=0;--n){let e=i[n];t+=(a%e+r[n][0])*c[n],a=Math.floor(a/e)}s[e]=o[t]}return new e(this.type,s,n)}permute(...e){return hz(this,e)}transpose(...e){return this.permute(...e)}sum(e=null,t=!1){return this.norm(1,e,t)}norm(t=`fro`,n=null,r=!1){if(t===`fro`)t=2;else if(typeof t==`string`)throw Error(`Unsupported norm: ${t}`);let i=this.data,a=(e,n)=>e+n**t;if(n===null){let n=i.reduce(a,0)**(1/t);return new e(this.type,[n],[])}let[o,s,c]=Oz(a,this,n,r);if(t!==1)for(let e=0;e=0;--r){let e=this.dims[r];if(r!==t){let t=i%e;n+=t*a,a*=this.dims[r]}i=Math.floor(i/e)}r[e]/=i[n]}return this}normalize(e=2,t=1){return this.clone().normalize_(e,t)}stride(){return jz(this.dims)}squeeze(t=null){return new e(this.type,this.data,Cz(this.dims,t))}squeeze_(e=null){return this.dims=Cz(this.dims,e),this}unsqueeze(t){return new e(this.type,this.data,wz(this.dims,t))}unsqueeze_(e){return this.dims=wz(this.dims,e),this}flatten_(e=0,t=-1){t=(t+this.dims.length)%this.dims.length;let n=this.dims.slice(0,e),r=this.dims.slice(e,t+1),i=this.dims.slice(t+1);return this.dims=[...n,r.reduce((e,t)=>e*t,1),...i],this}flatten(e=0,t=-1){return this.clone().flatten_(e,t)}view(...t){let n=-1;for(let e=0;er===n?e:e*t,1);t[n]=r.length/e}return new e(this.type,r,t)}neg_(){let e=this.data;for(let t=0;tt?1:0;return new e(`bool`,n,this.dims)}lt(t){let n=new Uint8Array(this.data.length),r=this.data;for(let e=0;eMath.min(e,t),this,t,n,1/0);return new e(r,i,a)}max(t=null,n=!1){if(t===null){let t=SR(this.data)[0];return new e(this.type,[t],[])}let[r,i,a]=Oz((e,t)=>Math.max(e,t),this,t,n,-1/0);return new e(r,i,a)}argmin(t=null,n=!1){if(t!==null)throw Error("`dim !== null` not yet implemented.");let r=xR(this.data)[1];return new e(`int64`,[BigInt(r)],[])}argmax(t=null,n=!1){if(t!==null)throw Error("`dim !== null` not yet implemented.");let r=SR(this.data)[1];return new e(`int64`,[BigInt(r)],[])}repeat(...t){if(t.lengthe===1)){if(t.length===this.dims.length)return this.clone();let n=t.length-this.dims.length,r=Array(n).fill(1).concat(this.dims);return new e(this.type,this.data.slice(),r)}let n=t.length-this.dims.length,r=Array(n).fill(1).concat(this.dims),i=r.map((e,n)=>e*t[n]),a=i.reduce((e,t)=>e*t,1),o=this.data,s=new o.constructor(a),c=jz(r),l=jz(i);for(let e=0;eBigInt(Math.floor(e)):BigInt;else if(this.type===`float16`&&t==`float32`&&this.data instanceof Uint16Array)return new e(t,jR(this.data),this.dims);return new e(t,fz[t].from(this.data,n),this.dims)}};function mz(e,t){let n=e.length;if(n!==t.reduce((e,t)=>e*t))throw Error(`cannot reshape array of size ${n} into shape (${t})`);let r=e;for(let e=t.length-1;e>=0;e--)r=r.reduce((n,r)=>{let i=n[n.length-1];return i.lengthnew pz(`int64`,e,[e.length]);async function xz(e,t,n,r,i){return await(await nz.slice)({x:e,s:bz(t),e:bz(n),a:bz(r),t:bz(i??Array(r.length).fill(1))})}function Sz(e,t){let n=e.data,r=t.data,i=[e.dims[0],e.dims[2]],a=new n.constructor(i[0]*i[1]),[o,s,c]=e.dims,l=0;for(let e=0;ee!==1):typeof t==`number`?e[t]===1&&e.splice(t,1):Array.isArray(t)&&(e=e.filter((e,n)=>e!==1||!t.includes(n))),e}function wz(e,t){return t=Tz(t,e.length+1),e=e.slice(),e.splice(t,0,1),e}function Tz(e,t,n=null,r=!0){if(e<-t||e>=t){if(r)throw Error(`IndexError: index ${e} is out of bounds for dimension${n===null?``:` `+n} with size ${t}`);return e<-t?0:t}return e<0&&(e=(e%t+t)%t),e}function Ez(e,t=0){t=Tz(t,e[0].dims.length);let n=e[0].dims.slice();n[t]=e.reduce((e,n)=>e+n.dims[t],0);let r=n.reduce((e,t)=>e*t,1),i=new e[0].data.constructor(r),a=e[0].type;if(t===0){let t=0;for(let n of e){let e=n.data;i.set(e,t),t+=e.length}}else{let r=0;for(let a=0;a=0;--i){let e=s[i],l=o%e;i===t&&(l+=r),a+=l*c,c*=n[i],o=Math.floor(o/e)}i[a]=o[e]}r+=s[t]}}return new pz(a,i,n)}function Dz(e,t=0){return Ez(e.map(e=>e.unsqueeze(t)),t)}function Oz(e,t,n,r=!1,i=null){let a=t.data,o=t.dims;n=Tz(n,o.length);let s=o.slice();s[n]=1;let c=new a.constructor(a.length/o[n]);i!==null&&c.fill(i);for(let t=0;t=0;--e){let t=o[e];if(e!==n){let n=i%t;r+=n*a,a*=s[e]}i=Math.floor(i/t)}c[r]=e(c[r],a[t],t,r)}return r||s.splice(n,1),[t.type,c,s]}function kz(e,t=null,n=1,r=!1){let i=e.data,a=e.dims;if(t===null){let t=i.reduce((e,t)=>e+t,0)/i.length,r=Math.sqrt(i.reduce((e,n)=>e+(n-t)**2,0)/(i.length-n)),a=new pz(e.type,[t],[]);return[new pz(e.type,[r],[]),a]}t=Tz(t,a.length);let o=Az(e,t,r),s=o.data,[c,l,u]=Oz((e,t,n,r)=>e+(t-s[r])**2,e,t,r);for(let e=0;ee+t,0);return new pz(e.type,[t/i.length],[])}t=Tz(t,r.length);let[a,o,s]=Oz((e,t)=>e+t,e,t,n);if(r[t]!==1)for(let e=0;e=0;--n)t[n]=r,r*=e[n];return t}function Mz(e,t,n,r){return new pz(n,new r(e.reduce((e,t)=>e*t,1)).fill(t),e)}function Nz(e,t){let n,r;if(typeof t==`number`)n=`float32`,r=Float32Array;else if(typeof t==`bigint`)n=`int64`,r=BigInt64Array;else if(typeof t==`boolean`)n=`bool`,r=Uint8Array;else throw Error(`Unsupported data type: ${typeof t}`);return Mz(e,t,n,r)}function Pz(e,t){return Nz(e.dims,t)}function Fz(e){return Mz(e,1n,`int64`,BigInt64Array)}function Iz(e){return Fz(e.dims)}function Lz(e){return Mz(e,0n,`int64`,BigInt64Array)}function Rz(e){return Lz(e.dims)}function zz(e){let t=e.reduce((e,t)=>e*t,1);return new pz(`float32`,Float32Array.from({length:t},()=>WL.gauss()),e)}function Bz(e,t){if(e.dims.length!==2)throw Error(`The tensor must have 2 dimensions`);if(e.dims.at(-1)%8!=0)throw Error(`The last dimension of the tensor must be a multiple of 8`);if(![`binary`,`ubinary`].includes(t))throw Error(`The precision must be either 'binary' or 'ubinary'`);let n=t===`binary`,r=n?`int8`:`uint8`,i=n?Int8Array:Uint8Array,a=e.data,o=new i(a.length/8);for(let e=0;e0?1:0,r=Math.floor(e/8),i=e%8;o[r]|=t<<7-i,n&&i===0&&(o[r]-=128)}return new pz(r,o,[e.dims[0],e.dims[1]/8])}async function Vz(e){if(!e)throw Error(`modelId is required for get_tokenizer_files`);return(await sR(e,`tokenizer_config.json`,{})).exists?[`tokenizer.json`,`tokenizer_config.json`]:[]}async function Hz(e,t){let n=await Vz(e);return await Promise.all(n.map(n=>gR(e,n,!0,t)))}function Uz(e){let t=e.dims;switch(t.length){case 1:return e.tolist();case 2:if(t[0]!==1)throw Error("Unable to decode tensor with `batch size !== 1`. Use `tokenizer.batch_decode(...)` for batched inputs.");return e.tolist()[0];default:throw Error(`Expected tensor to have 1-2 dimensions, got ${t.length}.`)}}var Wz=[`bos_token`,`eos_token`,`unk_token`,`sep_token`,`pad_token`,`cls_token`,`mask_token`];function Gz(e,t,n,r){for(let i of Object.keys(e)){let a=t-e[i].length,o=n(i),s=Array(a).fill(o);e[i]=r===`right`?bP(e[i],s):bP(s,e[i])}}function Kz(e,t){for(let n of Object.keys(e))e[n].length=t}function qz(e,...t){for(let n of t){if(!Object.hasOwn(e,n))continue;let t=e[n];if(t)if(typeof t==`object`){if(t.__type===`AddedToken`)return t.content;throw Error(`Unknown token: ${t}`)}else return t}return null}function Jz(e){let t=[];for(let n of e.get_added_tokens_decoder().values())n.special&&t.push(n);return t}var Yz=class extends RL{return_token_type_ids=!1;padding_side=`right`;constructor(e,t){if(super(),this._tokenizerJSON=e,this._tokenizerConfig=t,this._tokenizer=new aI(e,t),this.config=t,this.padding_side=t.padding_side??this.padding_side,this.mask_token=qz(t,`mask_token`),this.mask_token_id=this._tokenizer.token_to_id(this.mask_token),this.pad_token=qz(t,`pad_token`,`eos_token`),this.pad_token_id=this._tokenizer.token_to_id(this.pad_token),this.sep_token=qz(t,`sep_token`),this.sep_token_id=this._tokenizer.token_to_id(this.sep_token),this.unk_token=qz(t,`unk_token`),this.unk_token_id=this._tokenizer.token_to_id(this.unk_token),this.bos_token=qz(t,`bos_token`),this.bos_token_id=this._tokenizer.token_to_id(this.bos_token),this.eos_token=qz(t,`eos_token`),this.eos_token_id=this._tokenizer.token_to_id(this.eos_token),this.chat_template=t.chat_template??null,Array.isArray(this.chat_template)){let e=Object.create(null);for(let{name:t,template:n}of this.chat_template){if(typeof t!=`string`||typeof n!=`string`)throw Error(`Chat template must be a list of objects with "name" and "template" properties`);e[t]=n}this.chat_template=e}this._compiled_template_cache=new Map;let n=Jz(this._tokenizer);this.all_special_ids=n.map(e=>e.id),this.all_special_tokens=n.map(e=>e.content)}static async from_pretrained(e,{progress_callback:t=null,config:n=null,cache_dir:r=null,local_files_only:i=!1,revision:a=`main`}={}){let o=await Hz(e,{progress_callback:t,config:n,cache_dir:r,local_files_only:i,revision:a});return new this(...o)}get_vocab(){return this._tokenizer.get_vocab()}get model_max_length(){return this._tokenizerConfig.model_max_length??1/0}get add_eos_token(){return this._tokenizerConfig.add_eos_token}get add_bos_token(){return this._tokenizerConfig.add_bos_token}convert_tokens_to_ids(e){return typeof e==`string`?this._tokenizer.token_to_id(e):e.map(e=>this._tokenizer.token_to_id(e))}_call(e,{text_pair:t=null,add_special_tokens:n=!0,padding:r=!1,truncation:i=null,max_length:a=null,return_tensor:o=!0,return_token_type_ids:s=null}={}){let c=Array.isArray(e),l;if(c){if(e.length===0)throw Error(`text array must be non-empty`);if(t!==null){if(!Array.isArray(t))throw Error(`text_pair must also be an array`);if(e.length!==t.length)throw Error(`text and text_pair must have the same length`);l=e.map((e,r)=>this._encode_plus(e,{text_pair:t[r],add_special_tokens:n,return_token_type_ids:s}))}else l=e.map(e=>this._encode_plus(e,{add_special_tokens:n,return_token_type_ids:s}))}else{if(e==null)throw Error(`text may not be null or undefined`);if(Array.isArray(t))throw Error("When specifying `text_pair`, since `text` is a string, `text_pair` must also be a string (i.e., not an array).");l=[this._encode_plus(e,{text_pair:t,add_special_tokens:n,return_token_type_ids:s})]}if(a===null?a=this.model_max_length:i===null&&(r===!0?(TP.warn("`max_length` is ignored when `padding: true` and there is no truncation strategy. To pad to max length, use `padding: 'max_length'`."),a=this.model_max_length):r===!1&&(TP.warn("Truncation was not explicitly activated but `max_length` is provided a specific value, please use `truncation: true` to explicitly truncate examples to max length."),i=!0)),r===!0&&(a=Math.min(SR(l.map(e=>e.input_ids.length))[0],a??1/0)),a=Math.min(a,this.model_max_length??1/0),r||i)for(let e=0;ea?i&&Kz(l[e],a):r&&Gz(l[e],a,e=>e===`input_ids`?this.pad_token_id:0,this.padding_side);let u={};if(o){if(!(r&&i)&&l.some(e=>{for(let t of Object.keys(e))if(e[t].length!==l[0][t]?.length)return!0;return!1}))throw Error(`Unable to create tensor, you should probably activate truncation and/or padding with 'padding=true' and 'truncation=true' to have batched tensors with the same length.`);let e=[l.length,l[0].input_ids.length];for(let t of Object.keys(l[0]))u[t]=new pz(`int64`,BigInt64Array.from(l.flatMap(e=>e[t]).map(BigInt)),e)}else{for(let e of Object.keys(l[0]))u[e]=l.map(t=>t[e]);if(!c)for(let e of Object.keys(u))u[e]=u[e][0]}return u}_encode_text(e){return e===null?null:this._tokenizer.encode(e).tokens}_encode_plus(e,{text_pair:t=null,add_special_tokens:n=!0,return_token_type_ids:r=null}={}){let{ids:i,attention_mask:a,token_type_ids:o}=this._tokenizer.encode(e,{text_pair:t,add_special_tokens:n,return_token_type_ids:r??this.return_token_type_ids});return{input_ids:i,attention_mask:a,...o?{token_type_ids:o}:{}}}tokenize(e,{pair:t=null,add_special_tokens:n=!1}={}){return this._tokenizer.tokenize(e,{text_pair:t,add_special_tokens:n})}encode(e,{text_pair:t=null,add_special_tokens:n=!0,return_token_type_ids:r=null}={}){return this._tokenizer.encode(e,{text_pair:t,add_special_tokens:n,return_token_type_ids:r}).ids}batch_decode(e,t={}){return e instanceof pz&&(e=e.tolist()),e.map(e=>this.decode(e,t))}decode(e,t={}){if(e instanceof pz&&(e=Uz(e)),!Array.isArray(e)||e.length===0||!_P(e[0]))throw Error(`token_ids must be a non-empty array of integers.`);return this.decode_single(e,t)}decode_single(e,{skip_special_tokens:t=!1,clean_up_tokenization_spaces:n=null}){return this._tokenizer.decode(e,{skip_special_tokens:t,clean_up_tokenization_spaces:n})}get_chat_template({chat_template:e=null,tools:t=null}={}){if(this.chat_template&&typeof this.chat_template==`object`){let n=this.chat_template;if(e!==null&&Object.hasOwn(n,e))e=n[e];else if(e===null)if(t!==null&&`tool_use`in n)e=n.tool_use;else if(`default`in n)e=n.default;else throw Error(`This model has multiple chat templates with no default specified! Please either pass a chat template or the name of the template you wish to use to the 'chat_template' argument. Available template names are ${Object.keys(n).sort()}.`)}else if(e===null)if(this.chat_template)e=this.chat_template;else throw Error(`Cannot use apply_chat_template() because tokenizer.chat_template is not set and no template argument was passed! For information about writing templates and setting the tokenizer.chat_template attribute, please see the documentation at https://huggingface.co/docs/transformers/main/en/chat_templating`);return e}apply_chat_template(e,{tools:t=null,documents:n=null,chat_template:r=null,add_generation_prompt:i=!1,tokenize:a=!0,padding:o=!1,truncation:s=!1,max_length:c=null,return_tensor:l=!0,return_dict:u=!0,tokenizer_kwargs:d={},...f}={}){if(r=this.get_chat_template({chat_template:r,tools:t}),typeof r!=`string`)throw Error(`chat_template must be a string, but got ${typeof r}`);let p=this._compiled_template_cache.get(r);p===void 0&&(p=new LL(r),this._compiled_template_cache.set(r,p));let m=Object.create(null);for(let e of Wz){let t=qz(this.config,e);t&&(m[e]=t)}let h=p.render({messages:e,add_generation_prompt:i,tools:t,documents:n,...m,...f});if(a){let e=this._call(h,{add_special_tokens:!1,padding:o,truncation:s,max_length:c,return_tensor:l,...d});return u?e:e.input_ids}return h}};function Xz(e,t,n,r){if(!(`language_codes`in e)||!Array.isArray(e.language_codes))throw Error("Tokenizer must have `language_codes` attribute set and it should be an array of language ids.");if(!(`languageRegex`in e)||!(e.languageRegex instanceof RegExp))throw Error("Tokenizer must have `languageRegex` attribute set and it should be a regular expression.");if(!(`lang_to_token`in e)||typeof e.lang_to_token!=`function`)throw Error("Tokenizer must have `lang_to_token` attribute set and it should be a function.");let i=r.src_lang,a=r.tgt_lang;if(!e.language_codes.includes(a))throw Error(`Target language code "${a}" is not valid. Must be one of: {${e.language_codes.join(`, `)}}`);if(i!==void 0){if(!e.language_codes.includes(i))throw Error(`Source language code "${i}" is not valid. Must be one of: {${e.language_codes.join(`, `)}}`);for(let t of e._tokenizer.post_processor.config.single)if(`SpecialToken`in t&&e.languageRegex.test(t.SpecialToken.id)){t.SpecialToken.id=e.lang_to_token(i);break}}return r.forced_bos_token_id=e._tokenizer.token_to_id(e.lang_to_token(a)),e._call(t,n)}var Zz={};LN(Zz,{AlbertTokenizer:()=>Qz,AutoTokenizer:()=>JB,BartTokenizer:()=>$z,BertTokenizer:()=>eB,BlenderbotSmallTokenizer:()=>tB,BlenderbotTokenizer:()=>nB,BloomTokenizer:()=>rB,CLIPTokenizer:()=>aB,CamembertTokenizer:()=>iB,CodeGenTokenizer:()=>sB,CodeLlamaTokenizer:()=>oB,CohereTokenizer:()=>cB,ConvBertTokenizer:()=>lB,DebertaTokenizer:()=>dB,DebertaV2Tokenizer:()=>uB,DistilBertTokenizer:()=>fB,ElectraTokenizer:()=>pB,EsmTokenizer:()=>mB,FalconTokenizer:()=>hB,GPT2Tokenizer:()=>vB,GPTNeoXTokenizer:()=>_B,GemmaTokenizer:()=>gB,HerbertTokenizer:()=>yB,LlamaTokenizer:()=>bB,M2M100Tokenizer:()=>xB,MBart50Tokenizer:()=>wB,MBartTokenizer:()=>CB,MPNetTokenizer:()=>DB,MarianTokenizer:()=>SB,MgpstrTokenizer:()=>TB,MobileBertTokenizer:()=>EB,NllbTokenizer:()=>OB,NougatTokenizer:()=>kB,PreTrainedTokenizer:()=>Yz,Qwen2Tokenizer:()=>AB,RoFormerTokenizer:()=>MB,RobertaTokenizer:()=>jB,SiglipTokenizer:()=>NB,SpeechT5Tokenizer:()=>PB,SqueezeBertTokenizer:()=>FB,T5Tokenizer:()=>IB,TokenizersBackend:()=>Yz,VitsTokenizer:()=>RB,Wav2Vec2CTCTokenizer:()=>zB,WhisperTokenizer:()=>GB,XLMRobertaTokenizer:()=>KB,XLMTokenizer:()=>qB});var Qz=class extends Yz{return_token_type_ids=!0},$z=class extends Yz{},eB=class extends Yz{return_token_type_ids=!0},tB=class extends Yz{},nB=class extends Yz{},rB=class extends Yz{},iB=class extends Yz{},aB=class extends Yz{},oB=class extends Yz{},sB=class extends Yz{},cB=class extends Yz{},lB=class extends Yz{return_token_type_ids=!0},uB=class extends Yz{return_token_type_ids=!0},dB=class extends Yz{return_token_type_ids=!0},fB=class extends Yz{},pB=class extends Yz{return_token_type_ids=!0},mB=class extends Yz{},hB=class extends Yz{},gB=class extends Yz{},_B=class extends Yz{},vB=class extends Yz{},yB=class extends Yz{return_token_type_ids=!0},bB=class extends Yz{padding_side=`left`},xB=class extends Yz{constructor(e,t){super(e,t),this.languageRegex=/^__[a-z]{2,3}__$/,this.language_codes=this.all_special_tokens.filter(e=>this.languageRegex.test(e)).map(e=>e.slice(2,-2)),this.lang_to_token=e=>`__${e}__`}_build_translation_inputs(e,t,n){return Xz(this,e,t,n)}},SB=class extends Yz{constructor(e,t){super(e,t),this.languageRegex=/^(>>\w+<<)\s*/g,this.supported_language_codes=Array.from(this.get_vocab().keys()).filter(e=>this.languageRegex.test(e)),TP.warn('WARNING: `MarianTokenizer` is not yet supported by Hugging Face\'s "fast" tokenizers library. Therefore, you may experience slightly inaccurate results.')}_encode_text(e){if(e===null)return null;let[t,...n]=e.trim().split(this.languageRegex);if(n.length===0)return super._encode_text(t);if(n.length===2){let[e,t]=n;return this.supported_language_codes.includes(e)||TP.warn(`Unsupported language code "${e}" detected, which may lead to unexpected behavior. Should be one of: ${JSON.stringify(this.supported_language_codes)}`),bP([e],super._encode_text(t))}}},CB=class extends Yz{constructor(e,t){super(e,t),this.languageRegex=/^[a-z]{2}_[A-Z]{2}$/,this.language_codes=this.all_special_tokens.filter(e=>this.languageRegex.test(e)).map(e=>e),this.lang_to_token=e=>e}_build_translation_inputs(e,t,n){return Xz(this,e,t,n)}},wB=class extends CB{},TB=class extends Yz{},EB=class extends Yz{return_token_type_ids=!0},DB=class extends Yz{},OB=class extends Yz{constructor(e,t){super(e,t),this.languageRegex=/^[a-z]{3}_[A-Z][a-z]{3}$/,this.language_codes=this.all_special_tokens.filter(e=>this.languageRegex.test(e)),this.lang_to_token=e=>e}_build_translation_inputs(e,t,n){return Xz(this,e,t,n)}},kB=class extends Yz{},AB=class extends Yz{},jB=class extends Yz{},MB=class extends Yz{return_token_type_ids=!0},NB=class extends Yz{},PB=class extends Yz{},FB=class extends Yz{return_token_type_ids=!0},IB=class extends Yz{},LB=class extends KF{decode_chain(e){let t=``;for(let n=1;n[t,e]),...[[`burmese`,`my`],[`valencian`,`ca`],[`flemish`,`nl`],[`haitian`,`ht`],[`letzeburgesch`,`lb`],[`pushto`,`ps`],[`panjabi`,`pa`],[`moldavian`,`ro`],[`moldovan`,`ro`],[`sinhalese`,`si`],[`castilian`,`es`]]]);function UB(e){e=e.toLowerCase();let t=HB.get(e);if(t===void 0){let n=e.match(/^<\|([a-z]{2})\|>$/);if(n&&(e=n[1]),VB.has(e))t=e;else{let t=e.length===2?VB.keys():VB.values();throw Error(`Language "${e}" is not supported. Must be one of: ${JSON.stringify(Array.from(t))}`)}}return t}var WB=RegExp(`^[\\p{P}\\u0021-\\u002F\\u003A-\\u0040\\u005B-\\u0060\\u007B-\\u007E]+$`,`gu`),GB=class extends Yz{get timestamp_begin(){return this._tokenizer.token_to_id(`<|notimestamps|>`)+1}_decode_asr(e,{return_timestamps:t=!1,return_language:n=!1,time_precision:r=null,force_full_sequences:i=!0}={}){if(r===null)throw Error(`Must specify time_precision`);let a=null,o=t===`word`;function s(){return{language:a,timestamp:[null,null],text:``}}let c=[],l=s(),u=0,d=this.timestamp_begin,f=d+1500,p=[],m=[],h=!1,g=null,_=new Set(this.all_special_ids);for(let n of e){let e=n.tokens,i=o?n.token_timestamps:null,v=null,y=d;if(`stride`in n){let[t,i,a]=n.stride;if(u-=i,g=t-a,i&&(y=i/r+d),a)for(let t=e.length-1;t>=0;--t){let n=Number(e[t]);if(n>=d){if(v!==null&&(n-d)*r=d&&g<=f){let e=OR((g-d)*r+u,2);if(v!==null&&g>=v)h=!0;else if(h||p.length>0&&g0?(p.push(b),o&&m.push(x)):p.every(e=>e.length===0)&&(l=s(),p=[],b=[],m=[],x=[])}if(p.length>0){if(i&&t)throw Error(`Whisper did not predict an ending timestamp, which can happen if audio is cut off in the middle of a word. Also make sure WhisperTimeStampLogitsProcessor was used during generation.`);let[e,n]=this.findLongestCommonSequence(p,m),r=this.decode(e);l.text=r,o&&(l.words=this.collateWordTimestamps(e,n,a)),c.push(l)}let v=Object.create(null),y=c.map(e=>e.text).join(``);if(t||n){for(let e=0;e0,o=a?[]:null,s=a?t[0]:null;for(let c=1;ce===g[n]&&s[i+n]<=t[c][m+n]).length:p.filter((e,t)=>e===g[t]).length;let v=e/1e4,y=_/e+v;_>1&&y>u&&(u=y,d=[i,o,m,h])}let[p,m,h,g]=d,_=Math.floor((m+p)/2),v=Math.floor((g+h)/2);i.push(...n.slice(0,_)),n=l.slice(v),r=n.length,a&&(o.push(...s.slice(0,_)),s=t[c].slice(v))}return i.push(...n),a?(o.push(...s),[i,o]):[i,[]]}collateWordTimestamps(e,t,n){let[r,i,a]=this.combineTokensIntoWords(e,n),o=[];for(let e=0;e=r){let e=((t-r)*n).toFixed(2);i.push(`<|${e}|>`),i.push([])}else i[i.length-1].push(t);return i=i.map(e=>typeof e==`string`?e:super.decode(e,t)),i.join(``)}splitTokensOnUnicode(e){let t=this.decode(e,{decode_with_timestamps:!0}),n=[],r=[],i=[],a=[],o=[],s=0;for(let c=0;c=this._tokenizer.token_to_id(`<|endoftext|>`),d=s.startsWith(` `),f=s.trim(),p=WB.test(f);if(u||d||p||i.length===0)i.push(s),a.push(c),o.push(l);else{let e=i.length-1;i[e]+=s,a[e].push(...c),o[e].push(...l)}}return[i,a,o]}mergePunctuations(e,t,n,r,i){let a=structuredClone(e),o=structuredClone(t),s=structuredClone(n),c=a.length-2,l=a.length-1;for(;c>=0;)a[c].startsWith(` `)&&r.includes(a[c].trim())?(a[l]=a[c]+a[l],o[l]=bP(o[c],o[l]),s[l]=bP(s[c],s[l]),a[c]=``,o[c]=[],s[c]=[]):l=c,--c;for(c=0,l=1;le),o.filter(e=>e.length>0),s.filter(e=>e.length>0)]}},KB=class extends Yz{},qB=class extends Yz{return_token_type_ids=!0;constructor(e,t){super(e,t),TP.warn('WARNING: `XLMTokenizer` is not yet supported by Hugging Face\'s "fast" tokenizers library. Therefore, you may experience slightly inaccurate results.')}},JB=class{static async from_pretrained(e,{progress_callback:t=null,config:n=null,cache_dir:r=null,local_files_only:i=!1,revision:a=`main`}={}){let[o,s]=await Hz(e,{progress_callback:t,config:n,cache_dir:r,local_files_only:i,revision:a}),c=s.tokenizer_class?.replace(/Fast$/,``)??`PreTrainedTokenizer`,l=Zz[c];return l||=(TP.warn(`Unknown tokenizer class "${c}", attempting to construct from base class.`),Yz),new l(o,s)}},YB=`https://github.com/huggingface/transformers.js/issues/new/choose`,XB=`preprocessor_config.json`,ZB=XB,QB=`processor_config.json`,$B=`chat_template.jinja`,eV=class extends RL{static classes=[`image_processor_class`,`tokenizer_class`,`feature_extractor_class`];static uses_processor_config=!1;static uses_chat_template_file=!1;constructor(e,t,n){super(),this.config=e,this.components=t,this.chat_template=n}get image_processor(){return this.components.image_processor}get tokenizer(){return this.components.tokenizer}get feature_extractor(){return this.components.feature_extractor}apply_chat_template(e,t={}){if(!this.tokenizer)throw Error(`Unable to apply chat template without a tokenizer.`);return this.tokenizer.apply_chat_template(e,{tokenize:!1,chat_template:this.chat_template??void 0,...t})}batch_decode(...e){if(!this.tokenizer)throw Error(`Unable to decode without a tokenizer.`);return this.tokenizer.batch_decode(...e)}decode(...e){if(!this.tokenizer)throw Error(`Unable to decode without a tokenizer.`);return this.tokenizer.decode(...e)}async _call(e,...t){for(let n of[this.image_processor,this.feature_extractor,this.tokenizer])if(n)return n(e,...t);throw Error(`No image processor, feature extractor, or tokenizer found.`)}static async from_pretrained(e,t={}){let[n,r,i]=await Promise.all([this.uses_processor_config?gR(e,QB,!0,t):{},Promise.all(this.classes.filter(e=>e in this).map(async n=>{let r=await this[n].from_pretrained(e,t);return[n.replace(/_class$/,``),r]})).then(Object.fromEntries),this.uses_chat_template_file?hR(e,$B,!0,t):null]);return new this(n,r,i)}},tV={};LN(tV,{ChatterboxProcessor:()=>WV,Florence2Processor:()=>xU,Gemma3nProcessor:()=>SU,GroundingDinoProcessor:()=>wU,Idefics3Processor:()=>OU,JinaCLIPProcessor:()=>AU,LlavaProcessor:()=>jU,MgpstrProcessor:()=>NU,MoonshineProcessor:()=>PU,OwlViTProcessor:()=>FU,PaliGemmaProcessor:()=>RU,Phi3VProcessor:()=>VU,PixtralProcessor:()=>HU,Processor:()=>eV,PyAnnoteProcessor:()=>UU,Qwen2VLProcessor:()=>WU,Qwen2_5_VLProcessor:()=>GU,Qwen3VLProcessor:()=>KU,Sam2Processor:()=>JU,Sam2VideoProcessor:()=>YU,SamProcessor:()=>qU,SmolVLMProcessor:()=>OU,SpeechT5Processor:()=>XU,UltravoxProcessor:()=>ZU,VLChatProcessor:()=>kU,VoxtralProcessor:()=>nW,Wav2Vec2Processor:()=>rW,Wav2Vec2ProcessorWithLM:()=>iW,WhisperProcessor:()=>aW});var nV=class extends RL{constructor(e){super(),this.config=e}static async from_pretrained(e,t={}){let n=await gR(e,XB,!0,t);return new this(n)}};function rV(e,t){if(!(e instanceof Float32Array||e instanceof Float64Array))throw Error(`${t} expects input to be a Float32Array or a Float64Array, but got ${e?.constructor?.name??typeof e} instead. If using the feature extractor directly, remember to use \`read_audio(url, sampling_rate)\` to obtain the raw audio data of the file/url.`)}var iV={};LN(iV,{ASTFeatureExtractor:()=>DV,ChatterboxFeatureExtractor:()=>kV,ClapFeatureExtractor:()=>AV,DacFeatureExtractor:()=>jV,EncodecFeatureExtractor:()=>OV,FeatureExtractor:()=>nV,Gemma3nAudioFeatureExtractor:()=>MV,MoonshineFeatureExtractor:()=>NV,ParakeetFeatureExtractor:()=>FV,PyAnnoteFeatureExtractor:()=>IV,SeamlessM4TFeatureExtractor:()=>LV,SnacFeatureExtractor:()=>RV,SpeechT5FeatureExtractor:()=>zV,Wav2Vec2FeatureExtractor:()=>BV,WeSpeakerFeatureExtractor:()=>VV,WhisperFeatureExtractor:()=>HV});var aV={fromWeb:()=>{}};async function oV(e,t){if(aP.IS_BROWSER_ENV){if(aP.IS_WEBWORKER_ENV)throw Error(`Unable to save a file from a Web Worker.`);let n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=e,r.click(),r.remove(),URL.revokeObjectURL(n)}else if(aP.IS_FS_AVAILABLE){let n=t.stream();await(aV.fromWeb(n),RN.createWriteStream(e),void 0)}else throw Error(`Unable to save because filesystem is disabled in this environment.`)}async function sV(e,t){if(typeof AudioContext>`u`)throw Error("Unable to load audio from path/URL since `AudioContext` is not available in your environment. Instead, audio data should be passed directly to the pipeline/processor. For more information and some example code, see https://huggingface.co/docs/transformers.js/guides/node-audio-processing.");let n=await(await cR(e)).arrayBuffer(),r=new AudioContext({sampleRate:t});t===void 0&&TP.warn(`No sampling rate provided, using default of ${r.sampleRate}Hz.`);let i=await r.decodeAudioData(n),a;if(i.numberOfChannels===2){let e=Math.sqrt(2),t=i.getChannelData(0),n=i.getChannelData(1);a=new Float32Array(t.length);for(let r=0;r2595*Math.log10(1+e/700),kaldi:e=>1127*Math.log(1+e/700),slaney:(e,t=1e3,n=15,r=27/Math.log(6.4))=>e>=t?n+Math.log(e/t)*r:3*e/200};function fV(e,t=`htk`){let n=dV[t];if(!n)throw Error(`mel_scale should be one of "htk", "slaney" or "kaldi".`);return typeof e==`number`?n(e):e.map(e=>n(e))}var pV={htk:e=>700*(10**(e/2595)-1),kaldi:e=>700*(Math.exp(e/1127)-1),slaney:(e,t=1e3,n=15,r=Math.log(6.4)/27)=>e>=n?t*Math.exp(r*(e-n)):200*e/3};function mV(e,t=`htk`){let n=pV[t];if(!n)throw Error(`mel_scale should be one of "htk", "slaney" or "kaldi".`);return typeof e==`number`?n(e):e.map(e=>n(e))}function hV(e,t){let n=Float64Array.from({length:t.length-1},(e,n)=>t[n+1]-t[n]),r=Array.from({length:e.length},()=>Array(t.length));for(let n=0;nArray(e.length));for(let t=0;te+r*n)}function _V(e,t,n,r,i,a=null,o=`htk`,s=!1){if(a!==null&&a!==`slaney`)throw Error(`norm must be one of null or "slaney"`);if(e<2)throw Error(`Require num_frequency_bins: ${e} >= 2`);if(n>r)throw Error(`Require min_frequency: ${n} <= max_frequency: ${r}`);let c=gV(fV(n,o),fV(r,o),t+2),l=mV(c,o),u;if(s){let t=i/((e-1)*2);u=fV(Float64Array.from({length:e},(e,n)=>n*t),o),l=c}else u=gV(0,Math.floor(i/2),e);let d=hV(u,l);if(a!==null&&a===`slaney`)for(let n=0;ni)throw Error(`frame_length (${n}) may not be larger than fft_length (${i})`);if(S!==n)throw Error(`Length of the window (${S}) must equal frame_length (${n})`);if(r<=0)throw Error(`hop_length must be greater than zero`);if(a===null&&d!==null)throw Error("You have provided `mel_filters` but `power` is `None`. Mel spectrogram computation is not yet supported for complex-valued spectrogram. Specify `power` to fix this issue.");if(!u)throw Error("`preemphasis_htk_flavor=false` is not currently supported.");if(o)switch(s){case`reflect`:{let t=Math.floor((i-1)/2)+1;e=vV(e,t,t);break}case`constant`:{let t=Math.floor(i/2),n=new e.constructor(e.length+2*t);n.set(e,t),e=n;break}default:throw Error(`pad_mode="${s}" not implemented yet.`)}let C=Math.floor(1+Math.floor((e.length-n)/r));v!==null&&CC?b&&(te=y):te=T=y);let ne=new ER(i),E=new Float64Array(i),D=new Float64Array(ne.outputBufferSize),re=new Float32Array(w*te);for(let i=0;i=1;--e)E[e]-=l*E[e-1];E[0]*=1-l}for(let e=0;ee**.85);break;default:throw Error(`Unknown window type ${t}.`)}if(n&&(o=o.subarray(0,e)),r===null)return o;if(e>r)throw Error(`Length of the window (${e}) may not be larger than frame_length (${r})`);return o}function wV(e,t){let n=e.reduce((e,t)=>e+t.length,0),r=new ArrayBuffer(44),i=new DataView(r);return TV(i,0,`RIFF`),i.setUint32(4,36+n*4,!0),TV(i,8,`WAVE`),TV(i,12,`fmt `),i.setUint32(16,16,!0),i.setUint16(20,3,!0),i.setUint16(22,1,!0),i.setUint32(24,t,!0),i.setUint32(28,t*4,!0),i.setUint16(32,4,!0),i.setUint16(34,32,!0),TV(i,36,`data`),i.setUint32(40,n*4,!0),new Blob([r,...e.map(e=>e.buffer)],{type:`audio/wav`})}function TV(e,t,n){for(let r=0;re+t.length,0),t=new Float32Array(e),n=0;for(let e of this.audio)t.set(e,n),n+=e.length;return t}else return this.audio}toBlob(){let e=this.audio;return e instanceof Float32Array&&(e=[e]),wV(e,this.sampling_rate)}async save(e){return oV(e,this.toBlob())}},DV=class extends nV{constructor(e){super(e);let t=this.config.sampling_rate;this.mel_filters=_V(257,this.config.num_mel_bins,20,Math.floor(t/2),t,null,`kaldi`,!0),this.window=CV(400,`hann`,{periodic:!1}),this.mean=this.config.mean,this.std=this.config.std}async _extract_fbank_features(e,t){return SV(e,this.window,400,160,{fft_length:512,power:2,center:!1,preemphasis:.97,mel_filters:this.mel_filters,log_mel:`log`,mel_floor:1.192092955078125e-7,remove_dc_offset:!0,max_num_frames:t,transpose:!0})}async _call(e){rV(e,`ASTFeatureExtractor`);let t=await this._extract_fbank_features(e,this.config.max_length);if(this.config.do_normalize){let e=this.std*2,n=t.data;for(let t=0;t0)if(n===`rand_trunc`){let n=Math.floor(WL.random()*(a+1));e=e.subarray(n,n+t),i=await this._extract_fbank_features(e,this.mel_filters_slaney,this.config.nb_max_samples)}else throw Error(`Truncation strategy "${n}" not implemented`);else{if(a<0){let n=new Float64Array(t);if(n.set(e),r===`repeat`)for(let r=e.length;rt&&(e=e.slice(0,t)),r&&e.length%i!==0){let t=i-e.length%i,n=new Float64Array(e.length+t);n.set(e),this.config.padding_value!==0&&n.fill(this.config.padding_value,e.length),e=n}let a=await this._extract_fbank_features(e,this.config.max_length),o=Nz([1,a.dims[0]],!0);return{input_features:a.unsqueeze_(0),input_features_mask:o}}},NV=class extends nV{async _call(e){rV(e,`MoonshineFeatureExtractor`),e instanceof Float64Array&&(e=new Float32Array(e));let t=[1,e.length];return{input_values:new pz(`float32`,e,t)}}},PV=1e-5,FV=class extends nV{constructor(e){super(e),this.config.mel_filters??=_V(Math.floor(1+this.config.n_fft/2),this.config.feature_size,0,this.config.sampling_rate/2,this.config.sampling_rate,`slaney`,`slaney`);let t=CV(this.config.win_length,`hann`,{periodic:!1});this.window=new Float64Array(this.config.n_fft);let n=Math.floor((this.config.n_fft-this.config.win_length)/2);this.window.set(t,n)}async _extract_fbank_features(e){let t=this.config.preemphasis;e=new Float64Array(e);for(let n=e.length-1;n>=1;--n)e[n]-=t*e[n-1];return await SV(e,this.window,this.window.length,this.config.hop_length,{fft_length:this.config.n_fft,power:2,mel_filters:this.config.mel_filters,log_mel:`log`,mel_floor:-1/0,pad_mode:`constant`,center:!0,transpose:!0,mel_offset:2**-24})}async _call(e){rV(e,`ParakeetFeatureExtractor`);let t=await this._extract_fbank_features(e),n=Math.floor((e.length+Math.floor(this.config.n_fft/2)*2-this.config.n_fft)/this.config.hop_length),r=t.data;r.fill(0,n*t.dims[1]);let[i,a]=t.dims,o=new Float64Array(a),s=new Float64Array(a);for(let e=0;e1?n-1:1;for(let e=0;e({id:e,start:t*n,end:r*n,confidence:i/(r-t)})))}return r}},LV=class extends nV{constructor(e){super(e);let t=this.config.sampling_rate;this.mel_filters=_V(257,this.config.num_mel_bins,20,Math.floor(t/2),t,null,`kaldi`,!0),this.window=CV(400,`povey`,{periodic:!1})}async _extract_fbank_features(e,t){return e=e.map(e=>e*32768),SV(e,this.window,400,160,{fft_length:512,power:2,center:!1,preemphasis:.97,mel_filters:this.mel_filters,log_mel:`log`,mel_floor:1.192092955078125e-7,remove_dc_offset:!0,max_num_frames:t,transpose:!0})}async _call(e,{padding:t=!0,pad_to_multiple_of:n=2,do_normalize_per_mel_bins:r=!0,return_attention_mask:i=!0}={}){rV(e,`SeamlessM4TFeatureExtractor`);let a=await this._extract_fbank_features(e,this.config.max_length);if(r){let[e,t]=a.dims,n=a.data;for(let r=0;r0){let n=new Float32Array(t*(e+s));n.set(r),n.fill(this.config.padding_value,r.length);let c=e+s;a=new pz(a.type,n,[c,t]),i&&(o=new pz(`int64`,new BigInt64Array(c),[1,c]),o.data.fill(1n,0,e))}}let[s,c]=a.dims,l=this.config.stride;if(s%l!==0)throw Error(`The number of frames (${s}) must be a multiple of the stride (${l}).`);let u=a.view(1,Math.floor(s/l),c*l),d={input_features:u};if(i){let e=u.dims[1],t=new BigInt64Array(e);if(o){let e=o.data;for(let n=1,r=0;ne+t,0)/e.length,n=e.reduce((e,n)=>e+(n-t)**2,0)/e.length;return e.map(e=>(e-t)/Math.sqrt(n+1e-7))}async _call(e){rV(e,`Wav2Vec2FeatureExtractor`),e instanceof Float64Array&&(e=new Float32Array(e));let t=e;this.config.do_normalize&&(t=this._zero_mean_unit_var_norm(t));let n=[1,t.length];return{input_values:new pz(`float32`,t,n),attention_mask:new pz(`int64`,new BigInt64Array(t.length).fill(1n),n)}}},VV=class extends nV{constructor(e){super(e);let t=this.config.sampling_rate;this.mel_filters=_V(257,this.config.num_mel_bins,20,Math.floor(t/2),t,null,`kaldi`,!0),this.window=CV(400,`hamming`,{periodic:!1}),this.min_num_frames=this.config.min_num_frames}async _extract_fbank_features(e){return e=e.map(e=>e*32768),SV(e,this.window,400,160,{fft_length:512,power:2,center:!1,preemphasis:.97,mel_filters:this.mel_filters,log_mel:`log`,mel_floor:1.192092955078125e-7,remove_dc_offset:!0,transpose:!0,min_num_frames:this.min_num_frames})}async _call(e){rV(e,`WeSpeakerFeatureExtractor`);let t=(await this._extract_fbank_features(e)).unsqueeze_(0);if(this.config.fbank_centering_span===null){let e=t.mean(1).data,n=t.data,[r,i,a]=t.dims;for(let t=0;tr?(e.length>this.config.n_samples&&TP.warn("Attempting to extract features for audio longer than 30 seconds. If using a pipeline to extract transcript from a long audio clip, remember to specify `chunk_length_s` and/or `stride_length_s`."),n=e.slice(0,r)):(n=new Float32Array(r),n.set(e)),{input_features:(await this._extract_fbank_features(n)).unsqueeze_(0)}}},UV=class{static async from_pretrained(e,t={}){let n=await gR(e,XB,!0,t),r=n.feature_extractor_type,i=iV[r];if(!i)throw Error(`Unknown feature_extractor_type: '${r}'. Please report this at ${YB}.`);return new i(n)}},WV=class extends eV{static tokenizer_class=JB;static feature_extractor_class=UV;async _call(e,t=null){let n=this.tokenizer(e),r=t?await this.feature_extractor(t):{};return{...n,...r}}},GV={},KV,qV,JV;if(aP.IS_WEB_ENV)KV=(e,t)=>{if(!self.OffscreenCanvas)throw Error(`OffscreenCanvas not supported by this environment.`);return new self.OffscreenCanvas(e,t)},JV=self.createImageBitmap,qV=self.ImageData;else if(GV)JV=async e=>{let t=(await e.metadata()).channels,{data:n,info:r}=await e.rotate().raw().toBuffer({resolveWithObject:!0}),i=new ZV(new Uint8ClampedArray(n),r.width,r.height,r.channels);return t!==void 0&&t!==r.channels&&i.convert(t),i};else throw Error(`Unable to load image processing library.`);var YV={0:`nearest`,1:`lanczos`,2:`bilinear`,3:`bicubic`,4:`box`,5:`hamming`},XV=new Map([[`png`,`image/png`],[`jpg`,`image/jpeg`],[`jpeg`,`image/jpeg`],[`gif`,`image/gif`]]),ZV=class e{constructor(e,t,n,r){this.data=e,this.width=t,this.height=n,this.channels=r}get size(){return[this.width,this.height]}static async read(t){if(t instanceof e)return t;if(typeof t==`string`||t instanceof URL)return await this.fromURL(t);if(t instanceof Blob)return await this.fromBlob(t);if(typeof HTMLCanvasElement<`u`&&t instanceof HTMLCanvasElement||typeof OffscreenCanvas<`u`&&t instanceof OffscreenCanvas)return this.fromCanvas(t);throw Error(`Unsupported input type: ${typeof t}`)}static fromCanvas(t){if(!aP.IS_WEB_ENV)throw Error(`fromCanvas() is only supported in browser environments.`);let n=t.getContext(`2d`).getImageData(0,0,t.width,t.height).data;return new e(n,t.width,t.height,4)}static async fromURL(e){let t=await cR(e);if(t.status!==200)throw Error(`Unable to read image from "${e}" (${t.status} ${t.statusText})`);let n=await t.blob();return this.fromBlob(n)}static async fromBlob(e){if(aP.IS_WEB_ENV){let t=await JV(e),n=KV(t.width,t.height).getContext(`2d`);return n.drawImage(t,0,0),new this(n.getImageData(0,0,t.width,t.height).data,t.width,t.height,4)}else{let t=GV(await e.arrayBuffer());return await JV(t)}}static fromTensor(t,n=`CHW`){if(t.dims.length!==3)throw Error(`Tensor should have 3 dimensions, but has ${t.dims.length} dimensions.`);if(n===`CHW`)t=t.transpose(1,2,0);else if(n!==`HWC`)throw Error(`Unsupported channel format: ${n}`);if(!(t.data instanceof Uint8ClampedArray||t.data instanceof Uint8Array))throw Error(`Unsupported tensor type: ${t.type}`);switch(t.dims[2]){case 1:case 2:case 3:case 4:return new e(t.data,t.dims[1],t.dims[0],t.dims[2]);default:throw Error(`Unsupported number of channels: ${t.dims[2]}`)}}grayscale(){if(this.channels===1)return this;let e=new Uint8ClampedArray(this.width*this.height*1);switch(this.channels){case 3:case 4:for(let t=0,n=0;t=0?c=r:u=-r,i>=0?l=i:d=-i,s.drawImage(o,c,l,t,n,u,d,t,n),new e(s.getImageData(0,0,t,n).data,t,n,4).convert(a)}else{let e=this.toSharp();if(r>=0&&i>=0)e=e.extract({left:Math.floor(r),top:Math.floor(i),width:t,height:n});else if(r<=0&&i<=0){let a=Math.floor(-i),o=Math.floor(-r);e=e.extend({top:a,left:o,right:t-this.width-o,bottom:n-this.height-a})}else{let a=[0,0],o=0;i<0?(a[0]=Math.floor(-i),a[1]=n-this.height-a[0]):o=Math.floor(i);let s=[0,0],c=0;r<0?(s[0]=Math.floor(-r),s[1]=t-this.width-s[0]):c=Math.floor(r),e=e.extend({top:a[0],bottom:a[1],left:s[0],right:s[1]}).extract({left:c,top:o,width:t,height:n})}return await JV(e)}}async toBlob(e=`image/png`,t=1){if(!aP.IS_WEB_ENV)throw Error(`toBlob() is only supported in browser environments.`);return await this.toCanvas().convertToBlob({type:e,quality:t})}toTensor(e=`CHW`){let t=new pz(`uint8`,new Uint8Array(this.data),[this.height,this.width,this.channels]);if(e!==`HWC`)if(e===`CHW`)t=t.permute(2,0,1);else throw Error(`Unsupported channel format: ${e}`);return t}toCanvas(){if(!aP.IS_WEB_ENV)throw Error(`toCanvas() is only supported in browser environments.`);let e=this.clone().rgba(),t=KV(e.width,e.height),n=new qV(e.data,e.width,e.height);return t.getContext(`2d`).putImageData(n,0,0),t}split(){let{data:t,width:n,height:r,channels:i}=this,a=t.constructor,o=t.length/i,s=Array.from({length:i},()=>new a(o));for(let e=0;enew e(t,n,r,1))}_update(e,t,n,r=null){return this.data=e,this.width=t,this.height=n,r!==null&&(this.channels=r),this}clone(){return new e(this.data.slice(),this.width,this.height,this.channels)}convert(e){if(this.channels===e)return this;switch(e){case 1:this.grayscale();break;case 3:this.rgb();break;case 4:this.rgba();break;default:throw Error(`Conversion failed due to unsupported number of channels: ${this.channels}`)}return this}async save(e){if(aP.IS_WEB_ENV){if(aP.IS_WEBWORKER_ENV)throw Error(`Unable to save an image from a Web Worker.`);let t=e.split(`.`).pop().toLowerCase(),n=XV.get(t)??`image/png`;return oV(e,await this.toBlob(n))}else if(aP.IS_FS_AVAILABLE)await this.toSharp().toFile(e);else throw Error(`Unable to save the image because filesystem is disabled in this environment.`)}toSharp(){if(aP.IS_WEB_ENV)throw Error(`toSharp() is only supported in server-side environments.`);return GV(this.data,{raw:{width:this.width,height:this.height,channels:this.channels}})}};ZV.read.bind(ZV);function QV(e,t,n=0,r=null){let i=e/t,a=kR(i)*t;return r!==null&&a>r&&(a=Math.floor(i)*t),at&&i.push(e)}else{let e=SR(n.data)[1];if(e===c-1||(a=yR(n.data),a[e]e*o[(t+1)%2])),u.boxes.push(n),u.classes.push(t),u.scores.push(a[t])}}l.push(u)}return l}function nH(e,t=null){let n=e.logits,r=n.dims[0];if(t!==null&&t.length!==r)throw Error(`Make sure that you pass in as many target sizes as the batch dimension of the logits`);let i=[];for(let e=0;el[n]&&(l[n]=t[n],u[n]=e)}let d=Array(a.dims[0]);for(let e=0;ee!==void 0);i.push({segmentation:c,labels:f})}return i}function rH(e,t,n,r){let i=[],a=[],o=[];for(let s=0;sn&&(i.push(l),a.push(d),o.push(u))}return[i,a,o]}function iH(e,t,n,r=.5,i=.8){let a=[],o=0,s=0,c=t[n].data;for(let t=0;t=r&&++s;let l=o>0&&s>0;return l&&=o/s>i,[l,a]}function aH(e,t,n,r,i,a=null,o=null){let[s,c]=o??e[0].dims,l=new pz(`int32`,new Int32Array(s*c),[s,c]),u=[];if(o!==null)for(let t=0;tf[e]&&(d[e]=n,f[e]=i[e])}let p=0,m=l.data;for(let a=0;ai?c=Math.floor(i*s/r):i>r&&(s=Math.floor(r*c/i)),await e.resize(c,s,{resample:n}))}async crop_margin(e,t=200){let n=e.clone().grayscale(),r=xR(n.data)[0],i=SR(n.data)[0]-r;if(i===0)return e;let a=t/255,o=n.width,s=n.height,c=0,l=0,u=n.data;for(let e=0;ethis.preprocess(e)));return{pixel_values:Dz(n.map(e=>e.pixel_values),0),original_sizes:n.map(e=>e.original_size),reshaped_input_sizes:n.map(e=>e.reshaped_input_size)}}static async from_pretrained(e,t={}){let n=await gR(e,ZB,!0,t);return new this(n)}},lH={};LN(lH,{BeitFeatureExtractor:()=>uH,BitImageProcessor:()=>dH,CLIPFeatureExtractor:()=>mH,CLIPImageProcessor:()=>pH,ChineseCLIPFeatureExtractor:()=>fH,ConvNextFeatureExtractor:()=>gH,ConvNextImageProcessor:()=>hH,DINOv3ViTImageProcessor:()=>xH,DPTFeatureExtractor:()=>TH,DPTImageProcessor:()=>wH,DeiTFeatureExtractor:()=>vH,DeiTImageProcessor:()=>_H,DetrFeatureExtractor:()=>bH,DetrImageProcessor:()=>yH,DonutFeatureExtractor:()=>CH,DonutImageProcessor:()=>SH,EfficientNetImageProcessor:()=>EH,GLPNFeatureExtractor:()=>DH,GroundingDinoImageProcessor:()=>OH,Idefics3ImageProcessor:()=>kH,ImageFeatureExtractor:()=>cH,ImageProcessor:()=>cH,JinaCLIPImageProcessor:()=>jH,LlavaOnevisionImageProcessor:()=>MH,Mask2FormerImageProcessor:()=>FH,MaskFormerFeatureExtractor:()=>PH,MaskFormerImageProcessor:()=>NH,MobileNetV1FeatureExtractor:()=>LH,MobileNetV1ImageProcessor:()=>IH,MobileNetV2FeatureExtractor:()=>zH,MobileNetV2ImageProcessor:()=>RH,MobileNetV3FeatureExtractor:()=>VH,MobileNetV3ImageProcessor:()=>BH,MobileNetV4FeatureExtractor:()=>UH,MobileNetV4ImageProcessor:()=>HH,MobileViTFeatureExtractor:()=>GH,MobileViTImageProcessor:()=>WH,NougatImageProcessor:()=>KH,OwlViTFeatureExtractor:()=>JH,OwlViTImageProcessor:()=>qH,Owlv2ImageProcessor:()=>YH,Phi3VImageProcessor:()=>tU,PixtralImageProcessor:()=>nU,PvtImageProcessor:()=>rU,Qwen2VLImageProcessor:()=>aU,RTDetrImageProcessor:()=>oU,Sam2ImageProcessor:()=>sU,Sam3ImageProcessor:()=>sU,SamImageProcessor:()=>sU,SapiensFeatureExtractor:()=>lU,SapiensImageProcessor:()=>cU,SegformerFeatureExtractor:()=>dU,SegformerImageProcessor:()=>uU,SiglipImageProcessor:()=>fU,SmolVLMImageProcessor:()=>kH,Swin2SRImageProcessor:()=>pU,VLMImageProcessor:()=>AH,ViTFeatureExtractor:()=>hU,ViTImageProcessor:()=>mU,VitMatteImageProcessor:()=>gU,VitPoseImageProcessor:()=>_U,YolosFeatureExtractor:()=>yU,YolosImageProcessor:()=>vU});var uH=class extends cH{},dH=class extends cH{},fH=class extends cH{},pH=class extends cH{},mH=class extends pH{},hH=class extends cH{constructor(e){super(e),this.crop_pct=this.config.crop_pct??224/256}async resize(e){let t=this.size?.shortest_edge;if(t===void 0)throw Error(`Size dictionary must contain 'shortest_edge' key.`);if(t<384){let n=Math.floor(t/this.crop_pct),[r,i]=this.get_resize_output_image_size(e,{shortest_edge:n});e=await e.resize(r,i,{resample:this.resample}),e=await e.center_crop(t,t)}else e=await e.resize(t,t,{resample:this.resample});return e}},gH=class extends hH{},_H=class extends cH{},vH=class extends _H{},yH=class extends cH{async _call(e){let t=await super._call(e),n=Nz([t.pixel_values.dims[0],64,64],1n);return{...t,pixel_mask:n}}post_process_object_detection(...e){return tH(...e)}post_process_panoptic_segmentation(...e){return oH(...e)}post_process_instance_segmentation(...e){return sH(...e)}},bH=class extends yH{},xH=class extends cH{},SH=class extends cH{pad_image(e,t,n,r={}){let[i,a,o]=t,s=this.image_mean;Array.isArray(this.image_mean)||(s=Array(o).fill(s));let c=this.image_std;Array.isArray(c)||(c=Array(o).fill(s));let l=s.map((e,t)=>-e/c[t]);return super.pad_image(e,t,n,{center:!0,constant_values:l,...r})}},CH=class extends SH{},wH=class extends cH{},TH=class extends wH{},EH=class extends cH{constructor(e){super(e),this.include_top=this.config.include_top??!0,this.include_top&&(this.image_std=this.image_std.map(e=>e*e))}},DH=class extends cH{},OH=class extends cH{async _call(e){let t=await super._call(e),n=t.pixel_values.dims,r=Fz([n[0],n[2],n[3]]);return{...t,pixel_mask:r}}},kH=class extends cH{constructor(e){super(e),this.do_image_splitting=e.do_image_splitting??!0,this.max_image_size=e.max_image_size}get_resize_for_vision_encoder(e,t){let[n,r]=e.dims.slice(-2),i=r/n;return r>=n?(r=Math.ceil(r/t)*t,n=Math.floor(r/i),n=Math.ceil(n/t)*t):(n=Math.ceil(n/t)*t,r=Math.floor(n*i),r=Math.ceil(r/t)*t),{height:n,width:r}}async _call(e,{do_image_splitting:t=null,return_row_col_info:n=!1}={}){let r;if(!Array.isArray(e))r=[[e]];else{if(e.length===0||!e[0])throw Error(`No images provided.`);r=Array.isArray(e[0])?e:[e]}let i=[],a=[],o=[],s=[],c=[];for(let e of r){let n=await Promise.all(e.map(e=>this.preprocess(e)));s.push(...n.map(e=>e.original_size)),c.push(...n.map(e=>e.reshaped_input_size)),n.forEach(e=>e.pixel_values.unsqueeze_(0));let{longest_edge:r}=this.max_image_size,l;if(t??this.do_image_splitting){let e=Array(n.length),t=Array(n.length);l=await Promise.all(n.map(async(n,i)=>{let a=this.get_resize_for_vision_encoder(n.pixel_values,r),o=await _z(n.pixel_values,{size:[a.height,a.width]}),{frames:s,num_splits_h:c,num_splits_w:l}=await this.split_image(o,this.max_image_size);return e[i]=c,t[i]=l,Ez(s,0)})),a.push(e),o.push(t)}else{let e=[r,r];l=await Promise.all(n.map(t=>_z(t.pixel_values,{size:e}))),a.push(Array(n.length).fill(0)),o.push(Array(n.length).fill(0))}i.push(Ez(l,0))}let l=i.length,[u,d,f,p]=i[0].dims,m,h;if(l===1)m=i[0].unsqueeze_(0),h=Nz([l,u,f,p],!0);else{let e=Math.max(...i.map(e=>e.dims.at(0)));h=Nz([l,e,f,p],!0);let t=h.data,n=e*f*p;for(let r=0;rn||o>r){s=Math.ceil(a/n),c=Math.ceil(o/r);let t=Math.ceil(a/s),l=Math.ceil(o/c);for(let n=0;ne*this.rescale_factor)}pad_image(e,t,n,r){return super.pad_image(e,t,n,{constant_values:this.constant_values,center:!0,...r})}},jH=class extends cH{constructor(e){let{resize_mode:t,fill_color:n,interpolation:r,size:i,...a}=e,o=t===`squash`?{width:i,height:i}:t===`shortest`?{shortest_edge:i}:{longest_edge:i},s=r===`bicubic`?3:2;super({...a,size:o,resample:s,do_center_crop:!0,crop_size:i,do_normalize:!0})}},MH=class extends cH{},NH=class extends cH{post_process_panoptic_segmentation(...e){return oH(...e)}post_process_instance_segmentation(...e){return sH(...e)}},PH=class extends NH{},FH=class extends NH{},IH=class extends cH{},LH=class extends IH{},RH=class extends cH{},zH=class extends RH{},BH=class extends cH{},VH=class extends BH{},HH=class extends cH{},UH=class extends HH{},WH=class extends cH{},GH=class extends WH{},KH=class extends SH{},qH=class extends cH{post_process_object_detection(...e){return tH(...e)}},JH=class extends qH{},YH=class extends qH{},XH=336,ZH=[2,3],{ceil:QH,floor:$H,sqrt:eU}=Math,tU=class extends cH{constructor(e){super({...e,do_normalize:!0,do_pad:!0,pad_size:`custom`,do_convert_rgb:!0,do_resize:!0}),this._num_crops=e.num_crops}calc_num_image_tokens_from_image_size(e,t){let{num_img_tokens:n}=this.config;return $H(($H(t/XH)*$H(e/XH)+1)*n+1+($H(t/XH)+1)*eU(n))}get_resize_output_image_size(e,t){let n=this._num_crops,[r,i]=e.size,a=r/i,o=1;for(;o*Math.ceil(o/a)<=n;)o+=1;--o;let s=Math.floor(o*336);return[s,Math.floor(s/a)]}pad_image(e,t,n,r={}){let[i,a]=t,o=XH*QH(i/XH),s=XH*QH(a/XH),c=[1,1,1].map((e,t)=>(e-this.image_mean[t])/this.image_std[t]);return super.pad_image(e,t,{width:s,height:o},{center:!0,constant_values:c,...r})}async _call(e,{num_crops:t=null}={}){if(this._num_crops=t??=this.config.num_crops,t<4||eU(t)%1!=0)throw Error(`num_crops must be a square number >= 4`);Array.isArray(e)||(e=[e]);let n=e.length,r=await Promise.all(e.map(e=>this.preprocess(e))),i=r.map(e=>e.original_size),a=r.map(e=>e.reshaped_input_size),o=[];for(let{pixel_values:e}of r){e.unsqueeze_(0);let[n,r]=e.dims.slice(-2),i=await _z(e,{size:[XH,XH],mode:`bicubic`});if(t>0){let a=[],s=eU(t),c=$H(r/s),l=$H(n/s);for(let t=0;te.map(e=>XH*QH(e/XH)));return{pixel_values:s,original_sizes:i,reshaped_input_sizes:a,image_sizes:new pz(`int64`,c.flat(),[n,2]),num_img_tokens:c.map(([e,t])=>this.calc_num_image_tokens_from_image_size(t,e))}}},nU=class extends cH{get_resize_output_image_size(e,t){let{longest_edge:n}=t;if(n===void 0)throw Error(`size must contain 'longest_edge'`);let[r,i]=e.size,a=Math.max(r,i)/n,o=r,s=i;a>1&&(o=Math.floor(r/a),s=Math.floor(i/a));let{patch_size:c,spatial_merge_size:l}=this.config;if(!l)throw Error(`config must contain 'spatial_merge_size'`);let u=c*l,d=Math.floor((o-1)/u)+1,f=Math.floor((s-1)/u)+1;return[d*u,f*u]}},rU=class extends cH{};function iU(e,t,n=28,r=3136,i=784*1280){if(e200)throw Error(`absolute aspect ratio must be smaller than 200, got ${Math.max(e,t)/Math.min(e,t)}`);let a=Math.round(e/n)*n,o=Math.round(t/n)*n;if(a*o>i){let r=Math.sqrt(e*t/i);a=Math.floor(e/r/n)*n,o=Math.floor(t/r/n)*n}else if(a*oa),0));let l=a.dims[0]/o,u=a.dims[1],d=Math.floor(a.dims[2]/c),f=Math.floor(a.dims[3]/c);return{pixel_values:a.view(l,o,u,Math.floor(d/s),s,c,Math.floor(f/s),s,c).permute(0,3,6,4,7,2,1,5,8).view(l*d*f,u*o*c*c),image_grid_thw:new pz(`int64`,[l,d,f],[1,3]),original_sizes:r,reshaped_input_sizes:i}}},oU=class extends cH{post_process_object_detection(...e){return tH(...e)}},sU=class extends cH{reshape_input_points(e,t,n,r=!1){e=structuredClone(e);let i=yP(e);if(i.length===3)r||(i=[1,...i]),e=[e];else if(i.length!==4)throw Error("The input_points must be a 4D tensor of shape `batch_size`, `point_batch_size`, `nb_points_per_image`, `2`.");for(let r=0;re!==t.dims[n]))throw Error(`The first ${n.length} dimensions of 'input_points' and 'input_labels' must be the same.`);return new pz(`int64`,e.flat(1/0).map(BigInt),n)}async _call(e,{input_points:t=null,input_labels:n=null,input_boxes:r=null}={}){let i=await super._call(e);if(t&&(i.input_points=this.reshape_input_points(t,i.original_sizes,i.reshaped_input_sizes)),n){if(!i.input_points)throw Error("`input_points` must be provided if `input_labels` are provided.");i.input_labels=this.add_input_labels(n,i.input_points)}return r&&(i.input_boxes=this.reshape_input_points(r,i.original_sizes,i.reshaped_input_sizes,!0)),i}async post_process_masks(e,t,n,{mask_threshold:r=0,binarize:i=!0,pad_size:a=null}={}){let o=[];a=a??this.pad_size??this.size;let s=[a.height,a.width];for(let a=0;ar&&(t[n]=1);u=new pz(`bool`,t,u.dims)}o.push(u)}return o}generate_crop_boxes(e,t,{crop_n_layers:n=0,overlap_ratio:r=512/1500,points_per_crop:i=32,crop_n_points_downscale_factor:a=1}={}){}},cU=class extends cH{post_process_semantic_segmentation(...e){return nH(...e)}},lU=class extends cU{},uU=class extends cH{post_process_semantic_segmentation(...e){return nH(...e)}},dU=class extends uU{},fU=class extends cH{},pU=class extends cH{pad_image(e,t,n,r={}){let[i,a,o]=t;return super.pad_image(e,t,{width:a+(n-a%n)%n,height:i+(n-i%n)%n},{mode:`symmetric`,center:!1,constant_values:-1,...r})}},mU=class extends cH{},hU=class extends mU{},gU=class extends cH{async _call(e,t){Array.isArray(e)||(e=[e]),Array.isArray(t)||(t=[t]);let n=await Promise.all(e.map(e=>this.preprocess(e))),r=await Promise.all(t.map(e=>this.preprocess(e,{do_normalize:!1,do_convert_rgb:!1,do_convert_grayscale:!0})));return{pixel_values:Dz(n.map((e,t)=>Ez([e.pixel_values,r[t].pixel_values],0)),0),original_sizes:n.map(e=>e.original_size),reshaped_input_sizes:n.map(e=>e.reshaped_input_size)}}},_U=class extends cH{post_process_pose_estimation(e,t,{threshold:n=null}={}){let r=e.tolist(),[i,a,o,s]=e.dims,c=[];for(let e=0;e/gm,bboxes:/([^<]+)?/gm},this.size_per_bin=1e3}construct_prompts(e){typeof e==`string`&&(e=[e]);let t=[];for(let n of e)if(this.task_prompts_without_inputs.has(n))t.push(this.task_prompts_without_inputs.get(n));else{for(let[e,r]of this.task_prompts_with_input)if(n.includes(e)){t.push(r.replaceAll(`{input}`,n).replaceAll(e,``));break}t.length!==e.length&&t.push(n)}return t}post_process_generation(e,t,n){let r=this.tasks_answer_post_processing_type.get(t)??`pure_text`;e=e.replaceAll(``,``).replaceAll(``,``);let i;switch(r){case`pure_text`:i=e;break;case`description_with_bboxes`:case`bboxes`:case`phrase_grounding`:case`ocr`:let a=r===`ocr`?`quad_boxes`:`bboxes`,o=e.matchAll(this.regexes[a]),s=[],c=[];for(let[e,t,...r]of o)s.push(t?t.trim():s.at(-1)??``),c.push(r.map((e,t)=>(Number(e)+.5)/this.size_per_bin*n[t%2]));i={labels:s,[a]:c};break;default:throw Error(`Task "${t}" (of type "${r}") not yet implemented.`)}return{[t]:i}}async _call(e,t=null,n={}){if(!e&&!t)throw Error(`Either text or images must be provided`);let r=await this.image_processor(e,n),i=t?this.tokenizer(this.construct_prompts(t),n):{};return{...r,...i}}},SU=class extends eV{static image_processor_class=bU;static feature_extractor_class=UV;static tokenizer_class=JB;static uses_processor_config=!0;static uses_chat_template_file=!0;constructor(e,t,n){super(e,t,n),this.audio_seq_length=this.config.audio_seq_length,this.image_seq_length=this.config.image_seq_length;let{audio_token_id:r,boa_token:i,audio_token:a,eoa_token:o,image_token_id:s,boi_token:c,image_token:l,eoi_token:u}=this.tokenizer.config;this.audio_token_id=r,this.boa_token=i,this.audio_token=a,this.full_audio_sequence=` + +${i}${a.repeat(this.audio_seq_length)}${o} + +`,this.image_token_id=s,this.boi_token=c,this.image_token=l,this.full_image_sequence=` + +${c}${l.repeat(this.image_seq_length)}${u} + +`}async _call(e,t=null,n=null,r={}){typeof e==`string`&&(e=[e]);let i;n&&(i=await this.feature_extractor(n,r),e=e.map(e=>e.replaceAll(this.audio_token,this.full_audio_sequence)));let a;return t&&(a=await this.image_processor(t,r),e=e.map(e=>e.replaceAll(this.image_token,this.full_image_sequence))),{...this.tokenizer(e,r),...a,...i}}};function CU(e,t){let n=e.dims.at(-1)-1,r=e.tolist();r.fill(!1,0,1),r.fill(!1,n);let i=t.tolist();return r.map((e,t)=>e?t:null).filter(e=>e!==null).map(e=>i[e])}var wU=class extends eV{static tokenizer_class=JB;static image_processor_class=bU;async _call(e,t,n={}){let r=e?await this.image_processor(e,n):{};return{...t?this.tokenizer(t,n):{},...r}}post_process_grounded_object_detection(e,t,{box_threshold:n=.25,text_threshold:r=.25,target_sizes:i=null}={}){let{logits:a,pred_boxes:o}=e,s=a.dims[0];if(i!==null&&i.length!==s)throw Error(`Make sure that you pass in as many target sizes as the batch dimension of the logits`);let c=a.dims.at(1),l=a.sigmoid(),u=l.max(-1).tolist(),d=o.tolist().map(e=>e.map(e=>eH(e))),f=[];for(let e=0;ee.map((e,t)=>e*a[(t+1)%2])));let o=u[e],s=[],p=[],m=[];for(let i=0;i`+i.repeat(e);o+=` +`}return o+=` +${r}${a}`+i.repeat(e)+`${r}`,o}function EU(e,t,n,r){return`${t}${r}`+n.repeat(e)+`${t}`}function DU(e,t,n,r,i,a){return e===0&&t===0?EU(n,r,i,a):TU(n,e,t,r,i,a)}var OU=class extends eV{static image_processor_class=bU;static tokenizer_class=JB;static uses_processor_config=!0;fake_image_token=``;image_token=``;global_img_token=``;async _call(e,t=null,n={}){n.return_row_col_info??=!0;let r;t&&(r=await this.image_processor(t,n)),Array.isArray(e)||(e=[e]);let i=r.rows??[Array(e.length).fill(0)],a=r.cols??[Array(e.length).fill(0)],o=this.config.image_seq_len,s=[],c=[];for(let t=0;tDU(e,l[t],o,this.fake_image_token,this.image_token,this.global_img_token)),d=n.split(this.image_token);if(d.length===0)throw Error(`The image token should be present in the text.`);let f=d[0];for(let e=0;ee.images).flatMap(e=>e.images).map(e=>ZV.read(e)));let r=this.tokenizer,i=r.apply_chat_template(e,{tokenize:!1,add_generation_prompt:!0,chat_template:n}),a=e=>r.encode(e,{add_special_tokens:!1}),o=i.split(this.image_tag),s=o.length-1;if(t.length!==s)throw Error(`Number of images provided (${t.length}) does not match number of "${this.image_tag}" image tags (${s})`);let[c,l,u]=r.convert_tokens_to_ids([this.image_tag,this.image_start_tag,this.image_end_tag]),d=a(o[0]),f=Array(d.length).fill(!1);for(let e=1;e0){let e=await this.image_processor(t);return e.pixel_values.unsqueeze_(0),{...m,...e}}return m}},AU=class extends eV{static tokenizer_class=JB;static image_processor_class=bU;async _call(e=null,t=null,n={}){if(!e&&!t)throw Error(`Either text or images must be provided`);let r=e?this.tokenizer(e,n):{},i=t?await this.image_processor(t,n):{};return{...r,...i}}},jU=class extends eV{static tokenizer_class=JB;static image_processor_class=bU;static uses_processor_config=!0;async _call(e,t=null,n={}){let r=await this.image_processor(e,n);if(t){let[e,n]=r.pixel_values.dims.slice(-2),{image_token:i,patch_size:a,num_additional_image_tokens:o}=this.config,s=Math.floor(e/a)*Math.floor(n/a)+o;t=structuredClone(t),Array.isArray(t)||(t=[t]);for(let e=0;e0?i.reduce((e,t)=>e*t,1):0;c.push(n),s.push(a)}return[i(c),s]}char_decode(e){return this.char_tokenizer.batch_decode(e).map(e=>e.replaceAll(` `,``))}bpe_decode(e){return this.bpe_tokenizer.batch_decode(e)}wp_decode(e){return this.wp_tokenizer.batch_decode(e).map(e=>e.replaceAll(` `,``))}batch_decode([e,t,n]){let[r,i]=this._decode_helper(e,`char`),[a,o]=this._decode_helper(t,`bpe`),[s,c]=this._decode_helper(n,`wp`),l=[],u=[];for(let e=0;e`;function LU(e,t,n,r,i){return`${r.repeat(n*i)}${t}${e} +`}var RU=class extends eV{static tokenizer_class=JB;static image_processor_class=bU;static uses_processor_config=!1;async _call(e,t=null,n={}){t||=(TP.warn(`You are using PaliGemma without a text prefix. It will perform as a picture-captioning model.`),``),Array.isArray(e)||(e=[e]),Array.isArray(t)||(t=[t]);let r=this.tokenizer.bos_token,i=this.image_processor.config.image_seq_length,a;t.some(e=>e.includes(IU))?a=t.map(e=>{let t=e.replaceAll(IU,IU.repeat(i)),n=t.lastIndexOf(IU),a=n===-1?0:n+IU.length;return t.slice(0,a)+r+t.slice(a)+` +`}):(TP.warn("You are passing both `text` and `images` to `PaliGemmaProcessor`. The processor expects special image tokens in the text, as many tokens as there are images per each text. It is recommended to add `` tokens in the very beginning of your text. For this call, we will infer how many images each text has and add special tokens."),a=t.map(t=>LU(t,r,i,IU,e.length)));let o=this.tokenizer(a,n);return{...await this.image_processor(e,n),...o}}},zU=`<|image|>`,BU=/<\|image_\d+\|>/g,VU=class extends eV{static image_processor_class=bU;static tokenizer_class=JB;async _call(e,t=null,{padding:n=!0,truncation:r=!0,num_crops:i=null}={}){Array.isArray(e)||(e=[e]);let a,o;if(t){o=await this.image_processor(t,{num_crops:i});let{num_img_tokens:s}=o,c=e.map((e,t)=>e.split(BU).join(zU.repeat(s[t])));a=this.tokenizer(c,{padding:n,truncation:r});let l=this.tokenizer._tokenizer.token_to_id(zU);a.input_ids.map_(e=>e==l?-e:e)}else a=this.tokenizer(e);return{...a,...o}}},HU=class extends eV{static tokenizer_class=JB;static image_processor_class=bU;static uses_processor_config=!0;async _call(e,t=null,n={}){let r=await this.image_processor(e,n);if(t){let[e,n]=r.pixel_values.dims.slice(-2),{image_token:i,image_break_token:a,image_end_token:o,patch_size:s,spatial_merge_size:c}=this.config,l=s*c,u=Math.floor(e/l),d=Math.floor(n/l);t=structuredClone(t),Array.isArray(t)||(t=[t]);for(let e=0;e{for(;e.includes(`<|image_pad|>`);){let i=Number(r[n++].reduce((e,t)=>e*t,1n));e=e.replace(`<|image_pad|>`,`<|placeholder|>`.repeat(Math.floor(i/t)))}return e.replaceAll(`<|placeholder|>`,`<|image_pad|>`)})}return{...this.tokenizer(e),...r}}},GU=class extends WU{},KU=class extends GU{},qU=class extends eV{static image_processor_class=bU;async _call(...e){return await this.image_processor(...e)}post_process_masks(...e){return this.image_processor.post_process_masks(...e)}reshape_input_points(...e){return this.image_processor.reshape_input_points(...e)}},JU=class extends qU{},YU=class extends JU{},XU=class extends eV{static tokenizer_class=JB;static feature_extractor_class=UV;async _call(e){return await this.feature_extractor(e)}},ZU=class extends eV{static tokenizer_class=JB;static feature_extractor_class=UV;static uses_processor_config=!0;async _call(e,t=null,n={}){if(Array.isArray(e))throw Error(`Batched inputs are not supported yet.`);let r={};if(t){let i=t.length,{input_features:a}=await this.feature_extractor(t,{...n,max_length:i}),o=Math.round(i/this.config.encoder_ds_factor+1e-4),s=1+Math.ceil(o/this.config.stack_factor);r.audio_token_len=[s],r.audio_values=a;let c=this.config.audio_placeholder;if(!e.includes(c))throw Error(`The input text does not contain the image token ${c}.`);e=e.replaceAll(c,c.repeat(s))}return{...this.tokenizer(e,{add_special_tokens:!1,...n}),...r}}},QU=`[AUDIO]`,$U=`[BEGIN_AUDIO]`,eW=375;function tW(e,t){let n=[];for(let r=0;rtW(e,o)),c=s.map(e=>e.length),l=s.flat(),u=(await Promise.all(l.map(e=>this.feature_extractor(e,n)))).map(e=>e.input_features);r.audio_values=u.length>1?Ez(u,0):u[0];let d=i[0];for(let e=0;e0){if(l>YL)throw Error(`The number of external data chunks (${l}) exceeds the maximum allowed value (${YL}).`);let t=mW(o,l);for(let n of t){let t=`${r.subfolder??``}/${n}`;c.push(new Promise(async(i,a)=>{let o=await mR(e,t,!0,r,s);i(o instanceof Uint8Array?{path:n,data:o}:n)}))}}else a.externalData!==void 0&&(c=a.externalData.map(async t=>{if(typeof t.data==`string`){let n=await mR(e,t.data,!0,r);return{...t,data:n}}return t}));return Promise.all(c)}async function _W(e,t,n,r=!1){let i=n.config?.[`transformers.js_config`]??{},a=az(n.device??i.device,t,{warn:e=>TP.info(e)}),o=GR(a),s=i.device_config??{};s.hasOwnProperty(a)&&(i={...i,...s[a]});let c=dz(n.dtype??i.dtype,t,a,{configDtype:i.dtype,warn:e=>TP.info(e)});if(!uz.hasOwnProperty(c))throw Error(`Invalid dtype: ${c}. Should be one of: ${Object.keys(sz).join(`, `)}`);if(a===`webgpu`&&!aP.IS_NODE_ENV&&c===sz.fp16&&!await oz())throw Error(`The device (${a}) does not support fp16.`);let l=i.kv_cache_dtype,u=l?typeof l==`string`?l:l[c]??`float32`:void 0;if(u&&![`float32`,`float16`].includes(u))throw Error(`Invalid kv_cache_dtype: ${u}. Should be one of: float32, float16`);let d=uz[c],f={...n.session_options};f.executionProviders??=o;let p=i.free_dimension_overrides;p?f.freeDimensionOverrides??=p:a.startsWith(`webnn`)&&!f.freeDimensionOverrides&&TP.warn(`WebNN does not currently support dynamic shapes and requires 'free_dimension_overrides' to be set in config.json, preferably as a field within config["transformers.js_config"]["device_config"]["${a}"]. When 'free_dimension_overrides' is not set, you may experience significant performance degradation.`);let m=hW(e,t,n,d),h=await gW(e,t,d,n,n.use_external_data_format??i.use_external_data_format,f);if(h.length>0&&!aP.IS_NODE_ENV&&(f.externalData=h),r&&a===`webgpu`&&l!==!1){let e=lW(n.config,{prefix:`present`});if(Object.keys(e).length>0&&!ez()){let t={};for(let n in e)t[n]=`gpu-buffer`;f.preferredOutputLocation=t}}return{buffer_or_path:await m,session_options:f,session_config:{dtype:c,kv_cache_dtype:u,device:a}}}async function vW(e,t,n,r=void 0){return Object.fromEntries(await Promise.all(Object.keys(t).map(async i=>{let{buffer_or_path:a,session_options:o,session_config:s}=await _W(e,t[i],n,i===r);return[i,await YR(a,o,s)]})))}function yW(e){for(let t in e)QR(e[t])?e[t]=new pz(e[t]):typeof e[t]==`object`&&yW(e[t]);return e}async function bW(e,t){let n=xW(e,t);try{return yW(await ZR(e,Object.fromEntries(Object.entries(n).map(([e,t])=>{let n=t.ort_tensor;return aP.IS_NODE_ENV&&typeof Float16Array<`u`&&n.cpuData instanceof Float16Array&&(n.cpuData=new Uint16Array(n.cpuData.buffer)),[e,n]}))))}catch(e){let t=Object.fromEntries(Object.entries(n).map(([e,t])=>{let n={type:t.type,dims:t.dims,location:t.location};return n.location!==`gpu-buffer`&&(n.data=t.data),[e,n]}));throw TP.error(`An error occurred during model execution: "${e}".`),TP.error(`Inputs given to model:`,t),e}}function xW(e,t){let n=Object.create(null),r=[];for(let i of e.inputNames){let e=t[i];if(!(e instanceof pz)){r.push(i);continue}n[i]=ez()?e.clone():e}if(r.length>0)throw Error(`An error occurred during model execution: "Missing the following inputs: ${r.join(`, `)}.`);let i=Object.keys(t).length,a=e.inputNames.length;if(i>a){let n=Object.keys(t).filter(t=>!e.inputNames.includes(t));TP.warn(`WARNING: Too many inputs were provided (${i} > ${a}). The following inputs will be ignored: "${n.join(`, `)}".`)}return n}var SW=class{},CW=class extends SW{constructor({logits:e,...t}){super(),this.logits=e;let n=Object.values(t);n.length>0&&(this.attentions=n)}},wW=class extends SW{constructor({logits:e}){super(),this.logits=e}},TW=class extends SW{constructor({logits:e}){super(),this.logits=e}},EW=class extends SW{constructor({start_logits:e,end_logits:t}){super(),this.start_logits=e,this.end_logits=t}},DW=class extends SW{constructor({logits:e}){super(),this.logits=e}},OW=class extends SW{constructor({alphas:e}){super(),this.alphas=e}},kW=class extends RL{_call(e,t){throw Error("`_call` should be implemented in a subclass")}},AW=class extends RL{_call(e,t){throw Error("`_call` should be implemented in a subclass")}},jW=class extends RL{constructor(){super(),this.processors=[]}push(e){this.processors.push(e)}extend(e){this.processors.push(...e)}_call(e,t){let n=t;for(let t of this.processors)n=t(e,n);return n}[Symbol.iterator](){return this.processors.values()}},MW=class extends kW{constructor(e){super(),this.bos_token_id=e}_call(e,t){for(let n=0;n=1&&i[i.length-1]>=this.timestamp_begin,o=i.length<2||i[i.length-2]>=this.timestamp_begin;if(a&&(o?r.subarray(this.timestamp_begin).fill(-1/0):r.subarray(0,this.eos_token_id).fill(-1/0)),e[n].length===this.begin_index&&this.max_initial_timestamp_index!==null){let e=this.timestamp_begin+this.max_initial_timestamp_index;r.subarray(e+1).fill(-1/0)}let s=bR(r);Math.log(s.subarray(this.timestamp_begin).map(Math.exp).reduce((e,t)=>e+t))>SR(s.subarray(0,this.timestamp_begin))[0]&&r.subarray(0,this.timestamp_begin).fill(-1/0)}return t}},IW=class extends kW{constructor(e){super(),this.no_repeat_ngram_size=e}getNgrams(e){let t=e.length,n=[];for(let r=0;r1 to use the classifier free guidance processor, got guidance scale ${e}.`);this.guidance_scale=e}_call(e,t){if(t.dims[0]!==2*e.length)throw Error(`Logits should have twice the batch size of the input ids, the first half of batches corresponding to the conditional inputs, and the second half of batches corresponding to the unconditional inputs. Got batch size ${t.dims[0]} for the logits and ${e.length} for the input ids.`);let n=e.length,r=t.slice([0,n],null),i=t.slice([n,t.dims[0]],null);for(let e=0;ee.length>=this.max_length)}},qW=class extends WW{constructor(e){super(),Array.isArray(e)||(e=[e]),this.eos_token_id=e}_call(e,t){return e.map(e=>{let t=e.at(-1);return this.eos_token_id.some(e=>t==e)})}},JW=class extends WW{constructor(){super(),this.interrupted=!1}interrupt(){this.interrupted=!0}reset(){this.interrupted=!1}_call(e,t){return Array(e.length).fill(this.interrupted)}},YW=class extends RL{constructor(e){super(),this.generation_config=e}async _call(e){return this.sample(e)}async sample(e){throw Error(`sample should be implemented in subclasses.`)}getLogits(e,t){let n=e.dims.at(-1),r=e.data;if(t===-1)r=r.slice(-n);else{let e=t*n;r=r.slice(e,e+n)}return r}randomSelect(e){return GL(e)}static getSampler(e){if(e.do_sample)return new ZW(e);if(e.num_beams>1)return new QW(e);if(e.num_return_sequences>1)throw Error(`num_return_sequences has to be 1 when doing greedy search, but is ${e.num_return_sequences}.`);return new XW(e)}},XW=class extends YW{async sample(e){let t=SR(e.data)[1];return[[BigInt(t),0]]}},ZW=class extends YW{async sample(e){let t=e.dims.at(-1);this.generation_config.top_k>0&&(t=Math.min(this.generation_config.top_k,t));let[n,r]=await yz(e,t),i=yR(n.data);return Array.from({length:this.generation_config.num_beams},()=>{let e=this.randomSelect(i);return[r.data[e],Math.log(i[e])]})}},QW=class extends YW{async sample(e){let t=e.dims.at(-1);this.generation_config.top_k>0&&(t=Math.min(this.generation_config.top_k,t));let[n,r]=await yz(e,t),i=yR(n.data);return Array.from({length:this.generation_config.num_beams},(e,t)=>[r.data[t],Math.log(i[t])])}},$W=null;function eG(e){$W=e}function tG(e){for(let t in e)if(t.startsWith(`past_key_values.`))return e[t].dims.at(-2);return Object.values(e)[0].dims.at(-2)}function nG(e){if(e instanceof pz)return e;if(e.length===0)throw Error(`items must be non-empty`);if(Array.isArray(e[0])){if(e.some(t=>t.length!==e[0].length))throw Error(`Unable to create tensor, you should probably activate truncation and/or padding with 'padding=True' and/or 'truncation=True' to have batched tensors with the same length.`);return new pz(`int64`,BigInt64Array.from(e.flat().map(e=>BigInt(e))),[e.length,e[0].length])}else return new pz(`int64`,BigInt64Array.from(e.map(e=>BigInt(e))),[1,e.length])}function rG(e){return new pz(`bool`,[e],[1])}var Q={EncoderOnly:0,EncoderDecoder:1,Seq2Seq:2,Vision2Seq:3,DecoderOnly:4,DecoderOnlyWithoutHead:5,MaskGeneration:6,ImageTextToText:7,Musicgen:8,MultiModality:9,Phi3V:10,AudioTextToText:11,AutoEncoder:12,ImageAudioTextToText:13,Supertonic:14,Chatterbox:15},iG={[Q.DecoderOnly]:{can_generate:!0,forward:dG,prepare_inputs:_G},[Q.DecoderOnlyWithoutHead]:{can_generate:!1,forward:dG,prepare_inputs:_G},[Q.Seq2Seq]:{can_generate:!0,forward:cG,prepare_inputs:vG},[Q.Vision2Seq]:{can_generate:!0,forward:cG,prepare_inputs:vG},[Q.Musicgen]:{can_generate:!0,forward:cG},[Q.EncoderDecoder]:{can_generate:!1,forward:cG},[Q.ImageTextToText]:{can_generate:!0,forward:mG,prepare_inputs:yG},[Q.AudioTextToText]:{can_generate:!0,forward:pG,prepare_inputs:yG},[Q.Phi3V]:{can_generate:!0,prepare_inputs:yG},[Q.ImageAudioTextToText]:{can_generate:!0,prepare_inputs:yG},[Q.MultiModality]:{can_generate:!0},[Q.AutoEncoder]:{can_generate:!1,forward:uG},[Q.Chatterbox]:{can_generate:!0,forward:lG},default:{can_generate:!1,forward:lG}},aG=new Map,oG=new Map,sG=new Map,$=class extends RL{main_input_name=`input_ids`;forward_params=[`input_ids`,`attention_mask`];_return_dict_in_generate_keys=null;constructor(e,t,n){super(),this.config=e,this.sessions=t,this.configs=n;let r=sG.get(this.constructor),i=iG[aG.get(r)]??iG.default;this.can_generate=i.can_generate,this._forward=i.forward,this._prepare_inputs_for_generation=i.prepare_inputs,this.can_generate&&this.forward_params.push(`past_key_values`),this.custom_config=this.config[`transformers.js_config`]??{}}async dispose(){let e=[];for(let t of Object.values(this.sessions))e.push(t.release?.());return await Promise.all(e)}static async from_pretrained(e,{progress_callback:t=null,config:n=null,cache_dir:r=null,local_files_only:i=!1,revision:a=`main`,model_file_name:o=null,subfolder:s=`onnx`,device:c=null,dtype:l=null,use_external_data_format:u=null,session_options:d={}}={}){let f={progress_callback:t,config:n,cache_dir:r,local_files_only:i,revision:a,model_file_name:o,subfolder:s,device:c,dtype:l,use_external_data_format:u,session_options:d},p=sG.get(this),m=aG.get(p);n=f.config=await fW.from_pretrained(e,f);let h;if(m===Q.DecoderOnly)h=await Promise.all([vW(e,{model:f.model_file_name??`model`},f,`model`),CG(e,{generation_config:`generation_config.json`},f)]);else if(m===Q.Seq2Seq||m===Q.Vision2Seq)h=await Promise.all([vW(e,{model:`encoder_model`,decoder_model_merged:`decoder_model_merged`},f,`decoder_model_merged`),CG(e,{generation_config:`generation_config.json`},f)]);else if(m===Q.MaskGeneration)h=await Promise.all([vW(e,{model:`vision_encoder`,prompt_encoder_mask_decoder:`prompt_encoder_mask_decoder`},f)]);else if(m===Q.EncoderDecoder)h=await Promise.all([vW(e,{model:`encoder_model`,decoder_model_merged:`decoder_model_merged`},f,`decoder_model_merged`)]);else if(m===Q.ImageTextToText){let t={embed_tokens:`embed_tokens`,vision_encoder:`vision_encoder`,decoder_model_merged:`decoder_model_merged`};n.is_encoder_decoder&&(t.model=`encoder_model`),h=await Promise.all([vW(e,t,f,`decoder_model_merged`),CG(e,{generation_config:`generation_config.json`},f)])}else if(m===Q.AudioTextToText)h=await Promise.all([vW(e,{embed_tokens:`embed_tokens`,audio_encoder:`audio_encoder`,decoder_model_merged:`decoder_model_merged`},f,`decoder_model_merged`),CG(e,{generation_config:`generation_config.json`},f)]);else if(m===Q.ImageAudioTextToText)h=await Promise.all([vW(e,{embed_tokens:`embed_tokens`,audio_encoder:`audio_encoder`,vision_encoder:`vision_encoder`,decoder_model_merged:`decoder_model_merged`},f),CG(e,{generation_config:`generation_config.json`},f)]);else if(m===Q.Musicgen)h=await Promise.all([vW(e,{model:`text_encoder`,decoder_model_merged:`decoder_model_merged`,encodec_decode:`encodec_decode`},f,`decoder_model_merged`),CG(e,{generation_config:`generation_config.json`},f)]);else if(m===Q.MultiModality)h=await Promise.all([vW(e,{prepare_inputs_embeds:`prepare_inputs_embeds`,model:`language_model`,lm_head:`lm_head`,gen_head:`gen_head`,gen_img_embeds:`gen_img_embeds`,image_decode:`image_decode`},f,`model`),CG(e,{generation_config:`generation_config.json`},f)]);else if(m===Q.Phi3V)h=await Promise.all([vW(e,{prepare_inputs_embeds:`prepare_inputs_embeds`,model:`model`,vision_encoder:`vision_encoder`},f,`model`),CG(e,{generation_config:`generation_config.json`},f)]);else if(m===Q.Chatterbox)h=await Promise.all([vW(e,{embed_tokens:`embed_tokens`,speech_encoder:`speech_encoder`,model:`language_model`,conditional_decoder:`conditional_decoder`},f,`model`),CG(e,{generation_config:`generation_config.json`},f)]);else if(m===Q.AutoEncoder)h=await Promise.all([vW(e,{encoder_model:`encoder_model`,decoder_model:`decoder_model`},f)]);else if(m===Q.Supertonic)h=await Promise.all([vW(e,{text_encoder:`text_encoder`,latent_denoiser:`latent_denoiser`,voice_decoder:`voice_decoder`},f)]);else{if(m===void 0){let e=p??n?.model_type;e!==`custom`&&TP.warn(`Model type for '${e}' not found, assuming encoder-only architecture. Please report this at ${YB}.`)}h=await Promise.all([vW(e,{model:f.model_file_name??`model`},f)])}return new this(n,...h)}async _call(e){return await this.forward(e)}async forward(e){return await this._forward(this,e)}get generation_config(){return this.configs?.generation_config??null}_get_logits_processor(e,t,n=null){let r=new jW;if(e.repetition_penalty!==null&&e.repetition_penalty!==1&&r.push(new LW(e.repetition_penalty)),e.no_repeat_ngram_size!==null&&e.no_repeat_ngram_size>0&&r.push(new IW(e.no_repeat_ngram_size)),e.bad_words_ids!==null&&r.push(new BW(e.bad_words_ids,e.eos_token_id)),e.min_length!==null&&e.eos_token_id!==null&&e.min_length>0&&r.push(new RW(e.min_length,e.eos_token_id)),e.min_new_tokens!==null&&e.eos_token_id!==null&&e.min_new_tokens>0&&r.push(new zW(t,e.min_new_tokens,e.eos_token_id)),e.forced_bos_token_id!==null&&r.push(new MW(e.forced_bos_token_id)),e.forced_eos_token_id!==null&&r.push(new NW(e.max_length,e.forced_eos_token_id)),e.begin_suppress_tokens!==null){let n=t>1||e.forced_bos_token_id===null?t:t+1;r.push(new PW(e.begin_suppress_tokens,n))}return e.guidance_scale!==null&&e.guidance_scale>1&&r.push(new VW(e.guidance_scale)),e.temperature===0&&e.do_sample&&(TP.warn("`do_sample` changed to false because `temperature: 0` implies greedy sampling (always selecting the most likely token), which is incompatible with `do_sample: true`."),e.do_sample=!1),e.do_sample&&e.temperature!==null&&e.temperature!==1&&r.push(new HW(e.temperature)),n!==null&&r.extend(n),r}_prepare_generation_config(e,t,n=UW){let r={...this.config};for(let e of[`decoder`,`generator`,`text_config`])e in r&&Object.assign(r,r[e]);let i=new n(r);return Object.assign(i,this.generation_config??{}),e&&Object.assign(i,e),t&&Object.assign(i,CP(t,Object.getOwnPropertyNames(i))),i}_get_stopping_criteria(e,t=null){let n=new GW;return e.max_length!==null&&n.push(new KW(e.max_length,this.config.max_position_embeddings??null)),e.eos_token_id!==null&&n.push(new qW(e.eos_token_id)),t&&n.extend(t),n}_validate_model_class(){if(!this.can_generate){let e=[$W.MODEL_FOR_CAUSAL_LM_MAPPING_NAMES,$W.MODEL_FOR_VISION_2_SEQ_MAPPING_NAMES,$W.MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPING_NAMES,$W.MODEL_FOR_SPEECH_SEQ_2_SEQ_MAPPING_NAMES].filter(Boolean),t=sG.get(this.constructor),n=new Set,r=this.config.model_type;for(let t of e){let e=t?.get(r);e&&n.add(e)}let i=`The current model class (${t}) is not compatible with \`.generate()\`, as it doesn't have a language model head.`;throw n.size>0&&(i+=` Please use the following class instead: ${[...n].join(`, `)}`),Error(i)}}prepare_inputs_for_generation(...e){if(!this._prepare_inputs_for_generation)throw Error(`prepare_inputs_for_generation is not implemented for this model.`);return this._prepare_inputs_for_generation(this,...e)}_update_model_kwargs_for_generation({generated_input_ids:e,outputs:t,model_inputs:n,is_encoder_decoder:r}){return n.past_key_values=this.getPastKeyValues(t,n.past_key_values),n.input_ids=new pz(`int64`,e.flat(),[e.length,1]),r?`decoder_attention_mask`in n:n.attention_mask=Ez([n.attention_mask,Fz([n.attention_mask.dims[0],1])],1),n.position_ids=null,n}_prepare_model_inputs({inputs:e,bos_token_id:t,model_kwargs:n}){let r=CP(n,this.forward_params),i=this.main_input_name;if(i in r){if(e)throw Error("`inputs`: {inputs}` were passed alongside {input_name} which is not allowed. Make sure to either pass {inputs} or {input_name}=...")}else r[i]=e;return{inputs_tensor:r[i],model_inputs:r,model_input_name:i}}async _prepare_encoder_decoder_kwargs_for_generation({inputs_tensor:e,model_inputs:t,model_input_name:n,generation_config:r}){if(this.sessions.model.inputNames.includes(`inputs_embeds`)&&!t.inputs_embeds&&`_prepare_inputs_embeds`in this){let{input_ids:e,pixel_values:n,attention_mask:r,...i}=t,a=await this._prepare_inputs_embeds(t);t={...i,...CP(a,[`inputs_embeds`,`attention_mask`])}}let{last_hidden_state:i}=await lG(this,t);if(r.guidance_scale!==null&&r.guidance_scale>1)i=Ez([i,Pz(i,0)],0),`attention_mask`in t&&(t.attention_mask=Ez([t.attention_mask,Rz(t.attention_mask)],0));else if(t.decoder_input_ids){let e=nG(t.decoder_input_ids).dims[0];if(e!==i.dims[0]){if(i.dims[0]!==1)throw Error(`The encoder outputs have a different batch size (${i.dims[0]}) than the decoder inputs (${e}).`);i=Ez(Array.from({length:e},()=>i),0)}}return t.encoder_outputs=i,t}_prepare_decoder_input_ids_for_generation({batch_size:e,model_input_name:t,model_kwargs:n,decoder_start_token_id:r,bos_token_id:i,generation_config:a}){let{decoder_input_ids:o,...s}=n;if(!(o instanceof pz)){if(o)Array.isArray(o[0])||(o=Array.from({length:e},()=>o));else if(r??=i,this.config.model_type===`musicgen`)o=Array.from({length:e*this.config.decoder.num_codebooks},()=>[r]);else if(Array.isArray(r)){if(r.length!==e)throw Error(`\`decoder_start_token_id\` expcted to have length ${e} but got ${r.length}`);o=r}else o=Array.from({length:e},()=>[r]);o=nG(o)}return n.decoder_attention_mask=Iz(o),{input_ids:o,model_inputs:s}}async generate({inputs:e=null,generation_config:t=null,logits_processor:n=null,stopping_criteria:r=null,streamer:i=null,...a}){this._validate_model_class(),t=this._prepare_generation_config(t,a);let{inputs_tensor:o,model_inputs:s,model_input_name:c}=this._prepare_model_inputs({inputs:e,model_kwargs:a}),l=this.config.is_encoder_decoder;l&&(`encoder_outputs`in s||(s=await this._prepare_encoder_decoder_kwargs_for_generation({inputs_tensor:o,model_inputs:s,model_input_name:c,generation_config:t})));let u;l?{input_ids:u,model_inputs:s}=this._prepare_decoder_input_ids_for_generation({batch_size:s[c].dims.at(0),model_input_name:c,model_kwargs:s,decoder_start_token_id:t.decoder_start_token_id,bos_token_id:t.bos_token_id,generation_config:t}):u=s[c];let d=u.dims.at(-1);t.max_new_tokens!==null&&(t.max_length=d+t.max_new_tokens);let f=this._get_logits_processor(t,d,n),p=this._get_stopping_criteria(t,r),m=s[c].dims.at(0),h=YW.getSampler(t),g=Array(m).fill(0),_=u.tolist();i&&i.put(_);let v,y={},b={};for(;;){if(s=this.prepare_inputs_for_generation(_,s,t),v=await this.forward(s),t.return_dict_in_generate)if(t.output_attentions){let e=this.getAttentions(v);for(let t in e)t in y||(y[t]=[]),y[t].push(e[t])}else this._return_dict_in_generate_keys&&Object.assign(b,CP(v,this._return_dict_in_generate_keys));let e=f(_,v.logits.slice(null,-1,null).to(`float32`)),n=[];for(let t=0;te))break;s=this._update_model_kwargs_for_generation({generated_input_ids:n,outputs:v,model_inputs:s,is_encoder_decoder:l})}i&&i.end();let x=this.getPastKeyValues(v,s.past_key_values,!0),ee=new pz(`int64`,_.flat(),[_.length,_[0].length]);if(t.return_dict_in_generate)return{sequences:ee,past_key_values:x,...y,...b};for(let e of Object.values(v))e.location===`gpu-buffer`&&e.dispose();return ee}getPastKeyValues(e,t,n=!1){let r=Object.create(null);for(let i in e)if(i.startsWith(`present`)){let a=i.replace(`present_ssm`,`past_ssm`).replace(`present_conv`,`past_conv`).replace(`present_recurrent`,`past_recurrent`).replace(`present`,`past_key_values`),o=i.includes(`encoder`);if(o&&t?r[a]=t[a]:r[a]=e[i],t&&(!o||n)){let e=t[a];e.location===`gpu-buffer`&&e.dispose()}}return r}getAttentions(e){let t={};for(let n of[`cross_attentions`,`encoder_attentions`,`decoder_attentions`])for(let r in e)r.startsWith(n)&&(n in t||(t[n]=[]),t[n].push(e[r]));return t}addPastKeyValues(e,t){if(t)Object.assign(e,t);else{let t=this.sessions.decoder_model_merged??this.sessions.model,n=(e[this.main_input_name]??e.attention_mask)?.dims?.[0]??1,r=t?.config?.kv_cache_dtype??`float32`,i=r===`float16`?fz.float16:fz.float32,a=lW(this.config,{batch_size:n});for(let t in a)e[t]=new pz(r,new i(a[t].reduce((e,t)=>e*t,1)),a[t])}}async encode_image({pixel_values:e}){return(await bW(this.sessions.vision_encoder,{pixel_values:e})).image_features}async encode_text({input_ids:e}){return(await bW(this.sessions.embed_tokens,{input_ids:e})).inputs_embeds}async encode_audio({audio_values:e}){return(await bW(this.sessions.audio_encoder,{audio_values:e})).audio_features}};async function cG(e,t){let{encoder_outputs:n,input_ids:r,decoder_input_ids:i,...a}=t;return n||=(await lG(e,CP(t,e.sessions.model.inputNames))).last_hidden_state,a.input_ids=i,a.encoder_hidden_states=n,e.sessions.decoder_model_merged.inputNames.includes(`encoder_attention_mask`)&&(a.encoder_attention_mask=t.attention_mask),await dG(e,a,!0)}async function lG(e,t){let n=e.sessions.model,r=CP(t,n.inputNames);if(n.inputNames.includes(`inputs_embeds`)&&!r.inputs_embeds){if(!t.input_ids)throw Error("Both `input_ids` and `inputs_embeds` are missing in the model inputs.");r.inputs_embeds=await e.encode_text({input_ids:t.input_ids})}if(n.inputNames.includes(`token_type_ids`)&&!r.token_type_ids){if(!r.input_ids)throw Error("Both `input_ids` and `token_type_ids` are missing in the model inputs.");r.token_type_ids=Rz(r.input_ids)}if(n.inputNames.includes(`pixel_mask`)&&!r.pixel_mask){if(!r.pixel_values)throw Error("Both `pixel_values` and `pixel_mask` are missing in the model inputs.");let e=r.pixel_values.dims;r.pixel_mask=Fz([e[0],e[2],e[3]])}return await bW(n,r)}async function uG(e,t){let n=await e.encode(t);return await e.decode(n)}async function dG(e,t,n=!1){let r=e.sessions[n?`decoder_model_merged`:`model`],{past_key_values:i,...a}=t;return r.inputNames.includes(`use_cache_branch`)&&(a.use_cache_branch=rG(!!i)),r.inputNames.includes(`position_ids`)&&a.attention_mask&&!a.position_ids&&(a.position_ids=gG(a,i,[`paligemma`,`gemma3_text`,`gemma3`].includes(e.config.model_type)?1:0)),e.addPastKeyValues(a,i),await bW(r,CP(a,r.inputNames))}async function fG(e,{encode_function:t,merge_function:n,modality_input_name:r,modality_output_name:i,input_ids:a=null,attention_mask:o=null,position_ids:s=null,inputs_embeds:c=null,past_key_values:l=null,generation_config:u=null,logits_processor:d=null,...f}){let p=f[r];if(!c){if(c=await e.encode_text({input_ids:a,...f}),p&&a.dims[1]!==1){let e=await t({[r]:p,...f});({inputs_embeds:c,attention_mask:o}=n({[i]:e,inputs_embeds:c,input_ids:a,attention_mask:o}))}else if(l&&p&&a.dims[1]===1){let e=a.dims[1],t=tG(l);o=Ez([Fz([a.dims[0],t]),o.slice(null,[o.dims[1]-e,o.dims[1]])],1)}}if(!s&&[`qwen2_vl`,`qwen2_5_vl`,`qwen2_5_vl_text`,`qwen3_vl`,`qwen3_vl_text`,`qwen3_5`,`qwen3_5_text`,`qwen3_5_moe`,`qwen3_5_moe_text`].includes(e.config.model_type)){let{image_grid_thw:t,video_grid_thw:n}=f;[s]=e.get_rope_index(a,t,n,o)}return await dG(e,{inputs_embeds:c,past_key_values:l,attention_mask:o,position_ids:s,generation_config:u,logits_processor:d},!0)}async function pG(e,t){return await fG(e,{...t,modality_input_name:`audio_values`,modality_output_name:`audio_features`,encode_function:e.encode_audio.bind(e),merge_function:e._merge_input_ids_with_audio_features.bind(e)})}async function mG(e,t){return await fG(e,{...t,modality_input_name:`pixel_values`,modality_output_name:`image_features`,encode_function:e.encode_image.bind(e),merge_function:e._merge_input_ids_with_image_features.bind(e)})}function hG(e,t=0){let[n,r]=e.dims,i=e.data,a=new BigInt64Array(i.length);for(let e=0;ee.dims[1]||i[e.at(-1)])),{...n,decoder_input_ids:nG(t)}}function yG(e,...t){return e.config.is_encoder_decoder?vG(e,...t):_G(e,...t)}function bG({modality_token_id:e,inputs_embeds:t,modality_features:n,input_ids:r,attention_mask:i}){let a=r.tolist().map(t=>t.reduce((t,n,r)=>(n==e&&t.push(r),t),[])),o=a.reduce((e,t)=>e+t.length,0),s=n.dims[0];if(o!==s)throw Error(`Number of tokens and features do not match: tokens: ${o}, features ${s}`);let c=0;for(let e=0;e[r,await gR(e,t[r],!1,n)])))}var wG={};LN(wG,{ASTForAudioClassification:()=>VG,ASTModel:()=>BG,ASTPreTrainedModel:()=>zG,AfmoeForCausalLM:()=>FG,AfmoeModel:()=>PG,AfmoePreTrainedModel:()=>NG,AlbertForMaskedLM:()=>kG,AlbertForQuestionAnswering:()=>OG,AlbertForSequenceClassification:()=>DG,AlbertModel:()=>EG,AlbertPreTrainedModel:()=>TG,ApertusForCausalLM:()=>MG,ApertusModel:()=>jG,ApertusPreTrainedModel:()=>AG,ArceeForCausalLM:()=>RG,ArceeModel:()=>LG,ArceePreTrainedModel:()=>IG,BartForConditionalGeneration:()=>WG,BartForSequenceClassification:()=>GG,BartModel:()=>UG,BartPretrainedModel:()=>HG,BeitForImageClassification:()=>JG,BeitModel:()=>qG,BeitPreTrainedModel:()=>KG,BertForMaskedLM:()=>ZG,BertForQuestionAnswering:()=>eK,BertForSequenceClassification:()=>QG,BertForTokenClassification:()=>$G,BertModel:()=>XG,BertPreTrainedModel:()=>YG,BlenderbotForConditionalGeneration:()=>rK,BlenderbotModel:()=>nK,BlenderbotPreTrainedModel:()=>tK,BlenderbotSmallForConditionalGeneration:()=>oK,BlenderbotSmallModel:()=>aK,BlenderbotSmallPreTrainedModel:()=>iK,BloomForCausalLM:()=>lK,BloomModel:()=>cK,BloomPreTrainedModel:()=>sK,CLIPModel:()=>DK,CLIPPreTrainedModel:()=>EK,CLIPSegForImageSegmentation:()=>PK,CLIPSegModel:()=>NK,CLIPSegPreTrainedModel:()=>MK,CLIPTextModel:()=>OK,CLIPTextModelWithProjection:()=>kK,CLIPVisionModel:()=>AK,CLIPVisionModelWithProjection:()=>jK,CamembertForMaskedLM:()=>fK,CamembertForQuestionAnswering:()=>hK,CamembertForSequenceClassification:()=>pK,CamembertForTokenClassification:()=>mK,CamembertModel:()=>dK,CamembertPreTrainedModel:()=>uK,ChatterboxModel:()=>yK,ChatterboxPreTrainedModel:()=>vK,ChineseCLIPModel:()=>xK,ChineseCLIPPreTrainedModel:()=>bK,ClapAudioModelWithProjection:()=>TK,ClapModel:()=>CK,ClapPreTrainedModel:()=>SK,ClapTextModelWithProjection:()=>wK,CodeGenForCausalLM:()=>LK,CodeGenModel:()=>IK,CodeGenPreTrainedModel:()=>FK,Cohere2ForCausalLM:()=>UK,Cohere2Model:()=>HK,Cohere2PreTrainedModel:()=>VK,CohereForCausalLM:()=>BK,CohereModel:()=>zK,CoherePreTrainedModel:()=>RK,ConvBertForMaskedLM:()=>KK,ConvBertForQuestionAnswering:()=>YK,ConvBertForSequenceClassification:()=>qK,ConvBertForTokenClassification:()=>JK,ConvBertModel:()=>GK,ConvBertPreTrainedModel:()=>WK,ConvNextForImageClassification:()=>QK,ConvNextModel:()=>ZK,ConvNextPreTrainedModel:()=>XK,ConvNextV2ForImageClassification:()=>tq,ConvNextV2Model:()=>eq,ConvNextV2PreTrainedModel:()=>$K,DFineForObjectDetection:()=>cq,DFineModel:()=>sq,DFinePreTrainedModel:()=>oq,DINOv3ConvNextModel:()=>Yq,DINOv3ConvNextPreTrainedModel:()=>Jq,DINOv3ViTModel:()=>Zq,DINOv3ViTPreTrainedModel:()=>Xq,DPTForDepthEstimation:()=>cJ,DPTModel:()=>sJ,DPTPreTrainedModel:()=>oJ,DacDecoderModel:()=>mq,DacDecoderOutput:()=>uq,DacEncoderModel:()=>pq,DacEncoderOutput:()=>lq,DacModel:()=>fq,DacPreTrainedModel:()=>dq,DebertaForMaskedLM:()=>_q,DebertaForQuestionAnswering:()=>bq,DebertaForSequenceClassification:()=>vq,DebertaForTokenClassification:()=>yq,DebertaModel:()=>gq,DebertaPreTrainedModel:()=>hq,DebertaV2ForMaskedLM:()=>Cq,DebertaV2ForQuestionAnswering:()=>Eq,DebertaV2ForSequenceClassification:()=>wq,DebertaV2ForTokenClassification:()=>Tq,DebertaV2Model:()=>Sq,DebertaV2PreTrainedModel:()=>xq,DecisionTransformerModel:()=>Oq,DecisionTransformerPreTrainedModel:()=>Dq,DeiTForImageClassification:()=>jq,DeiTModel:()=>Aq,DeiTPreTrainedModel:()=>kq,DepthAnythingForDepthEstimation:()=>Nq,DepthAnythingPreTrainedModel:()=>Mq,DepthProForDepthEstimation:()=>Fq,DepthProPreTrainedModel:()=>Pq,DetrForObjectDetection:()=>Rq,DetrForSegmentation:()=>zq,DetrModel:()=>Lq,DetrObjectDetectionOutput:()=>Bq,DetrPreTrainedModel:()=>Iq,DetrSegmentationOutput:()=>Vq,Dinov2ForImageClassification:()=>Wq,Dinov2Model:()=>Uq,Dinov2PreTrainedModel:()=>Hq,Dinov2WithRegistersForImageClassification:()=>qq,Dinov2WithRegistersModel:()=>Kq,Dinov2WithRegistersPreTrainedModel:()=>Gq,DistilBertForMaskedLM:()=>rJ,DistilBertForQuestionAnswering:()=>nJ,DistilBertForSequenceClassification:()=>eJ,DistilBertForTokenClassification:()=>tJ,DistilBertModel:()=>$q,DistilBertPreTrainedModel:()=>Qq,DonutSwinModel:()=>aJ,DonutSwinPreTrainedModel:()=>iJ,EdgeTamModel:()=>l1,EfficientNetForImageClassification:()=>dJ,EfficientNetModel:()=>uJ,EfficientNetPreTrainedModel:()=>lJ,ElectraForMaskedLM:()=>mJ,ElectraForQuestionAnswering:()=>_J,ElectraForSequenceClassification:()=>hJ,ElectraForTokenClassification:()=>gJ,ElectraModel:()=>pJ,ElectraPreTrainedModel:()=>fJ,Ernie4_5ForCausalLM:()=>bJ,Ernie4_5Model:()=>yJ,Ernie4_5PretrainedModel:()=>vJ,EsmForMaskedLM:()=>CJ,EsmForSequenceClassification:()=>wJ,EsmForTokenClassification:()=>TJ,EsmModel:()=>SJ,EsmPreTrainedModel:()=>xJ,ExaoneForCausalLM:()=>OJ,ExaoneModel:()=>DJ,ExaonePreTrainedModel:()=>EJ,FalconForCausalLM:()=>jJ,FalconH1ForCausalLM:()=>PJ,FalconH1Model:()=>NJ,FalconH1PreTrainedModel:()=>MJ,FalconModel:()=>AJ,FalconPreTrainedModel:()=>kJ,FastViTForImageClassification:()=>LJ,FastViTModel:()=>IJ,FastViTPreTrainedModel:()=>FJ,Florence2ForConditionalGeneration:()=>zJ,Florence2PreTrainedModel:()=>RJ,GLPNForDepthEstimation:()=>nY,GLPNModel:()=>tY,GLPNPreTrainedModel:()=>eY,GPT2LMHeadModel:()=>_Y,GPT2Model:()=>gY,GPT2PreTrainedModel:()=>hY,GPTBigCodeForCausalLM:()=>aY,GPTBigCodeModel:()=>iY,GPTBigCodePreTrainedModel:()=>rY,GPTJForCausalLM:()=>bY,GPTJModel:()=>yY,GPTJPreTrainedModel:()=>vY,GPTNeoForCausalLM:()=>cY,GPTNeoModel:()=>sY,GPTNeoPreTrainedModel:()=>oY,GPTNeoXForCausalLM:()=>dY,GPTNeoXModel:()=>uY,GPTNeoXPreTrainedModel:()=>lY,Gemma2ForCausalLM:()=>GJ,Gemma2Model:()=>WJ,Gemma2PreTrainedModel:()=>UJ,Gemma3ForCausalLM:()=>JJ,Gemma3Model:()=>qJ,Gemma3PreTrainedModel:()=>KJ,Gemma3nForConditionalGeneration:()=>XJ,Gemma3nPreTrainedModel:()=>YJ,GemmaForCausalLM:()=>HJ,GemmaModel:()=>VJ,GemmaPreTrainedModel:()=>BJ,GlmForCausalLM:()=>$J,GlmModel:()=>QJ,GlmPreTrainedModel:()=>ZJ,GptOssForCausalLM:()=>mY,GptOssModel:()=>pY,GptOssPreTrainedModel:()=>fY,GraniteForCausalLM:()=>CY,GraniteModel:()=>SY,GraniteMoeHybridForCausalLM:()=>EY,GraniteMoeHybridModel:()=>TY,GraniteMoeHybridPreTrainedModel:()=>wY,GranitePreTrainedModel:()=>xY,GroundingDinoForObjectDetection:()=>OY,GroundingDinoPreTrainedModel:()=>DY,GroupViTModel:()=>AY,GroupViTPreTrainedModel:()=>kY,HeliumForCausalLM:()=>NY,HeliumModel:()=>MY,HeliumPreTrainedModel:()=>jY,HieraForImageClassification:()=>IY,HieraModel:()=>FY,HieraPreTrainedModel:()=>PY,HubertForCTC:()=>WY,HubertForSequenceClassification:()=>GY,HubertModel:()=>UY,HubertPreTrainedModel:()=>HY,HunYuanDenseV1ForCausalLM:()=>JY,HunYuanDenseV1Model:()=>qY,HunYuanDenseV1PreTrainedModel:()=>KY,IJepaForImageClassification:()=>eX,IJepaModel:()=>$Y,IJepaPreTrainedModel:()=>QY,Idefics3ForConditionalGeneration:()=>XY,Idefics3PreTrainedModel:()=>YY,JAISLMHeadModel:()=>rX,JAISModel:()=>nX,JAISPreTrainedModel:()=>tX,JinaCLIPModel:()=>aX,JinaCLIPPreTrainedModel:()=>iX,JinaCLIPTextModel:()=>oX,JinaCLIPVisionModel:()=>sX,Lfm2ForCausalLM:()=>uX,Lfm2Model:()=>lX,Lfm2MoeForCausalLM:()=>pX,Lfm2MoeModel:()=>fX,Lfm2MoePreTrainedModel:()=>dX,Lfm2PreTrainedModel:()=>cX,LiteWhisperForConditionalGeneration:()=>o2,Llama4ForCausalLM:()=>vX,Llama4PreTrainedModel:()=>_X,LlamaForCausalLM:()=>gX,LlamaModel:()=>hX,LlamaPreTrainedModel:()=>mX,LlavaForConditionalGeneration:()=>bX,LlavaOnevisionForConditionalGeneration:()=>bX,LlavaPreTrainedModel:()=>yX,LlavaQwen2ForCausalLM:()=>SX,LongT5ForConditionalGeneration:()=>TX,LongT5Model:()=>wX,LongT5PreTrainedModel:()=>CX,M2M100ForConditionalGeneration:()=>OX,M2M100Model:()=>DX,M2M100PreTrainedModel:()=>EX,MBartForCausalLM:()=>zX,MBartForConditionalGeneration:()=>LX,MBartForSequenceClassification:()=>RX,MBartModel:()=>IX,MBartPreTrainedModel:()=>FX,MPNetForMaskedLM:()=>GZ,MPNetForQuestionAnswering:()=>JZ,MPNetForSequenceClassification:()=>KZ,MPNetForTokenClassification:()=>qZ,MPNetModel:()=>WZ,MPNetPreTrainedModel:()=>UZ,MT5ForConditionalGeneration:()=>eQ,MT5Model:()=>$Z,MT5PreTrainedModel:()=>QZ,MarianMTModel:()=>jX,MarianModel:()=>AX,MarianPreTrainedModel:()=>kX,MaskFormerForInstanceSegmentation:()=>PX,MaskFormerModel:()=>NX,MaskFormerPreTrainedModel:()=>MX,Metric3DForDepthEstimation:()=>VX,Metric3DPreTrainedModel:()=>BX,Metric3Dv2ForDepthEstimation:()=>UX,Metric3Dv2PreTrainedModel:()=>HX,MgpstrForSceneTextRecognition:()=>KX,MgpstrModelOutput:()=>WX,MgpstrPreTrainedModel:()=>GX,MimiDecoderModel:()=>QX,MimiDecoderOutput:()=>JX,MimiEncoderModel:()=>ZX,MimiEncoderOutput:()=>qX,MimiModel:()=>XX,MimiPreTrainedModel:()=>YX,MistralForCausalLM:()=>tZ,MistralModel:()=>eZ,MistralPreTrainedModel:()=>$X,MobileBertForMaskedLM:()=>iZ,MobileBertForQuestionAnswering:()=>oZ,MobileBertForSequenceClassification:()=>aZ,MobileBertModel:()=>rZ,MobileBertPreTrainedModel:()=>nZ,MobileLLMForCausalLM:()=>lZ,MobileLLMModel:()=>cZ,MobileLLMPreTrainedModel:()=>sZ,MobileNetV1ForImageClassification:()=>fZ,MobileNetV1ForSemanticSegmentation:()=>pZ,MobileNetV1Model:()=>dZ,MobileNetV1PreTrainedModel:()=>uZ,MobileNetV2ForImageClassification:()=>gZ,MobileNetV2ForSemanticSegmentation:()=>_Z,MobileNetV2Model:()=>hZ,MobileNetV2PreTrainedModel:()=>mZ,MobileNetV3ForImageClassification:()=>bZ,MobileNetV3ForSemanticSegmentation:()=>xZ,MobileNetV3Model:()=>yZ,MobileNetV3PreTrainedModel:()=>vZ,MobileNetV4ForImageClassification:()=>wZ,MobileNetV4ForSemanticSegmentation:()=>TZ,MobileNetV4Model:()=>CZ,MobileNetV4PreTrainedModel:()=>SZ,MobileViTForImageClassification:()=>OZ,MobileViTModel:()=>DZ,MobileViTPreTrainedModel:()=>EZ,MobileViTV2ForImageClassification:()=>jZ,MobileViTV2Model:()=>AZ,MobileViTV2PreTrainedModel:()=>kZ,ModernBertDecoderForCausalLM:()=>zZ,ModernBertDecoderModel:()=>RZ,ModernBertDecoderPreTrainedModel:()=>LZ,ModernBertForMaskedLM:()=>PZ,ModernBertForSequenceClassification:()=>FZ,ModernBertForTokenClassification:()=>IZ,ModernBertModel:()=>NZ,ModernBertPreTrainedModel:()=>MZ,Moondream1ForConditionalGeneration:()=>xX,MoonshineForConditionalGeneration:()=>HZ,MoonshineModel:()=>VZ,MoonshinePreTrainedModel:()=>BZ,MptForCausalLM:()=>ZZ,MptModel:()=>XZ,MptPreTrainedModel:()=>YZ,MultiModalityCausalLM:()=>nQ,MultiModalityPreTrainedModel:()=>tQ,MusicgenForCausalLM:()=>aQ,MusicgenForConditionalGeneration:()=>oQ,MusicgenModel:()=>iQ,MusicgenPreTrainedModel:()=>rQ,NanoChatForCausalLM:()=>lQ,NanoChatModel:()=>cQ,NanoChatPreTrainedModel:()=>sQ,NeoBertForMaskedLM:()=>fQ,NeoBertForQuestionAnswering:()=>hQ,NeoBertForSequenceClassification:()=>pQ,NeoBertForTokenClassification:()=>mQ,NeoBertModel:()=>dQ,NeoBertPreTrainedModel:()=>uQ,NomicBertModel:()=>_Q,NomicBertPreTrainedModel:()=>gQ,OPTForCausalLM:()=>FQ,OPTModel:()=>PQ,OPTPreTrainedModel:()=>NQ,Olmo2ForCausalLM:()=>CQ,Olmo2Model:()=>SQ,Olmo2PreTrainedModel:()=>xQ,Olmo3ForCausalLM:()=>EQ,Olmo3Model:()=>TQ,Olmo3PreTrainedModel:()=>wQ,OlmoForCausalLM:()=>bQ,OlmoHybridForCausalLM:()=>kQ,OlmoHybridModel:()=>OQ,OlmoHybridPreTrainedModel:()=>DQ,OlmoModel:()=>yQ,OlmoPreTrainedModel:()=>vQ,OpenELMForCausalLM:()=>MQ,OpenELMModel:()=>jQ,OpenELMPreTrainedModel:()=>AQ,OwlViTForObjectDetection:()=>VQ,OwlViTModel:()=>BQ,OwlViTPreTrainedModel:()=>zQ,Owlv2ForObjectDetection:()=>RQ,Owlv2Model:()=>LQ,Owlv2PreTrainedModel:()=>IQ,PaliGemmaForConditionalGeneration:()=>UQ,PaliGemmaPreTrainedModel:()=>HQ,ParakeetForCTC:()=>GQ,ParakeetPreTrainedModel:()=>WQ,PatchTSMixerForPrediction:()=>JQ,PatchTSMixerModel:()=>qQ,PatchTSMixerPreTrainedModel:()=>KQ,PatchTSTForPrediction:()=>ZQ,PatchTSTModel:()=>XQ,PatchTSTPreTrainedModel:()=>YQ,Phi3ForCausalLM:()=>r$,Phi3Model:()=>n$,Phi3PreTrainedModel:()=>t$,Phi3VForCausalLM:()=>a$,Phi3VPreTrainedModel:()=>i$,PhiForCausalLM:()=>e$,PhiModel:()=>$Q,PhiPreTrainedModel:()=>QQ,PreTrainedModel:()=>$,PvtForImageClassification:()=>c$,PvtModel:()=>s$,PvtPreTrainedModel:()=>o$,PyAnnoteForAudioFrameClassification:()=>d$,PyAnnoteModel:()=>u$,PyAnnotePreTrainedModel:()=>l$,Qwen2ForCausalLM:()=>m$,Qwen2Model:()=>p$,Qwen2MoeForCausalLM:()=>_$,Qwen2MoeModel:()=>g$,Qwen2MoePreTrainedModel:()=>h$,Qwen2PreTrainedModel:()=>f$,Qwen2VLForConditionalGeneration:()=>y$,Qwen2VLPreTrainedModel:()=>v$,Qwen2_5_VLForConditionalGeneration:()=>b$,Qwen3ForCausalLM:()=>C$,Qwen3Model:()=>S$,Qwen3MoeForCausalLM:()=>E$,Qwen3MoeModel:()=>T$,Qwen3MoePreTrainedModel:()=>w$,Qwen3NextForCausalLM:()=>k$,Qwen3NextModel:()=>O$,Qwen3NextPreTrainedModel:()=>D$,Qwen3PreTrainedModel:()=>x$,Qwen3VLForConditionalGeneration:()=>A$,Qwen3VLMoeForConditionalGeneration:()=>j$,Qwen3_5ForConditionalGeneration:()=>M$,Qwen3_5MoeForConditionalGeneration:()=>N$,RFDetrForObjectDetection:()=>z$,RFDetrModel:()=>R$,RFDetrObjectDetectionOutput:()=>B$,RFDetrPreTrainedModel:()=>L$,RTDetrForObjectDetection:()=>iq,RTDetrModel:()=>rq,RTDetrObjectDetectionOutput:()=>aq,RTDetrPreTrainedModel:()=>nq,RTDetrV2ForObjectDetection:()=>t1,RTDetrV2Model:()=>e1,RTDetrV2ObjectDetectionOutput:()=>n1,RTDetrV2PreTrainedModel:()=>$$,ResNetForImageClassification:()=>I$,ResNetModel:()=>F$,ResNetPreTrainedModel:()=>P$,RoFormerForMaskedLM:()=>Y$,RoFormerForQuestionAnswering:()=>Q$,RoFormerForSequenceClassification:()=>X$,RoFormerForTokenClassification:()=>Z$,RoFormerModel:()=>J$,RoFormerPreTrainedModel:()=>q$,RobertaForMaskedLM:()=>U$,RobertaForQuestionAnswering:()=>K$,RobertaForSequenceClassification:()=>W$,RobertaForTokenClassification:()=>G$,RobertaModel:()=>H$,RobertaPreTrainedModel:()=>V$,Sam2ImageSegmentationOutput:()=>o1,Sam2Model:()=>c1,Sam2PreTrainedModel:()=>s1,Sam3TrackerModel:()=>u1,SamImageSegmentationOutput:()=>r1,SamModel:()=>a1,SamPreTrainedModel:()=>i1,SapiensForDepthEstimation:()=>p1,SapiensForNormalEstimation:()=>m1,SapiensForSemanticSegmentation:()=>f1,SapiensPreTrainedModel:()=>d1,SegformerForImageClassification:()=>_1,SegformerForSemanticSegmentation:()=>v1,SegformerModel:()=>g1,SegformerPreTrainedModel:()=>h1,SiglipModel:()=>b1,SiglipPreTrainedModel:()=>y1,SiglipTextModel:()=>x1,SiglipVisionModel:()=>S1,SmolLM3ForCausalLM:()=>T1,SmolLM3Model:()=>w1,SmolLM3PreTrainedModel:()=>C1,SmolVLMForConditionalGeneration:()=>ZY,SnacDecoderModel:()=>k1,SnacEncoderModel:()=>O1,SnacModel:()=>D1,SnacPreTrainedModel:()=>E1,SpeechT5ForSpeechToText:()=>M1,SpeechT5ForTextToSpeech:()=>N1,SpeechT5HifiGan:()=>P1,SpeechT5Model:()=>j1,SpeechT5PreTrainedModel:()=>A1,SqueezeBertForMaskedLM:()=>L1,SqueezeBertForQuestionAnswering:()=>z1,SqueezeBertForSequenceClassification:()=>R1,SqueezeBertModel:()=>I1,SqueezeBertPreTrainedModel:()=>F1,StableLmForCausalLM:()=>H1,StableLmModel:()=>V1,StableLmPreTrainedModel:()=>B1,Starcoder2ForCausalLM:()=>G1,Starcoder2Model:()=>W1,Starcoder2PreTrainedModel:()=>U1,StyleTextToSpeech2Model:()=>q1,StyleTextToSpeech2PreTrainedModel:()=>K1,SupertonicForConditionalGeneration:()=>Y1,SupertonicPreTrainedModel:()=>J1,Swin2SRForImageSuperResolution:()=>n0,Swin2SRModel:()=>t0,Swin2SRPreTrainedModel:()=>e0,SwinForImageClassification:()=>Q1,SwinForSemanticSegmentation:()=>$1,SwinModel:()=>Z1,SwinPreTrainedModel:()=>X1,T5ForConditionalGeneration:()=>a0,T5Model:()=>i0,T5PreTrainedModel:()=>r0,TableTransformerForObjectDetection:()=>c0,TableTransformerModel:()=>s0,TableTransformerObjectDetectionOutput:()=>l0,TableTransformerPreTrainedModel:()=>o0,TrOCRForCausalLM:()=>d0,TrOCRPreTrainedModel:()=>u0,UltravoxModel:()=>p0,UltravoxPreTrainedModel:()=>f0,UniSpeechForCTC:()=>_0,UniSpeechForSequenceClassification:()=>v0,UniSpeechModel:()=>g0,UniSpeechPreTrainedModel:()=>h0,UniSpeechSatForAudioFrameClassification:()=>C0,UniSpeechSatForCTC:()=>x0,UniSpeechSatForSequenceClassification:()=>S0,UniSpeechSatModel:()=>b0,UniSpeechSatPreTrainedModel:()=>y0,VaultGemmaForCausalLM:()=>E0,VaultGemmaModel:()=>T0,VaultGemmaPreTrainedModel:()=>w0,ViTForImageClassification:()=>A0,ViTMAEModel:()=>M0,ViTMAEPreTrainedModel:()=>j0,ViTMSNForImageClassification:()=>F0,ViTMSNModel:()=>P0,ViTMSNPreTrainedModel:()=>N0,ViTModel:()=>k0,ViTPreTrainedModel:()=>O0,VisionEncoderDecoderModel:()=>D0,VitMatteForImageMatting:()=>L0,VitMattePreTrainedModel:()=>I0,VitPoseForPoseEstimation:()=>z0,VitPosePreTrainedModel:()=>R0,VitsModel:()=>H0,VitsModelOutput:()=>B0,VitsPreTrainedModel:()=>V0,VoxtralForConditionalGeneration:()=>m0,Wav2Vec2BertForCTC:()=>G0,Wav2Vec2BertForSequenceClassification:()=>K0,Wav2Vec2BertModel:()=>W0,Wav2Vec2BertPreTrainedModel:()=>U0,Wav2Vec2ForAudioFrameClassification:()=>VY,Wav2Vec2ForCTC:()=>zY,Wav2Vec2ForSequenceClassification:()=>BY,Wav2Vec2Model:()=>RY,Wav2Vec2PreTrainedModel:()=>LY,WavLMForAudioFrameClassification:()=>$0,WavLMForCTC:()=>X0,WavLMForSequenceClassification:()=>Z0,WavLMForXVector:()=>Q0,WavLMModel:()=>Y0,WavLMPreTrainedModel:()=>J0,WeSpeakerResNetModel:()=>t2,WeSpeakerResNetPreTrainedModel:()=>e2,WhisperForConditionalGeneration:()=>a2,WhisperModel:()=>i2,WhisperPreTrainedModel:()=>r2,XLMForQuestionAnswering:()=>f2,XLMForSequenceClassification:()=>u2,XLMForTokenClassification:()=>d2,XLMModel:()=>c2,XLMPreTrainedModel:()=>s2,XLMRobertaForMaskedLM:()=>h2,XLMRobertaForQuestionAnswering:()=>v2,XLMRobertaForSequenceClassification:()=>g2,XLMRobertaForTokenClassification:()=>_2,XLMRobertaModel:()=>m2,XLMRobertaPreTrainedModel:()=>p2,XLMWithLMHeadModel:()=>l2,XVectorOutput:()=>q0,YolosForObjectDetection:()=>x2,YolosModel:()=>b2,YolosObjectDetectionOutput:()=>S2,YolosPreTrainedModel:()=>y2,YoutuForCausalLM:()=>T2,YoutuModel:()=>w2,YoutuPreTrainedModel:()=>C2});var TG=class extends ${},EG=class extends TG{},DG=class extends TG{async _call(e){return new CW(await super._call(e))}},OG=class extends TG{async _call(e){return new EW(await super._call(e))}},kG=class extends TG{async _call(e){return new TW(await super._call(e))}},AG=class extends ${},jG=class extends AG{},MG=class extends AG{},NG=class extends ${},PG=class extends NG{},FG=class extends NG{},IG=class extends ${},LG=class extends IG{},RG=class extends IG{},zG=class extends ${},BG=class extends zG{},VG=class extends zG{},HG=class extends ${},UG=class extends HG{},WG=class extends HG{},GG=class extends HG{async _call(e){return new CW(await super._call(e))}},KG=class extends ${},qG=class extends KG{},JG=class extends KG{async _call(e){return new CW(await super._call(e))}},YG=class extends ${},XG=class extends YG{},ZG=class extends YG{async _call(e){return new TW(await super._call(e))}},QG=class extends YG{async _call(e){return new CW(await super._call(e))}},$G=class extends YG{async _call(e){return new wW(await super._call(e))}},eK=class extends YG{async _call(e){return new EW(await super._call(e))}},tK=class extends ${},nK=class extends tK{},rK=class extends tK{},iK=class extends ${},aK=class extends iK{},oK=class extends iK{},sK=class extends ${},cK=class extends sK{},lK=class extends sK{},uK=class extends ${},dK=class extends uK{},fK=class extends uK{async _call(e){return new TW(await super._call(e))}},pK=class extends uK{async _call(e){return new CW(await super._call(e))}},mK=class extends uK{async _call(e){return new wW(await super._call(e))}},hK=class extends uK{async _call(e){return new EW(await super._call(e))}},gK=4299n,_K=6561n,vK=class extends ${forward_params=[`input_ids`,`inputs_embeds`,`attention_mask`,`position_ids`,`audio_values`,`exaggeration`,`audio_features`,`audio_tokens`,`speaker_embeddings`,`speaker_features`,`past_key_values`];main_input_name=`input_ids`;_return_dict_in_generate_keys=[`audio_tokens`,`speaker_embeddings`,`speaker_features`]},yK=class extends vK{async encode_speech(e){return bW(this.sessions.speech_encoder,{audio_values:e})}async forward({input_ids:e=null,attention_mask:t=null,audio_values:n=null,exaggeration:r=null,position_ids:i=null,inputs_embeds:a=null,past_key_values:o=null,generation_config:s=null,logits_processor:c=null,audio_features:l=null,audio_tokens:u=null,speaker_embeddings:d=null,speaker_features:f=null,...p}){let m;if(!a){let s=this.sessions.embed_tokens.inputNames,c={input_ids:e};if(s.includes(`exaggeration`)){if(!(r instanceof pz)){let t=e.dims[0];if(r==null)r=Nz([t],.5);else if(typeof r==`number`)r=Nz([t],r);else if(Array.isArray(r))r=new pz(`float32`,r,[t]);else throw Error("Unsupported type for `exaggeration` input")}c.exaggeration=r}if(s.includes(`position_ids`)&&(c.position_ids=i),{inputs_embeds:a}=await bW(this.sessions.embed_tokens,c),l&&u&&d&&f&&(m={audio_features:l,audio_tokens:u,speaker_embeddings:d,speaker_features:f}),m||n)m??=await this.encode_speech(n),a=Ez([m.audio_features,a],1),t=Fz([a.dims[0],a.dims[1]]);else{let e=a.dims[1];if(!o||e!==1)throw Error(`Incorrect state encountered during generation.`);let n=Object.values(o)[0].dims.at(-2);t=Fz([a.dims[0],n+e])}}return{...await dG(this,{inputs_embeds:a,past_key_values:o,attention_mask:t,generation_config:s,logits_processor:c},!1),...m}}prepare_inputs_for_generation(e,t,n){return!t.position_ids&&this.sessions.embed_tokens.inputNames.includes(`position_ids`)&&(t.input_ids.dims[1]===1?t.position_ids=new pz(`int64`,Array.from({length:e.length},(t,n)=>e[n].length-e[n].findLastIndex(e=>e==_K)-1),[e.length,1]):t.position_ids=new pz(`int64`,t.input_ids.tolist().map(e=>{let t=0;return e.map(e=>e>=_K?0:t++)}).flat(),t.input_ids.dims)),t.input_ids.dims[1]===1&&(delete t.audio_values,delete t.audio_features,delete t.audio_tokens,delete t.speaker_embeddings,delete t.speaker_features),_G(this,e,t,n)}async generate(e){let{sequences:t,audio_tokens:n,speaker_embeddings:r,speaker_features:i}=await super.generate({...e,return_dict_in_generate:!0}),a=t.slice(null,[e.input_ids.dims[1],-1]),o=Ez([n,a,Nz([a.dims[0],3],gK)],1),{waveform:s}=await bW(this.sessions.conditional_decoder,{speech_tokens:o,speaker_features:i,speaker_embeddings:r});return s}},bK=class extends ${},xK=class extends bK{},SK=class extends ${},CK=class extends SK{},wK=class extends SK{static async from_pretrained(e,t={}){return super.from_pretrained(e,{...t,model_file_name:t.model_file_name??`text_model`})}},TK=class extends SK{static async from_pretrained(e,t={}){return super.from_pretrained(e,{...t,model_file_name:t.model_file_name??`audio_model`})}},EK=class extends ${},DK=class extends EK{},OK=class extends EK{static async from_pretrained(e,t={}){return super.from_pretrained(e,{...t,model_file_name:t.model_file_name??`text_model`})}},kK=class extends EK{static async from_pretrained(e,t={}){return super.from_pretrained(e,{...t,model_file_name:t.model_file_name??`text_model`})}},AK=class extends EK{static async from_pretrained(e,t={}){return super.from_pretrained(e,{...t,model_file_name:t.model_file_name??`vision_model`})}},jK=class extends EK{static async from_pretrained(e,t={}){return super.from_pretrained(e,{...t,model_file_name:t.model_file_name??`vision_model`})}},MK=class extends ${},NK=class extends MK{},PK=class extends MK{},FK=class extends ${},IK=class extends FK{},LK=class extends FK{},RK=class extends ${},zK=class extends RK{},BK=class extends RK{},VK=class extends ${},HK=class extends VK{},UK=class extends VK{},WK=class extends ${},GK=class extends WK{},KK=class extends WK{async _call(e){return new TW(await super._call(e))}},qK=class extends WK{async _call(e){return new CW(await super._call(e))}},JK=class extends WK{async _call(e){return new wW(await super._call(e))}},YK=class extends WK{async _call(e){return new EW(await super._call(e))}},XK=class extends ${},ZK=class extends XK{},QK=class extends XK{async _call(e){return new CW(await super._call(e))}},$K=class extends ${},eq=class extends $K{},tq=class extends $K{async _call(e){return new CW(await super._call(e))}},nq=class extends ${},rq=class extends nq{},iq=class extends nq{async _call(e){return new aq(await super._call(e))}},aq=class extends SW{constructor({logits:e,pred_boxes:t}){super(),this.logits=e,this.pred_boxes=t}},oq=class extends ${},sq=class extends oq{},cq=class extends oq{async _call(e){return new aq(await super._call(e))}},lq=class extends SW{constructor({audio_codes:e}){super(),this.audio_codes=e}},uq=class extends SW{constructor({audio_values:e}){super(),this.audio_values=e}},dq=class extends ${main_input_name=`input_values`;forward_params=[`input_values`]},fq=class extends dq{async encode(e){return new lq(await bW(this.sessions.encoder_model,e))}async decode(e){return new uq(await bW(this.sessions.decoder_model,e))}},pq=class extends dq{static async from_pretrained(e,t={}){return super.from_pretrained(e,{...t,model_file_name:t.model_file_name??`encoder_model`})}},mq=class extends dq{static async from_pretrained(e,t={}){return super.from_pretrained(e,{...t,model_file_name:t.model_file_name??`decoder_model`})}},hq=class extends ${},gq=class extends hq{},_q=class extends hq{async _call(e){return new TW(await super._call(e))}},vq=class extends hq{async _call(e){return new CW(await super._call(e))}},yq=class extends hq{async _call(e){return new wW(await super._call(e))}},bq=class extends hq{async _call(e){return new EW(await super._call(e))}},xq=class extends ${},Sq=class extends xq{},Cq=class extends xq{async _call(e){return new TW(await super._call(e))}},wq=class extends xq{async _call(e){return new CW(await super._call(e))}},Tq=class extends xq{async _call(e){return new wW(await super._call(e))}},Eq=class extends xq{async _call(e){return new EW(await super._call(e))}},Dq=class extends ${},Oq=class extends Dq{},kq=class extends ${},Aq=class extends kq{},jq=class extends kq{async _call(e){return new CW(await super._call(e))}},Mq=class extends ${},Nq=class extends Mq{},Pq=class extends ${},Fq=class extends Pq{},Iq=class extends ${},Lq=class extends Iq{},Rq=class extends Iq{async _call(e){return new Bq(await super._call(e))}},zq=class extends Iq{async _call(e){return new Vq(await super._call(e))}},Bq=class extends SW{constructor({logits:e,pred_boxes:t}){super(),this.logits=e,this.pred_boxes=t}},Vq=class extends SW{constructor({logits:e,pred_boxes:t,pred_masks:n}){super(),this.logits=e,this.pred_boxes=t,this.pred_masks=n}},Hq=class extends ${},Uq=class extends Hq{},Wq=class extends Hq{async _call(e){return new CW(await super._call(e))}},Gq=class extends ${},Kq=class extends Gq{},qq=class extends Gq{async _call(e){return new CW(await super._call(e))}},Jq=class extends ${},Yq=class extends Jq{},Xq=class extends ${},Zq=class extends Xq{},Qq=class extends ${},$q=class extends Qq{},eJ=class extends Qq{async _call(e){return new CW(await super._call(e))}},tJ=class extends Qq{async _call(e){return new wW(await super._call(e))}},nJ=class extends Qq{async _call(e){return new EW(await super._call(e))}},rJ=class extends Qq{async _call(e){return new TW(await super._call(e))}},iJ=class extends ${},aJ=class extends iJ{},oJ=class extends ${},sJ=class extends oJ{},cJ=class extends oJ{},lJ=class extends ${},uJ=class extends lJ{},dJ=class extends lJ{async _call(e){return new CW(await super._call(e))}},fJ=class extends ${},pJ=class extends fJ{},mJ=class extends fJ{async _call(e){return new TW(await super._call(e))}},hJ=class extends fJ{async _call(e){return new CW(await super._call(e))}},gJ=class extends fJ{async _call(e){return new wW(await super._call(e))}},_J=class extends fJ{async _call(e){return new EW(await super._call(e))}},vJ=class extends ${},yJ=class extends vJ{},bJ=class extends vJ{},xJ=class extends ${},SJ=class extends xJ{},CJ=class extends xJ{async _call(e){return new TW(await super._call(e))}},wJ=class extends xJ{async _call(e){return new CW(await super._call(e))}},TJ=class extends xJ{async _call(e){return new wW(await super._call(e))}},EJ=class extends ${},DJ=class extends EJ{},OJ=class extends EJ{},kJ=class extends ${},AJ=class extends kJ{},jJ=class extends kJ{},MJ=class extends ${},NJ=class extends MJ{},PJ=class extends MJ{},FJ=class extends ${},IJ=class extends FJ{},LJ=class extends FJ{async _call(e){return new CW(await super._call(e))}},RJ=class extends ${forward_params=[`input_ids`,`inputs_embeds`,`attention_mask`,`pixel_values`,`encoder_outputs`,`decoder_input_ids`,`decoder_inputs_embeds`,`decoder_attention_mask`,`past_key_values`];main_input_name=`inputs_embeds`},zJ=class extends RJ{_merge_input_ids_with_image_features({inputs_embeds:e,image_features:t,input_ids:n,attention_mask:r}){return{inputs_embeds:Ez([t,e],1),attention_mask:Ez([Fz(t.dims.slice(0,2)),r],1)}}async _prepare_inputs_embeds({input_ids:e,pixel_values:t,inputs_embeds:n,attention_mask:r}){if(!e&&!t)throw Error("Either `input_ids` or `pixel_values` should be provided.");let i,a;return e&&(i=await this.encode_text({input_ids:e})),t&&(a=await this.encode_image({pixel_values:t})),i&&a?{inputs_embeds:n,attention_mask:r}=this._merge_input_ids_with_image_features({inputs_embeds:i,image_features:a,input_ids:e,attention_mask:r}):n=i||a,{inputs_embeds:n,attention_mask:r}}async forward({input_ids:e,pixel_values:t,attention_mask:n,decoder_input_ids:r,decoder_attention_mask:i,encoder_outputs:a,past_key_values:o,inputs_embeds:s,decoder_inputs_embeds:c}){if(s||({inputs_embeds:s,attention_mask:n}=await this._prepare_inputs_embeds({input_ids:e,pixel_values:t,inputs_embeds:s,attention_mask:n})),!a){let{last_hidden_state:e}=await lG(this,{inputs_embeds:s,attention_mask:n});a=e}if(!c){if(!r)throw Error("Either `decoder_input_ids` or `decoder_inputs_embeds` should be provided.");c=await this.encode_text({input_ids:r})}return await dG(this,{inputs_embeds:c,attention_mask:i,encoder_attention_mask:n,encoder_hidden_states:a,past_key_values:o},!0)}},BJ=class extends ${},VJ=class extends BJ{},HJ=class extends BJ{},UJ=class extends ${},WJ=class extends UJ{},GJ=class extends UJ{},KJ=class extends ${},qJ=class extends KJ{},JJ=class extends KJ{},YJ=class extends ${forward_params=[`input_ids`,`attention_mask`,`inputs_embeds`,`per_layer_inputs`,`position_ids`,`pixel_values`,`input_features`,`input_features_mask`,`past_key_values`]},XJ=class extends YJ{async forward({input_ids:e=null,attention_mask:t=null,pixel_values:n=null,input_features:r=null,input_features_mask:i=null,position_ids:a=null,inputs_embeds:o=null,per_layer_inputs:s=null,past_key_values:c=null,generation_config:l=null,logits_processor:u=null,...d}){if((!o||!s)&&({inputs_embeds:o,per_layer_inputs:s}=await bW(this.sessions.embed_tokens,{input_ids:e}),e.dims[1]!==1)){if(n){let{image_features:r}=await bW(this.sessions.vision_encoder,{pixel_values:n});({inputs_embeds:o,attention_mask:t}=this._merge_input_ids_with_image_features({image_features:r,inputs_embeds:o,input_ids:e,attention_mask:t}))}if(r){let{audio_features:n}=await bW(this.sessions.audio_encoder,{input_features:r,input_features_mask:i});({inputs_embeds:o,attention_mask:t}=this._merge_input_ids_with_audio_features({audio_features:n,inputs_embeds:o,input_ids:e,attention_mask:t}))}}return await dG(this,{inputs_embeds:o,per_layer_inputs:s,past_key_values:c,attention_mask:t,position_ids:a,generation_config:l,logits_processor:u},!0)}_merge_input_ids_with_image_features(e){let t=e.image_features.dims.at(-1),n=e.image_features.view(-1,t);return xG({image_token_id:this.config.image_token_id,...e,image_features:n})}_merge_input_ids_with_audio_features(e){let t=e.audio_features.dims.at(-1),n=e.audio_features.view(-1,t);return SG({audio_token_id:this.config.audio_token_id,...e,audio_features:n})}},ZJ=class extends ${},QJ=class extends ZJ{},$J=class extends ZJ{},eY=class extends ${},tY=class extends eY{},nY=class extends eY{},rY=class extends ${},iY=class extends rY{},aY=class extends rY{},oY=class extends ${},sY=class extends oY{},cY=class extends oY{},lY=class extends ${},uY=class extends lY{},dY=class extends lY{},fY=class extends ${},pY=class extends fY{},mY=class extends fY{},hY=class extends ${},gY=class extends hY{},_Y=class extends hY{},vY=class extends ${},yY=class extends vY{},bY=class extends vY{},xY=class extends ${},SY=class extends xY{},CY=class extends xY{},wY=class extends ${},TY=class extends wY{},EY=class extends wY{},DY=class extends ${},OY=class extends DY{},kY=class extends ${},AY=class extends kY{},jY=class extends ${},MY=class extends jY{},NY=class extends jY{},PY=class extends ${},FY=class extends PY{},IY=class extends PY{async _call(e){return new CW(await super._call(e))}},LY=class extends ${},RY=class extends LY{},zY=class extends LY{async _call(e){return new DW(await super._call(e))}},BY=class extends LY{async _call(e){return new CW(await super._call(e))}},VY=class extends LY{async _call(e){return new wW(await super._call(e))}},HY=class extends ${},UY=class extends LY{},WY=class extends LY{async _call(e){return new DW(await super._call(e))}},GY=class extends LY{async _call(e){return new CW(await super._call(e))}},KY=class extends ${},qY=class extends KY{},JY=class extends KY{},YY=class extends ${forward_params=[`input_ids`,`attention_mask`,`pixel_values`,`pixel_attention_mask`,`position_ids`,`past_key_values`]},XY=class extends YY{async encode_image({pixel_values:e,pixel_attention_mask:t}){return(await bW(this.sessions.vision_encoder,{pixel_values:e,pixel_attention_mask:t})).image_features}_merge_input_ids_with_image_features(e){let t=e.image_features.dims.at(-1),n=e.image_features.view(-1,t);return xG({image_token_id:this.config.image_token_id,...e,image_features:n})}},ZY=class extends XY{},QY=class extends ${},$Y=class extends QY{},eX=class extends QY{async _call(e){return new CW(await super._call(e))}},tX=class extends ${},nX=class extends tX{},rX=class extends tX{},iX=class extends ${},aX=class extends iX{async forward(e){let t=!e.input_ids,n=!e.pixel_values;if(t&&n)throw Error("Either `input_ids` or `pixel_values` should be provided.");if(t&&(e.input_ids=Fz([e.pixel_values.dims[0],1])),n){let{image_size:t}=this.config.vision_config;e.pixel_values=Nz([0,3,t,t],0)}let{text_embeddings:r,image_embeddings:i,l2norm_text_embeddings:a,l2norm_image_embeddings:o}=await super.forward(e),s={};return t||(s.text_embeddings=r,s.l2norm_text_embeddings=a),n||(s.image_embeddings=i,s.l2norm_image_embeddings=o),s}},oX=class extends iX{static async from_pretrained(e,t={}){return super.from_pretrained(e,{...t,model_file_name:t.model_file_name??`text_model`})}},sX=class extends iX{static async from_pretrained(e,t={}){return super.from_pretrained(e,{...t,model_file_name:t.model_file_name??`vision_model`})}},cX=class extends ${},lX=class extends cX{},uX=class extends cX{},dX=class extends ${},fX=class extends dX{},pX=class extends dX{},mX=class extends ${},hX=class extends mX{},gX=class extends mX{},_X=class extends ${},vX=class extends _X{},yX=class extends ${forward_params=[`input_ids`,`attention_mask`,`pixel_values`,`position_ids`,`past_key_values`]},bX=class extends yX{_merge_input_ids_with_image_features(e){let t=e.image_features.dims.at(-1),n=e.image_features.view(-1,t);return xG({image_token_id:this.config.image_token_index,...e,image_features:n})}},xX=class extends bX{},SX=class extends bX{},CX=class extends ${},wX=class extends CX{},TX=class extends CX{},EX=class extends ${},DX=class extends EX{},OX=class extends EX{},kX=class extends ${},AX=class extends kX{},jX=class extends kX{},MX=class extends ${},NX=class extends MX{},PX=class extends MX{},FX=class extends ${},IX=class extends FX{},LX=class extends FX{},RX=class extends FX{async _call(e){return new CW(await super._call(e))}},zX=class extends FX{},BX=class extends ${},VX=class extends BX{},HX=class extends ${},UX=class extends HX{},WX=class extends SW{constructor({char_logits:e,bpe_logits:t,wp_logits:n}){super(),this.char_logits=e,this.bpe_logits=t,this.wp_logits=n}get logits(){return[this.char_logits,this.bpe_logits,this.wp_logits]}},GX=class extends ${},KX=class extends GX{async _call(e){return new WX(await super._call(e))}},qX=class extends SW{constructor({audio_codes:e}){super(),this.audio_codes=e}},JX=class extends SW{constructor({audio_values:e}){super(),this.audio_values=e}},YX=class extends ${main_input_name=`input_values`;forward_params=[`input_values`]},XX=class extends YX{async encode(e){return new qX(await bW(this.sessions.encoder_model,e))}async decode(e){return new JX(await bW(this.sessions.decoder_model,e))}},ZX=class extends YX{static async from_pretrained(e,t={}){return super.from_pretrained(e,{...t,model_file_name:t.model_file_name??`encoder_model`})}},QX=class extends YX{static async from_pretrained(e,t={}){return super.from_pretrained(e,{...t,model_file_name:t.model_file_name??`decoder_model`})}},$X=class extends ${},eZ=class extends $X{},tZ=class extends $X{},nZ=class extends ${},rZ=class extends nZ{},iZ=class extends nZ{async _call(e){return new TW(await super._call(e))}},aZ=class extends nZ{async _call(e){return new CW(await super._call(e))}},oZ=class extends nZ{async _call(e){return new EW(await super._call(e))}},sZ=class extends ${},cZ=class extends sZ{},lZ=class extends sZ{},uZ=class extends ${},dZ=class extends uZ{},fZ=class extends uZ{async _call(e){return new CW(await super._call(e))}},pZ=class extends uZ{},mZ=class extends ${},hZ=class extends mZ{},gZ=class extends mZ{async _call(e){return new CW(await super._call(e))}},_Z=class extends mZ{},vZ=class extends ${},yZ=class extends vZ{},bZ=class extends vZ{async _call(e){return new CW(await super._call(e))}},xZ=class extends vZ{},SZ=class extends ${},CZ=class extends SZ{},wZ=class extends SZ{async _call(e){return new CW(await super._call(e))}},TZ=class extends SZ{},EZ=class extends ${},DZ=class extends EZ{},OZ=class extends EZ{async _call(e){return new CW(await super._call(e))}},kZ=class extends ${},AZ=class extends kZ{},jZ=class extends kZ{async _call(e){return new CW(await super._call(e))}},MZ=class extends ${},NZ=class extends MZ{},PZ=class extends MZ{async _call(e){return new TW(await super._call(e))}},FZ=class extends MZ{async _call(e){return new CW(await super._call(e))}},IZ=class extends MZ{async _call(e){return new wW(await super._call(e))}},LZ=class extends ${},RZ=class extends LZ{},zZ=class extends LZ{},BZ=class extends ${requires_attention_mask=!1;main_input_name=`input_values`;forward_params=[`input_values`,`decoder_input_ids`,`past_key_values`]},VZ=class extends BZ{},HZ=class extends BZ{},UZ=class extends ${},WZ=class extends UZ{},GZ=class extends UZ{async _call(e){return new TW(await super._call(e))}},KZ=class extends UZ{async _call(e){return new CW(await super._call(e))}},qZ=class extends UZ{async _call(e){return new wW(await super._call(e))}},JZ=class extends UZ{async _call(e){return new EW(await super._call(e))}},YZ=class extends ${},XZ=class extends YZ{},ZZ=class extends YZ{},QZ=class extends ${},$Z=class extends QZ{},eQ=class extends QZ{},tQ=class extends ${},nQ=class extends tQ{forward_params=[`input_ids`,`pixel_values`,`images_seq_mask`,`images_emb_mask`,`attention_mask`,`position_ids`,`past_key_values`];constructor(...e){super(...e),this._generation_mode=`text`}async forward(e){let t=this._generation_mode??`text`,n;if(t===`text`||!e.past_key_values){let t=this.sessions.prepare_inputs_embeds;n=await bW(t,CP(e,t.inputNames))}else{let t=this.sessions.gen_img_embeds;n=await bW(t,CP({image_ids:e.input_ids},t.inputNames))}let r={...e,...n},i=await dG(this,r),a=this.sessions[t===`text`?`lm_head`:`gen_head`];if(!a)throw Error(`Unable to find "${a}" generation head`);let o=await bW(a,CP(i,a.inputNames));return{...n,...i,...o}}prepare_inputs_for_generation(e,t,n){let r=!!t.past_key_values;return n.guidance_scale!==null&&n.guidance_scale>1&&(r?t.input_ids=Ez([t.input_ids,t.input_ids],0):(t.input_ids=Ez([t.input_ids,Pz(t.input_ids,BigInt(n.pad_token_id))],0),t.attention_mask=Ez([t.attention_mask,Pz(t.attention_mask,0n)],0))),(r||!t.pixel_values)&&(t.pixel_values=Nz([0,0,3,384,384],1)),r&&(t.images_seq_mask=new pz(`bool`,[,].fill(!0).fill(!1,0,1),[1,1]),t.images_emb_mask=new pz(`bool`,[].fill(!1),[1,1,0])),t}async generate(e){return this._generation_mode=`text`,super.generate(e)}async generate_images(e){this._generation_mode=`image`;let t=(e.inputs??e[this.main_input_name]).dims[1],n=(await super.generate(e)).slice(null,[t,null]),r=this.sessions.image_decode,{decoded_image:i}=await bW(r,{generated_tokens:n}),a=i.add_(1).mul_(255/2).clamp_(0,255).to(`uint8`),o=[];for(let e of a){let t=ZV.fromTensor(e);o.push(t)}return o}},rQ=class extends ${},iQ=class extends rQ{},aQ=class extends rQ{},oQ=class extends ${forward_params=[`input_ids`,`attention_mask`,`encoder_outputs`,`decoder_input_ids`,`decoder_attention_mask`,`past_key_values`];_apply_and_filter_by_delay_pattern_mask(e){let[t,n]=e.dims,r=this.config.decoder.num_codebooks,i=n-r,a=0;for(let t=0;t0&&o<=i&&(e.data[a++]=e.data[t])}let o=Math.floor(t/r),s=a/(o*r);return new pz(e.type,e.data.slice(0,a),[o,r,s])}prepare_inputs_for_generation(e,t,n){let r=BigInt(this.config.decoder.pad_token_id),i=structuredClone(e);for(let e=0;e=t&&(i[e][t]=r);return n.guidance_scale!==null&&n.guidance_scale>1&&(i=i.concat(i)),vG(this,i,t,n)}async generate(e){let t=await super.generate(e),n=this._apply_and_filter_by_delay_pattern_mask(t).unsqueeze_(0),{audio_values:r}=await bW(this.sessions.encodec_decode,{audio_codes:n});return r}},sQ=class extends ${},cQ=class extends sQ{},lQ=class extends sQ{},uQ=class extends ${},dQ=class extends uQ{},fQ=class extends uQ{async _call(e){return new TW(await super._call(e))}},pQ=class extends uQ{async _call(e){return new CW(await super._call(e))}},mQ=class extends uQ{async _call(e){return new wW(await super._call(e))}},hQ=class extends uQ{async _call(e){return new EW(await super._call(e))}},gQ=class extends ${},_Q=class extends gQ{},vQ=class extends ${},yQ=class extends vQ{},bQ=class extends vQ{},xQ=class extends ${},SQ=class extends xQ{},CQ=class extends xQ{},wQ=class extends ${},TQ=class extends wQ{},EQ=class extends wQ{},DQ=class extends ${},OQ=class extends DQ{},kQ=class extends DQ{},AQ=class extends ${},jQ=class extends AQ{},MQ=class extends AQ{},NQ=class extends ${},PQ=class extends NQ{},FQ=class extends NQ{},IQ=class extends ${},LQ=class extends IQ{},RQ=class extends IQ{},zQ=class extends ${},BQ=class extends zQ{},VQ=class extends zQ{},HQ=class extends ${forward_params=[`input_ids`,`attention_mask`,`pixel_values`,`position_ids`,`past_key_values`]},UQ=class extends HQ{_merge_input_ids_with_image_features(e){let t=e.image_features.dims.at(-1),n=e.image_features.view(-1,t);return xG({image_token_id:this.config.image_token_index,...e,image_features:n})}},WQ=class extends ${},GQ=class extends WQ{async _call(e){return new DW(await super._call(e))}},KQ=class extends ${},qQ=class extends KQ{},JQ=class extends KQ{},YQ=class extends ${},XQ=class extends YQ{},ZQ=class extends YQ{},QQ=class extends ${},$Q=class extends QQ{},e$=class extends QQ{},t$=class extends ${},n$=class extends t${},r$=class extends t${},i$=class extends ${forward_params=[`input_ids`,`inputs_embeds`,`attention_mask`,`position_ids`,`pixel_values`,`image_sizes`,`past_key_values`]},a$=class extends i${async forward({input_ids:e=null,attention_mask:t=null,pixel_values:n=null,image_sizes:r=null,position_ids:i=null,inputs_embeds:a=null,past_key_values:o=null,generation_config:s=null,logits_processor:c=null,...l}){if(!a){let t;if(n&&e.dims[1]!==1){if(!r)throw Error("`image_sizes` must be provided when `pixel_values` is provided.");({image_features:t}=await bW(this.sessions.vision_encoder,{pixel_values:n,image_sizes:r}))}else{let e=this.config.normalized_config.hidden_size;t=new pz(`float32`,[],[0,e])}({inputs_embeds:a}=await bW(this.sessions.prepare_inputs_embeds,{input_ids:e,image_features:t}))}return await dG(this,{inputs_embeds:a,past_key_values:o,attention_mask:t,position_ids:i,generation_config:s,logits_processor:c},!1)}},o$=class extends ${},s$=class extends o${},c$=class extends o${async _call(e){return new CW(await super._call(e))}},l$=class extends ${},u$=class extends l${},d$=class extends l${async _call(e){return new wW(await super._call(e))}},f$=class extends ${},p$=class extends f${},m$=class extends f${},h$=class extends ${},g$=class extends h${},_$=class extends h${},v$=class extends ${forward_params=[`input_ids`,`attention_mask`,`position_ids`,`past_key_values`,`pixel_values`,`image_grid_thw`]},y$=class extends v${image_grid_thw_name=`grid_thw`;get_rope_index(e,t,n,r){let{vision_config:i,image_token_id:a,video_token_id:o,vision_start_token_id:s}=this.config,c=i.spatial_merge_size??2,l=[];if(t||n){let i=e.tolist();r||=Iz(e);let u=r.tolist(),d=Array.from({length:3},t=>Array.from({length:e.dims[0]},t=>Array.from({length:e.dims[1]},e=>1))),f=t?t.tolist():[],p=n?n.tolist():[],m=0,h=0;for(let e=0;eu[e][n]==1),n=t.reduce((e,t,n)=>(t==s&&e.push(n),e),[]).map(e=>t[e+1]),r=n.filter(e=>e==a).length,g=n.filter(e=>e==o).length,_=[],v=0,y=r,b=g;for(let e=0;et>v&&e==a),n=t.findIndex((e,t)=>t>v&&e==o),r=y>0&&e!==-1?e:t.length+1,i=b>0&&n!==-1?n:t.length+1,s,l,u,d;r0?SR(_.at(-1))[0]+1:0;_.push(Array.from({length:3*S},(e,t)=>C+t%S));let w=S+C,T=g*x*ee,te=Array.from({length:T},(e,t)=>w+Math.floor(t/(x*ee))),ne=Array.from({length:T},(e,t)=>w+Math.floor(t/ee)%x),E=Array.from({length:T},(e,t)=>w+t%ee);_.push([te,ne,E].flat()),v=s+T}if(v0?SR(_.at(-1))[0]+1:0,n=t.length-v;_.push(Array.from({length:3*n},(t,r)=>e+r%n))}let x=_.reduce((e,t)=>e+t.length,0),ee=Array(x),S=0;for(let e=0;e<3;++e)for(let t=0;t<_.length;++t){let n=_[t],r=n.length/3;for(let t=e*r;t<(e+1)*r;++t)ee[S++]=n[t]}let C=0,w=u[e];for(let t=0;te[n%e.length]),i=Array.from({length:t[0]},(n,r)=>SR(e.subarray(t[1]*r,t[1]*(r+1)))[0]+1n+BigInt(t[1]));return[new pz(`int64`,n,[3,...t]),new pz(`int64`,i,[i.length,1])]}else{let[t,n]=e.dims;return[new pz(`int64`,BigInt64Array.from({length:3*t*n},(e,r)=>BigInt(Math.floor(r%n/t))),[3,...e.dims]),Lz([t,1])]}}async encode_image({pixel_values:e,image_grid_thw:t}){return(await bW(this.sessions.vision_encoder,{pixel_values:e,[this.image_grid_thw_name]:t})).image_features}_merge_input_ids_with_image_features(e){return xG({image_token_id:this.config.image_token_id,...e})}prepare_inputs_for_generation(e,t,n){if(t.attention_mask&&!t.position_ids)if(!t.past_key_values)[t.position_ids,t.rope_deltas]=this.get_rope_index(t.input_ids,t.image_grid_thw,t.video_grid_thw,t.attention_mask);else{t.pixel_values=null;let e=tG(t.past_key_values);if(en+e);t.position_ids=Dz([r,r,r],0)}}return t}},b$=class extends y${image_grid_thw_name=`image_grid_thw`},x$=class extends ${},S$=class extends x${},C$=class extends x${},w$=class extends ${},T$=class extends w${},E$=class extends w${},D$=class extends ${},O$=class extends D${},k$=class extends D${},A$=class extends b${},j$=class extends A${},M$=class extends A${},N$=class extends M${},P$=class extends ${},F$=class extends P${},I$=class extends P${async _call(e){return new CW(await super._call(e))}},L$=class extends ${},R$=class extends L${},z$=class extends L${async _call(e){return new B$(await super._call(e))}},B$=class extends aq{},V$=class extends ${},H$=class extends V${},U$=class extends V${async _call(e){return new TW(await super._call(e))}},W$=class extends V${async _call(e){return new CW(await super._call(e))}},G$=class extends V${async _call(e){return new wW(await super._call(e))}},K$=class extends V${async _call(e){return new EW(await super._call(e))}},q$=class extends ${},J$=class extends q${},Y$=class extends q${async _call(e){return new TW(await super._call(e))}},X$=class extends q${async _call(e){return new CW(await super._call(e))}},Z$=class extends q${async _call(e){return new wW(await super._call(e))}},Q$=class extends q${async _call(e){return new EW(await super._call(e))}},$$=class extends ${},e1=class extends $${},t1=class extends $${async _call(e){return new n1(await super._call(e))}},n1=class extends aq{},r1=class extends SW{constructor({iou_scores:e,pred_masks:t}){super(),this.iou_scores=e,this.pred_masks=t}},i1=class extends ${},a1=class extends i1{async get_image_embeddings({pixel_values:e}){return await lG(this,{pixel_values:e})}async forward(e){e=!e.image_embeddings||!e.image_positional_embeddings?{...e,...await this.get_image_embeddings(e)}:{...e},e.input_labels??=Fz(e.input_points.dims.slice(0,-1));let t={image_embeddings:e.image_embeddings,image_positional_embeddings:e.image_positional_embeddings};return e.input_points&&(t.input_points=e.input_points),e.input_labels&&(t.input_labels=e.input_labels),e.input_boxes&&(t.input_boxes=e.input_boxes),await bW(this.sessions.prompt_encoder_mask_decoder,t)}async _call(e){return new r1(await super._call(e))}},o1=class extends SW{constructor({iou_scores:e,pred_masks:t,object_score_logits:n}){super(),this.iou_scores=e,this.pred_masks=t,this.object_score_logits=n}},s1=class extends ${},c1=class extends s1{async get_image_embeddings({pixel_values:e}){return await lG(this,{pixel_values:e})}async forward(e){let{num_feature_levels:t}=this.config.vision_config;if(e=Array.from({length:t},(e,t)=>`image_embeddings.${t}`).some(t=>!e[t])?{...e,...await this.get_image_embeddings(e)}:{...e},e.input_points){if(e.input_boxes&&e.input_boxes.dims[1]!==1)throw Error("When both `input_points` and `input_boxes` are provided, the number of boxes per image must be 1.");let t=e.input_points.dims;e.input_labels??=Fz(t.slice(0,-1)),e.input_boxes??=Nz([t[0],0,4],0)}else if(e.input_boxes){let t=e.input_boxes.dims;e.input_labels=Nz([t[0],t[1],0],-1n),e.input_points=Nz([t[0],1,0,2],0)}else throw Error("At least one of `input_points` or `input_boxes` must be provided.");let n=this.sessions.prompt_encoder_mask_decoder;return await bW(n,CP(e,n.inputNames))}async _call(e){return new o1(await super._call(e))}},l1=class extends c1{},u1=class extends c1{},d1=class extends ${},f1=class extends d1{},p1=class extends d1{},m1=class extends d1{},h1=class extends ${},g1=class extends h1{},_1=class extends h1{},v1=class extends h1{},y1=class extends ${},b1=class extends y1{},x1=class extends y1{static async from_pretrained(e,t={}){return super.from_pretrained(e,{...t,model_file_name:t.model_file_name??`text_model`})}},S1=class extends EK{static async from_pretrained(e,t={}){return super.from_pretrained(e,{...t,model_file_name:t.model_file_name??`vision_model`})}},C1=class extends ${},w1=class extends C1{},T1=class extends C1{},E1=class extends ${main_input_name=`input_values`;forward_params=[`input_values`]},D1=class extends E1{async encode(e){return await bW(this.sessions.encoder_model,e)}async decode(e){return await bW(this.sessions.decoder_model,e)}},O1=class extends E1{static async from_pretrained(e,t={}){return super.from_pretrained(e,{...t,model_file_name:t.model_file_name??`encoder_model`})}},k1=class extends E1{static async from_pretrained(e,t={}){return super.from_pretrained(e,{...t,model_file_name:t.model_file_name??`decoder_model`})}},A1=class extends ${},j1=class extends A1{},M1=class extends A1{},N1=class extends A1{async generate_speech(e,t,{threshold:n=.5,minlenratio:r=0,maxlenratio:i=20,vocoder:a=null}={}){let{encoder_outputs:o,encoder_attention_mask:s}=await lG(this,{input_ids:e}),c=o.dims[1]/this.config.reduction_factor,l=Math.floor(c*i),u=Math.floor(c*r),d=this.config.num_mel_bins,f=[],p=null,m=null,h=0;for(;;){++h;let e=rG(!!m),r;r=m?m.output_sequence_out:new pz(`float32`,new Float32Array(d),[1,1,d]);let i={use_cache_branch:e,output_sequence:r,encoder_attention_mask:s,speaker_embeddings:t,encoder_hidden_states:o};this.addPastKeyValues(i,p),m=await bW(this.sessions.decoder_model_merged,i),p=this.getPastKeyValues(m,p);let{prob:a,spectrum:c}=m;if(f.push(c),h>=u&&(Array.from(a.data).filter(e=>e>=n).length>0||h>=l))break}let g=Ez(f),{waveform:_}=await bW(a.sessions.model,{spectrogram:g});return{spectrogram:g,waveform:_}}},P1=class extends ${main_input_name=`spectrogram`},F1=class extends ${},I1=class extends F1{},L1=class extends F1{async _call(e){return new TW(await super._call(e))}},R1=class extends F1{async _call(e){return new CW(await super._call(e))}},z1=class extends F1{async _call(e){return new EW(await super._call(e))}},B1=class extends ${},V1=class extends B1{},H1=class extends B1{},U1=class extends ${},W1=class extends U1{},G1=class extends U1{},K1=class extends ${},q1=class extends K1{},J1=class extends ${},Y1=class extends J1{async generate_speech({input_ids:e,attention_mask:t,style:n,num_inference_steps:r=5,speed:i=1.05}){let{sampling_rate:a,chunk_compress_factor:o,base_chunk_size:s,latent_dim:c}=this.config,{last_hidden_state:l,durations:u}=await bW(this.sessions.text_encoder,{input_ids:e,attention_mask:t,style:n}),d=u.div(i).mul_(a),f=s*o,p=d.data,m=Int32Array.from(p,e=>Math.ceil(e/f)),h=Math.max(...m),g=e.dims[0],_=new BigInt64Array(g*h);for(let e=0;e`;t.push(e.lang_to_id[i]),t.push(e.task_to_id[r??`transcribe`])}else if(n||r)throw Error("Cannot specify `task` or `language` for an English-only model. If the model is intended to be multilingual, pass `is_multilingual=true` to generate, or update the generation config.");return!e.return_timestamps&&e.no_timestamps_token_id&&t.at(-1)!==e.no_timestamps_token_id?t.push(e.no_timestamps_token_id):e.return_timestamps&&t.at(-1)===e.no_timestamps_token_id&&(TP.warn("<|notimestamps|> prompt token is removed from generation_config since `return_timestamps` is set to `true`."),t.pop()),t.filter(e=>e!=null)}async generate({inputs:e=null,generation_config:t=null,logits_processor:n=null,stopping_criteria:r=null,...i}){t=this._prepare_generation_config(t,i);let a=i.decoder_input_ids??this._retrieve_init_tokens(t);if(t.return_timestamps&&(n??=new jW,n.push(new FW(t,a))),t.begin_suppress_tokens&&(n??=new jW,n.push(new PW(t.begin_suppress_tokens,a.length))),t.return_token_timestamps){if(!t.alignment_heads)throw Error("Model generation config has no `alignment_heads`, token-level timestamps not available. See https://gist.github.com/hollance/42e32852f24243b748ae6bc1f985b13a on how to add this property to the generation config.");t.task===`translate`&&TP.warn(`Token-level timestamps may not be reliable for task 'translate'.`),t.output_attentions=!0,t.return_dict_in_generate=!0}let o=await super.generate({inputs:e,generation_config:t,logits_processor:n,decoder_input_ids:a,...i});return t.return_token_timestamps&&(o.token_timestamps=this._extract_token_timestamps(o,t.alignment_heads,t.num_frames)),o}_extract_token_timestamps(e,t,n=null,r=.02){if(!e.cross_attentions)throw Error("Model outputs must contain cross attentions to extract timestamps. This is most likely because the model was not exported with `output_attentions=True`.");n??TP.warn("`num_frames` has not been set, meaning the entire audio will be analyzed. This may lead to inaccurate token-level timestamps for short audios (< 30 seconds).");let i=this.config.median_filter_width;i===void 0&&(TP.warn("Model config has no `median_filter_width`, using default value of 7."),i=7);let a=e.cross_attentions,o=Array.from({length:this.config.decoder_layers},(e,t)=>Ez(a.map(e=>e[t]),2)),s=Dz(t.map(([e,t])=>{if(e>=o.length)throw Error(`Layer index ${e} is out of bounds for cross attentions (length ${o.length}).`);return n?o[e].slice(null,t,null,[0,n]):o[e].slice(null,t)})).transpose(1,0,2,3),[c,l]=kz(s,-2,0,!0),u=s.clone();for(let e=0;et[n+1]-t[n])).map(e=>!!e),a=[];for(let e=0;ee[0]);static BASE_IF_FAIL=!0},h4=class extends p4{static MODEL_CLASS_MAPPINGS=[f4.MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING_NAMES]},g4=class extends p4{static MODEL_CLASS_MAPPINGS=[f4.MODEL_FOR_TOKEN_CLASSIFICATION_MAPPING_NAMES]},_4=class extends p4{static MODEL_CLASS_MAPPINGS=[f4.MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPING_NAMES]},v4=class extends p4{static MODEL_CLASS_MAPPINGS=[f4.MODEL_FOR_SPEECH_SEQ_2_SEQ_MAPPING_NAMES]},y4=class extends p4{static MODEL_CLASS_MAPPINGS=[f4.MODEL_FOR_TEXT_TO_SPECTROGRAM_MAPPING_NAMES]},b4=class extends p4{static MODEL_CLASS_MAPPINGS=[f4.MODEL_FOR_TEXT_TO_WAVEFORM_MAPPING_NAMES]},x4=class extends p4{static MODEL_CLASS_MAPPINGS=[f4.MODEL_FOR_CAUSAL_LM_MAPPING_NAMES]},S4=class extends p4{static MODEL_CLASS_MAPPINGS=[f4.MODEL_FOR_MASKED_LM_MAPPING_NAMES]},C4=class extends p4{static MODEL_CLASS_MAPPINGS=[f4.MODEL_FOR_QUESTION_ANSWERING_MAPPING_NAMES]},w4=class extends p4{static MODEL_CLASS_MAPPINGS=[f4.MODEL_FOR_VISION_2_SEQ_MAPPING_NAMES]},T4=class extends p4{static MODEL_CLASS_MAPPINGS=[f4.MODEL_FOR_IMAGE_CLASSIFICATION_MAPPING_NAMES]},E4=class extends p4{static MODEL_CLASS_MAPPINGS=[f4.MODEL_FOR_IMAGE_SEGMENTATION_MAPPING_NAMES]},D4=class extends p4{static MODEL_CLASS_MAPPINGS=[f4.MODEL_FOR_SEMANTIC_SEGMENTATION_MAPPING_NAMES]},O4=class extends p4{static MODEL_CLASS_MAPPINGS=[f4.MODEL_FOR_UNIVERSAL_SEGMENTATION_MAPPING_NAMES]},k4=class extends p4{static MODEL_CLASS_MAPPINGS=[f4.MODEL_FOR_OBJECT_DETECTION_MAPPING_NAMES]},A4=class extends p4{static MODEL_CLASS_MAPPINGS=[f4.MODEL_FOR_ZERO_SHOT_OBJECT_DETECTION_MAPPING_NAMES]};(class extends p4{static MODEL_CLASS_MAPPINGS=[f4.MODEL_FOR_MASK_GENERATION_MAPPING_NAMES]});var j4=class extends p4{static MODEL_CLASS_MAPPINGS=[f4.MODEL_FOR_CTC_MAPPING_NAMES]},M4=class extends p4{static MODEL_CLASS_MAPPINGS=[f4.MODEL_FOR_AUDIO_CLASSIFICATION_MAPPING_NAMES]};(class extends p4{static MODEL_CLASS_MAPPINGS=[f4.MODEL_FOR_AUDIO_XVECTOR_MAPPING_NAMES]}),class extends p4{static MODEL_CLASS_MAPPINGS=[f4.MODEL_FOR_AUDIO_FRAME_CLASSIFICATION_MAPPING_NAMES]};var N4=class extends p4{static MODEL_CLASS_MAPPINGS=[f4.MODEL_FOR_DOCUMENT_QUESTION_ANSWERING_MAPPING_NAMES]};(class extends p4{static MODEL_CLASS_MAPPINGS=[f4.MODEL_FOR_IMAGE_MATTING_MAPPING_NAMES]});var P4=class extends p4{static MODEL_CLASS_MAPPINGS=[f4.MODEL_FOR_IMAGE_TO_IMAGE_MAPPING_NAMES]},F4=class extends p4{static MODEL_CLASS_MAPPINGS=[f4.MODEL_FOR_DEPTH_ESTIMATION_MAPPING_NAMES]};(class extends p4{static MODEL_CLASS_MAPPINGS=[f4.MODEL_FOR_NORMAL_ESTIMATION_MAPPING_NAMES]}),class extends p4{static MODEL_CLASS_MAPPINGS=[f4.MODEL_FOR_POSE_ESTIMATION_MAPPING_NAMES]};var I4=class extends p4{static MODEL_CLASS_MAPPINGS=[f4.MODEL_FOR_IMAGE_FEATURE_EXTRACTION_MAPPING_NAMES]};(class extends p4{static MODEL_CLASS_MAPPINGS=[f4.MODEL_FOR_IMAGE_TEXT_TO_TEXT_MAPPING_NAMES]}),class extends p4{static MODEL_CLASS_MAPPINGS=[f4.MODEL_FOR_AUDIO_TEXT_TO_TEXT_MAPPING_NAMES]};async function L4(e){return Array.isArray(e)||(e=[e]),await Promise.all(e.map(e=>ZV.read(e)))}async function R4(e,t){return Array.isArray(e)||(e=[e]),await Promise.all(e.map(e=>typeof e==`string`||e instanceof URL?sV(e,t):e instanceof Float64Array?new Float32Array(e):e))}function z4(e,t){t&&(e=e.map(e=>e|0));let[n,r,i,a]=e;return{xmin:n,ymin:r,xmax:i,ymax:a}}var B4=class extends RL{constructor({task:e,model:t,tokenizer:n=null,processor:r=null}){super(),this.task=e,this.model=t,this.tokenizer=n,this.processor=r}async dispose(){await this.model.dispose()}},V4=class extends B4{async _call(e,{top_k:t=1}={}){let n=this.tokenizer(e,{padding:!0,truncation:!0}),r=await this.model(n),{problem_type:i,id2label:a}=this.model.config,o=i===`multi_label_classification`?e=>e.sigmoid():e=>new pz(`float32`,yR(e.data),e.dims),s=[];for(let e of r.logits){let n=await yz(o(e),t),r=n[0].tolist(),i=n[1].tolist().map((e,t)=>({label:a?a[e]:`LABEL_${e}`,score:r[t]}));t===1?s.push(...i):s.push(i)}return Array.isArray(e)||t===1?s:s[0]}},H4=class extends B4{async _call(e,{ignore_labels:t=[`O`]}={}){let n=Array.isArray(e),r=this.tokenizer(n?e:[e],{padding:!0,truncation:!0}),i=(await this.model(r)).logits,a=this.model.config.id2label,o=[];for(let e=0;ee==u),i=a[e].tolist(),f=o[e].tolist();for(let n=1;ne==t[n])!==-1)&&(i[n]=-1/0,f[n]=-1/0);let p=yR(i).map((e,t)=>[e,t]),m=yR(f).map((e,t)=>[e,t]);p[0][0]=0,m[0][0]=0;let h=xP(p,m).filter(e=>e[0][1]<=e[1][1]).map(e=>[e[0][1],e[1][1],e[0][0]*e[1][0]]).sort((e,t)=>t[2]-e[2]),g=[];for(let e=0;ee==n);if(c===-1)throw Error(`Mask token (${r}) not found in text.`);let l=a[e][c],u=await yz(new pz(`float32`,yR(l.data),l.dims),t),d=u[0].tolist(),f=u[1].tolist();o.push(f.map((e,t)=>{let n=i.slice();return n[c]=e,{score:d[t],token:Number(e),token_str:this.tokenizer.decode([e]),sequence:this.tokenizer.decode(n,{skip_special_tokens:!0})}}))}return Array.isArray(e)?o:o[0]}},G4=class extends B4{_key=`generated_text`;async _call(e,t={}){Array.isArray(e)||(e=[e]),this.model.config.prefix&&(e=e.map(e=>this.model.config.prefix+e));let n=this.model.config.task_specific_params;n&&n[this.task]&&n[this.task].prefix&&(e=e.map(e=>n[this.task].prefix+e));let r=this.tokenizer,i={padding:!0,truncation:!0},a;a=this.task===`translation`&&`_build_translation_inputs`in r?r._build_translation_inputs(e,i,t):r(e,i);let o=await this.model.generate({...a,...t});return r.batch_decode(o,{skip_special_tokens:!0}).map(e=>({[this._key]:e}))}},K4=class extends G4{_key=`summary_text`},q4=class extends G4{_key=`translation_text`};function J4(e){return Array.isArray(e)&&e.every(e=>`role`in e&&`content`in e)}var Y4=class extends B4{async _call(e,t={}){let n=!1,r=!1,i=t.add_special_tokens??(this.tokenizer.add_bos_token||this.tokenizer.add_eos_token)??!1,a=t.tokenizer_encode_kwargs,o;if(typeof e==`string`)o=e=[e];else if(Array.isArray(e)&&e.every(e=>typeof e==`string`))n=!0,o=e;else{if(J4(e))e=[e];else if(Array.isArray(e)&&e.every(J4))n=!0;else throw Error(`Input must be a string, an array of strings, a Chat, or an array of Chats`);r=!0,o=e.map(e=>this.tokenizer.apply_chat_template(e,{tokenize:!1,add_generation_prompt:!0,...a})),i=!1,a=void 0}let s=r?!1:t.return_full_text??!0;this.tokenizer.padding_side=`left`;let c=this.tokenizer(o,{add_special_tokens:i,padding:!0,truncation:!0,...a}),l=await this.model.generate({...c,...t}),u=this.tokenizer.batch_decode(l,{skip_special_tokens:!0}),d;!s&&c.input_ids.dims.at(-1)>0&&(d=this.tokenizer.batch_decode(c.input_ids,{skip_special_tokens:!0}).map(e=>e.length));let f=Array.from({length:e.length},e=>[]);for(let t=0;t[e.toLowerCase(),t])),this.entailment_id=this.label2id.entailment,this.entailment_id===void 0&&(TP.warn(`Could not find 'entailment' in label2id mapping. Using 2 as entailment_id.`),this.entailment_id=2),this.contradiction_id=this.label2id.contradiction??this.label2id.not_entailment,this.contradiction_id===void 0&&(TP.warn(`Could not find 'contradiction' in label2id mapping. Using 0 as contradiction_id.`),this.contradiction_id=0)}async _call(e,t,{hypothesis_template:n=`This example is {}.`,multi_label:r=!1}={}){let i=Array.isArray(e);i||(e=[e]),Array.isArray(t)||(t=[t]);let a=t.map(e=>n.replace(`{}`,e)),o=r||t.length===1,s=[];for(let n of e){let e=[];for(let t of a){let r=this.tokenizer(n,{text_pair:t,padding:!0,truncation:!0}),i=await this.model(r);o?e.push([i.logits.data[this.contradiction_id],i.logits.data[this.entailment_id]]):e.push(i.logits.data[this.entailment_id])}let r=(o?e.map(e=>yR(e)[1]):yR(e)).map((e,t)=>[e,t]).sort((e,t)=>t[0]-e[0]);s.push({sequence:n,labels:r.map(e=>t[e[1]]),scores:r.map(e=>e[0])})}return i?s:s[0]}},Z4=class extends B4{async _call(e,{top_k:t=5}={}){let n=this.processor.feature_extractor.config.sampling_rate,r=await R4(e,n),i=this.model.config.id2label,a=[];for(let e of r){let n=await this.processor(e),r=(await this.model(n)).logits[0],o=await yz(new pz(`float32`,yR(r.data),r.dims),t),s=o[0].tolist(),c=o[1].tolist().map((e,t)=>({label:i?i[e]:`LABEL_${e}`,score:s[t]}));a.push(c)}return Array.isArray(e)?a:a[0]}},Q4=class extends B4{async _call(e,t,{hypothesis_template:n=`This is a sound of {}.`}={}){let r=!Array.isArray(e);r&&(e=[e]);let i=t.map(e=>n.replace(`{}`,e)),a=this.tokenizer(i,{padding:!0,truncation:!0}),o=this.processor.feature_extractor.config.sampling_rate,s=await R4(e,o),c=[];for(let e of s){let n=await this.processor(e),r=yR((await this.model({...a,...n})).logits_per_audio.data);c.push([...r].map((e,n)=>({score:e,label:t[n]})))}return r?c[0]:c}},$4=class extends B4{async _call(e,t={}){switch(this.model.config.model_type){case`whisper`:case`lite-whisper`:return this._call_whisper(e,t);case`wav2vec2`:case`wav2vec2-bert`:case`unispeech`:case`unispeech-sat`:case`hubert`:case`parakeet_ctc`:return this._call_wav2vec2(e,t);case`moonshine`:return this._call_moonshine(e,t);default:throw Error(`AutomaticSpeechRecognitionPipeline does not support model type '${this.model.config.model_type}'.`)}}async _call_wav2vec2(e,t){t.language&&TP.warn('`language` parameter is not yet supported for `wav2vec2` models, defaulting to "English".'),t.task&&TP.warn('`task` parameter is not yet supported for `wav2vec2` models, defaulting to "transcribe".');let n=!Array.isArray(e),r=n?[e]:e,i=this.processor.feature_extractor.config.sampling_rate,a=await R4(r,i),o=[];for(let e of a){let t=await this.processor(e),n=(await this.model(t)).logits[0],r=[];for(let e of n)r.push(SR(e.data)[1]);let i=this.tokenizer.decode(r,{skip_special_tokens:!0}).trim();o.push({text:i})}return n?o[0]:o}async _call_whisper(e,t){let n=t.return_timestamps??!1,r=t.chunk_length_s??0,i=t.force_full_sequences??!1,a=t.stride_length_s??null,o={...t};n===`word`&&(o.return_token_timestamps=!0,o.return_timestamps=!1);let s=!Array.isArray(e),c=s?[e]:e,l=this.processor.feature_extractor.config,u=l.chunk_length/this.model.config.max_source_positions,d=l.hop_length,f=l.sampling_rate,p=await R4(c,f),m=[];for(let e of p){let t=[];if(r>0){if(a===null)a=r/6;else if(r<=a)throw Error("`chunk_length_s` must be larger than `stride_length_s`.");let n=f*r,i=f*a,o=n-2*i,s=0;for(;;){let r=s+n,a=e.subarray(s,r),c=await this.processor(a),l=s===0,u=r>=e.length;if(t.push({stride:[a.length,l?0:i,u?0:i],input_features:c.input_features,is_last:u}),u)break;s+=o}}else t=[{stride:[e.length,0,0],input_features:(await this.processor(e)).input_features,is_last:!0}];for(let e of t){o.num_frames=Math.floor(e.stride[0]/d);let t=await this.model.generate({inputs:e.input_features,...o});n===`word`?(e.tokens=t.sequences.tolist()[0],e.token_timestamps=t.token_timestamps.tolist()[0].map(e=>OR(e,2))):e.tokens=t[0].tolist(),e.stride=e.stride.map(e=>e/f)}let[s,c]=this.tokenizer._decode_asr(t,{time_precision:u,return_timestamps:n,force_full_sequences:i});m.push({text:s,...c})}return s?m[0]:m}async _call_moonshine(e,t){let n=!Array.isArray(e),r=n?[e]:e,i=this.processor.feature_extractor.config.sampling_rate,a=await R4(r,i),o=[];for(let e of a){let n=await this.processor(e),r=Math.floor(e.length/i)*6,a=await this.model.generate({max_new_tokens:r,...t,...n}),s=this.processor.batch_decode(a,{skip_special_tokens:!0})[0];o.push({text:s})}return n?o[0]:o}},e3=class extends B4{DEFAULT_VOCODER_ID=`Xenova/speecht5_hifigan`;constructor(e){super(e),this.vocoder=e.vocoder??null}async _prepare_speaker_embeddings(e,t){if((typeof e==`string`||e instanceof URL)&&(e=new Float32Array(await(await mP.fetch(e)).arrayBuffer())),e instanceof Float32Array)e=new pz(`float32`,e,[e.length]);else if(!(e instanceof pz))throw Error("Speaker embeddings must be a `Tensor`, `Float32Array`, `string`, or `URL`.");if(t>1){if(e.dims[0]===1)e=e.repeat(t,1);else if(e.dims[0]!==t)throw Error(`Expected speaker embeddings batch size to be 1 or ${t}, but got ${e.dims[0]}.`)}return e}_postprocess_waveform(e,t,n,r=null){let i=t.data,[a,o]=t.dims,s=r?r.data:null,c=[];for(let e=0;e({generated_text:e.trim()}));a.push(r)}return n?a:a[0]}},n3=class extends B4{async _call(e,{top_k:t=5}={}){let n=await L4(e),{pixel_values:r}=await this.processor(n),i=await this.model({pixel_values:r}),{id2label:a}=this.model.config,o=[];for(let e of i.logits){let n=await yz(new pz(`float32`,yR(e.data),e.dims),t),r=n[0].tolist(),i=n[1].tolist().map((e,t)=>({label:a?a[e]:`LABEL_${e}`,score:r[t]}));o.push(i)}return Array.isArray(e)?o:o[0]}},r3={panoptic:`post_process_panoptic_segmentation`,instance:`post_process_instance_segmentation`,semantic:`post_process_semantic_segmentation`},i3=class extends B4{async _call(e,{threshold:t=.5,mask_threshold:n=.5,overlap_mask_area_threshold:r=.8,label_ids_to_fuse:i=null,target_sizes:a=null,subtask:o=null}={}){if(Array.isArray(e)&&e.length!==1)throw Error(`Image segmentation pipeline currently only supports a batch size of 1.`);let s=await L4(e),c=s.map(e=>[e.height,e.width]),l=await this.processor(s),{inputNames:u,outputNames:d}=this.model.sessions.model;if(!u.includes(`pixel_values`)){if(u.length!==1)throw Error(`Expected a single input name, but got ${u.length} inputs: ${u}.`);let e=u[0];if(e in l)throw Error(`Input name ${e} already exists in the inputs.`);l[e]=l.pixel_values}let f=await this.model(l),p=null;if(o!==null)p=r3[o];else if(this.processor.image_processor){for(let[e,t]of Object.entries(r3))if(t in this.processor.image_processor){p=this.processor.image_processor[t].bind(this.processor.image_processor),o=e;break}}let m=this.model.config.id2label,h=[];if(!o){let e=1e-5,t=f[d[0]];for(let n=0;nt<-e||t>1+e)&&i.sigmoid_();let a=await ZV.fromTensor(i.mul_(255).to(`uint8`)).resize(r[1],r[0]);h.push({label:null,score:null,mask:a})}}else if(o===`panoptic`||o===`instance`){let e=p(f,t,n,r,i,a??c)[0],o=e.segmentation;for(let t of e.segments_info){let e=new Uint8ClampedArray(o.data.length);for(let n=0;n{let n=e.clone();return n.putAlpha(r[t].mask),n});return Array.isArray(e)?i:i[0]}},o3=class extends B4{async _call(e,t,{hypothesis_template:n=`This is a photo of {}`}={}){let r=Array.isArray(e),i=await L4(e),a=t.map(e=>n.replace(`{}`,e)),o=this.tokenizer(a,{padding:this.model.config.model_type===`siglip`?`max_length`:!0,truncation:!0}),{pixel_values:s}=await this.processor(i),c=await this.model({...o,pixel_values:s}),l=this.model.config.model_type===`siglip`?e=>e.sigmoid().data:e=>yR(e.data),u=[];for(let e of c.logits_per_image){let n=[...l(e)].map((e,n)=>({score:e,label:t[n]}));n.sort((e,t)=>t.score-e.score),u.push(n)}return r?u:u[0]}},s3=class extends B4{async _call(e,{threshold:t=.9,percentage:n=!1}={}){let r=Array.isArray(e);if(r&&e.length!==1)throw Error(`Object detection pipeline currently only supports a batch size of 1.`);let i=await L4(e),a=n?null:i.map(e=>[e.height,e.width]),{pixel_values:o,pixel_mask:s}=await this.processor(i),c=await this.model({pixel_values:o,pixel_mask:s}),l=this.processor.image_processor.post_process_object_detection(c,t,a),{id2label:u}=this.model.config,d=l.map(e=>e.boxes.map((t,r)=>({score:e.scores[r],label:u[e.classes[r]],box:z4(t,!n)})));return r?d:d[0]}},c3=class extends B4{async _call(e,t,{threshold:n=.1,top_k:r=null,percentage:i=!1}={}){let a=Array.isArray(e),o=await L4(e),s=this.tokenizer(t,{padding:!0,truncation:!0}),c=await this.processor(o),l=[];for(let e=0;e({score:e.scores[n],label:e.labels[n],box:z4(t,!i)}))}else{let e=this.processor.image_processor.post_process_object_detection(f,n,u,!0)[0];p=e.boxes.map((n,r)=>({score:e.scores[r],label:t[e.classes[r]],box:z4(n,!i)}))}p.sort((e,t)=>t.score-e.score),r!==null&&(p=p.slice(0,r)),l.push(p)}return a?l:l[0]}},l3=class extends B4{async _call(e,t,n={}){if(Array.isArray(e)){if(e.length!==1)throw Error(`Document Question Answering pipeline currently only supports a batch size of 1.`);e=e[0]}let r=(await L4(e))[0],{pixel_values:i}=await this.processor(r),a=`${t}`,o=this.tokenizer(a,{add_special_tokens:!1,padding:!0,truncation:!0}).input_ids,s=await this.model.generate({inputs:i,max_length:this.model.config.decoder.max_position_embeddings,decoder_input_ids:o,...n}),c=this.tokenizer.batch_decode(s)[0].match(/(.*?)<\/s_answer>/),l=null;return c&&c.length>=2&&(l=c[1].trim()),[{answer:l}]}},u3=class extends B4{async _call(e){let t=await L4(e),n=await this.processor(t),r=await this.model(n),i=[];for(let e of r.reconstruction){let t=e.squeeze().clamp_(0,1).mul_(255).round_().to(`uint8`);i.push(ZV.fromTensor(t))}return Array.isArray(e)?i:i[0]}},d3=class extends B4{async _call(e){let t=await L4(e),n=await this.processor(t),{predicted_depth:r}=await this.model(n),i=[];for(let e=0;e0?f.join(`, `):`(none)`;TP.warn(`[get_model_files] Architecture(s) not found in MODEL_TYPE_MAPPING: [${e}] for model type '${t.model_type}'. Falling back to EncoderOnly (single model.onnx file). If you encounter issues, please report at: ${YB}`),d=Q.EncoderOnly}let m=(e,t=null)=>{t??=e;let n=uz[dz(u,e,az(l,e))]??``,r=`${t}${n}.onnx`,i=`${c}/${r}`;a.push(i);let o=pW(s,r,e);for(let e of mW(r,o)){let t=`${c}/${e}`;a.push(t)}},h=i??`model`;return d===Q.DecoderOnly?(m(`model`,h),a.push(`generation_config.json`)):d===Q.DecoderOnlyWithoutHead?m(`model`,h):d===Q.Seq2Seq||d===Q.Vision2Seq?(m(`model`,`encoder_model`),m(`decoder_model_merged`),a.push(`generation_config.json`)):d===Q.MaskGeneration?(m(`model`,`vision_encoder`),m(`prompt_encoder_mask_decoder`)):d===Q.EncoderDecoder?(m(`model`,`encoder_model`),m(`decoder_model_merged`)):d===Q.ImageTextToText?(m(`embed_tokens`),m(`vision_encoder`),m(`decoder_model_merged`),t.is_encoder_decoder&&m(`model`,`encoder_model`),a.push(`generation_config.json`)):d===Q.AudioTextToText?(m(`embed_tokens`),m(`audio_encoder`),m(`decoder_model_merged`),a.push(`generation_config.json`)):d===Q.ImageAudioTextToText?(m(`embed_tokens`),m(`audio_encoder`),m(`vision_encoder`),m(`decoder_model_merged`),a.push(`generation_config.json`)):d===Q.Musicgen?(m(`model`,`text_encoder`),m(`decoder_model_merged`),m(`encodec_decode`),a.push(`generation_config.json`)):d===Q.MultiModality?(m(`prepare_inputs_embeds`),m(`model`,`language_model`),m(`lm_head`),m(`gen_head`),m(`gen_img_embeds`),m(`image_decode`),a.push(`generation_config.json`)):d===Q.Phi3V?(m(`prepare_inputs_embeds`),m(`model`),m(`vision_encoder`),a.push(`generation_config.json`)):d===Q.Chatterbox?(m(`embed_tokens`),m(`speech_encoder`),m(`model`,`language_model`),m(`conditional_decoder`),a.push(`generation_config.json`)):d===Q.AutoEncoder?(m(`encoder_model`),m(`decoder_model`)):d===Q.Supertonic?(m(`text_encoder`),m(`latent_denoiser`),m(`voice_decoder`)):m(`model`,h),a}async function _3(e){if(!e)throw Error(`modelId is required`);return(await sR(e,ZB,{})).exists?[ZB]:[]}async function v3(e,{config:t=null,dtype:n=null,device:r=null,model_file_name:i=null,include_tokenizer:a=!0,include_processor:o=!0}={}){let s=await g3(e,{config:t,dtype:n,device:r,model_file_name:i});if(a){let t=await Vz(e);s.push(...t)}if(o){let t=await _3(e);s.push(...t)}return s}async function y3(e,t,n={}){e=h3[e]??e;let r=m3[e];if(!r)throw Error(`Unsupported pipeline task: ${e}. Must be one of [${Object.keys(m3).join(`, `)}]`);let{type:i}=r,a=i!==`audio`&&i!==`image`,o=i!==`text`;return v3(t,{...n,include_tokenizer:a,include_processor:o})}async function b3(e,t=null,{progress_callback:n=null,config:r=null,cache_dir:i=null,local_files_only:a=!1,revision:o=`main`,device:s=null,dtype:c=null,subfolder:l=`onnx`,use_external_data_format:u=null,model_file_name:d=null,session_options:f={}}={}){e=h3[e]??e;let p=m3[e.split(`_`,1)[0]];if(!p)throw Error(`Unsupported pipeline: ${e}. Must be one of [${Object.keys(m3)}]`);t||(t=p.default.model,TP.info(`No model specified. Using default model: "${t}".`),!c&&p.default.dtype&&(c=p.default.dtype));let m=await y3(e,t,{device:s,dtype:c}),h={};n&&(await Promise.all(m.map(async e=>sR(t,e)))).forEach((e,t)=>{e.exists&&(h[m[t]]={loaded:0,total:e.size??0})});let g={progress_callback:n?(e=>{if(e.status===`progress`){h[e.file]={loaded:e.loaded,total:e.total};let t=Object.values(h).reduce((e,t)=>e+t.loaded,0),r=Object.values(h).reduce((e,t)=>e+t.total,0),i=r>0?t/r*100:0;n({status:`progress_total`,name:e.name,progress:i,loaded:t,total:r,files:structuredClone(h)})}n(e)}):void 0,config:r,cache_dir:i,local_files_only:a,revision:o,device:s,dtype:c,subfolder:l,use_external_data_format:u,model_file_name:d,session_options:f},_=m.includes(`tokenizer.json`),v=m.includes(`preprocessor_config.json`),y=p.model,b;if(Array.isArray(y)){let n=r??await fW.from_pretrained(t,g),{model_type:i}=n,a=y.find(e=>e.supports(i));if(!a)throw Error(`Unsupported model type "${i}" for task "${e}". None of the candidate model classes support this type.`);b=a.from_pretrained(t,{...g,config:n})}else b=y.from_pretrained(t,g);let[x,ee,S]=await Promise.all([_?JB.from_pretrained(t,g):null,v?oW.from_pretrained(t,g):null,b]),C={task:e,model:S};x&&(C.tokenizer=x),ee&&(C.processor=ee),gP(n,{status:`ready`,task:e,model:t});let w=p.pipeline;return new w(C)}var x3=e=>e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=63744&&e<=64255||e>=194560&&e<=195103,S3=class{put(e){throw Error(`Not implemented`)}end(){throw Error(`Not implemented`)}},C3=aP.IS_PROCESS_AVAILABLE?e=>process.stdout.write(e):e=>console.log(e),w3=class extends S3{constructor(e,{skip_prompt:t=!1,callback_function:n=null,token_callback_function:r=null,skip_special_tokens:i=!0,decode_kwargs:a={},...o}={}){super(),this.tokenizer=e,this.skip_prompt=t,this.callback_function=n??C3,this.token_callback_function=r,this.decode_kwargs={skip_special_tokens:i,...a,...o},this.token_cache=[],this.print_len=0,this.next_tokens_are_prompt=!0,this.special_ids=new Set(this.tokenizer.all_special_ids.map(BigInt))}put(e){if(e.length>1)throw Error(`TextStreamer only supports batch size of 1`);let t=this.next_tokens_are_prompt;if(t&&(this.next_tokens_are_prompt=!1,this.skip_prompt))return;let n=e[0];if(this.token_callback_function?.(n),n.length===1&&this.special_ids.has(n[0])){if(this.decode_kwargs.skip_special_tokens)return;if(this.token_cache.length>0){let e=this.tokenizer.decode(this.token_cache,this.decode_kwargs).slice(this.print_len);this.on_finalized_text(e,!1),this.token_cache=[],this.print_len=0}let e=this.tokenizer.decode(n,this.decode_kwargs);this.on_finalized_text(e,!1);return}this.token_cache=bP(this.token_cache,n);let r=this.tokenizer.decode(this.token_cache,this.decode_kwargs),i;t||r.endsWith(` +`)?(i=r.slice(this.print_len),this.token_cache=[],this.print_len=0):r.length>0&&x3(r.charCodeAt(r.length-1))?(i=r.slice(this.print_len),this.print_len+=i.length):(i=r.slice(this.print_len,r.lastIndexOf(` `)+1),this.print_len+=i.length),this.on_finalized_text(i,!1)}end(){let e;this.token_cache.length>0?(e=this.tokenizer.decode(this.token_cache,this.decode_kwargs).slice(this.print_len),this.token_cache=[],this.print_len=0):e=``,this.next_tokens_are_prompt=!0,this.on_finalized_text(e,!0)}on_finalized_text(e,t){e.length>0&&this.callback_function?.(e),t&&this.callback_function===C3&&aP.IS_PROCESS_AVAILABLE&&this.callback_function?.(` +`)}},T3=class e{reasoning=``;content=``;_startInThink;_inThink;_buf=``;static OPEN_TAG=``;static CLOSE_TAG=``;constructor(e=!0){this._startInThink=e,this._inThink=e}reset(){this.reasoning=``,this.content=``,this._inThink=this._startInThink,this._buf=``}push(t){let n=[];for(this._buf+=t;this._buf.length>0;)if(this._inThink){let t=this._buf.indexOf(e.CLOSE_TAG);if(t!==-1){let r=this._buf.slice(0,t);r&&(this.reasoning+=r,n.push({type:`reasoning`,textDelta:r})),this._buf=this._buf.slice(t+e.CLOSE_TAG.length),this._inThink=!1;continue}let r=this._safeFlushLength(this._buf,e.CLOSE_TAG);if(r>0){let e=this._buf.slice(0,r);this.reasoning+=e,n.push({type:`reasoning`,textDelta:e}),this._buf=this._buf.slice(r)}break}else{let t=this._buf.indexOf(e.OPEN_TAG);if(t!==-1){let r=this._buf.slice(0,t);r&&(this.content+=r,n.push({type:`content`,textDelta:r})),this._buf=this._buf.slice(t+e.OPEN_TAG.length),this._inThink=!0;continue}let r=this._safeFlushLength(this._buf,e.OPEN_TAG);if(r>0){let e=this._buf.slice(0,r);this.content+=e,n.push({type:`content`,textDelta:e}),this._buf=this._buf.slice(r)}break}return n}flush(){if(!this._buf)return[];let e=[];return this._inThink?(this.reasoning+=this._buf,e.push({type:`reasoning`,textDelta:this._buf})):(this.content+=this._buf,e.push({type:`content`,textDelta:this._buf})),this._buf=``,e}_safeFlushLength(e,t){for(let n=Math.min(e.length,t.length-1);n>0;n--)if(e.endsWith(t.slice(0,n)))return e.length-n;return e.length}},E3=`q4f16`;function D3(e,t){let{content:n,reasoning:r=``}=e;for(let e of t)e.type===`reasoning`?r+=e.textDelta:n+=e.textDelta;return{...e,content:n,reasoning:r}}function O3({children:e}){let t=(0,y.useRef)(null),n=(0,y.useRef)(null),r=(0,y.useRef)(new JW),[i,a]=(0,y.useState)({state:`idle`}),[o,s]=(0,y.useState)(null),[c,l]=(0,y.useState)(ge[0]),[u,d]=(0,y.useState)([]),f=(0,y.useRef)([]),[p,m]=(0,y.useState)(!1),h=(0,y.useRef)(!1),[g,_]=(0,y.useState)(0),[v,b]=(0,y.useState)(`medium`);f.current=u,h.current=p;let x=(0,y.useRef)(c);x.current=c;let ee=(0,y.useCallback)(async()=>{let e=x.current;if(t.current&&n.current!==e.id){a({state:`idle`}),s(null),n.current=null;try{await(await t.current).dispose()}catch{}t.current=null}t.current||=(async()=>{a({state:`loading`,message:`Downloading model…`});try{let t=await b3(`text-generation`,e.id,{dtype:E3,device:`webgpu`,progress_callback:e=>{e.status===`progress_total`&&a({state:`loading`,progress:e.progress,message:`Downloading model… ${Math.round(e.progress)}%`})}});return n.current=e.id,s(e.id),a({state:`ready`}),t}catch(e){throw a({state:`error`,error:e instanceof Error?e.message:String(e)}),t.current=null,e}})()},[]),S=(0,y.useCallback)(async e=>{let n=await t.current;m(!0),_(0),r.current.reset();let i=new T3(x.current.thinking),a=0,o=0,s=e.length;d(e=>[...e,{id:he(),role:`assistant`,content:``,reasoning:``}]);let c=new w3(n.tokenizer,{skip_prompt:!0,skip_special_tokens:!1,callback_function:e=>{if(e===`<|endoftext|>`)return;let t=i.push(e);t.length!==0&&d(e=>{let n=[...e];return n[s]=D3(n[s],t),n})},token_callback_function:()=>{if(a++,a===1)o=performance.now();else{let e=(performance.now()-o)/1e3;e>0&&_(Math.round((a-1)/e*10)/10)}}}),l=e.map(e=>({role:e.role,content:e.content}));try{await n(l,{streamer:c,stopping_criteria:r.current,max_new_tokens:32768,do_sample:!0,temperature:.6})}catch(e){console.error(`Generation error:`,e)}let u=i.flush();u.length>0&&d(e=>{let t=[...e];return t[s]=D3(t[s],u),t}),d(e=>{let t=[...e];return t[s]={...t[s],content:i.content.trim()||e[s].content,reasoning:i.reasoning.trim()||e[s].reasoning},t}),m(!1)},[]),C=(0,y.useCallback)(e=>{if(!t.current||h.current)return;let n={id:he(),role:`user`,content:e};d(e=>[...e,n]),S([...f.current,n])},[S]),w=(0,y.useCallback)(()=>{r.current.interrupt()},[]),T=(0,y.useCallback)(()=>{h.current||d([])},[]),te=(0,y.useCallback)((e,t)=>{if(h.current)return;d(n=>{let r=n.slice(0,e);return r.push({...n[e],content:t}),r});let n=f.current.slice(0,e);n.push({...f.current[e],content:t}),f.current[e]?.role===`user`&&setTimeout(()=>S(n),0)},[S]),ne=(0,y.useCallback)(e=>{if(h.current)return;let t=f.current.slice(0,e);d(t),setTimeout(()=>S(t),0)},[S]);return(0,k.jsx)(_e.Provider,{value:{status:i,messages:u,isGenerating:p,tps:g,reasoningEffort:v,setReasoningEffort:b,selectedModel:c,setSelectedModel:l,loadedModelId:o,loadModel:ee,send:C,stop:w,clearChat:T,editMessage:te,retryMessage:ne},children:e})}(0,v.createRoot)(document.getElementById(`root`)).render((0,k.jsx)(y.StrictMode,{children:(0,k.jsx)(O3,{children:(0,k.jsx)(zk,{})})}));export{BS as a,Zb as i,FS as n,ye as o,px as r,f as s,$b as t}; \ No newline at end of file diff --git a/dist/assets/index-CQ-2Vf4F.css b/dist/assets/index-CQ-2Vf4F.css new file mode 100644 index 0000000000000000000000000000000000000000..21fc2cbecd6e6cbcc515bcfeb1c2306b642fa9c2 --- /dev/null +++ b/dist/assets/index-CQ-2Vf4F.css @@ -0,0 +1,2 @@ +/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */ +@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-400:oklch(70.4% .191 22.216);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--container-2xl:42rem;--container-3xl:48rem;--container-5xl:64rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height:calc(1.5/1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25/1.875);--text-5xl:3rem;--text-5xl--line-height:1;--text-7xl:4.5rem;--text-7xl--line-height:1;--text-8xl:6rem;--text-8xl--line-height:1;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--blur-sm:8px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}html,body{color:#0a3235;background:#0a3235;height:100%;font-family:PP Telegraf,Inter,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-size:17px;overflow:hidden}#root{height:100%}*{scrollbar-width:thin;scrollbar-color:transparent transparent}:hover{scrollbar-color:#c8bfb3 transparent}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:0 0;border-radius:3px}:hover::-webkit-scrollbar-thumb{background:#c8bfb3}:hover::-webkit-scrollbar-thumb:hover{background:#a89e92}:root{--ai2-dark-teal:#0a3235;--ai2-off-white:#faf2e9;--ai2-teal:#105257;--ai2-pink:#f0529c;--ai2-purple:#b11be8;--ai2-green:#0fcb8c;--ai2-dark-teal-70:#0a3235b3;--ai2-dark-teal-50:#0a323580;--ai2-dark-teal-30:#0a32354d;--ai2-dark-teal-10:#0a32351a;--ai2-teal-70:#105257b3;--ai2-teal-50:#10525780;--ai2-teal-30:#1052574d;--ai2-teal-10:#1052571a;--ai2-pink-70:#f0529cb3;--ai2-pink-50:#f0529c80;--ai2-pink-30:#f0529c4d;--ai2-pink-10:#f0529c1a;--ai2-green-70:#0fcb8cb3;--ai2-green-50:#0fcb8c80;--ai2-green-30:#0fcb8c4d;--ai2-green-10:#0fcb8c1a;--ai2-purple-70:#b11be8b3;--ai2-purple-50:#b11be880;--ai2-purple-30:#b11be84d;--ai2-purple-10:#b11be81a;--background:var(--ai2-off-white);--foreground:var(--ai2-dark-teal);--card:var(--ai2-off-white);--card-foreground:var(--ai2-dark-teal);--popover:var(--ai2-off-white);--popover-foreground:var(--ai2-dark-teal);--primary:var(--ai2-dark-teal);--primary-foreground:var(--ai2-off-white);--secondary:#f0e8de;--secondary-foreground:var(--ai2-dark-teal);--muted:#f0e8de;--muted-foreground:var(--ai2-dark-teal-70);--accent:var(--ai2-teal-10);--accent-foreground:var(--ai2-dark-teal);--destructive:#dc2626;--destructive-foreground:var(--ai2-off-white);--border:var(--ai2-dark-teal-10);--input:var(--ai2-dark-teal-10);--ring:var(--ai2-teal);--radius:.5rem}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing)*0)}.top-4{top:calc(var(--spacing)*4)}.top-6{top:calc(var(--spacing)*6)}.top-full{top:100%}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.right-4{right:calc(var(--spacing)*4)}.right-6{right:calc(var(--spacing)*6)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-2{bottom:calc(var(--spacing)*2)}.bottom-4{bottom:calc(var(--spacing)*4)}.bottom-full{bottom:100%}.left-0{left:calc(var(--spacing)*0)}.left-1\/2{left:50%}.left-2{left:calc(var(--spacing)*2)}.left-4{left:calc(var(--spacing)*4)}.left-6{left:calc(var(--spacing)*6)}.z-0{z-index:0}.z-10{z-index:10}.z-30{z-index:30}.z-50{z-index:50}.z-\[1\]{z-index:1}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-4{margin-inline:calc(var(--spacing)*4)}.mx-auto{margin-inline:auto}.my-4{margin-block:calc(var(--spacing)*4)}.my-6{margin-block:calc(var(--spacing)*6)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-6{margin-top:calc(var(--spacing)*6)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.mb-16{margin-bottom:calc(var(--spacing)*16)}.mb-\[-8px\]{margin-bottom:-8px}.mb-\[1px\]{margin-bottom:1px}.ml-1{margin-left:calc(var(--spacing)*1)}.block{display:block}.flex{display:flex}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.list-item{display:list-item}.table{display:table}.table-cell{display:table-cell}.table-row{display:table-row}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-7{width:calc(var(--spacing)*7);height:calc(var(--spacing)*7)}.size-full{width:100%;height:100%}.h-1\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-3{height:calc(var(--spacing)*3)}.h-3\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-6{height:calc(var(--spacing)*6)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-14{height:calc(var(--spacing)*14)}.h-\[46px\]{height:46px}.h-auto{height:auto}.h-full{height:100%}.h-screen{height:100vh}.max-h-32{max-height:calc(var(--spacing)*32)}.max-h-40{max-height:calc(var(--spacing)*40)}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-28{min-height:calc(var(--spacing)*28)}.min-h-\[200px\]{min-height:200px}.min-h-full{min-height:100%}.w-3{width:calc(var(--spacing)*3)}.w-3\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-8{width:calc(var(--spacing)*8)}.w-10{width:calc(var(--spacing)*10)}.w-64{width:calc(var(--spacing)*64)}.w-\[80\%\]{width:80%}.w-auto{width:auto}.w-full{width:100%}.w-screen{width:100vw}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-5xl{max-width:var(--container-5xl)}.max-w-\[80\%\]{max-width:80%}.max-w-full{max-width:100%}.max-w-md{max-width:var(--container-md)}.min-w-\[120px\]{min-width:120px}.flex-1{flex:1}.flex-none{flex:none}.flex-shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.origin-center{transform-origin:50%}.-translate-x-1\/2{--tw-translate-x:calc(calc(1/2*100%)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-0{--tw-translate-y:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-1\/2{--tw-translate-y:calc(1/2*100%);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-4{--tw-translate-y:calc(var(--spacing)*4);translate:var(--tw-translate-x)var(--tw-translate-y)}.-rotate-90{rotate:-90deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.appearance-none{appearance:none}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*8)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*8)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse));border-bottom-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overscroll-y-auto{overscroll-behavior-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-br-md{border-bottom-right-radius:var(--radius-md)}.rounded-bl-md{border-bottom-left-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-\[\#0A32351a\]{border-color:#0a32351a}.border-\[\#0A323520\]{border-color:#0a323520}.border-\[\#FAF2E91a\]{border-color:#faf2e91a}.border-current{border-color:currentColor}.border-red-200{border-color:var(--color-red-200)}.bg-\[\#0A3235\]{background-color:#0a3235}.bg-\[\#0A32351a\]{background-color:#0a32351a}.bg-\[\#F0529C\]{background-color:#f0529c}.bg-\[\#FAF2E9\]{background-color:#faf2e9}.bg-\[\#FAF2E90a\]{background-color:#faf2e90a}.bg-\[\#FAF2E91a\]{background-color:#faf2e91a}.bg-\[var\(--sdm-bg\,transparent\)\]{background-color:var(--sdm-bg,transparent)}.bg-\[var\(--sdm-tbg\)\]{background-color:var(--sdm-tbg)}.bg-black\/10{background-color:#0000001a}@supports (color:color-mix(in lab, red, red)){.bg-black\/10{background-color:color-mix(in oklab,var(--color-black)10%,transparent)}}.bg-red-50{background-color:var(--color-red-50)}.bg-red-100{background-color:var(--color-red-100)}.bg-white{background-color:var(--color-white)}.bg-\[linear-gradient\(90deg\,\#105257_0\%\,\#F0529C_60\%\,\#B11BE8_100\%\)\]{background-image:linear-gradient(90deg,#105257 0%,#f0529c 60%,#b11be8 100%)}.fill-current{fill:currentColor}.p-1{padding:calc(var(--spacing)*1)}.p-1\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.px-1\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-8{padding-inline:calc(var(--spacing)*8)}.py-0\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.py-3\.5{padding-block:calc(var(--spacing)*3.5)}.py-6{padding-block:calc(var(--spacing)*6)}.py-12{padding-block:calc(var(--spacing)*12)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-11{padding-bottom:calc(var(--spacing)*11)}.pl-4{padding-left:calc(var(--spacing)*4)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[15px\]{font-size:15px}.leading-\[1\.0\]{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\[0\.2em\]{--tw-tracking:.2em;letter-spacing:.2em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.wrap-anywhere{overflow-wrap:anywhere}.break-all{word-break:break-all}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[\#0A3235\]{color:#0a3235}.text-\[\#0A323580\]{color:#0a323580}.text-\[\#0FCB8C\]{color:#0fcb8c}.text-\[\#0FCB8Cb3\]{color:#0fcb8cb3}.text-\[\#F0529C\]{color:#f0529c}.text-\[\#FAF2E9\]{color:#faf2e9}.text-\[\#FAF2E9b3\]{color:#faf2e9b3}.text-\[\#FAF2E9cc\]{color:#faf2e9cc}.text-\[\#FAF2E980\]{color:#faf2e980}.text-\[var\(--sdm-c\,inherit\)\]{color:var(--sdm-c,inherit)}.text-red-400{color:var(--color-red-400)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-red-800{color:var(--color-red-800)}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.underline{text-decoration-line:underline}.decoration-\[\#FAF2E94d\]{text-decoration-color:#faf2e94d}.underline-offset-4{text-underline-offset:4px}.placeholder-\[\#0A323580\]::placeholder{color:#0a323580}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition-\[width\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-700{--tw-duration:.7s;transition-duration:.7s}.duration-1000{--tw-duration:1s;transition-duration:1s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.select-none{-webkit-user-select:none;user-select:none}.\[counter-increment\:line_0\]{counter-increment:line 0}.\[counter-reset\:line\]{counter-reset:line}@media (hover:hover){.group-hover\:block:is(:where(.group):hover *){display:block}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.before\:mr-4:before{content:var(--tw-content);margin-right:calc(var(--spacing)*4)}.before\:inline-block:before{content:var(--tw-content);display:inline-block}.before\:w-6:before{content:var(--tw-content);width:calc(var(--spacing)*6)}.before\:text-right:before{content:var(--tw-content);text-align:right}.before\:font-mono:before{content:var(--tw-content);font-family:var(--font-mono)}.before\:text-\[13px\]:before{content:var(--tw-content);font-size:13px}.before\:content-\[counter\(line\)\]:before{--tw-content:counter(line);content:var(--tw-content)}.before\:select-none:before{content:var(--tw-content);-webkit-user-select:none;user-select:none}.before\:\[counter-increment\:line\]:before{content:var(--tw-content);counter-increment:line}:is(.\*\:first\:mt-0>*):first-child{margin-top:calc(var(--spacing)*0)}:is(.\*\:last\:mb-0>*):last-child{margin-bottom:calc(var(--spacing)*0)}:is(.\*\:last\:after\:inline>*):last-child:after{content:var(--tw-content);display:inline}:is(.\*\:last\:after\:align-baseline>*):last-child:after{content:var(--tw-content);vertical-align:baseline}:is(.\*\:last\:after\:content-\[var\(--streamdown-caret\)\]>*):last-child:after{--tw-content:var(--streamdown-caret);content:var(--tw-content)}@media (hover:hover){.hover\:scale-\[1\.02\]:hover{scale:1.02}.hover\:border-\[\#105257\]:hover{border-color:#105257}.hover\:bg-\[\#0A32350d\]:hover{background-color:#0a32350d}.hover\:bg-\[\#0FCB8C\]:hover{background-color:#0fcb8c}.hover\:bg-\[\#105257\]:hover{background-color:#105257}.hover\:bg-\[\#1052571a\]:hover{background-color:#1052571a}.hover\:text-\[\#0A3235\]:hover{color:#0a3235}.hover\:text-\[\#0FCB8C\]:hover{color:#0fcb8c}}.focus\:border-\[\#105257\]:focus{border-color:#105257}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-\[\#105257\]:focus{--tw-ring-color:#105257}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}@media (width>=40rem){.sm\:top-8{top:calc(var(--spacing)*8)}.sm\:right-8{right:calc(var(--spacing)*8)}.sm\:left-8{left:calc(var(--spacing)*8)}.sm\:h-12{height:calc(var(--spacing)*12)}.sm\:px-8{padding-inline:calc(var(--spacing)*8)}.sm\:text-7xl{font-size:var(--text-7xl);line-height:var(--tw-leading,var(--text-7xl--line-height))}.sm\:text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}}@media (width>=64rem){.lg\:right-14{right:calc(var(--spacing)*14)}.lg\:left-14{left:calc(var(--spacing)*14)}.lg\:px-14{padding-inline:calc(var(--spacing)*14)}.lg\:text-8xl{font-size:var(--text-8xl);line-height:var(--tw-leading,var(--text-8xl--line-height))}}@media (prefers-color-scheme:dark){.dark\:bg-\[var\(--shiki-dark-bg\,var\(--sdm-bg\,transparent\)\)\]{background-color:var(--shiki-dark-bg,var(--sdm-bg,transparent))}.dark\:bg-\[var\(--shiki-dark-bg\,var\(--sdm-tbg\)\)\]{background-color:var(--shiki-dark-bg,var(--sdm-tbg))}.dark\:text-\[var\(--shiki-dark\,var\(--sdm-c\,inherit\)\)\]{color:var(--shiki-dark,var(--sdm-c,inherit))}}.\[\&_svg\]\:h-auto svg{height:auto}.\[\&_svg\]\:w-auto svg{width:auto}.\[\&\>p\]\:inline>p{display:inline}li .\[li_\&\]\:pl-6{padding-left:calc(var(--spacing)*6)}}@font-face{font-family:PP Telegraf;src:url(/fonts/PPTelegraf-Ultralight.otf)format("opentype");font-weight:200;font-style:normal;font-display:swap}@font-face{font-family:PP Telegraf;src:url(/fonts/PPTelegraf-Regular.otf)format("opentype");font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:PP Telegraf;src:url(/fonts/PPTelegraf-Ultrabold.otf)format("opentype");font-weight:800;font-style:normal;font-display:swap}.brand-surface{background:radial-gradient(ellipse 70% 50% at 86% 12%,var(--ai2-teal-10),transparent 70%),radial-gradient(ellipse 70% 50% at 12% 86%,var(--ai2-green-10),transparent 72%),var(--ai2-off-white)}@keyframes pulse-gentle{0%,to{opacity:.6}50%{opacity:1}}.animate-pulse-gentle{animation:2.5s ease-in-out infinite pulse-gentle}@keyframes rise-in{0%{opacity:0;transform:translateY(32px)}to{opacity:1;transform:translate(0)}}.animate-rise-in{animation:.8s cubic-bezier(.22,1,.36,1) both rise-in}.animate-rise-in-delayed{animation:1s cubic-bezier(.22,1,.36,1) .12s both rise-in}.font-support{font-family:ui-monospace,SFMono-Regular,Menlo,monospace}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.animate-fade-in{animation:.5s ease-out both fade-in}@keyframes thinking-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.thinking-shimmer{-webkit-text-fill-color:transparent;background:linear-gradient(105deg,#6d6d6d 0% 40%,#f0529c 50%,#6d6d6d 60% 100%) 0 0/200% 100%;-webkit-background-clip:text;background-clip:text;animation:2s ease-in-out infinite thinking-shimmer}@keyframes orb-drift-left{0%,to{transform:translate(-50%,-50%)scale(1)}33%{transform:translate(-46%,-44%)scale(1.05)}66%{transform:translate(-53%,-54%)scale(.97)}}@keyframes orb-drift-right{0%,to{transform:translate(50%,-50%)scale(1)}33%{transform:translate(55%,-54%)scale(.97)}66%{transform:translate(47%,-44%)scale(1.04)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes spin{to{transform:rotate(360deg)}}@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2)format("woff2"),url(/assets/KaTeX_AMS-Regular-DMm9YOAa.woff)format("woff"),url(/assets/KaTeX_AMS-Regular-DRggAlZN.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2)format("woff2"),url(/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff)format("woff"),url(/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2)format("woff2"),url(/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff)format("woff"),url(/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2)format("woff2"),url(/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff)format("woff"),url(/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2)format("woff2"),url(/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff)format("woff"),url(/assets/KaTeX_Fraktur-Regular-CB_wures.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Main-Bold-Cx986IdX.woff2)format("woff2"),url(/assets/KaTeX_Main-Bold-Jm3AIy58.woff)format("woff"),url(/assets/KaTeX_Main-Bold-waoOVXN0.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2)format("woff2"),url(/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff)format("woff"),url(/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2)format("woff2"),url(/assets/KaTeX_Main-Italic-BMLOBm91.woff)format("woff"),url(/assets/KaTeX_Main-Italic-3WenGoN9.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Main-Regular-B22Nviop.woff2)format("woff2"),url(/assets/KaTeX_Main-Regular-Dr94JaBh.woff)format("woff"),url(/assets/KaTeX_Main-Regular-ypZvNtVU.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2)format("woff2"),url(/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff)format("woff"),url(/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Math-Italic-t53AETM-.woff2)format("woff2"),url(/assets/KaTeX_Math-Italic-DA0__PXp.woff)format("woff"),url(/assets/KaTeX_Math-Italic-flOr_0UB.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url(/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2)format("woff2"),url(/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff)format("woff"),url(/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url(/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2)format("woff2"),url(/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff)format("woff"),url(/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url(/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2)format("woff2"),url(/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff)format("woff"),url(/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Script-Regular-D3wIWfF6.woff2)format("woff2"),url(/assets/KaTeX_Script-Regular-D5yQViql.woff)format("woff"),url(/assets/KaTeX_Script-Regular-C5JkGWo-.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2)format("woff2"),url(/assets/KaTeX_Size1-Regular-C195tn64.woff)format("woff"),url(/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2)format("woff2"),url(/assets/KaTeX_Size2-Regular-oD1tc_U0.woff)format("woff"),url(/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAA4oAA4AAAAAHbQAAA3TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgRQIDgmcDBEICo1oijYBNgIkA14LMgAEIAWJAAeBHAyBHBvbGiMRdnO0IkRRkiYDgr9KsJ1NUAf2kILNxgUmgqIgq1P89vcbIcmsQbRps3vCcXdYOKSWEPEKgZgQkprQQsxIXUgq0DqpGKmIvrgkeVGtEQD9DzAO29fM9jYhxZEsL2FeURH2JN4MIcTdO049NCVdxQ/w9NrSYFEBKTDKpLKfNkCGDc1RwjZLQcm3vqJ2UW9Xfa3tgAHz6ivp6vgC2yD4/6352ndnN0X0TL7seypkjZlMsjmZnf0Mm5Q+JykRWQBKCVCVPbARPXWyQtb5VgLB6Biq7/Uixcj2WGqdI8tGSgkuRG+t910GKP2D7AQH0DB9FMDW/obJZ8giFI3Wg8Cvevz0M+5m0rTh7XDBlvo9Y4vm13EXmfttwI4mBo1EG15fxJhUiCLbiiyCf/ZA6MFAhg3pGIZGdGIVjtPn6UcMk9A/UUr9PhoNsCENw1APAq0gpH73e+M+0ueyHbabc3vkbcdtzcf/fiy+NxQEjf9ud/ELBHAXJ0nk4z+MXH2Ev/kWyV4k7SkvpPc9Qr38F6RPWnM9cN6DJ0AdD1BhtgABtmoRoFCvPsBAumNm6soZG2Gk5GyVTo2sJncSyp0jQTYoR6WDvTwaaEcHsxHfvuWhHA3a6bN7twRKtcGok6NsCi7jYRrM2jExsUFMxMQYuJbMhuWNOumEJy9hi29Dmg5zMp/A5+hhPG19j1vBrq8JTLr8ki5VLPmG/PynJHVul440bxg5xuymHUFPBshC+nA9I1FmwbRBTNHAcik3Oae0cxKoI3MOriM42UrPe51nsaGxJ+WfXubAsP84aabUlQSJ1IiE0iPETLUU4CATgfXSCSpuRFRmCGbO+wSpAnzaeaCYW1VNEysRtuXCEL1kUFUbbtMv3Tilt/1c11jt3Q5bbMa84cpWipp8Elw3MZhOHsOlwwVUQM3lAR35JiFQbaYCRnMF2lxAWoOg2gyoIV4PouX8HytNIfLhqpJtXB4vjiViUI8IJ7bkC4ikkQvKksnOTKICwnqWSZ9YS5f0WCxmpgjbIq7EJcM4aI2nmhLNY2JIUgOjXZFWBHb+x5oh6cwb0Tv1ackHdKi0I9OO2wE9aogIOn540CCCziyhN+IaejtgAONKznHlHyutPrHGwCx9S6B8kfS4Mfi4Eyv7OU730bT1SCBjt834cXsf43zVjPUqqJjgrjeGnBxSG4aYAKFuVbeCfkDIjAqMb6yLNIbCuvXhMH2/+k2vkNpkORhR59N1CkzoOENvneIosjYmuTxlhUzaGEJQ/iWqx4dmwpmKjrwTiTGTCVozNAYqk/zXOndWxuWSmJkQpJw3pK5KX6QrLt5LATMqpmPAQhkhK6PUjzHUn7E0gHE0kPE0iKkolgkUx9SZmVAdDgpffdyJKg3k7VmzYGCwVXGz/tXmkOIp+vcWs+EMuhhvN0h9uhfzWJziBQmCREGSIFmQIkgVpAnSBRmC//6hkLZwaVhwxlrJSOdqlFtOYxlau9F2QN5Y98xmIAsiM1HVp2VFX+DHHGg6Ecjh3vmqtidX3qHI2qycTk/iwxSt5UzTmEP92ZBnEWTk4Mx8Mpl78ZDokxg/KWb+Q0QkvdKVmq3TMW+RXEgrsziSAfNXFMhDc60N5N9jQzjfO0kBKpUZl0ZmwJ41j/B9Hz6wmRaJB84niNmQrzp9eSlQCDDzazGDdVi3P36VZQ+Jy4f9UBNp+3zTjqI4abaFAm+GShVaXlsGdF3FYzZcDI6cori4kMxUECl9IjJZpzkvitAoxKue+90pDMvcKRxLl53TmOKCmV/xRolNKSqqUxc6LStOETmFOiLZZptlZepcKiAzteG8PEdpnQpbOMNcMsR4RR2Bs0cKFEvSmIjAFcnarqwUL4lDhHmnVkwu1IwshbiCcgvOheZuYyOteufZZwlcTlLgnZ3o/WcYdzZHW/WGaqaVfmTZ1aWCceJjkbZqsfbkOtcFlUZM/jy+hXHDbaUobWqqXaeWobbLO99yG5N3U4wxco0rQGGcOLASFMXeJoham8M+/x6O2WywK2l4HGbq1CoUyC/IZikQhdq3SiuNrvAEj0AVu9x2x3lp/xWzahaxidezFVtdcb5uEnzyl0ZmYiuKI0exvCd4Xc9CV1KB0db00z92wDPde0kukbvZIWN6jUWFTmPIC/Y4UPCm8UfDTFZpZNon1qLFTkBhxzB+FjQRA2Q/YRJT8pQigslMaUpFyAG8TMlXigiqmAZX4xgijKjRlGpLE0GdplRfCaJo0JQaSxNBk6ZmMzcya0FmrcisDdn0Q3HI2sWSppYigmlM1XT/kLQZSNpMJG0WkjYbSZuDpM1F0uYhFc1HxU4m1QJjDK6iL0S5uSj5rgXc3RejEigtcRBtqYPQsiTskmO5vosV+q4VGIKbOkDg0jtRrq+Em1YloaTFar3EGr1EUC8R0kus1Uus00usL97ABr2BjXoDm/QGNhuWtMVBKOwg/i78lT7hBsAvDmwHc/ao3vmUbBmhjeYySZNWvGkfZAgISDSaDo1SVpzGDsAEkF8B+gEapViUoZgUWXcRIGFZNm6gWbAKk0bp0k1MHG9fLYtV4iS2SmLEQFARzRcnf9PUS0LVn05/J9MiRRBU3v2IrvW974v4N00L7ZMk0wXP1409CHo/an8zTRHD3eSJ6m8D4YMkZNl3M79sqeuAsr/m3f+8/yl7A50aiAEJgeBeMWzu7ui9UfUBCe2TIqZIoOd/3/udRBOQidQZUERzb2/VwZN1H/Sju82ew2H2Wfr6qvfVf3hqwDvAIpkQVFy4B9Pe9e4/XvPeceu7h3dvO56iJPf0+A6cqA2ip18ER+iFgggiuOkvj24bby0N9j2UHIkgqIt+sVgfodC4YghLSMjSZbH0VR/6dMDrYJeKHilKTemt6v6kvzvn3/RrdWtr0GoN/xL+Sex/cPYLUpepx9cz/D46UPU5KXgAQa+NDps1v6J3xP1i2HtaDB0M9aX2deA7SYff//+gUCovMmIK/qfsFcOk+4Y5ZN97XlG6zebqtMbKgeRFi51vnxTQYBUik2rS/Cn6PC8ADR8FGxsRPB82dzfND90gIcshOcYUkfjherBz53odpm6TP8txlwOZ71xmfHHOvq053qFF/MRlS3jP0ELudrf2OeN8DHvp6ZceLe8qKYvWz/7yp0u4dKPfli3CYq0O13Ih71mylJ80tOi10On8wi+F4+LWgDPeJ30msSQt9/vkmHq9/Lvo2b461mP801v3W4xTcs6CbvF9UDdrSt+A8OUbpSh55qAUFXWznBBfdeJ8a4d7ugT5tvxUza3h9m4H7ptTqiG4z0g5dc0X29OcGlhpGFMpQo9ytTS+NViZpNdvU4kWx+LKxNY10kQ1yqGXrhe4/1nvP7E+nd5A92TtaRplbHSqoIdOqtRWti+fkB5/n1+/VvCmz12pG1kpQWsfi1ftlBobm0bpngs16CHkbIwdLnParxtTV3QYRlfJ0KFskH7pdN/YDn+yRuSd7sNH3aO0DYPggk6uWuXrfOc+fa3VTxFVvKaNxHsiHmsXyCLIE5yuOeN3/Jdf8HBL/5M6shjyhxHx9BjB1O0+4NLOnjLLSxwO7ukN4jMbOIcD879KLSi6Pk61Oqm2377n8079PXEEQ7cy7OKEC9nbpet118fxweTafpt69x/Bt8UqGzNQt7aelpc44dn5cqhwf71+qKp/Zf/+a0zcizOUWpl/iBcSXip0pplkatCchoH5c5aUM8I7/dWxAej8WicPL1URFZ9BDJelUwEwTkGqUhgSlydVes95YdXvhh9Gfz/aeFWvgVb4tuLbcv4+wLdutVZv/cUonwBD/6eDlE0aSiKK/uoH3+J1wDE/jMVqY2ysGufN84oIXB0sPzy8ollX/LegY74DgJXJR57sn+VGza0x3DnuIgABFM15LmajjjsNlYj+JEZGbuRYcAMOWxFkPN2w6Wd46xo4gVWQR/X4lyI/R6K/YK0110GzudPRW7Y+UOBGTfNNzHeYT0fiH0taunBpq9HEW8OKSaBGj21L0MqenEmNRWBAWDWAk4CpNoEZJ2tTaPFgbQYj8HxtFilErs3BTRwT8uO1NXQaWfIotchmPkAF5mMBAliEmZiOGVgCG9LgRzpscMAOOwowlT3JhusdazXGSC/hxR3UlmWVwWHpOIKheqONvjyhSiTHIkVUco5bnji8m//zL7PKaT1Vl5I6UE609f+gkr6MZKVyKc7zJRmCahLsdlyA5fdQkRSan9LgnnLEyGSkaKJCJog0wAgvepWBt80+1yKln1bMVtCljfNWDueKLsWwaEbBSfSPTEmVRsUcYYMnEjcjeyCZzBXK9E9BYBXLKjOSpUDR+nEV3TFSUdQaz+ot98QxgXwx0GQ+EEUAKB2qZPkQQ0GqFD8UPFMqyaCHM24BZmSGic9EYMagKizOw9Hz50DMrDLrqqLkTAhplMictiCAx5S3BIUQdeJeLnBy2CNtMfz6cV4u8XKoFZQesbf9YZiIERiHjaNodDW6LgcirX/mPnJIkBGDUpTBhSa0EIr38D5hCIszhCM8URGBqImoWjpvpt1ebu/v3Gl3qJfMnNM+9V+kiRFyROTPHQWOcs1dNW94/ukKMPZBvDi55i5CttdeJz84DLngLqjcdwEZ87bFFR8CIG35OAkDVN6VRDZ7aq67NteYqZ2lpT8oYB2CytoBd6VuAx4WgiAsnuj3WohG+LugzXiQRDeM3XYXlULv4dp5VFYC)format("woff2"),url(/assets/KaTeX_Size3-Regular-CTq5MqoE.woff)format("woff"),url(/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2)format("woff2"),url(/assets/KaTeX_Size4-Regular-BF-4gkZK.woff)format("woff"),url(/assets/KaTeX_Size4-Regular-DWFBv043.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2)format("woff2"),url(/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff)format("woff"),url(/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf)format("truetype")}.katex{text-indent:0;text-rendering:auto;font:1.21em/1.2 KaTeX_Main,Times New Roman,serif}.katex *{border-color:currentColor;-ms-high-contrast-adjust:none!important}.katex .katex-version:after{content:"0.16.28"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;width:1px;height:1px;padding:0;position:absolute;overflow:hidden}.katex .katex-html>.newline{display:block}.katex .base{white-space:nowrap;width:min-content;position:relative}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;table-layout:fixed;display:inline-table}.katex .vlist-r{display:table-row}.katex .vlist{vertical-align:bottom;display:table-cell;position:relative}.katex .vlist>span{height:0;display:block;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{width:0;overflow:hidden}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{vertical-align:bottom;width:2px;min-width:2px;font-size:1px;display:table-cell}.katex .vbox{flex-direction:column;align-items:baseline;display:inline-flex}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{flex-direction:row;display:inline-flex}.katex .thinbox{width:0;max-width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;width:100%;display:inline-block}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{width:0;position:relative}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;width:100%;display:inline-block}.katex .hdashline{border-bottom-style:dashed;width:100%;display:inline-block}.katex .sqrt>.root{margin-left:.277778em;margin-right:-.555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.833333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.16667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.33333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.66667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.45667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.14667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.714286em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.857143em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.14286em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.28571em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.42857em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.71429em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.05714em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.46857em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.96286em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.55429em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.11111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.33333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.30444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.76444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.416667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.583333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.833333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.72833em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.07333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.347222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.416667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.486111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.694444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.833333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.44028em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.72778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.289352em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.347222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.405093em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.520833em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.578704em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.694444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.833333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.20023em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.43981em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.24108em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.289296em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.385728em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.433944em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.48216em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.578592em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.694311em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.833173em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.19961em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.200965em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.241158em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.281351em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.321543em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.361736em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.401929em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.482315em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.694534em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.833601em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{width:.12em;display:inline-block}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{min-width:1px;display:inline-block}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;height:inherit;width:100%;display:block;position:absolute}.katex svg path{stroke:none}.katex img{border-style:none;min-width:0;max-width:none;min-height:0;max-height:none}.katex .stretchy{width:100%;display:block;position:relative;overflow:hidden}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{width:100%;position:relative;overflow:hidden}.katex .halfarrow-left{width:50.2%;position:absolute;left:0;overflow:hidden}.katex .halfarrow-right{width:50.2%;position:absolute;right:0;overflow:hidden}.katex .brace-left{width:25.1%;position:absolute;left:0;overflow:hidden}.katex .brace-center{width:50%;position:absolute;left:25%;overflow:hidden}.katex .brace-right{width:25.1%;position:absolute;right:0;overflow:hidden}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{box-sizing:border-box;border:.04em solid}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{box-sizing:border-box;border-top:.049em solid;border-right:.049em solid;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{text-align:left;display:inline-block;position:absolute;right:calc(50% + .3em)}.katex .cd-label-right{text-align:right;display:inline-block;position:absolute;left:calc(50% + .3em)}.katex-display{text-align:center;margin:1em 0;display:block}.katex-display>.katex{text-align:center;white-space:nowrap;display:block}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{text-align:left;padding-left:2em}body{counter-reset:katexEqnNo mmlEqnNo} diff --git a/dist/assets/mermaid-NOHMQCX5-D0R4kLcg.js b/dist/assets/mermaid-NOHMQCX5-D0R4kLcg.js new file mode 100644 index 0000000000000000000000000000000000000000..96ab1a82afc40697f7c8df530d4c7ae62565e8e6 --- /dev/null +++ b/dist/assets/mermaid-NOHMQCX5-D0R4kLcg.js @@ -0,0 +1 @@ +import{a as e}from"./index-C0oSj8fz.js";export{e as Mermaid}; \ No newline at end of file diff --git a/dist/favicon.svg b/dist/favicon.svg new file mode 100644 index 0000000000000000000000000000000000000000..ca8f07dff3d88982ccbe122741ad68c581ac6f47 --- /dev/null +++ b/dist/favicon.svg @@ -0,0 +1,3 @@ + + + diff --git a/dist/fonts/PPTelegraf-Regular.otf b/dist/fonts/PPTelegraf-Regular.otf new file mode 100644 index 0000000000000000000000000000000000000000..c8151c916678d1943164e55e8f378dd4edfddaca Binary files /dev/null and b/dist/fonts/PPTelegraf-Regular.otf differ diff --git a/dist/fonts/PPTelegraf-RegularOblique.otf b/dist/fonts/PPTelegraf-RegularOblique.otf new file mode 100644 index 0000000000000000000000000000000000000000..704a212e9d1722894ac7e658035c254c01529be7 Binary files /dev/null and b/dist/fonts/PPTelegraf-RegularOblique.otf differ diff --git a/dist/fonts/PPTelegraf-RegularSlanted.otf b/dist/fonts/PPTelegraf-RegularSlanted.otf new file mode 100644 index 0000000000000000000000000000000000000000..1a9c005eac6434637fbaf54c20ce358b1eb541f5 Binary files /dev/null and b/dist/fonts/PPTelegraf-RegularSlanted.otf differ diff --git a/dist/fonts/PPTelegraf-Ultrabold.otf b/dist/fonts/PPTelegraf-Ultrabold.otf new file mode 100644 index 0000000000000000000000000000000000000000..699d14afbf32597594d20cc88255047dd019a897 Binary files /dev/null and b/dist/fonts/PPTelegraf-Ultrabold.otf differ diff --git a/dist/fonts/PPTelegraf-UltraboldOblique.otf b/dist/fonts/PPTelegraf-UltraboldOblique.otf new file mode 100644 index 0000000000000000000000000000000000000000..9ff4d2ce3aa2cfb84d31f9b2bb3ab7433557cb93 Binary files /dev/null and b/dist/fonts/PPTelegraf-UltraboldOblique.otf differ diff --git a/dist/fonts/PPTelegraf-UltraboldSlanted.otf b/dist/fonts/PPTelegraf-UltraboldSlanted.otf new file mode 100644 index 0000000000000000000000000000000000000000..a6314d8d66ba86268c78cfe34b5156567c809dfa Binary files /dev/null and b/dist/fonts/PPTelegraf-UltraboldSlanted.otf differ diff --git a/dist/fonts/PPTelegraf-Ultralight.otf b/dist/fonts/PPTelegraf-Ultralight.otf new file mode 100644 index 0000000000000000000000000000000000000000..0bf8b96404fcd73f09237d77a49ba514ec0214b6 Binary files /dev/null and b/dist/fonts/PPTelegraf-Ultralight.otf differ diff --git a/dist/fonts/PPTelegraf-UltralightOblique.otf b/dist/fonts/PPTelegraf-UltralightOblique.otf new file mode 100644 index 0000000000000000000000000000000000000000..1e963e93ee749664ed17d2dfcec19a0dcbb74bf6 Binary files /dev/null and b/dist/fonts/PPTelegraf-UltralightOblique.otf differ diff --git a/dist/fonts/PPTelegraf-UltralightSlanted.otf b/dist/fonts/PPTelegraf-UltralightSlanted.otf new file mode 100644 index 0000000000000000000000000000000000000000..75bf2c149958f317ebdab9e7cd387930166b786b Binary files /dev/null and b/dist/fonts/PPTelegraf-UltralightSlanted.otf differ diff --git a/dist/index.html b/dist/index.html new file mode 100644 index 0000000000000000000000000000000000000000..050fbfb51d616e207cf507af3785117717b11ced --- /dev/null +++ b/dist/index.html @@ -0,0 +1,14 @@ + + + + + + + Olmo Hybrid WebGPU + + + + +
    + + diff --git a/dist/purple.avif b/dist/purple.avif new file mode 100644 index 0000000000000000000000000000000000000000..ff8b3c6462b3f552c520e4e862424197b545fa1c --- /dev/null +++ b/dist/purple.avif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0bb42789f7e1fbca6df318d46e5d74aa7043d4908c2b6eb001969464d61683e7 +size 742004 diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000000000000000000000000000000000000..75d3c46f810a53c9af6f2303f489a86716f3fa98 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,23 @@ +import js from "@eslint/js"; +import globals from "globals"; +import reactHooks from "eslint-plugin-react-hooks"; +import reactRefresh from "eslint-plugin-react-refresh"; +import tseslint from "typescript-eslint"; +import { defineConfig, globalIgnores } from "eslint/config"; + +export default defineConfig([ + globalIgnores(["dist"]), + { + files: ["**/*.{ts,tsx}"], + extends: [ + js.configs.recommended, + tseslint.configs.recommended, + reactHooks.configs.flat.recommended, + reactRefresh.configs.vite, + ], + languageOptions: { + ecmaVersion: 2020, + globals: globals.browser, + }, + }, +]); diff --git a/index.html b/index.html new file mode 100644 index 0000000000000000000000000000000000000000..36a70e4b6fda9bb7194cd98dd1187d8e3a9fb4c5 --- /dev/null +++ b/index.html @@ -0,0 +1,13 @@ + + + + + + + Olmo Hybrid WebGPU + + +
    + + + diff --git a/package.json b/package.json new file mode 100644 index 0000000000000000000000000000000000000000..403651e9802448952d43d0b5eb5e244e6f421af4 --- /dev/null +++ b/package.json @@ -0,0 +1,39 @@ +{ + "name": "olmo-hybrid-webgpu", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc -b && vite build", + "lint": "eslint .", + "preview": "vite preview" + }, + "dependencies": { + "@huggingface/transformers": "^4.0.0-next.6", + "@streamdown/math": "^1.0.2", + "@tailwindcss/vite": "^4.1.18", + "lucide-react": "^0.563.0", + "react": "^19.2.0", + "react-dom": "^19.2.0", + "streamdown": "^2.2.0", + "tailwindcss": "^4.1.18" + }, + "devDependencies": { + "@eslint/js": "^9.39.1", + "@types/node": "^24.10.1", + "@types/react": "^19.2.7", + "@types/react-dom": "^19.2.3", + "@vitejs/plugin-react": "^5.1.1", + "eslint": "^9.39.1", + "eslint-plugin-react-hooks": "^7.0.1", + "eslint-plugin-react-refresh": "^0.4.24", + "globals": "^16.5.0", + "typescript": "~5.9.3", + "typescript-eslint": "^8.48.0", + "vite": "^8.0.0-beta.13" + }, + "overrides": { + "vite": "^8.0.0-beta.13" + } +} diff --git a/public/ai2.svg b/public/ai2.svg new file mode 100644 index 0000000000000000000000000000000000000000..c36260f920a1cca15c190860f3eb96c6bd774d60 --- /dev/null +++ b/public/ai2.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/public/favicon.svg b/public/favicon.svg new file mode 100644 index 0000000000000000000000000000000000000000..ca8f07dff3d88982ccbe122741ad68c581ac6f47 --- /dev/null +++ b/public/favicon.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/fonts/PPTelegraf-Regular.otf b/public/fonts/PPTelegraf-Regular.otf new file mode 100644 index 0000000000000000000000000000000000000000..c8151c916678d1943164e55e8f378dd4edfddaca Binary files /dev/null and b/public/fonts/PPTelegraf-Regular.otf differ diff --git a/public/fonts/PPTelegraf-RegularOblique.otf b/public/fonts/PPTelegraf-RegularOblique.otf new file mode 100644 index 0000000000000000000000000000000000000000..704a212e9d1722894ac7e658035c254c01529be7 Binary files /dev/null and b/public/fonts/PPTelegraf-RegularOblique.otf differ diff --git a/public/fonts/PPTelegraf-RegularSlanted.otf b/public/fonts/PPTelegraf-RegularSlanted.otf new file mode 100644 index 0000000000000000000000000000000000000000..1a9c005eac6434637fbaf54c20ce358b1eb541f5 Binary files /dev/null and b/public/fonts/PPTelegraf-RegularSlanted.otf differ diff --git a/public/fonts/PPTelegraf-Ultrabold.otf b/public/fonts/PPTelegraf-Ultrabold.otf new file mode 100644 index 0000000000000000000000000000000000000000..699d14afbf32597594d20cc88255047dd019a897 Binary files /dev/null and b/public/fonts/PPTelegraf-Ultrabold.otf differ diff --git a/public/fonts/PPTelegraf-UltraboldOblique.otf b/public/fonts/PPTelegraf-UltraboldOblique.otf new file mode 100644 index 0000000000000000000000000000000000000000..9ff4d2ce3aa2cfb84d31f9b2bb3ab7433557cb93 Binary files /dev/null and b/public/fonts/PPTelegraf-UltraboldOblique.otf differ diff --git a/public/fonts/PPTelegraf-UltraboldSlanted.otf b/public/fonts/PPTelegraf-UltraboldSlanted.otf new file mode 100644 index 0000000000000000000000000000000000000000..a6314d8d66ba86268c78cfe34b5156567c809dfa Binary files /dev/null and b/public/fonts/PPTelegraf-UltraboldSlanted.otf differ diff --git a/public/fonts/PPTelegraf-Ultralight.otf b/public/fonts/PPTelegraf-Ultralight.otf new file mode 100644 index 0000000000000000000000000000000000000000..0bf8b96404fcd73f09237d77a49ba514ec0214b6 Binary files /dev/null and b/public/fonts/PPTelegraf-Ultralight.otf differ diff --git a/public/fonts/PPTelegraf-UltralightOblique.otf b/public/fonts/PPTelegraf-UltralightOblique.otf new file mode 100644 index 0000000000000000000000000000000000000000..1e963e93ee749664ed17d2dfcec19a0dcbb74bf6 Binary files /dev/null and b/public/fonts/PPTelegraf-UltralightOblique.otf differ diff --git a/public/fonts/PPTelegraf-UltralightSlanted.otf b/public/fonts/PPTelegraf-UltralightSlanted.otf new file mode 100644 index 0000000000000000000000000000000000000000..75bf2c149958f317ebdab9e7cd387930166b786b Binary files /dev/null and b/public/fonts/PPTelegraf-UltralightSlanted.otf differ diff --git a/public/purple.avif b/public/purple.avif new file mode 100644 index 0000000000000000000000000000000000000000..ff8b3c6462b3f552c520e4e862424197b545fa1c --- /dev/null +++ b/public/purple.avif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0bb42789f7e1fbca6df318d46e5d74aa7043d4908c2b6eb001969464d61683e7 +size 742004 diff --git a/src/App.tsx b/src/App.tsx new file mode 100644 index 0000000000000000000000000000000000000000..e93978313bbde2d31069acbe6290d18a10afff93 --- /dev/null +++ b/src/App.tsx @@ -0,0 +1,103 @@ +import { useEffect, useState } from "react"; + +import { LandingPage } from "./components/LandingPage"; +import { ChatApp } from "./components/ChatApp"; +import { useLLM } from "./hooks/useLLM"; +import { Loader2 } from "lucide-react"; +import "katex/dist/katex.min.css"; + +function App() { + const { status, loadModel, selectedModel, setSelectedModel, loadedModelId } = + useLLM(); + + const [hasStarted, setHasStarted] = useState(false); + const [showChat, setShowChat] = useState(false); + + const isReady = + status.state === "ready" && loadedModelId === selectedModel.id; + const isLoading = hasStarted && !isReady && status.state !== "error"; + + const handleStart = () => { + setHasStarted(true); + loadModel(); + }; + + const handleGoHome = () => { + setShowChat(false); + setTimeout(() => setHasStarted(false), 700); + }; + + useEffect(() => { + if (isReady && hasStarted) { + setShowChat(true); + } + }, [isReady, hasStarted]); + + return ( +
    + {/* Landing page — hidden once loading starts */} +
    + +
    + + {/* Chat page — fades in when ready */} +
    + {hasStarted && } +
    + + {/* Loading overlay — sits on top, fades from loading screen directly to chat */} +
    +
    + AI2 + +

    + {status.state === "loading" + ? (status.message ?? "Loading model…") + : status.state === "error" + ? "Error" + : "Initializing…"} +

    +
    +
    +
    + {status.state === "error" && ( +

    {status.error}

    + )} +
    +
    +
    + ); +} + +export default App; diff --git a/src/components/ChatApp.tsx b/src/components/ChatApp.tsx new file mode 100644 index 0000000000000000000000000000000000000000..d7e65d86c13abb30fae7807201a5bc913ee36c22 --- /dev/null +++ b/src/components/ChatApp.tsx @@ -0,0 +1,289 @@ +import { useState, useRef, useEffect, useCallback } from "react"; +import { Send, Square, Plus } from "lucide-react"; + +import { useLLM } from "../hooks/useLLM"; +import { MessageBubble } from "./MessageBubble"; +import { StatusBar } from "./StatusBar"; + +const EXAMPLE_PROMPTS = [ + { + label: "Solve x² + x - 12 = 0", + prompt: "Solve x^2 + x - 12 = 0", + }, + { + label: "Explain quantum computing", + prompt: + "Explain quantum computing in simple terms. What makes it different from classical computing, and what are some real-world applications?", + }, + { + label: "Write a Python quicksort", + prompt: + "Write a clean, well-commented Python implementation of the quicksort algorithm. Include an example of how to use it.", + }, + { + label: "Solve a logic puzzle", + prompt: + "Five people were eating apples, A finished before B, but behind C. D finished before E, but behind B. What was the finishing order?", + }, +] as const; + +interface ChatInputProps { + showDisclaimer: boolean; + animated?: boolean; +} + +function ChatInput({ showDisclaimer, animated }: ChatInputProps) { + const { send, stop, status, isGenerating } = useLLM(); + const isReady = status.state === "ready"; + const [input, setInput] = useState(""); + const textareaRef = useRef(null); + + const handleSubmit = useCallback( + (e?: React.FormEvent) => { + e?.preventDefault(); + const text = input.trim(); + if (!text || !isReady || isGenerating) return; + setInput(""); + if (textareaRef.current) { + textareaRef.current.style.height = "7.5rem"; + } + send(text); + }, + [input, isReady, isGenerating, send], + ); + + const handleKeyDown = useCallback( + (e: React.KeyboardEvent) => { + if (e.key === "Enter" && !e.shiftKey) { + e.preventDefault(); + handleSubmit(); + } + }, + [handleSubmit], + ); + + return ( +
    +
    +
    +