offsite 0.0.52 → 0.0.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/apps/client/dist/assets/abnfDiagram-WEYOIA3C-BL7tfQo-.js +1 -0
- package/apps/client/dist/assets/andromeeda-BJLMrMlp.js +1 -0
- package/apps/client/dist/assets/apl-mEfZRQQI.js +1 -0
- package/apps/client/dist/assets/appendItems-C8N70W-m.js +9 -0
- package/apps/client/dist/assets/arc-Y1ARJVZ4.js +1 -0
- package/apps/client/dist/assets/architecture-WOLXFQ4H-_rl7AhLT.js +1 -0
- package/apps/client/dist/assets/architectureDiagram-ZHVYKT53-H-Eh-MGk.js +36 -0
- package/apps/client/dist/assets/astro-BZ97kZFP.js +1 -0
- package/apps/client/dist/assets/audio-player-CEvt4CVB.js +1 -0
- package/apps/client/dist/assets/aurora-x-BCChoRpm.js +1 -0
- package/apps/client/dist/assets/ayu-dark-DzFZPuMV.js +1 -0
- package/apps/client/dist/assets/ayu-light-DSkcX_XD.js +1 -0
- package/apps/client/dist/assets/ayu-mirage-DSve0zuE.js +1 -0
- package/apps/client/dist/assets/blade-BKsPdrmv.js +1 -0
- package/apps/client/dist/assets/blockDiagram-RJAE7QA3-CdQP8axR.js +140 -0
- package/apps/client/dist/assets/button-CdLSr6OC.js +1 -0
- package/apps/client/dist/assets/c4Diagram-XDPPPE54-f8qCZx2c.js +38 -0
- package/apps/client/dist/assets/catppuccin-frappe-DbLkF0J2.js +1 -0
- package/apps/client/dist/assets/catppuccin-latte-b6208YQK.js +1 -0
- package/apps/client/dist/assets/catppuccin-macchiato-CNNBbV1L.js +1 -0
- package/apps/client/dist/assets/catppuccin-mocha-DHkNF0Mp.js +1 -0
- package/apps/client/dist/assets/channel-CWhEUht8.js +1 -0
- package/apps/client/dist/assets/chunk-24IY7LWP-Dx1bH4hy.js +1 -0
- package/apps/client/dist/assets/chunk-2E7WHVMD-Dnai-s9F.js +88 -0
- package/apps/client/dist/assets/chunk-3M4EKCLJ-CZCHjIMV.js +1 -0
- package/apps/client/dist/assets/chunk-4EMNKR2T-BdYkDpzn.js +1 -0
- package/apps/client/dist/assets/chunk-4S7OKTRW-BYLWFTeI.js +1 -0
- package/apps/client/dist/assets/chunk-53FOQ5SW-CpLZLKqk.js +1 -0
- package/apps/client/dist/assets/chunk-55XCU76K-C5BYmfkn.js +1 -0
- package/apps/client/dist/assets/chunk-7S6XSTFO-DfcQYwBr.js +2 -0
- package/apps/client/dist/assets/chunk-AQDTSKZB-BaSzLooQ.js +72 -0
- package/apps/client/dist/assets/chunk-BP2KR52E-e4oUcnOc.js +2 -0
- package/apps/client/dist/assets/chunk-DSNLSHJZ-1cSq1Cdz.js +129 -0
- package/apps/client/dist/assets/chunk-EJLWFMJV-Comf59CW.js +2 -0
- package/apps/client/dist/assets/chunk-F6S3BTY2-C2qAf54c.js +2 -0
- package/apps/client/dist/assets/chunk-HAGFOTED-B1koh3Pd.js +62 -0
- package/apps/client/dist/assets/chunk-HNE4Q36P-DgBNQZut.js +1 -0
- package/apps/client/dist/assets/chunk-KPI5JJXK-qcA7W3O4.js +1 -0
- package/apps/client/dist/assets/chunk-LNGE3PJU-DRjopGY8.js +34 -0
- package/apps/client/dist/assets/chunk-NGNAAXSQ-DI_UYJZ4.js +136 -0
- package/apps/client/dist/assets/chunk-NQOKRVIF-DE6PmyH4.js +213 -0
- package/apps/client/dist/assets/chunk-OD3NTWWA-CAVyH1Ca.js +1 -0
- package/apps/client/dist/assets/chunk-OYAV6JZA-B49nzGbl.js +1 -0
- package/apps/client/dist/assets/chunk-QNH66VMT-ByH5tEVf.js +1 -0
- package/apps/client/dist/assets/chunk-TPMEZKFX-BCdevXsF.js +1 -0
- package/apps/client/dist/assets/chunk-UHW7PFBP-B5xhb4gG.js +1 -0
- package/apps/client/dist/assets/chunk-VPELOWWC-BcHS3JJZ.js +1 -0
- package/apps/client/dist/assets/chunk-VQ5W62QI-DR0mr0PC.js +1 -0
- package/apps/client/dist/assets/chunk-VTWWFHGB-BYcesc7m.js +1 -0
- package/apps/client/dist/assets/chunk-VZTHESGH-BXvs__Wg.js +1 -0
- package/apps/client/dist/assets/chunk-WQQL4CDK-CGJge8NN.js +10 -0
- package/apps/client/dist/assets/chunk-XXDRQBXY-CnbRkih_.js +1 -0
- package/apps/client/dist/assets/chunk-YK26KJH5-DAC0RUcW.js +1 -0
- package/apps/client/dist/assets/chunk-YZO67HFG-DxlnPWlc.js +1 -0
- package/apps/client/dist/assets/chunk-ZAUX2LTX-BnmYh1Zt.js +1 -0
- package/apps/client/dist/assets/chunk-ZCHMQSOR-C6ORC7ev.js +2 -0
- package/apps/client/dist/assets/chunk-ZO67DCNQ-EFYGvQ3O.js +2 -0
- package/apps/client/dist/assets/classDiagram-v2-4MYWR3UA-DZcumEGH.js +217 -0
- package/apps/client/dist/assets/constants-CmGPilXJ.js +1 -0
- package/apps/client/dist/assets/core-BvRk9kiK.js +0 -0
- package/apps/client/dist/assets/core-CFb9AGbX.js +1 -0
- package/apps/client/dist/assets/cose-bilkent-JH36ORCC-vhvneb2W.js +1 -0
- package/apps/client/dist/assets/crystal-AmF80bGl.js +1 -0
- package/apps/client/dist/assets/cynefin-EF2NZ3EQ-CloXJGbu.js +1 -0
- package/apps/client/dist/assets/cynefinDiagram-WF24UDRP-BEyREl86.js +62 -0
- package/apps/client/dist/assets/cytoscape.esm-CVyW_ZDf.js +321 -0
- package/apps/client/dist/assets/dagre-NK4GIZVX-BVMKtnQJ.js +4 -0
- package/apps/client/dist/assets/dark-plus-BVZ_4wTZ.js +1 -0
- package/apps/client/dist/assets/diagram-CBK3MWTC-BCOpNEVv.js +24 -0
- package/apps/client/dist/assets/diagram-I5XIIV2D-BNzL2YkL.js +24 -0
- package/apps/client/dist/assets/diagram-ODIL2UCW-Ce0YAdrd.js +30 -0
- package/apps/client/dist/assets/diagram-PFBEJUXE-BdfQpDDg.js +3 -0
- package/apps/client/dist/assets/diagram-RJA3I4VV-Bj9w9wuW.js +41 -0
- package/apps/client/dist/assets/diagram-TYUNFSNR-D0LLlrNC.js +200 -0
- package/apps/client/dist/assets/dist-CumnGVmJ.js +1 -0
- package/apps/client/dist/assets/dist-DRetoCkD.js +1 -0
- package/apps/client/dist/assets/dist-DSkulxAq.js +12 -0
- package/apps/client/dist/assets/dist-DygZhkc7.js +2 -0
- package/apps/client/dist/assets/dracula-BoZgXveB.js +1 -0
- package/apps/client/dist/assets/dracula-soft-D-Kgh5gw.js +1 -0
- package/apps/client/dist/assets/ebnfDiagram-V4P3TTPT-CGK21OKQ.js +1 -0
- package/apps/client/dist/assets/ecl-94qehhXe.js +1 -0
- package/apps/client/dist/assets/edge-6iEBX1Tp.js +1 -0
- package/apps/client/dist/assets/editor-dialog-D5uma-Ri.js +52 -0
- package/apps/client/dist/assets/editor.api-Rfucz3mk.js +908 -0
- package/apps/client/dist/assets/editor.worker-CGG2Yh4v.js +1 -0
- package/apps/client/dist/assets/editor.worker-CRz__AKW.js +33 -0
- package/apps/client/dist/assets/elk-QONTBCTQ-BJ4MLeDb.js +27 -0
- package/apps/client/dist/assets/engine-javascript-DKxkqixV.js +141 -0
- package/apps/client/dist/assets/engine-oniguruma-BMl9YtsA.js +1 -0
- package/apps/client/dist/assets/engine-oniguruma-Dl5gvpE_.js +1 -0
- package/apps/client/dist/assets/erDiagram-KYQIGQAA-B2KLLDzR.js +99 -0
- package/apps/client/dist/assets/erb-CpTmb34B.js +1 -0
- package/apps/client/dist/assets/eventmodeling-K75KTNOO-CllCPg_K.js +1 -0
- package/apps/client/dist/assets/everforest-dark-Y6tr-2zD.js +1 -0
- package/apps/client/dist/assets/everforest-light-CA0Ol4Qu.js +1 -0
- package/apps/client/dist/assets/flowDiagram-IUGLLWBU-Z1nPXjJy.js +1 -0
- package/apps/client/dist/assets/formatCSSVariablePrefix-KRh9vnZf.js +1 -0
- package/apps/client/dist/assets/freemarker2-Bw62YruA.js +3 -0
- package/apps/client/dist/assets/ganttDiagram-R7GPNTJY-Du3M1GRl.js +292 -0
- package/apps/client/dist/assets/getFiletypeFromFileName-BCvBvB1y.js +96 -0
- package/apps/client/dist/assets/gitGraph-VSP46ZUC-BQF76v0s.js +1 -0
- package/apps/client/dist/assets/gitGraphDiagram-PDYL7XHY-C_Y2i3Jx.js +106 -0
- package/apps/client/dist/assets/github-dark-C895GGrm.js +1 -0
- package/apps/client/dist/assets/github-dark-default-CM8LCIj6.js +1 -0
- package/apps/client/dist/assets/github-dark-dimmed-jPx1V1fR.js +1 -0
- package/apps/client/dist/assets/github-dark-high-contrast-UN5YjL_Z.js +1 -0
- package/apps/client/dist/assets/github-light-B4HDwToD.js +1 -0
- package/apps/client/dist/assets/github-light-default-CfC59JYV.js +1 -0
- package/apps/client/dist/assets/github-light-high-contrast-C3edEHcK.js +1 -0
- package/apps/client/dist/assets/glimmer-js-AZUa7WSK.js +1 -0
- package/apps/client/dist/assets/glimmer-ts-DHGWHJGF.js +1 -0
- package/apps/client/dist/assets/graphql-BHtseKAV.js +1 -0
- package/apps/client/dist/assets/graphql-f69H1Mm0.js +1 -0
- package/apps/client/dist/assets/gruvbox-dark-hard-BdGOuxq8.js +1 -0
- package/apps/client/dist/assets/gruvbox-dark-medium-CmygtSMi.js +1 -0
- package/apps/client/dist/assets/gruvbox-dark-soft-BJH4XuY9.js +1 -0
- package/apps/client/dist/assets/gruvbox-light-hard-BkSILF4E.js +1 -0
- package/apps/client/dist/assets/gruvbox-light-medium-DiZUfgdz.js +1 -0
- package/apps/client/dist/assets/gruvbox-light-soft-CRCTnbIj.js +1 -0
- package/apps/client/dist/assets/handlebars-84NJRWd6.js +1 -0
- package/apps/client/dist/assets/handlebars-BVu8OfJT.js +1 -0
- package/apps/client/dist/assets/handlebars-rpJMsJkV.js +1 -0
- package/apps/client/dist/assets/highlights-GmPC35Dk.js +3 -0
- package/apps/client/dist/assets/horizon-DUI96lQn.js +1 -0
- package/apps/client/dist/assets/horizon-bright-COxh1lHf.js +1 -0
- package/apps/client/dist/assets/houston-DduE73P7.js +1 -0
- package/apps/client/dist/assets/html-86U_8x8W.js +1 -0
- package/apps/client/dist/assets/http-BzlnjdId.js +1 -0
- package/apps/client/dist/assets/hurl-Dkq4AWQM.js +1 -0
- package/apps/client/dist/assets/image-viewer-UqY5jZoH.js +1 -0
- package/apps/client/dist/assets/index-4D8bvVNO.css +2 -0
- package/apps/client/dist/assets/index-B9iE7Ipt.js +440 -0
- package/apps/client/dist/assets/info-OHQRW6UA-CX5U2oYH.js +1 -0
- package/apps/client/dist/assets/infoDiagram-MVDRKAX5-Bn_nhAj4.js +2 -0
- package/apps/client/dist/assets/ishikawaDiagram-HPEHV2GE-EEEjU4JC.js +70 -0
- package/apps/client/dist/assets/javascript-MI6i-TIC.js +1 -0
- package/apps/client/dist/assets/journeyDiagram-BOSHW7O7-BGdjqgu7.js +139 -0
- package/apps/client/dist/assets/julia-BOXuaaFP.js +1 -0
- package/apps/client/dist/assets/julia-D2GhB5NK.js +1 -0
- package/apps/client/dist/assets/just-CNehvE3T.js +1 -0
- package/apps/client/dist/assets/kanagawa-dragon-BHDhSKDf.js +1 -0
- package/apps/client/dist/assets/kanagawa-lotus-NJjGXXql.js +1 -0
- package/apps/client/dist/assets/kanagawa-wave-DsGe2Uqk.js +1 -0
- package/apps/client/dist/assets/kanban-definition-FNSA4HC5-CCamSDBx.js +89 -0
- package/apps/client/dist/assets/katex-MEuSR36T.js +257 -0
- package/apps/client/dist/assets/langs-DdlLhtBb.js +1 -0
- package/apps/client/dist/assets/langs-DssLtjmH.js +2 -0
- package/apps/client/dist/assets/laserwave-DYV0fvJ_.js +1 -0
- package/apps/client/dist/assets/lib-CVj84X52.js +1 -0
- package/apps/client/dist/assets/light-plus-FTnIShls.js +1 -0
- package/apps/client/dist/assets/line-Bu1sWnUo.js +1 -0
- package/apps/client/dist/assets/linear-DYsT-3Lb.js +1 -0
- package/apps/client/dist/assets/liquid-Dcyd1pkL.js +1 -0
- package/apps/client/dist/assets/liquid-IaJ0YhNX.js +1 -0
- package/apps/client/dist/assets/loader-Dbltcnnq.js +1 -0
- package/apps/client/dist/assets/marko-CfhbF-db.js +1 -0
- package/apps/client/dist/assets/material-theme-IcIb8QNx.js +1 -0
- package/apps/client/dist/assets/material-theme-darker-B_f2vxdL.js +1 -0
- package/apps/client/dist/assets/material-theme-lighter-CR2Q-4Hp.js +1 -0
- package/apps/client/dist/assets/material-theme-ocean-BX6hAJ_y.js +1 -0
- package/apps/client/dist/assets/material-theme-palenight-B6DWAotd.js +1 -0
- package/apps/client/dist/assets/mdc-DhVOCnij.js +1 -0
- package/apps/client/dist/assets/mdx-DR7vQeQJ.js +1 -0
- package/apps/client/dist/assets/mermaid-parser.core-BG13oDRS.js +4 -0
- package/apps/client/dist/assets/mermaid.core-uOPv_K4R.js +11 -0
- package/apps/client/dist/assets/min-dark-DECtZcqS.js +1 -0
- package/apps/client/dist/assets/min-light-qRIVcaqf.js +1 -0
- package/apps/client/dist/assets/mindmap-definition-6OY57UG3-Cgqgdenm.js +98 -0
- package/apps/client/dist/assets/monokai-CLmrJ-8t.js +1 -0
- package/apps/client/dist/assets/night-owl-eR4AsyAP.js +1 -0
- package/apps/client/dist/assets/night-owl-light-C74n5ti-.js +1 -0
- package/apps/client/dist/assets/nim-BWqWzPXS.js +1 -0
- package/apps/client/dist/assets/nim-z4nhPWHr.js +1 -0
- package/apps/client/dist/assets/nord-D4wy7NEP.js +1 -0
- package/apps/client/dist/assets/one-dark-pro-28TLzoS8.js +1 -0
- package/apps/client/dist/assets/one-light-C0UY_Fh7.js +1 -0
- package/apps/client/dist/assets/org-CBz7NCei.js +1 -0
- package/apps/client/dist/assets/packet-JDAUHWVQ-CdIH3N-s.js +1 -0
- package/apps/client/dist/assets/pegDiagram-ECIUJNBX-BkqJpvAH.js +1 -0
- package/apps/client/dist/assets/perl-CzlmyNhr.js +1 -0
- package/apps/client/dist/assets/perl-v6oVIuIV.js +1 -0
- package/apps/client/dist/assets/php-CdlAzAok.js +1 -0
- package/apps/client/dist/assets/php-Dwzc01lm.js +1 -0
- package/apps/client/dist/assets/pie-XZMESJXO-CLZw5nWA.js +1 -0
- package/apps/client/dist/assets/pieDiagram-GNMPY74T-4UCGP8Ge.js +39 -0
- package/apps/client/dist/assets/pierre-dark-fPlffE7i.js +1 -0
- package/apps/client/dist/assets/pierre-dark-protanopia-deuteranopia-BmjibgrW.js +1 -0
- package/apps/client/dist/assets/pierre-dark-soft-Cng2SYKc.js +1 -0
- package/apps/client/dist/assets/pierre-dark-tritanopia-DneQ5i7L.js +1 -0
- package/apps/client/dist/assets/pierre-dark-vibrant-BUK9Y-N_.js +1 -0
- package/apps/client/dist/assets/pierre-light-BvcXQJIj.js +1 -0
- package/apps/client/dist/assets/pierre-light-protanopia-deuteranopia-Cd5nk0bp.js +1 -0
- package/apps/client/dist/assets/pierre-light-soft-BvU23vks.js +1 -0
- package/apps/client/dist/assets/pierre-light-tritanopia-BSHccQzI.js +1 -0
- package/apps/client/dist/assets/pierre-light-vibrant-BgMZEwQI.js +1 -0
- package/apps/client/dist/assets/plastic-B2V_PDVk.js +1 -0
- package/apps/client/dist/assets/poimandres-DB9-pI6r.js +1 -0
- package/apps/client/dist/assets/preview-dialog-BLxM80N3.js +273 -0
- package/apps/client/dist/assets/python-CiSQgsVi.js +1 -0
- package/apps/client/dist/assets/quadrantDiagram-D57K4MC3-OpmZZ4aE.js +7 -0
- package/apps/client/dist/assets/radar-ABXABTNO-Dv4qQMAM.js +1 -0
- package/apps/client/dist/assets/railroad-I3PHUGI6-DbgxsnvR.js +1 -0
- package/apps/client/dist/assets/railroad-abnf-LNEFI6M7-jqSfr1iQ.js +1 -0
- package/apps/client/dist/assets/railroad-ebnf-DWYD2UWJ-CY45PpoW.js +1 -0
- package/apps/client/dist/assets/railroad-peg-JR7BVNR7-KjecyoZ0.js +1 -0
- package/apps/client/dist/assets/railroadDiagram-Y72NRBL7-DJhSLIlf.js +1 -0
- package/apps/client/dist/assets/razor-WdSU-o-W.js +1 -0
- package/apps/client/dist/assets/react-BgpkckXP.js +1418 -0
- package/apps/client/dist/assets/red-CqYzoXtd.js +1 -0
- package/apps/client/dist/assets/renderTokenLines-DSu8n2ID.js +3 -0
- package/apps/client/dist/assets/requirementDiagram-EQYSW5RA-zXUAtY1M.js +84 -0
- package/apps/client/dist/assets/rolldown-runtime-COiEfhsA.js +1 -0
- package/apps/client/dist/assets/rose-pine-C3zjVKxG.js +1 -0
- package/apps/client/dist/assets/rose-pine-dawn-C72QYfqa.js +1 -0
- package/apps/client/dist/assets/rose-pine-moon-CSM8ewhO.js +1 -0
- package/apps/client/dist/assets/rst-DkwJts6_.js +1 -0
- package/apps/client/dist/assets/ruby-Ch9KWVk-.js +1 -0
- package/apps/client/dist/assets/ruby-CzeY-soD.js +1 -0
- package/apps/client/dist/assets/sankeyDiagram-SY24JHO5-C0YJuVBA.js +40 -0
- package/apps/client/dist/assets/sequenceDiagram-BLEHNHQU-BTa6Ffxr.js +169 -0
- package/apps/client/dist/assets/shiki-S2UQ6acJ.js +2 -0
- package/apps/client/dist/assets/slack-dark-Dtzi51su.js +1 -0
- package/apps/client/dist/assets/slack-ochin-Bb7oPExa.js +1 -0
- package/apps/client/dist/assets/snazzy-light-DXgiwzKu.js +1 -0
- package/apps/client/dist/assets/solarized-dark-BKOT3ICq.js +1 -0
- package/apps/client/dist/assets/solarized-light--Lk5pOfE.js +1 -0
- package/apps/client/dist/assets/src-BWF7jMDv.js +1 -0
- package/apps/client/dist/assets/stateDiagram-v2-A6IESKWZ-eBinC1rh.js +291 -0
- package/apps/client/dist/assets/stream-tokenizer-DZPEnOzC.js +4 -0
- package/apps/client/dist/assets/svelte-CdeT-Ich.js +1 -0
- package/apps/client/dist/assets/swimlanes-B3ENRKFQ-06efHDrK.js +1 -0
- package/apps/client/dist/assets/swimlanesDiagram-AYQRV4AK-Ibmp2v-S.js +8 -0
- package/apps/client/dist/assets/synthwave-84-BJJFg-sc.js +1 -0
- package/apps/client/dist/assets/templ-BK6TuyP2.js +1 -0
- package/apps/client/dist/assets/themes-DcJzud8j.js +2 -0
- package/apps/client/dist/assets/timeline-definition-JXYKGLGB-kbeZDPo4.js +120 -0
- package/apps/client/dist/assets/tokyo-night-DvpptEDd.js +1 -0
- package/apps/client/dist/assets/tooltip-wzGTbg8k.js +1 -0
- package/apps/client/dist/assets/treeView-D4JQ5SDB-DgutxWB1.js +1 -0
- package/apps/client/dist/assets/treemap-SAJKECNS-BgYxrllW.js +1 -0
- package/apps/client/dist/assets/ts-tags-f8zILNTk.js +1 -0
- package/apps/client/dist/assets/twig-D5Ply2R9.js +1 -0
- package/apps/client/dist/assets/twig-DNGVvIfD.js +1 -0
- package/apps/client/dist/assets/typescript-Bjj6HU8L.js +1 -0
- package/apps/client/dist/assets/typescript-Dy13l_qr.js +1 -0
- package/apps/client/dist/assets/typst-lvx9SlE8.js +1 -0
- package/apps/client/dist/assets/unwrapDefault-ByDmBtHB.js +1 -0
- package/apps/client/dist/assets/usecaseDiagram-WPOLBNNX-Lgq7QMn_.js +328 -0
- package/apps/client/dist/assets/utils-U6QfaJBO.js +1 -0
- package/apps/client/dist/assets/vennDiagram-Q3Y3IDCW-DHgNQPDh.js +34 -0
- package/apps/client/dist/assets/vesper-C1rBZbON.js +1 -0
- package/apps/client/dist/assets/video-viewer-DymHqMFS.js +1 -0
- package/apps/client/dist/assets/vitesse-black-Sqvrs2Sw.js +1 -0
- package/apps/client/dist/assets/vitesse-dark-BWf_ZQtP.js +1 -0
- package/apps/client/dist/assets/vitesse-light-Cqenv4Qv.js +1 -0
- package/apps/client/dist/assets/vue-BZ4tMxTK.js +1 -0
- package/apps/client/dist/assets/vue-vine-DnB37twT.js +1 -0
- package/apps/client/dist/assets/wardley-7MLQ67FV-Duawt6HR.js +1 -0
- package/apps/client/dist/assets/wardleyDiagram-IVAIDKWA-DbqWbfjC.js +78 -0
- package/apps/client/dist/assets/xml-AovvXo6A.js +1 -0
- package/apps/client/dist/assets/xychartDiagram-4URNHDU4-D60bXB-G.js +7 -0
- package/apps/client/dist/assets/yaml-EESuZNdc.js +1 -0
- package/apps/client/dist/assets/zoomable-image-CkjasN2N.js +1 -0
- package/apps/client/dist/assets/zoomable-image-DRthozgI.js +41 -0
- package/apps/client/dist/index.html +35 -0
- package/apps/client/dist/sw.js +1 -0
- package/apps/server/dist/main.mjs +63 -105
- package/apps/server/dist/main.mjs.map +1 -1
- package/apps/server/drizzle/20261030220224_project_hidden/migration.sql +1 -0
- package/apps/server/drizzle/20261030220224_project_hidden/snapshot.json +325 -0
- package/package.json +1 -1
- package/apps/web/dist/assets/abnfDiagram-WEYOIA3C-CNZkoxwt.js +0 -1
- package/apps/web/dist/assets/accounts-DFhyPLRl.js +0 -513
- package/apps/web/dist/assets/apl-Dio8Ke0X.js +0 -1
- package/apps/web/dist/assets/arc-DgcGdgmL.js +0 -1
- package/apps/web/dist/assets/architecture-WOLXFQ4H-O--ui1FL.js +0 -1
- package/apps/web/dist/assets/architectureDiagram-ZHVYKT53-Bt5qygpd.js +0 -36
- package/apps/web/dist/assets/astro-CN6YWUG3.js +0 -1
- package/apps/web/dist/assets/audio-player-dA2OYPGm.js +0 -1
- package/apps/web/dist/assets/blade-BrDpNfUX.js +0 -1
- package/apps/web/dist/assets/blockDiagram-RJAE7QA3-BDcALlM7.js +0 -140
- package/apps/web/dist/assets/button-CvTVUHeO.js +0 -1
- package/apps/web/dist/assets/c4Diagram-XDPPPE54-DltmZnfl.js +0 -38
- package/apps/web/dist/assets/channel-BiaErSWu.js +0 -1
- package/apps/web/dist/assets/chunk-24IY7LWP-BnbC-kCW.js +0 -1
- package/apps/web/dist/assets/chunk-2E7WHVMD-DI9Z3LRJ.js +0 -88
- package/apps/web/dist/assets/chunk-3M4EKCLJ-DOMgvaXT.js +0 -1
- package/apps/web/dist/assets/chunk-4EMNKR2T-Bmu5iPEB.js +0 -1
- package/apps/web/dist/assets/chunk-4S7OKTRW-Bg7nzAWG.js +0 -1
- package/apps/web/dist/assets/chunk-53FOQ5SW-f76P46nL.js +0 -1
- package/apps/web/dist/assets/chunk-55XCU76K-DsrsQaHP.js +0 -1
- package/apps/web/dist/assets/chunk-7S6XSTFO-VvdR34BD.js +0 -2
- package/apps/web/dist/assets/chunk-AQDTSKZB-DWCLLcEu.js +0 -72
- package/apps/web/dist/assets/chunk-BP2KR52E-CwyHPMMJ.js +0 -2
- package/apps/web/dist/assets/chunk-DSNLSHJZ-Npz5XPWZ.js +0 -129
- package/apps/web/dist/assets/chunk-EJLWFMJV-DyjKClu9.js +0 -2
- package/apps/web/dist/assets/chunk-F6S3BTY2-CZGFqKcE.js +0 -2
- package/apps/web/dist/assets/chunk-HAGFOTED-B1IVU9Z4.js +0 -62
- package/apps/web/dist/assets/chunk-HNE4Q36P-ByoLUQMm.js +0 -1
- package/apps/web/dist/assets/chunk-KPI5JJXK-CYaUTtMz.js +0 -1
- package/apps/web/dist/assets/chunk-LNGE3PJU-Cz3NAIRA.js +0 -34
- package/apps/web/dist/assets/chunk-NGNAAXSQ-C2Wy9Xmz.js +0 -136
- package/apps/web/dist/assets/chunk-NQOKRVIF-B4RCKBlg.js +0 -213
- package/apps/web/dist/assets/chunk-OD3NTWWA-tWtUB_cI.js +0 -1
- package/apps/web/dist/assets/chunk-OYAV6JZA-rT8O_-D6.js +0 -1
- package/apps/web/dist/assets/chunk-QNH66VMT-BbxTKInC.js +0 -1
- package/apps/web/dist/assets/chunk-TPMEZKFX-mvOucSjo.js +0 -1
- package/apps/web/dist/assets/chunk-UHW7PFBP-Cu9Ayl_R.js +0 -1
- package/apps/web/dist/assets/chunk-VPELOWWC-Dw8jWE1Y.js +0 -1
- package/apps/web/dist/assets/chunk-VQ5W62QI-yc2D7bI8.js +0 -1
- package/apps/web/dist/assets/chunk-VTWWFHGB-CErZyUMc.js +0 -1
- package/apps/web/dist/assets/chunk-VZTHESGH-BsQ8KQ39.js +0 -1
- package/apps/web/dist/assets/chunk-WQQL4CDK-BAxY1EoE.js +0 -10
- package/apps/web/dist/assets/chunk-XXDRQBXY-RlzOQ08v.js +0 -1
- package/apps/web/dist/assets/chunk-YK26KJH5-CFTvfUrJ.js +0 -1
- package/apps/web/dist/assets/chunk-YZO67HFG-B_UXK566.js +0 -1
- package/apps/web/dist/assets/chunk-ZAUX2LTX-BaD-GxqC.js +0 -1
- package/apps/web/dist/assets/chunk-ZCHMQSOR-BoFxnrLn.js +0 -2
- package/apps/web/dist/assets/chunk-ZO67DCNQ-DQMJSBMv.js +0 -2
- package/apps/web/dist/assets/classDiagram-v2-4MYWR3UA-CrgsmZ1r.js +0 -217
- package/apps/web/dist/assets/cose-bilkent-JH36ORCC-Ci-t6eKT.js +0 -1
- package/apps/web/dist/assets/crystal-DEF7AEJQ.js +0 -1
- package/apps/web/dist/assets/cynefin-EF2NZ3EQ-B22Il0Q0.js +0 -1
- package/apps/web/dist/assets/cynefinDiagram-WF24UDRP-Boik6NMW.js +0 -62
- package/apps/web/dist/assets/cytoscape.esm-BegBNzOV.js +0 -321
- package/apps/web/dist/assets/dagre-NK4GIZVX-BSfLeunL.js +0 -4
- package/apps/web/dist/assets/diagram-CBK3MWTC-BHJqlY6f.js +0 -24
- package/apps/web/dist/assets/diagram-I5XIIV2D-B_jxetms.js +0 -24
- package/apps/web/dist/assets/diagram-ODIL2UCW-DfqD5uqI.js +0 -30
- package/apps/web/dist/assets/diagram-PFBEJUXE-1aq8qGYY.js +0 -3
- package/apps/web/dist/assets/diagram-RJA3I4VV-KG9CFGTL.js +0 -41
- package/apps/web/dist/assets/diagram-TYUNFSNR-Do2jo9yU.js +0 -200
- package/apps/web/dist/assets/dialog-BferUxFi.js +0 -273
- package/apps/web/dist/assets/dist-BF1ehGE9.js +0 -1
- package/apps/web/dist/assets/dist-B_J_HbC0.js +0 -1
- package/apps/web/dist/assets/dist-BrDshb6Z.js +0 -153
- package/apps/web/dist/assets/ebnfDiagram-V4P3TTPT-D2ts5XpU.js +0 -1
- package/apps/web/dist/assets/ecl-D05T4iGw.js +0 -1
- package/apps/web/dist/assets/edge-B_SBzXGF.js +0 -1
- package/apps/web/dist/assets/editor-dialog-Dsw9vpjf.js +0 -52
- package/apps/web/dist/assets/editor.api-4LH2ijIL.js +0 -908
- package/apps/web/dist/assets/editor.worker-BmdWdrHZ.js +0 -33
- package/apps/web/dist/assets/editor.worker-D2ouzCu8.js +0 -1
- package/apps/web/dist/assets/elk-QONTBCTQ-B_GGAzMO.js +0 -27
- package/apps/web/dist/assets/erDiagram-KYQIGQAA-2dqvdzye.js +0 -99
- package/apps/web/dist/assets/erb-BjlLGk-_.js +0 -1
- package/apps/web/dist/assets/eventmodeling-K75KTNOO-CXHQFMgp.js +0 -1
- package/apps/web/dist/assets/flowDiagram-IUGLLWBU-CtZHqT3f.js +0 -1
- package/apps/web/dist/assets/freemarker2-6NYS9HqW.js +0 -3
- package/apps/web/dist/assets/ganttDiagram-R7GPNTJY-BqiF1UBm.js +0 -292
- package/apps/web/dist/assets/gitGraph-VSP46ZUC-TdWHDRg-.js +0 -1
- package/apps/web/dist/assets/gitGraphDiagram-PDYL7XHY-CmG5ZO6p.js +0 -106
- package/apps/web/dist/assets/glimmer-js-CIdbWayl.js +0 -1
- package/apps/web/dist/assets/glimmer-ts-B16xCo2k.js +0 -1
- package/apps/web/dist/assets/graphql-BZEhxNwM.js +0 -1
- package/apps/web/dist/assets/graphql-DEIChqxY.js +0 -1
- package/apps/web/dist/assets/handlebars-DOeNnhTE.js +0 -1
- package/apps/web/dist/assets/handlebars-WZCg7K7Q.js +0 -1
- package/apps/web/dist/assets/handlebars-g-3gLrXt.js +0 -1
- package/apps/web/dist/assets/html-BwGTVsqZ.js +0 -1
- package/apps/web/dist/assets/http-BjrBtiM6.js +0 -1
- package/apps/web/dist/assets/hurl-B4P9s9G3.js +0 -1
- package/apps/web/dist/assets/image-viewer-H78MKvch.js +0 -1
- package/apps/web/dist/assets/index-BYsSCxSd.css +0 -2
- package/apps/web/dist/assets/index-DHTZLQW3.js +0 -9
- package/apps/web/dist/assets/info-OHQRW6UA-vNA4W1BY.js +0 -1
- package/apps/web/dist/assets/infoDiagram-MVDRKAX5-BKX9UC-k.js +0 -2
- package/apps/web/dist/assets/ishikawaDiagram-HPEHV2GE-B4qnWXRg.js +0 -70
- package/apps/web/dist/assets/javascript-Dj-Vzbp-.js +0 -1
- package/apps/web/dist/assets/journeyDiagram-BOSHW7O7-BiKpcTEm.js +0 -139
- package/apps/web/dist/assets/julia-C8a5hZkp.js +0 -1
- package/apps/web/dist/assets/julia-hqywDEUR.js +0 -1
- package/apps/web/dist/assets/just-CP_wDfXI.js +0 -1
- package/apps/web/dist/assets/kanban-definition-FNSA4HC5-D0QGHPZw.js +0 -89
- package/apps/web/dist/assets/katex-B_JcIwqj.js +0 -257
- package/apps/web/dist/assets/line-QLqjjjjp.js +0 -1
- package/apps/web/dist/assets/linear-DzP0d4la.js +0 -1
- package/apps/web/dist/assets/liquid-CQNtsgCr.js +0 -1
- package/apps/web/dist/assets/liquid-DDSU3ltH.js +0 -1
- package/apps/web/dist/assets/marko-DPS0EkZ1.js +0 -1
- package/apps/web/dist/assets/mdc-C6srEd4p.js +0 -1
- package/apps/web/dist/assets/mdx-YllfWysm.js +0 -1
- package/apps/web/dist/assets/mermaid-parser.core-BHOBNwvf.js +0 -4
- package/apps/web/dist/assets/mermaid.core-BvdElKsv.js +0 -11
- package/apps/web/dist/assets/mindmap-definition-6OY57UG3-BXYDkcmu.js +0 -98
- package/apps/web/dist/assets/nim-DN3EGtL-.js +0 -1
- package/apps/web/dist/assets/nim-ZjzS1dcU.js +0 -1
- package/apps/web/dist/assets/org-BRAbLUOJ.js +0 -1
- package/apps/web/dist/assets/packet-JDAUHWVQ-B8hYuedA.js +0 -1
- package/apps/web/dist/assets/pegDiagram-ECIUJNBX-CKUDNsQa.js +0 -1
- package/apps/web/dist/assets/perl-Ciba4h2-.js +0 -1
- package/apps/web/dist/assets/perl-sgZsTtaf.js +0 -1
- package/apps/web/dist/assets/php-D9QpVhjP.js +0 -1
- package/apps/web/dist/assets/php-DBfnyu6d.js +0 -1
- package/apps/web/dist/assets/pie-XZMESJXO-Dot5dfKq.js +0 -1
- package/apps/web/dist/assets/pieDiagram-GNMPY74T-CYBpcOWI.js +0 -39
- package/apps/web/dist/assets/preview-dialog-CXQtRB9z.js +0 -1
- package/apps/web/dist/assets/python-Bsfjs4Fs.js +0 -1
- package/apps/web/dist/assets/quadrantDiagram-D57K4MC3-Ce4rstAB.js +0 -7
- package/apps/web/dist/assets/radar-ABXABTNO-B-JNDxsg.js +0 -1
- package/apps/web/dist/assets/railroad-I3PHUGI6-CZyDVcgN.js +0 -1
- package/apps/web/dist/assets/railroad-abnf-LNEFI6M7-Vj_R5cg2.js +0 -1
- package/apps/web/dist/assets/railroad-ebnf-DWYD2UWJ-CUdwkvqU.js +0 -1
- package/apps/web/dist/assets/railroad-peg-JR7BVNR7-Cx8B3Fw_.js +0 -1
- package/apps/web/dist/assets/railroadDiagram-Y72NRBL7-DJFwL-gy.js +0 -1
- package/apps/web/dist/assets/razor-3MUz77_n.js +0 -1
- package/apps/web/dist/assets/react-BzGNAlhs.js +0 -1416
- package/apps/web/dist/assets/requirementDiagram-EQYSW5RA-BRGd7bW2.js +0 -84
- package/apps/web/dist/assets/rolldown-runtime-Dd_uD5pT.js +0 -1
- package/apps/web/dist/assets/rst-BCaXiUC4.js +0 -1
- package/apps/web/dist/assets/ruby-C4ARPOX3.js +0 -1
- package/apps/web/dist/assets/ruby-Dl3oLoVp.js +0 -1
- package/apps/web/dist/assets/sankeyDiagram-SY24JHO5-K6n9GTvI.js +0 -40
- package/apps/web/dist/assets/sequenceDiagram-BLEHNHQU-C5fTKXFr.js +0 -169
- package/apps/web/dist/assets/src-BbHDS76q.js +0 -1
- package/apps/web/dist/assets/stateDiagram-v2-A6IESKWZ-DmuliVkN.js +0 -291
- package/apps/web/dist/assets/svelte-BaCIHHWd.js +0 -1
- package/apps/web/dist/assets/swimlanes-B3ENRKFQ-C6184yrk.js +0 -1
- package/apps/web/dist/assets/swimlanesDiagram-AYQRV4AK-C7v5ZG8a.js +0 -8
- package/apps/web/dist/assets/templ-BfgLc4ra.js +0 -1
- package/apps/web/dist/assets/timeline-definition-JXYKGLGB-9zgkFWSz.js +0 -120
- package/apps/web/dist/assets/tooltip-BVy8llWO.js +0 -1
- package/apps/web/dist/assets/treeView-D4JQ5SDB-C4nFWZ36.js +0 -1
- package/apps/web/dist/assets/treemap-SAJKECNS-BtKhU7nu.js +0 -1
- package/apps/web/dist/assets/ts-tags-DLz2GTd3.js +0 -1
- package/apps/web/dist/assets/twig-HaHkB3PH.js +0 -1
- package/apps/web/dist/assets/twig-lMQ09cjh.js +0 -1
- package/apps/web/dist/assets/typescript-CfCJo9p3.js +0 -1
- package/apps/web/dist/assets/typescript-fNZ3iur6.js +0 -1
- package/apps/web/dist/assets/typst-DDNSzYFN.js +0 -1
- package/apps/web/dist/assets/usecaseDiagram-WPOLBNNX-GhuLCvVh.js +0 -328
- package/apps/web/dist/assets/utils-DPxKzVJp.js +0 -1
- package/apps/web/dist/assets/vennDiagram-Q3Y3IDCW-CkqSz3Ut.js +0 -34
- package/apps/web/dist/assets/video-viewer-Dc2ZMyL5.js +0 -1
- package/apps/web/dist/assets/vue-qH43U_rv.js +0 -1
- package/apps/web/dist/assets/vue-vine-6XI2pIvQ.js +0 -1
- package/apps/web/dist/assets/wardley-7MLQ67FV-zgQ1s-nD.js +0 -1
- package/apps/web/dist/assets/wardleyDiagram-IVAIDKWA-CQSNfHYl.js +0 -78
- package/apps/web/dist/assets/xml-S-oLW5B5.js +0 -1
- package/apps/web/dist/assets/xychartDiagram-4URNHDU4-oZoMdVOh.js +0 -7
- package/apps/web/dist/assets/yaml-DlmqY7sN.js +0 -1
- package/apps/web/dist/assets/zoomable-image-Cevmy_zk.js +0 -41
- package/apps/web/dist/assets/zoomable-image-Dugv4kyQ.js +0 -1
- package/apps/web/dist/index.html +0 -28
- package/apps/web/dist/sw.js +0 -1
- /package/apps/{web → client}/dist/apple-touch-icon.png +0 -0
- /package/apps/{web → client}/dist/assets/CaskaydiaCove-Bold-EtG3C8NJ.woff2 +0 -0
- /package/apps/{web → client}/dist/assets/CaskaydiaCove-Regular-C8p8BuDw.woff2 +0 -0
- /package/apps/{web → client}/dist/assets/FiraCode-Bold-CWkMdXEH.woff2 +0 -0
- /package/apps/{web → client}/dist/assets/FiraCode-Regular-DlIV_a-6.woff2 +0 -0
- /package/apps/{web → client}/dist/assets/Hack-Bold-CJ2nw9Fn.woff2 +0 -0
- /package/apps/{web → client}/dist/assets/Hack-Regular-DQT7wDXD.woff2 +0 -0
- /package/apps/{web → client}/dist/assets/JetBrainsMono-Bold-C3RVijod.woff2 +0 -0
- /package/apps/{web → client}/dist/assets/JetBrainsMono-Regular-BhNseNRl.woff2 +0 -0
- /package/apps/{web → client}/dist/assets/MinusSignIcon-DGIm2EHe.js +0 -0
- /package/apps/{web → client}/dist/assets/abap-08VXUWAP.js +0 -0
- /package/apps/{web → client}/dist/assets/abap-CLvhMVsD.js +0 -0
- /package/apps/{web → client}/dist/assets/actionscript-3-Cs6JJXT5.js +0 -0
- /package/apps/{web → client}/dist/assets/ada-X3Y2mlq2.js +0 -0
- /package/apps/{web → client}/dist/assets/ahk-DwADkxyd.js +0 -0
- /package/apps/{web → client}/dist/assets/ahk2-_6rzW9BS.js +0 -0
- /package/apps/{web → client}/dist/assets/andromeeda-vGVdxbeo.js +0 -0
- /package/apps/{web → client}/dist/assets/angular-html-BswFT_28.js +0 -0
- /package/apps/{web → client}/dist/assets/angular-html-DOLkzBtu.js +0 -0
- /package/apps/{web → client}/dist/assets/angular-ts-DOMhGxLQ.js +0 -0
- /package/apps/{web → client}/dist/assets/apache-U0d_L8uA.js +0 -0
- /package/apps/{web → client}/dist/assets/apex-BWPQTe0t.js +0 -0
- /package/apps/{web → client}/dist/assets/apex-KFGFyKwG.js +0 -0
- /package/apps/{web → client}/dist/assets/applescript-CCn79oCD.js +0 -0
- /package/apps/{web → client}/dist/assets/ara-4CJ0cIlV.js +0 -0
- /package/apps/{web → client}/dist/assets/array-BifhSqXX.js +0 -0
- /package/apps/{web → client}/dist/assets/asciidoc-SCjQUq34.js +0 -0
- /package/apps/{web → client}/dist/assets/asm-Cmm7eHzH.js +0 -0
- /package/apps/{web → client}/dist/assets/aurora-x-CDeNXAV0.js +0 -0
- /package/apps/{web → client}/dist/assets/awk-BWXHIvNe.js +0 -0
- /package/apps/{web → client}/dist/assets/ayu-dark-DluEY0Gj.js +0 -0
- /package/apps/{web → client}/dist/assets/ayu-light-C3h-C4tm.js +0 -0
- /package/apps/{web → client}/dist/assets/ayu-mirage-Bqwy1Gya.js +0 -0
- /package/apps/{web → client}/dist/assets/azcli-Bc_sGQ0U.js +0 -0
- /package/apps/{web → client}/dist/assets/ballerina-B7ZEbQpA.js +0 -0
- /package/apps/{web → client}/dist/assets/bat-C7sJWglS.js +0 -0
- /package/apps/{web → client}/dist/assets/bat-HFWzIrao.js +0 -0
- /package/apps/{web → client}/dist/assets/bat-i0X4ZdIN.js +0 -0
- /package/apps/{web → client}/dist/assets/beancount-C2IN4Vk8.js +0 -0
- /package/apps/{web → client}/dist/assets/berry-DKpUyyne.js +0 -0
- /package/apps/{web → client}/dist/assets/bibtex-Conh3HYz.js +0 -0
- /package/apps/{web → client}/dist/assets/bibtex-DUQXB5kJ.js +0 -0
- /package/apps/{web → client}/dist/assets/bicep-B5-_aFwp.js +0 -0
- /package/apps/{web → client}/dist/assets/bicep-CUHmPFLl.js +0 -0
- /package/apps/{web → client}/dist/assets/bird2-CYIUgYqB.js +0 -0
- /package/apps/{web → client}/dist/assets/bsl-gRq8cI6V.js +0 -0
- /package/apps/{web → client}/dist/assets/c-Cz4nF6n_.js +0 -0
- /package/apps/{web → client}/dist/assets/c-SSSlmE39.js +0 -0
- /package/apps/{web → client}/dist/assets/c3-D0apG41V.js +0 -0
- /package/apps/{web → client}/dist/assets/cadence-CQ2zXKGN.js +0 -0
- /package/apps/{web → client}/dist/assets/cairo-D66nqRlU.js +0 -0
- /package/apps/{web → client}/dist/assets/cameligo-DMUM7wLl.js +0 -0
- /package/apps/{web → client}/dist/assets/catppuccin-frappe-C9Q5zVZY.js +0 -0
- /package/apps/{web → client}/dist/assets/catppuccin-latte-CtsyrtPq.js +0 -0
- /package/apps/{web → client}/dist/assets/catppuccin-macchiato-R8nAf1vR.js +0 -0
- /package/apps/{web → client}/dist/assets/catppuccin-mocha-DjuaAJKi.js +0 -0
- /package/apps/{web → client}/dist/assets/chapel-C1sUNn9S.js +0 -0
- /package/apps/{web → client}/dist/assets/chunk-2Q5K7J3B-C1jixKkw.js +0 -0
- /package/apps/{web → client}/dist/assets/chunk-5VM5RSS4-ZNzvKenW.js +0 -0
- /package/apps/{web → client}/dist/assets/chunk-DUW6YSOI-Dgx8z5s3.js +0 -0
- /package/apps/{web → client}/dist/assets/chunk-J5ZVWO5B-oDCd-gWO.js +0 -0
- /package/apps/{web → client}/dist/assets/chunk-JWPE2WC7-DVXcaiue.js +0 -0
- /package/apps/{web → client}/dist/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +0 -0
- /package/apps/{web → client}/dist/assets/clarity-CtfBBspg.js +0 -0
- /package/apps/{web → client}/dist/assets/clojure-CAE6QLVB.js +0 -0
- /package/apps/{web → client}/dist/assets/clojure-Cm7r79vr.js +0 -0
- /package/apps/{web → client}/dist/assets/clojure-zIjcJonk.js +0 -0
- /package/apps/{web → client}/dist/assets/cmake-Cpsd-0Y4.js +0 -0
- /package/apps/{web → client}/dist/assets/cmake-T_kMSWuN.js +0 -0
- /package/apps/{web → client}/dist/assets/cobol-BvqUwMCV.js +0 -0
- /package/apps/{web → client}/dist/assets/codeowners-C8r90Shi.js +0 -0
- /package/apps/{web → client}/dist/assets/codeql-oeQT6MSM.js +0 -0
- /package/apps/{web → client}/dist/assets/codicon-DF1abBS2.ttf +0 -0
- /package/apps/{web → client}/dist/assets/coffee-BSYIIMkB.js +0 -0
- /package/apps/{web → client}/dist/assets/coffee-Ba7i2nA0.js +0 -0
- /package/apps/{web → client}/dist/assets/coffee-NEqv5HL5.js +0 -0
- /package/apps/{web → client}/dist/assets/common-lisp-Cv5bFMCO.js +0 -0
- /package/apps/{web → client}/dist/assets/coq-CGaSfhwR.js +0 -0
- /package/apps/{web → client}/dist/assets/cpp-BDT6bThX.js +0 -0
- /package/apps/{web → client}/dist/assets/cpp-C7h46wYY.js +0 -0
- /package/apps/{web → client}/dist/assets/cpp-vothkh01.js +0 -0
- /package/apps/{web → client}/dist/assets/csharp-B3DbjJyj.js +0 -0
- /package/apps/{web → client}/dist/assets/csharp-BKxtCVv1.js +0 -0
- /package/apps/{web → client}/dist/assets/csharp-CFKDkFDZ.js +0 -0
- /package/apps/{web → client}/dist/assets/csp-bTuwJoIa.js +0 -0
- /package/apps/{web → client}/dist/assets/css-BGIxQoYs.js +0 -0
- /package/apps/{web → client}/dist/assets/css-DIMkf-bt.js +0 -0
- /package/apps/{web → client}/dist/assets/css-DgaLhXQH.js +0 -0
- /package/apps/{web → client}/dist/assets/csv-B_R7vXwK.js +0 -0
- /package/apps/{web → client}/dist/assets/csv-k4CB9lhx.js +0 -0
- /package/apps/{web → client}/dist/assets/cue-CE9AQfxI.js +0 -0
- /package/apps/{web → client}/dist/assets/cypher-CVaqCwHa.js +0 -0
- /package/apps/{web → client}/dist/assets/cypher-ClKdZ_lG.js +0 -0
- /package/apps/{web → client}/dist/assets/d-qD-0Kul2.js +0 -0
- /package/apps/{web → client}/dist/assets/dark-plus-Cs2F2srj.js +0 -0
- /package/apps/{web → client}/dist/assets/dart-DjhkpiWP.js +0 -0
- /package/apps/{web → client}/dist/assets/dart-_dH3dQdM.js +0 -0
- /package/apps/{web → client}/dist/assets/dart-onAF5SnQ.js +0 -0
- /package/apps/{web → client}/dist/assets/dax-BkyTk9wS.js +0 -0
- /package/apps/{web → client}/dist/assets/defaultLocale-BFoDCU3G.js +0 -0
- /package/apps/{web → client}/dist/assets/desktop-Dlh5hvp9.js +0 -0
- /package/apps/{web → client}/dist/assets/diff-CR4ZX0DC.js +0 -0
- /package/apps/{web → client}/dist/assets/diff-eeGLjE2V.js +0 -0
- /package/apps/{web → client}/dist/assets/docker-CAzcIhYn.js +0 -0
- /package/apps/{web → client}/dist/assets/docker-D0LTq72f.js +0 -0
- /package/apps/{web → client}/dist/assets/dockerfile-DZFCIeNp.js +0 -0
- /package/apps/{web → client}/dist/assets/dotenv-CuH5my32.js +0 -0
- /package/apps/{web → client}/dist/assets/dracula-BHWKrbxM.js +0 -0
- /package/apps/{web → client}/dist/assets/dracula-soft-5eyTD99u.js +0 -0
- /package/apps/{web → client}/dist/assets/dream-maker-DW3nJb8Q.js +0 -0
- /package/apps/{web → client}/dist/assets/editor-DjpsE8to.css +0 -0
- /package/apps/{web → client}/dist/assets/editor-dialog-BNFI__d8.css +0 -0
- /package/apps/{web → client}/dist/assets/elixir-6RTg0lbw.js +0 -0
- /package/apps/{web → client}/dist/assets/elixir-BL8v4QDr.js +0 -0
- /package/apps/{web → client}/dist/assets/elixir-BN3BkYei.js +0 -0
- /package/apps/{web → client}/dist/assets/elm-CC1TmzeR.js +0 -0
- /package/apps/{web → client}/dist/assets/emacs-lisp-DR2vtWaj.js +0 -0
- /package/apps/{web → client}/dist/assets/erlang-CCXss5H6.js +0 -0
- /package/apps/{web → client}/dist/assets/erlang-ir39Pet8.js +0 -0
- /package/apps/{web → client}/dist/assets/everforest-dark-sB-x3p7T.js +0 -0
- /package/apps/{web → client}/dist/assets/everforest-light-Df2xbC6M.js +0 -0
- /package/apps/{web → client}/dist/assets/fennel-DQxkIbk2.js +0 -0
- /package/apps/{web → client}/dist/assets/fish-BJitypiv.js +0 -0
- /package/apps/{web → client}/dist/assets/flow9-C5_-GSwl.js +0 -0
- /package/apps/{web → client}/dist/assets/fluent-C03EYrpw.js +0 -0
- /package/apps/{web → client}/dist/assets/fortran-fixed-form-1cK5gXa1.js +0 -0
- /package/apps/{web → client}/dist/assets/fortran-free-form-C5q_0aPq.js +0 -0
- /package/apps/{web → client}/dist/assets/fortran-free-form-uHOymLAb.js +0 -0
- /package/apps/{web → client}/dist/assets/fsharp-C37UASp4.js +0 -0
- /package/apps/{web → client}/dist/assets/fsharp-C8Ef5oNN.js +0 -0
- /package/apps/{web → client}/dist/assets/fsharp-SO2Zcqp5.js +0 -0
- /package/apps/{web → client}/dist/assets/gdresource-LxjHb83i.js +0 -0
- /package/apps/{web → client}/dist/assets/gdscript-CJEqcM-5.js +0 -0
- /package/apps/{web → client}/dist/assets/gdscript-DJFPOtzS.js +0 -0
- /package/apps/{web → client}/dist/assets/gdshader-BNp4G147.js +0 -0
- /package/apps/{web → client}/dist/assets/gdshader-kiBtQlv1.js +0 -0
- /package/apps/{web → client}/dist/assets/genie-CV2tkWYe.js +0 -0
- /package/apps/{web → client}/dist/assets/gherkin-DExj1W_8.js +0 -0
- /package/apps/{web → client}/dist/assets/ghostty-vt-CQAu1Gs5.wasm +0 -0
- /package/apps/{web → client}/dist/assets/git-commit-BAuDFD-1.js +0 -0
- /package/apps/{web → client}/dist/assets/git-commit-DaNUDv1O.js +0 -0
- /package/apps/{web → client}/dist/assets/git-rebase-Bh7mDoAc.js +0 -0
- /package/apps/{web → client}/dist/assets/git-rebase-qxk4jQ_Z.js +0 -0
- /package/apps/{web → client}/dist/assets/github-dark-C-LZuMrd.js +0 -0
- /package/apps/{web → client}/dist/assets/github-dark-default-DXG-b-1a.js +0 -0
- /package/apps/{web → client}/dist/assets/github-dark-dimmed-Bx1FflLF.js +0 -0
- /package/apps/{web → client}/dist/assets/github-dark-high-contrast-B_tTalzw.js +0 -0
- /package/apps/{web → client}/dist/assets/github-light-EUqPIrTm.js +0 -0
- /package/apps/{web → client}/dist/assets/github-light-default-BXViO-2h.js +0 -0
- /package/apps/{web → client}/dist/assets/github-light-high-contrast-B68TUdTA.js +0 -0
- /package/apps/{web → client}/dist/assets/gleam-CSRkHgEL.js +0 -0
- /package/apps/{web → client}/dist/assets/glsl-CaPTrB3a.js +0 -0
- /package/apps/{web → client}/dist/assets/glsl-D01ELkOo.js +0 -0
- /package/apps/{web → client}/dist/assets/gn-CAXYAgV-.js +0 -0
- /package/apps/{web → client}/dist/assets/gnuplot-7GGW24-e.js +0 -0
- /package/apps/{web → client}/dist/assets/go-C-y9NEjX.js +0 -0
- /package/apps/{web → client}/dist/assets/go-CC6EVc1J.js +0 -0
- /package/apps/{web → client}/dist/assets/go-CFMhVTkq.js +0 -0
- /package/apps/{web → client}/dist/assets/graphlib-DS17s2tU.js +0 -0
- /package/apps/{web → client}/dist/assets/graphql-fmXr3nnJ.js +0 -0
- /package/apps/{web → client}/dist/assets/groovy-Dj7WCBJM.js +0 -0
- /package/apps/{web → client}/dist/assets/groovy-_MokPXAr.js +0 -0
- /package/apps/{web → client}/dist/assets/gruvbox-dark-hard-C820rvS2.js +0 -0
- /package/apps/{web → client}/dist/assets/gruvbox-dark-medium-BPjhmG05.js +0 -0
- /package/apps/{web → client}/dist/assets/gruvbox-dark-soft-MrdJrrXF.js +0 -0
- /package/apps/{web → client}/dist/assets/gruvbox-light-hard-BC_s9l72.js +0 -0
- /package/apps/{web → client}/dist/assets/gruvbox-light-medium-BAWPOn9u.js +0 -0
- /package/apps/{web → client}/dist/assets/gruvbox-light-soft-BSMLrYjP.js +0 -0
- /package/apps/{web → client}/dist/assets/hack-C30D-q0p.js +0 -0
- /package/apps/{web → client}/dist/assets/haml-BU6KMePS.js +0 -0
- /package/apps/{web → client}/dist/assets/haml-C1zHJAQt.js +0 -0
- /package/apps/{web → client}/dist/assets/haskell-D8IpX4py.js +0 -0
- /package/apps/{web → client}/dist/assets/haxe-B0BMDyun.js +0 -0
- /package/apps/{web → client}/dist/assets/haxe-CD8O8Ul0.js +0 -0
- /package/apps/{web → client}/dist/assets/hcl-CpzslTdj.js +0 -0
- /package/apps/{web → client}/dist/assets/hcl-Dh228itO.js +0 -0
- /package/apps/{web → client}/dist/assets/hjson-CxZEssPk.js +0 -0
- /package/apps/{web → client}/dist/assets/hlsl-DQJgUA8P.js +0 -0
- /package/apps/{web → client}/dist/assets/hlsl-ajL2FB-w.js +0 -0
- /package/apps/{web → client}/dist/assets/horizon-CE9ld1lL.js +0 -0
- /package/apps/{web → client}/dist/assets/horizon-bright-DSNQnXHK.js +0 -0
- /package/apps/{web → client}/dist/assets/houston-CsvMBhTu.js +0 -0
- /package/apps/{web → client}/dist/assets/html-BCy9P6D2.js +0 -0
- /package/apps/{web → client}/dist/assets/html-DSw1lh5G.js +0 -0
- /package/apps/{web → client}/dist/assets/html-derivative-DyzJkWO6.js +0 -0
- /package/apps/{web → client}/dist/assets/html-derivative-ekTk9Unt.js +0 -0
- /package/apps/{web → client}/dist/assets/hxml-DPF7XkXa.js +0 -0
- /package/apps/{web → client}/dist/assets/hy-CZbG8q4J.js +0 -0
- /package/apps/{web → client}/dist/assets/imba-DsUTQ-LC.js +0 -0
- /package/apps/{web → client}/dist/assets/ini-0B7NLFlx.js +0 -0
- /package/apps/{web → client}/dist/assets/ini-DiZ1IqbV.js +0 -0
- /package/apps/{web → client}/dist/assets/ini-sBoK_t0W.js +0 -0
- /package/apps/{web → client}/dist/assets/init-C-OQMol4.js +0 -0
- /package/apps/{web → client}/dist/assets/java-BEtHBSE6.js +0 -0
- /package/apps/{web → client}/dist/assets/java-BtIQNnN0.js +0 -0
- /package/apps/{web → client}/dist/assets/java-_ATy9zCa.js +0 -0
- /package/apps/{web → client}/dist/assets/javascript-BzbQS41l.js +0 -0
- /package/apps/{web → client}/dist/assets/javascript-CpIGwZ_Y.js +0 -0
- /package/apps/{web → client}/dist/assets/jinja-dRcm23Ea.js +0 -0
- /package/apps/{web → client}/dist/assets/jison-D3aJooqo.js +0 -0
- /package/apps/{web → client}/dist/assets/json-B88Oqtu5.js +0 -0
- /package/apps/{web → client}/dist/assets/json-C3WlssX3.js +0 -0
- /package/apps/{web → client}/dist/assets/json5-BR5RXkoi.js +0 -0
- /package/apps/{web → client}/dist/assets/jsonc-BzJ54Uh_.js +0 -0
- /package/apps/{web → client}/dist/assets/jsonc-dcnCvL0G.js +0 -0
- /package/apps/{web → client}/dist/assets/jsonl-CmCQp5Yx.js +0 -0
- /package/apps/{web → client}/dist/assets/jsonnet-CJTPZ8u_.js +0 -0
- /package/apps/{web → client}/dist/assets/jssm-DXw9l8Rf.js +0 -0
- /package/apps/{web → client}/dist/assets/jsx-C4yDKi0A.js +0 -0
- /package/apps/{web → client}/dist/assets/jsx-D3KKoC5L.js +0 -0
- /package/apps/{web → client}/dist/assets/julia-Bri6UV-V.js +0 -0
- /package/apps/{web → client}/dist/assets/kanagawa-dragon-Bozd7klA.js +0 -0
- /package/apps/{web → client}/dist/assets/kanagawa-lotus-BmuOG9ZW.js +0 -0
- /package/apps/{web → client}/dist/assets/kanagawa-wave-BML5mF2J.js +0 -0
- /package/apps/{web → client}/dist/assets/kdl-CsD5j6eV.js +0 -0
- /package/apps/{web → client}/dist/assets/kotlin-BOotOW0E.js +0 -0
- /package/apps/{web → client}/dist/assets/kotlin-DhhofPvG.js +0 -0
- /package/apps/{web → client}/dist/assets/kusto-C7mF5XQf.js +0 -0
- /package/apps/{web → client}/dist/assets/laserwave-C_8bwKvT.js +0 -0
- /package/apps/{web → client}/dist/assets/latex-B_Ztlc7G.js +0 -0
- /package/apps/{web → client}/dist/assets/latex-Bn9nYtub.js +0 -0
- /package/apps/{web → client}/dist/assets/lean-CewbzKMR.js +0 -0
- /package/apps/{web → client}/dist/assets/less-B64L-FWb.js +0 -0
- /package/apps/{web → client}/dist/assets/less-B9JPFI3C.js +0 -0
- /package/apps/{web → client}/dist/assets/less-CXhFgJ4v.js +0 -0
- /package/apps/{web → client}/dist/assets/lexon-CfSJPG6W.js +0 -0
- /package/apps/{web → client}/dist/assets/light-plus-DVQuIRkW.js +0 -0
- /package/apps/{web → client}/dist/assets/llvm-DqHOMS-s.js +0 -0
- /package/apps/{web → client}/dist/assets/log-Bu1ZtrH6.js +0 -0
- /package/apps/{web → client}/dist/assets/log-BvtJ4bSl.js +0 -0
- /package/apps/{web → client}/dist/assets/logo-Cluzi2Zq.js +0 -0
- /package/apps/{web → client}/dist/assets/lua-CsQS60Ue.js +0 -0
- /package/apps/{web → client}/dist/assets/lua-DjuecEsk.js +0 -0
- /package/apps/{web → client}/dist/assets/lua-fPRBWD-V.js +0 -0
- /package/apps/{web → client}/dist/assets/luau-VGWVLoqX.js +0 -0
- /package/apps/{web → client}/dist/assets/m3-D-oSqn_W.js +0 -0
- /package/apps/{web → client}/dist/assets/make-B54cR2A1.js +0 -0
- /package/apps/{web → client}/dist/assets/make-URElk0GJ.js +0 -0
- /package/apps/{web → client}/dist/assets/markdown-CboqBxpY.js +0 -0
- /package/apps/{web → client}/dist/assets/markdown-Cimd5fb3.js +0 -0
- /package/apps/{web → client}/dist/assets/markdown-CjQmuOi1.js +0 -0
- /package/apps/{web → client}/dist/assets/material-theme-Bm3Qr25_.js +0 -0
- /package/apps/{web → client}/dist/assets/material-theme-darker-2IIEA8gg.js +0 -0
- /package/apps/{web → client}/dist/assets/material-theme-lighter-uhdI0v04.js +0 -0
- /package/apps/{web → client}/dist/assets/material-theme-ocean-CHQ94UKr.js +0 -0
- /package/apps/{web → client}/dist/assets/material-theme-palenight-B5W6OYN7.js +0 -0
- /package/apps/{web → client}/dist/assets/matlab-D7qyCx1q.js +0 -0
- /package/apps/{web → client}/dist/assets/mdx-DQZ5AkYe.js +0 -0
- /package/apps/{web → client}/dist/assets/mermaid-BxpfTIzt.js +0 -0
- /package/apps/{web → client}/dist/assets/min-dark-BSWPekZh.js +0 -0
- /package/apps/{web → client}/dist/assets/min-light-DDpmG2fV.js +0 -0
- /package/apps/{web → client}/dist/assets/mips-CIPQ_RoX.js +0 -0
- /package/apps/{web → client}/dist/assets/mipsasm-BMqwQI7S.js +0 -0
- /package/apps/{web → client}/dist/assets/mojo-fg40_ntQ.js +0 -0
- /package/apps/{web → client}/dist/assets/monokai-BscAjiQZ.js +0 -0
- /package/apps/{web → client}/dist/assets/moonbit-D9W784E_.js +0 -0
- /package/apps/{web → client}/dist/assets/move-BYnGhZoM.js +0 -0
- /package/apps/{web → client}/dist/assets/msdax-DauUninz.js +0 -0
- /package/apps/{web → client}/dist/assets/mysql-SOo6toE5.js +0 -0
- /package/apps/{web → client}/dist/assets/narrat-_X_XdTYD.js +0 -0
- /package/apps/{web → client}/dist/assets/nextflow-groovy-C770ykRh.js +0 -0
- /package/apps/{web → client}/dist/assets/nextflow-groovy-D5vAge1Z.js +0 -0
- /package/apps/{web → client}/dist/assets/nextflow-uA5IJerx.js +0 -0
- /package/apps/{web → client}/dist/assets/nginx-BxRBJ-Af.js +0 -0
- /package/apps/{web → client}/dist/assets/night-owl-DhmEMT88.js +0 -0
- /package/apps/{web → client}/dist/assets/night-owl-light-eJ-hLW7d.js +0 -0
- /package/apps/{web → client}/dist/assets/nix-IvuFDN5E.js +0 -0
- /package/apps/{web → client}/dist/assets/nord-Cb4Vim4T.js +0 -0
- /package/apps/{web → client}/dist/assets/nsis-CjNLYCLg.js +0 -0
- /package/apps/{web → client}/dist/assets/nushell--0fT3PI1.js +0 -0
- /package/apps/{web → client}/dist/assets/objective-c-CsonrGpd.js +0 -0
- /package/apps/{web → client}/dist/assets/objective-c-D_ECFp-D.js +0 -0
- /package/apps/{web → client}/dist/assets/objective-c-FvmIjYaQ.js +0 -0
- /package/apps/{web → client}/dist/assets/objective-cpp-BsSzOQcm.js +0 -0
- /package/apps/{web → client}/dist/assets/ocaml-BuP2SoBQ.js +0 -0
- /package/apps/{web → client}/dist/assets/ocaml-D6dNsUd0.js +0 -0
- /package/apps/{web → client}/dist/assets/odin-B1RWQWA5.js +0 -0
- /package/apps/{web → client}/dist/assets/one-dark-pro-C6YyR8OD.js +0 -0
- /package/apps/{web → client}/dist/assets/one-light-D7Lr4KcI.js +0 -0
- /package/apps/{web → client}/dist/assets/openscad-BUDT5pXO.js +0 -0
- /package/apps/{web → client}/dist/assets/ordinal-BDEzSJ7C.js +0 -0
- /package/apps/{web → client}/dist/assets/pascal-4ZHwLPI5.js +0 -0
- /package/apps/{web → client}/dist/assets/pascal-DrH0SRf2.js +0 -0
- /package/apps/{web → client}/dist/assets/pascaligo-D-ptJ9y-.js +0 -0
- /package/apps/{web → client}/dist/assets/path-fybaL0A-.js +0 -0
- /package/apps/{web → client}/dist/assets/perl-oz_6vUea.js +0 -0
- /package/apps/{web → client}/dist/assets/pgsql-DTj74zXo.js +0 -0
- /package/apps/{web → client}/dist/assets/php-nr791fC2.js +0 -0
- /package/apps/{web → client}/dist/assets/pierre-dark-CpLgRqie.js +0 -0
- /package/apps/{web → client}/dist/assets/pierre-dark-protanopia-deuteranopia-B35FxJx-.js +0 -0
- /package/apps/{web → client}/dist/assets/pierre-dark-soft-kZQmAZld.js +0 -0
- /package/apps/{web → client}/dist/assets/pierre-dark-tritanopia-CpjhbsIL.js +0 -0
- /package/apps/{web → client}/dist/assets/pierre-dark-vibrant-CpQYzh95.js +0 -0
- /package/apps/{web → client}/dist/assets/pierre-light-CoaEpmwp.js +0 -0
- /package/apps/{web → client}/dist/assets/pierre-light-protanopia-deuteranopia-0fSaH845.js +0 -0
- /package/apps/{web → client}/dist/assets/pierre-light-soft-lWLdNTOI.js +0 -0
- /package/apps/{web → client}/dist/assets/pierre-light-tritanopia-CEbqgOJL.js +0 -0
- /package/apps/{web → client}/dist/assets/pierre-light-vibrant-D80Fkn33.js +0 -0
- /package/apps/{web → client}/dist/assets/pkl-ot-7Btpt.js +0 -0
- /package/apps/{web → client}/dist/assets/pla-CopQ2nXW.js +0 -0
- /package/apps/{web → client}/dist/assets/plastic-DQwYfKfQ.js +0 -0
- /package/apps/{web → client}/dist/assets/plsql-DGHpHOYJ.js +0 -0
- /package/apps/{web → client}/dist/assets/po-BiJDBrnU.js +0 -0
- /package/apps/{web → client}/dist/assets/poimandres-DRFjx7u4.js +0 -0
- /package/apps/{web → client}/dist/assets/polar-C7UOKdEL.js +0 -0
- /package/apps/{web → client}/dist/assets/postcss-D_Wz94rJ.js +0 -0
- /package/apps/{web → client}/dist/assets/postcss-DkKB82OS.js +0 -0
- /package/apps/{web → client}/dist/assets/postiats-43DmfD33.js +0 -0
- /package/apps/{web → client}/dist/assets/powerquery-D3hlyOfw.js +0 -0
- /package/apps/{web → client}/dist/assets/powerquery-DNMTfnFr.js +0 -0
- /package/apps/{web → client}/dist/assets/powershell-Blb2ISmZ.js +0 -0
- /package/apps/{web → client}/dist/assets/powershell-CItYMEtV.js +0 -0
- /package/apps/{web → client}/dist/assets/powershell-DmHpPYUd.js +0 -0
- /package/apps/{web → client}/dist/assets/preload-helper-BLdHbfdN.js +0 -0
- /package/apps/{web → client}/dist/assets/prisma-DMgNhnYS.js +0 -0
- /package/apps/{web → client}/dist/assets/prolog-iXnhIJG7.js +0 -0
- /package/apps/{web → client}/dist/assets/proto-DB4EqR-F.js +0 -0
- /package/apps/{web → client}/dist/assets/protobuf-C531GsRP.js +0 -0
- /package/apps/{web → client}/dist/assets/pug-C_nSP9Mg.js +0 -0
- /package/apps/{web → client}/dist/assets/pug-Z5eAx3Zn.js +0 -0
- /package/apps/{web → client}/dist/assets/pug-nGRwXpob.js +0 -0
- /package/apps/{web → client}/dist/assets/puppet-CDv2pdJW.js +0 -0
- /package/apps/{web → client}/dist/assets/purescript-9MfHhQsQ.js +0 -0
- /package/apps/{web → client}/dist/assets/python-C5TF47hQ.js +0 -0
- /package/apps/{web → client}/dist/assets/python-CzFU0dpx.js +0 -0
- /package/apps/{web → client}/dist/assets/qml-BxleM7bJ.js +0 -0
- /package/apps/{web → client}/dist/assets/qmldir-DCQb3MpD.js +0 -0
- /package/apps/{web → client}/dist/assets/qsharp-DkqhCAOL.js +0 -0
- /package/apps/{web → client}/dist/assets/qss-Fe1Jh2GI.js +0 -0
- /package/apps/{web → client}/dist/assets/r-BXEss897.js +0 -0
- /package/apps/{web → client}/dist/assets/r-BwWrilGY.js +0 -0
- /package/apps/{web → client}/dist/assets/r-DWzjseEo.js +0 -0
- /package/apps/{web → client}/dist/assets/racket-DcIDlBhZ.js +0 -0
- /package/apps/{web → client}/dist/assets/raku-BtFKomnU.js +0 -0
- /package/apps/{web → client}/dist/assets/raku-Cj6OV6qV.js +0 -0
- /package/apps/{web → client}/dist/assets/razor-UAq-8THt.js +0 -0
- /package/apps/{web → client}/dist/assets/rbs-C0MpOrj4.js +0 -0
- /package/apps/{web → client}/dist/assets/red-CYlAq2b0.js +0 -0
- /package/apps/{web → client}/dist/assets/redis-ClamHrr6.js +0 -0
- /package/apps/{web → client}/dist/assets/redshift-DT7zqm-g.js +0 -0
- /package/apps/{web → client}/dist/assets/reg-CRGYupPL.js +0 -0
- /package/apps/{web → client}/dist/assets/regexp-BWpGejPw.js +0 -0
- /package/apps/{web → client}/dist/assets/regexp-wOX-4MEz.js +0 -0
- /package/apps/{web → client}/dist/assets/rel-BtDbiS_P.js +0 -0
- /package/apps/{web → client}/dist/assets/restructuredtext-BYgofb2h.js +0 -0
- /package/apps/{web → client}/dist/assets/riscv-Ckw8ddFX.js +0 -0
- /package/apps/{web → client}/dist/assets/ron-VUp2lXgN.js +0 -0
- /package/apps/{web → client}/dist/assets/rose-pine-aMsaMD1D.js +0 -0
- /package/apps/{web → client}/dist/assets/rose-pine-dawn-8PwUyIlP.js +0 -0
- /package/apps/{web → client}/dist/assets/rose-pine-moon-DO-qXg-I.js +0 -0
- /package/apps/{web → client}/dist/assets/rosmsg-CAekHB0j.js +0 -0
- /package/apps/{web → client}/dist/assets/rough.esm-Dy-Kn_BL.js +0 -0
- /package/apps/{web → client}/dist/assets/ruby-DezsRK8O.js +0 -0
- /package/apps/{web → client}/dist/assets/rust-Ch0zZBV0.js +0 -0
- /package/apps/{web → client}/dist/assets/rust-DBZE5Si3.js +0 -0
- /package/apps/{web → client}/dist/assets/rust-DdL9SqIa.js +0 -0
- /package/apps/{web → client}/dist/assets/sas-BowjnAvi.js +0 -0
- /package/apps/{web → client}/dist/assets/sass-DXrisJhu.js +0 -0
- /package/apps/{web → client}/dist/assets/sb-CcwsVR0C.js +0 -0
- /package/apps/{web → client}/dist/assets/scala-CTTBu_35.js +0 -0
- /package/apps/{web → client}/dist/assets/scala-DHpiXF5c.js +0 -0
- /package/apps/{web → client}/dist/assets/scala-o2NiCLJc.js +0 -0
- /package/apps/{web → client}/dist/assets/scheme-BeGwcela.js +0 -0
- /package/apps/{web → client}/dist/assets/scheme-DQCgrYNe.js +0 -0
- /package/apps/{web → client}/dist/assets/scss-CWs8DVSa.js +0 -0
- /package/apps/{web → client}/dist/assets/scss-D3wBkj3d.js +0 -0
- /package/apps/{web → client}/dist/assets/scss-gp-XZpBa.js +0 -0
- /package/apps/{web → client}/dist/assets/sdbl-CpzYUp7e.js +0 -0
- /package/apps/{web → client}/dist/assets/sdbl-CyKdwm0B.js +0 -0
- /package/apps/{web → client}/dist/assets/shaderlab-DY7g_Ava.js +0 -0
- /package/apps/{web → client}/dist/assets/shell-CC2rA5mh.js +0 -0
- /package/apps/{web → client}/dist/assets/shellscript-CVTB3cr6.js +0 -0
- /package/apps/{web → client}/dist/assets/shellscript-CqHdAlCp.js +0 -0
- /package/apps/{web → client}/dist/assets/shellsession-DDrivR0a.js +0 -0
- /package/apps/{web → client}/dist/assets/sizeCapture-INFHLROL-3uHXrFqA.js +0 -0
- /package/apps/{web → client}/dist/assets/slack-dark-DnToyrRv.js +0 -0
- /package/apps/{web → client}/dist/assets/slack-ochin-B2OO5cIa.js +0 -0
- /package/apps/{web → client}/dist/assets/smalltalk-BHpQb5nM.js +0 -0
- /package/apps/{web → client}/dist/assets/smithy-Dgaz7aur.js +0 -0
- /package/apps/{web → client}/dist/assets/snazzy-light-4G7pJPwS.js +0 -0
- /package/apps/{web → client}/dist/assets/solarized-dark-b97czJOk.js +0 -0
- /package/apps/{web → client}/dist/assets/solarized-light-DFPxpIYQ.js +0 -0
- /package/apps/{web → client}/dist/assets/solidity-BEEn4gHE.js +0 -0
- /package/apps/{web → client}/dist/assets/solidity-Bj7E1mRn.js +0 -0
- /package/apps/{web → client}/dist/assets/sophia-CRfGWb83.js +0 -0
- /package/apps/{web → client}/dist/assets/soy-CUUUw2U6.js +0 -0
- /package/apps/{web → client}/dist/assets/sparql-D_Lu-MrJ.js +0 -0
- /package/apps/{web → client}/dist/assets/sparql-Dy5Sx-zJ.js +0 -0
- /package/apps/{web → client}/dist/assets/splunk-BC2Px7Mm.js +0 -0
- /package/apps/{web → client}/dist/assets/sql-CNu3Or2W.js +0 -0
- /package/apps/{web → client}/dist/assets/sql-CfM2IJm3.js +0 -0
- /package/apps/{web → client}/dist/assets/sql-NEE52Syq.js +0 -0
- /package/apps/{web → client}/dist/assets/ssh-config-BgfXC-Er.js +0 -0
- /package/apps/{web → client}/dist/assets/st-DbInun42.js +0 -0
- /package/apps/{web → client}/dist/assets/stata-Dj4sbAEx.js +0 -0
- /package/apps/{web → client}/dist/assets/stylus-LiTfbrWi.js +0 -0
- /package/apps/{web → client}/dist/assets/stylus-y-ZXgJGq.js +0 -0
- /package/apps/{web → client}/dist/assets/surrealql-NoXzmj18.js +0 -0
- /package/apps/{web → client}/dist/assets/swift-Bxkupp3x.js +0 -0
- /package/apps/{web → client}/dist/assets/swift-CCLoYZtx.js +0 -0
- /package/apps/{web → client}/dist/assets/swift-DQ24oLw9.js +0 -0
- /package/apps/{web → client}/dist/assets/synthwave-84-nFMaYfgc.js +0 -0
- /package/apps/{web → client}/dist/assets/system-verilog-DFpyZzg3.js +0 -0
- /package/apps/{web → client}/dist/assets/system-verilog-Dp2k_mze.js +0 -0
- /package/apps/{web → client}/dist/assets/systemd-BxMlprV5.js +0 -0
- /package/apps/{web → client}/dist/assets/systemverilog-Bz4Y3fRF.js +0 -0
- /package/apps/{web → client}/dist/assets/tags-DrTyXsO5.js +0 -0
- /package/apps/{web → client}/dist/assets/talonscript-CohzipZa.js +0 -0
- /package/apps/{web → client}/dist/assets/tasl-DMoTqEGO.js +0 -0
- /package/apps/{web → client}/dist/assets/tcl-CZd0xW_V.js +0 -0
- /package/apps/{web → client}/dist/assets/tcl-DISqw1ZD.js +0 -0
- /package/apps/{web → client}/dist/assets/terraform-DswuEJGm.js +0 -0
- /package/apps/{web → client}/dist/assets/tex-C9L8xJex.js +0 -0
- /package/apps/{web → client}/dist/assets/tex-CNYz7bLJ.js +0 -0
- /package/apps/{web → client}/dist/assets/tokyo-night-oM2G3aXe.js +0 -0
- /package/apps/{web → client}/dist/assets/toml-CcmNWLt0.js +0 -0
- /package/apps/{web → client}/dist/assets/tsv-sltzmVWM.js +0 -0
- /package/apps/{web → client}/dist/assets/tsx-BOvsFOI6.js +0 -0
- /package/apps/{web → client}/dist/assets/tsx-CGosfAUg.js +0 -0
- /package/apps/{web → client}/dist/assets/turtle-CQ9kcy0m.js +0 -0
- /package/apps/{web → client}/dist/assets/turtle-CcN57yC0.js +0 -0
- /package/apps/{web → client}/dist/assets/twig-De2hgUGE.js +0 -0
- /package/apps/{web → client}/dist/assets/typescript-Bb1J8qyy.js +0 -0
- /package/apps/{web → client}/dist/assets/typescript-j_1H8WHN.js +0 -0
- /package/apps/{web → client}/dist/assets/typespec-B8J7ngcE.js +0 -0
- /package/apps/{web → client}/dist/assets/typespec-BGhR2SqG.js +0 -0
- /package/apps/{web → client}/dist/assets/v-DBj4K9d_.js +0 -0
- /package/apps/{web → client}/dist/assets/vala-zf12oZj6.js +0 -0
- /package/apps/{web → client}/dist/assets/vb-3nVziYZS.js +0 -0
- /package/apps/{web → client}/dist/assets/vb-CP6Ec8nh.js +0 -0
- /package/apps/{web → client}/dist/assets/vb-DV3o63ZY.js +0 -0
- /package/apps/{web → client}/dist/assets/verilog-1j7BQk-h.js +0 -0
- /package/apps/{web → client}/dist/assets/verilog-kL8Dwv27.js +0 -0
- /package/apps/{web → client}/dist/assets/vesper-DdrHHSXu.js +0 -0
- /package/apps/{web → client}/dist/assets/vhdl-BroJfC0k.js +0 -0
- /package/apps/{web → client}/dist/assets/viml-DvXPmvsu.js +0 -0
- /package/apps/{web → client}/dist/assets/vitesse-black-fwtXNY1n.js +0 -0
- /package/apps/{web → client}/dist/assets/vitesse-dark-BZCL-v6S.js +0 -0
- /package/apps/{web → client}/dist/assets/vitesse-light-VbXTXTou.js +0 -0
- /package/apps/{web → client}/dist/assets/vue-html-CGMs_6qn.js +0 -0
- /package/apps/{web → client}/dist/assets/vyper-CgoNMtux.js +0 -0
- /package/apps/{web → client}/dist/assets/wasm-BnjxR4X6.js +0 -0
- /package/apps/{web → client}/dist/assets/wasm-ByWQv1Qj.js +0 -0
- /package/apps/{web → client}/dist/assets/wenyan-C8pVoKbM.js +0 -0
- /package/apps/{web → client}/dist/assets/wgsl-BsKzXJz4.js +0 -0
- /package/apps/{web → client}/dist/assets/wgsl-DpFanUEy.js +0 -0
- /package/apps/{web → client}/dist/assets/wikitext-ClFFjSW2.js +0 -0
- /package/apps/{web → client}/dist/assets/wit-DdvCle-K.js +0 -0
- /package/apps/{web → client}/dist/assets/wolfram-DLL8P-h_.js +0 -0
- /package/apps/{web → client}/dist/assets/xml-DuKfbPI6.js +0 -0
- /package/apps/{web → client}/dist/assets/xml-WY0zc4PG.js +0 -0
- /package/apps/{web → client}/dist/assets/xsl-CW58cerL.js +0 -0
- /package/apps/{web → client}/dist/assets/xsl-Czhm44Ae.js +0 -0
- /package/apps/{web → client}/dist/assets/yaml-DDA_XMNu.js +0 -0
- /package/apps/{web → client}/dist/assets/yaml-DijMHRDA.js +0 -0
- /package/apps/{web → client}/dist/assets/zenscript-BnlCZFoB.js +0 -0
- /package/apps/{web → client}/dist/assets/zig-B7sSDI6F.js +0 -0
- /package/apps/{web → client}/dist/assets/zig-cFafUZna.js +0 -0
- /package/apps/{web → client}/dist/icon-192.png +0 -0
- /package/apps/{web → client}/dist/icon-512.png +0 -0
- /package/apps/{web → client}/dist/icon-maskable-512.png +0 -0
- /package/apps/{web → client}/dist/icon.svg +0 -0
- /package/apps/{web → client}/dist/manifest.webmanifest +0 -0
|
@@ -0,0 +1,440 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/editor-dialog-D5uma-Ri.js","assets/rolldown-runtime-COiEfhsA.js","assets/getFiletypeFromFileName-BCvBvB1y.js","assets/utils-U6QfaJBO.js","assets/button-CdLSr6OC.js","assets/tags-DrTyXsO5.js","assets/tooltip-wzGTbg8k.js","assets/preview-dialog-BLxM80N3.js","assets/preload-helper-BLdHbfdN.js","assets/lib-CVj84X52.js","assets/langs-DssLtjmH.js","assets/dist-DSkulxAq.js","assets/editor.api-Rfucz3mk.js","assets/editor-DjpsE8to.css","assets/engine-oniguruma-BMl9YtsA.js","assets/MinusSignIcon-DGIm2EHe.js","assets/editor-dialog-BNFI__d8.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{i as e,t}from"./rolldown-runtime-COiEfhsA.js";import{$ as n,$n as r,$t as i,A as a,An as o,Ar as s,At as c,B as l,Bn as u,Bt as d,C as f,Cn as p,Cr as m,Ct as h,D as g,Dn as _,Dr as v,Dt as y,E as b,En as x,Er as S,Et as C,F as w,Fn as T,Ft as E,G as D,Gn as O,Gt as k,H as A,Hn as j,Ht as M,I as N,In as ee,It as te,J as ne,Jn as re,Jt as ie,K as P,Kn as ae,Kt as oe,L as se,Ln as ce,Lt as le,Mn as ue,Mt as de,N as fe,Nn as F,Nt as pe,O as me,On as he,Or as ge,Ot as _e,P as ve,Pn as ye,Pt as be,Q as xe,Qn as Se,Qt as Ce,R as we,Rn as Te,Rt as Ee,S as De,Sn as Oe,Sr as ke,St as Ae,T as je,Tn as Me,Tr as Ne,Tt as Pe,U as Fe,Un as Ie,Ut as I,V as Le,Vn as Re,Vt as ze,W as Be,Wn as Ve,Wt as He,X as Ue,Xn as We,Xt as Ge,Y as Ke,Yn as qe,Yt as Je,Z as Ye,Zn as Xe,Zt as Ze,_ as Qe,_n as $e,_r as et,_t as tt,a as nt,an as rt,ar as it,at,b as ot,bn as st,br as ct,bt as lt,c as ut,cn as dt,cr as ft,ct as pt,d as mt,dn as ht,dr as gt,dt as _t,en as vt,er as yt,et as bt,f as xt,fn as St,fr as Ct,g as wt,gn as Tt,gr as Et,gt as Dt,h as Ot,hn as kt,hr as At,ht as jt,i as Mt,in as L,ir as Nt,it as Pt,jn as Ft,jr as It,jt as Lt,k as Rt,kn as zt,kr as Bt,kt as Vt,l as Ht,ln as Ut,lr as Wt,lt as Gt,m as Kt,mn as qt,mr as R,mt as Jt,n as Yt,nn as Xt,nr as Zt,nt as Qt,o as $t,on as en,or as tn,ot as nn,p as rn,pn as an,pr as on,pt as sn,q as cn,qn as ln,qt as un,r as dn,rn as fn,rr as pn,rt as mn,s as hn,sn as gn,sr as _n,st as vn,tn as yn,tr as bn,tt as xn,u as Sn,un as Cn,ur as wn,ut as Tn,v as En,vn as Dn,vr as On,vt as kn,w as An,wn as jn,wr as Mn,wt as Nn,x as Pn,xn as Fn,xr as In,xt as Ln,y as Rn,yn as zn,yr as Bn,z as Vn,zn as Hn,zt as Un}from"./getFiletypeFromFileName-BCvBvB1y.js";import{a as Wn,c as Gn,i as Kn,l as qn,n as Jn,o as Yn,r as Xn,t as z}from"./utils-U6QfaJBO.js";import{S as Zn,a as Qn,b as $n,d as er,f as tr,g as nr,h as rr,l as ir,m as ar,n as or,p as sr,r as cr,s as lr,t as B,u as ur,v as dr,x as V}from"./button-CdLSr6OC.js";import{C as fr,S as pr,T as mr,a as hr,c as gr,h as _r,i as vr,l as yr,o as br,p as xr,r as Sr,s as Cr,u as wr,v as Tr,w as Er,y as Dr}from"./preview-dialog-BLxM80N3.js";import{a as Or,i as kr,n as Ar,o as jr,r as Mr,s as Nr,t as Pr}from"./tooltip-wzGTbg8k.js";import{C as Fr,E as Ir,S as Lr,T as Rr,_ as zr,a as Br,b as Vr,c as Hr,d as Ur,f as Wr,g as Gr,h as Kr,i as qr,l as Jr,m as Yr,n as Xr,o as Zr,p as Qr,r as $r,s as ei,u as ti,v as ni,w as ri,x as ii,y as ai}from"./dist-DygZhkc7.js";import{_ as oi,a as si,c as ci,l as li,n as ui,o as di,p as fi,s as pi,t as mi,u as hi}from"./renderTokenLines-DSu8n2ID.js";import{n as gi,t as _i}from"./appendItems-C8N70W-m.js";import{t as vi}from"./constants-CmGPilXJ.js";import{t as yi}from"./formatCSSVariablePrefix-KRh9vnZf.js";import{t as bi}from"./preload-helper-BLdHbfdN.js";(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),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var H=e(qn(),1),xi=H.useLayoutEffect,U=Gn(),Si=class extends H.Component{constructor(...e){super(...e),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:0}:{resetKey:n}}static getDerivedStateFromError(e){return{error:[e]}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){let e=this.state.error;return e?H.createElement(this.props.errorComponent??Ci,{error:e[0],reset:this.reset}):this.props.children}};function Ci({error:e}){let[t,n]=H.useState(!1);return(0,U.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,U.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,U.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,U.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,U.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,U.jsx)(`div`,{children:(0,U.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e?.message?(0,U.jsx)(`code`,{children:e.message}):null})}):null]})}var wi=()=>!0,Ti=()=>!1;function Ei({children:e,fallback:t=null}){return(0,U.jsx)(H.Fragment,{children:Di()?e:t})}function Di(e=!0){return H.useSyncExternalStore(Oi,wi,e?Ti:wi)}function Oi(){return()=>{}}function ki(e){let t=Ne(),n=`not-found-${m(t.stores.location,e=>e.pathname)}-${m(t.stores.status)}`;return(0,U.jsx)(Si,{getResetKey:()=>n,onCatch:(t,n)=>{if(Bt(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(Bt(t))return e.fallback?.(t);throw t},children:e.children})}function Ai(){return(0,U.jsx)(`p`,{children:`Not Found`})}function ji(e,t,n){return t.options.notFoundComponent?(0,U.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,U.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,U.jsx)(Ai,{})}function Mi(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,U.jsx)(n,{}):null}var Ni=(e,t)=>e[0]===t[0]&&e[1]===t[1],Pi=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,Fi=H.memo(function({routeId:e}){let t=Ne(),n=t.stores.getMatchStore(e);return Ii(t,m(n))});function Ii(e,t){let n=e.routesById[t.routeId],r=Mi(e,n),i=n.options.errorComponent??e.options.defaultErrorComponent,a=n.options.onCatch??e.options.defaultOnCatch,o=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,s=t.ssr===!1||t.ssr===`data-only`,c=Pi(e,n,t.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||s)),l=(0,U.jsx)(Li,{match:t});s&&(l=(0,U.jsx)(Ei,{fallback:r,children:l})),o&&(l=(0,U.jsx)(ki,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return H.createElement(o,e)},children:l})),i&&(l=(0,U.jsx)(Si,{getResetKey:()=>t,errorComponent:i,onCatch:(e,n)=>{if(Bt(e))throw e.routeId??=t.routeId,e;a?.(e,n)},children:l})),c&&(l=(0,U.jsx)(H.Suspense,{fallback:r,children:l}));let u=n.isRoot&&n.options.shellComponent;return u?(0,U.jsx)(Mn.Provider,{value:t.routeId,children:(0,U.jsxs)(u,{children:[l,null]})}):(0,U.jsxs)(Mn.Provider,{value:t.routeId,children:[l,null]})}var Li=H.memo(function({match:e}){let t=Ne(),n=e.routeId,r=t.routesById[n],i=H.useMemo(()=>{let i=(r.options.remountDeps??t.options.defaultRemountDeps)?.({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return i?JSON.stringify(i):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,r.options.remountDeps,t.options.defaultRemountDeps]),a=H.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?(0,U.jsx)(e,{},i):(0,U.jsx)(Ri,{})},[i,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!Pi(t,r,e.ssr))return a;if(t._tx)throw t._tx[5];return Mi(t,r)}if(e.status===`notFound`)return ji(t,r,e.error);if(e.status===`error`)throw e.error;return a}),Ri=H.memo(function(){let e=Ne(),t=H.useContext(Mn),n,r,i;{let a=e.stores.getMatchStore(t);[n,r]=m(a,e=>[!!e._notFound,e.error],{compare:Ni}),i=m(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return ji(e,e.routesById[t],r);if(!i)return null;let a=(0,U.jsx)(Fi,{routeId:i});return t===`__root__`?(0,U.jsx)(H.Suspense,{fallback:Mi(e),children:a}):a});function zi(e,t){let n=e[1];e.length=0,n?.(t)}function Bi({t:e}){let t=Ne(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise(a=>{zi(n,!1),n.push(i,a),e(t),H.startTransition(r)}),xi(()=>{let e=t.history.subscribe(t.load);t.updateLatestLocation();let r=t.latestLocation,i=t.buildLocation({to:r.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(s(r.publicHref)!==s(i.publicHref))return t.commitLocation({...i,replace:!0,ignoreBlocker:!0}),e;let a=t.stores.resolvedLocation.get();return a?.href===r.href&&a.state.__TSR_key===r.state.__TSR_key?n.push(t.stores.matches.get(),e=>{e&&t.emit({type:`onRendered`,...v(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}function Vi(){let e=Ne(),t=e.routesById[ge],n=Mi(e,t),r=(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Bi,{t:H.useState()[1]}),e.ssr?(0,U.jsx)(Hi,{}):(0,U.jsx)(H.Suspense,{fallback:n,children:(0,U.jsx)(Hi,{})})]});return e.options.InnerWrap?(0,U.jsx)(e.options.InnerWrap,{children:r}):r}function Hi(){let e=Ne(),t=e._rendered,n=m(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;xi(()=>{t[0]===n&&zi(t,!0)},[t,n]);let a=i?(0,U.jsx)(Fi,{routeId:i}):null;return e.options.disableGlobalCatchBoundary?a:(0,U.jsx)(Si,{getResetKey:()=>r,onCatch:void 0,children:a})}function Ui({router:e,children:t,...n}){It(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,U.jsx)(S.Provider,{value:e,children:t});return e.options.Wrap?(0,U.jsx)(e.options.Wrap,{children:r}):r}function Wi({router:e,...t}){return(0,U.jsx)(Ui,{router:e,...t,children:(0,U.jsx)(Vi,{})})}var Gi=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(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,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){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&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(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||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Ki=t(((e,t)=>{t.exports=Gi()})),qi=t((e=>{var t=Ki(),n=qn(),r=Zn();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}function f(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&f(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function p(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function m(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function h(e){var t=[null,null],n=p(e);return n===null||g(t,e,n.child,{foundSelf:!1}),t}function g(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&g(e,t,n.child,r))return!0;n=n.sibling}return!1}function _(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var v=null,y=null;function b(e,t,n){return e===n||e===t&&(v=e,!0)}function x(e,t,n){return e===n?(y=e,!1):e===t&&(y!==null&&(v=e),!0)}function S(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function C(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var w=Object.assign,T=Symbol.for(`react.element`),E=Symbol.for(`react.transitional.element`),D=Symbol.for(`react.portal`),O=Symbol.for(`react.fragment`),k=Symbol.for(`react.strict_mode`),A=Symbol.for(`react.profiler`),j=Symbol.for(`react.consumer`),M=Symbol.for(`react.context`),N=Symbol.for(`react.forward_ref`),ee=Symbol.for(`react.suspense`),te=Symbol.for(`react.suspense_list`),ne=Symbol.for(`react.memo`),re=Symbol.for(`react.lazy`),ie=Symbol.for(`react.activity`),P=Symbol.for(`react.legacy_hidden`),ae=Symbol.for(`react.memo_cache_sentinel`),oe=Symbol.for(`react.view_transition`),se=Symbol.for(`react.recoverable`),ce=Symbol.iterator;function le(e){return typeof e!=`object`||!e?null:(e=ce&&e[ce]||e[`@@iterator`],typeof e==`function`?e:null)}var ue=Symbol.for(`react.client.reference`);function de(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ue?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case O:return`Fragment`;case A:return`Profiler`;case k:return`StrictMode`;case ee:return`Suspense`;case te:return`SuspenseList`;case ie:return`Activity`;case oe:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case D:return`Portal`;case M:return e.displayName||`Context`;case j:return(e._context.displayName||`Context`)+`.Consumer`;case N:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ne:return t=e.displayName||null,t===null?de(e.type)||`Memo`:t;case re:t=e._payload,e=e._init;try{return de(e(t))}catch{}}return null}var fe=Array.isArray,F=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,pe=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me={pending:!1,data:null,method:null,action:null},he=[],ge=-1;function _e(e){return{current:e}}function ve(e){0>ge||(e.current=he[ge],he[ge]=null,ge--)}function ye(e,t){ge++,he[ge]=e.current,e.current=t}var be=_e(null),xe=_e(null),Se=_e(null),Ce=_e(null);function we(e,t){switch(ye(Se,t),ye(xe,e),ye(be,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?mp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=mp(t),e=X(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ve(be),ye(be,e)}function Te(){ve(be),ve(xe),ve(Se)}function Ee(e){var t=e.memoizedState;t!==null&&(ch._currentValue=t.memoizedState,ye(Ce,e)),t=be.current;var n=X(t,e.type);t!==n&&(ye(xe,e),ye(be,n))}function De(e){xe.current===e&&(ve(be),ve(xe)),Ce.current===e&&(ve(Ce),ch._currentValue=me)}var Oe,ke;function Ae(e){if(Oe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Oe=t&&t[1]||``,ke=-1<e.stack.indexOf(`
|
|
3
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
|
+
`+Oe+e+ke}var je=!1;function Me(e,t){if(!e||je)return``;je=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
5
|
+
`),l=s.split(`
|
|
6
|
+
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
7
|
+
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{je=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ae(n):``}function Ne(e,t){switch(e.tag){case 26:case 27:case 5:return Ae(e.type);case 16:return Ae(`Lazy`);case 13:return e.child!==t&&t!==null?Ae(`Suspense Fallback`):Ae(`Suspense`);case 19:return Ae(`SuspenseList`);case 0:case 15:return Me(e.type,!1);case 11:return Me(e.type.render,!1);case 1:return Me(e.type,!0);case 31:return Ae(`Activity`);case 30:return Ae(`ViewTransition`);default:return``}}function Pe(e){try{var t=``,n=null;do t+=Ne(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
8
|
+
Error generating stack: `+e.message+`
|
|
9
|
+
`+e.stack}}var Fe=Object.prototype.hasOwnProperty,Ie=t.unstable_scheduleCallback,I=t.unstable_cancelCallback,Le=t.unstable_shouldYield,Re=t.unstable_requestPaint,ze=t.unstable_now,Be=t.unstable_getCurrentPriorityLevel,Ve=t.unstable_ImmediatePriority,He=t.unstable_UserBlockingPriority,Ue=t.unstable_NormalPriority,We=t.unstable_LowPriority,Ge=t.unstable_IdlePriority,Ke=t.log,qe=t.unstable_setDisableYieldValue,Je=null,Ye=null;function Xe(e){if(typeof Ke==`function`&&qe(e),Ye&&typeof Ye.setStrictMode==`function`)try{Ye.setStrictMode(Je,e)}catch{}}var Ze=Math.clz32?Math.clz32:et,Qe=Math.log,$e=Math.LN2;function et(e){return e>>>=0,e===0?32:31-(Qe(e)/$e|0)|0}var tt=256,nt=262144,rt=4194304;function it(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&-e;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 at(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=it(n))):i=it(o):i=it(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=it(n))):i=it(o)):i=it(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 ot(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function st(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-Ze(n),i=1<<r;t|=e[r],n&=~i}return t}function ct(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 lt(){var e=rt;return rt<<=1,!(rt&62914560)&&(rt=4194304),e}function ut(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function dt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ft(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<n;){var u=31-Ze(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&pt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function pt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ze(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function mt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ze(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function ht(e,t){var n=t&-t;return n=n&42?1:gt(n),(n&(e.suspendedLanes|t))===0?n:0}function gt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function _t(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function vt(){var e=pe.p;return e===0?(e=window.event,e===void 0?32:Ch(e.type)):e}function yt(e,t){var n=pe.p;try{return pe.p=e,t()}finally{pe.p=n}}var bt=Math.random().toString(36).slice(2),xt=`__reactFiber$`+bt,St=`__reactProps$`+bt,Ct=`__reactContainer$`+bt,wt=`__reactEvents$`+bt,Tt=`__reactListeners$`+bt,Et=`__reactHandles$`+bt,Dt=`__reactResources$`+bt,Ot=`__reactMarker$`+bt,kt=`__reactLoad$`+bt;function At(e){delete e[xt],delete e[St],delete e[Tt],delete e[Et]}function jt(e){var t;if(t=e[xt])return t;for(var n=e.parentNode;n;){if(t=n[Ct]||n[xt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=pm(e);e!==null;){if(n=e[xt])return n;e=pm(e)}return t}e=n,n=e.parentNode}return null}function Mt(e){if(e=e[xt]||e[Ct]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function L(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Nt(e){var t=e[Dt];return t||=e[Dt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Pt(e){e[Ot]=!0}function Ft(e){e[kt]=void 0}var It=new Set,Lt={};function Rt(e,t){zt(e,t),zt(e+`Capture`,t)}function zt(e,t){for(Lt[e]=t,e=0;e<t.length;e++)It.add(t[e])}var Bt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Vt={},Ht={};function Ut(e){return Fe.call(Ht,e)?!0:Fe.call(Vt,e)?!1:Bt.test(e)?Ht[e]=!0:(Vt[e]=!0,!1)}var Wt=!1;function Gt(){var e=Wt;return Wt=!1,e}function Kt(e,t,n){if(Ut(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,n)}}}function qt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,n)}}function R(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,r)}}function Jt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Yt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Xt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Zt(e){if(!e._valueTracker){var t=Yt(e)?`checked`:`value`;e._valueTracker=Xt(e,t,``+e[t])}}function Qt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Yt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var $t=/[\n"\\]/g;function en(e){return e.replace($t,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function tn(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Jt(t)):e.value!==``+Jt(t)&&(e.value=``+Jt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):rn(e,Jt(n)):o===`number`&&e.value==t?rn(e,Jt(e.value)):rn(e,Jt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Jt(s):e.removeAttribute(`name`)}function nn(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Zt(e);return}n=n==null?``:``+Jt(n),t=t==null?n:``+Jt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Zt(e)}function rn(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function an(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Jt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function on(e,t,n){t!=null&&(t=``+Jt(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+Jt(n)}function sn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(fe(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Jt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Zt(e)}function cn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ln=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function un(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||ln.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function dn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``,Wt=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(un(e,a,r),Wt=!0)}else for(var o in t)t.hasOwnProperty(o)&&un(e,o,t[o])}function fn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var pn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`maskType`,`mask-type`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),mn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function hn(e){return mn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function gn(){}var _n=null;function vn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var yn=null,bn=null;function xn(e){var t=Mt(e);if(t&&(e=t.stateNode)){var n=e[St]||null;a:switch(e=t.stateNode,t.type){case`input`:if(tn(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+en(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[St]||null;if(!a)throw Error(i(90));tn(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Qt(r)}break a;case`textarea`:on(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&an(e,!!n.multiple,t,!1)}}}var Sn=!1;function Cn(e,t,n){if(Sn)return e(t,n);Sn=!0;try{return e(t)}finally{if(Sn=!1,(yn!==null||bn!==null)&&(Vd(),yn&&(t=yn,e=bn,bn=yn=null,xn(t),e)))for(t=0;t<e.length;t++)xn(e[t])}}function wn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[St]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var Tn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,En=!1;if(Tn)try{var Dn={};Object.defineProperty(Dn,"passive",{get:function(){En=!0}}),window.addEventListener(`test`,Dn,Dn),window.removeEventListener(`test`,Dn,Dn)}catch{En=!1}var On=null,kn=null,An=null;function jn(){if(An)return An;var e,t=kn,n=t.length,r,i=`value`in On?On.value:On.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return An=i.slice(e,1<r?1-r:void 0)}function Mn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Nn(){return!0}function Pn(){return!1}function Fn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Nn:Pn,this.isPropagationStopped=Pn,this}return w(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Nn)},persist:function(){},isPersistent:Nn}),t}var In={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ln=Fn(In),Rn=w({},In,{view:0,detail:0}),zn=Fn(Rn),Bn,Vn,Hn,Un=w({},Rn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tr,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Hn&&(Hn&&e.type===`mousemove`?(Bn=e.screenX-Hn.screenX,Vn=e.screenY-Hn.screenY):Vn=Bn=0,Hn=e),Bn)},movementY:function(e){return`movementY`in e?e.movementY:Vn}}),Wn=Fn(Un),Gn=Fn(w({},Un,{dataTransfer:0})),Kn=Fn(w({},Rn,{relatedTarget:0})),Jn=Fn(w({},In,{animationName:0,elapsedTime:0,pseudoElement:0})),Yn=Fn(w({},In,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Xn=Fn(w({},In,{data:0})),z={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Qn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},$n={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function er(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=$n[e])?!!t[e]:!1}function tr(){return er}var nr=Fn(w({},Rn,{key:function(e){if(e.key){var t=z[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Mn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Qn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tr,charCode:function(e){return e.type===`keypress`?Mn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Mn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),rr=Fn(w({},Un,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),ir=Fn(w({},In,{submitter:0})),ar=Fn(w({},Rn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tr})),or=Fn(w({},In,{propertyName:0,elapsedTime:0,pseudoElement:0})),sr=Fn(w({},Un,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),cr=Fn(w({},In,{newState:0,oldState:0,source:0})),lr=[9,13,27,32],B=Tn&&`CompositionEvent`in window,ur=null;Tn&&`documentMode`in document&&(ur=document.documentMode);var dr=Tn&&`TextEvent`in window&&!ur,V=Tn&&(!B||ur&&8<ur&&11>=ur),fr=` `,pr=!1;function mr(e,t){switch(e){case`keyup`:return lr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function hr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var gr=!1;function _r(e,t){switch(e){case`compositionend`:return hr(t);case`keypress`:return t.which===32?(pr=!0,fr):null;case`textInput`:return e=t.data,e===fr&&pr?null:e;default:return null}}function vr(e,t){if(gr)return e===`compositionend`||!B&&mr(e,t)?(e=jn(),An=kn=On=null,gr=!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.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return V&&t.locale!==`ko`?null:t.data;default:return null}}var yr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function br(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!yr[e.type]:t===`textarea`}function xr(e,t,n,r){yn?bn?bn.push(r):bn=[r]:yn=r,t=Zf(t,`onChange`),0<t.length&&(n=new Ln(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Sr=null,Cr=null;function wr(e){Wf(e,0)}function Tr(e){if(Qt(L(e)))return e}function Er(e,t){if(e===`change`)return t}var Dr=!1;if(Tn){var Or;if(Tn){var kr=`oninput`in document;if(!kr){var Ar=document.createElement(`div`);Ar.setAttribute(`oninput`,`return;`),kr=typeof Ar.oninput==`function`}Or=kr}else Or=!1;Dr=Or&&(!document.documentMode||9<document.documentMode)}function jr(){Sr&&(Sr.detachEvent(`onpropertychange`,Mr),Cr=Sr=null)}function Mr(e){if(e.propertyName===`value`&&Tr(Cr)){var t=[];xr(t,Cr,e,vn(e)),Cn(wr,t)}}function Nr(e,t,n){e===`focusin`?(jr(),Sr=t,Cr=n,Sr.attachEvent(`onpropertychange`,Mr)):e===`focusout`&&jr()}function Pr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Tr(Cr)}function Fr(e,t){if(e===`click`)return Tr(t)}function Ir(e,t){if(e===`input`||e===`change`)return Tr(t)}function Lr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Rr=typeof Object.is==`function`?Object.is:Lr;function zr(e,t){if(Rr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Fe.call(t,i)||!Rr(e[i],t[i]))return!1}return!0}function Br(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Vr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Hr(e,t){var n=Vr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=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=Vr(n)}}function Ur(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ur(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Wr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Br(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=Br(e.document)}return t}function Gr(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 Kr=Tn&&`documentMode`in document&&11>=document.documentMode,qr=null,Jr=null,Yr=null,Xr=!1;function Zr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Xr||qr==null||qr!==Br(r)||(r=qr,`selectionStart`in r&&Gr(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}),Yr&&zr(Yr,r)||(Yr=r,r=Zf(Jr,`onSelect`),0<r.length&&(t=new Ln(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=qr)))}function Qr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var $r={animationend:Qr(`Animation`,`AnimationEnd`),animationiteration:Qr(`Animation`,`AnimationIteration`),animationstart:Qr(`Animation`,`AnimationStart`),transitionrun:Qr(`Transition`,`TransitionRun`),transitionstart:Qr(`Transition`,`TransitionStart`),transitioncancel:Qr(`Transition`,`TransitionCancel`),transitionend:Qr(`Transition`,`TransitionEnd`)},ei={},ti={};Tn&&(ti=document.createElement(`div`).style,`AnimationEvent`in window||(delete $r.animationend.animation,delete $r.animationiteration.animation,delete $r.animationstart.animation),`TransitionEvent`in window||delete $r.transitionend.transition);function ni(e){if(ei[e])return ei[e];if(!$r[e])return e;var t=$r[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ti)return ei[e]=t[n];return e}var ri=ni(`animationend`),ii=ni(`animationiteration`),ai=ni(`animationstart`),oi=ni(`transitionrun`),si=ni(`transitionstart`),ci=ni(`transitioncancel`),li=ni(`transitionend`),ui=new Map,di=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);di.push(`scrollEnd`);function fi(e,t){ui.set(e,t),Rt(t,[e])}var pi=0;function mi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=Sd.identifierPrefix;var n=pi++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function hi(e){if(e==null||typeof e==`string`)return e;var t=null,n=Ad;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function gi(e,t){return e=hi(e),t=hi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var _i=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},vi=[],yi=0,bi=0;function H(){for(var e=yi,t=bi=yi=0;t<e;){var n=vi[t];vi[t++]=null;var r=vi[t];vi[t++]=null;var i=vi[t];vi[t++]=null;var a=vi[t];if(vi[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Ci(n,i,a)}}function xi(e,t,n,r){vi[yi++]=e,vi[yi++]=t,vi[yi++]=n,vi[yi++]=r,bi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function U(e,t,n,r){return xi(e,t,n,r),wi(e)}function Si(e,t){return xi(e,null,null,t),wi(e)}function Ci(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ze(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function wi(e){if(50<jd)throw jd=0,Md=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ti={};function Ei(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Di(e,t,n,r){return new Ei(e,t,n,r)}function Oi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ki(e,t){var n=e.alternate;return n===null?(n=Di(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Ai(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ji(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Oi(r)&&(s=1);else if(typeof r==`string`)s=Jm(e,n,be.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case ie:return e=Di(31,n,t,a),e.elementType=ie,e.lanes=o,e;case O:return Mi(n.children,a,o,t);case k:s=8,a|=24;break;case A:return e=Di(12,n,t,a|2),e.elementType=A,e.lanes=o,e;case ee:return e=Di(13,n,t,a),e.elementType=ee,e.lanes=o,e;case te:return e=Di(19,n,t,a),e.elementType=te,e.lanes=o,e;case P:case oe:return e=a|32,e=Di(30,n,t,e),e.elementType=oe,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case M:s=10;break a;case j:s=9;break a;case N:s=11;break a;case ne:s=14;break a;case re:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Di(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Mi(e,t,n,r){return e=Di(7,e,r,t),e.lanes=n,e}function Ni(e,t,n){return e=Di(6,e,null,t),e.lanes=n,e}function Pi(e){var t=Di(18,null,null,0);return t.stateNode=e,t}function Fi(e,t,n){return t=Di(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ii=new WeakMap;function Li(e,t){if(typeof e==`object`&&e){var n=Ii.get(e);return n===void 0?(t={value:e,source:t,stack:Pe(t)},Ii.set(e,t),t):n}return{value:e,source:t,stack:Pe(t)}}var Ri=[],zi=0,Bi=null,Vi=0,Hi=[],Ui=0,Wi=null,Gi=1,qi=``;function Ji(e,t){Ri[zi++]=Vi,Ri[zi++]=Bi,Bi=e,Vi=t}function Yi(e,t,n){Hi[Ui++]=Gi,Hi[Ui++]=qi,Hi[Ui++]=Wi,Wi=e;var r=Gi;e=qi;var i=32-Ze(r)-1;r&=~(1<<i),n+=1;var a=32-Ze(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Gi=1<<32-Ze(t)+i|n<<i|r,qi=a+e}else Gi=1<<a|n<<i|r,qi=e}function Xi(e){e.return!==null&&(Ji(e,1),Yi(e,1,0))}function Zi(e){for(;e===Bi;)Bi=Ri[--zi],Ri[zi]=null,Vi=Ri[--zi],Ri[zi]=null;for(;e===Wi;)Wi=Hi[--Ui],Hi[Ui]=null,qi=Hi[--Ui],Hi[Ui]=null,Gi=Hi[--Ui],Hi[Ui]=null}function Qi(e,t){Hi[Ui++]=Gi,Hi[Ui++]=qi,Hi[Ui++]=Wi,Gi=t.id,qi=t.overflow,Wi=e}var $i=null,ea=null,W=!1,ta=null,na=!1,ra=Error(i(519));function ia(e){throw ua(Li(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),ra}function aa(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[xt]=e,t[St]=r,n){case`dialog`:Y(`cancel`,t),Y(`close`,t);break;case`iframe`:case`object`:case`embed`:Y(`load`,t);break;case`video`:case`audio`:for(n=0;n<Hf.length;n++)Y(Hf[n],t);break;case`source`:Y(`error`,t);break;case`img`:case`image`:case`link`:Y(`error`,t),Y(`load`,t);break;case`details`:Y(`toggle`,t);break;case`input`:Y(`invalid`,t),nn(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Y(`invalid`,t);break;case`textarea`:Y(`invalid`,t),sn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||rp(t.textContent,n)?(r.popover!=null&&(Y(`beforetoggle`,t),Y(`toggle`,t)),r.onScroll!=null&&Y(`scroll`,t),r.onScrollEnd!=null&&Y(`scrollend`,t),r.onClick!=null&&(t.onclick=gn),t=!0):t=!1,t||ia(e,!0)}function oa(e){for($i=e.return;$i;)switch($i.tag){case 5:case 31:case 13:na=!1;return;case 27:case 3:na=!0;return;default:$i=$i.return}}function sa(e){if(e!==$i)return!1;if(!W)return oa(e),W=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||gp(e.type,e.memoizedProps)),n=!n),n&&ea&&ia(e),oa(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ea=fm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ea=fm(e)}else t===27?(t=ea,Tp(e.type)?(e=dm,dm=null,ea=e):ea=t):ea=$i?um(e.stateNode.nextSibling):null;return!0}function ca(){ea=$i=null,W=!1}function la(){var e=ta;return e!==null&&(md===null?md=e:md.push.apply(md,e),ta=null),e}function ua(e){ta===null?ta=[e]:ta.push(e)}var da=_e(null),fa=null,pa=null;function ma(e,t,n){ye(da,t._currentValue),t._currentValue=n}function ha(e){e._currentValue=da.current,ve(da)}function ga(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function _a(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),ga(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),ga(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),ga(a.return,n,e),s=a.child,s=s===null?null:s.sibling):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function va(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Rr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===Ce.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[ch]:e.push(ch))}a=a.return}return e!==null&&_a(t,e,n,r),t.flags|=262144,e!==null}function ya(e){for(e=e.firstContext;e!==null;){if(!Rr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ba(e){fa=e,pa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function xa(e){return Ca(fa,e)}function Sa(e,t){return fa===null&&ba(e),Ca(e,t)}function Ca(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},pa===null){if(e===null)throw Error(i(308));pa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else pa=pa.next=t;return n}var wa=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Ta=t.unstable_scheduleCallback,Ea=t.unstable_NormalPriority,Da={$$typeof:M,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Oa(){return{controller:new wa,data:new Map,refCount:0}}function ka(e){e.refCount--,e.refCount===0&&Ta(Ea,function(){e.controller.abort()})}function Aa(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var ja=null;function Ma(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Na=null,Pa=0,Fa=0,Ia=null;function La(e,t){if(Na===null){var n=Na=[];Pa=0,Fa=Lf(),Ia={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Pa++,t.then(Ra,Ra),t}function Ra(){if(--Pa===0&&(ja=null,Na!==null)){Ia!==null&&(Ia.status=`fulfilled`);var e=Na;Na=null,Fa=0,Ia=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function za(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Ba=F.S;F.S=function(e,t){if(_d=ze(),typeof t==`object`&&t&&typeof t.then==`function`&&La(e,t),ja!==null)for(var n=Cf;n!==null;)Aa(n,ja),n=n.next;if(n=e.types,n!==null){for(var r=Cf;r!==null;)Aa(r,n),r=r.next;if(Fa!==0){r=ja,r===null&&(r=ja=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Ba!==null&&Ba(e,t)};var Va=_e(null);function Ha(){var e=Va.current;return e===null?ed.pooledCache:e}function Ua(e,t){t===null?ye(Va,Va.current):ye(Va,t.pool)}function Wa(){var e=Ha();return e===null?null:{parent:Da._currentValue,pool:e}}var Ga=Error(i(460)),Ka=Error(i(474)),qa=Error(i(542)),Ja={then:function(){}};function Ya(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Xa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(gn,gn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,eo(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(gn,gn);else{if(e=ed,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,eo(e),e}throw Qa=t,Ga}}function Za(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Qa=e,Ga):e}}var Qa=null;function $a(){if(Qa===null)throw Error(i(459));var e=Qa;return Qa=null,e}function eo(e){if(e===Ga||e===qa)throw Error(i(483))}var to=null,no=0;function ro(e){var t=no;return no+=1,to===null&&(to=[]),Xa(to,e,t)}function io(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function ao(e,t){throw t.$$typeof===T?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function oo(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=ki(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Ni(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===O?(e=d(e,t,n.props.children,r,n.key),io(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===re&&Za(i)===t.type)?(t=a(t,n.props),io(t,n),t.return=e,t):(t=ji(n.type,n.key,n.props,null,e.mode,r),io(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Fi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Mi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Ni(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case E:return n=ji(t.type,t.key,t.props,null,e.mode,n),io(n,t),n.return=e,n;case D:return t=Fi(t,e.mode,n),t.return=e,t;case re:return t=Za(t),f(e,t,n)}if(fe(t)||le(t))return t=Mi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,ro(t),n);if(t.$$typeof===M)return f(e,Sa(e,t),n);ao(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case E:return n.key===i?l(e,t,n,r):null;case D:return n.key===i?u(e,t,n,r):null;case re:return n=Za(n),p(e,t,n,r)}if(fe(n)||le(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,ro(n),r);if(n.$$typeof===M)return p(e,t,Sa(e,n),r);ao(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case E:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case D:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case re:return r=Za(r),m(e,t,n,r,i)}if(fe(r)||le(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,ro(r),i);if(r.$$typeof===M)return m(e,t,n,Sa(t,r),i);ao(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>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),W&&Ji(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return W&&Ji(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&(_=g.alternate,_!==null&&d.delete(_.key===null?h:_.key)),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),W&&Ji(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=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),W&&Ji(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 W&&Ji(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(_.key===null?g:_.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)}),W&&Ji(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===O&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case E:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===O){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),io(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===re&&Za(l)===r.type){n(e,r.sibling),c=a(r,o.props),io(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===O?(c=Mi(o.props.children,e.mode,c,o.key),io(c,o),c.return=e,e=c):(c=ji(o.type,o.key,o.props,null,e.mode,c),io(c,o),c.return=e,e=c)}return s(e);case D: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}n(e,r);break}t(e,r),r=r.sibling}c=Fi(o,e.mode,c),c.return=e,e=c}return s(e);case re:return o=Za(o),_(e,r,o,c)}if(fe(o))return h(e,r,o,c);if(le(o)){if(l=le(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,ro(o),c);if(o.$$typeof===M)return _(e,r,Sa(e,o),c);ao(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=Ni(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{no=0;var i=_(e,t,n,r);return to=null,i}catch(t){if(t===Ga||t===qa)throw t;var a=Di(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var so=oo(!0),co=oo(!1),lo=!1;function uo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function fo(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 po(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function mo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,$u&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=wi(e),Ci(e,null,n),t}return xi(e,r,t,n),wi(e)}function ho(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,mt(e,n)}}function go(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}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var _o=!1;function vo(){if(_o){var e=Ia;if(e!==null)throw e}}function yo(e,t,n,r){_o=!1;var i=e.updateQueue;lo=!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,p=f!==s.lane;if(p?(J&f)===f:(r&f)===f){f!==0&&f===Fa&&(_o=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=w({},d,f);break a;case 2:lo=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,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),cd|=o,e.lanes=o,e.memoizedState=d}}function bo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function xo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)bo(n[e],t)}var So=_e(null),Co=_e(0);function wo(e,t){e=od,ye(Co,e),ye(So,t),od=e|t.baseLanes}function To(){ye(Co,od),ye(So,So.current)}function Eo(){od=Co.current,ve(So),ve(Co)}var Do=_e(null),Oo=null;function ko(e){var t=e.alternate;ye(Po,Po.current&1),ye(Do,e),Oo===null&&(t===null||So.current!==null||t.memoizedState!==null)&&(Oo=e)}function Ao(e){ye(Po,Po.current),ye(Do,e),Oo===null&&(Oo=e)}function jo(e){e.tag===22?(ye(Po,Po.current),ye(Do,e),Oo===null&&(Oo=e)):Mo()}function Mo(){ye(Po,Po.current),ye(Do,Do.current)}function No(e){ve(Do),Oo===e&&(Oo=null),ve(Po)}var Po=_e(0);function Fo(e,t){ye(Do,Do.current),ye(Po,t)}function Io(e){ve(Po),ve(Do),Oo===e&&(Oo=null)}function Lo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||sm(n)||cm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ro=0,G=null,zo=null,Bo=null,Vo=!1,Ho=!1,Uo=!1,Wo=0,Go=0,Ko=null,qo=0;function Jo(){throw Error(i(321))}function Yo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Rr(e[n],t[n]))return!1;return!0}function Xo(e,t,n,r,i,a){return Ro=a,G=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,F.H=e===null||e.memoizedState===null?pc:mc,Uo=!1,a=n(r,i),Uo=!1,Ho&&(a=Qo(t,n,r,i)),Zo(e),a}function Zo(e){F.H=fc;var t=zo!==null&&zo.next!==null;if(Ro=0,Bo=zo=G=null,Vo=!1,Go=0,Ko=null,t)throw Error(i(300));e===null||jc||(e=e.dependencies,e!==null&&ya(e)&&(jc=!0))}function Qo(e,t,n,r){G=e;var a=0;do{if(Ho&&(Ko=null),Go=0,Ho=!1,25<=a)throw Error(i(301));if(a+=1,Bo=zo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}F.H=hc,o=t(n,r)}while(Ho);return o}function $o(){var e=F.H,t=e.useState()[0];return t=typeof t.then==`function`?os(t):t,e=e.useState()[0],(zo===null?null:zo.memoizedState)!==e&&(G.flags|=1024),t}function es(){var e=Wo!==0;return Wo=0,e}function ts(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ns(e){if(Vo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Vo=!1}Ro=0,Bo=zo=G=null,Ho=!1,Go=Wo=0,Ko=null}function rs(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Bo===null?G.memoizedState=Bo=e:Bo=Bo.next=e,Bo}function is(){if(zo===null){var e=G.alternate;e=e===null?null:e.memoizedState}else e=zo.next;var t=Bo===null?G.memoizedState:Bo.next;if(t!==null)Bo=t,zo=e;else{if(e===null)throw G.alternate===null?Error(i(467)):Error(i(310));zo=e,e={memoizedState:zo.memoizedState,baseState:zo.baseState,baseQueue:zo.baseQueue,queue:zo.queue,next:null},Bo===null?G.memoizedState=Bo=e:Bo=Bo.next=e}return Bo}function as(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function os(e){var t=Go;return Go+=1,Ko===null&&(Ko=[]),e=Xa(Ko,e,t),t=G,(Bo===null?t.memoizedState:Bo.next)===null&&(t=t.alternate,F.H=t===null||t.memoizedState===null?pc:mc),e}function ss(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return os(e);if(e.$$typeof===se)return;if(e.$$typeof===M)return xa(e)}throw Error(i(438,String(e)))}function cs(e){var t=null,n=G.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=G.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=as(),G.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ae;return t.index++,n}function ls(e,t){return typeof t==`function`?t(e):t}function us(e){return ds(is(),zo,e)}function ds(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Ro&f)===f:(J&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Fa&&(d=!0);else if((Ro&p)===p){u=u.next,p===Fa&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,G.lanes|=p,cd|=p;f=u.action,Uo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,G.lanes|=f,cd|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Rr(o,e.memoizedState)&&(jc=!0,d&&(n=Ia,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function fs(e){var t=is(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Rr(o,t.memoizedState)||(jc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ps(e,t,n){var r=G,a=is(),o=W;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Rr((zo||a).memoizedState,n);if(s&&(a.memoizedState=n,jc=!0),a=a.queue,Rs(gs.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Bo!==null&&!!(Bo.memoizedState.tag&1),Ns(e?9:8,{destroy:void 0},hs.bind(null,r,a,n,t),null),e){if(r.flags|=2048,ed===null)throw Error(i(349));o||Ro&127||ms(r,t,n)}return n}function ms(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=G.updateQueue,t===null?(t=as(),G.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function hs(e,t,n,r){t.value=n,t.getSnapshot=r,_s(t)&&vs(e)}function gs(e,t,n){return n(function(){_s(t)&&vs(e)})}function _s(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Rr(e,n)}catch{return!0}}function vs(e){var t=Si(e,2);t!==null&&Id(t,e,2)}function ys(e){var t=rs();if(typeof e==`function`){var n=e;if(e=n(),Uo){Xe(!0);try{n()}finally{Xe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:e},t}function bs(e,t,n,r){return e.baseState=n,ds(e,zo,typeof r==`function`?r:ls)}function xs(e,t,n,r,a){if(lc(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};F.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Ss(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ss(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=F.T,o={};o.types=a===null?null:a.types,F.T=o;try{var s=n(i,r),c=F.S;c!==null&&c(o,s),Cs(e,t,s)}catch(n){Ts(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),F.T=a}}else try{a=n(i,r),Cs(e,t,a)}catch(n){Ts(e,t,n)}}function Cs(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ws(e,t,n)},function(n){return Ts(e,t,n)}):ws(e,t,n)}function ws(e,t,n){t.status=`fulfilled`,t.value=n,Es(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ss(e,n)))}function Ts(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Es(t),t=t.next;while(t!==r)}e.action=null}function Es(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ds(e,t){return t}function Os(e,t){if(W){var n=ed.formState;if(n!==null){a:{var r=G;if(W){if(ea){b:{for(var i=ea,a=na;i.nodeType!==8;)if(!a||(i=um(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){ea=um(i.nextSibling),r=i.data===`F!`;break a}}ia(r)}r=!1}r&&(t=n[0])}}return n=rs(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ds,lastRenderedState:t},n.queue=r,n=oc.bind(null,G,r),r.dispatch=n,r=ys(!1),a=cc.bind(null,G,!1,r.queue),r=rs(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=xs.bind(null,G,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ks(e){return As(is(),zo,e)}function As(e,t,n){if(t=ds(e,t,Ds)[0],e=us(ls)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=os(t)}catch(e){throw e===Ga?qa:e}else r=t;t=is();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(G.flags|=2048,Ns(9,{destroy:void 0},js.bind(null,i,n),null)),[r,a,e]}function js(e,t){e.action=t}function Ms(e){var t=is(),n=zo;if(n!==null)return As(t,n,e);is(),t=t.memoizedState,n=is();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ns(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=G.updateQueue,t===null&&(t=as(),G.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Ps(){return is().memoizedState}function Fs(e,t,n,r){var i=rs();G.flags|=e,i.memoizedState=Ns(1|t,{destroy:void 0},n,r===void 0?null:r)}function Is(e,t,n,r){var i=is();r=r===void 0?null:r;var a=i.memoizedState.inst;zo!==null&&r!==null&&Yo(r,zo.memoizedState.deps)?i.memoizedState=Ns(t,a,n,r):(G.flags|=e,i.memoizedState=Ns(1|t,a,n,r))}function Ls(e,t){Fs(8390656,8,e,t)}function Rs(e,t){Is(2048,8,e,t)}function zs(e){G.flags|=4;var t=G.updateQueue;if(t===null)t=as(),G.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Bs(e){var t=is().memoizedState;return zs({ref:t,nextImpl:e}),function(){if($u&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Vs(e,t){return Is(4,2,e,t)}function Hs(e,t){return Is(4,4,e,t)}function Us(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ws(e,t,n){n=n==null?null:n.concat([e]),Is(4,4,Us.bind(null,t,e),n)}function Gs(){}function Ks(e,t){var n=is();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Yo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function qs(e,t){var n=is();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Yo(t,r[1]))return r[0];if(r=e(),Uo){Xe(!0);try{e()}finally{Xe(!1)}}return n.memoizedState=[r,t],r}function Js(e,t,n){return n===void 0||Ro&1073741824&&!(J&261930)?e.memoizedState=t:(e.memoizedState=n,e=Pd(),G.lanes|=e,cd|=e,n)}function Ys(e,t,n,r){return Rr(n,t)?n:So.current===null?!(Ro&106)||Ro&1073741824&&!(J&261930)?(jc=!0,e.memoizedState=n):(e=Pd(),G.lanes|=e,cd|=e,t):(e=Js(e,n,r),Rr(e,t)||(jc=!0),e)}function Xs(e,t,n,r,i){var a=pe.p;pe.p=a!==0&&8>a?a:8;var o=F.T,s={};s.types=o===null?null:o.types,F.T=s,cc(e,!1,t,n);try{var c=i(),l=F.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?sc(e,t,za(c,r),Nd(e)):sc(e,t,r,Nd(e))}catch(n){sc(e,t,{then:function(){},status:`rejected`,reason:n},Nd())}finally{pe.p=a,o!==null&&s.types!==null&&(o.types=s.types),F.T=o}}function Zs(){}function Qs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=$s(e).queue;Xs(e,a,t,me,n===null?Zs:function(){return ec(e),n(r)})}function $s(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:me,baseState:me,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:me},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ec(e){var t=$s(e);t.next===null&&(t=e.alternate.memoizedState),sc(e,t.next.queue,{},Nd())}function tc(){return xa(ch)}function nc(){return is().memoizedState}function rc(){return is().memoizedState}function ic(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Nd();e=po(n);var r=mo(t,e,n);r!==null&&(Id(r,t,n),ho(r,t,n)),t={cache:Oa()},e.payload=t;return}t=t.return}}function ac(e,t,n){var r=Nd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},lc(e)?uc(t,n):(n=U(e,t,n,r),n!==null&&(Id(n,e,r),dc(n,t,r)))}function oc(e,t,n){sc(e,t,n,Nd())}function sc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(lc(e))uc(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,Rr(s,o))return xi(e,t,i,0),ed===null&&H(),!1}catch{}if(n=U(e,t,i,r),n!==null)return Id(n,e,r),dc(n,t,r),!0}return!1}function cc(e,t,n,r){if(r={lane:2,revertLane:Lf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},lc(e)){if(t)throw Error(i(479))}else t=U(e,n,r,2),t!==null&&Id(t,e,2)}function lc(e){var t=e.alternate;return e===G||t!==null&&t===G}function uc(e,t){Ho=Vo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function dc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,mt(e,n)}}var fc={readContext:xa,use:ss,useCallback:Jo,useContext:Jo,useEffect:Jo,useImperativeHandle:Jo,useLayoutEffect:Jo,useInsertionEffect:Jo,useMemo:Jo,useReducer:Jo,useRef:Jo,useState:Jo,useDebugValue:Jo,useDeferredValue:Jo,useTransition:Jo,useSyncExternalStore:Jo,useId:Jo,useHostTransitionStatus:Jo,useFormState:Jo,useActionState:Jo,useOptimistic:Jo,useMemoCache:Jo,useCacheRefresh:Jo,useEffectEvent:Jo},pc={readContext:xa,use:ss,useCallback:function(e,t){return rs().memoizedState=[e,t===void 0?null:t],e},useContext:xa,useEffect:Ls,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Fs(4194308,4,Us.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=rs();t=t===void 0?null:t;var r=e();if(Uo){Xe(!0);try{e()}finally{Xe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=rs();if(n!==void 0){var i=n(t);if(Uo){Xe(!0);try{n(t)}finally{Xe(!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=ac.bind(null,G,e),[r.memoizedState,e]},useRef:function(e){var t=rs();return e={current:e},t.memoizedState=e},useState:function(e){e=ys(e);var t=e.queue,n=oc.bind(null,G,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Gs,useDeferredValue:function(e,t){return Js(rs(),e,t)},useTransition:function(){var e=ys(!1);return e=Xs.bind(null,G,e.queue,!0,!1),rs().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=G,a=rs();if(W){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),ed===null)throw Error(i(349));J&127||ms(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Ls(gs.bind(null,r,o,e),[e]),r.flags|=2048,Ns(9,{destroy:void 0},hs.bind(null,r,o,n,t),null),n},useId:function(){var e=rs(),t=ed.identifierPrefix;if(W){var n=qi,r=Gi;n=(r&~(1<<32-Ze(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Wo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=qo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:tc,useFormState:Os,useActionState:Os,useOptimistic:function(e){var t=rs();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=cc.bind(null,G,!0,n),n.dispatch=t,[e,t]},useMemoCache:cs,useCacheRefresh:function(){return rs().memoizedState=ic.bind(null,G)},useEffectEvent:function(e){var t=rs(),n={impl:e};return t.memoizedState=n,function(){if($u&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},mc={readContext:xa,use:ss,useCallback:Ks,useContext:xa,useEffect:Rs,useImperativeHandle:Ws,useInsertionEffect:Vs,useLayoutEffect:Hs,useMemo:qs,useReducer:us,useRef:Ps,useState:function(){return us(ls)},useDebugValue:Gs,useDeferredValue:function(e,t){return Ys(is(),zo.memoizedState,e,t)},useTransition:function(){var e=us(ls)[0],t=is().memoizedState;return[typeof e==`boolean`?e:os(e),t]},useSyncExternalStore:ps,useId:nc,useHostTransitionStatus:tc,useFormState:ks,useActionState:ks,useOptimistic:function(e,t){return bs(is(),zo,e,t)},useMemoCache:cs,useCacheRefresh:rc,useEffectEvent:Bs},hc={readContext:xa,use:ss,useCallback:Ks,useContext:xa,useEffect:Rs,useImperativeHandle:Ws,useInsertionEffect:Vs,useLayoutEffect:Hs,useMemo:qs,useReducer:fs,useRef:Ps,useState:function(){return fs(ls)},useDebugValue:Gs,useDeferredValue:function(e,t){var n=is();return zo===null?Js(n,e,t):Ys(n,zo.memoizedState,e,t)},useTransition:function(){var e=fs(ls)[0],t=is().memoizedState;return[typeof e==`boolean`?e:os(e),t]},useSyncExternalStore:ps,useId:nc,useHostTransitionStatus:tc,useFormState:Ms,useActionState:Ms,useOptimistic:function(e,t){var n=is();return zo===null?(n.baseState=e,[e,n.queue.dispatch]):bs(n,zo,e,t)},useMemoCache:cs,useCacheRefresh:rc,useEffectEvent:Bs};function gc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:w({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var _c={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Nd(),i=po(r);i.payload=t,n!=null&&(i.callback=n),t=mo(e,i,r),t!==null&&(Id(t,e,r),ho(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Nd(),i=po(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=mo(e,i,r),t!==null&&(Id(t,e,r),ho(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Nd(),r=po(n);r.tag=2,t!=null&&(r.callback=t),t=mo(e,r,n),t!==null&&(Id(t,e,n),ho(t,e,n))}};function vc(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!zr(n,r)||!zr(i,a):!0}function yc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&_c.enqueueReplaceState(t,t.state,null)}function bc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=w({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function xc(e){_i(e)}function Sc(e){console.error(e)}function Cc(e){_i(e)}function wc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Tc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Ec(e,t,n){return n=po(n),n.tag=3,n.payload={element:null},n.callback=function(){wc(e,t)},n}function Dc(e){return e=po(e),e.tag=3,e}function Oc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Tc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Tc(t,n,r),typeof i!=`function`&&(bd===null?bd=new Set([this]):bd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function kc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&va(t,n,a,!0),n=Do.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Oo===null?Jd():n.alternate===null&&sd===0&&(sd=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ja?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),_f(e,r,a)),!1;case 22:return n.flags|=65536,r===Ja?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),_f(e,r,a)),!1}throw Error(i(435,n.tag))}return _f(e,r,a),Jd(),!1}if(W)return t=Do.current,t===null?(r!==ra&&(t=Error(i(423),{cause:r}),ua(Li(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Li(r,n),a=Ec(e.stateNode,r,a),go(e,a),sd!==4&&(sd=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==ra&&(e=Error(i(422),{cause:r}),ua(Li(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Li(o,n),pd===null?pd=[o]:pd.push(o),sd!==4&&(sd=2),t===null)return!0;r=Li(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Ec(n.stateNode,r,e),go(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(bd===null||!bd.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Dc(a),Oc(a,e,n,r),go(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Ac=Error(i(461)),jc=!1;function Mc(e,t,n,r){t.child=e===null?co(t,null,n,r):so(t,e.child,n,r)}function Nc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ba(t),r=Xo(e,t,n,o,a,i),s=es(),e!==null&&!jc?(ts(e,t,i),sl(e,t,i)):(W&&s&&Xi(t),t.flags|=1,Mc(e,t,r,i),t.child)}function Pc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Oi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Fc(e,t,a,r,i)):(e=ji(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!cl(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?zr:n,n(o,r)&&e.ref===t.ref)return sl(e,t,i)}return t.flags|=1,e=ki(a,r),e.ref=t.ref,e.return=t,t.child=e}function Fc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(zr(a,r)&&e.ref===t.ref){if(jc=!1,t.pendingProps=r=a,cl(e,i))e.flags&131072&&(jc=!0);else return t.lanes=e.lanes,sl(e,t,i)}}return Uc(e,t,n,r,i)}function Ic(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Rc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ua(t,a===null?null:a.cachePool),a===null?To():wo(t,a),jo(t);else return r=t.lanes=536870912,Rc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ua(t,null),To(),Mo()):(Ua(t,a.cachePool),wo(t,a),Mo(),t.memoizedState=null);return Mc(e,t,i,n),t.child}function Lc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Rc(e,t,n,r,i){var a=Ha();return a=a===null?null:{parent:Da._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ua(t,null),To(),jo(t),e!==null&&va(e,t,r,!0),t.childLanes=i,null}function zc(e,t){return t=Qc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Bc(e,t,n){return so(t,e.child,null,n),e=zc(t,t.pendingProps),e.flags|=2,No(t),t.memoizedState=null,e}function Vc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(W){if(r.mode===`hidden`)return e=zc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Lc(null,e);if(Ao(t),(e=ea)?(e=om(e,na),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Wi===null?null:{id:Gi,overflow:qi},retryLane:536870912,hydrationErrors:null},n=Pi(e),n.return=t,t.child=n,$i=t,ea=null)):e=null,e===null)throw ia(t);return t.lanes=536870912,null}return zc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Ao(t),a){if(t.flags&256)t.flags&=-257,t=Bc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(jc||va(e,t,n,!1),a=(n&e.childLanes)!==0,jc||a){if(So.current===null){if(r=ed,r!==null&&(s=ht(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Si(e,s),Id(r,e,s),Ac;Jd()}t=Bc(e,t,n)}else e=o.treeContext,ea=um(s.nextSibling),$i=t,W=!0,ta=null,na=!1,e!==null&&Qi(t,e),t=zc(t,r),t.flags|=134221824;return t}return e=ki(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Hc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Uc(e,t,n,r,i){return ba(t),n=Xo(e,t,n,r,void 0,i),r=es(),e!==null&&!jc?(ts(e,t,i),sl(e,t,i)):(W&&r&&Xi(t),t.flags|=1,Mc(e,t,n,i),t.child)}function Wc(e,t,n,r,i,a){return ba(t),t.updateQueue=null,n=Qo(t,r,n,i),Zo(e),r=es(),e!==null&&!jc?(ts(e,t,a),sl(e,t,a)):(W&&r&&Xi(t),t.flags|=1,Mc(e,t,n,a),t.child)}function Gc(e,t,n,r,i){if(ba(t),t.stateNode===null){var a=Ti,o=n.contextType;typeof o==`object`&&o&&(a=xa(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=_c,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},uo(t),o=n.contextType,a.context=typeof o==`object`&&o?xa(o):Ti,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(gc(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&_c.enqueueReplaceState(a,a.state,null),yo(t,r,a,i),vo(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=bc(n,s);a.props=c;var l=a.context,u=n.contextType;o=Ti,typeof u==`object`&&u&&(o=xa(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&yc(t,a,r,o),lo=!1;var f=t.memoizedState;a.state=f,yo(t,r,a,i),vo(),l=t.memoizedState,s||f!==l||lo?(typeof d==`function`&&(gc(t,n,d,r),l=t.memoizedState),(c=lo||vc(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,fo(e,t),o=t.memoizedProps,u=bc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Ti,typeof l==`object`&&l&&(c=xa(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&yc(t,a,r,c),lo=!1,f=t.memoizedState,a.state=f,yo(t,r,a,i),vo();var p=t.memoizedState;o!==d||f!==p||lo||e!==null&&e.dependencies!==null&&ya(e.dependencies)?(typeof s==`function`&&(gc(t,n,s,r),p=t.memoizedState),(u=lo||vc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ya(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Hc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=so(t,e.child,null,i),t.child=so(t,null,n,i)):Mc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=sl(e,t,i),e}function Kc(e,t,n,r){return ca(),t.flags|=256,Mc(e,t,n,r),t.child}var qc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Jc(e){return{baseLanes:e,cachePool:Wa()}}function Yc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=dd),e}function Xc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Po.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(W){if(i?ko(t):Mo(),(e=ea)?(e=om(e,na),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Wi===null?null:{id:Gi,overflow:qi},retryLane:536870912,hydrationErrors:null},n=Pi(e),n.return=t,t.child=n,$i=t,ea=null)):e=null,e===null)throw ia(t);return t.lanes=cm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Mo(),i=t.mode,a=Qc({mode:`hidden`,children:a},i),r=Mi(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Jc(n),r.childLanes=Yc(e,o,n),t.memoizedState=qc,Lc(null,r)):(ko(t),Zc(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return el(e,t,a,o,r,c,s,n)}return i?(Mo(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=ki(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Mi(i,a,n,null),i.flags|=2):i=ki(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Lc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Jc(n):(a=i.cachePool,a===null?a=Wa():(s=Da._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Yc(e,o,n),t.memoizedState=qc,Lc(e.child,r)):(ko(t),n=e.child,e=n.sibling,n=ki(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function Zc(e,t){return t=Qc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Qc(e,t){return e=Di(22,e,null,t),e.lanes=0,e}function $c(e,t,n){return so(t,e.child,null,n),e=Zc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function el(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(ko(t),t.flags&=-257,$c(e,t,c)):t.memoizedState===null?(Mo(),o=a.fallback,s=t.mode,a=Qc({mode:`visible`,children:a.children},s),o=Mi(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,so(t,e.child,null,c),a=t.child,a.memoizedState=Jc(c),a.childLanes=Yc(e,r,c),t.memoizedState=qc,Lc(null,a)):(Mo(),t.child=e.child,t.flags|=128,null);if(ko(t),cm(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,ua({value:a,source:null,stack:null})),$c(e,t,c)}if(jc||va(e,t,c,!1),r=(c&e.childLanes)!==0,jc||r){if(So.current!==null)return $c(e,t,c);if(r=ed,r!==null&&(a=ht(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,Si(e,a),Id(r,e,a),Ac;return sm(o)||Jd(),$c(e,t,c)}return sm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,ea=um(o.nextSibling),$i=t,W=!0,ta=null,na=!1,e!==null&&Qi(t,e),t=Zc(t,a.children),t.flags|=134221824,t)}function tl(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ga(e.return,t,n)}function nl(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Lo(n)===null&&(t=e),e=e.sibling}return t}function rl(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function il(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function al(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Po.current;if(t.flags&128)return Fo(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Fo(t,o),i===`backwards`&&e!==null?(il(e),Mc(e,t,r,n),il(e)):Mc(e,t,r,n),r=W?Vi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&tl(e,n,t);else if(e.tag===19)tl(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`backwards`:n=nl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,il(t)),rl(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Lo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}rl(t,!0,n,null,a,r);break;case`together`:rl(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=nl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),rl(t,!1,i,n,a,r)}return t.child}function ol(e,t,n){var r=t.pendingProps;return ma(t,t.type,r.value),Mc(e,t,r.children,n),t.child}function sl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),cd|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(va(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=ki(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ki(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function cl(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&ya(e)))}function ll(e,t,n){switch(t.tag){case 3:we(t,t.stateNode.containerInfo),ma(t,Da,e.memoizedState.cache),ca();break;case 27:case 5:Ee(t);break;case 4:we(t,t.stateNode.containerInfo);break;case 10:ma(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ao(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return ko(t),t.flags|=128,null;r=va(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Xc(e,t,n):(ko(t),e=sl(e,t,n),e===null?null:e.sibling)}ko(t);break;case 19:if(t.flags&128)return al(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(va(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return al(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Fo(t,Po.current),r)break;return null;case 22:return t.lanes=0,Ic(e,t,n,t.pendingProps);case 24:ma(t,Da,e.memoizedState.cache)}return sl(e,t,n)}function ul(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)jc=!0;else{if(!cl(e,n)&&!(t.flags&128))return jc=!1,ll(e,t,n);jc=!!(e.flags&131072)}}else jc=!1,W&&t.flags&1048576&&Yi(t,Vi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Za(t.elementType),t.type=e,typeof e==`function`)Oi(e)?(r=bc(e,r),t.tag=1,t=Gc(null,t,e,r,n)):(t.tag=0,t=Uc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===N){t.tag=11,t=Nc(null,t,e,r,n);break a}if(a===ne){t.tag=14,t=Pc(null,t,e,r,n);break a}if(a===M){t.tag=10,t.type=e,t=ol(null,t,n);break a}}throw t=de(e)||e,Error(i(306,t,``))}}return t;case 0:return Uc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=bc(r,t.pendingProps),Gc(e,t,r,a,n);case 3:a:{if(we(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,fo(e,t),yo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ma(t,Da,r),r!==o.cache&&_a(t,[Da],n,!0),vo(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Kc(e,t,r,n);break a}if(r!==a){a=Li(Error(i(424)),t),ua(a),t=Kc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(ea=um(e.firstChild),$i=t,W=!0,ta=null,na=!0,n=co(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(ca(),r===a){t=sl(e,t,n);break a}Mc(e,t,r,n)}t=t.child}return t;case 26:return Hc(e,t),e===null?(n=Pm(t.type,null,t.pendingProps,null))?t.memoizedState=n:W||(t.stateNode=hp(t.type,t.pendingProps,Se.current,t)):t.memoizedState=Pm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ee(t),e===null&&W&&(r=t.stateNode=gm(t.type,t.pendingProps,Se.current),$i=t,na=!0,a=ea,Tp(t.type)?(dm=a,ea=um(r.firstChild)):ea=a),Mc(e,t,t.pendingProps.children,n),Hc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&W&&((a=r=ea)&&(r=im(r,t.type,t.pendingProps,na),r===null?a=!1:(t.stateNode=r,$i=t,ea=um(r.firstChild),na=!1,a=!0)),a||ia(t)),Ee(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,gp(a,o)?r=null:s!==null&&gp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Xo(e,t,$o,null,null,n),ch._currentValue=a),Hc(e,t),Mc(e,t,r,n),t.child;case 6:return e===null&&W&&((e=n=ea)&&(n=am(n,t.pendingProps,na),n===null?e=!1:(t.stateNode=n,$i=t,ea=null,e=!0)),e||ia(t)),null;case 13:return Xc(e,t,n);case 4:return we(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=so(t,null,r,n):Mc(e,t,r,n),t.child;case 11:return Nc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Hc(e,t),Mc(e,t,r,n),t.child;case 8:return Mc(e,t,t.pendingProps.children,n),t.child;case 12:return Mc(e,t,t.pendingProps.children,n),t.child;case 10:return ol(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,ba(t),a=xa(a),r=r(a),t.flags|=1,Mc(e,t,r,n),t.child;case 14:return Pc(e,t,t.type,t.pendingProps,n);case 15:return Fc(e,t,t.type,t.pendingProps,n);case 19:return al(e,t,n);case 31:return Vc(e,t,n);case 22:return Ic(e,t,n,t.pendingProps);case 24:return ba(t),r=xa(Da),e===null?(a=Ha(),a===null&&(a=ed,o=Oa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},uo(t),ma(t,Da,a)):((e.lanes&n)!==0&&(fo(e,t),yo(t,null,null,n),vo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ma(t,Da,r),r!==a.cache&&_a(t,[Da],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ma(t,Da,r))),Mc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:W&&Xi(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Hc(e,t),Mc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function dl(e){e.flags|=4}function fl(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Ym(t,r):Ym(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Gd())e.flags|=8192;else throw Qa=Ja,Ka}}else e.flags&=-16777217}function pl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Xm(t)){if(Gd())e.flags|=8192;else throw Qa=Ja,Ka}}function ml(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:lt(),e.lanes|=t,fd|=t)}function hl(e,t){if(!W)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function gl(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function _l(e,t,n){var r=t.pendingProps;switch(Zi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return gl(t),null;case 1:return gl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ha(Da),Te(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(sa(t)?dl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,la())),gl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(dl(t),o===null?(gl(t),fl(t,a,null,r,n)):(gl(t),pl(t,o))):o?o===e.memoizedState?(gl(t),t.flags&=-16777217):(dl(t),gl(t),pl(t,o)):(e=e.memoizedProps,e!==r&&dl(t),gl(t),fl(t,a,e,r,n)),null;case 27:if(De(t),n=Se.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&dl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return gl(t),t.subtreeFlags&=-33554433,null}e=be.current,sa(t)?aa(t,e):(e=gm(a,r,n),t.stateNode=e,dl(t))}return gl(t),t.subtreeFlags&=-33554433,null;case 5:if(De(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&dl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return gl(t),t.subtreeFlags&=-33554433,null}if(o=be.current,sa(t))aa(t,o);else{var s=pp(Se.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/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[xt]=t,o[St]=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(op(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&&dl(t)}}return gl(t),t.subtreeFlags&=-33554433,fl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&dl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=Se.current,sa(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=$i,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[xt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||rp(e.nodeValue,n)),e||ia(t,!0)}else e=pp(e).createTextNode(r),e[xt]=t,t.stateNode=e}return gl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=sa(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[xt]=t}else ca(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;gl(t),e=!1}else n=la(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(No(t),t):(No(t),null);if(t.flags&128)throw Error(i(558))}return gl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=sa(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[xt]=t}else ca(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;gl(t),a=!1}else a=la(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(No(t),t):(No(t),null)}return No(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),ml(t,t.updateQueue),gl(t),null);case 4:return Te(),e===null&&qf(t.stateNode.containerInfo),t.flags|=67108864,gl(t),null;case 10:return ha(t.type),gl(t),null;case 19:if(Io(t),r=t.memoizedState,r===null)return gl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)hl(r,!1);else{if(sd!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Lo(e),o!==null){for(t.flags|=128,hl(r,!1),e=o.updateQueue,t.updateQueue=e,ml(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Ai(n,e),n=n.sibling;return Fo(t,Po.current&1|2),W&&Ji(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ze()>vd&&(t.flags|=128,a=!0,hl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Lo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,ml(t,e),hl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!W)return gl(t),null}else 2*ze()-r.renderingStartTime>vd&&n!==536870912&&(t.flags|=128,a=!0,hl(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)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ze(),e.sibling=null,o=Po.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||W?Fo(t,o):(n=o,ye(Do,t),ye(Po,n),Oo===null&&(Oo=t)),W&&Ji(t,r.treeForkCount),e}return gl(t),null;case 22:case 23:return No(t),Eo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(gl(t),t.subtreeFlags&6&&(t.flags|=8192)):gl(t),n=t.updateQueue,n!==null&&ml(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&&ve(Va),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ha(Da),gl(t),null;case 25:return null;case 30:return t.flags|=33554432,gl(t),null}throw Error(i(156,t.tag))}function vl(e,t){switch(Zi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ha(Da),Te(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return De(t),null;case 31:if(t.memoizedState!==null){if(No(t),t.alternate===null)throw Error(i(340));ca()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(No(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ca()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Io(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return Te(),null;case 10:return ha(t.type),null;case 22:case 23:return No(t),Eo(),e!==null&&ve(Va),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ha(Da),null;case 25:return null;default:return null}}function yl(e,t){switch(Zi(t),t.tag){case 3:ha(Da),Te();break;case 26:case 27:case 5:De(t);break;case 4:Te();break;case 31:t.memoizedState!==null&&No(t);break;case 13:No(t);break;case 19:Io(t);break;case 10:ha(t.type);break;case 22:case 23:No(t),Eo(),e!==null&&ve(Va);break;case 24:ha(Da)}}function bl(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){gf(t,t.return,e)}}function xl(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){gf(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){gf(t,t.return,e)}}function Sl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{xo(t,n)}catch(t){gf(e,e.return,t)}}}function Cl(e,t,n){n.props=bc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){gf(e,t,n)}}function wl(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:var i=e.stateNode,a=mi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Lp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Z(e);f(e.child,!1,$p,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){gf(e,t,n)}}function Tl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){gf(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){gf(e,t,n)}else n.current=null}}function El(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)tm(e.stateNode,t[n])}function Dl(e){for(var t=e.return;t!==null&&(Al(t)&&tm(e.stateNode,t.stateNode),!kl(t));)t=t.return}function Ol(e){for(var t=e.return;t!==null&&(Al(t)&&nm(e.stateNode,t.stateNode),!kl(t));)t=t.return}function kl(e){return e.tag===5||e.tag===3||e.tag===27}function Al(e){return e&&e.tag===7&&e.stateNode!==null}function jl(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){gf(e,e.return,t)}}function Ml(e,t,n){try{var r=e.stateNode;cp(r,e.type,n,t),r[St]=t}catch(t){gf(e,e.return,t)}}function Nl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Tp(e.type)||e.tag===4}function Pl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Nl(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&&Tp(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 Fl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=gn)),El(e,r),Wt=!0;else if(i!==4&&(i===27&&(El(e,r),r=null,Tp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Fl(e,t,n,r),e=e.sibling;e!==null;)Fl(e,t,n,r),e=e.sibling}function Il(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),El(e,r),Wt=!0;else if(i!==4&&(i===27&&(El(e,r),r=null,Tp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Il(e,t,n,r),e=e.sibling;e!==null;)Il(e,t,n,r),e=e.sibling}function Ll(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);op(t,r,n),t[xt]=e,t[St]=n}catch(t){gf(e,e.return,t)}}var Rl=!1,zl=null;function Bl(e){(e.tag===30||e.subtreeFlags&33554432)&&(Rl=!0)}var Vl=null;function Hl(){var e=Vl;return Vl=null,e}var Ul=0;function Wl(e,t,n,r,i){return Ul=0,Gl(e.child,t,n,r,i)}function Gl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=jp(o);r.push(s),s.view&&(a=!0)}else a||jp(o).view&&(a=!0);Rl=!0,Op(o,Ul===0?t:t+`_`+Ul,n),Ul++}else e.tag===22&&e.memoizedState!==null||e.tag===30&&i||Gl(e.child,t,n,r,i)&&(a=!0);e=e.sibling}return a}function Kl(e,t){for(;e!==null;)e.tag===5?kp(e.stateNode,e.memoizedProps):e.tag===22&&e.memoizedState!==null||e.tag===30&&t||Kl(e.child,t),e=e.sibling}function ql(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(ql(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=gi(t.default,t.share),t!==`none`&&(Wl(e,n,t,null,!1)||Kl(e.child,!1))}e=e.sibling}}function Jl(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=mi(r,n),a=gi(r.default,n.paired?r.share:r.enter);a===`none`?ql(e):Wl(e,i,a,null,!1)?(ql(e),n.paired||t||Fd(e,r.onEnter)):Kl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Jl(e,t),e=e.sibling;else ql(e)}function Yl(e){if(zl!==null&&zl.size!==0){var t=zl;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=gi(n.default,n.share);if(a!==`none`&&(Wl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Fd(e,n.onShare)):Kl(e.child,!1)),t.delete(r),t.size===0)break}}}Yl(e)}e=e.sibling}}}function Xl(e){if(e.tag===30){var t=e.memoizedProps,n=mi(t,e.stateNode),r=zl===null?void 0:zl.get(n),i=gi(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Wl(e,n,i,null,!1)?r===void 0?Fd(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,zl.delete(n),Fd(e,t.onShare)):Kl(e.child,!1)),zl!==null&&Yl(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Xl(e),e=e.sibling;else zl!==null&&Yl(e)}function Zl(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=mi(t,e.stateNode);t=gi(t.default,t.update),e.flags&=-5,t!==`none`&&Wl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&Zl(e);e=e.sibling}}function Ql(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Kl(e.child,!1))}Ql(e)}e=e.sibling}}function $l(e){if(e.tag===30)e.stateNode.paired=null,Kl(e.child,!1),Ql(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)$l(e),e=e.sibling;else Ql(e)}function eu(e){for(e=e.child;e!==null;)e.tag===30?Kl(e.child,!1):e.subtreeFlags&33554432&&eu(e),e=e.sibling}function tu(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Ul<a.length){var l=a[Ul],u=jp(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Op(c,Ul===0?n:n+`_`+Ul,i),s&&e.flags&4||(Vl===null&&(Vl=[]),Vl.push(c,Ul===0?r:r+`_`+Ul,t.memoizedProps)),Ul++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:tu(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function nu(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=mi(n,r),a=gi(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(Mp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Ul=0,i=tu(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Fd(e,n.onUpdate))}else e.subtreeFlags&33554432&&nu(e,t);e=e.sibling}}var ru=!1,iu=!1,au=!1,ou=!1,su=typeof WeakSet==`function`?WeakSet:Set,cu=null,lu=!1,uu=!1,du=!1,fu=!1;function pu(e,t,n){if(e=e.containerInfo,dp=_h,e=Wr(e),Gr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(fp={focusedElem:e,selectionRange:r},_h=!1,n=(n&335544064)===n,cu=t,t=n?9270:1024;cu!==null;){if(e=cu,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&Xl(r[a]);if(e.alternate===null&&e.flags&2)n&&Bl(e),mu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&Xl(r),mu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Bl(e),mu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,cu=r):(n&&Zl(e),mu(n))}}zl=null}function mu(e){for(;cu!==null;){var t=cu,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=bc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){gf(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)rm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:rm(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=mi(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=gi(a.default,a.update),a!==`none`&&Wl(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,cu=r;break}cu=t.return}}function hu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Pu(e,n),r&4&&bl(5,n);break;case 1:if(Pu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){gf(n,n.return,e)}else{var i=bc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){gf(n,n.return,e)}}}r&64&&Sl(n),r&512&&wl(n,n.return);break;case 3:if(Pu(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{xo(e,t)}catch(e){gf(n,n.return,e)}}break;case 27:t===null&&r&4&&Ll(n);case 26:case 5:Pu(e,n),t===null&&r&4&&jl(n),r&512&&wl(n,n.return);break;case 12:Pu(e,n);break;case 31:Pu(e,n),r&4&&wu(e,n);break;case 13:Pu(e,n),r&4&&Tu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=bf.bind(null,n),lm(e,n))));break;case 22:if(r=n.memoizedState!==null||ru,!r){var a=t!==null&&t.memoizedState!==null||iu;t=ru,i=iu,ru=r,(iu=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Iu(e,n,r)):Pu(e,n),ru=t,iu=i}break;case 30:Pu(e,n),r&512&&wl(n,n.return);break;case 7:r&512&&wl(n,n.return);default:Pu(e,n)}}function gu(e,t){for(e=e.child;e!==null;)_u(e,t),e=e.sibling}function _u(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){gf(e,e.return,t)}vu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,Wt=!0}catch(t){gf(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Dp(s,!0):Dp(e.stateNode,!1)}catch(t){gf(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&gu(e,t);break;default:gu(e,t)}}function vu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:_u(n,r);break a;case 22:n.memoizedState===null&&vu(n,r);break a;default:vu(n,r)}}e=e.sibling}}function yu(e){var t=e.alternate;t!==null&&(e.alternate=null,yu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&At(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var bu=null,xu=!1;function Su(e,t,n){for(n=n.child;n!==null;)Cu(e,t,n),n=n.sibling}function Cu(e,t,n){if(Ye&&typeof Ye.onCommitFiberUnmount==`function`)try{Ye.onCommitFiberUnmount(Je,n)}catch{}switch(n.tag){case 26:iu||Tl(n,t),Su(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!iu&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:iu||Tl(n,t),Ol(n);var r=bu,i=xu;Tp(n.type)&&(bu=n.stateNode,xu=!1),Su(e,t,n),_m(n.stateNode,n.type,n.memoizedProps),bu=r,xu=i;break;case 5:iu||Tl(n,t),Ol(n);case 6:if(n.tag===6&&Ol(n),r=bu,i=xu,bu=null,Su(e,t,n),bu=r,xu=i,bu!==null){if(xu)try{(bu.nodeType===9?bu.body:bu.nodeName===`HTML`?bu.ownerDocument.body:bu).removeChild(n.stateNode),Wt=!0}catch(e){gf(n,t,e)}else try{bu.removeChild(n.stateNode),Wt=!0}catch(e){gf(n,t,e)}}break;case 18:bu!==null&&(xu?(e=bu,Ep(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Hh(e)):Ep(bu,n.stateNode));break;case 4:r=bu,i=xu,bu=n.stateNode.containerInfo,xu=!0,Su(e,t,n),bu=r,xu=i;break;case 0:case 11:case 14:case 15:xl(2,n,t),iu||xl(4,n,t),Su(e,t,n);break;case 1:iu||(Tl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Cl(n,t,r)),Su(e,t,n);break;case 21:Su(e,t,n);break;case 22:iu=(r=iu)||n.memoizedState!==null,Su(e,t,n),iu=r;break;case 30:Tl(n,t),Su(e,t,n);break;case 7:iu||Tl(n,t),Su(e,t,n);break;default:Su(e,t,n)}}function wu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hh(e)}catch(e){gf(t,t.return,e)}}}function Tu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hh(e)}catch(e){gf(t,t.return,e)}}function Eu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new su),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new su),t;default:throw Error(i(435,e.tag))}}function K(e,t){var n=Eu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=xf.bind(null,e,t);t.then(r,r)}})}function Du(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(Tp(l.type)){bu=l.stateNode,xu=!1;break a}break;case 5:bu=l.stateNode,xu=!1;break a;case 3:case 4:bu=l.stateNode.containerInfo,xu=!0;break a}l=l.return}if(bu===null)throw Error(i(160));Cu(s,c,o),bu=null,xu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)ku(t,e,n),t=t.sibling}var Ou=null;function ku(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}Du(t,e,n),Au(e),a&4&&(xl(3,e,e.return),bl(3,e),xl(5,e,e.return));break;case 1:Du(t,e,n),Au(e),a&512&&(iu||r===null||Tl(r,r.return)),a&64&&ru&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=Ou,Du(t,e,n),Au(e),a&512&&(iu||r===null||Tl(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(ru)e.stateNode=hp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[Ot]||r[xt]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),op(r,t,n),r[xt]=e,Pt(r),t=r;break a;case`link`:if(o=Km(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),op(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=Km(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),op(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[xt]=e,Pt(r),t=r}e.stateNode=t}}else ru||qm(o,e.type,e.stateNode)}else e.stateNode=Vm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Ml(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||iu||t.parentNode.removeChild(t)):a.count--,n===null?ru||qm(o,e.type,e.stateNode):Vm(o,n,e.memoizedProps))}break;case 27:Du(t,e,n),Au(e),a&512&&(iu||r===null||Tl(r,r.return)),r!==null&&a&4&&Ml(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=au,au=!1,Du(t,e,n),au=o,Au(e),a&512&&(iu||r===null||Tl(r,r.return)),e.flags&32){t=e.stateNode;try{cn(t,``),Wt=!0}catch(t){gf(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Ml(e,t,r===null?t:r.memoizedProps)),a&1024&&(ou=!0);break;case 6:if(Du(t,e,n),Au(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Wt=!0}catch(t){gf(e,e.return,t)}}break;case 3:if(Wt=!1,Gm=null,o=Ou,Ou=xm(t.containerInfo),Du(t,e,n),Ou=o,Au(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Hh(t.containerInfo)}catch(t){gf(e,e.return,t)}ou&&(ou=!1,ju(e)),Wt=!1;break;case 4:a=au,au=ru,r=Gt(),o=Ou,Ou=xm(e.stateNode.containerInfo),Du(t,e,n),Au(e),Ou=o,Wt&&uu&&(du=!0),Wt=r,au=a;break;case 12:Du(t,e,n),Au(e);break;case 31:Du(t,e,n),Au(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,K(e,t)));break;case 13:Du(t,e,n),Au(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(gd=ze()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,K(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=ru,l=iu,u=au;ru=c||o,au=u||o,iu=l||s,Du(t,e,n),iu=l,au=u,ru=c,Au(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||ru||iu||(t=s||iu,n=ru,r=iu,ru=o||ru,iu=t,Fu(e,2),ru=n,iu=r),!o&&au||gu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,K(e,n))));break;case 19:Du(t,e,n),Au(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,K(e,t)));break;case 30:a&512&&(iu||r===null||Tl(r,r.return)),a=Gt(),o=uu,s=(n&335544064)===n,c=e.memoizedProps,uu=s&&gi(c.default,c.update)!==`none`,Du(t,e,n),Au(e),s&&r!==null&&Wt&&(e.flags|=4),uu=o,Wt=a;break;case 21:break;case 7:a&512&&(iu||r===null||Tl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Du(t,e,n),Au(e)}}function Au(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Nl(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Al(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(kl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Il(e,Pl(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(cn(l,``),n.flags&=-33),Il(e,Pl(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Fl(e,Pl(e),u,s);break;default:throw Error(i(161))}}catch(t){gf(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ju(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ju(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,_h=!0,t.reset(),_h=!1),e=e.sibling}}function Mu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Nu(t,e),t=t.sibling;else nu(t,!1)}function Nu(e,t){var n=e.alternate;if(n===null)Jl(e,!1);else switch(e.tag){case 3:if(fu=lu=!1,Hl(),Mu(t,e),!lu&&!du){if(e=Vl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];kp(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),fu=!0}Vl=null;break;case 5:Mu(t,e);break;case 4:r=lu,lu=!1,Mu(t,e),lu&&(du=!0),lu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Mu(t,e):Jl(e,!1));break;case 30:r=lu,i=Hl(),lu=!1,Mu(t,e),lu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=mi(a,o),o=mi(n.memoizedProps,o);var s=gi(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Ul=0,t=tu(e,n,t,o,s,a,!0),Ul!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Fd(e,e.memoizedProps.onUpdate),Vl=i):i!==null&&(i.push.apply(i,Vl),Vl=i),lu=e.flags&32?!0:r;break;default:Mu(t,e)}}function Pu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)hu(e,t.alternate,t),t=t.sibling}function Fu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:xl(4,n,n.return),Fu(n,r);break;case 1:Tl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&Cl(n,n.return,i),Fu(n,r);break;case 27:r&2&&_m(n.stateNode,n.type,n.memoizedProps);case 5:Tl(n,n.return),n.tag!==5&&n.tag!==27||Ol(n),Fu(n,r);break;case 6:Ol(n);break;case 26:Tl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||iu||i.parentNode.removeChild(i),Fu(n,r);break;case 22:n.memoizedState===null&&Fu(n,r);break;case 30:Tl(n,n.return),Fu(n,r);break;case 7:Tl(n,n.return);default:Fu(n,r)}e=e.sibling}}function Iu(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:Iu(i,a,n),bl(4,a);break;case 1:if(Iu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){gf(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)bo(l[i],c)}catch(e){gf(r,r.return,e)}}s&&o&64&&Sl(a),wl(a,a.return);break;case 27:n&2&&Ll(a);case 5:a.tag!==5&&a.tag!==27||Dl(a),Iu(i,a,n),s&&r===null&&o&4&&jl(a),wl(a,a.return);break;case 6:Dl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||ru||qm(xm(c.ownerDocument),a.type,c),Iu(i,a,n),s&&r===null&&o&4&&jl(a),wl(a,a.return);break;case 12:Iu(i,a,n);break;case 31:Iu(i,a,n),s&&o&4&&wu(i,a);break;case 13:Iu(i,a,n),s&&o&4&&Tu(i,a);break;case 22:a.memoizedState===null&&Iu(i,a,n),wl(a,a.return);break;case 30:Iu(i,a,n),wl(a,a.return);break;case 7:wl(a,a.return);default:Iu(i,a,n)}t=t.sibling}}function Lu(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ka(n))}function Ru(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ka(e))}function zu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Bu(e,t,n,r),t=t.sibling;else i&&eu(t)}function Bu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&$l(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:zu(e,t,n,r),a&2048&&bl(9,t);break;case 1:zu(e,t,n,r);break;case 3:zu(e,t,n,r),i&&fu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&ka(a)));break;case 12:if(a&2048){zu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){gf(t,t.return,e)}}else zu(e,t,n,r);break;case 31:zu(e,t,n,r);break;case 13:zu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&$l(t),o._visibility&2?zu(e,t,n,r):(o._visibility|=2,Vu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&$l(s),o._visibility&2?zu(e,t,n,r):Hu(e,t)),a&2048&&Lu(s,t);break;case 24:zu(e,t,n,r),a&2048&&Ru(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Kl(a.child,!0),Kl(t.child,!0))),zu(e,t,n,r);break;default:zu(e,t,n,r)}}function Vu(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Vu(a,o,s,c,i),bl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Vu(a,o,s,c,i)):u._visibility&2?Vu(a,o,s,c,i):Hu(a,o),i&&l&2048&&Lu(o.alternate,o);break;case 24:Vu(a,o,s,c,i),i&&l&2048&&Ru(o.alternate,o);break;default:Vu(a,o,s,c,i)}t=t.sibling}}function Hu(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Hu(n,r),i&2048&&Lu(r.alternate,r);break;case 24:Hu(n,r),i&2048&&Ru(r.alternate,r);break;default:Hu(n,r)}t=t.sibling}}var Uu=8192;function Wu(e,t,n){if(e.subtreeFlags&Uu)for(e=e.child;e!==null;)Gu(e,t,n),e=e.sibling}function Gu(e,t,n){switch(e.tag){case 26:Wu(e,t,n),e.flags&Uu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&Qm(n,e)):$m(n,Ou,e.memoizedState,e.memoizedProps));break;case 5:Wu(e,t,n),e.flags&Uu&&(e=e.stateNode,(t&335544128)===t&&Qm(n,e));break;case 3:case 4:var r=Ou;Ou=xm(e.stateNode.containerInfo),Wu(e,t,n),Ou=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Uu,Uu=16777216,Wu(e,t,n),Uu=r):Wu(e,t,n));break;case 30:if((e.flags&Uu)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,zl===null&&(zl=new Map),zl.set(r,i)}Wu(e,t,n);break;default:Wu(e,t,n)}}function Ku(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function qu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];cu=r,Xu(r,e)}Ku(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ju(e),e=e.sibling}function Ju(e){switch(e.tag){case 0:case 11:case 15:qu(e),e.flags&2048&&xl(9,e,e.return);break;case 3:qu(e);break;case 12:qu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Yu(e)):qu(e);break;default:qu(e)}}function Yu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];cu=r,Xu(r,e)}Ku(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:xl(8,t,t.return),Yu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Yu(t));break;default:Yu(t)}e=e.sibling}}function Xu(e,t){for(;cu!==null;){var n=cu;switch(n.tag){case 0:case 11:case 15:xl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ka(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,cu=r;else a:for(n=e;cu!==null;){r=cu;var i=r.sibling,a=r.return;if(yu(r),r===n){cu=null;break a}if(i!==null){i.return=a,cu=i;break a}cu=a}}}var Zu={getCacheForType:function(e){var t=xa(Da),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return xa(Da).controller.signal}},Qu=typeof WeakMap==`function`?WeakMap:Map,$u=0,ed=null,q=null,J=0,td=0,nd=null,rd=!1,id=!1,ad=!1,od=0,sd=0,cd=0,ld=0,ud=0,dd=0,fd=0,pd=null,md=null,hd=!1,gd=0,_d=0,vd=1/0,yd=null,bd=null,xd=0,Sd=null,Cd=null,wd=0,Td=0,Ed=null,Dd=null,Od=null,kd=null,Ad=null,jd=0,Md=null;function Nd(){return $u&2&&J!==0?J&-J:F.T===null?vt():Lf()}function Pd(){if(dd===0){if(!(J&536870912)||W){var e=nt;nt<<=1,!(nt&3932160)&&(nt=262144),dd=e}else dd=536870912}return e=Do.current,e!==null&&(e.flags|=32),dd}function Fd(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Lp(mi(e.memoizedProps,n))),kd===null&&(kd=[]),kd.push(t.bind(null,r))}}function Id(e,t,n){(e===ed&&(td===2||td===9)||e.cancelPendingCommit!==null)&&(Ud(e,0),Bd(e,J,dd,!1)),dt(e,n),$u&2&&e===ed||(e===ed&&(!($u&2)&&(ld|=n),sd===4&&Bd(e,J,dd,!1)),kf(e))}function Ld(e,t,n){if($u&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||ot(e,t),a=r?Zd(e,t):Yd(e,t,!0),o=r;do{if(a===0){id&&!r&&Bd(e,t,0,!1);break}if(n=e.current.alternate,o&&!zd(n))a=Yd(e,t,!1),o=!1;else{if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=pd;var l=c.current.memoizedState.isDehydrated;if(l&&(Ud(c,s).flags|=256),s=Yd(c,s,!1),s!==2&&s!==6){if(ad&&!l){c.errorRecoveryDisabledLanes|=o,ld|=o,a=4;break a}o=md,md=a,o!==null&&(md===null?md=o:md.push.apply(md,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Ud(e,0),Bd(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Bd(r,t,dd,!rd);break a;case 2:md=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=gd+300-ze(),10<a)){if(Bd(r,t,dd,!rd),at(r,0,!0)!==0)break a;wd=t,r.timeoutHandle=yp(Rd.bind(null,r,n,md,yd,hd,t,dd,ld,fd,rd,o,`Throttled`,-0,0),a);break a}Rd(r,n,md,yd,hd,t,dd,ld,fd,rd,o,null,-0,0)}break}}while(1);kf(e)}function Rd(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:gn},zl=null,Gu(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=rh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?gd-ze():(a&4194048)===a?_d-ze():0,m=th(d,m),m!==null)?(wd=a,e.cancelPendingCommit=m(af.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Bd(e,a,o,!l)):af(e,t,a,n,r,i,o,s,c,l,u,d)}function zd(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Rr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Bd(e,t,n,r){t=st(e,t),t&=~ud,t&=~ld,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ze(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&pt(e,n,t)}function Vd(){return $u&6?!0:(Af(0,!1),!1)}function Hd(){if(q!==null){if(td===0)var e=q.return;else e=q,pa=fa=null,ns(e),to=null,no=0,e=q;for(;e!==null;)yl(e.alternate,e),e=e.return;q=null}}function Ud(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,bp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),wd=0,Hd(),ed=e,q=n=ki(e.current,null),J=t,td=0,nd=null,rd=!1,id=ot(e,t),ad=!1,fd=dd=ud=ld=cd=sd=0,md=pd=null,hd=!1,od=st(e,t),H(),n}function Wd(e,t){G=null,F.H=fc,t===Ga||t===qa?(t=$a(),td=3):t===Ka?(t=$a(),td=4):td=t===Ac?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,nd=t,q===null&&(sd=1,wc(e,Li(t,e.current)))}function Gd(){var e=Do.current;return e===null?!0:(J&4194048)===J?Oo===null:(J&62914560)===J||J&536870912?e===Oo:!1}function Kd(){var e=F.H;return F.H=fc,e===null?fc:e}function qd(){var e=F.A;return F.A=Zu,e}function Jd(){sd=4,rd||(J&4194048)!==J&&Do.current!==null||(id=!0),!(cd&134217727)&&!(ld&134217727)||ed===null||Bd(ed,J,dd,!1)}function Yd(e,t,n){var r=$u;$u|=2;var i=Kd(),a=qd();(ed!==e||J!==t)&&(yd=null,Ud(e,t)),t=!1;var o=sd;a:do try{if(td!==0&&q!==null){var s=q,c=nd;switch(td){case 8:Hd(),o=6;break a;case 3:case 2:case 9:case 6:Do.current===null&&(t=!0);var l=td;if(td=0,nd=null,tf(e,s,c,l),n&&id){o=0;break a}break;default:l=td,td=0,nd=null,tf(e,s,c,l)}}Xd(),o=sd;break}catch(t){Wd(e,t)}while(1);return t&&e.shellSuspendCounter++,pa=fa=null,$u=r,F.H=i,F.A=a,q===null&&(ed=null,J=0,H()),o}function Xd(){for(;q!==null;)$d(q)}function Zd(e,t){var n=$u;$u|=2;var r=Kd(),a=qd();ed!==e||J!==t?(yd=null,vd=ze()+500,Ud(e,t)):id=ot(e,t);a:do try{if(td!==0&&q!==null){t=q;var o=nd;b:switch(td){case 1:td=0,nd=null,tf(e,t,o,1);break;case 2:case 9:if(Ya(o)){td=0,nd=null,ef(t);break}t=function(){td!==2&&td!==9||ed!==e||(td=7),kf(e)},o.then(t,t);break a;case 3:td=7;break a;case 4:td=5;break a;case 7:Ya(o)?(td=0,nd=null,ef(t)):(td=0,nd=null,tf(e,t,o,7));break;case 5:var s=null;switch(q.tag){case 26:s=q.memoizedState;case 5:case 27:var c=q;if(s?Xm(s):c.stateNode.complete){td=0,nd=null;var l=c.sibling;if(l!==null)q=l;else{var u=c.return;u===null?q=null:(q=u,nf(u))}break b}}td=0,nd=null,tf(e,t,o,5);break;case 6:td=0,nd=null,tf(e,t,o,6);break;case 8:Hd(),sd=6;break a;default:throw Error(i(462))}}Qd();break}catch(t){Wd(e,t)}while(1);return pa=fa=null,F.H=r,F.A=a,$u=n,q===null?(ed=null,J=0,H(),sd):0}function Qd(){for(;q!==null&&!Le();)$d(q)}function $d(e){var t=ul(e.alternate,e,od);e.memoizedProps=e.pendingProps,t===null?nf(e):q=t}function ef(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Wc(n,t,t.pendingProps,t.type,void 0,J);break;case 11:t=Wc(n,t,t.pendingProps,t.type.render,t.ref,J);break;case 5:ns(t);var r=t;r===$i&&(W?(oa(r),r.tag===5&&r.stateNode!=null&&(ea=r.stateNode)):(oa(r),W=!0));default:yl(n,t),t=q=Ai(t,od),t=ul(n,t,od)}e.memoizedProps=e.pendingProps,t===null?nf(e):q=t}function tf(e,t,n,r){pa=fa=null,ns(t),to=null,no=0;var i=t.return;try{if(kc(e,i,t,n,J)){sd=1,wc(e,Li(n,e.current)),q=null;return}}catch(t){if(i!==null)throw q=i,t;sd=1,wc(e,Li(n,e.current)),q=null;return}t.flags&32768?(W||r===1?e=!0:id||J&536870912?e=!1:(rd=e=!0,(r===2||r===9||r===3||r===6)&&(r=Do.current,r!==null&&r.tag===13&&(r.flags|=16384))),rf(t,e)):nf(t)}function nf(e){var t=e;do{if(t.flags&32768){rf(t,rd);return}e=t.return;var n=_l(t.alternate,t,od);if(n!==null){q=n;return}if(t=t.sibling,t!==null){q=t;return}q=t=e}while(t!==null);sd===0&&(sd=5)}function rf(e,t){do{var n=vl(e.alternate,e);if(n!==null){n.flags&=32767,q=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){q=e;return}q=e=n}while(e!==null);sd=6,q=null}function af(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do pf();while(xd!==0);if($u&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===ed&&(q=ed=null,J=0),Cd=t,Sd=e,wd=n,Ed=a,Dd=r,of(e,t,n,s,c,l,f)}}function of(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Td=s,s|=bi,ft(e,n,s,r,i,a),kd=null,(n&335544064)===n?(Ad=Ma(e),r=10262):(Ad=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,Sf(Ue,function(){return mf(),null})):(e.callbackNode=null,e.callbackPriority=0),Rl=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=F.T,F.T=null,i=pe.p,pe.p=2,a=$u,$u|=4;try{pu(e,t,n)}finally{$u=a,pe.p=i,F.T=r}}xd=1,Rl?Od=Fp(o,e.containerInfo,Ad,lf,uf,cf,df,mf,sf,null,null):(lf(),uf(),df())}function sf(e){if(xd!==0){var t=Sd.onRecoverableError;t(e,{componentStack:null})}}function cf(){xd===3&&(xd=0,Nu(Cd,Sd),xd=4)}function lf(){if(xd===1){xd=0;var e=Sd,t=Cd,n=wd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=F.T,F.T=null;var i=pe.p;pe.p=2;var a=$u;$u|=4;try{uu=du=!1,ku(t,e,n),n=fp;var o=Wr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Ur(s.ownerDocument.documentElement,s)){if(c!==null&&Gr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Hr(s,h),v=Hr(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;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}_h=!!dp,fp=dp=null}finally{$u=a,pe.p=i,F.T=r}}e.current=t,xd=2}}function uf(){if(xd===2){xd=0;var e=Sd,t=Cd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=F.T,F.T=null;var r=pe.p;pe.p=2;var i=$u;$u|=4;try{hu(e,t.alternate,t)}finally{$u=i,pe.p=r,F.T=n}}xd=3}}function df(){if(xd===4||xd===3){xd=0;var e=Od;Od=null,Re();var t=Sd,n=Cd,r=wd,i=Dd,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?xd=5:(xd=0,Cd=Sd=null,ff(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(bd=null),_t(r),n=n.stateNode,Ye&&typeof Ye.onCommitFiberRoot==`function`)try{Ye.onCommitFiberRoot(Je,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=F.T,a=pe.p,pe.p=2,F.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{F.T=n,pe.p=a}}if(i=kd,o=Ad,Ad=null,i!==null&&(kd=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);wd&3&&pf(),kf(t),a=t.pendingLanes,r&261930&&a&42?t===Md?jd++:(jd=0,Md=t):(jd=0,Md=null),Af(0,!1)}}function ff(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ka(t)))}function pf(){return Od!==null&&(Od.skipTransition(),Od=null),lf(),uf(),df(),mf()}function mf(){if(xd!==5)return!1;var e=Sd,t=Td;Td=0;var n=_t(wd),r=F.T,a=pe.p;try{pe.p=32>n?32:n,F.T=null,n=Ed,Ed=null;var o=Sd,s=wd;if(xd=0,Cd=Sd=null,wd=0,$u&6)throw Error(i(331));var c=$u;if($u|=4,Ju(o.current),Bu(o,o.current,s,n),$u=c,Af(0,!1),Ye&&typeof Ye.onPostCommitFiberRoot==`function`)try{Ye.onPostCommitFiberRoot(Je,o)}catch{}return!0}finally{pe.p=a,F.T=r,ff(e,t)}}function hf(e,t,n){t=Li(n,t),t=Ec(e.stateNode,t,2),e=mo(e,t,2),e!==null&&(dt(e,2),kf(e))}function gf(e,t,n){if(e.tag===3)hf(e,e,n);else for(;t!==null;){if(t.tag===3){hf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(bd===null||!bd.has(r))){e=Li(n,e),n=Dc(2),r=mo(t,n,2),r!==null&&(Oc(n,r,t,e),dt(r,2),kf(r));break}}t=t.return}}function _f(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Qu;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)||(ad=!0,i.add(n),e=vf.bind(null,e,t,n),t.then(e,e))}function vf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ed===e&&(J&n)===n&&(sd===4||sd===3&&(J&62914560)===J&&300>ze()-gd?$u&2?ud|=n:Ud(e,0):ud|=n,fd===J&&(fd=0)),kf(e)}function yf(e,t){t===0&&(t=lt()),e=Si(e,t),e!==null&&(dt(e,t),kf(e))}function bf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),yf(e,n)}function xf(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),yf(e,n)}function Sf(e,t){return Ie(e,t)}var Cf=null,wf=null,Tf=!1,Ef=!1,Df=!1,Of=0;function kf(e){e!==wf&&e.next===null&&(wf===null?Cf=wf=e:wf=wf.next=e),Ef=!0,Tf||(Tf=!0,If())}function Af(e,t){if(!Df&&Ef){Df=!0;do for(var n=!1,r=Cf;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-Ze(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Ff(r,a))}else a=J,a=at(r,r===ed?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ot(r,a)||(n=!0,Ff(r,a))}r=r.next}while(n);Df=!1}}function jf(){Mf()}function Mf(){Ef=Tf=!1;var e=0;Of!==0&&vp()&&(e=Of);for(var t=ze(),n=null,r=Cf;r!==null;){var i=r.next,a=Nf(r,t);a===0?(r.next=null,n===null?Cf=i:n.next=i,i===null&&(wf=n)):(n=r,(e!==0||a&3)&&(Ef=!0)),r=i}xd!==0&&xd!==5||Af(e,!1),Of!==0&&(Of=0)}function Nf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ze(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=ct(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=ed,n=J,n=at(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(td===2||td===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&I(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||ot(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&I(r),_t(n)){case 2:case 8:n=He;break;case 32:n=Ue;break;case 268435456:n=Ge;break;default:n=Ue}return r=Pf.bind(null,e),n=Ie(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&I(r),e.callbackPriority=2,e.callbackNode=null,2}function Pf(e,t){if(xd!==0&&xd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(pf()&&e.callbackNode!==n)return null;var r=J;return r=at(e,e===ed?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Ld(e,r,t),Nf(e,ze()),e.callbackNode!=null&&e.callbackNode===n?Pf.bind(null,e):null)}function Ff(e,t){if(pf())return null;Ld(e,t,!0)}function If(){Cp(function(){$u&6?Ie(Ve,jf):Mf()})}function Lf(){if(Of===0){var e=Fa;e===0&&(e=tt,tt<<=1,!(tt&261888)&&(tt=256)),Of=e}return Of}function Rf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:hn(e)}function zf(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Rf((i[St]||null).action),o=r.submitter;o&&(t=(t=o[St]||null)?Rf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Ln(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Of!==0){var e=new FormData(i,o);Qs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),Qs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Bf=0;Bf<di.length;Bf++){var Vf=di[Bf];fi(Vf.toLowerCase(),`on`+(Vf[0].toUpperCase()+Vf.slice(1)))}fi(ri,`onAnimationEnd`),fi(ii,`onAnimationIteration`),fi(ai,`onAnimationStart`),fi(`dblclick`,`onDoubleClick`),fi(`focusin`,`onFocus`),fi(`focusout`,`onBlur`),fi(oi,`onTransitionRun`),fi(si,`onTransitionStart`),fi(ci,`onTransitionCancel`),fi(li,`onTransitionEnd`),zt(`onMouseEnter`,[`mouseout`,`mouseover`]),zt(`onMouseLeave`,[`mouseout`,`mouseover`]),zt(`onPointerEnter`,[`pointerout`,`pointerover`]),zt(`onPointerLeave`,[`pointerout`,`pointerover`]),Rt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Rt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Rt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Rt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Rt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Rt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Hf=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),Uf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Hf));function Wf(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){_i(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){_i(e)}i.currentTarget=null,a=c}}}}function Y(e,t){var n=t[wt];n===void 0&&(n=t[wt]=new Set);var r=e+`__bubble`;n.has(r)||(Jf(t,e,2,!1),n.add(r))}function Gf(e,t,n){var r=0;t&&(r|=4),Jf(n,e,r,t)}var Kf=`_reactListening`+Math.random().toString(36).slice(2);function qf(e){if(!e[Kf]){e[Kf]=!0,It.forEach(function(t){t!==`selectionchange`&&(Uf.has(t)||Gf(t,!1,e),Gf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Kf]||(t[Kf]=!0,Gf(`selectionchange`,!1,t))}}function Jf(e,t,n,r){switch(Ch(t)){case 2:var i=vh;break;case 8:i=$;break;default:i=yh}n=i.bind(null,t,n,e),i=void 0,!En||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Yf(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=jt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}Cn(function(){var r=a,i=vn(n),s=[];a:{var c=ui.get(e);if(c!==void 0){var l=Ln,u=e;switch(e){case`keypress`:if(Mn(n)===0)break a;case`keydown`:case`keyup`:l=nr;break;case`focusin`:u=`focus`,l=Kn;break;case`focusout`:u=`blur`,l=Kn;break;case`beforeblur`:case`afterblur`:l=Kn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Wn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Gn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=ar;break;case ri:case ii:case ai:l=Jn;break;case li:l=or;break;case`scroll`:case`scrollend`:l=zn;break;case`wheel`:l=sr;break;case`copy`:case`cut`:case`paste`:l=Yn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=rr;break;case`submit`:l=ir;break;case`toggle`:case`beforetoggle`:l=cr}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=wn(m,p),g!=null&&d.push(Xf(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==_n&&(u=n.relatedTarget||n.fromElement)&&(jt(u)||u[Ct]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?jt(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=Wn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=rr,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:L(c),h=l==null?u:L(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,jt(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?C(c,l,Qf):null,c!==null&&$f(s,u,c,d,!1),l!==null&&f!==null&&$f(s,f,l,d,!0)))}a:{if(c=r?L(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=Er;else if(br(c)){if(Dr)_=Ir;else{_=Pr;var v=Nr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&fn(r.elementType)&&(_=Er):_=Fr;if(_&&=_(e,r)){xr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?L(r):window,e){case`focusin`:(br(v)||v.contentEditable===`true`)&&(qr=v,Jr=r,Yr=null);break;case`focusout`:Yr=Jr=qr=null;break;case`mousedown`:Xr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Xr=!1,Zr(s,n,i);break;case`selectionchange`:if(Kr)break;case`keydown`:case`keyup`:Zr(s,n,i)}var y;if(B)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else gr?mr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(V&&n.locale!==`ko`&&(gr||b!==`onCompositionStart`?b===`onCompositionEnd`&&gr&&(y=jn()):(On=i,kn=`value`in On?On.value:On.textContent,gr=!0)),v=Zf(r,b),0<v.length&&(b=new Xn(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=hr(n),y!==null&&(b.data=y)))),(y=dr?_r(e,n):vr(e,n))&&(b=Zf(r,`onBeforeInput`),0<b.length&&(v=new Xn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),zf(s,e,r,n,i)}Wf(s,t)})}function Xf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Zf(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=wn(e,n),i!=null&&r.unshift(Xf(e,i,a)),i=wn(e,t),i!=null&&r.push(Xf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Qf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function $f(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=wn(n,a),l!=null&&o.unshift(Xf(n,l,c))):i||(l=wn(n,a),l!=null&&o.push(Xf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var ep=/\r\n?/g,tp=/\u0000|\uFFFD/g;function np(e){return(typeof e==`string`?e:``+e).replace(ep,`
|
|
10
|
+
`).replace(tp,``)}function rp(e,t){return t=np(t),np(e)===t}function ip(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||cn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&cn(e,``+r);else return;break;case`className`:qt(e,`class`,r);break;case`tabIndex`:qt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:qt(e,n,r);break;case`style`:dn(e,r,o);return;case`data`:if(t!==`object`){qt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=hn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&ip(e,t,`name`,a.name,a,null),ip(e,t,`formEncType`,a.formEncType,a,null),ip(e,t,`formMethod`,a.formMethod,a,null),ip(e,t,`formTarget`,a.formTarget,a,null)):(ip(e,t,`encType`,a.encType,a,null),ip(e,t,`method`,a.method,a,null),ip(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=hn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=gn);return;case`onScroll`:r!=null&&Y(`scroll`,e);return;case`onScrollEnd`:r!=null&&Y(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=hn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Y(`beforetoggle`,e),Y(`toggle`,e),Kt(e,`popover`,r);break;case`xlinkActuate`:R(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:R(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:R(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:R(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:R(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:R(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:R(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:R(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:R(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Kt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=pn.get(n)||n,Kt(e,n,r);else return}Wt=!0}function ap(e,t,n,r,a,o){switch(n){case`style`:dn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)cn(e,r);else if(typeof r==`number`||typeof r==`bigint`)cn(e,``+r);else return;break;case`onScroll`:r!=null&&Y(`scroll`,e);return;case`onScrollEnd`:r!=null&&Y(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=gn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Lt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[St]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}Wt=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Kt(e,n,r)}return}Wt=!0}function op(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Y(`error`,e),Y(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:ip(e,t,o,s,n,null)}}a&&ip(e,t,`srcSet`,n.srcSet,n,null),r&&ip(e,t,`src`,n.src,n,null);return;case`input`:Y(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:ip(e,t,r,d,n,null)}}nn(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Y(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:ip(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&an(e,!!r,n,!0):an(e,!!r,t,!1);return;case`textarea`:for(s in Y(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:ip(e,t,s,c,n,null)}sn(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:ip(e,t,l,r,n,null)}return;case`dialog`:Y(`beforetoggle`,e),Y(`toggle`,e),Y(`cancel`,e),Y(`close`,e);break;case`iframe`:case`object`:Y(`load`,e);break;case`video`:case`audio`:for(r=0;r<Hf.length;r++)Y(Hf[r],e);break;case`image`:Y(`error`,e),Y(`load`,e);break;case`details`:Y(`toggle`,e);break;case`embed`:case`source`:case`link`:Y(`error`,e),Y(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:ip(e,t,u,r,n,null)}return;default:if(fn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&ap(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&ip(e,t,c,r,n,null))}var sp={};function cp(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||ip(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(Wt=!0),o=m;break;case`name`:m!==f&&(Wt=!0),a=m;break;case`checked`:m!==f&&(Wt=!0),u=m;break;case`defaultChecked`:m!==f&&(Wt=!0),d=m;break;case`value`:m!==f&&(Wt=!0),s=m;break;case`defaultValue`:m!==f&&(Wt=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&ip(e,t,p,m,r,f)}}tn(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||ip(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(Wt=!0),p=o;break;case`defaultValue`:o!==l&&(Wt=!0),c=o;break;case`multiple`:o!==l&&(Wt=!0),s=o;default:o!==l&&ip(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?an(e,!!n,n?[]:``,!1):an(e,!!n,t,!0)):an(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:ip(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(Wt=!0),p=a;break;case`defaultValue`:a!==o&&(Wt=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&ip(e,t,s,a,r,o)}on(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:ip(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(Wt=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:ip(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&ip(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:ip(e,t,u,p,r,m)}return;default:if(fn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&ap(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||ap(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&ip(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||ip(e,t,f,p,r,m)}function lp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function up(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&lp(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&lp(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var dp=null,fp=null;function pp(e){return e.nodeType===9?e:e.ownerDocument}function mp(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function X(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function hp(e,t,n,r){return n=pp(n).createElement(e),n[xt]=r,n[St]=t,op(n,e,t),Pt(n),n}function gp(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var _p=null;function vp(){var e=window.event;return e&&e.type===`popstate`?e!==_p&&(_p=e,!0):(_p=null,!1)}var yp=typeof setTimeout==`function`?setTimeout:void 0,bp=typeof clearTimeout==`function`?clearTimeout:void 0,xp=typeof Promise==`function`?Promise:void 0,Sp=typeof requestAnimationFrame==`function`?requestAnimationFrame:yp,Cp=typeof queueMicrotask==`function`?queueMicrotask:xp===void 0?yp:function(e){return xp.resolve(null).then(e).catch(wp)};function wp(e){setTimeout(function(){throw e})}function Tp(e){return e===`head`}function Ep(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Hh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)vm(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,vm(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Ot]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&vm(e.ownerDocument.body)}n=i}while(n);Hh(t)}function Dp(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function Op(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function kp(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function Ap(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function jp(e){return Ap(e.getBoundingClientRect(),getComputedStyle(e),e)}function Mp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Ap(t,n,e)}function Np(e){return e.documentElement.clientHeight}function Pp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Fp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Np(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=Zm(f),u>eh){s.length=o;break}f=new Promise(Pp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Ip(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Ip.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:w({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Ip.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Ip.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Lp(e){return{name:e,group:new Ip(`group`,e),imagePair:new Ip(`image-pair`,e),old:new Ip(`old`,e),new:new Ip(`new`,e)}}function Z(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Z.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Vp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=zp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),f(this._fragmentFiber.child,!1,Q,e,s,r)}this._eventListeners=a}};function Q(e,t,n,r){return _(e).addEventListener(t,n,r),!1}Z.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Vp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=zp(i.optionsOrUseCapture),f(this._fragmentFiber.child,!1,Rp,e,n,i),r.splice(t,1),a!==null&&a()}};function Rp(e,t,n,r){return _(e).removeEventListener(t,n,r),!1}function zp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Bp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Vp(e,t,n,r){if(e.length===0)return-1;r=Bp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Bp(a.optionsOrUseCapture)===r)return i}return-1}Z.prototype.dispatchEvent=function(e){var t=p(this._fragmentFiber);if(t===null)return!0;t=_(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,zp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,zp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Z.prototype.focus=function(e){f(this._fragmentFiber.child,!0,Hp,e,void 0,void 0)};function Hp(e,t){return e.tag!==6&&(e=_(e),mm(e,t))}Z.prototype.focusLast=function(e){var t=[];f(this._fragmentFiber.child,!0,Up,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Hp(t[n],e);n--);};function Up(e,t){return t.push(e),!1}Z.prototype.blur=function(){var e=p(this._fragmentFiber);e!==null&&(e=_(e),e=pp(e).activeElement,e!==null&&f(this._fragmentFiber.child,!1,Wp,e,void 0,void 0))};function Wp(e,t){return e.tag!==6&&(e=_(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Z.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),f(this._fragmentFiber.child,!1,Gp,e,void 0,void 0)};function Gp(e,t){return e.tag===6||(e=_(e),t.observe(e)),!1}Z.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),f(this._fragmentFiber.child,!1,Kp,e,void 0,void 0);for(var n=t=0;n<qp.length;n++){var r=qp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):qp[t++]=r}qp.length=t}};function Kp(e,t){return e.tag===6||(e=_(e),t.unobserve(e)),!1}var qp=[],Jp=!1;function Yp(e,t,n){qp.push({fragmentInstance:e,observer:t,instance:n}),Jp||(Jp=!0,hm(function(){Jp=!1;var e=qp;qp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Z.prototype.getClientRects=function(){var e=[];return f(this._fragmentFiber.child,!1,Xp,e,void 0,void 0),e};function Xp(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=_(e),t.push.apply(t,e.getClientRects());return!1}Z.prototype.getRootNode=function(e){var t=p(this._fragmentFiber);return t===null?this:_(t).getRootNode(e)},Z.prototype.compareDocumentPosition=function(e){var t=p(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];f(this._fragmentFiber.child,!1,Up,n,void 0,void 0);var r=_(t);if(n.length===0){if(n=r,m(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=h(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=_(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=_(n[0]),i=_(n[n.length-1]);var a=m(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Zp(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Zp(e,t,n,r,i){var a=jt(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=p(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=C(n,a,S),t===null?t=!1:(f(t,!0,b,a,n),a=v,v=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=C(r,a,S),t===null?t=!1:(f(t,!0,x,a,r),a=v,y=v=null,t=a!==null)),t):!1}function Qp(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Z.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];f(this._fragmentFiber.child,!1,Up,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=h(this._fragmentFiber);if(r=n?r[1]||r[0]||p(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=_(r),Qp(e,n);return}if(r=_(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=_(a),Qp(a,n)):_(a).scrollIntoView(e),r+=n?-1:1}};function $p(e,t){return e=_(e),em(e,t),!1}function em(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function tm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,zp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<qp.length;i++){var a=qp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(qp[r++]=a)}qp.length=r,n.observe(e)}),em(e,t))}function nm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,zp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Yp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function rm(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:rm(n),At(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function im(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[Ot])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=um(e.nextSibling),e===null)break}return null}function am(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=um(e.nextSibling),e===null))return null;return e}function om(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=um(e.nextSibling),e===null))return null;return e}function sm(e){return e.data===`$?`||e.data===`$~`}function cm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function lm(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function um(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var dm=null;function fm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return um(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function pm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function mm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function hm(e){Sp(function(){Sp(function(t){return e(t)})})}function gm(e,t,n){switch(t=pp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function _m(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&ip(e,t,r,null,sp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===gn&&(e.onclick=null),At(e)}function vm(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);At(e)}var ym=new Map,bm=new Set;function xm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Sm=pe.d;pe.d={f:Cm,r:wm,D:Dm,C:Om,L:km,m:Am,X:Mm,S:jm,M:Nm};function Cm(){var e=Sm.f(),t=Vd();return e||t}function wm(e){var t=Mt(e);t!==null&&t.tag===5&&t.type===`form`?ec(t):Sm.r(e)}var Tm=typeof document>`u`?null:document;function Em(e,t,n){var r=Tm;if(r&&typeof t==`string`&&t){var i=en(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),bm.has(i)||(bm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),op(t,`link`,e),Pt(t),r.head.appendChild(t)))}}function Dm(e){Sm.D(e),Em(`dns-prefetch`,e,null)}function Om(e,t){Sm.C(e,t),Em(`preconnect`,e,t)}function km(e,t,n){Sm.L(e,t,n);var r=Tm;if(r&&e&&t){var i=`link[rel="preload"][as="`+en(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+en(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+en(n.imageSizes)+`"]`)):i+=`[href="`+en(e)+`"]`;var a=i;switch(t){case`style`:a=Fm(e);break;case`script`:a=zm(e)}if(!(ym.has(a)||(e=w({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),ym.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Im(a))||t===`script`&&r.querySelector(Bm(a))))){var o=r.createElement(`link`);op(o,`link`,e),t===`style`&&(o[kt]=!0,o.onload=o.onerror=function(){Ft(o)}),Pt(o),r.head.appendChild(o)}}}function Am(e,t){Sm.m(e,t);var n=Tm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+en(r)+`"][href="`+en(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=zm(e)}if(!ym.has(a)&&(e=w({rel:`modulepreload`,href:e},t),ym.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Bm(a)))return}r=n.createElement(`link`),op(r,`link`,e),Pt(r),n.head.appendChild(r)}}}function jm(e,t,n){Sm.S(e,t,n);var r=Tm;if(r&&e){var i=Nt(r).hoistableStyles,a=Fm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Im(a)))s.loading=5;else{e=w({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=ym.get(a))&&Um(e,n);var c=o=r.createElement(`link`);Pt(c),op(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,Hm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Mm(e,t){Sm.X(e,t);var n=Tm;if(n&&e){var r=Nt(n).hoistableScripts,i=zm(e),a=r.get(i);a||(a=n.querySelector(Bm(i)),a||(e=w({src:e,async:!0},t),(t=ym.get(i))&&Wm(e,t),a=n.createElement(`script`),Pt(a),op(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nm(e,t){Sm.M(e,t);var n=Tm;if(n&&e){var r=Nt(n).hoistableScripts,i=zm(e),a=r.get(i);a||(a=n.querySelector(Bm(i)),a||(e=w({src:e,async:!0,type:`module`},t),(t=ym.get(i))&&Wm(e,t),a=n.createElement(`script`),Pt(a),op(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Pm(e,t,n,r){var a=(a=Se.current)?xm(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`?(n=Fm(n.href),t=Nt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,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=Fm(n.href);var o=Nt(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(Im(e)))?o._p||(s.instance=o,s.state.loading=5):(o=ym.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},ym.set(e,o)),Rm(a,e,o,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`?(n=zm(n),t=Nt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Fm(e){return`href="`+en(e)+`"`}function Im(e){return`link[rel="stylesheet"][`+e+`]`}function Lm(e){return w({},e,{"data-precedence":e.precedence,precedence:null})}function Rm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[kt]){r.loading=1;return}}else t=e.createElement(`link`),t[kt]=!0,t.onload=t.onerror=Ft.bind(null,t),op(t,`link`,n),Pt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function zm(e){return`[src="`+en(e)+`"]`}function Bm(e){return`script[async]`+e}function Vm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+en(n.href)+`"]`);if(r)return t.instance=r,Pt(r),r;var a=w({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Pt(r),op(r,`style`,a),Hm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Fm(n.href);var o=e.querySelector(Im(a));if(o)return t.state.loading|=4,t.instance=o,Pt(o),o;r=Lm(n),(a=ym.get(a))&&Um(r,a),o=(e.ownerDocument||e).createElement(`link`),Pt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),op(o,`link`,r),t.state.loading|=4,Hm(o,n.precedence,e),t.instance=o;case`script`:return o=zm(n.src),(a=e.querySelector(Bm(o)))?(t.instance=a,Pt(a),a):(r=n,(a=ym.get(o))&&(r=w({},n),Wm(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Pt(a),op(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,Hm(r,n.precedence,e));return t.instance}function Hm(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<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Um(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Wm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Gm=null;function Km(e,t,n){if(Gm===null){var r=new Map,i=Gm=new Map;i.set(n,r)}else i=Gm,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Ot]||a[xt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function qm(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Jm(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 Ym(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Xm(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Zm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function Qm(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Zm(t),e.suspenseyImages.push(t)),e=ih.bind(e),t.decode().then(e,e))}function $m(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=Fm(r.href),a=t.querySelector(Im(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=rh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Pt(a);return}a=t.ownerDocument||t,r=Lm(r),(i=ym.get(i))&&Um(r,i),a=a.createElement(`link`),Pt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),op(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=rh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var eh=0;function th(e,t){return e.stylesheets&&e.count===0&&oh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&oh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&eh===0&&(eh=62500*up());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&oh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>eh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function nh(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)oh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function rh(){this.count--,nh(this)}function ih(){this.imgCount--,nh(this)}var ah=null;function oh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ah=new Map,t.forEach(sh,e),ah=null,rh.call(e))}function sh(e,t){if(!(t.state.loading&4)){var n=ah.get(e);if(n)var r=n.get(null);else{n=new Map,ah.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=rh.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var ch={$$typeof:M,Provider:null,Consumer:null,_currentValue:me,_currentValue2:me,_threadCount:0};function lh(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ut(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ut(0),this.hiddenUpdates=ut(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function uh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new lh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Di(3,null,null,t),e.current=a,a.stateNode=e,t=Oa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},uo(a),e}function dh(e){return e?(e=Ti,e):Ti}function fh(e,t,n,r,i,a){i=dh(i),r.context===null?r.context=i:r.pendingContext=i,r=po(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=mo(e,r,t),n!==null&&(Id(n,e,t),ho(n,e,t))}function ph(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function mh(e,t){ph(e,t),(e=e.alternate)&&ph(e,t)}function hh(e){if(e.tag===13||e.tag===31){var t=Si(e,67108864);t!==null&&Id(t,e,67108864),mh(e,67108864)}}function gh(e){if(e.tag===13||e.tag===31){var t=Nd();t=gt(t);var n=Si(e,t);n!==null&&Id(n,e,t),mh(e,t)}}var _h=!0;function vh(e,t,n,r){var i=F.T;F.T=null;var a=pe.p;try{pe.p=2,yh(e,t,n,r)}finally{pe.p=a,F.T=i}}function $(e,t,n,r){var i=F.T;F.T=null;var a=pe.p;try{pe.p=8,yh(e,t,n,r)}finally{pe.p=a,F.T=i}}function yh(e,t,n,r){if(_h){var i=bh(r);if(i===null)Yf(e,t,r,xh,n),Mh(e,r);else if(Ph(i,e,t,n,r))r.stopPropagation();else if(Mh(e,r),t&4&&-1<jh.indexOf(e)){for(;i!==null;){var a=Mt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=it(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ze(o);s.entanglements[1]|=c,o&=~c}kf(a),!($u&6)&&(vd=ze()+500,Af(0,!1))}}break;case 31:case 13:s=Si(a,2),s!==null&&Id(s,a,2),Vd(),mh(a,2)}if(a=bh(r),a===null&&Yf(e,t,r,xh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Yf(e,t,r,null,n)}}function bh(e){return e=vn(e),Sh(e)}var xh=null;function Sh(e){if(xh=null,e=jt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return xh=e,null}function Ch(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`fullscreenerror`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Be()){case Ve:return 2;case He:return 8;case Ue:case We:return 32;case Ge:return 268435456;default:return 32}default:return 32}}var wh=!1,Th=null,Eh=null,Dh=null,Oh=new Map,kh=new Map,Ah=[],jh=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Mh(e,t){switch(e){case`focusin`:case`focusout`:Th=null;break;case`dragenter`:case`dragleave`:Eh=null;break;case`mouseover`:case`mouseout`:Dh=null;break;case`pointerover`:case`pointerout`:Oh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:kh.delete(t.pointerId)}}function Nh(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Mt(t),t!==null&&hh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ph(e,t,n,r,i){switch(t){case`focusin`:return Th=Nh(Th,e,t,n,r,i),!0;case`dragenter`:return Eh=Nh(Eh,e,t,n,r,i),!0;case`mouseover`:return Dh=Nh(Dh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Oh.set(a,Nh(Oh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,kh.set(a,Nh(kh.get(a)||null,e,t,n,r,i)),!0}return!1}function Fh(e){var t=jt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,yt(e.priority,function(){gh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,yt(e.priority,function(){gh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ih(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);_n=r,n.target.dispatchEvent(r),_n=null}else return t=Mt(n),t!==null&&hh(t),e.blockedOn=n,!1;t.shift()}return!0}function Lh(e,t,n){Ih(e)&&n.delete(t)}function Rh(){wh=!1,Th!==null&&Ih(Th)&&(Th=null),Eh!==null&&Ih(Eh)&&(Eh=null),Dh!==null&&Ih(Dh)&&(Dh=null),Oh.forEach(Lh),kh.forEach(Lh)}function zh(e,n){e.blockedOn===n&&(e.blockedOn=null,wh||(wh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Rh)))}var Bh=null;function Vh(e){Bh!==e&&(Bh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Bh===e&&(Bh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Sh(r||n)===null)continue;break}var a=Mt(n);a!==null&&(e.splice(t,3),t-=3,Qs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Hh(e){function t(t){return zh(t,e)}Th!==null&&zh(Th,e),Eh!==null&&zh(Eh,e),Dh!==null&&zh(Dh,e),Oh.forEach(t),kh.forEach(t);for(var n=0;n<Ah.length;n++){var r=Ah[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ah.length&&(n=Ah[0],n.blockedOn===null);)Fh(n),n.blockedOn===null&&Ah.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[St]||null;if(typeof a==`function`)o||Vh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[St]||null)s=o.formAction;else if(Sh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Vh(n)}}}function Uh(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Wh(e){this._internalRoot=e}Gh.prototype.render=Wh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;fh(n,Nd(),e,t,null,null)},Gh.prototype.unmount=Wh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;fh(e.current,2,null,e,null,null),Vd(),t[Ct]=null}};function Gh(e){this._internalRoot=e}Gh.prototype.unstable_scheduleHydration=function(e){if(e){var t=vt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ah.length&&t!==0&&t<Ah[n].priority;n++);Ah.splice(n,0,e),n===0&&Fh(e)}};var Kh=n.version;if(Kh!==`19.3.1`)throw Error(i(527,Kh,`19.3.1`));pe.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var qh={bundleType:0,version:`19.3.1`,rendererPackageName:`react-dom`,currentDispatcherRef:F,reconcilerVersion:`19.3.1`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Jh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jh.isDisabled&&Jh.supportsFiber)try{Je=Jh.inject(qh),Ye=Jh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=xc,s=Sc,c=Cc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=uh(e,1,!1,null,null,n,r,null,o,s,c,Uh),e[Ct]=t.current,qf(e),new Wh(t)}})),Ji=t(((e,t)=>{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=qi()}));function Yi(e,t){let n=0;for(let r=0;r<e.length;r++)n+=t(e[r],r);return n}function Xi(e,t){let n={...e};for(let e=0;e<t.length;e++){let r=t[e];delete n[r]}return n}var Zi=Ji(),Qi=new Set,$i=null,ea=null;function W(e){ea!==null&&clearTimeout(ea),$i=e,ea=window.setTimeout(()=>{ea=null,$i=null;for(let e of Qi)e()},3e3);for(let e of Qi)e()}function ta(e){return Qi.add(e),()=>{Qi.delete(e)}}function na(){let e=(0,H.useSyncExternalStore)(ta,()=>$i);return e===null?null:(0,U.jsx)(`div`,{className:`bg-popover text-popover-foreground rounded-md border px-3 py-2 shadow-md`,children:e})}var ra=`notifications`,ia=Promise.resolve(),aa=new Set;function oa(){return window.isSecureContext?!(`Notification`in window)||!(`serviceWorker`in navigator)?`unsupported`:Notification.permission:`insecure`}function sa(){let e=localStorage.getItem(ra);if(e===null||e===`on`)return!0;if(e===`off`)return!1;throw Error(`unknown notification setting ${e}`)}async function ca(e){e&&Notification.permission==="default"&&await Notification.requestPermission(),localStorage.setItem(ra,e?`on`:`off`)}async function la(e,t){(await navigator.permissions.query({name:`notifications`})).addEventListener(`change`,t,{signal:e})}function ua(e,t,n){if(document.hidden)for(let r of t){let t=fa(e,r);pa(e,r,`${t===void 0?`Agent`:y[t.provider]} ${n}`,t?.title??`Session`,kt(e,r)).catch(e=>console.error(`could not show a notification`,e))}}function da(e,t,n){pa(e,t,fa(e,t)?.title??`Session`,n,`push:${kt(e,t)}`).catch(e=>console.error(`could not show a notification`,e))}function fa(e,t){return I().sessions.find(n=>n.machine===e&&n.id===t)}async function pa(e,t,n,r,i){if(oa()!==`granted`||!sa()||!He(I(),e).notifier)return;let a=fa(e,t);await(await navigator.serviceWorker.ready).showNotification(n,{body:r,tag:i,data:a===void 0?null:{kind:`session`,machine:e,project:a.projectId,sessionId:t}})}async function ma(e,t,n){oa()===`granted`&&sa()&&He(I(),n.machine).notifier&&await(await navigator.serviceWorker.ready).showNotification(e,{body:t,data:{kind:`terminal`,...n}})}function ha(){let e=I().machines.filter(e=>Et(e.id)&&!e.notifier&&!aa.has(e.id)).map(e=>e.id);if(e.length!==0){for(let t of e)aa.add(t);ga().then(t=>Promise.all(e.map(e=>R(e,`notifications.claim`,{endpoint:t})))).catch(e=>console.error(`could not claim notifications`,e)).finally(()=>{for(let t of e)aa.delete(t)})}}async function ga(){if(_a()!==`supported`)return null;let e=await navigator.serviceWorker.getRegistration();if(e===void 0)return null;let t=await e.pushManager.getSubscription();return t===null?null:t.endpoint}function _a(){return window.isSecureContext?!(`Notification`in window)||!(`serviceWorker`in navigator)||!(`PushManager`in window)?va()?`install`:`unsupported`:Notification.permission===`denied`?`denied`:`supported`:`insecure`}function va(){return/iPhone|iPad|iPod/.test(navigator.userAgent)||navigator.userAgent.includes(`Mac`)&&navigator.maxTouchPoints>1}async function ya(){return await(await navigator.serviceWorker.ready).pushManager.getSubscription()!==null}async function ba(){return Notification.permission==="default"&&await Notification.requestPermission(),Notification.permission===`granted`&&(await Ca(wa),!0)}function xa(){return Ca(Ta)}function Sa(e){return Ca(async()=>{if(_a()!==`supported`)return;let t=await(await navigator.serviceWorker.ready).pushManager.getSubscription();if(!t)return;let n=await Ea(),r=t.options.applicationServerKey;r!==null&&Oa(r)===n.publicKey?await ka(e,t,n):await wa()})}function Ca(e){let t=ia.then(e);return ia=t.catch(()=>void 0),t}async function wa(){await Ta();let e=await Ea(),t=await(await navigator.serviceWorker.ready).pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:e.publicKey});await Promise.all(Da().map(n=>ka(n,t,e)))}async function Ta(){let e=await(await navigator.serviceWorker.ready).pushManager.getSubscription();e&&(await Promise.all(Da().map(t=>R(t,`push.unsubscribe`,{endpoint:e.endpoint}))),await e.unsubscribe())}async function Ea(){let e=await caches.open(`offsite-worker`),t=await e.match(`/push-keys`);if(t!==void 0)return await t.json();let n=await crypto.subtle.generateKey({name:`ECDSA`,namedCurve:`P-256`},!0,[`sign`,`verify`]),r=(await crypto.subtle.exportKey(`jwk`,n.privateKey)).d;if(r===void 0)throw Error(`the browser did not export the push key`);let i={publicKey:Oa(await crypto.subtle.exportKey(`raw`,n.publicKey)),privateKey:r};return await e.put(`/push-keys`,new Response(JSON.stringify(i))),i}function Da(){return I().machines.filter(e=>Et(e.id)).map(e=>e.id)}function Oa(e){return btoa(String.fromCharCode(...new Uint8Array(e))).replaceAll(`+`,`-`).replaceAll(`/`,`_`).replace(/=+$/,``)}async function ka(e,t,n){await R(e,`push.subscribe`,{subscription:t.toJSON(),...n,machine:e})}var Aa=50,ja=null;function Ma(){let e=qt(),t=We(e.map(e=>e.id));Un({machines:e.map(jn),sessions:[],inactive:[],inactiveVersion:0,projects:e.flatMap(Me),prefs:Ut(),paletteOpen:!1,settingsOpen:!1,settingsPage:`General`,settingsAccount:null,settingsEditedMachine:null,settingsListing:!0,settingsMachine:e.at(0)?.id??null,unseen:[],selection:t,loaded:t?.sessionId===null,items:[],earlier:[],before:null,partial:``,requests:[],queue:[],settings:(t===null||t.sessionId===null?null:_n(M(t)))??c,draft:null,context:null,capabilities:null,errors:[],sentAt:0}),rt(),et({open:(e,t)=>{Ge(e,{via:t}),Pa(e)},close:e=>{let t=I().machines.find(t=>t.id===e);t!==void 0&&t.status!==`offline`&&Ge(e,{status:`offline`,via:null,notifier:!1})},unpaired:e=>Ge(e,{status:`unpaired`,via:null,notifier:!1}),event:Ra}),addEventListener(`keydown`,ha,{capture:!0}),addEventListener(`pointerdown`,ha,{capture:!0}),addEventListener(`storage`,e=>{e.key===`machines`&&st()}),_.history.subscribe(e=>{if(e.action.type===`PUSH`||e.action.type===`REPLACE`)return;let t=We(I().machines.map(e=>e.id));t===null?he():I().selection===null?ce(t):Xe()});for(let t of e)At(t.id,t.addresses);x(e),Na()}async function Na(){try{St!==null&&await ht(St,null);let e=$e();e!==null&&await ht([e.address],e.code)}catch(e){Ze(e)}}async function Pa(e){try{let t=await R(e,`sync`,void 0),n=I().machines.find(t=>t.id===e);if(n===void 0)return;Ge(e,{status:`online`,name:n.label??t.hostname,hostname:t.hostname,system:{defaults:t.defaults,platform:t.platform,defaultShell:t.defaultShell,defaultClaudeBaseDir:t.defaultClaudeBaseDir},activity:t.activity,providers:t.providers,terminals:t.terminals}),Fa(e,t.projects),Ia(e,t.sessions),te(e,t.config),E(e,t.composer),La(e),de(e),I().selection?.machine===e&&pe()}catch(e){Ze(e)}}function Fa(e,t){Xt({projects:[...I().projects.filter(t=>t.machine!==e),...t.map(t=>({...t,machine:e}))]}),Dn()}function Ia(e,t){let n=I(),r=n.selection,i=n.sessions.filter(t=>t.machine===e&&t.status!==`inactive`).map(e=>e.id).sort().join(` `),a=n.sessions.find(n=>n.machine===e&&n.id===r?.sessionId&&!t.some(e=>e.id===n.id)),o=[...n.sessions.filter(t=>t.machine!==e),...t.map(t=>({...t,machine:e})),...a===void 0?[]:[{...a,status:`inactive`}]],s=t.map(e=>e.id).sort().join(` `)===i?n.inactiveVersion:n.inactiveVersion+1;s===n.inactiveVersion&&on(o,n.sessions)||Xt({sessions:o,inactiveVersion:s})}function La(e){let t=I().selection;t?.machine===e&&t.sessionId!==null&&ee(e,t.projectId,t.sessionId)}function Ra(e,t){if(t.type===`delta`){za(e,t.sessionId,t.text);return}Ba();let n=I(),r=n.machines.find(t=>t.id===e);if(r===void 0)return;let i=n.selection?.machine===e,a=i?n.selection?.sessionId??null:null;switch(t.type){case`activity`:{let o=r.activity,s=a!==null&&t.activity[a]?.running===!0,c=Object.keys(o).filter(e=>o[e].running&&t.activity[e]?.running!==!0),l=Object.keys(t.activity).filter(e=>t.activity[e].waiting&&o[e]?.waiting!==!0);ua(e,c.filter(e=>o[e].prompted),`finished`),ua(e,l,`needs your input`),Ge(e,{activity:Object.fromEntries(Object.entries(t.activity).map(e=>[e[0],on(o[e[0]],e[1])?o[e[0]]:e[1]]))}),Xt({partial:s||!i?n.partial:``,unseen:[...n.unseen,...c.filter(e=>e!==a).map(t=>kt(e,t)).filter(e=>!n.unseen.includes(e))]});return}case`limits`:Ge(e,{claudeAccounts:r.claudeAccounts.map(e=>e.id===t.accountId?{...e,limits:t.limits}:e),codexAccounts:r.codexAccounts.map(e=>e.id===t.accountId?{...e,limits:t.limits}:e)});return;case`config`:te(e,t.config);return;case`composer`:E(e,t.composer);return;case`projects`:Fa(e,t.projects);return;case`sessions`:Ia(e,t.sessions);return;case`accounts`:be(e,t);return;case`providers`:Ge(e,{providers:t.providers});return;case`started`:if(n.selection===null||!i||n.selection.projectId!==t.projectId||n.selection.sessionId!==null)return;Xt({selection:{machine:e,projectId:t.projectId,sessionId:t.sessionId},loaded:!0,items:[],earlier:[],before:null,partial:``,requests:[],queue:[]}),Xe();return;case`notification`:da(e,t.sessionId,t.message);return;case`notifier`:Ge(e,{notifier:t.active});return;case`terminals`:Ge(e,{terminals:t.tabs});return;case`open`:if(i){ln(t.path);return}W(`${r.name} opened ${t.path}`);return}if(a!==null&&t.sessionId===a)switch(t.type){case`history`:Xt({loaded:!0,items:t.items,earlier:[],before:t.before,requests:t.requests,queue:t.queue,settings:t.settings??(n.settings.provider===t.provider?n.settings:Lt(He(n,e).composer,t.provider)),context:t.context,partial:t.partial}),t.settings!==null&>(kt(e,t.sessionId),t.settings);return;case`context`:Xt({context:t.context});return;case`items`:{let e=new Map(t.items.map(e=>[e.id,e]));Xt({items:[...n.items.map(t=>e.get(t.id)??t),...t.items.filter(e=>!n.items.some(t=>t.id===e.id))],partial:t.items.some(e=>e.kind===`assistant`&&e.parent===null)?``:n.partial});return}case`request`:Xt({requests:[...n.requests,t.request]});return;case`requestDone`:Xt({requests:n.requests.filter(e=>e.id!==t.requestId)});return;case`queue`:Xt({queue:t.queue});return;case`settings`:{let r={...t.settings,accountId:n.settings.accountId};Xt({settings:r}),gt(kt(e,t.sessionId),r)}}}function za(e,t,n){let r=I().selection;r?.machine===e&&r.sessionId===t&&(ja!==null&&(ja.machine!==e||ja.sessionId!==t)&&Ba(),ja===null&&(ja={machine:e,sessionId:t,text:``},setTimeout(Ba,Aa)),ja.text+=n)}function Ba(){if(ja===null)return;let e=ja;ja=null;let t=I();t.selection?.machine===e.machine&&t.selection.sessionId===e.sessionId&&Xt({partial:t.partial+e.text})}var Va=[[`path`,{d:`M12.001 4.00101V20.001`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M20.001 12.001L4.00098 12.001`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Ha=[[`path`,{d:`M9.40379 4.40379C10.2222 4.14157 11.0946 4 12 4C16.6944 4 20.5 7.80558 20.5 12.5C20.5 13.4054 20.3584 14.2778 20.0962 15.0962M6.24476 6.24476C4.5573 7.79814 3.5 10.0256 3.5 12.5C3.5 17.1944 7.30558 21 12 21C14.4744 21 16.7019 19.9427 18.2552 18.2552`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M5.88 18.7031L3.5 21.0031`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M2 2L22 22`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M4 4L2 6`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M22 6L19 3`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}]],Ua=[[`path`,{d:`M20.5 12.5C20.5 17.1944 16.6944 21 12 21C7.30558 21 3.5 17.1944 3.5 12.5C3.5 7.80558 7.30558 4 12 4C16.6944 4 20.5 7.80558 20.5 12.5Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M5.88 18.7031L3.5 21.0031`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M18.14 18.668L20.5 20.998`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M5 3L2 6`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M22 6L19 3`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}],[`path`,{d:`M12 8V12.5L14 14.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`5`}]],Wa=[[`path`,{d:`M13.9248 21H10.0752C5.44476 21 3.12955 21 2.27636 19.4939C1.42317 17.9879 2.60736 15.9914 4.97574 11.9985L6.90057 8.75333C9.17559 4.91778 10.3131 3 12 3C13.6869 3 14.8244 4.91777 17.0994 8.75332L19.0243 11.9985C21.3926 15.9914 22.5768 17.9879 21.7236 19.4939C20.8704 21 18.5552 21 13.9248 21Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12 9V13`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M12.125 16.75H12M12.25 16.75C12.25 16.8881 12.1381 17 12 17C11.8619 17 11.75 16.8881 11.75 16.75C11.75 16.6119 11.8619 16.5 12 16.5C12.1381 16.5 12.25 16.6119 12.25 16.75Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Ga=[[`path`,{d:`M5.92089 5.92089C8.15836 3.68342 9.2771 2.56468 10.5857 2.19562C11.5105 1.93479 12.4895 1.93479 13.4143 2.19562C14.7229 2.56468 15.8416 3.68342 18.0791 5.92089C20.3166 8.15836 21.4353 9.2771 21.8044 10.5857C22.0652 11.5105 22.0652 12.4895 21.8044 13.4143C21.4353 14.7229 20.3166 15.8416 18.0791 18.0791C15.8416 20.3166 14.7229 21.4353 13.4143 21.8044C12.4895 22.0652 11.5105 22.0652 10.5857 21.8044C9.2771 21.4353 8.15836 20.3166 5.92089 18.0791C3.68342 15.8416 2.56468 14.7229 2.19562 13.4143C1.93479 12.4895 1.93479 11.5105 2.19562 10.5857C2.56468 9.2771 3.68342 8.15836 5.92089 5.92089Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12 8V12`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M12.125 15.75H12M12.25 15.75C12.25 15.8881 12.1381 16 12 16C11.8619 16 11.75 15.8881 11.75 15.75C11.75 15.6119 11.8619 15.5 12 15.5C12.1381 15.5 12.25 15.6119 12.25 15.75Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Ka=[[`path`,{d:`M6.5 9.5C6.5 6.46243 8.96243 4 12 4C15.0376 4 17.5 6.46243 17.5 9.5V16C17.5 17.4142 17.5 18.1213 17.0607 18.5607C16.6213 19 15.9142 19 14.5 19H9.5C8.08579 19 7.37868 19 6.93934 18.5607C6.5 18.1213 6.5 17.4142 6.5 16V9.5Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M20 11V17`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M15 19V22`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M9 19V22`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M4 11V17`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}],[`path`,{d:`M10 4L8.5 2M14 4L15.5 2`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`5`}],[`path`,{d:`M6.5 10H17.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`6`}]],qa=[[`path`,{d:`M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M11 7L12 8.66667M17 17L13.4 11`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M13 7L7 17`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M6.5 14H12.5M17.5 14L15.5 14`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}]],Ja=[[`path`,{d:`M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M7 8V10`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M17 8V10`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M7 16.5C10.5 18.5 13.5 18.5 17 16.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M12.9896 2.5C12.1238 3.78525 10.5163 7.71349 10.0737 11.5798C9.98097 12.3899 9.9346 12.795 10.1905 13.1176C10.2151 13.1486 10.2474 13.1843 10.2757 13.212C10.5708 13.5 11.0149 13.5 11.9031 13.5C12.3889 13.5 12.6317 13.5 12.7766 13.6314C12.7923 13.6457 12.8051 13.6588 12.819 13.6748C12.9468 13.8225 12.9383 14.072 12.9212 14.5709C12.8685 16.1156 12.9401 19.0524 14 21.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}]],Ya=[[`path`,{d:`M12 5.75C12 3.75 13.5 1.75 15.5 1.75C15.5 3.75 14 5.75 12 5.75Z`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12.5 8.09001C11.9851 8.09001 11.5867 7.92646 11.1414 7.74368C10.5776 7.51225 9.93875 7.25 8.89334 7.25C7.02235 7.25 4 8.74945 4 12.7495C4 17.4016 7.10471 22.25 9.10471 22.25C9.77426 22.25 10.3775 21.9871 10.954 21.7359C11.4815 21.5059 11.9868 21.2857 12.5 21.2857C13.0132 21.2857 13.5185 21.5059 14.046 21.7359C14.6225 21.9871 15.2257 22.25 15.8953 22.25C17.2879 22.25 18.9573 19.8992 20 16.9008C18.3793 16.2202 17.338 14.618 17.338 12.75C17.338 11.121 18.2036 10.0398 19.5 9.25C18.5 7.75 17.0134 7.25 15.9447 7.25C14.8993 7.25 14.2604 7.51225 13.6966 7.74368C13.2514 7.92646 13.0149 8.09001 12.5 8.09001Z`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Xa=[[`path`,{d:`M4.5 8H19.5C19.9647 8 20.197 8 20.3902 7.96157C21.1836 7.80376 21.8038 7.18356 21.9616 6.39018C22 6.19698 22 5.96466 22 5.5C22 5.03534 22 4.80302 21.9616 4.60982C21.8038 3.81644 21.1836 3.19624 20.3902 3.03843C20.197 3 19.9647 3 19.5 3H4.5C4.03534 3 3.80302 3 3.60982 3.03843C2.81644 3.19624 2.19624 3.81644 2.03843 4.60982C2 4.80302 2 5.03534 2 5.5C2 5.96466 2 6.19698 2.03843 6.39018C2.19624 7.18356 2.81644 7.80376 3.60982 7.96157C3.80302 8 4.03534 8 4.5 8Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M14 12H10`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M3.5 8H20.5L19.9261 15.4602C19.724 18.0883 19.6229 19.4023 18.7603 20.2012C17.8976 21 16.5797 21 13.9438 21H10.0562C7.42032 21 6.10239 21 5.23974 20.2012C4.3771 19.4023 4.27602 18.0883 4.07386 15.4602L3.5 8Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Za=[[`path`,{d:`M15 6C15 6 9.00001 10.4189 9 12C8.99999 13.5812 15 18 15 18`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],Qa=[[`path`,{d:`M11 6H15.5C17.9853 6 20 8.01472 20 10.5C20 12.9853 17.9853 15 15.5 15H4`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M6.99998 12C6.99998 12 4.00001 14.2095 4 15C3.99999 15.7906 7 18 7 18`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],$a=[[`path`,{d:`M17.9998 15C17.9998 15 13.5809 9.00001 11.9998 9C10.4187 8.99999 5.99985 15 5.99985 15`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],eo=[[`path`,{d:`M14.1481 2.79115L14.3942 3.00083C15.0348 3.54679 15.8314 3.87674 16.6704 3.9437L16.9927 3.96941C18.6139 4.09878 19.9012 5.38613 20.0306 7.00731L20.0563 7.32956C20.1233 8.16862 20.4532 8.96518 20.9992 9.60584L21.2089 9.85188C22.2637 11.0897 22.2637 12.9103 21.2089 14.1481L20.9992 14.3942C20.4532 15.0348 20.1233 15.8314 20.0563 16.6704L20.0306 16.9927C19.9012 18.6139 18.6139 19.9012 16.9927 20.0306L16.6704 20.0563C15.8314 20.1233 15.0348 20.4532 14.3942 20.9992L14.1481 21.2089C12.9103 22.2637 11.0897 22.2637 9.85188 21.2089L9.60584 20.9992C8.96518 20.4532 8.16862 20.1233 7.32956 20.0563L7.00731 20.0306C5.38613 19.9012 4.09878 18.6139 3.96941 16.9927L3.9437 16.6704C3.87674 15.8314 3.54679 15.0348 3.00083 14.3942L2.79115 14.1481C1.73628 12.9103 1.73628 11.0897 2.79115 9.85189L3.00083 9.60584C3.54679 8.96518 3.87674 8.16862 3.9437 7.32956L3.96941 7.00731C4.09878 5.38613 5.38613 4.09878 7.00731 3.96941L7.32956 3.9437C8.16862 3.87674 8.96518 3.54679 9.60584 3.00083L9.85189 2.79115C11.0897 1.73628 12.9103 1.73628 14.1481 2.79115Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M9.5 9.5C9.5 8.11929 10.6193 7 12 7C13.3807 7 14.5 8.11929 14.5 9.5C14.5 10.3569 14.0689 11.1131 13.4117 11.5636C12.7283 12.0319 12 12.6716 12 13.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M12.125 16.75H12M12.25 16.75C12.25 16.8881 12.1381 17 12 17C11.8619 17 11.75 16.8881 11.75 16.75C11.75 16.6119 11.8619 16.5 12 16.5C12.1381 16.5 12.25 16.6119 12.25 16.75Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],to=[[`path`,{d:`M16.998 7.12652C17.3182 7.04393 17.654 7 18 7C20.2091 7 22 8.79086 22 11C22 13.2091 20.2091 15 18 15C17.6451 15 17.3009 14.9538 16.9733 14.867M16.998 7.12652C16.9993 7.08451 17 7.04233 17 7C17 4.79086 15.2091 3 13 3C11.0824 3 9.47994 4.34939 9.09041 6.15043M16.998 7.12652C16.9769 7.80763 16.7854 8.44584 16.4649 9M16.9733 14.867C16.9909 14.7472 17 14.6247 17 14.5C17 13.2905 16.1411 12.2816 15 12.05M16.9733 14.867C16.7957 16.0737 15.756 17 14.5 17H14C11.7909 17 10 18.7909 10 21M9.09041 6.15043C8.74377 6.05243 8.37801 6 8 6C5.79086 6 4 7.79086 4 10C4 10.3886 4.05542 10.7643 4.15878 11.1195M9.09041 6.15043C10.1015 6.43625 10.9498 7.10965 11.4649 8M4.15878 11.1195C2.9114 11.4832 2 12.6352 2 14C2 15.6569 3.34315 17 5 17C6.30622 17 7.41746 16.1652 7.82929 15M4.15878 11.1195C4.24921 11.4303 4.37632 11.7255 4.53513 12`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M11.8361 11.7435C11.3257 12.2353 10.453 12.3202 9.70713 11.9008C8.9612 11.4814 8.58031 10.6917 8.73535 10`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}]],no=[[`path`,{d:`M3 12C3 7.75736 3 5.63604 4.31802 4.31802C5.63604 3 7.75736 3 12 3C16.2426 3 18.364 3 19.682 4.31802C21 5.63604 21 7.75736 21 12C21 16.2426 21 18.364 19.682 19.682C18.364 21 16.2426 21 12 21C7.75736 21 5.63604 21 4.31802 19.682C3 18.364 3 16.2426 3 12Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M3 9H21`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],ro=[[`path`,{d:`M12 21.5C17.2467 21.5 21.5 17.2467 21.5 12C21.5 6.75329 17.2467 2.5 12 2.5C6.75329 2.5 2.5 6.75329 2.5 12C2.5 13.3377 2.66372 14.5604 3.1189 15.6954C3.81756 17.4374 3.68195 18.9241 2.5 20.5C3.86146 21.1644 5.86811 21.1419 7 20.0725C8.45323 20.9748 10.1636 21.5 12 21.5Z`,stroke:`currentColor`,strokeLinecap:`square`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M9.90631 11.6263L11.9577 9.5749C12.4596 9.073 12.7105 8.82204 13.0124 8.76637C13.1307 8.74454 13.2521 8.74454 13.3704 8.76637C13.6722 8.82204 13.9232 9.073 14.4251 9.5749C14.927 10.0768 15.178 10.3278 15.2336 10.6296C15.2555 10.7479 15.2555 10.8693 15.2336 10.9876C15.178 11.2895 14.927 11.5404 14.4251 12.0423L12.3737 14.0937C11.8032 14.6642 11.518 14.9495 11.1552 15.0997C10.7924 15.25 10.389 15.25 9.58216 15.25H8.75V14.4178C8.75 13.611 8.75 13.2076 8.90026 12.8448C9.05052 12.482 9.33578 12.1968 9.90631 11.6263Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],io=[[`path`,{d:`M16 10L18.1494 10.6448C19.5226 11.0568 20.2092 11.2628 20.6046 11.7942C21 12.3256 21 13.0425 21 14.4761V22`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M8 9L11 9M8 13L11 13`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M12 22V19C12 18.0572 12 17.5858 11.7071 17.2929C11.4142 17 10.9428 17 10 17H9C8.05719 17 7.58579 17 7.29289 17.2929C7 17.5858 7 18.0572 7 19V22`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M2 22L22 22`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M3 22V6.71724C3 4.20649 3 2.95111 3.79118 2.32824C4.58237 1.70537 5.74742 2.04355 8.07752 2.7199L13.0775 4.17122C14.4836 4.57937 15.1867 4.78344 15.5933 5.33965C16 5.89587 16 6.65344 16 8.16857V22`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}]],ao=[[`path`,{d:`M18.9991 19L5 5.00098`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M19 5L5.00092 18.999`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],oo=[[`path`,{d:`M9 9L5 5M16 12H22M12 16V22`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}],[`circle`,{cx:`12`,cy:`12`,r:`4`,stroke:`currentColor`,strokeWidth:`1.5`,key:`1`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`1.5`,key:`2`}]],so=[[`path`,{d:`M11.7453 14.85L6.90436 12V7C6.90436 4.79086 8.72949 3 10.9809 3C12.3782 3 13.6113 3.6898 14.3458 4.74128`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M9.59961 19.1791C10.3266 20.2757 11.5866 21.0008 13.0192 21.0008C15.2707 21.0008 17.0958 19.21 17.0958 17.0008V12.0008L12.1612 9.0957`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M9.45166 13.5L9.45123 7.66938L13.8642 5.16938C15.814 4.06481 18.3072 4.72031 19.4329 6.63348C20.1593 7.86806 20.1388 9.32466 19.5089 10.4995`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M4.48963 13.4993C3.8595 14.6742 3.83887 16.131 4.56539 17.3657C5.6911 19.2789 8.18428 19.9344 10.1341 18.8298L14.5471 16.3298L14.643 10.7344`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M17.0959 17.6309C18.4415 17.5734 19.7295 16.8634 20.4529 15.634C21.5786 13.7209 20.9106 11.2745 18.9608 10.1699L14.5478 7.66992L9.48907 10.4255`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}],[`path`,{d:`M6.90454 6.36938C5.55865 6.42662 4.27032 7.13672 3.54684 8.3663C2.42113 10.2795 3.08917 12.7258 5.03896 13.8304L9.45196 16.3304L14.5 13.5807`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`5`}]],co=[[`path`,{d:`M22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M8 12.5L10.5 15L16 9`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],lo=[[`path`,{d:`M17 3.33782C15.5291 2.48697 13.8214 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 11.3151 21.9311 10.6462 21.8 10`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M8 12.5C8 12.5 9.5 12.5 11.5 16C11.5 16 17.0588 6.83333 22 5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],uo=[[`path`,{d:`M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],fo=[[`path`,{d:`M18 15C18 15 13.5811 9.00001 12 9C10.4188 8.99999 6 15 6 15`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],po=[[`path`,{d:`M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M8 12.5L10 14.5L15.5 9.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],mo=[[`path`,{d:`M9.50293 21.6846C10.302 21.8902 11.1397 21.9996 12.0029 21.9996C12.8662 21.9996 13.7039 21.8902 14.5029 21.6846`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M14.5029 2.31504C13.7039 2.10938 12.8662 2 12.0029 2C11.1397 2 10.302 2.10938 9.50293 2.31504`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M2.37109 14.6777C2.59251 15.4726 2.91663 16.2527 3.34826 17.0003C3.77988 17.7479 4.29346 18.4187 4.87109 19.0079`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M21.6451 9.32261C21.4237 8.52778 21.0996 7.74762 20.668 7.00002C20.2363 6.25243 19.7228 5.58165 19.1451 4.99248`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M21.6436 14.6777C21.4221 15.4726 21.098 16.2527 20.6664 17.0003C20.2348 17.7479 19.7212 18.4187 19.1436 19.0079`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}],[`path`,{d:`M2.36952 9.32261C2.59093 8.52778 2.91506 7.74762 3.34668 7.00002C3.7783 6.25243 4.29188 5.58165 4.86952 4.99248`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`5`}],[`path`,{d:`M12.0039 11.5V12M13.0039 12C13.0039 12.5523 12.5562 13 12.0039 13C11.4516 13 11.0039 12.5523 11.0039 12C11.0039 11.4477 11.4516 11 12.0039 11C12.5562 11 13.0039 11.4477 13.0039 12Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`6`}]],ho=[[`circle`,{cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],go=[[`path`,{d:`M12 2.5C15.3137 2.5 18 5.18629 18 8.5C18 9.05228 18.4547 9.48717 18.9899 9.62343C20.7202 10.0639 22 11.6325 22 13.5C22 15.7091 20.2091 17.5 18 17.5H7C4.23858 17.5 2 15.2614 2 12.5C2 10.3043 3.41538 8.43933 5.38353 7.76734C5.7853 7.63017 6.10327 7.30325 6.21664 6.89413C6.91886 4.36014 9.24247 2.5 12 2.5Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12 17.5V21.5M12 21.5H6M12 21.5H18`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],_o=[[`path`,{d:`M18.2505 10.5H19.6403C21.4918 10.5 22.0421 10.7655 21.9975 12.0838C21.9237 14.2674 20.939 16.8047 17 17.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M5.94627 20.6145C2.57185 18.02 2.07468 14.3401 2.00143 10.5001C1.96979 8.8413 2.45126 8.5 4.65919 8.5H15.3408C17.5487 8.5 18.0302 8.8413 17.9986 10.5001C17.9253 14.3401 17.4281 18.02 14.0537 20.6145C13.0934 21.3528 12.2831 21.5 10.9194 21.5H9.08064C7.71686 21.5 6.90658 21.3528 5.94627 20.6145Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M11.3089 2.5C10.7622 2.83861 10.0012 4 10.0012 5.5M7.53971 4C7.53971 4 7 4.5 7 5.5M14.0012 4C13.7279 4.1693 13.5 5 13.5 5.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],vo=[[`path`,{d:`M14 4H10C6.22876 4 4.34315 4 3.17157 5.17157C2 6.34315 2 8.22876 2 12C2 15.7712 2 17.6569 3.17157 18.8284C4.34315 20 6.22876 20 10 20H14C17.7712 20 19.6569 20 20.8284 18.8284C22 17.6569 22 15.7712 22 12C22 8.22876 22 6.34315 20.8284 5.17157C19.6569 4 17.7712 4 14 4Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M7 9L8.83981 10.5858C9.61327 11.2525 10 11.5858 10 12C10 12.4142 9.61327 12.7475 8.83981 13.4142L7 15`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M13 16H17`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],yo=[[`path`,{d:`M14 21H16M14 21C13.1716 21 12.5 20.3284 12.5 19.5V17L12 17M14 21H10M10 21H8M10 21C10.8284 21 11.5 20.3284 11.5 19.5V17L12 17M12 17V21`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M16 3H8C5.17157 3 3.75736 3 2.87868 3.87868C2 4.75736 2 6.17157 2 9V11C2 13.8284 2 15.2426 2.87868 16.1213C3.75736 17 5.17157 17 8 17H16C18.8284 17 20.2426 17 21.1213 16.1213C22 15.2426 22 13.8284 22 11V9C22 6.17157 22 4.75736 21.1213 3.87868C20.2426 3 18.8284 3 16 3Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],bo=[[`path`,{d:`M18.8516 16.3743L19.5 6H4.5L5.14839 16.3743C5.315 19.0401 5.39831 20.373 6.26426 21.1865C7.13021 22 8.46571 22 11.1367 22H12.8633C15.5343 22 16.8698 22 17.7357 21.1865C18.6017 20.373 18.685 19.0401 18.8516 16.3743Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M16 6H21M16 6L15.3778 4.34082C15.0007 3.33524 14.8122 2.83245 14.4402 2.50292C14.3213 2.39765 14.1904 2.3069 14.0501 2.2326C13.6109 2 13.074 2 12 2C10.926 2 10.3891 2 9.9499 2.2326C9.8096 2.3069 9.67865 2.39765 9.55982 2.50292C9.18783 2.83245 8.99928 3.33524 8.62219 4.34082L8 6M16 6H8M3 6H8`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M9.5 11V17M14.5 11V17`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],xo=[[`path`,{d:`M16 6C16 6.55228 15.5523 7 15 7C14.4477 7 14 6.55228 14 6C14 5.44772 14.4477 5 15 5C15.5523 5 16 5.44772 16 6Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M10 6C10 6.55228 9.55228 7 9 7C8.44772 7 8 6.55228 8 6C8 5.44772 8.44772 5 9 5C9.55228 5 10 5.44772 10 6Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M16 18C16 18.5523 15.5523 19 15 19C14.4477 19 14 18.5523 14 18C14 17.4477 14.4477 17 15 17C15.5523 17 16 17.4477 16 18Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M16 12C16 12.5523 15.5523 13 15 13C14.4477 13 14 12.5523 14 12C14 11.4477 14.4477 11 15 11C15.5523 11 16 11.4477 16 12Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M10 18C10 18.5523 9.55228 19 9 19C8.44772 19 8 18.5523 8 18C8 17.4477 8.44772 17 9 17C9.55228 17 10 17.4477 10 18Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}],[`path`,{d:`M10 12C10 12.5523 9.55228 13 9 13C8.44772 13 8 12.5523 8 12C8 11.4477 8.44772 11 9 11C9.55228 11 10 11.4477 10 12Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`5`}]],So=[[`path`,{d:`M12 12H12.5M19 12H19.5M5 12H5.5M12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13ZM19 13C19.5523 13 20 12.5523 20 12C20 11.4477 19.5523 11 19 11C18.4477 11 18 11.4477 18 12C18 12.5523 18.4477 13 19 13ZM5 13C5.55228 13 6 12.5523 6 12C6 11.4477 5.55228 11 5 11C4.44772 11 4 11.4477 4 12C4 12.5523 4.44772 13 5 13Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],Co=[[`path`,{d:`M12 13.5V16.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M16 13L17 15.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M19.5 11L21.5 13`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M2.5 13L4.5 11`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M8 13L7 15.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}],[`path`,{d:`M2 7.5C2 7.5 5 13.5 12 13.5C19 13.5 22 7.5 22 7.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`5`}]],wo=[[`path`,{d:`M8 7L16 7`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M8 11L12 11`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M13 21.5V21C13 18.1716 13 16.7574 13.8787 15.8787C14.7574 15 16.1716 15 19 15H19.5M20 13.3431V10C20 6.22876 20 4.34315 18.8284 3.17157C17.6569 2 15.7712 2 12 2C8.22877 2 6.34315 2 5.17157 3.17157C4 4.34314 4 6.22876 4 10L4 14.5442C4 17.7892 4 19.4117 4.88607 20.5107C5.06508 20.7327 5.26731 20.9349 5.48933 21.1139C6.58831 22 8.21082 22 11.4558 22C12.1614 22 12.5141 22 12.8372 21.886C12.9044 21.8623 12.9702 21.835 13.0345 21.8043C13.3436 21.6564 13.593 21.407 14.0919 20.9081L18.8284 16.1716C19.4065 15.5935 19.6955 15.3045 19.8478 14.9369C20 14.5694 20 14.1606 20 13.3431Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],To=[[`path`,{d:`M4.5 13V9.45584C4.5 6.21082 4.5 4.58831 5.38607 3.48933C5.56508 3.26731 5.76731 3.06508 5.98933 2.88607C7.08831 2 8.71082 2 11.9558 2C12.6614 2 13.0141 2 13.3372 2.11401C13.4044 2.13772 13.4702 2.165 13.5345 2.19575C13.8436 2.34355 14.093 2.593 14.5919 3.09188L19.3284 7.82843C19.9065 8.40649 20.1955 8.69552 20.3478 9.06306C20.5 9.4306 20.5 9.83935 20.5 10.6569V14C20.5 17.7712 20.5 19.6569 19.3284 20.8284C18.1569 22 16.2712 22 12.5 22C12.1508 22 11.8178 22 11.5 21.9991M13.5 2.5V3C13.5 5.82843 13.5 7.24264 14.3787 8.12132C15.2574 9 16.6716 9 19.5 9H20`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M3.5 22V20.6611C3.5 20.0548 3.74082 19.4735 4.16947 19.0448L8.81022 14.4041C9.06894 14.1453 9.41983 14 9.78571 14C10.1516 14 10.5025 14.1453 10.7612 14.4041L11.0959 14.7388C11.3547 14.9975 11.5 15.3484 11.5 15.7143C11.5 16.0802 11.3547 16.4311 11.0959 16.6898L6.45518 21.3305C6.02653 21.7592 5.44515 22 4.83894 22H3.5Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Eo=[[`circle`,{cx:`12`,cy:`12`,r:`3`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M9 12H3M15 12H21`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Do=[[`path`,{d:`M19 17L19 11C19 8.17157 19 6.75736 18.1213 5.87868C17.2426 5 15.8284 5 13 5H10M10 5C10 4.29977 11.9943 2.99153 12.5 2.5M10 5C10 5.70023 11.9943 7.00847 12.5 7.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M5 7.5L5 13.5C5 16.3284 5 17.7426 5.87868 18.6213C6.75736 19.5 8.17157 19.5 11 19.5H14M14 19.5C14 20.2002 12.0057 21.5085 11.5 22M14 19.5C14 18.7998 12.0057 17.4915 11.5 17`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`circle`,{cx:`19`,cy:`19`,r:`2`,stroke:`currentColor`,strokeWidth:`1.5`,key:`2`}],[`circle`,{cx:`5`,cy:`5`,r:`2`,stroke:`currentColor`,strokeWidth:`1.5`,key:`3`}]],Oo=[[`path`,{d:`M6 8C7.10457 8 8 7.10457 8 6C8 4.89543 7.10457 4 6 4C4.89543 4 4 4.89543 4 6C4 7.10457 4.89543 8 6 8Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12 20C13.1046 20 14 19.1046 14 18C14 16.8954 13.1046 16 12 16C10.8954 16 10 16.8954 10 18C10 19.1046 10.8954 20 12 20Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M18 8C19.1046 8 20 7.10457 20 6C20 4.89543 19.1046 4 18 4C16.8954 4 16 4.89543 16 6C16 7.10457 16.8954 8 18 8Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M6.01734 8.74067C6.01734 10.4142 5.77537 12.1995 9.22051 11.9855H12.0053M17.9929 8.57617C18.1259 11.9855 16.9199 11.7648 15.7861 11.9855H12.0053M12.0053 15.7001V11.9855`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}]],ko=[[`path`,{d:`M6 8L6 16`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M18 16V12C18 9.17156 18 7.75735 17.1213 6.87867C16.2426 5.99999 14.8284 5.99999 12 5.99999L11 5.99999M11 5.99999C11 5.29976 12.9943 3.99152 13.5 3.49999M11 5.99999C11 6.70022 12.9943 8.00846 13.5 8.49999`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`circle`,{cx:`6`,cy:`18`,r:`2`,stroke:`currentColor`,strokeWidth:`1.5`,key:`2`}],[`circle`,{cx:`6`,cy:`6`,r:`2`,stroke:`currentColor`,strokeWidth:`1.5`,key:`3`}],[`circle`,{cx:`18`,cy:`18`,r:`2`,stroke:`currentColor`,strokeWidth:`1.5`,key:`4`}]],Ao=[[`path`,{d:`M20.7104 8.70122L21.9186 12.7288C21.9578 12.8592 21.9773 12.9244 21.9879 12.9914L21.9908 13.0118C22 13.079 22 13.147 22 13.2831C22 16.7797 22 18.528 20.9812 19.6669C20.8824 19.7774 20.7774 19.8824 20.6669 19.9812C19.528 21 17.7797 21 14.2831 21H9.71685C6.22026 21 4.47197 21 3.33311 19.9812C3.22259 19.8824 3.11765 19.7774 3.01877 19.6669C2 18.528 2 16.7797 2 13.2831C2 13.147 2 13.079 2.00915 13.0118L2.01215 12.9914C2.02269 12.9244 2.04225 12.8592 2.08136 12.7288L3.28963 8.70122C4.11355 5.95484 4.5255 4.58166 5.5884 3.79083C6.6513 3 8.08495 3 10.9522 3H13.0478C15.9151 3 17.3487 3 18.4116 3.79083C19.4745 4.58166 19.8865 5.95484 20.7104 8.70122Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M2 13H22`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M18.125 17H18M14.125 17H14M18.25 17C18.25 17.1381 18.1381 17.25 18 17.25C17.8619 17.25 17.75 17.1381 17.75 17C17.75 16.8619 17.8619 16.75 18 16.75C18.1381 16.75 18.25 16.8619 18.25 17ZM14.25 17C14.25 17.1381 14.1381 17.25 14 17.25C13.8619 17.25 13.75 17.1381 13.75 17C13.75 16.8619 13.8619 16.75 14 16.75C14.1381 16.75 14.25 16.8619 14.25 17Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],jo=[[`circle`,{cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M9.5 9.5C9.5 8.11929 10.6193 7 12 7C13.3807 7 14.5 8.11929 14.5 9.5C14.5 10.3569 14.0689 11.1131 13.4117 11.5636C12.7283 12.0319 12 12.6716 12 13.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M12.125 16.75H12M12.25 16.75C12.25 16.8881 12.1381 17 12 17C11.8619 17 11.75 16.8881 11.75 16.75C11.75 16.6119 11.8619 16.5 12 16.5C12.1381 16.5 12.25 16.6119 12.25 16.75Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Mo=[[`path`,{d:`M3 11.9896V14.5C3 17.7998 3 19.4497 4.02513 20.4749C5.05025 21.5 6.70017 21.5 10 21.5H14C17.2998 21.5 18.9497 21.5 19.9749 20.4749C21 19.4497 21 17.7998 21 14.5V11.9896C21 10.3083 21 9.46773 20.6441 8.74005C20.2882 8.01237 19.6247 7.49628 18.2976 6.46411L16.2976 4.90855C14.2331 3.30285 13.2009 2.5 12 2.5C10.7991 2.5 9.76689 3.30285 7.70242 4.90855L5.70241 6.46411C4.37533 7.49628 3.71179 8.01237 3.3559 8.74005C3 9.46773 3 10.3083 3 11.9896Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],No=[[`path`,{d:`M12.8924 2.80982L21.4876 9.59547C21.8112 9.85095 22 10.2405 22 10.6528C22 11.3969 21.3969 12 20.6528 12H20V15.5C20 18.3284 20 19.7426 19.1213 20.6213C18.2426 21.5 16.8284 21.5 14 21.5H10C7.17157 21.5 5.75736 21.5 4.87868 20.6213C4 19.7426 4 18.3284 4 15.5V12H3.34716C2.60315 12 2 11.3969 2 10.6528C2 10.2405 2.1888 9.85095 2.5124 9.59547L11.1076 2.80982C11.3617 2.60915 11.6761 2.5 12 2.5C12.3239 2.5 12.6383 2.60915 12.8924 2.80982Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M14.5 21.5V17C14.5 16.0654 14.5 15.5981 14.299 15.25C14.1674 15.022 13.978 14.8326 13.75 14.701C13.4019 14.5 12.9346 14.5 12 14.5C11.0654 14.5 10.5981 14.5 10.25 14.701C10.022 14.8326 9.83261 15.022 9.70096 15.25C9.5 15.5981 9.5 16.0654 9.5 17V21.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Po=[[`path`,{d:`M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M21.5 13.5H16.5743C15.7322 13.5 15.0706 14.2036 14.6995 14.9472C14.2963 15.7551 13.4889 16.5 12 16.5C10.5111 16.5 9.70373 15.7551 9.30054 14.9472C8.92942 14.2036 8.26777 13.5 7.42566 13.5H2.5`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Fo=[[`circle`,{cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12 16V12`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M12.125 8.25H12M12.25 8.25C12.25 8.11193 12.1381 8 12 8C11.8619 8 11.75 8.11193 11.75 8.25C11.75 8.38807 11.8619 8.5 12 8.5C12.1381 8.5 12.25 8.38807 12.25 8.25Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Io=[[`path`,{d:`M20.4999 16.5V8.5C20.4999 6.14298 20.4999 4.96447 19.7676 4.23223C19.0354 3.5 17.8569 3.5 15.4999 3.5H8.49988C6.14286 3.5 4.96434 3.5 4.23211 4.23223C3.49988 4.96447 3.49988 6.14298 3.49988 8.5V16.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M21.9841 20.5H2.01567C1.63273 20.5 1.38367 20.1088 1.55493 19.7764L3.49988 16.5H20.4999L22.4448 19.7764C22.6161 20.1088 22.367 20.5 21.9841 20.5Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Lo=[[`path`,{d:`M3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12 2.5V21.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}]],Ro=[[`path`,{d:`M9.14339 10.691L9.35031 10.4841C11.329 8.50532 14.5372 8.50532 16.5159 10.4841C18.4947 12.4628 18.4947 15.671 16.5159 17.6497L13.6497 20.5159C11.671 22.4947 8.46279 22.4947 6.48405 20.5159C4.50532 18.5372 4.50532 15.329 6.48405 13.3503L6.9484 12.886`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M17.0516 11.114L17.5159 10.6497C19.4947 8.67095 19.4947 5.46279 17.5159 3.48405C15.5372 1.50532 12.329 1.50532 10.3503 3.48405L7.48405 6.35031C5.50532 8.32904 5.50532 11.5372 7.48405 13.5159C9.46279 15.4947 12.671 15.4947 14.6497 13.5159L14.8566 13.309`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}]],G=[[`path`,{d:`M11.0991 3.00012C7.45013 3.00669 5.53932 3.09629 4.31817 4.31764C3.00034 5.63568 3.00034 7.75704 3.00034 11.9997C3.00034 16.2424 3.00034 18.3638 4.31817 19.6818C5.63599 20.9999 7.75701 20.9999 11.9991 20.9999C16.241 20.9999 18.3621 20.9999 19.6799 19.6818C20.901 18.4605 20.9906 16.5493 20.9972 12.8998`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M20.556 3.49612L11.0487 13.0586M20.556 3.49612C20.062 3.00151 16.7343 3.04761 16.0308 3.05762M20.556 3.49612C21.05 3.99074 21.0039 7.32273 20.9939 8.02714`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],zo=[[`path`,{d:`M3 5H17`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M3 12H11`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M15 12.0009H21M17.995 15.0059L17.995 9.00586`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M3 19H17`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}]],Bo=[[`path`,{d:`M12.9961 6L20.9961 6`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12.9961 12L20.9961 12`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M12.9961 18L20.9961 18`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M4.23073 19.3478C4.59827 19.5 5.06421 19.5 5.99609 19.5C6.92798 19.5 7.39392 19.5 7.76146 19.3478C8.25152 19.1448 8.64086 18.7554 8.84385 18.2654C8.99609 17.8978 8.99609 17.4319 8.99609 16.5C8.99609 15.5681 8.99609 15.1022 8.84385 14.7346C8.64086 14.2446 8.25152 13.8552 7.76146 13.6522C7.39392 13.5 6.92798 13.5 5.99609 13.5C5.06421 13.5 4.59827 13.5 4.23073 13.6522C3.74067 13.8552 3.35132 14.2446 3.14833 14.7346C2.99609 15.1022 2.99609 15.5681 2.99609 16.5C2.99609 17.4319 2.99609 17.8978 3.14833 18.2654C3.35132 18.7554 3.74067 19.1448 4.23073 19.3478Z`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M2.99609 7.16667C2.99609 7.16667 3.74609 7.16667 4.49609 8.5C4.49609 8.5 6.87845 5.16667 8.99609 4.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}]],Vo=[[`path`,{d:`M19.9264 22.2516V20.691C19.9264 20.288 20.0525 19.8966 20.2639 19.5531C21.7583 17.1245 22.2279 14.5196 21.9002 13.505C20.857 11.3418 17.3758 10.4907 15.76 10.2878L16.7966 5.12292C16.9705 4.30387 16.3513 3.47938 15.4135 3.28136C14.4758 3.08334 13.5746 3.58679 13.4007 4.40583L11.3462 14.0815L8.77462 12.4424C8.77462 12.4424 7.47969 11.406 6.44041 12.4424C5.40114 13.4788 6.44041 14.7701 6.44041 14.7701L10.3488 19.7776C10.6003 20.0997 10.7468 20.4908 10.7688 20.8984L10.8401 22.2177`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M7.32936 1.85194C7.32936 1.85194 9.54861 1.58797 9.867 1.90156C10.1124 2.14335 9.867 4.36134 9.867 4.36134M9.867 1.90156L6.89808 4.84002M4.6477 9.59694C4.6477 9.59694 2.42845 9.86092 2.11005 9.54732C1.86463 9.30553 2.11005 7.08754 2.11005 7.08754M2.11005 9.54732L5.07898 6.60886`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Ho=[[`path`,{d:`M4 5L20 5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M4 12L20 12`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M4 19L20 19`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Uo=[[`path`,{d:`M21.4961 12C21.4961 17.2467 17.2428 21.5 11.9961 21.5C10.368 21.5 8.83549 21.0904 7.49609 20.3687C5.62786 19.362 4.37071 20.2979 3.26202 20.4658C3.09383 20.4913 2.92634 20.4302 2.80606 20.31C2.6235 20.1274 2.58875 19.8451 2.6896 19.6074C3.12475 18.5818 3.5243 16.6382 2.9795 15C2.6659 14.057 2.49609 13.0483 2.49609 12C2.49609 6.75329 6.74939 2.5 11.9961 2.5C17.2428 2.5 21.4961 6.75329 21.4961 12Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M9.49609 9.5C9.49609 8.11929 10.6154 7 11.9961 7C13.3768 7 14.4961 8.11929 14.4961 9.5C14.4961 10.3569 14.0649 11.1131 13.4078 11.5636C12.7244 12.0319 11.9961 12.6716 11.9961 13.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M12.1211 16.75H11.9961M12.2461 16.75C12.2461 16.8881 12.1342 17 11.9961 17C11.858 17 11.7461 16.8881 11.7461 16.75C11.7461 16.6119 11.858 16.5 11.9961 16.5C12.1342 16.5 12.2461 16.6119 12.2461 16.75Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Wo=[[`path`,{d:`M13.5 15.5C13.5 14.5572 13.5 14.0858 13.7929 13.7929C14.0858 13.5 14.5572 13.5 15.5 13.5H20C20.9428 13.5 21.4142 13.5 21.7071 13.7929C22 14.0858 22 14.5572 22 15.5V20C22 20.9428 22 21.4142 21.7071 21.7071C21.4142 22 20.9428 22 20 22H15.5C14.5572 22 14.0858 22 13.7929 21.7071C13.5 21.4142 13.5 20.9428 13.5 20V15.5Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M2 4C2 3.05719 2 2.58579 2.29289 2.29289C2.58579 2 3.05719 2 4 2H8.5C9.44281 2 9.91421 2 10.2071 2.29289C10.5 2.58579 10.5 3.05719 10.5 4V8.5C10.5 9.44281 10.5 9.91421 10.2071 10.2071C9.91421 10.5 9.44281 10.5 8.5 10.5H4C3.05719 10.5 2.58579 10.5 2.29289 10.2071C2 9.91421 2 9.44281 2 8.5V4Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M2 15.5C2 14.5572 2 14.0858 2.29289 13.7929C2.58579 13.5 3.05719 13.5 4 13.5H8.5C9.44281 13.5 9.91421 13.5 10.2071 13.7929C10.5 14.0858 10.5 14.5572 10.5 15.5V20C10.5 20.9428 10.5 21.4142 10.2071 21.7071C9.91421 22 9.44281 22 8.5 22H4C3.05719 22 2.58579 22 2.29289 21.7071C2 21.4142 2 20.9428 2 20V15.5Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M13.5 4C13.5 3.05719 13.5 2.58579 13.7929 2.29289C14.0858 2 14.5572 2 15.5 2H20C20.9428 2 21.4142 2 21.7071 2.29289C22 2.58579 22 3.05719 22 4V8.5C22 9.44281 22 9.91421 21.7071 10.2071C21.4142 10.5 20.9428 10.5 20 10.5H15.5C14.5572 10.5 14.0858 10.5 13.7929 10.2071C13.5 9.91421 13.5 9.44281 13.5 8.5V4Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}]],Go=[[`path`,{d:`M7.87124 12.6711L10.0051 14.5001L12.6698 4.28528C12.8673 3.52824 13.5511 3 14.3334 3C15.4424 3 16.2613 4.03438 16.0068 5.11376L14.8058 10.208L16.493 10.4777C18.4216 10.767 19.386 10.9116 20.0652 11.3186C21.1872 11.9907 22 13.0001 22 14.4737C22 15.5001 21.7463 16.1887 21.1296 18.0388C20.7383 19.2128 20.5426 19.7998 20.2236 20.2644C19.6983 21.0294 18.9233 21.5879 18.0315 21.8444C17.4898 22.0001 16.8711 22.0001 15.6336 22.0001H14.5847C12.9395 22.0001 12.1169 22.0001 11.3846 21.6982C11.2533 21.6441 11.1249 21.583 11.0001 21.5152C10.304 21.1372 9.78533 20.4988 8.74791 19.222L5.38941 15.0884C4.87331 14.4533 4.86987 13.5442 5.38114 12.9051C5.99565 12.137 7.12437 12.0309 7.87124 12.6711Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M6.95596 2.49064C6.95596 2.49064 6.70432 4.76405 6.95596 5.01188M6.95596 5.01188C7.28241 5.33331 9.55781 5.06274 9.55781 5.06274M6.95596 5.01188L10 2M5.04404 9.50936C5.04404 9.50936 5.29568 7.23595 5.04404 6.98812M5.04404 6.98812C4.71759 6.66669 2.44219 6.93726 2.44219 6.93726M5.04404 6.98812L2 10`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Ko=[[`path`,{d:`M2.46186 20.4697C2.16896 20.7626 2.16896 21.2374 2.46186 21.5303C2.75475 21.8232 3.22962 21.8232 3.52252 21.5303L2.99219 21L2.46186 20.4697ZM10.0225 15.0303C10.3154 14.7374 10.3154 14.2626 10.0225 13.9697C9.72962 13.6768 9.25475 13.6768 8.96186 13.9697L9.49219 14.5L10.0225 15.0303ZM2.99219 21L3.52252 21.5303L10.0225 15.0303L9.49219 14.5L8.96186 13.9697L2.46186 20.4697L2.99219 21Z`,fill:`currentColor`,key:`0`}],[`path`,{d:`M21.5225 3.53033C21.8154 3.23744 21.8154 2.76256 21.5225 2.46967C21.2296 2.17678 20.7548 2.17678 20.4619 2.46967L20.9922 3L21.5225 3.53033ZM13.9619 8.96967C13.669 9.26256 13.669 9.73744 13.9619 10.0303C14.2548 10.3232 14.7296 10.3232 15.0225 10.0303L14.4922 9.5L13.9619 8.96967ZM20.9922 3L20.4619 2.46967L13.9619 8.96967L14.4922 9.5L15.0225 10.0303L21.5225 3.53033L20.9922 3Z`,fill:`currentColor`,key:`1`}],[`path`,{d:`M14.2688 5.00098C14.2688 5.00098 13.6464 9.10202 14.2688 9.72438C14.8911 10.3467 18.9922 9.72436 18.9922 9.72436`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M9.71561 19.001C9.71561 19.001 10.3379 14.8999 9.71558 14.2776C9.09323 13.6552 4.99219 14.2776 4.99219 14.2776`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}]],qo=[[`path`,{d:`M16 12H8`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`1.5`,key:`1`}]],Jo=[[`path`,{d:`M11.9967 12.5V12M11.9967 6.5V6M11.9967 18.5V18M12.9967 12.5C12.9967 11.9477 12.549 11.5 11.9967 11.5C11.4444 11.5 10.9967 11.9477 10.9967 12.5C10.9967 13.0523 11.4444 13.5 11.9967 13.5C12.549 13.5 12.9967 13.0523 12.9967 12.5ZM12.9967 6.5C12.9967 5.94772 12.549 5.5 11.9967 5.5C11.4444 5.5 10.9967 5.94772 10.9967 6.5C10.9967 7.05228 11.4444 7.5 11.9967 7.5C12.549 7.5 12.9967 7.05228 12.9967 6.5ZM12.9967 18.5C12.9967 17.9477 12.549 17.5 11.9967 17.5C11.4444 17.5 10.9967 17.9477 10.9967 18.5C10.9967 19.0523 11.4444 19.5 11.9967 19.5C12.549 19.5 12.9967 19.0523 12.9967 18.5Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],Yo=[[`path`,{d:`M21 11C21 7.22876 21 5.34315 19.8284 4.17157C18.6569 3 16.7712 3 13 3H11C7.22876 3 5.34315 3 4.17157 4.17157C3 5.34315 3 7.22876 3 11V13C3 16.7712 3 18.6569 4.17157 19.8284C5.34315 21 7.22876 21 11 21H13C16.7712 21 18.6569 21 19.8284 19.8284C21 18.6569 21 16.7712 21 13V11Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M9 3V21`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M16 9L14.8918 9.87868C13.6306 10.8787 13 11.3787 13 12C13 12.6213 13.6306 13.1213 14.8918 14.1213L16 15`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Xo=[[`path`,{d:`M18.1688 12L19.713 10.4558C21.4186 8.75022 21.4186 5.98485 19.713 4.27922C18.0073 2.57359 15.242 2.57359 13.5363 4.27922L4.27141 13.5442C2.56578 15.2498 2.56578 18.0152 4.27141 19.7208C5.97704 21.4264 8.7424 21.4264 10.448 19.7208L13.9224 16.2464C14.9884 15.1804 14.9884 13.4521 13.9224 12.386C12.8564 11.32 11.128 11.32 10.062 12.386L8.1318 14.3162`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],Zo=[[`path`,{d:`M16.4249 4.60509L17.4149 3.6151C18.2351 2.79497 19.5648 2.79497 20.3849 3.6151C21.205 4.43524 21.205 5.76493 20.3849 6.58507L19.3949 7.57506M16.4249 4.60509L9.76558 11.2644C9.25807 11.772 8.89804 12.4078 8.72397 13.1041L8 16L10.8959 15.276C11.5922 15.102 12.228 14.7419 12.7356 14.2344L19.3949 7.57506M16.4249 4.60509L19.3949 7.57506`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M18.9999 13.5C18.9999 16.7875 18.9999 18.4312 18.092 19.5376C17.9258 19.7401 17.7401 19.9258 17.5375 20.092C16.4312 21 14.7874 21 11.4999 21H11C7.22876 21 5.34316 21 4.17159 19.8284C3.00003 18.6569 3 16.7712 3 13V12.5C3 9.21252 3 7.56879 3.90794 6.46244C4.07417 6.2599 4.2599 6.07417 4.46244 5.90794C5.56879 5 7.21252 5 10.5 5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Qo=[[`path`,{d:`M7.5 8C6.95863 8.1281 6.49932 8.14239 5.99268 8.45891C5.07234 9.03388 4.85108 9.71674 5.08821 10.7612C5.94028 14.5139 9.48599 18.0596 13.2388 18.9117C14.2834 19.1489 14.9661 18.928 15.5416 18.0077C15.8411 17.5288 15.8716 17.0081 16 16.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12 7.79915C12.1776 7.77794 12.3182 7.74034 12.4295 7.68235C13.3997 7.17686 13.9291 5.53361 14.4498 4.60009C14.9311 3.73715 15.1718 3.30567 15.7379 3.10227C16.3041 2.89888 16.6448 3.02205 17.3262 3.26839C18.9197 3.8445 20.1555 5.08032 20.7316 6.6738C20.9779 7.35521 21.1011 7.69591 20.8977 8.26204C20.6943 8.82817 20.2628 9.06884 19.3999 9.55018C18.4608 10.074 16.7954 10.6108 16.2905 11.5898C16.2345 11.6983 16.1978 11.8327 16.1769 12`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M3 21L8 16`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M3 3L21 21`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}]],$o=[[`path`,{d:`M3 21L8 16`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M13.2585 18.8714C9.51516 18.0215 5.97844 14.4848 5.12853 10.7415C4.99399 10.1489 4.92672 9.85266 5.12161 9.37197C5.3165 8.89129 5.55457 8.74255 6.03071 8.44509C7.10705 7.77265 8.27254 7.55888 9.48209 7.66586C11.1793 7.81598 12.0279 7.89104 12.4512 7.67048C12.8746 7.44991 13.1622 6.93417 13.7376 5.90269L14.4664 4.59604C14.9465 3.73528 15.1866 3.3049 15.7513 3.10202C16.316 2.89913 16.6558 3.02199 17.3355 3.26771C18.9249 3.84236 20.1576 5.07505 20.7323 6.66449C20.978 7.34417 21.1009 7.68401 20.898 8.2487C20.6951 8.8134 20.2647 9.05346 19.4039 9.53358L18.0672 10.2792C17.0376 10.8534 16.5229 11.1406 16.3024 11.568C16.0819 11.9955 16.162 12.8256 16.3221 14.4859C16.4399 15.7068 16.2369 16.88 15.5555 17.9697C15.2577 18.4458 15.1088 18.6839 14.6283 18.8786C14.1477 19.0733 13.8513 19.006 13.2585 18.8714Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],es=[[`path`,{d:`M15.5 2V6M8.5 6V2`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M6.00446 7.61331C5.93719 6.74273 6.63957 6 7.53014 6H16.4699C17.3604 6 18.0628 6.74273 17.9955 7.61331L17.8117 9.99197C17.6796 11.7019 17.1011 13.3498 16.132 14.7773L15.5312 15.6622C14.9638 16.4979 14.0077 17 12.9838 17H11.0162C9.99228 17 9.03617 16.4979 8.46881 15.6622L7.86803 14.7773C6.89885 13.3498 6.32041 11.7019 6.18827 9.99197L6.00446 7.61331Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M12 17V22`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M11 9H13`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}]],ts=[[`path`,{d:`M11.9922 8.99988L9.49219 11.4999`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M14.9922 11.9999L12.4922 14.4999`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M4.99219 18.9999L2.99237 21.0002`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M7.19135 9.52039L14.4716 16.8006`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M7.71255 10.0399L6.15251 11.6C5.32501 12.4275 4.86013 13.5498 4.86013 14.72C4.86013 14.8523 4.80343 14.9876 4.70894 15.1227C4.03073 16.0921 3.71818 17.2257 4.55476 18.0623L5.93031 19.4378C6.76675 20.2743 7.90038 19.9622 8.86953 19.2839C9.00474 19.1893 9.14021 19.1325 9.2726 19.1325C10.4429 19.1325 11.5652 18.6676 12.3927 17.8401L13.9527 16.2801L7.71255 10.0399Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}],[`path`,{d:`M18.9922 2.99988L17.4072 4.84909C16.7965 5.56152 16.4912 5.91773 16.625 6.20881C16.7589 6.49988 17.2281 6.49988 18.1664 6.49988H18.5398C19.5813 6.49988 20.1021 6.49988 20.229 6.81109C20.3559 7.12229 19.9836 7.48644 19.2391 8.21474L17.4141 9.99988`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`5`}]],ns=[[`path`,{d:`M21 14C21 15.4001 21 16.1002 20.7275 16.635C20.4878 17.1054 20.1054 17.4878 19.635 17.7275C19.1002 18 18.4001 18 17 18H7C5.59987 18 4.8998 18 4.36502 17.7275C3.89462 17.4878 3.51217 17.1054 3.27248 16.635C3 16.1002 3 15.4001 3 14`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M6 14H18`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M6 10H18`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M6 6H18`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}]],rs=[[`path`,{d:`M20.4879 15C19.2524 18.4956 15.9187 21 12 21C7.02943 21 3 16.9706 3 12C3 7.02943 7.02943 3 12 3C15.7292 3 18.9286 5.26806 20.2941 8.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M15 9H18C19.4142 9 20.1213 9 20.5607 8.56066C21 8.12132 21 7.41421 21 6V3`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],is=[[`path`,{d:`M2.49219 15.5H21.4922`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M2.49219 8.5H21.4922`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M2.49219 12C2.49219 7.52166 2.49219 5.28249 3.88343 3.89124C5.27467 2.5 7.51384 2.5 11.9922 2.5C16.4705 2.5 18.7097 2.5 20.1009 3.89124C21.4922 5.28249 21.4922 7.52166 21.4922 12C21.4922 16.4783 21.4922 18.7175 20.1009 20.1088C18.7097 21.5 16.4705 21.5 11.9922 21.5C7.51384 21.5 5.27467 21.5 3.88343 20.1088C2.49219 18.7175 2.49219 16.4783 2.49219 12Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`2`}]],as=[[`path`,{d:`M21.0477 3.05293C18.8697 0.707363 2.48648 6.4532 2.50001 8.551C2.51535 10.9299 8.89809 11.6617 10.6672 12.1581C11.7311 12.4565 12.016 12.7625 12.2613 13.8781C13.3723 18.9305 13.9301 21.4435 15.2014 21.4996C17.2278 21.5892 23.1733 5.342 21.0477 3.05293Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M11.4999 12.5L14.9999 9`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],os=[[`path`,{d:`M19 4H5C4.06812 4 3.60218 4 3.23463 4.15224C2.74458 4.35523 2.35523 4.74458 2.15224 5.23463C2 5.60218 2 6.06812 2 7C2 7.93188 2 8.39782 2.15224 8.76537C2.35523 9.25542 2.74458 9.64477 3.23463 9.84776C3.60218 10 4.06812 10 5 10H19C19.9319 10 20.3978 10 20.7654 9.84776C21.2554 9.64477 21.6448 9.25542 21.8478 8.76537C22 8.39782 22 7.93188 22 7C22 6.06812 22 5.60218 21.8478 5.23463C21.6448 4.74458 21.2554 4.35523 20.7654 4.15224C20.3978 4 19.9319 4 19 4Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M19 14H5C4.06812 14 3.60218 14 3.23463 14.1522C2.74458 14.3552 2.35523 14.7446 2.15224 15.2346C2 15.6022 2 16.0681 2 17C2 17.9319 2 18.3978 2.15224 18.7654C2.35523 19.2554 2.74458 19.6448 3.23463 19.8478C3.60218 20 4.06812 20 5 20H19C19.9319 20 20.3978 20 20.7654 19.8478C21.2554 19.6448 21.6448 19.2554 21.8478 18.7654C22 18.3978 22 17.9319 22 17C22 16.0681 22 15.6022 21.8478 15.2346C21.6448 14.7446 21.2554 14.3552 20.7654 14.1522C20.3978 14 19.9319 14 19 14Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M6.125 7H6M6.25 7C6.25 7.13807 6.13807 7.25 6 7.25C5.86193 7.25 5.75 7.13807 5.75 7C5.75 6.86193 5.86193 6.75 6 6.75C6.13807 6.75 6.25 6.86193 6.25 7Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M10.125 7H10M10.25 7C10.25 7.13807 10.1381 7.25 10 7.25C9.86193 7.25 9.75 7.13807 9.75 7C9.75 6.86193 9.86193 6.75 10 6.75C10.1381 6.75 10.25 6.86193 10.25 7Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M6.125 17H6M6.25 17C6.25 17.1381 6.13807 17.25 6 17.25C5.86193 17.25 5.75 17.1381 5.75 17C5.75 16.8619 5.86193 16.75 6 16.75C6.13807 16.75 6.25 16.8619 6.25 17Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}],[`path`,{d:`M10.125 17H10M10.25 17C10.25 17.1381 10.1381 17.25 10 17.25C9.86193 17.25 9.75 17.1381 9.75 17C9.75 16.8619 9.86193 16.75 10 16.75C10.1381 16.75 10.25 16.8619 10.25 17Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`5`}]],ss=[[`path`,{d:`M3.95631 10.5829L3.03254 9.07084C2.74505 8.60024 2.7389 8.00978 3.01652 7.5333L3.63533 6.47124C3.90953 6.00064 4.41721 5.71571 4.96162 5.7269L6.69131 5.76245C6.92616 5.76728 7.15379 5.68727 7.34333 5.54846C7.79531 5.21745 8.28334 4.93276 8.80042 4.70139C9.01191 4.60675 9.19222 4.45165 9.30469 4.24903L10.1203 2.77965C10.3847 2.30328 10.8865 2.00781 11.4312 2.00781H12.6937C13.2384 2.00781 13.7403 2.30329 14.0047 2.77966L14.8202 4.24902C14.9327 4.45165 15.113 4.60675 15.3245 4.70139C15.8416 4.93274 16.3296 5.2174 16.7815 5.54838C16.9711 5.68718 17.1987 5.76718 17.4336 5.76235L19.1634 5.72676C19.7078 5.71557 20.2155 6.00049 20.4897 6.47111L21.1085 7.53314C21.3862 8.00963 21.38 8.60009 21.0925 9.07068L20.1687 10.5828C20.0481 10.7803 20.002 11.0134 20.0235 11.2439C20.0707 11.7486 20.0707 12.267 20.0235 12.7717C20.002 13.0022 20.0481 13.2353 20.1687 13.4329L21.0924 14.9448C21.3799 15.4154 21.3861 16.0058 21.1084 16.4823L20.4896 17.5444C20.2154 18.015 19.7077 18.2999 19.1633 18.2887L17.4338 18.2531C17.1989 18.2483 16.9713 18.3283 16.7817 18.4671C16.3297 18.7982 15.8416 19.0829 15.3245 19.3142C15.113 19.4089 14.9327 19.564 14.8202 19.7666L14.0047 21.236C13.7403 21.7123 13.2384 22.0078 12.6937 22.0078H11.4312C10.8866 22.0078 10.3847 21.7123 10.1203 21.236L9.30468 19.7665C9.19222 19.5639 9.01191 19.4088 8.80042 19.3142C8.28329 19.0828 7.79519 18.798 7.34316 18.467C7.15362 18.3282 6.92597 18.2482 6.69111 18.253L4.96175 18.2886C4.41733 18.2998 3.90963 18.0148 3.63543 17.5442L3.01663 16.4822C2.739 16.0057 2.74515 15.4152 3.03264 14.9446L3.95631 13.4327C4.07699 13.2351 4.12309 13.002 4.10154 12.7715C4.05437 12.267 4.05438 11.7486 4.10154 11.244C4.12308 11.0135 4.07699 10.7805 3.95631 10.5829Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`circle`,{cx:`12.0625`,cy:`12.0078`,r:`3.5`,stroke:`currentColor`,strokeWidth:`1.5`,key:`1`}]],cs=[[`path`,{d:`M11.9922 8L11.9922 12`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12.1172 15.75L11.9922 15.75M12.2422 15.75C12.2422 15.8881 12.1303 16 11.9922 16C11.8541 16 11.7422 15.8881 11.7422 15.75C11.7422 15.6119 11.8541 15.5 11.9922 15.5C12.1303 15.5 12.2422 15.6119 12.2422 15.75Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M20.9922 11.1835V8.28041C20.9922 6.64041 20.9922 5.82041 20.5881 5.28541C20.184 4.75042 19.2703 4.49068 17.4429 3.97122C16.1944 3.61632 15.0938 3.18875 14.2145 2.79841C13.0156 2.26622 12.4161 2.00012 11.9922 2.00012C11.5682 2.00012 10.9688 2.26622 9.7699 2.79841C8.89057 3.18875 7.79002 3.61632 6.54152 3.97122C4.71411 4.49068 3.80041 4.75042 3.3963 5.28541C2.99219 5.82041 2.99219 6.64041 2.99219 8.28041V11.1835C2.99219 16.8086 8.05496 20.1836 10.5861 21.5195C11.1932 21.8399 11.4968 22.0001 11.9922 22.0001C12.4876 22.0001 12.7911 21.8399 13.3982 21.5195C15.9294 20.1836 20.9922 16.8086 20.9922 11.1835Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`2`}]],ls=[[`path`,{d:`M20.9922 11.1833V8.28029C20.9922 6.64029 20.9922 5.82028 20.5881 5.28529C20.184 4.75029 19.2703 4.49056 17.4429 3.9711C16.1944 3.6162 15.0938 3.18863 14.2145 2.79829C13.0156 2.2661 12.4161 2 11.9922 2C11.5682 2 10.9688 2.2661 9.7699 2.79829C8.89057 3.18863 7.79002 3.61619 6.54152 3.9711C4.71411 4.49056 3.80041 4.75029 3.3963 5.28529C2.99219 5.82028 2.99219 6.64029 2.99219 8.28029V11.1833C2.99219 16.8085 8.05496 20.1835 10.5861 21.5194C11.1932 21.8398 11.4968 22 11.9922 22C12.4876 22 12.7911 21.8398 13.3982 21.5194C15.9294 20.1835 20.9922 16.8085 20.9922 11.1833Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M8.49219 11.8333C8.49219 11.8333 9.36719 11.8333 10.2422 13.5C10.2422 13.5 13.0216 9.33333 15.4922 8.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],us=[[`path`,{d:`M20.5455 14C20.8286 13.133 20.9922 12.1945 20.9922 11.1833V8.28029C20.9922 6.64029 20.9922 5.82028 20.5881 5.28529C20.184 4.75029 19.2703 4.49056 17.4429 3.9711C16.1944 3.6162 15.0938 3.18863 14.2145 2.79829C13.0156 2.2661 12.4161 2 11.9922 2C11.5682 2 10.9688 2.2661 9.7699 2.79829C9.52703 2.9061 9.26727 3.01676 8.99219 3.12793`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M17.9922 18.1221C16.4419 19.7483 14.6235 20.8728 13.3982 21.5194C12.7911 21.8398 12.4876 22 11.9922 22C11.4968 22 11.1932 21.8398 10.5861 21.5194C8.05496 20.1836 2.99219 16.8085 2.99219 11.1834V8.28033C2.99219 6.64032 2.99219 5.82032 3.3963 5.28533C3.60583 5.00794 3.95235 4.80455 4.49219 4.60059`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M1.99219 2L21.9922 22`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`2`}]],ds=[[`path`,{d:`M9.5 9C9.5 7.61929 10.6193 6.5 12 6.5C13.3807 6.5 14.5 7.61929 14.5 9C14.5 9.85691 14.0689 10.6131 13.4117 11.0636C12.7283 11.5319 12 12.1716 12 13`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12.125 16.25H12M12.25 16.25C12.25 16.3881 12.1381 16.5 12 16.5C11.8619 16.5 11.75 16.3881 11.75 16.25C11.75 16.1119 11.8619 16 12 16C12.1381 16 12.25 16.1119 12.25 16.25Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M18.7088 3.49534C16.8165 2.55382 14.5009 2 12 2C9.4991 2 7.1835 2.55382 5.29116 3.49534C4.36318 3.95706 3.89919 4.18792 3.4496 4.91378C3 5.63965 3 6.34248 3 7.74814V11.2371C3 16.9205 7.54236 20.0804 10.173 21.4338C10.9067 21.8113 11.2735 22 12 22C12.7265 22 13.0933 21.8113 13.8269 21.4338C16.4576 20.0804 21 16.9205 21 11.2371L21 7.74814C21 6.34249 21 5.63966 20.5504 4.91378C20.1008 4.18791 19.6368 3.95706 18.7088 3.49534Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],fs=[[`path`,{d:`M7.99219 16L8.71615 13.1041C8.89023 12.4078 9.25026 11.772 9.75776 11.2644L16.4171 4.60509L17.4071 3.6151C18.2272 2.79497 19.557 2.79497 20.3771 3.6151C21.1972 4.43524 21.1972 5.76493 20.3771 6.58507L19.3871 7.57506L12.7277 14.2344C12.2202 14.7419 11.5843 15.102 10.888 15.276L7.99219 16Z`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M18.9921 13.5C18.9921 16.7875 18.9921 18.4312 18.0842 19.5376C17.918 19.7401 17.7322 19.9258 17.5297 20.092C16.4234 21 14.7796 21 11.4921 21H10.9922C7.22095 21 5.33535 21 4.16378 19.8284C2.99222 18.6569 2.99219 16.7712 2.99219 13V12.5C2.99219 9.21252 2.99219 7.56879 3.90013 6.46244C4.06636 6.2599 4.25208 6.07417 4.45463 5.90794C5.56098 5 7.20471 5 10.4922 5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],ps=[[`path`,{d:`M7.99219 16L15.9922 8`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M2.49219 12C2.49219 7.52166 2.49219 5.28249 3.88343 3.89124C5.27467 2.5 7.51384 2.5 11.9922 2.5C16.4705 2.5 18.7097 2.5 20.1009 3.89124C21.4922 5.28249 21.4922 7.52166 21.4922 12C21.4922 16.4783 21.4922 18.7175 20.1009 20.1088C18.7097 21.5 16.4705 21.5 11.9922 21.5C7.51384 21.5 5.27467 21.5 3.88343 20.1088C2.49219 18.7175 2.49219 16.4783 2.49219 12Z`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],ms=[[`path`,{d:`M7.49219 7.5L8.71873 8.55719C9.23437 9.00163 9.49219 9.22386 9.49219 9.5C9.49219 9.77614 9.23437 9.99836 8.71873 10.4428L7.49219 11.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M11.4922 12.5H15.4922`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M11.9922 21C15.7419 21 17.6168 21 18.9311 20.0451C19.3556 19.7367 19.7289 19.3634 20.0373 18.9389C20.9922 17.6246 20.9922 15.7497 20.9922 12C20.9922 8.25027 20.9922 6.3754 20.0373 5.06107C19.7289 4.6366 19.3556 4.26331 18.9311 3.95491C17.6168 3 15.7419 3 11.9922 3C8.24246 3 6.36759 3 5.05326 3.95491C4.62879 4.26331 4.2555 4.6366 3.9471 5.06107C2.99219 6.3754 2.99219 8.25027 2.99219 12C2.99219 15.7497 2.99219 17.6246 3.9471 18.9389C4.2555 19.3634 4.62879 19.7367 5.05326 20.0451C6.36759 21 8.24246 21 11.9922 21Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],hs=[[`path`,{d:`M14.4961 2.00027H9.49609C8.66767 2.00027 7.99609 2.67184 7.99609 3.50027C7.99609 4.32869 8.66767 5.00027 9.49609 5.00027H14.4961C15.3245 5.00027 15.9961 4.32869 15.9961 3.50027C15.9961 2.67184 15.3245 2.00027 14.4961 2.00027Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M15.9961 3.50027C17.5496 3.54708 18.4761 3.72034 19.1174 4.36163C19.9961 5.24031 19.9961 6.6545 19.9961 9.4829L19.9961 15.9997C19.9961 18.8282 19.9961 20.2424 19.1174 21.1211C18.2387 21.9997 16.8245 21.9997 13.9961 21.9997L9.99609 21.9997C7.16767 21.9997 5.75346 21.9997 4.87478 21.1211C3.9961 20.2424 3.9961 18.8282 3.99609 15.9998L3.99611 9.48295C3.9961 6.65452 3.9961 5.2403 4.87478 4.36162C5.51606 3.72033 6.44261 3.54708 7.99599 3.50027`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M7.49609 11.0003L8.49609 12.0003L10.4961 9.50027`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M13.5 17.0003H16.5M13.5 11.0003H16.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M8.625 17.0003H8.5M8.75 17.0003C8.75 17.1383 8.63807 17.2503 8.5 17.2503C8.36193 17.2503 8.25 17.1383 8.25 17.0003C8.25 16.8622 8.36193 16.7503 8.5 16.7503C8.63807 16.7503 8.75 16.8622 8.75 17.0003Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}]],gs=[[`path`,{d:`M18 14C18 14 13.5811 19 12 19C10.4188 19 6 14 6 14`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M18 9.99996C18 9.99996 13.5811 5.00001 12 5C10.4188 4.99999 6 10 6 10`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],_s=[[`path`,{d:`M5.25 21H18.75C18.9822 21 19.0983 21 19.196 20.9904C20.1456 20.8968 20.8968 20.1456 20.9904 19.196C21 19.0983 21 18.9822 21 18.75C21 18.5178 21 18.4017 20.9904 18.304C20.8968 17.3544 20.1456 16.6032 19.196 16.5096C19.0983 16.5 18.9822 16.5 18.75 16.5H17.0607C16.8324 16.5 16.7182 16.5 16.6087 16.5121C16.2317 16.5538 15.8742 16.7018 15.5781 16.939C15.4921 17.0079 15.4114 17.0886 15.25 17.25C15.0886 17.4114 15.0079 17.4921 14.9219 17.561C14.6258 17.7982 14.2683 17.9462 13.8913 17.9879C13.7818 18 13.6676 18 13.4393 18H10.5607C10.3324 18 10.2182 18 10.1087 17.9879C9.73165 17.9462 9.37423 17.7982 9.07814 17.561C8.99213 17.4921 8.91142 17.4114 8.75 17.25C8.58858 17.0886 8.50787 17.0079 8.42186 16.939C8.12577 16.7018 7.76835 16.5538 7.3913 16.5121C7.28177 16.5 7.16763 16.5 6.93934 16.5H5.25C5.01783 16.5 4.90175 16.5 4.80397 16.5096C3.85441 16.6032 3.10315 17.3544 3.00963 18.304C3 18.4017 3 18.5178 3 18.75C3 18.9822 3 19.0983 3.00963 19.196C3.10315 20.1456 3.85441 20.8968 4.80397 20.9904C4.90175 21 5.01783 21 5.25 21Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M16.5 7.49996C16.5 7.49996 13.1858 3.00001 12 3C10.8141 2.99999 7.5 7.5 7.5 7.5M12 4V15`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],vs=[[`path`,{d:`M11 13.5C10.6446 13.5097 10.3134 13.5226 10.0008 13.5379C6.3 13.7193 3.28417 16.8058 3 20.5002`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M19.6709 16.2593C19.8803 16.6249 20 17.0485 20 17.5C20 17.9514 19.8804 18.3749 19.671 18.7404C19.2402 19.493 18.4293 20 17.5 20M15.3291 16.2593C15.1197 16.6249 15 17.0485 15 17.5C15 17.9514 15.1196 18.3749 15.329 18.7404C15.7598 19.493 16.5707 20 17.5 20M17.5 20L17.5 21.5M17.5 15C18.4292 15 19.24 15.5069 19.6709 16.2593M17.5 15C16.5708 15 15.76 15.5069 15.3291 16.2593M17.5 15L17.5 13.5M21 15.4998L19.6709 16.2593M14 19.4998L15.329 18.7404M21 19.4998L19.671 18.7404M14 15.4998L15.3291 16.2593`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`circle`,{cx:`11`,cy:`6.5`,r:`4`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],ys=[[`path`,{d:`M17.0158 16.5V21.282C17.0158 21.6025 16.8064 21.874 16.5174 21.9663M17.0158 16.5L10.8772 12M17.0158 16.5V7.5M7.74691 9.7053L4.25118 7.03035C3.85429 6.72665 3.29466 6.76425 2.94169 7.11833L2.2921 7.76997C1.89399 8.16933 1.90433 8.81995 2.31494 9.20638L5.28343 12M7.74691 9.7053L10.8772 12M7.74691 9.7053L15.8129 2.19186C15.9453 2.06854 16.1193 2 16.3 2C16.3758 2 16.4488 2.01181 16.5174 2.0337M10.8772 12L17.0158 7.5M17.0158 7.5V2.71803C17.0158 2.39749 16.8064 2.126 16.5174 2.0337M7.74691 14.2947L4.25118 16.9696C3.85429 17.2733 3.29466 17.2357 2.94169 16.8817L2.2921 16.23C1.89399 15.8307 1.90433 15.18 2.31494 14.7936L5.28343 12M7.74691 14.2947L15.8129 21.8081C15.9453 21.9315 16.1193 22 16.3 22C16.3758 22 16.4488 21.9882 16.5174 21.9663M7.74691 14.2947L5.28343 12M16.5174 2.0337L21.4111 4.23506C21.7695 4.39626 22.0001 4.75353 22.0001 5.14752V18.8525C22.0001 19.2465 21.7695 19.6037 21.4111 19.7649L16.5174 21.9663`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],bs=[`shift`,`alt`,`meta`,`mod`,`ctrl`,`control`];function xs(){return typeof navigator>`u`?!1:/mac/i.test(navigator.userAgent)&&!/iphone|ipad|ipod/i.test(navigator.userAgent)}var Ss={esc:`escape`,return:`enter`,left:`arrowleft`,right:`arrowright`,up:`arrowup`,down:`arrowdown`,ShiftLeft:`shift`,ShiftRight:`shift`,AltLeft:`alt`,AltRight:`alt`,MetaLeft:`meta`,MetaRight:`meta`,OSLeft:`meta`,OSRight:`meta`,ControlLeft:`ctrl`,ControlRight:`ctrl`};function Cs(e){return(Ss[e.trim()]||e.trim()).toLowerCase().replace(/key|digit|numpad/,``)}function ws(e){return bs.includes(e)}function Ts(e,t=`,`){return e.toLowerCase().split(t)}function Es(e,t=`+`,n=`>`,r=!1,i,a){let o=[],s=!1;e=e.trim(),e.includes(n)?(s=!0,o=e.toLocaleLowerCase().split(n).map(e=>Cs(e))):o=e.toLocaleLowerCase().split(t).map(e=>Cs(e));let c={alt:o.includes(`alt`),ctrl:o.includes(`ctrl`)||o.includes(`control`),shift:o.includes(`shift`),meta:o.includes(`meta`),mod:o.includes(`mod`),useKey:r},l=o.filter(e=>!bs.includes(e));return{...c,keys:l,description:i,isSequence:s,hotkey:e,metadata:a}}typeof document<`u`&&(document.addEventListener(`keydown`,e=>{e.code!==void 0&&As([Cs(e.code)])}),document.addEventListener(`keyup`,e=>{e.code!==void 0&&js([Cs(e.code)])})),typeof window<`u`&&(window.addEventListener(`blur`,()=>{Ds.clear()}),window.addEventListener(`focus`,()=>{Ds.clear()}),window.addEventListener(`contextmenu`,()=>{setTimeout(()=>{Ds.clear()},0)})),typeof document<`u`&&document.addEventListener(`visibilitychange`,()=>{Ds.clear()});var Ds=new Set;function Os(e){return Array.isArray(e)}function ks(e,t=`,`){return(Os(e)?e:e.split(t)).every(e=>Ds.has(e.trim().toLowerCase()))}function As(e){let t=Array.isArray(e)?e:[e];Ds.has(`meta`)&&Ds.forEach(e=>{ws(e)||Ds.delete(e.toLowerCase())}),t.forEach(e=>{Ds.add(e.toLowerCase())})}function js(e){e===`meta`?Ds.clear():(Array.isArray(e)?e:[e]).forEach(e=>{Ds.delete(e.toLowerCase())})}function Ms(e,t,n){(typeof n==`function`&&n(e,t)||n===!0)&&e.preventDefault()}function Ns(e,t,n){return typeof n==`function`?n(e,t):n===!0||n===void 0}var Ps=[`input`,`textarea`,`select`,`searchbox`,`slider`,`spinbutton`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`textbox`];function Fs(e){return Is(e,Ps)}function Is(e,t=!1){let{target:n,composed:r}=e,i,a;return Ls(n)&&r?(i=e.composedPath()[0]&&e.composedPath()[0].tagName,a=e.composedPath()[0]&&e.composedPath()[0].role):(i=n&&n.tagName,a=n&&n.role),Os(t)?!!(i&&t?.some(e=>e.toLowerCase()===i.toLowerCase()||e===a)):!!(i&&t&&t)}function Ls(e){return!!e.tagName&&!e.tagName.startsWith(`-`)&&e.tagName.includes(`-`)}function Rs(e,t){return e.length===0&&t?!1:!t||e.some(e=>t.includes(e))||e.includes(`*`)}var zs=(e,t,n=!1)=>{let{alt:r,meta:i,mod:a,shift:o,ctrl:s,keys:c,useKey:l}=t,{code:u,key:d,ctrlKey:f,metaKey:p,shiftKey:m,altKey:h}=e,g=Cs(u),_=typeof e.getModifierState==`function`&&e.getModifierState(`AltGraph`);if(!l&&!c?.includes(g)&&![`ctrl`,`control`,`unknown`,`meta`,`alt`,`shift`,`os`].includes(g))return!1;if(!n){if(r!==h&&g!==`alt`||o!==m&&g!==`shift`)return!1;if(a){if(xs()?!p:!f)return!1}else if(i!==p&&g!==`meta`&&g!==`os`||s!==f&&g!==`ctrl`&&g!==`control`)return!1;if(_&&!r&&!s&&!a&&![`alt`,`ctrl`,`control`].includes(g))return!1}return l&&c?.length===1&&c.includes(d.toLowerCase())||c&&c.length===1&&c.includes(g)?!0:c&&c.length>0?c.includes(g)?ks(c):!1:!c||c.length===0},Bs=(0,H.createContext)(void 0),Vs=()=>(0,H.useContext)(Bs);function Hs(e,t){return e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).reduce((n,r)=>n&&Hs(e[r],t[r]),!0):e===t}var Us=(0,H.createContext)({hotkeys:[],activeScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),Ws=()=>(0,H.useContext)(Us);function Gs(e){let t=(0,H.useRef)(void 0);return Hs(t.current,e)||(t.current=e),t.current}var Ks=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()},qs=typeof window<`u`?H.useLayoutEffect:H.useEffect;function Js(e){if(!e)return;let{enabled:t,preventDefault:n,ignoreEventWhen:r,...i}=e;return typeof t==`function`?i:{...i,enabled:t}}function Ys(e,t,n,r){let[i,a]=(0,H.useState)(null),o=(0,H.useCallback)(e=>(a(e),()=>a(null)),[]),s=(0,H.useRef)(!1),c=Array.isArray(n)?Array.isArray(r)?void 0:r:n,l=Os(e)?e.join(c?.delimiter):e,u=Array.isArray(n)?n:Array.isArray(r)?r:void 0,d=(0,H.useCallback)(t,u??[]),f=(0,H.useRef)(d);f.current=u?d:t;let p=Gs(Js(c)),m=(0,H.useRef)(c?.enabled);m.current=c?.enabled;let h=(0,H.useRef)(c?.preventDefault);h.current=c?.preventDefault;let g=(0,H.useRef)(c?.ignoreEventWhen);g.current=c?.ignoreEventWhen;let{activeScopes:_}=Ws(),v=Vs();return qs(()=>{if(m.current===!1||!Rs(_,p?.scopes))return;let e=[],t,n=(n,r=!1)=>{if(!Fs(n)||Is(n,p?.enableOnFormTags)){if(i!==null){let e=i.getRootNode();if((e instanceof Document||e instanceof ShadowRoot)&&e.activeElement!==i&&!i.contains(e.activeElement)){Ks(n);return}}n.target?.isContentEditable&&!p?.enableOnContentEditable||Ts(l,p?.delimiter).forEach(i=>{if(i.includes(p?.splitKey??`+`)&&i.includes(p?.sequenceSplitKey??`>`)){console.warn(`Hotkey ${i} contains both ${p?.splitKey??`+`} and ${p?.sequenceSplitKey??`>`} which is not supported.`);return}let a=Es(i,p?.splitKey,p?.sequenceSplitKey,p?.useKey,p?.description,p?.metadata);if(a.isSequence){t=setTimeout(()=>{e=[]},p?.sequenceTimeoutMs??1e3);let r=a.useKey?n.key:Cs(n.code);if(ws(r.toLowerCase()))return;if(e.push(r),r!==a.keys?.[e.length-1]){e=[],t&&clearTimeout(t);return}e.length===a.keys?.length&&(f.current(n,a),t&&clearTimeout(t),e=[])}else if(zs(n,a,p?.ignoreModifiers)||a.keys?.includes(`*`)){if(g.current?.(n)||r&&s.current||(Ms(n,a,h.current),!Ns(n,a,m.current)))return;f.current(n,a),r||(s.current=!0)}})}},r=e=>{e.code!==void 0&&(As(Cs(e.code)),(p?.keydown===void 0&&p?.keyup!==!0||p?.keydown)&&n(e))},a=e=>{e.code!==void 0&&(js(Cs(e.code)),s.current=!1,p?.keyup&&n(e,!0))},o=i||c?.document||document;return o.addEventListener(`keyup`,a,c?.eventListenerOptions),o.addEventListener(`keydown`,r,c?.eventListenerOptions),v&&Ts(l,p?.delimiter).forEach(e=>{v.addHotkey(Es(e,p?.splitKey,p?.sequenceSplitKey,p?.useKey,p?.description,p?.metadata))}),()=>{o.removeEventListener(`keyup`,a,c?.eventListenerOptions),o.removeEventListener(`keydown`,r,c?.eventListenerOptions),v&&Ts(l,p?.delimiter).forEach(e=>{v.removeHotkey(Es(e,p?.splitKey,p?.sequenceSplitKey,p?.useKey,p?.description,p?.metadata))}),e=[],t&&clearTimeout(t)}},[i,p,_,l]),o}var Xs=e(t(((e,t)=>{var n=NaN,r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt,c=typeof global==`object`&&global&&global.Object===Object&&global,l=typeof self==`object`&&self&&self.Object===Object&&self,u=c||l||Function(`return this`)(),d=Object.prototype.toString,f=Math.max,p=Math.min,m=function(){return u.Date.now()};function h(e,t,n){var r,i,a,o,s,c,l=0,u=!1,d=!1,h=!0;if(typeof e!=`function`)throw TypeError(`Expected a function`);t=y(t)||0,g(n)&&(u=!!n.leading,d=`maxWait`in n,a=d?f(y(n.maxWait)||0,t):a,h=`trailing`in n?!!n.trailing:h);function _(t){var n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n),o}function v(e){return l=e,s=setTimeout(S,t),u?_(e):o}function b(e){var n=e-c,r=e-l,i=t-n;return d?p(i,a-r):i}function x(e){var n=e-c,r=e-l;return c===void 0||n>=t||n<0||d&&r>=a}function S(){var e=m();if(x(e))return C(e);s=setTimeout(S,b(e))}function C(e){return s=void 0,h&&r?_(e):(r=i=void 0,o)}function w(){s!==void 0&&clearTimeout(s),l=0,r=c=i=s=void 0}function T(){return s===void 0?o:C(m())}function E(){var e=m(),n=x(e);if(r=arguments,i=this,c=e,n){if(s===void 0)return v(c);if(d)return s=setTimeout(S,t),_(c)}return s===void 0&&(s=setTimeout(S,t)),o}return E.cancel=w,E.flush=T,E}function g(e){var t=typeof e;return!!e&&(t==`object`||t==`function`)}function _(e){return!!e&&typeof e==`object`}function v(e){return typeof e==`symbol`||_(e)&&d.call(e)==`[object Symbol]`}function y(e){if(typeof e==`number`)return e;if(v(e))return n;if(g(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=g(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=e.replace(r,``);var c=a.test(e);return c||o.test(e)?s(e.slice(2),c?2:8):i.test(e)?n:+e}t.exports=h}))(),1),Zs=typeof window<`u`?H.useLayoutEffect:H.useEffect;function Qs(e,t,n,r){let i=(0,H.useRef)(t);Zs(()=>{i.current=t},[t]),(0,H.useEffect)(()=>{let t=n?.current??window;if(!(t&&t.addEventListener))return;let a=e=>{i.current(e)};return t.addEventListener(e,a,r),()=>{t.removeEventListener(e,a,r)}},[e,n,r])}function $s(e){let t=(0,H.useRef)(()=>{throw Error(`Cannot call an event handler while rendering.`)});return Zs(()=>{t.current=e},[e]),(0,H.useCallback)((...e)=>t.current?.call(t,...e),[t])}var ec=typeof window>`u`;function tc(e,t,n={}){let{initializeWithValue:r=!0}=n,i=(0,H.useCallback)(e=>n.serializer?n.serializer(e):JSON.stringify(e),[n]),a=(0,H.useCallback)(e=>{if(n.deserializer)return n.deserializer(e);if(e===`undefined`)return;let r=t instanceof Function?t():t,i;try{i=JSON.parse(e)}catch(e){return console.error(`Error parsing JSON:`,e),r}return i},[n,t]),o=(0,H.useCallback)(()=>{let n=t instanceof Function?t():t;if(ec)return n;try{let t=window.localStorage.getItem(e);return t?a(t):n}catch(t){return console.warn(`Error reading localStorage key \u201C${e}\u201D:`,t),n}},[t,e,a]),[s,c]=(0,H.useState)(()=>r?o():t instanceof Function?t():t),l=$s(t=>{ec&&console.warn(`Tried setting localStorage key \u201C${e}\u201D even though environment is not a client`);try{let n=t instanceof Function?t(o()):t;window.localStorage.setItem(e,i(n)),c(n),window.dispatchEvent(new StorageEvent(`local-storage`,{key:e}))}catch(t){console.warn(`Error setting localStorage key \u201C${e}\u201D:`,t)}}),u=$s(()=>{ec&&console.warn(`Tried removing localStorage key \u201C${e}\u201D even though environment is not a client`);let n=t instanceof Function?t():t;window.localStorage.removeItem(e),c(n),window.dispatchEvent(new StorageEvent(`local-storage`,{key:e}))});(0,H.useEffect)(()=>{c(o())},[e]);let d=(0,H.useCallback)(t=>{t.key&&t.key!==e||c(o())},[e,o]);return Qs(`storage`,d),Qs(`local-storage`,d),[s,l,u]}function nc(e){let t=(0,H.useRef)(e);t.current=e,(0,H.useEffect)(()=>()=>{t.current()},[])}function rc(e,t=500,n){let r=(0,H.useRef)();nc(()=>{r.current&&r.current.cancel()});let i=(0,H.useMemo)(()=>{let i=(0,Xs.default)(e,t,n),a=(...e)=>i(...e);return a.cancel=()=>{i.cancel()},a.isPending=()=>!!r.current,a.flush=()=>i.flush(),a},[e,t,n]);return(0,H.useEffect)(()=>{r.current=(0,Xs.default)(e,t,n)},[e,t,n]),i}function ic(e,t,n){let r=n?.equalityFn??((e,t)=>e===t),i=e instanceof Function?e():e,[a,o]=(0,H.useState)(i),s=(0,H.useRef)(i),c=rc(o,t,n);return r(s.current,i)||(c(i),s.current=i),[a,c]}function ac(e,t){return L(n=>k(n,e,t)?.name??``)}async function oc(e,t){return await R(e,`projects.add`,{path:t})}async function sc(e,t,n){await R(e,`projects.update`,{id:t,patch:n})}async function cc(e,t){await R(e,`projects.remove`,{id:t})}async function lc(e,t){await R(e,`projects.reorder`,{ids:t})}var uc=[`text-gray-600 dark:text-gray-400`,`text-red-600 dark:text-red-400`,`text-orange-600 dark:text-orange-400`,`text-amber-600 dark:text-amber-400`,`text-yellow-600 dark:text-yellow-400`,`text-lime-600 dark:text-lime-400`,`text-green-600 dark:text-green-400`,`text-emerald-600 dark:text-emerald-400`,`text-teal-600 dark:text-teal-400`,`text-cyan-600 dark:text-cyan-400`,`text-sky-600 dark:text-sky-400`,`text-blue-600 dark:text-blue-400`,`text-indigo-600 dark:text-indigo-400`,`text-violet-600 dark:text-violet-400`,`text-purple-600 dark:text-purple-400`,`text-fuchsia-600 dark:text-fuchsia-400`,`text-pink-600 dark:text-pink-400`,`text-rose-600 dark:text-rose-400`];function dc(e){let t=L(t=>k(t,e.machine,e.projectId));return(0,U.jsx)(fc,{name:t?.name??``,logo:t?.logo??null,className:e.className})}function fc(e){let t=e.name.normalize(`NFKC`).trim(),n=t.match(/[\p{L}\p{N}]+/gu)??[],r=Array.from(n[0]??`P`),i=r.slice(1).find(e=>/\p{N}/u.test(e))??(n.length>1?Array.from(n.at(-1)??``)[0]:r.at(-1))??r[0],a=Array.from(`${r[0]}${i}`.toUpperCase()).slice(0,2).join(``),o=0;for(let e of t.toLowerCase())o=(o*31+(e.codePointAt(0)??0))%uc.length;return(0,U.jsx)(`span`,{"aria-hidden":`true`,className:z(`inline-flex size-4 shrink-0 items-center justify-center`,e.className),children:e.logo===null?(0,U.jsx)(`svg`,{viewBox:`0 0 16 16`,className:z(`size-full overflow-hidden rounded-[25%] font-mono select-none`,uc[o]),style:{backgroundColor:`color-mix(in srgb, currentColor 14%, transparent)`},children:(0,U.jsx)(`text`,{x:`8`,y:`10.8`,textAnchor:`middle`,fill:`currentColor`,fontSize:`8.25`,fontWeight:`700`,textLength:a.length===1?6:12,lengthAdjust:`spacingAndGlyphs`,children:a})}):(0,U.jsx)(`img`,{src:e.logo,alt:``,className:`size-full rounded-[25%] object-cover`})})}function pc(e){switch(e.provider){case`claude`:return(0,U.jsx)(hc,{className:e.className});case`codex`:return(0,U.jsx)(V,{icon:so,className:e.className});case`opencode`:return(0,U.jsx)(mc,{className:e.className})}}function mc(e){return(0,U.jsxs)(`svg`,{viewBox:`0 0 240 300`,"aria-hidden":`true`,className:z(`fill-current`,e.className),children:[(0,U.jsx)(`path`,{d:`M180 240H60V120H180V240Z`,opacity:`0.4`}),(0,U.jsx)(`path`,{d:`M180 60H60V240H180V60ZM240 300H0V0H240V300Z`})]})}function hc(e){return(0,U.jsx)(`svg`,{viewBox:`0 0 256 257`,preserveAspectRatio:`xMidYMid`,"aria-hidden":`true`,className:z(`fill-[#d97757]`,e.className),children:(0,U.jsx)(`path`,{d:`m50.228 170.321 50.357-28.257.843-2.463-.843-1.361h-2.462l-8.426-.518-28.775-.778-24.952-1.037-24.175-1.296-6.092-1.297L0 125.796l.583-3.759 5.12-3.434 7.324.648 16.202 1.101 24.304 1.685 17.629 1.037 26.118 2.722h4.148l.583-1.685-1.426-1.037-1.101-1.037-25.147-17.045-27.22-18.017-14.258-10.37-7.713-5.25-3.888-4.925-1.685-10.758 7-7.713 9.397.649 2.398.648 9.527 7.323 20.35 15.75L94.817 91.9l3.889 3.24 1.555-1.102.195-.777-1.75-2.917-14.453-26.118-15.425-26.572-6.87-11.018-1.814-6.61c-.648-2.723-1.102-4.991-1.102-7.778l7.972-10.823L71.42 0 82.05 1.426l4.472 3.888 6.61 15.101 10.694 23.786 16.591 32.34 4.861 9.592 2.592 8.879.973 2.722h1.685v-1.556l1.36-18.211 2.528-22.36 2.463-28.776.843-8.1 4.018-9.722 7.971-5.25 6.222 2.981 5.12 7.324-.713 4.73-3.046 19.768-5.962 30.98-3.889 20.739h2.268l2.593-2.593 10.499-13.934 17.628-22.036 7.778-8.749 9.073-9.657 5.833-4.601h11.018l8.1 12.055-3.628 12.443-11.342 14.388-9.398 12.184-13.48 18.147-8.426 14.518.778 1.166 2.01-.194 30.46-6.481 16.462-2.982 19.637-3.37 8.88 4.148.971 4.213-3.5 8.62-20.998 5.184-24.628 4.926-36.682 8.685-.454.324.519.648 16.526 1.555 7.065.389h17.304l32.21 2.398 8.426 5.574 5.055 6.805-.843 5.184-12.962 6.611-17.498-4.148-40.83-9.721-14-3.5h-1.944v1.167l11.666 11.406 21.387 19.314 26.767 24.887 1.36 6.157-3.434 4.86-3.63-.518-23.526-17.693-9.073-7.972-20.545-17.304h-1.36v1.814l4.73 6.935 25.017 37.59 1.296 11.536-1.814 3.76-6.481 2.268-7.13-1.297-14.647-20.544-15.1-23.138-12.185-20.739-1.49.843-7.194 77.448-3.37 3.953-7.778 2.981-6.48-4.925-3.436-7.972 3.435-15.749 4.148-20.544 3.37-16.333 3.046-20.285 1.815-6.74-.13-.454-1.49.194-15.295 20.999-23.267 31.433-18.406 19.702-4.407 1.75-7.648-3.954.713-7.064 4.277-6.286 25.47-32.405 15.36-20.092 9.917-11.6-.065-1.686h-.583L44.07 198.125l-12.055 1.555-5.185-4.86.648-7.972 2.463-2.593 20.35-13.999-.064.065Z`})})}var gc=Object.defineProperty,_c=H.forwardRef(((e,t)=>gc(e,`name`,{value:t,configurable:!0}))(function(e,t){return(0,U.jsx)(nr.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}})},`Label`)),vc=Object.defineProperty,yc=(e,t)=>vc(e,`name`,{value:t,configurable:!0}),bc,xc=`HoverCard`,[Sc,Cc]=rr(xc,[Or]),wc=Or(),[Tc,Ec]=Sc(xc),Dc=yc(e=>{let{__scopeHoverCard:t,children:n,open:r,defaultOpen:i,onOpenChange:a,openDelay:o=700,closeDelay:s=300}=e,c=wc(t),l=H.useRef(0),u=H.useRef(0),d=H.useRef(!1),f=H.useRef(!1),[p,m]=tr({prop:r,defaultProp:i??!1,onChange:a,caller:xc}),h=H.useCallback(()=>{clearTimeout(u.current),l.current=window.setTimeout(()=>m(!0),o)},[o,m]),g=H.useCallback(()=>{clearTimeout(l.current),!d.current&&!f.current&&(u.current=window.setTimeout(()=>m(!1),s))},[s,m]),_=H.useCallback(()=>m(!1),[m]);return H.useEffect(()=>()=>{clearTimeout(l.current),clearTimeout(u.current)},[]),(0,U.jsx)(Tc,{scope:t,open:p,onOpenChange:m,onOpen:h,onClose:g,onDismiss:_,hasSelectionRef:d,isPointerDownOnContentRef:f,children:(0,U.jsx)(Ar,{...c,children:n})})},`HoverCard`),Oc=`HoverCardTrigger`,kc=H.forwardRef(yc(function(e,t){let{__scopeHoverCard:n,...r}=e,i=Ec(Oc,n),a=wc(n);return(0,U.jsx)(Mr,{asChild:!0,...a,children:(0,U.jsx)(nr.a,{"data-state":i.open?`open`:`closed`,...r,ref:t,onPointerEnter:sr(e.onPointerEnter,Lc(i.onOpen)),onPointerLeave:sr(e.onPointerLeave,Lc(i.onClose)),onFocus:sr(e.onFocus,i.onOpen),onBlur:sr(e.onBlur,i.onClose),onTouchStart:sr(e.onTouchStart,e=>e.preventDefault())})})},`HoverCardTrigger`)),Ac=`HoverCardPortal`,[jc,Mc]=Sc(Ac,{forceMount:void 0}),Nc=yc(e=>{let{__scopeHoverCard:t,forceMount:n,children:r,container:i}=e,a=Ec(Ac,t);return(0,U.jsx)(jc,{scope:t,forceMount:n,children:(0,U.jsx)(er,{present:n||a.open,children:(0,U.jsx)(or,{asChild:!0,container:i,children:r})})})},`HoverCardPortal`),Pc=`HoverCardContent`,Fc=H.forwardRef(yc(function(e,t){let n=Mc(Pc,e.__scopeHoverCard),{forceMount:r=n.forceMount,...i}=e,a=Ec(Pc,e.__scopeHoverCard);return(0,U.jsx)(er,{present:r||a.open,children:(0,U.jsx)(Ic,{"data-state":a.open?`open`:`closed`,...i,onPointerEnter:sr(e.onPointerEnter,Lc(a.onOpen)),onPointerLeave:sr(e.onPointerLeave,Lc(a.onClose)),ref:t})})},`HoverCardContent`)),Ic=H.forwardRef(yc(function(e,t){let{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,...s}=e,c=Ec(Pc,n),l=wc(n),u=H.useRef(null),[d,f]=H.useState(null),p=$n(t,u,f);Qn(d);let[m,h]=H.useState(!1);return H.useEffect(()=>{if(m){let e=document.body;return bc=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect=`none`,e.style.webkitUserSelect=`none`,()=>{e.style.userSelect=bc,e.style.webkitUserSelect=bc}}},[m]),H.useEffect(()=>{if(u.current){let e=yc(()=>{h(!1),c.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==``&&(c.hasSelectionRef.current=!0)})},`handlePointerUp`);return document.addEventListener(`pointerup`,e),()=>{document.removeEventListener(`pointerup`,e),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!1}}},[c.isPointerDownOnContentRef,c.hasSelectionRef]),H.useEffect(()=>{u.current&&Rc(u.current).forEach(e=>e.setAttribute(`tabindex`,`-1`))}),(0,U.jsx)(lr,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:o,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:sr(a,e=>{e.preventDefault()}),onDismiss:c.onDismiss,children:(0,U.jsx)(kr,{...l,...s,onPointerDown:sr(s.onPointerDown,e=>{e.currentTarget.contains(e.target)&&h(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0}),ref:p,style:{...s.style,userSelect:m?`text`:void 0,WebkitUserSelect:m?`text`:void 0,"--radix-hover-card-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-hover-card-content-available-width":`var(--radix-popper-available-width)`,"--radix-hover-card-content-available-height":`var(--radix-popper-available-height)`,"--radix-hover-card-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-hover-card-trigger-height":`var(--radix-popper-anchor-height)`}})})},`HoverCardContentImpl`));function Lc(e){return t=>t.pointerType===`touch`?void 0:e()}yc(Lc,`excludeTouch`);function Rc(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:yc(e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP,`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}yc(Rc,`getTabbableNodes`);var zc=Object.defineProperty,Bc=(e,t)=>zc(e,`name`,{value:t,configurable:!0});function Vc(e,[t,n]){return Math.min(n,Math.max(t,e))}Bc(Vc,`clamp`);var Hc=e(Zn(),1),Uc=Object.defineProperty,Wc=(e,t)=>Uc(e,`name`,{value:t,configurable:!0}),Gc={ItemAligned:`item-aligned`,Popper:`popper`},Kc={LTR:`ltr`,RTL:`rtl`},qc=[` `,`Enter`,`ArrowUp`,`ArrowDown`],Jc=[` `,`Enter`],Yc=`Select`,[Xc,Zc,Qc]=n(Yc),[$c,el]=rr(Yc,[Qc,Or]),tl=Or(),[nl,rl]=$c(Yc),[il,al]=$c(Yc);function ol(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m,internal_do_not_use_render:h}=e,g=tl(t),[_,v]=H.useState(null),[y,b]=H.useState(null),[x,S]=H.useState(!1),C=xe(l),[w,T]=tr({prop:r,defaultProp:i??!1,onChange:a,caller:Yc}),[E,D]=tr({prop:o,defaultProp:s,onChange:c,caller:Yc}),O=H.useRef(null),k=H.useRef(!1),[A,j]=H.useState(null),M=Wc(e=>{j({value:e,hasConsumerStoppedPropagation:k.current}),D(e)},`handleUserSelect`),N=H.useRef(E);H.useEffect(()=>{let e=m?_?.ownerDocument.getElementById(m):_?.form;if(e instanceof HTMLFormElement){let t=Wc(()=>D(N.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[m,_,D]);let ee=!_||!!m||!!_.closest(`form`),[te,ne]=H.useState(new Set),re=ur(),ie=Array.from(te).map(e=>e.props.value).join(`;`),P=H.useCallback(e=>{ne(t=>new Set(t).add(e))},[]),ae=H.useCallback(e=>{ne(t=>{let n=new Set(t);return n.delete(e),n})},[]),oe={required:p,trigger:_,onTriggerChange:v,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:x,onValueNodeHasChildrenChange:S,contentId:re,value:E,onValueChange:D,hasConsumerStoppedPropagationRef:k,userSelection:A,onUserSelect:M,open:w,onOpenChange:T,dir:C,triggerPointerDownPosRef:O,disabled:f,name:u,autoComplete:d,form:m,nativeOptions:te,nativeSelectKey:ie,isFormControl:ee};return(0,U.jsx)(Ar,{...g,children:(0,U.jsx)(nl,{scope:t,...oe,children:(0,U.jsx)(Xc.Provider,{scope:t,children:(0,U.jsx)(il,{scope:t,onNativeOptionAdd:P,onNativeOptionRemove:ae,children:ql(h)?h(oe):n})})})})}Wc(ol,`SelectProvider`);var sl=Wc(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,U.jsx)(ol,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,U.jsxs)(U.Fragment,{children:[n,e?(0,U.jsx)(Kl,{__scopeSelect:t}):null]})})},`Select`),cl=`SelectTrigger`,ll=H.forwardRef(Wc(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=tl(n),o=rl(cl,n),s=o.disabled||r,c=$n(t,o.onTriggerChange),l=Zc(n),u=H.useRef(`touch`),[d,f,p]=Yl(e=>{let t=l().filter(e=>!e.disabled),n=Xl(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onUserSelect(n.value)}),m=Wc(e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return(0,U.jsx)(Mr,{asChild:!0,...a,children:(0,U.jsx)(nr.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":Jl(o.value)?``:void 0,...i,ref:c,onClick:sr(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:sr(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:sr(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&(o.hasConsumerStoppedPropagationRef.current=e.isPropagationStopped(),f(e.key)),t&&e.key===` `||qc.includes(e.key)&&(m(),e.preventDefault())})})})},`SelectTrigger`)),ul=`SelectValue`,dl=H.forwardRef(Wc(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=rl(ul,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=$n(t,c.onValueNodeChange);ar(()=>{l(u)},[l,u]);let f=Jl(c.value);return(0,U.jsx)(nr.span,{...s,asChild:!f&&s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,U.jsx)(H.Fragment,{children:f?o:a},f?`placeholder`:`value`)})},`SelectValue`)),fl=H.forwardRef(Wc(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,U.jsx)(nr.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[pl,ml]=$c(`SelectPortal`,{forceMount:void 0}),hl=Wc(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,U.jsx)(pl,{scope:e.__scopeSelect,forceMount:n,children:(0,U.jsx)(or,{asChild:!0,...r})})},`SelectPortal`),gl=`SelectContent`,_l=H.forwardRef(Wc(function(e,t){let n=ml(gl,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=rl(gl,e.__scopeSelect),[o,s]=H.useState();return ar(()=>{s(new DocumentFragment)},[]),(0,U.jsx)(er,{present:r||a.open,children:({present:e})=>e?(0,U.jsx)(Cl,{...i,ref:t}):(0,U.jsx)(vl,{...i,fragment:o})})},`SelectContent`)),vl=H.forwardRef(Wc(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?Hc.createPortal((0,U.jsx)(bl,{scope:n,children:(0,U.jsx)(Xc.Slot,{scope:n,children:(0,U.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),yl=10,[bl,xl]=$c(gl),Sl=dr(`SelectContent.RemoveScroll`),Cl=H.forwardRef(Wc(function(e,t){let{__scopeSelect:n}=e,{position:r=Gc.ItemAligned,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,v=rl(gl,n),[y,b]=H.useState(null),[x,S]=H.useState(null),C=$n(t,b),[w,T]=H.useState(null),[E,D]=H.useState(null),O=Zc(n),[k,A]=H.useState(!1),j=H.useRef(!1),M=H.useRef(!1),N=H.useRef(!1);H.useEffect(()=>{if(y)return pr(y)},[y]),Er();let ee=H.useCallback(e=>{let[t,...n]=O().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),n?.focus(),document.activeElement!==i))return},[O,x]),te=H.useCallback(()=>ee([w,y]),[ee,w,y]);H.useEffect(()=>{k&&te()},[k,te]);let{onOpenChange:ne,triggerPointerDownPosRef:re}=v;H.useEffect(()=>{if(y){let e={x:0,y:0},t=Wc(t=>{e={x:Math.abs(Math.round(t.pageX)-(re.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(re.current?.y??0))}},`handlePointerMove`),n=Wc(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(y)||ne(!1),document.removeEventListener(`pointermove`,t),re.current=null},`handlePointerUp`);return re.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[y,ne,re]),H.useEffect(()=>{let e=Wc(()=>ne(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[ne]);let[ie,P]=Yl(e=>{let t=O().filter(e=>!e.disabled),n=Xl(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),ae=H.useCallback((e,t,n)=>{let r=!M.current;r&&(M.current=!0);let i=!j.current&&!n;v.value!==void 0&&v.value===t||i?(T(e),i&&(j.current=!0)):r&&T(e)},[v.value]),oe=H.useCallback(()=>y?.focus(),[y]),se=H.useCallback((e,t,n)=>{if(!e)return;let r=!N.current;r&&(N.current=!0);let i=!j.current&&!n;(v.value!==void 0&&v.value===t||i||r)&&D(e)},[v.value]),ce=r===Gc.Popper?Tl:wl,le=ce===Tl?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,U.jsx)(bl,{scope:n,content:y,viewport:x,onViewportChange:S,itemRefCallback:ae,selectedItem:w,onItemLeave:oe,itemTextRefCallback:se,focusSelectedItem:te,selectedItemText:E,position:r,isPositioned:k,searchRef:ie,children:(0,U.jsx)(fr,{as:Sl,allowPinchZoom:!0,children:(0,U.jsx)(cr,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:sr(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,U.jsx)(lr,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,U.jsx)(ce,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...le,onPlaced:()=>A(!0),ref:C,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:sr(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&P(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=O().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>ee(t)),e.preventDefault()}})})})})})})},`SelectContentImpl`)),wl=H.forwardRef(Wc(function(e,t){let{__scopeSelect:n,onPlaced:r,...i}=e,a=rl(gl,n),o=xl(gl,n),[s,c]=H.useState(null),[l,u]=H.useState(null),d=$n(t,u),f=Zc(n),p=H.useRef(!1),m=H.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,y=H.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==Kc.RTL){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-yl,d=Vc(a,[yl,Math.max(yl,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-yl,d=Vc(a,[yl,Math.max(yl,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-yl*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-yl,D=c-E,O=g.offsetHeight/2,k=g.offsetTop+O,A=m+v+k,j=x-A;if(A<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,h.scrollTop=A-E+h.offsetTop}s.style.margin=`${yl}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);ar(()=>y(),[y]);let[b,x]=H.useState();ar(()=>{l&&x(window.getComputedStyle(l).zIndex)},[l]);let S=H.useCallback(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]);return(0,U.jsx)(El,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:S,children:(0,U.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:b},children:(0,U.jsx)(nr.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})},`SelectItemAlignedPosition`)),Tl=H.forwardRef(Wc(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=yl,...a}=e,o=tl(n);return(0,U.jsx)(kr,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})},`SelectPopperPosition`)),[El,Dl]=$c(gl,{}),Ol=`SelectViewport`,kl=H.forwardRef(Wc(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=xl(Ol,n),o=Dl(Ol,n),s=$n(t,a.onViewportChange),c=H.useRef(0);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,U.jsx)(Xc.Slot,{scope:n,children:(0,U.jsx)(nr.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:sr(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-yl*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})},`SelectViewport`)),[Al,jl]=$c(`SelectGroup`),Ml=`SelectItem`,[Nl,Pl]=$c(Ml),Fl=H.forwardRef(Wc(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=rl(Ml,n),c=xl(Ml,n),l=s.value===r,[u,d]=H.useState(a??``),[f,p]=H.useState(!1),m=ir(e=>c.itemRefCallback?.(e,r,i)),h=$n(t,m),g=ur(),_=H.useRef(`touch`);function v(e){s.hasConsumerStoppedPropagationRef.current=e.isPropagationStopped(),s.onUserSelect(r),s.onOpenChange(!1)}return Wc(v,`handleSelect`),(0,U.jsx)(Nl,{scope:n,value:r,disabled:i,textId:g,isSelected:l,onItemTextChange:H.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,U.jsx)(Xc.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,U.jsx)(nr.div,{role:`option`,"aria-labelledby":g,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:h,onFocus:sr(o.onFocus,()=>p(!0)),onBlur:sr(o.onBlur,()=>p(!1)),onClick:sr(o.onClick,e=>{i||_.current!==`mouse`&&v(e)}),onPointerUp:sr(o.onPointerUp,e=>{i||_.current===`mouse`&&v(e)}),onPointerDown:sr(o.onPointerDown,e=>{_.current=e.pointerType}),onPointerMove:sr(o.onPointerMove,e=>{_.current=e.pointerType,i?c.onItemLeave?.():_.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:sr(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:sr(o.onKeyDown,e=>{i||e.target!==e.currentTarget||(c.searchRef?.current===``||e.key!==` `)&&(Jc.includes(e.key)&&v(e),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),Il=`SelectItemText`,Ll=H.forwardRef(Wc(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=rl(Il,n),s=xl(Il,n),c=Pl(Il,n),l=al(Il,n),[u,d]=H.useState(null),f=ir(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=$n(t,d,c.onItemTextChange,f),m=u?.textContent,h=H.useMemo(()=>(0,U.jsx)(`option`,{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:_}=l;return ar(()=>(g(h),()=>_(h)),[g,_,h]),(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(nr.span,{id:c.textId,...a,ref:p}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!Jl(o.value)?Hc.createPortal(a.children,o.valueNode):null]})},`SelectItemText`)),Rl=`SelectItemIndicator`,zl=H.forwardRef(Wc(function(e,t){let{__scopeSelect:n,...r}=e;return Pl(Rl,n).isSelected?(0,U.jsx)(nr.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),Bl=`SelectScrollUpButton`,Vl=H.forwardRef(Wc(function(e,t){let n=xl(Bl,e.__scopeSelect),r=Dl(Bl,e.__scopeSelect),[i,a]=H.useState(!1),o=$n(t,r.onScrollButtonChange);return ar(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollTop>0;a(e)};Wc(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,U.jsx)(Wl,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null},`SelectScrollUpButton`)),Hl=`SelectScrollDownButton`,Ul=H.forwardRef(Wc(function(e,t){let n=xl(Hl,e.__scopeSelect),r=Dl(Hl,e.__scopeSelect),[i,a]=H.useState(!1),o=$n(t,r.onScrollButtonChange);return ar(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};Wc(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,U.jsx)(Wl,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null},`SelectScrollDownButton`)),Wl=H.forwardRef(Wc(function(e,t){let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=xl(`SelectScrollButton`,n),o=H.useRef(null),s=Zc(n),c=H.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return H.useEffect(()=>()=>c(),[c]),ar(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,U.jsx)(nr.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:sr(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:sr(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:sr(i.onPointerLeave,()=>{c()})})},`SelectScrollButtonImpl`)),Gl=`SelectBubbleInput`,Kl=H.forwardRef(Wc(function({__scopeSelect:e,...t},n){let r=rl(Gl,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u,userSelection:d}=r,{nativeOptions:f,nativeSelectKey:p}=r,m=H.useRef(null),h=$n(n,m),g=i??``,_=H.useRef(g),v=H.useRef(d),y=H.useRef(!1),b=Array.from(f).some(e=>(e.props.value??``)===``);return H.useEffect(()=>{let e=m.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set,r=d!==null&&d!==v.current;v.current=d;let i=_.current!==g;_.current=g;let a=r&&i;if(r&&!i&&d.value!==g&&!d.hasConsumerStoppedPropagation&&n){y.current=!0;try{n.call(e,d.value),e.dispatchEvent(new Event(`change`,{bubbles:!0}))}finally{y.current=!1,n.call(e,g)}return}let o=a&&!d.hasConsumerStoppedPropagation;if(i&&n){let t=new Event(`change`,{bubbles:o});n.call(e,g),e.dispatchEvent(t)}},[g,d]),(0,U.jsxs)(nr.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>{y.current||a(e.target.value)},...t,style:{...Nr,...t.style},ref:h,defaultValue:g,children:[Jl(i)&&!b?(0,U.jsx)(`option`,{value:``}):null,Array.from(f)]},p)},`SelectBubbleInput`));function ql(e){return typeof e==`function`}Wc(ql,`isFunction`);function Jl(e){return e===``||e===void 0}Wc(Jl,`shouldShowPlaceholder`);function Yl(e){let t=ir(e),n=H.useRef(``),r=H.useRef(0),i=H.useCallback(e=>{let i=n.current+e;t(i);function a(e){n.current=e,window.clearTimeout(r.current),e!==``&&(r.current=window.setTimeout(()=>a(``),1e3))}Wc(a,`updateSearch`),a(i)},[t]),a=H.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return H.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}Wc(Yl,`useTypeaheadSearch`);function Xl(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Zl(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}Wc(Xl,`findNextItem`);function Zl(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Wc(Zl,`wrapArray`);var Ql=Object.defineProperty,$l=(e,t)=>Ql(e,`name`,{value:t,configurable:!0}),eu=`Switch`,[tu,nu]=rr(eu),[ru,iu]=tu(eu);function au(e){let{__scopeSwitch:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=tr({prop:n,defaultProp:i??!1,onChange:c,caller:eu}),[m,h]=H.useState(null),[g,_]=H.useState(null),[v,y]=H.useState(null),b={checked:f,setChecked:p,disabled:a,control:m,setControl:h,name:s,form:o,value:u,userClick:v,onUserClick:y,required:l,defaultChecked:i,isFormControl:!m||!!o||!!m.closest(`form`),bubbleInput:g,setBubbleInput:_};return(0,U.jsx)(ru,{scope:t,...b,children:pu(d)?d(b):r})}$l(au,`SwitchProvider`);var ou=`SwitchTrigger`,su=H.forwardRef($l(function({__scopeSwitch:e,onClick:t,...n},r){let{control:i,form:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,onUserClick:f,isFormControl:p,bubbleInput:m}=iu(ou,e),h=$n(r,u),g=H.useRef(c);return H.useEffect(()=>{let e=a?i?.ownerDocument.getElementById(a):i?.form;if(e instanceof HTMLFormElement){let t=$l(()=>d(g.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[i,a,d]),(0,U.jsx)(nr.button,{type:`button`,role:`switch`,"aria-checked":c,"aria-required":l,"data-state":mu(c),"data-disabled":s?``:void 0,disabled:s,value:o,...n,ref:h,onClick:sr(t,e=>{let t=e.isPropagationStopped();f({requestedChecked:!c,hasConsumerStoppedPropagation:t}),d(e=>!e),m&&p&&(t||e.stopPropagation())})})},`SwitchTrigger`)),cu=H.forwardRef($l(function(e,t){let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,U.jsx)(au,{__scopeSwitch:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(su,{...d,ref:t,__scopeSwitch:n}),e&&(0,U.jsx)(fu,{__scopeSwitch:n})]})})},`Switch`)),lu=`SwitchThumb`,uu=H.forwardRef($l(function(e,t){let{__scopeSwitch:n,...r}=e,i=iu(lu,n);return(0,U.jsx)(nr.span,{"data-state":mu(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})},`SwitchThumb`)),du=`SwitchBubbleInput`,fu=H.forwardRef($l(function({__scopeSwitch:e,onClick:t,...n},r){let{control:i,userClick:a,checked:o,defaultChecked:s,required:c,disabled:l,name:u,value:d,form:f,bubbleInput:p,setBubbleInput:m}=iu(du,e),h=$n(r,m),g=jr(i),_=H.useRef(!1),v=H.useRef(o),y=H.useRef(a),b=H.useRef(null);H.useEffect(()=>{let e=p;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set;if(!n)return;let r=v.current!==o;v.current=o;let i=a!==null&&a!==y.current;if(y.current=a,i)b.current=r?null:a,r&&n.call(e,o),e.dispatchEvent(new Event(`click`,{bubbles:!a.hasConsumerStoppedPropagation}));else if(r){let t=b.current;b.current=null;let r=t?.requestedChecked===o;_.current=!0,n.call(e,o),e.dispatchEvent(new Event(`click`,{bubbles:!(r&&t.hasConsumerStoppedPropagation)})),_.current=!1}},[p,o,a]);let x=H.useRef(o);return(0,U.jsx)(nr.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:s??x.current,required:c,disabled:l,name:u,value:d,form:f,...n,tabIndex:-1,ref:h,onClick:sr(t,e=>{_.current&&e.stopPropagation()}),style:{...n.style,...g,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`SwitchBubbleInput`));function pu(e){return typeof e==`function`}$l(pu,`isFunction`);function mu(e){return e?`checked`:`unchecked`}$l(mu,`getState`);var hu={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},gu=H.createContext&&H.createContext(hu),_u=[`attr`,`size`,`title`];function vu(e,t){if(e==null)return{};var n,r,i=yu(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function yu(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function bu(){return bu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bu.apply(null,arguments)}function xu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Su(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?xu(Object(n),!0).forEach(function(t){Cu(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xu(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Cu(e,t,n){return(t=wu(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wu(e){var t=Tu(e,`string`);return typeof t==`symbol`?t:t+``}function Tu(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Eu(e){return e&&e.map((e,t)=>H.createElement(e.tag,Su({key:t},e.attr),Eu(e.child)))}function K(e){return t=>H.createElement(Du,bu({attr:Su({},e.attr)},t),Eu(e.child))}function Du(e){var t=t=>{var n=e.attr,r=e.size,i=e.title,a=vu(e,_u),o=r||t.size||`1em`,s;return t.className&&(s=t.className),e.className&&(s=(s?s+` `:``)+e.className),H.createElement(`svg`,bu({stroke:`currentColor`,fill:`currentColor`,strokeWidth:`0`},t.attr,n,a,{className:s,style:Su(Su({color:e.color||t.color},t.style),e.style),height:o,width:o,xmlns:`http://www.w3.org/2000/svg`}),i&&H.createElement(`title`,null,i),e.children)};return gu===void 0?t(hu):H.createElement(gu.Consumer,null,e=>t(e))}function Ou(e){return K({tag:`svg`,attr:{fill:`currentColor`,viewBox:`0 0 16 16`},child:[{tag:`path`,attr:{d:`m.334 0 4.358 4.359h7.15v7.15l4.358 4.358V0zM.2 9.72l4.487-4.488v6.281h6.28L6.48 16H.2z`},child:[]}]})(e)}function ku(e){return K({tag:`svg`,attr:{viewBox:`0 0 448 512`},child:[{tag:`path`,attr:{d:`M0 93.7l183.6-25.3v177.4H0V93.7zm0 324.6l183.6 25.3V268.4H0v149.9zm203.8 28L448 480V268.4H203.8v177.9zm0-380.6v180.1H448V32L203.8 65.7z`},child:[]}]})(e)}function Au(e){return K({tag:`svg`,attr:{viewBox:`0 0 496 512`},child:[{tag:`path`,attr:{d:`M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm52.7 93c8.8-15.2 28.3-20.5 43.5-11.7 15.3 8.8 20.5 28.3 11.7 43.6-8.8 15.2-28.3 20.5-43.5 11.7-15.3-8.9-20.5-28.4-11.7-43.6zM87.4 287.9c-17.6 0-31.9-14.3-31.9-31.9 0-17.6 14.3-31.9 31.9-31.9 17.6 0 31.9 14.3 31.9 31.9 0 17.6-14.3 31.9-31.9 31.9zm28.1 3.1c22.3-17.9 22.4-51.9 0-69.9 8.6-32.8 29.1-60.7 56.5-79.1l23.7 39.6c-51.5 36.3-51.5 112.5 0 148.8L172 370c-27.4-18.3-47.8-46.3-56.5-79zm228.7 131.7c-15.3 8.8-34.7 3.6-43.5-11.7-8.8-15.3-3.6-34.8 11.7-43.6 15.2-8.8 34.7-3.6 43.5 11.7 8.8 15.3 3.6 34.8-11.7 43.6zm.3-69.5c-26.7-10.3-56.1 6.6-60.5 35-5.2 1.4-48.9 14.3-96.7-9.4l22.5-40.3c57 26.5 123.4-11.7 128.9-74.4l46.1.7c-2.3 34.5-17.3 65.5-40.3 88.4zm-5.9-105.3c-5.4-62-71.3-101.2-128.9-74.4l-22.5-40.3c47.9-23.7 91.5-10.8 96.7-9.4 4.4 28.3 33.8 45.3 60.5 35 23.1 22.9 38 53.9 40.2 88.5l-46 .6z`},child:[]}]})(e)}function ju(e){return K({tag:`svg`,attr:{viewBox:`0 0 448 512`},child:[{tag:`path`,attr:{d:`M0 32h214.6v214.6H0V32zm233.4 0H448v214.6H233.4V32zM0 265.4h214.6V480H0V265.4zm233.4 0H448V480H233.4V265.4z`},child:[]}]})(e)}function Mu(e){return K({tag:`svg`,attr:{viewBox:`0 0 496 512`},child:[{tag:`path`,attr:{d:`M131.5 217.5L55.1 100.1c47.6-59.2 119-91.8 192-92.1 42.3-.3 85.5 10.5 124.8 33.2 43.4 25.2 76.4 61.4 97.4 103L264 133.4c-58.1-3.4-113.4 29.3-132.5 84.1zm32.9 38.5c0 46.2 37.4 83.6 83.6 83.6s83.6-37.4 83.6-83.6-37.4-83.6-83.6-83.6-83.6 37.3-83.6 83.6zm314.9-89.2L339.6 174c37.9 44.3 38.5 108.2 6.6 157.2L234.1 503.6c46.5 2.5 94.4-7.7 137.8-32.9 107.4-62 150.9-192 107.4-303.9zM133.7 303.6L40.4 120.1C14.9 159.1 0 205.9 0 256c0 124 90.8 226.7 209.5 244.9l63.7-124.8c-57.6 10.8-113.2-20.8-139.5-72.5z`},child:[]}]})(e)}function Nu(e){return K({tag:`svg`,attr:{viewBox:`0 0 384 512`},child:[{tag:`path`,attr:{d:`M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z`},child:[]}]})(e)}function Pu(e){return K({tag:`svg`,attr:{viewBox:`0 0 576 512`},child:[{tag:`path`,attr:{d:`M327.1 96c-89.97 0-168.54 54.77-212.27 101.63L27.5 131.58c-12.13-9.18-30.24.6-27.14 14.66L24.54 256 .35 365.77c-3.1 14.06 15.01 23.83 27.14 14.66l87.33-66.05C158.55 361.23 237.13 416 327.1 416 464.56 416 576 288 576 256S464.56 96 327.1 96zm87.43 184c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24 13.26 0 24 10.74 24 24 0 13.25-10.75 24-24 24z`},child:[]}]})(e)}function Fu(e){return K({tag:`svg`,attr:{viewBox:`0 0 576 512`},child:[{tag:`path`,attr:{d:`M469.2 75A75.6 75.6 0 1 0 317.9 75a75.6 75.6 0 1 0 151.2 0zM154.2 240.7A75.6 75.6 0 1 0 3 240.7a75.6 75.6 0 1 0 151.2 0zM57 346C75.6 392.9 108 433 150 461.1s91.5 42.6 142 41.7c-14.7-18.6-22.9-41.5-23.2-65.2c-6.8-.9-13.3-2.1-19.5-3.4c-26.8-5.7-51.9-17.3-73.6-34s-39.3-38.1-51.7-62.5c-20.9 9.9-44.5 12.8-67.1 8.2zm395.1 89.8a75.6 75.6 0 1 0 -151.2 0 75.6 75.6 0 1 0 151.2 0zM444 351.6c18.5 14.8 31.6 35.2 37.2 58.2c33.3-41.3 52.6-92.2 54.8-145.2s-12.5-105.4-42.2-149.4c-8.6 21.5-24 39.6-43.8 51.6c15.4 28.6 22.9 60.8 21.9 93.2s-10.7 64-28 91.6zM101.1 135.4c12.4 2.7 24.3 7.5 35.1 14.3c16.6-24.2 38.9-44.1 64.8-58S255.8 70.4 285.2 70c.2-5.9 .9-11.9 2-17.7c3.6-16.7 11.1-32.3 21.8-45.5c-47.7-3.8-95.4 6-137.6 28.5S94.3 91.7 70.8 133.4c2.7-.2 5.3-.3 8-.3c7.5 0 15 .8 22.4 2.3z`},child:[]}]})(e)}function Iu(e){return K({tag:`svg`,attr:{viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{fillRule:`evenodd`,d:`M15.7928421,15.3333704 C15.9768442,15.3333704 16.1755131,15.1915021 16.2349804,15.0183002 L18.4310048,8.64836276 C18.4908721,8.47529417 18.3902043,8.33315926 18.2063356,8.33315926 L17.2052578,8.33315926 C17.0219225,8.33315926 16.8228536,8.47529417 16.7629863,8.64836276 L14.5570951,15.0183002 C14.4973611,15.1915021 14.5981622,15.3333704 14.7821642,15.3333704 L15.7928421,15.3333704 Z M24.0002667,12 C24.0002667,18.627007 18.6267403,24 12,24 C11.8170646,24 11.6393293,23.9803998 11.4581273,23.9727997 L13.8777542,16.981922 C13.9382882,16.8085868 14.1365571,16.6668519 14.3205591,16.6668519 L16.0003111,16.6668519 C18.6083401,16.6668519 18.632207,15.8021756 18.9066101,15.0079001 C19.5488839,13.1445461 20.6560962,9.93424371 20.8714319,9.30583673 C21.1779686,8.40956011 21.2793031,7.00007778 19.0002111,7.00007778 L15.0000333,7.00007778 C14.816698,7.00007778 14.6177624,7.14194602 14.5570951,7.31528128 L8.92489917,23.5871954 C3.79030878,22.2271803 0,17.5617951 0,12 C0,6.69394104 3.44790498,2.20055778 8.22275803,0.615473505 L2.77589751,16.3513817 C2.71523017,16.5248503 2.81643129,16.6668519 3.00003333,16.6668519 L4.99965555,16.6668519 C5.1836576,16.6668519 5.38232647,16.5248503 5.44272714,16.3513817 L8.1092901,8.64836276 C8.16915744,8.47529417 8.36755964,8.33315926 8.55102834,8.33315926 L9.539706,8.33315926 C9.72330804,8.33315926 9.82410916,8.47529417 9.76424182,8.64836276 L7.10847898,16.3513817 C7.04914499,16.5248503 7.14994611,16.6668519 7.33328148,16.6668519 L9.33357037,16.6668519 C9.51690574,16.6668519 9.71570795,16.5248503 9.77544195,16.3513817 C9.77544195,16.3513817 11.6389293,10.9485217 12.2016022,9.3149035 C12.7649418,7.68155202 12.3125368,7.00007778 10.3462483,7.00007778 L9.01290014,7.00007778 C8.82956477,7.00007778 8.72889699,6.8580762 8.78916432,6.68514095 L11.0862565,0.0464005156 C11.3887932,0.0234669274 11.6913299,0 12,0 C18.6267403,0 24.0002667,5.37299303 24.0002667,12 L24.0002667,12 Z`},child:[]}]})(e)}function Lu(e){return K({tag:`svg`,attr:{viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M3,17 C2.44771525,17 2,16.5522847 2,16 C2,15.4477153 2.44771525,15 3,15 L13.5,15 C14.5,15 15.5,17 15,17 L3,17 Z M17,17 C16.4477153,17 16,16.5522847 16,16 C16,15.4477153 16.4477153,15 17,15 L21,15 C21.5522847,15 22,15.4477153 22,16 C22,16.5522847 21.5522847,17 21,17 L17,17 Z M12.6333775,3.50103556 C12.908948,3.02241319 13.5203421,2.85780709 13.9989644,3.13337754 C14.4775868,3.408948 14.6421929,4.02034208 14.3666225,4.49896444 L7.45953351,16.4954873 C7.18396306,16.9741097 6.57256898,17.1387158 6.09394661,16.8631454 C5.61532424,16.5875749 5.45071815,15.9761808 5.7262886,15.4975585 L12.6333775,3.50103556 Z M4,18.5 C4.5,17.5 7.5,16.5 6.5,18.2208385 C6.32221095,18.5267848 5.77775177,19.4528267 4.86662246,20.9989644 C4.591052,21.4775868 3.97965792,21.6421929 3.50103556,21.3666225 C3.02241319,21.091052 2.85780709,20.4796579 3.13337754,20.0010356 L4,18.5 Z M9.13337754,4.49896444 C8.85780709,4.02034208 9.02241319,3.408948 9.50103556,3.13337754 C9.97965792,2.85780709 10.591052,3.02241319 10.8666225,3.50103556 L12.6104584,6.52980328 C12.8860289,7.00842564 12.7214228,7.61981972 12.2428004,7.89539018 C11.764178,8.17096063 11.152784,8.00635453 10.8772135,7.52773217 L9.13337754,4.49896444 Z M13,11.5 C12.1018662,10 13,7 13.7163439,8.49589818 L20.3666225,20.0010356 C20.6421929,20.4796579 20.4775868,21.091052 19.9989644,21.3666225 C19.5203421,21.6421929 18.908948,21.4775868 18.6333775,20.9989644 L13,11.5 Z`},child:[]}]})(e)}function Ru(e){return K({tag:`svg`,attr:{version:`1.1`,viewBox:`0 0 16 16`},child:[{tag:`path`,attr:{d:`M8.894 12.16c-0-0.001-0-0.001-0-0.002 0 0.001 0 0.001 0 0.002z`},child:[]},{tag:`path`,attr:{d:`M8.916 12.727c-0-0.004-0-0.007-0.001-0.011 0 0.004 0 0.007 0.001 0.011z`},child:[]},{tag:`path`,attr:{d:`M8.903 12.442c-0-0.003-0-0.006-0-0.008 0 0.003 0 0.006 0 0.008z`},child:[]},{tag:`path`,attr:{d:`M15 0h-14c-0.55 0-1 0.45-1 1v14c0 0.55 0.45 1 1 1h7.716c0.001 0 0.001 0 0.002 0s0.001-0 0.002-0h6.28c0.55 0 1-0.45 1-1v-14c0-0.55-0.45-1-1-1zM3 3.5c0-0.276 0.224-0.5 0.5-0.5s0.5 0.224 0.5 0.5v1c0 0.276-0.224 0.5-0.5 0.5s-0.5-0.224-0.5-0.5v-1zM15 15h-5.86c-0.105-0.658-0.17-1.336-0.209-1.994 0 0.002 0 0.004 0 0.005-0.308 0.034-0.618 0.051-0.931 0.051-2.088 0-4.1-0.76-5.664-2.141-0.233-0.206-0.255-0.561-0.050-0.794s0.561-0.255 0.794-0.050c1.358 1.199 3.105 1.859 4.919 1.859 0.298 0 0.595-0.018 0.888-0.053-0.034-1.847 0.107-3.311 0.11-3.334 0.014-0.141-0.032-0.28-0.127-0.385s-0.229-0.164-0.371-0.164h-1.487c0.022-0.541 0.079-1.466 0.234-2.503 0.295-1.981 0.812-3.528 1.502-4.497h6.251v14z`},child:[]},{tag:`path`,attr:{d:`M12.5 5c-0.276 0-0.5-0.224-0.5-0.5v-1c0-0.276 0.224-0.5 0.5-0.5s0.5 0.224 0.5 0.5v1c0 0.276-0.224 0.5-0.5 0.5z`},child:[]},{tag:`path`,attr:{d:`M8.445 13.050c-0.057 0.003-0.114 0.005-0.171 0.007 0.057-0.002 0.114-0.004 0.171-0.007z`},child:[]},{tag:`path`,attr:{d:`M8 13.063c0.073 0 0.146-0.001 0.22-0.003-0.073 0.002-0.146 0.003-0.22 0.003z`},child:[]},{tag:`path`,attr:{d:`M8.423 11.925c0.012-0.001 0.024-0.001 0.037-0.002-0.012 0.001-0.024 0.001-0.037 0.002z`},child:[]},{tag:`path`,attr:{d:`M8.204 11.934c0.017-0 0.034-0.001 0.050-0.002-0.017 0.001-0.034 0.001-0.050 0.002z`},child:[]},{tag:`path`,attr:{d:`M13.713 10.128c-0.206-0.233-0.561-0.255-0.794-0.050-1.135 1.002-2.542 1.627-4.032 1.806 0.007 0.364 0.020 0.742 0.043 1.127 1.749-0.191 3.403-0.916 4.733-2.090 0.233-0.206 0.255-0.561 0.050-0.794z`},child:[]},{tag:`path`,attr:{d:`M8.93 13.012c-0.072 0.008-0.144 0.015-0.216 0.021 0.072-0.006 0.144-0.013 0.216-0.021z`},child:[]},{tag:`path`,attr:{d:`M8.68 13.035c-0.061 0.005-0.122 0.009-0.183 0.013 0.061-0.004 0.122-0.008 0.183-0.013z`},child:[]}]})(e)}function zu(e){return K({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M11.415 5.038a.58.58 0 0 0-.543.197L.135 18.021a.58.58 0 0 0 .071.814.58.58 0 0 0 .815-.07L11.757 5.979a.58.58 0 0 0-.07-.815.6.6 0 0 0-.272-.126m-8.113.317a3.133 3.133 0 0 0-3.12 3.12 3.13 3.13 0 0 0 3.12 3.119A3.133 3.133 0 0 0 6.42 8.475a3.13 3.13 0 0 0-3.119-3.119m0 1.806a1.3 1.3 0 0 1 1.314 1.313 1.3 1.3 0 0 1-1.314 1.312A1.3 1.3 0 0 1 1.99 8.475a1.3 1.3 0 0 1 1.312-1.314m5.253 5.253a3.13 3.13 0 0 0-3.119 3.119 3.13 3.13 0 0 0 3.12 3.118 3.133 3.133 0 0 0 3.118-3.12 3.133 3.133 0 0 0-3.119-3.118m0 1.805a1.3 1.3 0 0 1 1.313 1.314c0 .735-.577 1.312-1.312 1.312a1.3 1.3 0 0 1-1.314-1.312 1.3 1.3 0 0 1 1.313-1.314m7.201 3.276a.58.58 0 0 0-.578.578.58.58 0 0 0 .578.578h7.666a.58.58 0 0 0 .579-.578.58.58 0 0 0-.579-.578Z`},child:[]}]})(e)}function Bu(e){return K({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M12 0C8.016 0 4.756.255 2.493 2.516.23 4.776 0 8.033 0 12.012c0 3.98.23 7.235 2.494 9.497C4.757 23.77 8.017 24 12 24c3.983 0 7.243-.23 9.506-2.491C23.77 19.247 24 15.99 24 12.012c0-3.984-.233-7.243-2.502-9.504C19.234.252 15.978 0 12 0zM4.906 7.405h5.624c1.47 0 3.007.068 3.764.827.746.746.827 2.233.83 3.676v4.54a.15.15 0 0 1-.152.147h-1.947a.15.15 0 0 1-.152-.148V11.83c-.002-.806-.048-1.634-.464-2.051-.358-.36-1.026-.441-1.72-.458H7.158a.15.15 0 0 0-.151.147v6.98a.15.15 0 0 1-.152.148H4.906a.15.15 0 0 1-.15-.148V7.554a.15.15 0 0 1 .15-.149zm12.131 0h1.949a.15.15 0 0 1 .15.15v8.892a.15.15 0 0 1-.15.148h-1.949a.15.15 0 0 1-.151-.148V7.554a.15.15 0 0 1 .151-.149zM8.92 10.948h2.046c.083 0 .15.066.15.147v5.352a.15.15 0 0 1-.15.148H8.92a.15.15 0 0 1-.152-.148v-5.352a.15.15 0 0 1 .152-.147Z`},child:[]}]})(e)}function Vu(e){return K({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M17.61.455a3.41 3.41 0 0 0-3.41 3.41 3.41 3.41 0 0 0 3.41 3.41 3.41 3.41 0 0 0 3.41-3.41 3.41 3.41 0 0 0-3.41-3.41zM12.92.8C8.923.777 5.137 2.941 3.148 6.451a4.5 4.5 0 0 1 .26-.007 4.92 4.92 0 0 1 2.585.737A8.316 8.316 0 0 1 12.688 3.6 4.944 4.944 0 0 1 13.723.834 11.008 11.008 0 0 0 12.92.8zm9.226 4.994a4.915 4.915 0 0 1-1.918 2.246 8.36 8.36 0 0 1-.273 8.303 4.89 4.89 0 0 1 1.632 2.54 11.156 11.156 0 0 0 .559-13.089zM3.41 7.932A3.41 3.41 0 0 0 0 11.342a3.41 3.41 0 0 0 3.41 3.409 3.41 3.41 0 0 0 3.41-3.41 3.41 3.41 0 0 0-3.41-3.41zm2.027 7.866a4.908 4.908 0 0 1-2.915.358 11.1 11.1 0 0 0 7.991 6.698 11.234 11.234 0 0 0 2.422.249 4.879 4.879 0 0 1-.999-2.85 8.484 8.484 0 0 1-.836-.136 8.304 8.304 0 0 1-5.663-4.32zm11.405.928a3.41 3.41 0 0 0-3.41 3.41 3.41 3.41 0 0 0 3.41 3.41 3.41 3.41 0 0 0 3.41-3.41 3.41 3.41 0 0 0-3.41-3.41z`},child:[]}]})(e)}function Hu(e){return K({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M19.8166 10.2808l.0459 2.6934h-.023l-.7793-2.6934h-1.2837v3.3925h.8481l-.0458-2.785h.023l.8366 2.785h1.2264v-3.3925zm-16.149 0l-.6418 3.427h.9284l.4699-3.1175h.0229l.4585 3.1174h.9169l-.6304-3.4269zm5.1805 0l-.424 2.6132h-.023l-.424-2.6132H6.5788l-.0688 3.427h.8596l.023-3.0832h.0114l.573 3.0831h.8711l.5731-3.083h.023l.0228 3.083h.8596l-.0802-3.4269zm-7.2664 2.4527c.0343.0802.0229.1949.0114.2522-.0229.1146-.1031.2292-.3324.2292-.2177 0-.3438-.126-.3438-.3095v-.3323H0v.2636c0 .7679.6074.9971 1.2493.9971.6189 0 1.1346-.2178 1.2149-.7794.0458-.298.0114-.4928 0-.5616-.1605-.722-1.467-.9283-1.5588-1.3295-.0114-.0688-.0114-.1375 0-.1834.023-.1146.1032-.2292.3095-.2292.2063 0 .321.126.321.3095v.2063h.8595v-.2407c0-.745-.6762-.8596-1.1576-.8596-.6074 0-1.1117.2063-1.2034.7564-.023.149-.0344.2866.0114.4585.1376.7106 1.364.9169 1.5358 1.3524m11.152 0c.0343.0803.0228.1834.0114.2522-.023.1146-.1032.2292-.3324.2292-.2178 0-.3438-.126-.3438-.3095v-.3323h-.917v.2636c0 .7564.596.9857 1.2379.9857.6189 0 1.1232-.2063 1.2034-.7794.0459-.298.0115-.4814 0-.5616-.1375-.7106-1.4327-.9284-1.5243-1.318-.0115-.0688-.0115-.1376 0-.1835.0229-.1146.1031-.2292.3094-.2292.1948 0 .321.126.321.3095v.2063h.848v-.2407c0-.745-.6647-.8596-1.146-.8596-.6075 0-1.1004.1948-1.192.7564-.023.149-.023.2866.0114.4585.1376.7106 1.341.9054 1.513 1.3524m2.8882.4585c.2407 0 .3094-.1605.3323-.2522.0115-.0343.0115-.0917.0115-.126v-2.533h.871v2.4642c0 .0688 0 .1948-.0114.2292-.0573.6419-.5616.8482-1.192.8482-.6303 0-1.1346-.2063-1.192-.8482 0-.0344-.0114-.1604-.0114-.2292v-2.4642h.871v2.533c0 .0458 0 .0916.0115.126 0 .0917.0688.2522.3095.2522m7.1518-.0344c.2522 0 .3324-.1605.3553-.2522.0115-.0343.0115-.0917.0115-.126v-.4929h-.3553v-.5043H24v.917c0 .0687 0 .1145-.0115.2292-.0573.6303-.596.8481-1.2034.8481-.6075 0-1.1461-.2178-1.2034-.8481-.0115-.1147-.0115-.1605-.0115-.2293v-1.444c0-.0574.0115-.172.0115-.2293.0802-.6419.596-.8482 1.2034-.8482s1.1347.2063 1.2034.8482c.0115.1031.0115.2292.0115.2292v.1146h-.8596v-.1948s0-.0803-.0115-.1261c-.0114-.0802-.0802-.2521-.3438-.2521-.2521 0-.321.1604-.3438.2521-.0115.0458-.0115.1032-.0115.1605v1.5702c0 .0458 0 .0916.0115.126 0 .0917.0917.2522.3323.2522`},child:[]}]})(e)}function Uu(e){return K({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M16.009 13.386c1.577 0 3.86-.326 3.86-2.202a1.765 1.765 0 0 0-.04-.431l-.94-4.08c-.216-.898-.406-1.305-1.982-2.093-1.223-.625-3.888-1.658-4.676-1.658-.733 0-.947.946-1.822.946-.842 0-1.467-.706-2.255-.706-.757 0-1.25.515-1.63 1.576 0 0-1.06 2.99-1.197 3.424a.81.81 0 0 0-.028.245c0 1.162 4.577 4.974 10.71 4.974m4.101-1.435c.218 1.032.218 1.14.218 1.277 0 1.765-1.984 2.745-4.593 2.745-5.895.004-11.06-3.451-11.06-5.734a2.326 2.326 0 0 1 .19-.925C2.746 9.415 0 9.794 0 12.217c0 3.969 9.405 8.861 16.851 8.861 5.71 0 7.149-2.582 7.149-4.62 0-1.605-1.387-3.425-3.887-4.512`},child:[]}]})(e)}function Wu(e){return K({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M23.4 0a.385.385 0 00-.278.125L22.91.35l-.401.182a.711.711 0 00-.417 0 .305.305 0 01-.171 0 1.005 1.005 0 00-.567 0A.936.936 0 0021 .596a.877.877 0 00-.412.337l-.037.048a1.246 1.246 0 00-.898.684 1.07 1.07 0 00-.07.225 1.935 1.935 0 00-.337-.193 2.026 2.026 0 00-2.063.305 2.08 2.08 0 00-.69 2.139c.086.376.23.737.428 1.069.496.776 1.079 1.494 1.737 2.138.526.512.996 1.078 1.401 1.69l.053.096c.396.754.321 1.31-.219 1.647a1.358 1.358 0 01-.572.198 2.491 2.491 0 00-.144-2.07 2.342 2.342 0 00-.3-.406c-.79-.866-1.63-.674-1.962-.449a.385.385 0 00-.15.455l.027.058a.385.385 0 00.38.188 1.07 1.07 0 01.962.582c.23.384.23.862 0 1.246a4.812 4.812 0 01-.534-.535l-.07-.07-.037-.042a3.368 3.368 0 00-1.92-1.208 3.09 3.09 0 00-.406-1.455 4.368 4.368 0 00-1.358-1.48 2.673 2.673 0 00-.267-.16 3.085 3.085 0 00-2.251-2.717 2.7 2.7 0 00-2.968 1.139c-.053.086-.112.171-.165.267a12.26 12.26 0 00-1.038 2.78 11.64 11.64 0 01-.775 2.187l-.059.107c-.213.374-.406.583-.609.647a.406.406 0 01-.374-.064c-.203-.14-.155-.423 0-.973a3.33 3.33 0 00.128-.45c.07-.33-.005-.673-.203-.946a1.07 1.07 0 00-.786-.411c-.49-.018-.94.27-1.128.722l-.08.15a.968.968 0 00-.316-.46.936.936 0 00-.294-.129 1.016 1.016 0 00-.535-.198.342.342 0 01-.17-.053.711.711 0 00-.434-.097l-.326-.256-.144-.278c-.18-.35-.707-.238-.727.155a.385.385 0 00.032.727l.305.075.342.267c.026.14.093.268.192.37.043.04.072.092.086.149.058.184.167.347.315.47a.877.877 0 00.727.465h.06c.262.313.662.477 1.068.439a1.07 1.07 0 00.23-.054 1.935 1.935 0 000 .38 2.026 2.026 0 001.3 1.636 2.08 2.08 0 002.208-.481c.276-.26.51-.562.695-.893.422-.817.75-1.68.978-2.572.179-.711.433-1.401.76-2.058l.058-.096c.454-.722.973-.936 1.535-.637.18.096.338.231.46.396-.714.12-1.34.543-1.717 1.16-.084.146-.152.3-.203.46-.353 1.117.23 1.748.593 1.925.16.077.353.035.466-.102l.037-.053a.385.385 0 000-.423 1.07 1.07 0 010-1.128c.218-.384.627-.62 1.07-.615-.04.245-.1.486-.177.722l-.034.093a3.533 3.533 0 00-.084 2.324 3.09 3.09 0 00-1.07 1.07 4.368 4.368 0 00-.603 1.913 2.674 2.674 0 000 .31 3.085 3.085 0 00-1.23 3.31 2.7 2.7 0 002.47 2h.31a12.26 12.26 0 002.925-.493 11.64 11.64 0 012.283-.422h.117c.304-.037.61.035.866.203.102.09.152.224.134.358 0 .246-.289.348-.855.466a3.33 3.33 0 00-.45.117 1.192 1.192 0 00-.721.647 1.07 1.07 0 00.037.888c.229.435.704.683 1.193.62h.165a.968.968 0 00-.235.502.936.936 0 000 .364c-.019.183.013.368.091.535.03.054.045.115.043.176-.002.151.045.3.133.422l-.058.412-.166.262a.385.385 0 00.497.535c.287.265.74-.016.63-.39l-.085-.3.064-.433a.711.711 0 00.22-.353.305.305 0 01.085-.15c.131-.141.218-.318.252-.508a.936.936 0 00.122-.336.877.877 0 00-.085-.535v-.053c.134-.376.08-.794-.144-1.123a1.07 1.07 0 00-.16-.171c.115-.05.226-.11.33-.182a2.026 2.026 0 00.77-1.94 2.08 2.08 0 00-1.518-1.674 3.71 3.71 0 00-1.123-.155c-.919.043-1.83.19-2.716.438-.697.198-1.414.322-2.138.369h-.112c-.85-.032-1.294-.374-1.316-1.01-.007-.204.031-.407.113-.594.459.559 1.138.89 1.86.909.17 0 .338-.018.503-.054 1.144-.25 1.4-1.069 1.374-1.475a.385.385 0 00-.321-.353h-.064a.385.385 0 00-.353.235 1.07 1.07 0 01-.984.535 1.214 1.214 0 01-1.069-.631c.233-.088.473-.158.716-.209h.155a3.368 3.368 0 002.01-1.069c.449.243.95.372 1.46.374.679.01 1.35-.138 1.962-.433.094-.044.185-.094.273-.15a3.085 3.085 0 003.48-.587 2.7 2.7 0 00.498-3.139 6.884 6.884 0 00-.15-.273 12.259 12.259 0 00-1.887-2.288 11.64 11.64 0 01-1.508-1.764l-.064-.102a1.294 1.294 0 01-.257-.85.406.406 0 01.16-.267c.225-.107.444.08.83.508.1.118.21.228.326.331.25.225.584.334.92.3a1.07 1.07 0 00.748-.476c.263-.416.24-.951-.06-1.342l-.085-.145c.18.035.365.019.535-.048a.936.936 0 00.32-.197c.178-.076.33-.2.44-.359a.342.342 0 01.133-.123.711.711 0 00.3-.326l.384-.155h.31a.385.385 0 00.353-.577l-.005.01a.385.385 0 00-.118-.128A.385.385 0 0023.4 0zm.006.398l-.187.315.347.086-.395.005-.658.262a.262.262 0 01-.171.262c-.316.182-.198.321-.583.487-.08.032-.107.101-.256.176-.15.075-.407-.027-.535 0a.32.32 0 00-.203.535c.085.144.486.679.192 1.112a.711.711 0 01-1.107.102c-.368-.305-.866-1.214-1.577-.877-.71.336-.502 1.128-.085 1.796.882 1.39 2.705 2.673 3.523 4.277 1 2-1.107 4.336-3.673 3.117a2.326 2.326 0 01-.396.24c-1.069.535-2.512.578-3.395-.117-.395.941-1.79 1.182-2.031 1.24-.423.08-.832.22-1.214.418.487 1.614 2.47 1.454 2.908.427 0 0 .054.824-1.069 1.07a2.139 2.139 0 01-2.288-1.16c-.33.346-.507.81-.492 1.288.027.69.46 1.337 1.69 1.385 1.662.064 4.25-1.203 6.014-.669 1.344.335 1.723 2.065.642 2.93a2.732 2.732 0 01-1.23.385c-.182.01-.198.091-.181.145.016.053.117.053.278.053.582-.053 1.208.283.93 1.166-.043.123.155.352.117.534-.053.262-.112.203-.112.289-.07.412-.235.326-.337.679a.257.257 0 01-.203.208l-.101.706.112.38-.182-.321-.251.257.214-.332.101-.7a.262.262 0 01-.16-.267c0-.364-.182-.332-.128-.75.037-.085 0-.042 0-.31.016-.186.23-.341.272-.48.043-.14.054-.45-.369-.45-.198.006-.85.075-1.069-.39a.711.711 0 01.465-1.01c.45-.16 1.497-.123 1.556-.91.059-.785-.727-.999-1.513-.972-1.657.059-3.663 1.01-5.48.903-2.23-.128-3.198-3.133-.861-4.737a2.326 2.326 0 010-.465c.09-1.219.77-2.47 1.812-2.85-.593-.818-.128-2.149-.058-2.384.135-.4.213-.818.23-1.24-1.642-.37-2.497 1.411-1.824 2.304 0 0-.743-.369-.395-1.465a2.139 2.139 0 012.138-1.4 1.786 1.786 0 00-.871-1.07c-.61-.3-1.385-.267-2.043.77-.887 1.411-1.063 4.293-2.427 5.544-.961 1-2.652.463-2.86-.909a2.732 2.732 0 01.278-1.256c.08-.166.032-.214-.038-.23-.07-.016-.123.07-.187.214a.823.823 0 01-1.475.224c-.097-.107-.342.006-.535-.17-.192-.177-.128-.188-.192-.241-.321-.273-.16-.375-.418-.636a.257.257 0 01-.08-.284L.796 7.2.41 7.102h.38l-.102-.347.182.353.534.438a.262.262 0 01.31 0c.321.182.38.01.717.262.07.054.133.027.283.134.15.107.187.374.278.476a.32.32 0 00.572-.096c.086-.193.332-.77.866-.728.457.027.77.47.642.91-.091.47-.652 1.357 0 1.801.652.444 1.235-.134 1.604-.829.775-1.46.957-3.678 1.957-5.202 1.23-1.887 4.309-1.224 4.533 1.604.145.06.283.136.412.225 1.032.69 1.759 1.924 1.567 2.994 1.02-.129 1.919.957 2.09 1.138.28.328.606.612.968.845 1.165-1.23.037-2.865-1.07-2.732 0 0 .69-.46 1.466.39.61.728.666 1.772.139 2.561.465.113.956.034 1.363-.219.583-.353.925-1.07.353-2.138-.776-1.476-3.187-3.075-3.588-4.876-.384-1.333.928-2.528 2.219-2.021.38.21.705.51.946.871.102.155.166.134.214.086.048-.048-.005-.14-.096-.268a.823.823 0 01.534-1.39c.145-.027.161-.289.418-.374.256-.086.23-.016.31-.048.395-.15.406.043.759-.048.1-.038.212-.01.283.07l.68-.263zm-10.297 6.26c-.065.53-.348 1.647-.187 2.332.155.871.823.823 1.069.395.163-.332.2-.711.107-1.069a3.106 3.106 0 00-.984-1.636zm.256.872c.17.262.293.551.364.856a1.3 1.3 0 010 .759c-.086.187-.332.187-.423-.23-.04-.462-.02-.928.06-1.385zm1.727 2.661c-.517.012-.67.472-.47.82.207.31.521.534.882.63a3.106 3.106 0 001.908-.037c-.422-.32-1.25-1.123-1.903-1.342a1.255 1.255 0 00-.417-.07zm.088.401a.807.807 0 01.201.04c.429.197.83.45 1.192.753a2.82 2.82 0 01-.962-.107 1.3 1.3 0 01-.642-.396c-.095-.134-.036-.3.21-.29zm-2.285.183a1.54 1.54 0 00-.984.45 3.106 3.106 0 00-.936 1.673c.535-.203 1.604-.519 2.139-.973.663-.588.251-1.166-.22-1.15zm-.025.341c.188.008.276.217-.04.488a5.39 5.39 0 01-1.234.631c.134-.277.315-.528.534-.743a1.3 1.3 0 01.7-.374.284.284 0 01.04-.002z`},child:[]}]})(e)}function Gu(e){return K({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`m19.8955 10.8961-.1726-.3028c.0068-2.1746-1.0022-3.061-2.1788-3.7348.356-.0938.7237-.1711.8245-.6182.6118-.1566.7397-.4398.8011-.7398.16-.1066.6955-.4061.6394-.9211.2998-.2069.4669-.4725.3819-.8487.3222-.3515.407-.6419.2702-.9096.3868-.4805.2152-.7295.05-.9817.2897-.5254.0341-1.0887-.7758-.9944-.3221-.4733-1.0244-.3659-1.133-.3637-.1215-.1519-.2819-.2821-.7755-.219-.3197-.2851-.6771-.2364-1.0458-.0964-.4378-.3403-.7275-.0675-1.0584.0356-.53-.1706-.6513.0631-.9117.1583-.5781-.1203-.7538.1416-1.0309.4182l-.3224-.0063c-.8719.5061-1.305 1.5366-1.4585 2.0664-.1536-.5299-.5858-1.5604-1.4575-2.0664l-.3223.0063C9.942.5014 9.7663.2394 9.1883.3597 8.9279.2646 8.807.0309 8.2766.2015c-.2172-.0677-.417-.2084-.6522-.2012l.0004.0002C7.5017.0041 7.369.049 7.2185.166c-.3688-.1401-.7262-.1887-1.0459.0964-.4936-.0631-.654.0671-.7756.219C5.2887.4791 4.5862.3717 4.264.845c-.8096-.0943-1.0655.4691-.7756.9944-.1653.2521-.3366.5013.05.9819-.1367.2677-.0519.5581.2703.9096-.085.3763.0822.6418.3819.8487-.0561.515.4795.8144.6394.9211.0614.3001.1894.5832.8011.7398.1008.4472.4685.5244.8245.6183-1.1766.6737-2.1856 1.56-2.1788 3.7348l-.1724.3028c-1.3491.8082-2.5629 3.4056-.6648 5.5167.124.6609.3319 1.1355.5171 1.6609.2769 2.117 2.0841 3.1082 2.5608 3.2255.6984.524 1.4423 1.0212 2.449 1.3696.949.964 1.977 1.3314 3.0107 1.3308.0152 0 .0306.0002.0457 0 1.0337.0006 2.0618-.3668 3.0107-1.3308 1.0067-.3483 1.7506-.8456 2.4491-1.3696.4766-.1173 2.2838-1.1085 2.5607-3.2255.1851-.5253.3931-1 .517-1.6609 1.8981-2.1113.6843-4.7089-.6649-5.517zm-1.0386-.3715c-.0704.8759-4.6354-3.0504-3.8472-3.1808 2.1391-.3558 3.9191.896 3.8472 3.1808zm-2.0155 4.3649c-1.1481.7409-2.8025.2626-3.6953-1.0681-.8928-1.3306-.6858-3.0101.4623-3.7509 1.1481-.7409 2.8025-.2627 3.6953 1.068.8927 1.3307.6858 3.0101-.4623 3.751zM13.6591 1.3721c.0396.1967.0843.321.1354.3577.2537-.272.4611-.5506.7878-.8123.0011.1537-.0776.3205.1169.4425.1752-.2356.4119-.4459.7263-.6244-.1514.2611-.026.3404.0554.4486.24-.2059.4681-.4144.9109-.5759-.121.1474-.2902.2914-.1108.4607.2473-.1544.496-.3086 1.0833-.4183-.1323.1475-.4059.295-.2401.4426.3104-.1186.6539-.2047 1.034-.2546-.182.1496-.3337.2963-.1846.4122.3323-.1022.7899-.2398 1.2372-.1212l-.2832.2849c-.0314.0382.6623.0297 1.1202.0364-.167.2321-.3375.4562-.437.8548.0454.0459.2723.0204.4862 0-.2194.4618-.6004.5783-.6893.776.134.1015.32.075.5232.006-.158.3254-.4892.5484-.7509.8123.0662.047.1818.075.4555.0425-.2418.257-.5339.492-.8802.7032.0614.0708.2722.0681.4678.0727-.3136.3069-.7173.466-1.0955.6668.1885.1288.3234.0988.4678.097-.2676.2198-.7225.3342-1.1448.4668.0803.1249.1607.1589.3324.194-.447.2473-1.0873.1343-1.2679.2607.0435.1243.1665.2053.3139.2728-.7197.0418-2.6879-.0262-3.0652-1.5156.7367-.8094 2.0813-1.7593 4.394-2.934-1.7994.6022-3.4229 1.405-4.7817 2.5096-1.5978-.7436-.4965-2.6197.283-3.3645zm-1.6126 5.3718c1.1329-.0123 2.5356.8325 2.53 1.6286-.005.7027-.9851 1.2715-2.5213 1.2607-1.5043-.0177-2.5172-.7148-2.5137-1.3957.003-.5603 1.2282-1.5263 2.505-1.4936zm-5.7646-.6006c.1717-.0351.252-.0692.3323-.194-.4223-.1327-.8772-.247-1.1448-.4668.1444.0018.2792.0318.4678-.097-.3783-.2008-.782-.3599-1.0956-.6668.1955-.0048.4064-.002.4677-.0728-.3462-.2113-.6383-.4463-.8801-.7033.2738.0325.3893.0045.4555-.0425-.2617-.264-.593-.487-.7509-.8123.2032.069.3892.0954.5232-.006-.089-.1977-.47-.3142-.6894-.776.214.0204.4409.0459.4863 0-.0994-.3985-.2698-.6226-.4369-.8547.4579-.0067 1.1516.0018 1.1202-.0364l-.2831-.2849c.4472-.1186.9049.019 1.2371.1213.1492-.1159-.0026-.2626-.1847-.4123.3801.05.7236.1361 1.034.2547.1659-.1476-.1076-.2951-.24-.4426.5872.1097.8361.2639 1.0833.4183.1794-.1694.0103-.3133-.1108-.4607.4428.1615.6709.37.911.5759.0814-.1082.2068-.1875.0554-.4486.3143.1785.5511.3888.7263.6244.1945-.122.1159-.2888.1169-.4426.3267.2618.534.5404.7879.8124.0511-.0366.0959-.161.1354-.3577.7794.7448 1.8807 2.6208.2831 3.3646-1.3589-1.1039-2.9817-1.9064-4.78-2.5086 2.3115 1.174 3.6556 2.1239 4.392 2.9328-.3773 1.4895-2.3455 1.5575-3.0651 1.5157.1473-.0676.2703-.1485.3139-.2728-.1806-.1264-.8209-.0134-1.2679-.2607zm2.8175 1.1334c.7881.1304-3.7769 4.0567-3.8472 3.1809-.0719-2.2846 1.7079-3.5367 3.8472-3.1809zm-4.847 8.7567c-1.1094-.8789-1.4668-3.4529.5901-4.6097 1.2394-.3273.4184 5.051-.5901 4.6097zm4.2656 4.5989c-.6257.3719-2.1452.2187-3.2252-1.3095-.7283-1.2823-.6345-2.5872-.123-2.9705.7648-.4589 1.9464.1609 2.8559 1.2003.7923.9405 1.1536 2.5927.4923 3.0797zm-1.2415-5.6086c-1.1481-.7409-1.3551-2.4203-.4623-3.7511.8928-1.3307 2.5472-1.8089 3.6952-1.068 1.1481.7409 1.3551 2.4203.4623 3.7509-.8926 1.3308-2.5471 1.809-3.6952 1.0682zm4.7948 8.2279c-1.3763.0584-2.7258-1.1105-2.7081-1.5157-.0206-.594 1.6758-1.0578 2.782-1.0306 1.1131-.0479 2.6068.3531 2.6097.8851.0184.5166-1.3547 1.6838-2.6836 1.6612zm2.7584-5.8578c.0081 1.3899-1.226 2.5225-2.7562 2.5299-1.5302.0073-2.7773-1.1135-2.7854-2.5033v-.0265c-.008-1.3899 1.2259-2.5226 2.7562-2.5299 1.5302-.0073 2.7773 1.1134 2.7853 2.5033a.7794.7794 0 0 1 .0001.0265zm3.855 2.0029c-1.186 1.6208-2.7916 1.684-3.3896 1.2325-.6255-.5811-.148-2.3854.7094-3.3747v-.0003c.9812-1.0912 2.0302-1.8037 2.7609-1.2469.4919.4828.7805 2.3008-.0807 3.3894zm1.0724-3.4301c-1.0086.4413-1.8298-4.9372-.5901-4.61 2.0568 1.1569 1.6994 3.731.5901 4.61zm-.0256-8.3279h.2985v-.5304h.2986c.1502 0 .2053.0624.2262.2052.0152.1088.0113.2395.0477.3253h.2984c-.0533-.0763-.0515-.2358-.0571-.3213-.0097-.1373-.0513-.2796-.1977-.3176v-.0037c.1502-.061.2149-.1807.2149-.341 0-.2048-.1539-.3738-.3974-.3738h-.732v1.3573zm.2985-1.1255h.3269c.1333 0 .2054.0573.2054.188 0 .1369-.0721.1942-.2054.1942H20.03v-.3822zm-1.0337.4633c0 .7009.5682 1.2694 1.2695 1.2694s1.2695-.5684 1.2695-1.2694c0-.7013-.5683-1.2697-1.2695-1.2697-.7013 0-1.2695.5684-1.2695 1.2697zm2.3275 0c0 .5845-.4737 1.058-1.058 1.058s-1.058-.4735-1.058-1.058c0-.5849.4737-1.058 1.058-1.058s1.058.4731 1.058 1.058z`},child:[]}]})(e)}function Ku(e){return K({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M12 0C6.22933 0 1.5761 4.48645 1.5761 10.47394c0 6.00417 4.65323 10.47394 10.4239 10.47394.98402 0 1.93468-.13343 2.8353-.3836l1.13412 2.9187c.11675.31688.35025.51702.7672.51702h1.80125c.43364 0 .75052-.28353.55038-.83391l-1.46768-3.81932c2.88534-1.81793 4.80333-5.03683 4.80333-8.8895C22.4239 4.48644 17.77067 0 12 0m4.53648 16.5615l-1.31758-3.41904c-.11675-.28353-.35024-.55038-.85059-.55038h-1.71786c-.43363 0-.7672.28353-.56706.83391l1.73454 4.48645c-.56706.1501-1.18416.21682-1.81793.21682-4.2196 0-7.22168-3.31897-7.22168-7.65532C4.77832 6.1376 7.7804 2.81862 12 2.81862s7.22168 3.31898 7.22168 7.65532c0 2.5351-1.01737 4.70327-2.6852 6.08756`},child:[]}]})(e)}function qu(e){return K({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M4.928 1.825c-1.09.553-1.09.64-.07 1.78 5.655 6.295 7.004 7.782 7.107 7.782.139.017 7.971-8.542 8.058-8.801.034-.07-.208-.312-.519-.536-.415-.312-.864-.433-1.712-.467-1.59-.104-2.144.242-4.115 2.455-.899 1.003-1.66 1.833-1.66 1.833-.017 0-.76-.813-1.642-1.798S8.473 2.1 8.127 1.91c-.796-.45-2.421-.484-3.2-.086zM1.297 4.367C.45 4.695 0 5.007 0 5.248c0 .121 1.331 1.678 2.94 3.459 1.625 1.78 2.939 3.268 2.939 3.302 0 .035-1.331 1.522-2.94 3.303C1.314 17.11.017 18.683.035 18.822c.086.467 1.504 1.055 2.541 1.055 1.678-.018 2.058-.312 5.603-4.202 1.78-1.954 3.233-3.614 3.233-3.666 0-.069-1.435-1.694-3.199-3.63-2.3-2.508-3.423-3.632-3.96-3.874-.812-.398-2.126-.467-2.956-.138zm18.467.12c-.502.26-1.764 1.505-3.943 3.891-1.763 1.937-3.199 3.562-3.199 3.631 0 .07 1.453 1.712 3.234 3.666 3.544 3.89 3.925 4.184 5.602 4.202 1.038 0 2.455-.588 2.542-1.055.017-.156-1.28-1.712-2.905-3.493-1.608-1.78-2.94-3.285-2.94-3.32 0-.034 1.332-1.539 2.94-3.32C22.72 6.91 24.017 5.352 24 5.214c-.087-.45-1.366-.968-2.473-1.038-.795-.034-1.21.035-1.763.312zM7.954 16.973c-2.144 2.369-3.908 4.374-3.943 4.46-.034.07.208.312.52.537.414.311.864.432 1.711.467 1.574.103 2.161-.26 4.15-2.508.864-.968 1.608-1.78 1.625-1.78s.761.812 1.643 1.798c2.023 2.248 2.559 2.576 4.132 2.49.848-.035 1.297-.156 1.712-.467.311-.225.553-.467.519-.536-.087-.26-7.92-8.819-8.058-8.801-.069 0-1.867 1.954-4.011 4.34z`},child:[]}]})(e)}function Ju(e){return K({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M12 0C5.372 0 0 5.373 0 12c0 6.628 5.372 12 12 12 6.627 0 12-5.372 12-12 0-6.627-5.373-12-12-12ZM9.64 2.918c1.091-.026 1.548.229 2.182.635a4.459 4.459 0 0 1 1.902 2.764c.254 1.141.178 2.029-.127 2.664v.05c-.609 1.294-1.622 2.335-3.043 2.842l1.217 3.172c.228.583.432 1.192.254 1.75-.177.558-.989.736-1.572.127-1.116-1.192-4.871-8.702-5.15-9.26-.279-.558-.584-1.016-.584-1.574.026-.837 1.318-1.7 1.953-2.131.634-.431 1.877-1.014 2.968-1.039Zm-.996 2.311c-.789.022-.358 1.669-.197 2.129.178.507.661 1.572 1.193 2.105.127.127.254.229.407.254.152.027.457-.127.584-.33a.932.932 0 0 0 .15-.559 3.232 3.232 0 0 0-.049-1.216c-.228-.787-.711-1.548-1.346-2.055-.127-.102-.279-.229-.457-.279a.901.901 0 0 0-.285-.049Zm8.414 2.027a2.283 2.283 0 0 1 1.588.636c.305.279.33.582.229.963-.102.38-.457 1.194-.736 1.777l-.709 1.344c-1.37 2.435-1.649 2.689-2.03 2.537-.456-.178-.304-2.614.127-5.582.127-.812.329-1.217.557-1.42.171-.152.6-.248.975-.254l-.001-.001Zm-1.859 8.332c.554.011.789.7.656 1.232a.861.861 0 0 1-.379.559c-.203.127-.685.127-.965-.102-.278-.228-.33-.609-.254-.914.076-.304.331-.635.686-.736a.757.757 0 0 1 .256-.039Zm-8.604 2.805h10.809c.52 0 .938.419.938.939v.074c0 .52-.418.94-.938.94H6.595a.936.936 0 0 1-.937-.94v-.074c0-.52.417-.939.937-.939Z`},child:[]}]})(e)}function Yu(e){return K({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M10.724 0a12 12 0 0 0-9.448 4.623c1.464.391 2.5.727 2.81.832.005-.19.037-1.893.037-1.893s.004-.04.025-.06c.026-.026.065-.018.065-.018.385.056 8.602 1.274 12.066 3.292.427.25.638.517.902.786.958.99 2.223 5.108 2.359 5.957.005.033-.036.07-.054.083a5.177 5.177 0 0 1-.313.228c-.82.55-2.708 1.872-5.13 1.656-2.176-.193-5.018-1.44-8.445-3.699.336.79.668 1.58 1 2.371.497.258 5.287 2.7 7.651 2.651 1.904-.04 3.941-.968 4.756-1.458 0 0 .179-.108.257-.048.085.066.061.167.041.27-.05.234-.164.66-.242.863l-.065.165c-.093.25-.183.482-.356.625-.48.436-1.246.784-2.446 1.305-1.855.812-4.865 1.328-7.66 1.31-1.001-.022-1.968-.133-2.817-.232-1.743-.197-3.161-.357-4.026.269A12 12 0 0 0 10.724 24a12 12 0 0 0 12-12 12 12 0 0 0-12-12zM13.4 6.963a3.503 3.503 0 0 0-2.521.942 3.498 3.498 0 0 0-1.114 2.449 3.528 3.528 0 0 0 3.39 3.64 3.48 3.48 0 0 0 2.524-.946 3.504 3.504 0 0 0 1.114-2.446 3.527 3.527 0 0 0-3.393-3.64zm-.03 1.035a2.458 2.458 0 0 1 2.368 2.539 2.43 2.43 0 0 1-.774 1.706 2.456 2.456 0 0 1-1.762.659 2.461 2.461 0 0 1-2.364-2.542c.02-.655.3-1.26.777-1.707a2.419 2.419 0 0 1 1.756-.655zm.402 1.23c-.602 0-1.087.325-1.087.727 0 .4.485.725 1.087.725.6 0 1.088-.326 1.088-.725 0-.402-.487-.726-1.088-.726Z`},child:[]}]})(e)}function Xu(e){return K({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M8.948 8.798v-1.43a6.7 6.7 0 0 1 .424-.018c3.922-.124 6.493 3.374 6.493 3.374s-2.774 3.851-5.75 3.851c-.398 0-.787-.062-1.158-.185v-4.346c1.528.185 1.837.857 2.747 2.385l2.04-1.714s-1.492-1.952-4-1.952a6.016 6.016 0 0 0-.796.035m0-4.735v2.138l.424-.027c5.45-.185 9.01 4.47 9.01 4.47s-4.08 4.964-8.33 4.964c-.37 0-.733-.035-1.095-.097v1.325c.3.035.61.062.91.062 3.957 0 6.82-2.023 9.593-4.408.459.371 2.34 1.263 2.73 1.652-2.633 2.208-8.772 3.984-12.253 3.984-.335 0-.653-.018-.971-.053v1.864H24V4.063zm0 10.326v1.131c-3.657-.654-4.673-4.46-4.673-4.46s1.758-1.944 4.673-2.262v1.237H8.94c-1.528-.186-2.73 1.245-2.73 1.245s.68 2.412 2.739 3.11M2.456 10.9s2.164-3.197 6.5-3.533V6.201C4.153 6.59 0 10.653 0 10.653s2.35 6.802 8.948 7.42v-1.237c-4.84-.6-6.492-5.936-6.492-5.936z`},child:[]}]})(e)}function Zu(e){return K({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M7.352 1.592l-1.364.002L5.32 2.75l1.557 2.713-3.137-.008-1.32 2.34H14.11l-1.353-2.332-3.192-.006-2.214-3.865zm6.175 0l-2.687.025 5.846 10.127 1.341-2.34-1.59-2.765 2.24-3.85-.683-1.182h-1.336l-1.57 2.705-1.56-2.72zm6.887 4.195l-5.846 10.125 2.696-.008 1.601-2.76 4.453.016.682-1.183-.666-1.157-3.13-.008L21.778 8.1l-1.365-2.313zM9.432 8.086l-2.696.008-1.601 2.76-4.453-.016L0 12.02l.666 1.157 3.13.008-1.575 2.71 1.365 2.315L9.432 8.086zM7.33 12.25l-.006.01-.002-.004-1.342 2.34 1.59 2.765-2.24 3.85.684 1.182H7.35l.004-.006h.001l1.567-2.698 1.558 2.72 2.688-.026-.004-.006h.01L7.33 12.25zm2.55 3.93l1.354 2.332 3.192.006 2.215 3.865 1.363-.002.668-1.156-1.557-2.713 3.137.008 1.32-2.34H9.881Z`},child:[]}]})(e)}function Qu(e){return K({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`m15.215 10.794 3.78 2.416h-2.663l-3.78-2.416h2.663zM5.656 8.518l-.438 1.626-.175.65-.652 2.416-.175.65-.437 1.622h1.869l.437-1.622.175-.65.651-2.416.175-.65.438-1.626H5.656zm6.06 5.342-.437 1.622h4.947l2.543-1.622h-7.053zm3.556-5.342-2.548 1.626h7.086l.438-1.626h-4.976zm6.86 0-.438 1.626-.175.65-.651 2.416-.175.65-.437 1.622h1.869l.437-1.622.175-.65.651-2.416.175-.65L24 8.518h-1.868zm-20.255 0-.438 1.626-.175.65-.651 2.416-.175.65L0 15.482h1.869l.437-1.622.175-.65.651-2.416.175-.65.438-1.626H1.877zm7.536 0-.438 1.626-.175.65-.651 2.416-.175.65-.437 1.622h1.869l.437-1.622.175-.65.651-2.416.175-.65.438-1.626H9.413z`},child:[]}]})(e)}function $u(e){return K({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M2.182 0A2.177 2.177 0 0 0 0 2.182v19.636C0 23.027.973 24 2.182 24h4.363V6.545h8.728V0Zm15.273 0v24h4.363A2.177 2.177 0 0 0 24 21.818V2.182A2.177 2.177 0 0 0 21.818 0ZM8.727 8.727V24h6.546V8.727Z`},child:[]}]})(e)}function ed(e){return K({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M5.438 5.906v8.438c0 2.06 1.69 3.75 3.75 3.75h5.625c2.06 0 3.75-1.69 3.75-3.75V9.656a2.827 2.827 0 0 0-2.813-2.812 2.8 2.8 0 0 0-1.875.737A2.8 2.8 0 0 0 12 6.844a2.827 2.827 0 0 0-2.812 2.812v4.688h1.875V9.656c0-.529.408-.937.937-.937s.938.408.938.937v4.688h1.875V9.656c0-.529.408-.937.937-.937s.938.408.938.937v4.688a1.86 1.86 0 0 1-1.875 1.875H9.188a1.86 1.86 0 0 1-1.875-1.875V5.906ZM12 0C5.384 0 0 5.384 0 12s5.384 12 12 12 12-5.384 12-12S18.616 0 12 0m0 1.875A10.11 10.11 0 0 1 22.125 12 10.11 10.11 0 0 1 12 22.125 10.11 10.11 0 0 1 1.875 12 10.11 10.11 0 0 1 12 1.875`},child:[]}]})(e)}function q(e){return K({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M21.044 12.288c0 .5-.343.867-.815.867-.464 0-.827-.38-.827-.867 0-.51.343-.868.815-.868.464 0 .827.381.827.868zm-14.305-.92a.787.787 0 0 0-.651.307.991.991 0 0 0-.172.738l1.479-.614a.708.708 0 0 0-.656-.43zm6.963.052c-.472 0-.816.358-.816.868 0 .486.364.867.828.867.472 0 .815-.368.815-.867 0-.487-.363-.868-.827-.868zM24 7.997v8.006H0V7.997h24zM5.01 13.05H3.088V9.825H2.23v4.003h2.78v-.777zm1.137-.094l2.163-.897a1.667 1.667 0 0 0-.37-.86c-.284-.33-.704-.505-1.216-.505-.931 0-1.633.686-1.633 1.593 0 .93.704 1.593 1.726 1.593.572 0 1.158-.272 1.432-.589l-.535-.411c-.357.264-.56.326-.885.326-.292 0-.52-.09-.682-.25zm5.57-1.039c0-.709-.507-1.223-1.252-1.223a1.28 1.28 0 0 0-1.005.494v-.442h-.846v3.081h.846v-1.753c0-.316.245-.651.698-.651.35 0 .712.243.712.651v1.753h.847v-1.91zm3.647.37c0-.904-.725-1.593-1.65-1.593-.933 0-1.663.7-1.663 1.593 0 .903.726 1.592 1.651 1.592.932 0 1.662-.7 1.662-1.592zm2.066 1.54l1.268-3.081h-.967l-.765 2.099-.765-2.1h-.966l1.268 3.081h.927zm4.449-1.54c0-.904-.725-1.593-1.65-1.593-.932 0-1.662.7-1.662 1.593 0 .903.725 1.592 1.65 1.592.932 0 1.662-.7 1.662-1.592z`},child:[]}]})(e)}function J(e){return K({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M12.778 5.943s-1.97-.13-5.327.92c-3.42 1.07-5.36 2.587-5.36 2.587s5.098-2.847 10.852-3.008zm7.351 3.095l.257-.017s-1.468-1.78-4.278-2.648c1.58.642 2.954 1.493 4.021 2.665zm.42.74c.039-.068.166.217.263.337.004.024.01.039-.045.027-.005-.025-.013-.032-.013-.032s-.135-.08-.177-.137c-.041-.057-.049-.157-.028-.195zm3.448 8.479s.312-3.578-5.31-4.403a18.277 18.277 0 0 0-2.524-.187c-4.506.06-4.67-5.197-1.275-5.462 1.407-.116 3.087.643 4.73 1.408-.007.204.002.385.136.552.134.168.648.35.813.445.164.094.691.43 1.014.85.07-.131.654-.512.654-.512s-.14.003-.465-.119c-.326-.122-.713-.49-.722-.511-.01-.022-.015-.055.06-.07.059-.049-.072-.207-.13-.265-.058-.058-.445-.716-.454-.73-.009-.016-.012-.031-.04-.05-.085-.027-.46.04-.46.04s-.575-.283-.774-.893c.003.107-.099.224 0 .469-.3-.127-.558-.344-.762-.88-.12.305 0 .499 0 .499s-.707-.198-.82-.85c-.124.293 0 .469 0 .469s-1.153-.602-3.069-.61c-1.283-.118-1.55-2.374-1.43-2.754 0 0-1.85-.975-5.493-1.406-3.642-.43-6.628-.065-6.628-.065s6.45-.31 11.617 1.783c.176.785.704 2.094.989 2.723-.815.563-1.733 1.092-1.876 2.97-.143 1.878 1.472 3.53 3.474 3.58 1.9.102 3.214.116 4.806.942 1.52.84 2.766 3.4 2.89 5.703.132-1.709-.509-5.383-3.5-6.498 4.181.732 4.549 3.832 4.549 3.832zM12.68 5.663l-.15-.485s-2.484-.441-5.822-.204C3.37 5.211 0 6.38 0 6.38s6.896-1.735 12.68-.717Z`},child:[]}]})(e)}function td(e){return K({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M20.42 7.345v9.18h1.651v-9.18zM0 7.475v1.737h1.737V7.474zm9.78.352v6.053c0 .513.044.945.13 1.292.087.34.235.618.44.828.203.21.475.359.803.451.334.093.754.136 1.255.136h.216v-1.533c-.24 0-.445-.012-.593-.037a.672.672 0 0 1-.39-.173.693.693 0 0 1-.173-.377 4.002 4.002 0 0 1-.037-.606v-2.182h1.193v-1.416h-1.193V7.827zm-3.505 2.312c-.396 0-.76.08-1.082.241-.327.161-.6.384-.822.668l-.087.117v-.902H2.658v6.256h1.639v-3.214c.018-.588.16-1.02.433-1.299.29-.297.642-.445 1.044-.445.476 0 .841.149 1.082.433.235.284.359.686.359 1.2v3.324h1.663V12.97c.006-.89-.229-1.595-.686-2.09-.458-.495-1.1-.742-1.917-.742zm10.065.006a3.252 3.252 0 0 0-2.306.946c-.29.29-.525.637-.692 1.033a3.145 3.145 0 0 0-.254 1.273c0 .452.08.878.241 1.274.161.395.39.742.674 1.032.284.29.637.526 1.045.693.408.173.86.26 1.342.26 1.397 0 2.262-.637 2.782-1.23l-1.187-.904c-.248.297-.841.699-1.583.699-.464 0-.847-.105-1.138-.321a1.588 1.588 0 0 1-.593-.872l-.019-.056h4.915v-.587c0-.451-.08-.872-.235-1.267a3.393 3.393 0 0 0-.661-1.033 3.013 3.013 0 0 0-1.02-.692 3.345 3.345 0 0 0-1.311-.248zm-16.297.118v6.256h1.651v-6.256zm16.278 1.286c1.132 0 1.664.797 1.664 1.255l-3.32.006c0-.458.525-1.255 1.656-1.261zm7.073 3.814a.606.606 0 0 0-.606.606.606.606 0 0 0 .606.606.606.606 0 0 0 .606-.606.606.606 0 0 0-.606-.606zm-.008.105a.5.5 0 0 1 .002 0 .5.5 0 0 1 .5.501.5.5 0 0 1-.5.5.5.5 0 0 1-.5-.5.5.5 0 0 1 .498-.5zm-.233.155v.699h.13v-.285h.093l.173.285h.136l-.18-.297a.191.191 0 0 0 .118-.056c.03-.03.05-.074.05-.136 0-.068-.02-.117-.063-.154-.037-.038-.105-.056-.185-.056zm.13.099h.154c.019 0 .037.006.056.012a.064.064 0 0 1 .037.031c.013.013.012.031.012.056a.124.124 0 0 1-.012.055.164.164 0 0 1-.037.031c-.019.006-.037.013-.056.013h-.154Z`},child:[]}]})(e)}function nd(e){return K({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M3.67 6.14S1.82 7.91 1.72 9.78v.35c.08 1.51 1.22 2.4 1.22 2.4 1.83 1.79 6.26 4.04 7.3 4.55 0 0 .06.03.1-.01l.02-.04v-.04C7.52 10.8 3.67 6.14 3.67 6.14zM9.65 18.6c-.02-.08-.1-.08-.1-.08l-7.38.26c.8 1.43 2.15 2.53 3.56 2.2.96-.25 3.16-1.78 3.88-2.3.06-.05.04-.09.04-.09zm.08-.78C6.49 15.63.21 12.28.21 12.28c-.15.46-.2.9-.21 1.3v.07c0 1.07.4 1.82.4 1.82.8 1.69 2.34 2.2 2.34 2.2.7.3 1.4.31 1.4.31.12.02 4.4 0 5.54 0 .05 0 .08-.05.08-.05v-.06c0-.03-.03-.05-.03-.05zM9.06 3.19a3.42 3.42 0 00-2.57 3.15v.41c.03.6.16 1.05.16 1.05.66 2.9 3.86 7.65 4.55 8.65.05.05.1.03.1.03a.1.1 0 00.06-.1c1.06-10.6-1.11-13.42-1.11-13.42-.32.02-1.19.23-1.19.23zm8.299 2.27s-.49-1.8-2.44-2.28c0 0-.57-.14-1.17-.22 0 0-2.18 2.81-1.12 13.43.01.07.06.08.06.08.07.03.1-.03.1-.03.72-1.03 3.9-5.76 4.55-8.64 0 0 .36-1.4.02-2.34zm-2.92 13.07s-.07 0-.09.05c0 0-.01.07.03.1.7.51 2.85 2 3.88 2.3 0 0 .16.05.43.06h.14c.69-.02 1.9-.37 3-2.26l-7.4-.25zm7.83-8.41c.14-2.06-1.94-3.97-1.94-3.98 0 0-3.85 4.66-6.67 10.8 0 0-.03.08.02.13l.04.01h.06c1.06-.53 5.46-2.77 7.28-4.54 0 0 1.15-.93 1.21-2.42zm1.52 2.14s-6.28 3.37-9.52 5.55c0 0-.05.04-.03.11 0 0 .03.06.07.06 1.16 0 5.56 0 5.67-.02 0 0 .57-.02 1.27-.29 0 0 1.56-.5 2.37-2.27 0 0 .73-1.45.17-3.14z`},child:[]}]})(e)}function rd(e){return K({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M12.0069 24h-.3572l2.459-6.7453h3.3796c.5907 0 1.2364-.4533 1.4424-1.0166l2.6652-7.3085c.4396-1.1952-.2473-2.1706-1.525-2.1706h-4.6983l-3.929 10.798-2.2255 6.127C3.929 22.434 0 17.6806 0 12.007 0 6.498 3.7092 1.8546 8.7647.4396L6.4705 6.759 2.6514 17.2547h2.5415L8.4488 8.339h1.9095l-3.2558 8.9158H9.644l3.0223-8.3251c.4396-1.1952-.2473-2.1706-1.525-2.1706h-2.143l2.459-6.7453C11.636 0 11.8145 0 11.9931 0 18.6285 0 24 5.3715 24 12.007c.0137 6.6216-5.3578 11.993-11.9931 11.993zM19.2742 8.325h-1.9096l-2.6789 7.336h1.9096l2.6789-7.336z`},child:[]}]})(e)}function id(e){return K({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M0 0v24h24V0H0zm4.602 4.025h2.244c.509 0 .716.215.716.717v5.64h8.883v-5.64c0-.509.215-.717.717-.717h2.229c.5 0 .71.23.724.717v14.516c0 .509-.215.717-.717.717h-2.23c-.51 0-.717-.215-.717-.717v-5.735H7.562v5.735c0 .516-.215.717-.716.717H4.602c-.51 0-.717-.208-.717-.717V4.742c0-.509.207-.717.717-.717z`},child:[]}]})(e)}function ad(e){return K({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M9.94 0a7.31 7.31 0 00-1.26.116c-4.344.795-7.4 4.555-7.661 7.031-.126 1.215.53 2.125.89 2.526.977 1.085 2.924 1.914 4.175 2.601-1.81 1.543-2.64 2.296-3.457 3.154C1.403 16.712.543 18.125.54 19.138c0 .325-.053 1.365.371 2.187.16.309.613 1.338 1.98 2.109.874.494 2.119.675 3.337.501 3.772-.538 8.823-3.737 12.427-6.716 2.297-1.9 3.977-3.739 4.462-4.644.39-.731.434-2.043.207-2.866-.645-2.337-5.887-7.125-10.172-9.051A7.824 7.824 0 009.94 0zm-.008.068a7.4 7.4 0 013.344.755c3.46 1.7 9.308 6.482 9.739 8.886.534 2.972-9.931 11.017-16.297 12.272-2.47.485-4.576.618-5.537-1.99-.832-2.262.783-3.916 3.16-6.09a92.546 92.546 0 012.96-2.576c.065-.069-5.706-2.059-5.89-4.343C1.221 4.634 4.938.3 9.697.076c.08-.004.157-.007.235-.008zm-.112.52a5.647 5.647 0 00-.506.032c-2.337.245-2.785.547-4.903 2.149-.71.537-2.016 1.844-2.35 3.393-.128.59.024 1.1.448 1.458 1.36 1.144 3.639 2.072 5.509 2.97.547.263.185.74-.698 1.505-2.227 1.928-5.24 4.276-5.45 6.066-.099.842.19 1.988 1.213 2.574 1.195.685 3.676.238 5.333-.379 2.422-.902 5.602-2.892 8.127-4.848 2.625-2.034 5.067-4.617 5.188-5.038.148-.517.133-.996-.154-1.546-.448-.862-1.049-1.503-1.694-2.22-1.732-1.825-3.563-3.43-5.754-4.658C12.694 1.242 11.417.564 9.82.588zm1.075 3.623c.546 0 1.176.173 1.853.5 1.688.817 3.422 2.961-.015 4.195-.935.336-3.9-.824-3.81-2.407.09-1.57.854-2.289 1.972-2.288zm.285 1.367c-.317-.002-.575.079-.694.263-.557.861-.303 1.472.212 1.862.192-.457 2.156.043 2.148.472a.32.32 0 00.055-.032c1.704-1.282-.472-2.557-1.72-2.565z`},child:[]}]})(e)}function od(e){return K({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M10.24 3.179C6.82 6.579 3.366 10.064 0 13.465c2.4 2.406 4.889 4.898 7.319 7.332l7.504.024 6.334-6.316-13.754-.012-1.525 1.54 11.512.024-3.198 3.197H7.956L2.172 13.47l8.74-8.74h6.284l4.815 4.815-7.501-.01v-2.12l-3.68 3.68c3.873.004 7.746.003 11.62 0v2.102l1.55-1.55-.003-2.306-6.16-6.159z`},child:[]}]})(e)}function sd(e){return K({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M23.682 2.406c-.001-.149-.097-.187-.24-.189h-.25v.659h.108v-.282h.102l.17.282h.122l-.184-.29c.102-.012.175-.065.172-.18zm-.382.096v-.193h.13c.06-.002.145.011.143.089.005.09-.08.107-.153.103h-.12zM21.851 1.49c1.172 1.171-2.077 6.319-2.626 6.869-.549.548-1.944.044-3.115-1.128-1.172-1.171-1.676-2.566-1.127-3.115.549-.55 5.697-3.798 6.868-2.626zM1.652 6.61C.626 4.818-.544 2.215.276 1.395c.81-.81 3.355.319 5.144 1.334A11.003 11.003 0 0 0 1.652 6.61zm18.95.418a10.584 10.584 0 0 1 1.368 5.218c0 5.874-4.762 10.636-10.637 10.636C5.459 22.882.697 18.12.697 12.246.697 6.371 5.459 1.61 11.333 1.61c1.771 0 3.441.433 4.909 1.199-.361.201-.69.398-.969.574-.428-.077-.778-.017-.998.202-.402.402-.269 1.245.263 2.2.273.539.701 1.124 1.25 1.674.103.104.208.202.315.297 1.519 1.446 3.205 2.111 3.829 1.486.267-.267.297-.728.132-1.287.167-.27.35-.584.538-.927zm2.814-5.088c-.322 0-.584.266-.584.595s.261.595.584.595c.323 0 .584-.266.584-.595s-.261-.595-.584-.595zm0 1.087c-.252 0-.457-.22-.457-.492s.204-.492.457-.492c.252 0 .457.22.457.492s-.204.492-.457.492z`},child:[]}]})(e)}function cd(e){return K({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M12.001 0C5.376 0 .008 5.369.004 11.992H.002v9.287h.002A2.726 2.726 0 0 0 2.73 24h9.275c6.626-.004 11.993-5.372 11.993-11.997C23.998 5.375 18.628 0 12 0zm2.431 4.94c2.015 0 3.917 1.543 3.917 3.671 0 .197.001.395-.03.619a1.002 1.002 0 0 1-1.137.893 1.002 1.002 0 0 1-.842-1.175 2.61 2.61 0 0 0 .013-.337c0-1.207-.987-1.672-1.92-1.672-.934 0-1.775.784-1.777 1.672.016 1.027 0 2.046 0 3.07l1.732-.012c1.352-.028 1.368 2.009.016 1.998l-1.748.013c-.004.826.006.677.002 1.093 0 0 .015 1.01-.016 1.776-.209 2.25-2.124 4.046-4.424 4.046-2.438 0-4.448-1.993-4.448-4.437.073-2.515 2.078-4.492 4.603-4.469l1.409-.01v1.996l-1.409.013h-.007c-1.388.04-2.577.984-2.6 2.47a2.438 2.438 0 0 0 2.452 2.439c1.356 0 2.441-.987 2.441-2.437l-.001-7.557c0-.14.005-.252.02-.407.23-1.848 1.883-3.256 3.754-3.256z`},child:[]}]})(e)}function ld(e){return K({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M13.983 11.078h2.119a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.119a.185.185 0 00-.185.185v1.888c0 .102.083.185.185.185m-2.954-5.43h2.118a.186.186 0 00.186-.186V3.574a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m0 2.716h2.118a.187.187 0 00.186-.186V6.29a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.887c0 .102.082.185.185.186m-2.93 0h2.12a.186.186 0 00.184-.186V6.29a.185.185 0 00-.185-.185H8.1a.185.185 0 00-.185.185v1.887c0 .102.083.185.185.186m-2.964 0h2.119a.186.186 0 00.185-.186V6.29a.185.185 0 00-.185-.185H5.136a.186.186 0 00-.186.185v1.887c0 .102.084.185.186.186m5.893 2.715h2.118a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m-2.93 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.083.185.185.185m-2.964 0h2.119a.185.185 0 00.185-.185V9.006a.185.185 0 00-.184-.186h-2.12a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185m-2.92 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.082.185.185.185M23.763 9.89c-.065-.051-.672-.51-1.954-.51-.338.001-.676.03-1.01.087-.248-1.7-1.653-2.53-1.716-2.566l-.344-.199-.226.327c-.284.438-.49.922-.612 1.43-.23.97-.09 1.882.403 2.661-.595.332-1.55.413-1.744.42H.751a.751.751 0 00-.75.748 11.376 11.376 0 00.692 4.062c.545 1.428 1.355 2.48 2.41 3.124 1.18.723 3.1 1.137 5.275 1.137.983.003 1.963-.086 2.93-.266a12.248 12.248 0 003.823-1.389c.98-.567 1.86-1.288 2.61-2.136 1.252-1.418 1.998-2.997 2.553-4.4h.221c1.372 0 2.215-.549 2.68-1.009.309-.293.55-.65.707-1.046l.098-.288Z`},child:[]}]})(e)}function ud(e){return K({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M12.04 0C5.408-.02.005 5.37.005 11.992h4.638c0-4.923 4.882-8.731 10.064-6.855a6.95 6.95 0 014.147 4.148c1.889 5.177-1.924 10.055-6.84 10.064v-4.61H7.391v4.623h4.61V24c7.86 0 13.967-7.588 11.397-15.83-1.115-3.59-3.985-6.446-7.575-7.575A12.8 12.8 0 0012.039 0zM7.39 19.362H3.828v3.564H7.39zm-3.563 0v-2.978H.85v2.978z`},child:[]}]})(e)}function dd(e){return K({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M17.963 14.6V9.324h1.222v4.204h2.14v1.07h-3.362zm-9.784-3.288l2.98-2.292c.281.228.56.458.841.687l-2.827 2.14.611.535 2.827-2.216c.281.228.56.458.841.688a295.83 295.83 0 0 1-2.827 2.216l.61.536 2.83-2.295-.001-1.986h1.223v4.204h2.216v1.07h-3.362v-1.987c-.995.763-1.987 1.529-2.981 2.292l-2.981-2.292c-.144.729-.653 1.36-1.312 1.694-.285.147-.597.24-.915.276-.183.022-.367.017-.551.017H3.516V9.325H5.69a2.544 2.544 0 0 1 1.563.557c.454.36.778.872.927 1.43m-3.516-.917v3.21l.953-.001a1.377 1.377 0 0 0 1.036-.523 1.74 1.74 0 0 0 .182-1.889 1.494 1.494 0 0 0-.976-.766c-.166-.04-.338-.03-.507-.032h-.688zM11.82 0h.337a11.94 11.94 0 0 1 5.405 1.373 12.101 12.101 0 0 1 4.126 3.557A11.93 11.93 0 0 1 24 11.82v.36a11.963 11.963 0 0 1-3.236 8.033A11.967 11.967 0 0 1 12.182 24h-.361a11.993 11.993 0 0 1-4.145-.806 12.04 12.04 0 0 1-4.274-2.836A12.057 12.057 0 0 1 .576 15.67 12.006 12.006 0 0 1 0 12.181v-.361a11.924 11.924 0 0 1 1.992-6.396 12.211 12.211 0 0 1 4.71-4.172A11.875 11.875 0 0 1 11.82 0m-.153 1.23a10.724 10.724 0 0 0-6.43 2.375 10.78 10.78 0 0 0-3.319 4.573 10.858 10.858 0 0 0 .193 8.12 10.788 10.788 0 0 0 3.546 4.421 10.698 10.698 0 0 0 4.786 1.946c1.456.209 2.955.124 4.376-.26a10.756 10.756 0 0 0 5.075-3.062 10.742 10.742 0 0 0 2.686-5.28 10.915 10.915 0 0 0-.122-4.682 10.77 10.77 0 0 0-7.098-7.626 10.78 10.78 0 0 0-3.693-.525z`},child:[]}]})(e)}function fd(e){return K({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M13.88 12.685c-.4 0 .08.2.601.28.14-.1.27-.22.39-.33a3.001 3.001 0 01-.99.05m2.14-.53c.23-.33.4-.69.47-1.06-.06.27-.2.5-.33.73-.75.47-.07-.27 0-.56-.8 1.01-.11.6-.14.89m.781-2.05c.05-.721-.14-.501-.2-.221.07.04.13.5.2.22M12.38.31c.2.04.45.07.42.12.23-.05.28-.1-.43-.12m.43.12l-.15.03.14-.01V.43m6.633 9.944c.02.64-.2.95-.38 1.5l-.35.181c-.28.54.03.35-.17.78-.44.39-1.34 1.22-1.62 1.301-.201 0 .14-.25.19-.34-.591.4-.481.6-1.371.85l-.03-.06c-2.221 1.04-5.303-1.02-5.253-3.842-.03.17-.07.13-.12.2a3.551 3.552 0 012.001-3.501 3.361 3.362 0 013.732.48 3.341 3.342 0 00-2.721-1.3c-1.18.01-2.281.76-2.651 1.57-.6.38-.67 1.47-.93 1.661-.361 2.601.66 3.722 2.38 5.042.27.19.08.21.12.35a4.702 4.702 0 01-1.53-1.16c.23.33.47.66.8.91-.55-.18-1.27-1.3-1.48-1.35.93 1.66 3.78 2.921 5.261 2.3a6.203 6.203 0 01-2.33-.28c-.33-.16-.77-.51-.7-.57a5.802 5.803 0 005.902-.84c.44-.35.93-.94 1.07-.95-.2.32.04.16-.12.44.44-.72-.2-.3.46-1.24l.24.33c-.09-.6.74-1.321.66-2.262.19-.3.2.3 0 .97.29-.74.08-.85.15-1.46.08.2.18.42.23.63-.18-.7.2-1.2.28-1.6-.09-.05-.28.3-.32-.53 0-.37.1-.2.14-.28-.08-.05-.26-.32-.38-.861.08-.13.22.33.34.34-.08-.42-.2-.75-.2-1.08-.34-.68-.12.1-.4-.3-.34-1.091.3-.25.34-.74.54.77.84 1.96.981 2.46-.1-.6-.28-1.2-.49-1.76.16.07-.26-1.241.21-.37A7.823 7.824 0 0017.702 1.6c.18.17.42.39.33.42-.75-.45-.62-.48-.73-.67-.61-.25-.65.02-1.06 0C15.082.73 14.862.8 13.8.4l.05.23c-.77-.25-.9.1-1.73 0-.05-.04.27-.14.53-.18-.741.1-.701-.14-1.431.03.17-.13.36-.21.55-.32-.6.04-1.44.35-1.18.07C9.6.68 7.847 1.3 6.867 2.22L6.838 2c-.45.54-1.96 1.611-2.08 2.311l-.131.03c-.23.4-.38.85-.57 1.261-.3.52-.45.2-.4.28-.6 1.22-.9 2.251-1.16 3.102.18.27 0 1.65.07 2.76-.3 5.463 3.84 10.776 8.363 12.006.67.23 1.65.23 2.49.25-.99-.28-1.12-.15-2.08-.49-.7-.32-.85-.7-1.34-1.13l.2.35c-.971-.34-.57-.42-1.361-.67l.21-.27c-.31-.03-.83-.53-.97-.81l-.34.01c-.41-.501-.63-.871-.61-1.161l-.111.2c-.13-.21-1.52-1.901-.8-1.511-.13-.12-.31-.2-.5-.55l.14-.17c-.35-.44-.64-1.02-.62-1.2.2.24.32.3.45.33-.88-2.172-.93-.12-1.601-2.202l.15-.02c-.1-.16-.18-.34-.26-.51l.06-.6c-.63-.74-.18-3.102-.09-4.402.07-.54.53-1.1.88-1.981l-.21-.04c.4-.71 2.341-2.872 3.241-2.761.43-.55-.09 0-.18-.14.96-.991 1.26-.7 1.901-.88.7-.401-.6.16-.27-.151 1.2-.3.85-.7 2.421-.85.16.1-.39.14-.52.26 1-.49 3.151-.37 4.562.27 1.63.77 3.461 3.011 3.531 5.132l.08.02c-.04.85.13 1.821-.17 2.711l.2-.42M9.54 13.236l-.05.28c.26.35.47.73.8 1.01-.24-.47-.42-.66-.75-1.3m.62-.02c-.14-.15-.22-.34-.31-.52.08.32.26.6.43.88l-.12-.36m10.945-2.382l-.07.15c-.1.76-.34 1.511-.69 2.212.4-.73.65-1.541.75-2.362M12.45.12c.27-.1.66-.05.95-.12-.37.03-.74.05-1.1.1l.15.02M3.006 5.142c.07.57-.43.8.11.42.3-.66-.11-.18-.1-.42m-.64 2.661c.12-.39.15-.62.2-.84-.35.44-.17.53-.2.83`},child:[]}]})(e)}function pd(e){return K({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M12.076.066L8.883 3.28H3.348v5.434L0 12.01l3.349 3.298v5.39h5.374l3.285 3.236 3.285-3.236h5.43v-5.374L24 12.026l-3.232-3.252V3.321H15.31zm0 .749l2.49 2.506h-1.69v6.441l-.8.805-.81-.815V3.28H9.627zm-8.2 2.991h4.483L6.485 5.692l4.253 4.279v.654H9.94L5.674 6.423l-1.798 1.77zm5.227 0h1.635v5.415l-3.509-3.53zm4.302.043h1.687l1.83 1.842-3.517 3.539zm2.431 0h4.404v4.394l-1.83-1.842-4.241 4.267h-.764v-.69l4.261-4.287zm2.574 3.3l1.83 1.843v1.676h-5.327zm-12.735.013l3.515 3.462H3.876v-1.69zM3.348 9.454v1.697h6.377l.871.858-.782.77H3.35v1.786L.753 12.01zm17.42.068l2.488 2.503-2.533 2.55v-1.796h-6.41l-.75-.754.825-.83h6.38zm-9.502.978l.81.815.186-.188.614-.618v.686h.768l-.825.83.75.754h-.719v.808l-.842-.83-.741.73v-.707h-.7l.781-.77-.188-.186-.682-.672h.788zm-7.39 2.807h5.402l-3.603 3.55-1.798-1.772zm6.154 0h.708v.7l-4.404 4.338 1.852 1.824h-4.31v-4.342l1.798 1.77zm3.348 0h.715l4.317 4.343.186-.187 1.599-1.61v4.316h-4.366l1.853-1.825-.188-.185-4.116-4.054zm1.46 0h5.357v1.798l-1.785 1.796zm-2.83.191l.842.829v6.37h1.691l-2.532 2.495-2.533-2.495h1.79V14.23zm-1.27 1.251v5.42H8.939l-1.852-1.823zm2.64.097l3.552 3.499-1.853 1.825h-1.7z`},child:[]}]})(e)}function md(e){return K({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M23.904 10.788V9.522h-4.656c-.972 0-1.41.6-1.482 1.182v.018-1.2h-1.368v1.266h1.362zm-6.144.456l-1.368-.078v1.458c0 .456-.228.594-1.02.594H14.28c-.654 0-.93-.186-.93-.594v-1.596l-1.386-.102v1.812h-.03c-.078-.528-.276-1.14-1.596-1.23L6 11.22c0 .666.474 1.062 1.218 1.14l3.024.306c.24.018.414.09.414.288 0 .216-.18.24-.456.24H5.946V11.22l-1.386-.09v3.348h5.646c1.26 0 1.662-.654 1.722-1.2h.03c.156.864.912 1.2 2.19 1.2h1.41c1.494 0 2.202-.456 2.202-1.524zm4.398.258l-4.338-.258c0 .666.438 1.11 1.182 1.17l3.09.24c.24.018.384.078.384.276 0 .186-.168.258-.516.258h-4.212v1.29h4.302c1.356 0 1.95-.474 1.95-1.554 0-.972-.534-1.338-1.842-1.422zm-10.194-1.98h1.386v1.266h-1.386zM3.798 11.07l-1.506-.15L0 14.478h1.686zm7.914-1.548h-4.23c-.984 0-1.416.612-1.518 1.2v-1.2H3.618c-.33 0-.486.102-.642.33l-.648.936h9.384Z`},child:[]}]})(e)}function hd(e){return K({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M5.419 8.534h1.614v6.911H5.419v-.72c-.71.822-1.573.933-2.07.933C1.218 15.658 0 13.882 0 11.985c0-2.253 1.542-3.633 3.37-3.633.507 0 1.4.132 2.049.984zm-3.765 3.491c0 1.198.751 2.202 1.918 2.202 1.015 0 1.959-.74 1.959-2.181 0-1.512-.934-2.233-1.959-2.233-1.167-.01-1.918.974-1.918 2.212zm7.297-3.49h1.613v.618a3 3 0 0 1 .67-.578c.314-.183.619-.233.984-.233.396 0 .822.06 1.269.324l-.66 1.462a1.432 1.432 0 0 0-.822-.244c-.345 0-.69.05-1.005.376-.446.477-.446 1.136-.446 1.593v3.582H8.94zm5.56 0h1.614v.639c.538-.66 1.177-.822 1.705-.822.72 0 1.4.345 1.786 1.015.579-.822 1.441-1.015 2.05-1.015.842 0 1.573.396 1.969 1.086.132.233.365.74.365 1.745v4.272h-1.614V11.65c0-.771-.08-1.086-.152-1.228-.101-.264-.345-.609-.923-.609-.396 0-.741.213-.954.508-.284.395-.315.984-.315 1.572v3.562H18.43V11.65c0-.771-.081-1.086-.152-1.228-.102-.264-.345-.609-.924-.609-.396 0-.74.213-.954.508-.284.395-.314.984-.314 1.572v3.562h-1.573z`},child:[]}]})(e)}function gd(e){return K({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M11.39.605C10.376 3.092 9.764 4.72 8.635 7.132c.693.734 1.543 1.589 2.923 2.554-1.484-.61-2.496-1.224-3.252-1.86C6.86 10.842 4.596 15.138 0 23.395c3.612-2.085 6.412-3.37 9.021-3.862a6.61 6.61 0 01-.171-1.547l.003-.115c.058-2.315 1.261-4.095 2.687-3.973 1.426.12 2.534 2.096 2.478 4.409a6.52 6.52 0 01-.146 1.243c2.58.505 5.352 1.787 8.914 3.844-.702-1.293-1.33-2.459-1.929-3.57-.943-.73-1.926-1.682-3.933-2.713 1.38.359 2.367.772 3.137 1.234-6.09-11.334-6.582-12.84-8.67-17.74zM22.898 21.36v-.623h-.234v-.084h.562v.084h-.234v.623h.331v-.707h.142l.167.5.034.107a2.26 2.26 0 01.038-.114l.17-.493H24v.707h-.091v-.593l-.206.593h-.084l-.205-.602v.602h-.091`},child:[]}]})(e)}function _d(e){return K({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M5.998 1.607L0 12l5.998 10.393h12.004L24 12 18.002 1.607H5.998zM9.965 7.12L12.66 9.9l1.598 1.595.002-.002 2.41 2.363c-.2.14-.386.252-.563.344a3.756 3.756 0 01-.496.217 2.702 2.702 0 01-.425.111c-.131.023-.25.034-.358.034-.13 0-.242-.014-.338-.034a1.317 1.317 0 01-.24-.072.95.95 0 01-.2-.113l-1.062-1.092-3.039-3.041-1.1 1.053-3.07 3.072a.974.974 0 01-.2.111 1.274 1.274 0 01-.237.073c-.096.02-.209.033-.338.033-.108 0-.227-.009-.358-.031a2.7 2.7 0 01-.425-.114 3.748 3.748 0 01-.496-.217 5.228 5.228 0 01-.563-.343l6.803-6.727zm4.72.785l4.579 4.598 1.382 1.353a5.24 5.24 0 01-.564.344 3.73 3.73 0 01-.494.217 2.697 2.697 0 01-.426.111c-.13.023-.251.034-.36.034-.129 0-.241-.014-.337-.034a1.285 1.285 0 01-.385-.146c-.033-.02-.05-.036-.053-.04l-1.232-1.218-2.111-2.111-.334.334L12.79 9.8l1.896-1.897zm-5.966 4.12v2.529a2.128 2.128 0 01-.356-.035 2.765 2.765 0 01-.422-.116 3.708 3.708 0 01-.488-.214 5.217 5.217 0 01-.555-.34l1.82-1.825Z`},child:[]}]})(e)}function vd(e){return K({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M23.943 9.364c-.085-.113-.17-.198-.595-.226-.113 0-.453-.029-1.048-.029-1.56 0-2.636.482-3.175 1.417.142-.935-.765-1.417-2.749-1.417-2.324 0-3.798.935-4.393 2.834-.226.709-.226 1.276-.056 1.73h-.567c-.425.027-.992.056-1.36.056-.85 0-1.39-.142-1.588-.425-.17-.255-.17-.737.057-1.446.368-1.162 1.247-1.672 2.664-1.672.737 0 1.445.085 1.445.085.085 0 .142-.113.142-.198l-.028-.085-.057-.397c-.028-.255-.227-.397-.567-.453-.311-.029-.567-.029-.907-.029h-.028c-1.842 0-3.146.624-3.854 1.814.255-1.219-.596-1.814-2.551-1.814-1.105 0-1.9.029-2.353.085-.368.057-.595.199-.68.454l-.17.51c-.028.085.029.142.142.142.085 0 .425-.057.992-.086a24.816 24.816 0 0 1 1.672-.085c1.077 0 1.559.284 1.389.822-.029.114-.114.199-.255.227-1.02.17-1.842.284-2.438.369-1.7.226-2.692.736-2.947 1.587-.369 1.162.538 1.728 2.72 1.728 1.078 0 2.013-.056 2.75-.198.425-.085.652-.17.737-.453l.396-1.304c-.028 1.304.85 1.955 2.721 1.955.794 0 1.559-.028 1.927-.085.369-.056.567-.141.652-.425l.085-.396c.397.623 1.276.935 2.608.935 1.417 0 2.239-.029 2.465-.114a.523.523 0 0 0 .369-.311l.028-.085.17-.539c.029-.085-.028-.142-.142-.142l-.906.057c-.596.029-1.077.057-1.418.057-.651 0-1.076-.057-1.332-.142-.368-.142-.538-.397-.51-.822l2.863-.368c1.275-.17 2.154-.567 2.579-1.19l-.992 3.315c-.028.057 0 .114.028.142.029.028.085.057.199.057h1.19c.198 0 .283-.114.312-.199l1.048-3.656c.142-.481.567-.708 1.36-.708.71 0 1.22 0 1.56.028h.028c.057 0 .17-.028.255-.17l.17-.51c0-.085 0-.17-.057-.227zM4.841 13.73c-.368.057-.907.085-1.587.085-1.219 0-1.729-.255-1.587-.737.113-.34.425-.567.935-.624l2.75-.368zm12.669-2.95c-.114.369-.652.624-1.616.766l-2.295.311.056-.198c.199-.624.454-1.02.794-1.247.34-.227.907-.34 1.7-.34 1.05.028 1.503.255 1.36.708Z`},child:[]}]})(e)}function yd(e){return K({tag:`svg`,attr:{version:`1.1`,viewBox:`0 0 17 17`},child:[{tag:`g`,attr:{},child:[]},{tag:`path`,attr:{d:`M14.001 11.125c-0.469-0.674-0.704-1.44-0.704-2.278 0-0.776 0.225-1.482 0.664-2.115 0.245-0.357 0.633-0.756 1.165-1.205-0.347-0.43-0.706-0.777-1.063-1.022-0.634-0.439-1.358-0.664-2.176-0.664-0.501 0-1.093 0.123-1.767 0.347-0.675 0.235-1.165 0.348-1.461 0.348-0.236 0-0.706-0.102-1.411-0.307-0.715-0.204-1.308-0.306-1.808-0.306-1.176 0-2.136 0.491-2.901 1.471-0.766 0.991-1.154 2.258-1.154 3.821 0 1.675 0.511 3.381 1.501 5.139 1.011 1.757 2.023 2.646 3.075 2.646 0.337 0 0.787-0.112 1.349-0.348 0.553-0.224 1.042-0.337 1.451-0.337 0.419 0 0.939 0.102 1.542 0.327 0.614 0.214 1.083 0.327 1.431 0.327 0.868 0 1.747-0.665 2.626-2.003 0.592-0.889 1.001-1.747 1.256-2.554-0.602-0.183-1.144-0.612-1.615-1.287zM13.523 14.418c-0.657 1-1.293 1.552-1.79 1.552-0.147 0-0.459-0.047-1.081-0.264-0.693-0.259-1.33-0.39-1.892-0.39-0.541 0-1.155 0.138-1.838 0.415-0.58 0.243-0.865 0.269-0.961 0.269-0.628 0-1.412-0.762-2.204-2.137-0.923-1.639-1.372-3.159-1.372-4.648 0-1.336 0.31-2.387 0.942-3.206 0.579-0.741 1.251-1.086 2.113-1.086 0.401 0 0.902 0.088 1.529 0.267 1.051 0.305 1.444 0.346 1.689 0.346 0.425 0 1.010-0.132 1.777-0.399 0.589-0.196 1.077-0.296 1.45-0.296 0.609 0 1.135 0.159 1.61 0.489 0.066 0.046 0.135 0.098 0.204 0.155-0.228 0.236-0.414 0.461-0.562 0.677-0.56 0.806-0.843 1.709-0.843 2.686 0 1.048 0.297 2.006 0.884 2.85 0.354 0.505 0.748 0.908 1.182 1.206-0.217 0.499-0.498 1.006-0.837 1.514zM9.424 3.964c-0.235 0.072-0.582 0.133-1.062 0.174 0.021-1.011 0.286-1.89 0.797-2.625 0.511-0.737 1.368-1.237 2.555-1.513 0.020 0.092 0.040 0.164 0.050 0.225 0 0.071 0.011 0.132 0.011 0.204 0 0.419-0.102 0.889-0.296 1.39-0.204 0.511-0.521 0.981-0.951 1.41-0.368 0.367-0.736 0.612-1.104 0.735z`},child:[]}]})(e)}function bd(e){return K({tag:`svg`,attr:{viewBox:`0 0 16 16`,fill:`currentColor`},child:[{tag:`path`,attr:{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12.2002 2.97067C12.3402 2.8507 12.5497 2.83088 12.7197 2.92087C12.8896 3.01082 12.9999 3.18024 13 3.37009V12.6308C12.9998 12.8207 12.8896 13.0001 12.7197 13.08C12.6498 13.11 12.58 13.1308 12.5 13.1308C12.39 13.1308 12.2902 13.1002 12.2002 13.0302L6.08984 8.40036C5.95988 8.30036 5.88965 8.15995 5.88965 7.99997C5.88979 7.84018 5.97001 7.69048 6.08984 7.60055L12.2002 2.97067ZM7.21973 7.99997L12 11.6201V4.38083L7.21973 7.99997Z`},child:[]},{tag:`path`,attr:{fillRule:`evenodd`,clipRule:`evenodd`,d:`M11 0.350554C11.32 0.0305537 11.8802 -0.0296026 12.2002 0.190397L12.6201 0.390593C12.6584 0.390649 12.7149 0.417502 12.7197 0.41989L14.7305 1.39059C14.7403 1.40015 14.75 1.40036 14.75 1.40036L15.4297 1.73044H15.4404C15.7901 1.89049 16.0096 2.24015 16.0098 2.62985V13.3701C16.0098 13.75 15.7903 14.1104 15.4404 14.2705L12.1504 15.8603C12.0004 15.9303 11.8297 15.9502 11.7197 15.9502C11.4598 15.9501 11.1995 15.8401 11.0195 15.6601L4.70996 9.91989L1.95996 12C1.69997 12.19 1.30985 12.1604 1.08984 11.9404L0.219727 11.1601C0.059832 10.9702 0 10.8201 0 10.6601C1.22464e-05 10.6 0.0202612 10.3703 0.200195 10.1904L2.58984 7.99997L0.209961 5.83005C0.0100442 5.63007 0 5.3998 0 5.33981C9.8004e-05 5.18993 0.0602551 5.03025 0.160156 4.90036L1.11035 4.04001C1.29048 3.85024 1.70031 3.81006 1.9502 3.99997L4.7002 6.08981L11 0.350554ZM5.05957 7.08981C4.87957 7.24976 4.6099 7.26007 4.41992 7.12008L1.55957 4.95993L1.15039 5.33005L3.66992 7.62008C3.76992 7.72008 3.83008 7.8502 3.83008 7.9902C3.83007 8.13019 3.76992 8.27032 3.66992 8.36032L1.15039 10.6601L1.57031 11.0302L4.42969 8.87008C4.51969 8.80009 4.62047 8.77048 4.73047 8.77048C4.85031 8.77058 4.97044 8.81048 5.07031 8.90036L11.7002 14.9404L12.2803 14.6806L15 13.3701V2.62985L12.2803 1.33005C12.2709 1.33005 12.2435 1.31265 12.2402 1.31051L11.7002 1.04977L5.05957 7.08981Z`},child:[]}]})(e)}function xd(e){return K({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M18.75 1.5H5.25C3.1815 1.5 1.5 3.183 1.5 5.25V18.75C1.5 20.8185 3.1815 22.5 5.25 22.5H18.75C20.8185 22.5 22.5 20.8185 22.5 18.75V5.25C22.5 3.183 20.8185 1.5 18.75 1.5ZM21 18.75C21 19.9905 19.9905 21 18.75 21H5.25C4.0095 21 3 19.9905 3 18.75V5.25C3 4.0095 4.0095 3 5.25 3H18.75C19.9905 3 21 4.0095 21 5.25V18.75ZM10.281 13.281L5.781 17.781C5.634 17.928 5.442 18 5.25 18C5.058 18 4.866 17.9265 4.719 17.781C4.4265 17.4885 4.4265 17.013 4.719 16.7205L8.688 12.7515L4.719 8.7825C4.4265 8.49 4.4265 8.0145 4.719 7.722C5.0115 7.4295 5.487 7.4295 5.7795 7.722L10.2795 12.222C10.572 12.5145 10.572 12.99 10.2795 13.2825L10.281 13.281ZM19.5 17.25C19.5 17.664 19.164 18 18.75 18H11.25C10.836 18 10.5 17.664 10.5 17.25C10.5 16.836 10.836 16.5 11.25 16.5H18.75C19.164 16.5 19.5 16.836 19.5 17.25Z`},child:[]}]})(e)}function Sd(e){return K({tag:`svg`,attr:{viewBox:`0 0 16 16`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M6.82499 8.882L4.46199 10.882C4.36799 10.961 4.25299 11 4.13899 11C3.99699 11 3.85599 10.939 3.75699 10.823C3.57799 10.612 3.60499 10.297 3.81599 10.118L5.80399 8.436L4.47899 6.817C4.30399 6.603 4.33499 6.288 4.54899 6.113C4.76199 5.938 5.07799 5.969 5.25199 6.183L6.88799 8.183C7.06099 8.394 7.03299 8.705 6.82499 8.882ZM11 10H7.49999C7.22399 10 6.99999 10.224 6.99999 10.5C6.99999 10.776 7.22399 11 7.49999 11H11C11.276 11 11.5 10.776 11.5 10.5C11.5 10.224 11.276 10 11 10ZM15.784 3.973L14.053 12.973C13.827 14.148 12.795 15 11.598 15H2.67099C1.92299 15 1.21999 14.669 0.742988 14.092C0.265988 13.515 0.0739875 12.763 0.215988 12.028L1.94699 3.027C2.17299 1.852 3.20499 1 4.40199 1H13.329C14.077 1 14.78 1.331 15.257 1.908C15.734 2.485 15.926 3.237 15.784 3.972V3.973ZM14.485 2.545C14.199 2.198 13.778 2 13.329 2H4.40199C3.68399 2 3.06399 2.512 2.92899 3.217L1.19799 12.217C1.11299 12.657 1.22799 13.11 1.51399 13.455C1.79999 13.802 2.22099 14 2.66999 14H11.597C12.315 14 12.935 13.488 13.07 12.783L14.801 3.783C14.886 3.343 14.771 2.89 14.485 2.545Z`},child:[]}]})(e)}function Cd(e){return K({tag:`svg`,attr:{viewBox:`0 0 16 16`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M13.2812 11.1562C13.4479 11.2292 13.5729 11.3281 13.6562 11.4531C13.7396 11.5781 13.7995 11.7292 13.8359 11.9062C13.8568 12.0104 13.8802 12.1068 13.9062 12.1953C13.9323 12.2839 13.9635 12.3672 14 12.4453C14.0365 12.5234 14.0781 12.599 14.125 12.6719C14.1719 12.7448 14.2344 12.8255 14.3125 12.9141C14.3802 12.987 14.4401 13.0807 14.4922 13.1953C14.5443 13.3099 14.5703 13.4193 14.5703 13.5234C14.5703 13.6432 14.5391 13.7448 14.4766 13.8281C14.4141 13.9115 14.3359 13.9844 14.2422 14.0469C14.1224 14.1302 13.9974 14.2031 13.8672 14.2656C13.737 14.3281 13.6068 14.3932 13.4766 14.4609C13.263 14.5651 13.0781 14.6745 12.9219 14.7891C12.7656 14.9036 12.6094 15.0495 12.4531 15.2266C12.3698 15.3203 12.276 15.4115 12.1719 15.5C12.0677 15.5885 11.9531 15.6719 11.8281 15.75C11.7031 15.8281 11.5755 15.8854 11.4453 15.9219C11.3151 15.9583 11.1849 15.9818 11.0547 15.9922C10.7526 15.9922 10.5026 15.9401 10.3047 15.8359C10.1068 15.7318 9.9349 15.5417 9.78906 15.2656C9.7474 15.1875 9.70573 15.138 9.66406 15.1172C9.6224 15.0964 9.55469 15.0781 9.46094 15.0625C9.19531 15.0417 8.93229 15.0208 8.67188 15C8.41146 14.9792 8.14583 14.9688 7.875 14.9688C7.65625 14.9688 7.43229 14.987 7.20312 15.0234C6.97396 15.0599 6.7474 15.1042 6.52344 15.1562C6.47656 15.1667 6.42969 15.2057 6.38281 15.2734C6.33594 15.3411 6.27083 15.4167 6.1875 15.5C6.10417 15.5833 5.99219 15.6562 5.85156 15.7188C5.71094 15.7812 5.52604 15.8151 5.29688 15.8203C5.125 15.8203 4.9401 15.8021 4.74219 15.7656C4.54427 15.7292 4.36719 15.6693 4.21094 15.5859C3.88802 15.4245 3.57031 15.3151 3.25781 15.2578C2.94531 15.2005 2.61458 15.1484 2.26562 15.1016C2.14583 15.0859 2.03125 15.0651 1.92188 15.0391C1.8125 15.013 1.71615 14.9688 1.63281 14.9062C1.54948 14.8438 1.48438 14.7708 1.4375 14.6875C1.39062 14.6042 1.36458 14.487 1.35938 14.3359C1.35938 14.1745 1.38021 14.0182 1.42188 13.8672C1.46354 13.7161 1.48698 13.5573 1.49219 13.3906C1.49219 13.276 1.48438 13.1641 1.46875 13.0547C1.45312 12.9453 1.44271 12.8281 1.4375 12.7031C1.4375 12.4375 1.5 12.2422 1.625 12.1172C1.75 11.9922 1.93229 11.8932 2.17188 11.8203C2.28646 11.7839 2.38542 11.7344 2.46875 11.6719C2.55208 11.6094 2.63021 11.5417 2.70312 11.4688C2.77604 11.3958 2.84375 11.3151 2.90625 11.2266C2.96875 11.138 3.03906 11.0495 3.11719 10.9609C3.13281 10.9401 3.14062 10.9167 3.14062 10.8906C3.14062 10.8281 3.13802 10.7682 3.13281 10.7109C3.1276 10.6536 3.1224 10.5911 3.11719 10.5234C3.11719 10.1693 3.17188 9.8125 3.28125 9.45312C3.39062 9.09375 3.53385 8.74219 3.71094 8.39844C3.88802 8.05469 4.08594 7.72396 4.30469 7.40625C4.52344 7.08854 4.73958 6.79427 4.95312 6.52344C5.25521 6.13802 5.48177 5.73698 5.63281 5.32031C5.78385 4.90365 5.86198 4.45052 5.86719 3.96094C5.86719 3.7526 5.85677 3.54688 5.83594 3.34375C5.8151 3.14062 5.80469 2.93229 5.80469 2.71875C5.80469 2.30208 5.85156 1.92708 5.94531 1.59375C6.03906 1.26042 6.1849 0.973958 6.38281 0.734375C6.58073 0.494792 6.83854 0.315104 7.15625 0.195312C7.47396 0.0755208 7.85417 0.0104167 8.29688 0C8.82292 0 9.24219 0.104167 9.55469 0.3125C9.86719 0.520833 10.1068 0.794271 10.2734 1.13281C10.4401 1.47135 10.5469 1.84896 10.5938 2.26562C10.6406 2.68229 10.6667 3.10417 10.6719 3.53125V3.66406C10.6719 3.8776 10.6745 4.06771 10.6797 4.23438C10.6849 4.40104 10.7057 4.5651 10.7422 4.72656C10.7786 4.88802 10.8333 5.04948 10.9062 5.21094C10.9792 5.3724 11.0885 5.54688 11.2344 5.73438C11.4844 6.0625 11.7396 6.39323 12 6.72656C12.2604 7.0599 12.4974 7.40365 12.7109 7.75781C12.9245 8.11198 13.099 8.48177 13.2344 8.86719C13.3698 9.2526 13.4401 9.66927 13.4453 10.1172C13.4453 10.4766 13.3906 10.8229 13.2812 11.1562ZM6.72656 3.01562C6.79948 3.01562 6.85938 3.03385 6.90625 3.07031C6.95312 3.10677 6.98958 3.15625 7.01562 3.21875C7.04167 3.28125 7.0599 3.34375 7.07031 3.40625C7.08073 3.46875 7.08594 3.53385 7.08594 3.60156C7.08594 3.65365 7.07812 3.69531 7.0625 3.72656C7.04688 3.75781 7.02344 3.78646 6.99219 3.8125C6.96094 3.83854 6.92969 3.86458 6.89844 3.89062C6.86719 3.91667 6.83594 3.94792 6.80469 3.98438C6.76823 4.04167 6.71875 4.08854 6.65625 4.125C6.59375 4.16146 6.53385 4.20052 6.47656 4.24219C6.41927 4.28385 6.36719 4.32812 6.32031 4.375C6.27344 4.42188 6.25 4.48698 6.25 4.57031C6.25 4.61719 6.27344 4.65625 6.32031 4.6875C6.44531 4.77083 6.53385 4.8724 6.58594 4.99219C6.63802 5.11198 6.69531 5.22917 6.75781 5.34375C6.82031 5.45833 6.90104 5.55469 7 5.63281C7.09896 5.71094 7.2526 5.75 7.46094 5.75H7.50781C7.71615 5.73958 7.91406 5.6849 8.10156 5.58594C8.28906 5.48698 8.47656 5.38281 8.66406 5.27344C8.6901 5.25781 8.72396 5.24219 8.76562 5.22656C8.80729 5.21094 8.84115 5.19271 8.86719 5.17188L9.4375 4.72656C9.44792 4.6901 9.45573 4.65625 9.46094 4.625C9.46615 4.59375 9.47135 4.55729 9.47656 4.51562C9.47656 4.45833 9.46354 4.41146 9.4375 4.375C9.41146 4.33854 9.38021 4.30729 9.34375 4.28125C9.30729 4.25521 9.26302 4.23698 9.21094 4.22656C9.15885 4.21615 9.11198 4.20312 9.07031 4.1875C8.94531 4.16146 8.82812 4.11458 8.71875 4.04688C8.60938 3.97917 8.49479 3.92708 8.375 3.89062C8.35417 3.88542 8.33854 3.86979 8.32812 3.84375C8.31771 3.81771 8.30729 3.78646 8.29688 3.75C8.28646 3.71354 8.28385 3.67969 8.28906 3.64844C8.29427 3.61719 8.29167 3.59115 8.28125 3.57031C8.28125 3.50781 8.28646 3.44271 8.29688 3.375C8.30729 3.30729 8.33073 3.24219 8.36719 3.17969C8.40365 3.11719 8.44531 3.07031 8.49219 3.03906C8.53906 3.00781 8.60677 2.98958 8.69531 2.98438C8.85677 2.98438 8.97396 3.04427 9.04688 3.16406C9.11979 3.28385 9.15885 3.41406 9.16406 3.55469C9.16406 3.6224 9.15104 3.68229 9.125 3.73438C9.09896 3.78646 9.08594 3.84375 9.08594 3.90625C9.08594 3.94792 9.09896 3.97656 9.125 3.99219C9.15104 4.00781 9.1849 4.01823 9.22656 4.02344C9.34635 4.02344 9.42448 3.99479 9.46094 3.9375C9.4974 3.88021 9.51823 3.79427 9.52344 3.67969C9.52344 3.5599 9.51302 3.42708 9.49219 3.28125C9.47135 3.13542 9.42969 3 9.36719 2.875C9.30469 2.75 9.22396 2.64583 9.125 2.5625C9.02604 2.47917 8.89844 2.4375 8.74219 2.4375C8.47135 2.4375 8.27604 2.50521 8.15625 2.64062C8.03646 2.77604 7.97396 2.97917 7.96875 3.25C7.96875 3.32812 7.97396 3.40625 7.98438 3.48438C7.99479 3.5625 8 3.64062 8 3.71875C8 3.74479 7.9974 3.75781 7.99219 3.75781C7.98698 3.75781 7.97135 3.7526 7.94531 3.74219C7.91927 3.73177 7.88802 3.71875 7.85156 3.70312C7.8151 3.6875 7.77604 3.67448 7.73438 3.66406C7.69271 3.65365 7.65104 3.64844 7.60938 3.64844C7.59896 3.64844 7.57292 3.65104 7.53125 3.65625C7.48958 3.66146 7.44792 3.66406 7.40625 3.66406C7.33333 3.66406 7.29688 3.65104 7.29688 3.625C7.29688 3.54688 7.29167 3.44792 7.28125 3.32812C7.27083 3.20833 7.24479 3.08854 7.20312 2.96875C7.16146 2.84896 7.10938 2.75 7.04688 2.67188C6.98438 2.59375 6.89062 2.55208 6.76562 2.54688C6.67708 2.54688 6.60156 2.57552 6.53906 2.63281C6.47656 2.6901 6.42188 2.75781 6.375 2.83594C6.32812 2.91406 6.29948 3.0026 6.28906 3.10156C6.27865 3.20052 6.26823 3.28385 6.25781 3.35156C6.25781 3.38281 6.26302 3.4375 6.27344 3.51562C6.28385 3.59375 6.30208 3.67448 6.32812 3.75781C6.35417 3.84115 6.38281 3.91406 6.41406 3.97656C6.44531 4.03906 6.48177 4.07031 6.52344 4.07031C6.54948 4.07031 6.58333 4.05208 6.625 4.01562C6.66667 3.97917 6.6875 3.94531 6.6875 3.91406C6.6875 3.89844 6.67969 3.88802 6.66406 3.88281C6.64844 3.8776 6.63281 3.875 6.61719 3.875C6.58073 3.875 6.54948 3.85677 6.52344 3.82031C6.4974 3.78385 6.47656 3.74219 6.46094 3.69531C6.44531 3.64844 6.42969 3.59896 6.41406 3.54688C6.39844 3.49479 6.39323 3.45573 6.39844 3.42969C6.39844 3.32552 6.42188 3.23177 6.46875 3.14844C6.51562 3.0651 6.60156 3.02083 6.72656 3.01562ZM5.02344 15.1797C5.14844 15.1797 5.27083 15.1693 5.39062 15.1484C5.51042 15.1276 5.6224 15.0859 5.72656 15.0234C5.83073 14.9609 5.90885 14.8802 5.96094 14.7812C6.01302 14.6823 6.04427 14.5573 6.05469 14.4062C6.05469 14.3125 6.03906 14.2214 6.00781 14.1328C5.97656 14.0443 5.93229 13.9609 5.875 13.8828C5.8125 13.7839 5.74479 13.6901 5.67188 13.6016C5.59896 13.513 5.53125 13.4193 5.46875 13.3203C5.36979 13.1745 5.27344 13.0312 5.17969 12.8906C5.08594 12.75 4.99219 12.6016 4.89844 12.4453C4.8151 12.3099 4.73698 12.1745 4.66406 12.0391C4.59115 11.9036 4.5026 11.7708 4.39844 11.6406C4.33594 11.5625 4.26302 11.4922 4.17969 11.4297C4.09635 11.3672 4 11.3359 3.89062 11.3359C3.77604 11.3359 3.67708 11.3724 3.59375 11.4453C3.51042 11.5182 3.42448 11.6068 3.33594 11.7109C3.2474 11.8151 3.14844 11.9167 3.03906 12.0156C2.92969 12.1146 2.78906 12.1927 2.61719 12.25C2.48177 12.2917 2.3776 12.349 2.30469 12.4219C2.23177 12.4948 2.19531 12.6068 2.19531 12.7578C2.19531 12.862 2.20312 12.9661 2.21875 13.0703C2.23438 13.1745 2.24479 13.2786 2.25 13.3828C2.25 13.5234 2.22917 13.6562 2.1875 13.7812C2.14583 13.9062 2.125 14.0286 2.125 14.1484C2.125 14.2891 2.17448 14.388 2.27344 14.4453C2.3724 14.5026 2.48438 14.5417 2.60938 14.5625C2.76562 14.5885 2.91406 14.6094 3.05469 14.625C3.19531 14.6406 3.33333 14.6641 3.46875 14.6953C3.60417 14.7266 3.73958 14.7604 3.875 14.7969C4.01042 14.8333 4.15365 14.8906 4.30469 14.9688C4.33594 14.9844 4.38281 15.0026 4.44531 15.0234C4.50781 15.0443 4.57812 15.0677 4.65625 15.0938C4.73438 15.1198 4.80729 15.1406 4.875 15.1562C4.94271 15.1719 4.99219 15.1797 5.02344 15.1797ZM7.88281 14.2422C8.02865 14.2422 8.1849 14.2266 8.35156 14.1953C8.51823 14.1641 8.6849 14.1198 8.85156 14.0625C9.01823 14.0052 9.17708 13.9375 9.32812 13.8594C9.47917 13.7812 9.61458 13.6953 9.73438 13.6016C9.74479 13.5911 9.75521 13.5755 9.76562 13.5547C9.77604 13.5339 9.78385 13.513 9.78906 13.4922V13.4844C9.82031 13.3698 9.84635 13.2448 9.86719 13.1094C9.88802 12.974 9.90625 12.8359 9.92188 12.6953C9.9375 12.5547 9.95573 12.4167 9.97656 12.2812C9.9974 12.1458 10.0156 12.013 10.0312 11.8828C10.0521 11.7422 10.0781 11.6068 10.1094 11.4766C10.1406 11.3464 10.1823 11.224 10.2344 11.1094C10.2865 10.9948 10.3568 10.8932 10.4453 10.8047C10.5339 10.7161 10.6484 10.6328 10.7891 10.5547V10.5391L10.7812 10.5156C10.7812 10.4688 10.7969 10.4193 10.8281 10.3672C10.8594 10.3151 10.8984 10.2604 10.9453 10.2031C10.9922 10.1458 11.0417 10.1016 11.0938 10.0703C11.1458 10.0391 11.2005 10.013 11.2578 9.99219C11.2266 9.86719 11.1927 9.74219 11.1562 9.61719C11.1198 9.49219 11.0885 9.36719 11.0625 9.24219C11.0312 9.05469 11 8.89583 10.9688 8.76562C10.9375 8.63542 10.901 8.51562 10.8594 8.40625C10.8177 8.29688 10.7578 8.1901 10.6797 8.08594C10.6016 7.98177 10.5052 7.85677 10.3906 7.71094C10.3333 7.64323 10.2943 7.59115 10.2734 7.55469C10.2526 7.51823 10.237 7.45312 10.2266 7.35938C10.2214 7.32292 10.2057 7.25521 10.1797 7.15625C10.1536 7.05729 10.1198 6.94271 10.0781 6.8125C10.0365 6.68229 9.98958 6.54688 9.9375 6.40625C9.88542 6.26562 9.82812 6.13802 9.76562 6.02344C9.70312 5.90885 9.64583 5.8125 9.59375 5.73438C9.54167 5.65625 9.48698 5.61719 9.42969 5.61719C9.30469 5.61719 9.15625 5.66667 8.98438 5.76562C8.8125 5.86458 8.63021 5.97396 8.4375 6.09375C8.24479 6.21354 8.05729 6.32552 7.875 6.42969C7.69271 6.53385 7.52865 6.58333 7.38281 6.57812C7.22656 6.57812 7.08333 6.52865 6.95312 6.42969C6.82292 6.33073 6.70312 6.21615 6.59375 6.08594C6.48438 5.95573 6.39323 5.84375 6.32031 5.75C6.2474 5.65625 6.19271 5.60417 6.15625 5.59375C6.11458 5.59375 6.09115 5.625 6.08594 5.6875C6.08073 5.75 6.07812 5.82031 6.07812 5.89844V6.03125C6.07812 6.0625 6.07292 6.08333 6.0625 6.09375C6.00521 6.21354 5.94271 6.33073 5.875 6.44531C5.80729 6.5599 5.73958 6.67708 5.67188 6.79688C5.60417 6.91667 5.55208 7.03906 5.51562 7.16406C5.47917 7.28906 5.45833 7.41927 5.45312 7.55469C5.45312 7.63281 5.45833 7.71094 5.46875 7.78906C5.47917 7.86719 5.50521 7.94271 5.54688 8.01562L5.53125 8.04688C5.48958 8.10417 5.44531 8.15625 5.39844 8.20312C5.35156 8.25 5.30729 8.30469 5.26562 8.36719C5.07292 8.65365 4.9375 8.96354 4.85938 9.29688C4.78125 9.63021 4.73958 9.96875 4.73438 10.3125C4.73438 10.401 4.73958 10.4896 4.75 10.5781C4.76042 10.6667 4.76562 10.7552 4.76562 10.8438C4.76562 10.8698 4.76302 10.8984 4.75781 10.9297C4.7526 10.9609 4.75 10.9896 4.75 11.0156C4.83854 11.0208 4.94271 11.0573 5.0625 11.125C5.18229 11.1927 5.3125 11.2786 5.45312 11.3828C5.59375 11.487 5.72656 11.6068 5.85156 11.7422C5.97656 11.8776 6.09635 12.0104 6.21094 12.1406C6.32552 12.2708 6.40885 12.401 6.46094 12.5312C6.51302 12.6615 6.54688 12.7682 6.5625 12.8516C6.5625 12.987 6.52083 13.0964 6.4375 13.1797C6.35417 13.263 6.25 13.3307 6.125 13.3828C6.21354 13.5391 6.32292 13.6719 6.45312 13.7812C6.58333 13.8906 6.72396 13.9792 6.875 14.0469C7.02604 14.1146 7.1901 14.1641 7.36719 14.1953C7.54427 14.2266 7.71615 14.2422 7.88281 14.2422ZM11.0156 15.3516C11.125 15.3516 11.2318 15.3359 11.3359 15.3047C11.4974 15.2578 11.6458 15.1901 11.7812 15.1016C11.9167 15.013 12.0417 14.9036 12.1562 14.7734C12.2969 14.612 12.4453 14.4714 12.6016 14.3516C12.7578 14.2318 12.9349 14.1224 13.1328 14.0234C13.2214 13.9818 13.3073 13.9427 13.3906 13.9062C13.474 13.8698 13.5599 13.8255 13.6484 13.7734C13.7057 13.737 13.7604 13.6927 13.8125 13.6406C13.8646 13.5885 13.8906 13.526 13.8906 13.4531C13.8906 13.4115 13.8828 13.3724 13.8672 13.3359C13.8516 13.2995 13.8281 13.2604 13.7969 13.2188C13.7188 13.1094 13.651 13.0078 13.5938 12.9141C13.5365 12.8203 13.487 12.7214 13.4453 12.6172C13.4036 12.513 13.362 12.4089 13.3203 12.3047C13.2786 12.2005 13.2422 12.0833 13.2109 11.9531C13.2057 11.9271 13.1875 11.8932 13.1562 11.8516C13.0469 11.6953 12.8932 11.6172 12.6953 11.6172C12.6016 11.6172 12.513 11.6406 12.4297 11.6875C12.3464 11.7344 12.2578 11.7839 12.1641 11.8359C12.0703 11.888 11.9766 11.9375 11.8828 11.9844C11.7891 12.0312 11.6901 12.0547 11.5859 12.0547C11.4818 12.0547 11.3958 12.0286 11.3281 11.9766C11.2604 11.9245 11.2031 11.8542 11.1562 11.7656C11.1094 11.6771 11.0703 11.5911 11.0391 11.5078C11.0078 11.4245 10.9766 11.3385 10.9453 11.25C10.9036 11.3177 10.8568 11.3802 10.8047 11.4375C10.7526 11.4948 10.7109 11.5625 10.6797 11.6406C10.612 11.7969 10.5703 11.9714 10.5547 12.1641C10.5286 12.4661 10.4948 12.7604 10.4531 13.0469C10.4115 13.3333 10.3411 13.6198 10.2422 13.9062C10.2161 13.9896 10.1953 14.0807 10.1797 14.1797C10.1641 14.2786 10.1536 14.375 10.1484 14.4688C10.1484 14.724 10.2266 14.9349 10.3828 15.1016C10.5391 15.2682 10.75 15.3516 11.0156 15.3516Z`},child:[]}]})(e)}function wd(e){return K({tag:`svg`,attr:{viewBox:`0 0 16 16`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M8 3.00002C8.552 3.00002 9 3.44802 9 4.00002C9 4.09002 8.988 4.17602 8.966 4.25902L10 5.29302L11.35 3.94302L8.692 1.29102C8.511 1.11102 8.261 0.999023 7.986 0.999023C7.711 0.999023 7.459 1.11102 7.278 1.29302L6.64 1.93302L7.741 3.03402C7.824 3.01202 7.91 3.00002 8 3.00002ZM7.5 4.86602C7.201 4.69302 7 4.37002 7 4.00002C7 3.91002 7.012 3.82402 7.034 3.74102L5.933 2.64002L4.642 3.93502L7.5 6.79302V4.86602ZM8.5 6.79302L9.293 6.00002L8.5 5.20702V6.79302ZM14.706 7.29202L12.057 4.64902L10.706 6.00002L11.74 7.03402C11.823 7.01202 11.909 7.00002 11.999 7.00002C12.551 7.00002 12.999 7.44802 12.999 8.00002C12.999 8.55202 12.551 9.00002 11.999 9.00002C11.447 9.00002 10.999 8.55202 10.999 8.00002C10.999 7.91002 11.011 7.82402 11.033 7.74102L9.999 6.70702L8.706 8.00002L12.063 11.357L14.707 8.70602C14.887 8.52502 14.999 8.27602 14.999 8.00002C14.999 7.72402 14.887 7.47302 14.705 7.29202H14.706ZM3.936 4.64302L1.292 7.29402C1.112 7.47502 1 7.72502 1 8.00002C1 8.27502 1.112 8.52702 1.294 8.70802L3.943 11.351L7.294 8.00002L3.936 4.64302ZM8.5 11.134C8.799 11.307 9 11.63 9 12C9 12.552 8.552 13 8 13C7.448 13 7 12.552 7 12C7 11.63 7.201 11.307 7.5 11.134V9.20702L4.65 12.057L7.308 14.709C7.489 14.889 7.739 15.001 8.014 15.001C8.289 15.001 8.541 14.889 8.722 14.707L11.357 12.065L8.499 9.20702V11.134H8.5Z`},child:[]}]})(e)}function Td(e){return K({tag:`svg`,attr:{viewBox:`0 0 16 16`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M12.5 1H3.5C2.119 1 1 2.119 1 3.5V12.5C1 13.881 2.119 15 3.5 15H12.5C13.881 15 15 13.881 15 12.5V3.5C15 2.119 13.881 1 12.5 1ZM14 12.5C14 13.328 13.328 14 12.5 14H3.5C2.672 14 2 13.328 2 12.5V5H14V12.5ZM14 4H2V3.5C2 2.672 2.672 2 3.5 2H12.5C13.328 2 14 2.672 14 3.5V4ZM4 10.508V8.508C4 7.681 4.673 7.008 5.5 7.008C6.327 7.008 7 7.681 7 8.508C7 8.784 6.776 9.008 6.5 9.008C6.224 9.008 6 8.784 6 8.508C6 8.232 5.776 8.008 5.5 8.008C5.224 8.008 5 8.232 5 8.508V10.508C5 10.783 5.224 11.008 5.5 11.008C5.776 11.008 6 10.783 6 10.508C6 10.233 6.224 10.008 6.5 10.008C6.776 10.008 7 10.232 7 10.508C7 11.335 6.327 12.008 5.5 12.008C4.673 12.008 4 11.335 4 10.508ZM8 8.5C8 8.224 8.224 8 8.5 8C8.776 8 9 8.224 9 8.5C9 8.776 8.776 9 8.5 9C8.224 9 8 8.776 8 8.5ZM8 10.5C8 10.224 8.224 10 8.5 10C8.776 10 9 10.224 9 10.5C9 10.776 8.776 11 8.5 11C8.224 11 8 10.776 8 10.5ZM9.532 7.676C9.434 7.417 9.565 7.129 9.824 7.032C10.08 6.936 10.371 7.066 10.468 7.324L11.968 11.324C12.066 11.583 11.935 11.871 11.676 11.968C11.618 11.99 11.559 12 11.5 12C11.298 12 11.107 11.876 11.032 11.676L9.532 7.676Z`},child:[]}]})(e)}function Ed(e){return K({tag:`svg`,attr:{viewBox:`0 0 16 16`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M13.6547 3.56163L8.91789 0.749977C8.64251 0.586821 8.32832 0.500732 8.00824 0.500732C7.68816 0.500732 7.37396 0.586821 7.09859 0.749977L2.36178 3.56163C2.08017 3.7296 1.84714 3.96798 1.68561 4.25334C1.52408 4.53869 1.43963 4.86118 1.44055 5.18908V10.8124C1.43877 11.1395 1.52198 11.4614 1.68201 11.7467C1.84205 12.032 2.07344 12.2708 2.35351 12.4398L7.09032 15.2515C7.36569 15.4146 7.67989 15.5007 7.99997 15.5007C8.32005 15.5007 8.63424 15.4146 8.90962 15.2515L13.6464 12.4398C13.9265 12.2708 14.1579 12.032 14.3179 11.7467C14.478 11.4614 14.5612 11.1395 14.5594 10.8124V5.18908C14.562 4.86277 14.4801 4.54134 14.3215 4.25613C14.163 3.97091 13.9332 3.73164 13.6547 3.56163ZM9.98632 12.3423V12.7458C9.986 12.7706 9.97948 12.795 9.96735 12.8167C9.95522 12.8383 9.93786 12.8566 9.91685 12.8699L9.67704 13.0071C9.639 13.027 9.60757 13.0071 9.60757 12.9542V12.5573C9.43807 12.6405 9.24411 12.6593 9.06178 12.6102C9.04762 12.6007 9.03722 12.5866 9.03239 12.5703C9.02755 12.554 9.02859 12.5365 9.03532 12.5209L9.12132 12.1554C9.12866 12.1246 9.14542 12.0968 9.16928 12.076C9.17614 12.0693 9.18394 12.0638 9.19244 12.0594C9.19844 12.0568 9.20492 12.0555 9.21146 12.0555C9.218 12.0555 9.22447 12.0568 9.23048 12.0594C9.39772 12.1042 9.57586 12.0817 9.72665 11.9966C9.83381 11.9442 9.92481 11.8638 9.99003 11.764C10.0552 11.6641 10.0923 11.5485 10.0971 11.4293C10.0971 11.2242 9.98466 11.1382 9.71342 11.1366C9.36941 11.1366 9.05186 11.0704 9.04359 10.5626C9.04754 10.3458 9.09941 10.1325 9.19548 9.93807C9.29156 9.74363 9.42946 9.57286 9.5993 9.43798V9.02947C9.59918 9.00433 9.6055 8.97957 9.61767 8.95757C9.62982 8.93557 9.64742 8.91704 9.66877 8.90377L9.90032 8.75657C9.93835 8.73672 9.96978 8.75657 9.96978 8.81115V9.21967C10.1116 9.1551 10.2699 9.13603 10.423 9.16509C10.4389 9.17416 10.4508 9.18892 10.4563 9.20639C10.4618 9.22387 10.4605 9.24279 10.4527 9.25936L10.3717 9.62157C10.3648 9.64915 10.3505 9.67432 10.3303 9.69434C10.3236 9.70156 10.3158 9.7077 10.3072 9.71253C10.2959 9.71631 10.2837 9.71631 10.2724 9.71253C10.1232 9.6798 9.967 9.70523 9.83581 9.78365C9.74024 9.825 9.6584 9.89266 9.59984 9.97876C9.54127 10.0649 9.50839 10.1658 9.50503 10.2699C9.50503 10.4551 9.60261 10.5114 9.93009 10.518C10.3684 10.518 10.5569 10.7165 10.5619 11.1564C10.5578 11.384 10.5042 11.608 10.4048 11.8127C10.3054 12.0175 10.1626 12.1982 9.98632 12.3423ZM12.4672 11.6625C12.47 11.6795 12.4682 11.697 12.4617 11.7131C12.4553 11.7291 12.4446 11.7431 12.4308 11.7535L11.2334 12.4812C11.2278 12.4859 11.2208 12.4888 11.2135 12.4894C11.2062 12.4899 11.1989 12.4881 11.1926 12.4843C11.1864 12.4804 11.1815 12.4747 11.1787 12.4679C11.1759 12.4611 11.1754 12.4536 11.1771 12.4465V12.1372C11.1779 12.1206 11.1835 12.1046 11.1932 12.0911C11.2029 12.0775 11.2162 12.0671 11.2317 12.0611L12.411 11.3549C12.4165 11.3501 12.4235 11.3472 12.4308 11.3467C12.4381 11.3461 12.4455 11.3479 12.4517 11.3518C12.458 11.3556 12.4628 11.3614 12.4656 11.3682C12.4684 11.375 12.4689 11.3825 12.4672 11.3896V11.6625ZM13.2941 4.74749L8.81204 7.51614C8.25302 7.84692 7.84119 8.20913 7.84119 8.88227V14.403C7.84119 14.8066 8.00658 15.0646 8.25467 15.144C8.17284 15.1594 8.08984 15.1677 8.00658 15.1688C7.74336 15.1682 7.48514 15.0968 7.25902 14.9621L2.52221 12.1504C2.29224 12.0111 2.10222 11.8147 1.97064 11.5802C1.83907 11.3458 1.7704 11.0812 1.77133 10.8124V5.18908C1.77012 4.91994 1.83864 4.65508 1.97024 4.4203C2.10183 4.18552 2.292 3.98884 2.52221 3.84941L7.25902 1.03776C7.48434 0.904297 7.7414 0.833879 8.00328 0.833879C8.26516 0.833879 8.52222 0.904297 8.74754 1.03776L13.4843 3.84941C13.6772 3.96611 13.8422 4.12352 13.9679 4.31063C14.0936 4.49775 14.177 4.71006 14.2121 4.93272C14.0583 4.59863 13.7043 4.50601 13.2925 4.74749H13.2941Z`},child:[]}]})(e)}function Dd(e){return K({tag:`svg`,attr:{viewBox:`0 0 16 16`,fill:`currentColor`},child:[{tag:`path`,attr:{fillRule:`evenodd`,clipRule:`evenodd`,d:`M7.97553 0C3.57186 0 0 3.57186 0 7.97553C0 11.4985 2.29969 14.4832 5.43119 15.5596C5.82263 15.6086 5.96942 15.3639 5.96942 15.1682C5.96942 14.9725 5.96942 14.4832 5.96942 13.7982C3.76758 14.2875 3.27829 12.7217 3.27829 12.7217C2.93578 11.792 2.39755 11.5474 2.39755 11.5474C1.66361 11.0581 2.44648 11.0581 2.44648 11.0581C3.22936 11.107 3.66972 11.8899 3.66972 11.8899C4.40367 13.1131 5.52905 12.7706 5.96942 12.5749C6.01835 12.0367 6.263 11.6942 6.45872 11.4985C4.69725 11.3028 2.83792 10.6177 2.83792 7.53517C2.83792 6.65443 3.1315 5.96942 3.66972 5.38226C3.6208 5.23547 3.32722 4.40367 3.76758 3.32722C3.76758 3.32722 4.4526 3.1315 5.96942 4.15902C6.6055 3.9633 7.29052 3.91437 7.97553 3.91437C8.66055 3.91437 9.34556 4.01223 9.98165 4.15902C11.4985 3.1315 12.1835 3.32722 12.1835 3.32722C12.6239 4.40367 12.3303 5.23547 12.2813 5.43119C12.7706 5.96942 13.1131 6.70336 13.1131 7.5841C13.1131 10.6667 11.2538 11.3028 9.49235 11.4985C9.78593 11.7431 10.0306 12.2324 10.0306 12.9664C10.0306 14.0428 10.0306 14.8746 10.0306 15.1682C10.0306 15.3639 10.1774 15.6086 10.5688 15.5596C13.7492 14.4832 16 11.4985 16 7.97553C15.9511 3.57186 12.3792 0 7.97553 0Z`},child:[]}]})(e)}function Od(e){return K({tag:`svg`,attr:{viewBox:`0 0 24 25`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M21.0346 5.82524C21.9445 6.91709 22.3994 8.19091 22.3994 9.64671C22.3994 14.924 19.3969 16.4707 16.5763 16.9257C16.9402 17.5626 17.0312 18.2905 17.0312 19.0184V22.7489C17.0312 23.2038 16.7582 23.4768 16.3943 23.4768C16.0303 23.4768 15.6664 23.2038 15.6664 22.7489V19.0184C15.7574 18.1995 15.4844 17.4716 14.9385 16.9257L15.3934 15.7428C18.214 15.3789 21.1256 14.469 21.1256 9.55572C21.1256 8.37289 20.6707 7.28104 19.8518 6.37117L19.6698 5.64327C20.0338 4.7334 20.0338 3.73254 19.7608 2.91365C19.3059 3.00464 18.396 3.18661 16.8492 4.27846L16.3033 4.36945C14.1196 3.82352 11.9359 3.82352 9.75222 4.36945L9.2063 4.27846C7.56853 3.2776 6.65866 3.00464 6.20372 3.00464C5.93076 3.91451 5.93076 4.91537 6.29471 5.73426L6.11274 6.46215C5.20286 7.37203 4.74793 8.55486 4.74793 9.64671C4.74793 14.469 7.47754 15.4699 10.4801 15.8338L10.8441 17.0167C10.2981 17.5626 10.0252 18.2905 10.1162 19.0184V19.9283V20.0192V22.8399C10.1162 23.2038 9.84321 23.5677 9.38828 23.5677C9.02433 23.5677 8.66038 23.2948 8.66038 22.8399V20.7471C5.6578 21.3841 4.47497 19.8373 3.5651 18.6544C3.11016 18.1085 2.74621 17.6536 2.29127 17.5626C2.20029 17.4716 1.92733 17.1077 2.01831 16.7437C2.1093 16.3798 2.47325 16.1068 2.8372 16.2888C3.74707 16.4707 4.29299 17.1986 4.83892 17.8356C5.6578 18.9274 6.47669 19.9283 8.93334 19.3823V19.0184C8.84235 18.2905 9.02433 17.5626 9.38828 16.9257C6.65866 16.3798 3.47411 14.833 3.47411 9.64671C3.47411 8.19091 3.92904 6.91709 4.83892 5.82524C4.56595 4.55142 4.65694 3.18661 5.11188 2.09477L5.56681 1.73082C5.74879 1.63983 7.02261 1.36687 9.66124 3.00464C11.8449 2.45872 14.1196 2.45872 16.3033 3.00464C18.8509 1.27588 20.2158 1.54884 20.3977 1.63983L20.8527 2.00378C21.3076 3.2776 21.3986 4.55142 21.0346 5.82524Z`},child:[]}]})(e)}function kd(e){return K({tag:`svg`,attr:{viewBox:`0 0 16 16`,fill:`currentColor`},child:[{tag:`path`,attr:{fillRule:`evenodd`,clipRule:`evenodd`,d:`M15.3702 13.6799L11.3702 1.67989C11.3006 1.47291 11.1652 1.29438 10.9846 1.17159C10.804 1.0488 10.5882 0.988513 10.3702 0.999896H5.63017C5.42052 0.999354 5.21598 1.0647 5.04551 1.18672C4.87504 1.30875 4.74724 1.48127 4.68015 1.67989L0.630165 13.6799C0.577646 13.8346 0.56382 13.9998 0.589943 14.1611C0.616066 14.3225 0.681335 14.4749 0.780007 14.6052C0.878678 14.7354 1.00778 14.8395 1.15598 14.9083C1.30419 14.9771 1.46699 15.0086 1.63017 14.9999H4.56016C4.76809 14.9984 4.97035 14.932 5.13883 14.8101C5.30731 14.6883 5.43363 14.5169 5.50016 14.3199L6.11015 12.5399L9.11015 14.8099C9.28448 14.9362 9.49495 15.0028 9.71018 14.9999H14.3902C14.5517 15.0052 14.7121 14.9712 14.8576 14.901C15.0032 14.8307 15.1295 14.7263 15.2259 14.5965C15.3222 14.4668 15.3856 14.3156 15.4107 14.156C15.4359 13.9963 15.422 13.833 15.3702 13.6799ZM9.75016 14.3399C9.67748 14.3399 9.60693 14.3153 9.55015 14.2699L3.90018 10.0799L3.81016 10.0099H6.81016L6.89017 9.79988L7.89017 7.26988L10.1302 13.8999C10.1482 13.9555 10.1515 14.0148 10.1399 14.072C10.1283 14.1293 10.1022 14.1826 10.064 14.2269C10.0258 14.2711 9.97689 14.3047 9.92191 14.3245C9.86694 14.3443 9.80778 14.3496 9.75016 14.3399ZM14.4201 14.3399H10.7002C10.7749 14.1262 10.7749 13.8935 10.7002 13.6799L6.65018 1.67989H10.3702C10.4408 1.68024 10.5095 1.70258 10.5669 1.74379C10.6242 1.78501 10.6673 1.84308 10.6902 1.9099L14.7402 13.9099C14.7538 13.9597 14.756 14.012 14.7464 14.0628C14.7369 14.1136 14.7159 14.1615 14.6851 14.203C14.6542 14.2444 14.6144 14.2783 14.5685 14.302C14.5226 14.3257 14.4718 14.3387 14.4201 14.3399Z`},child:[]}]})(e)}var Ad={computer:{icon:(0,U.jsx)(V,{icon:yo}),group:`Devices`},laptop:{icon:(0,U.jsx)(V,{icon:Io}),group:`Devices`},server:{icon:(0,U.jsx)(V,{icon:os}),group:`Devices`},cloud:{icon:(0,U.jsx)(V,{icon:go}),group:`Devices`},home:{icon:(0,U.jsx)(V,{icon:Mo}),group:`Devices`},office:{icon:(0,U.jsx)(V,{icon:io}),group:`Devices`},drive:{icon:(0,U.jsx)(V,{icon:Ao}),group:`Devices`},raspberrypi:{icon:(0,U.jsx)(Gu,{size:24}),group:`Devices`},macos:{icon:(0,U.jsx)(V,{icon:Ja,viewBox:`1.5 1.5 21 21`}),group:`Apple`},finder:{icon:(0,U.jsx)(Ru,{size:24}),group:`Apple`},apple:{icon:(0,U.jsx)(V,{icon:Ya}),group:`Apple`},applelogo:{icon:(0,U.jsx)(Nu,{size:24,viewBox:`-52 12 489 489`}),group:`Apple`},appletfi:{icon:(0,U.jsx)(yd,{size:24,viewBox:`-0.77 -0.77 18.54 18.54`}),group:`Apple`},appstore:{icon:(0,U.jsx)(Lu,{size:24}),group:`Apple`},appstoreoutline:{icon:(0,U.jsx)(V,{icon:qa}),group:`Apple`},windows:{icon:(0,U.jsx)(V,{icon:Wo}),group:`Windows`},windowslogo:{icon:(0,U.jsx)(ku,{size:24}),group:`Windows`},microsoft:{icon:(0,U.jsx)(ju,{size:24}),group:`Windows`},wsl:{icon:(0,U.jsx)(`svg`,{viewBox:`0 0 380 380`,width:24,height:24,fill:`currentColor`,children:(0,U.jsxs)(`g`,{transform:`translate(0,380) scale(0.1,-0.1)`,children:[(0,U.jsx)(`path`,{d:`M1693 3780 c-70 -10 -285 -65 -311 -80 -9 -6 -52 -25 -94 -44 -388 -173 -699 -573 -785 -1011 -16 -82 -18 -192 -20 -1305 -3 -1172 -3 -1216 15 -1250 11 -19 37 -45 58 -57 l39 -23 1297 0 c895 0 1305 3 1325 11 38 14 72 47 89 88 22 53 21 2278 -2 2441 -21 159 -65 304 -133 445 -132 273 -346 494 -613 635 -119 62 -201 93 -336 126 -91 22 -135 27 -287 29 -99 2 -208 0 -242 -5z m-278 -811 c139 -37 261 -135 321 -259 50 -102 56 -155 54 -429 -1 -135 -2 -250 -1 -256 1 -6 45 -10 111 -10 l110 0 0 281 c0 253 2 289 20 346 60 196 253 338 460 338 133 0 255 -55 350 -157 68 -73 92 -114 114 -200 23 -89 24 -1202 1 -1354 -57 -376 -307 -694 -655 -832 -153 -61 -212 -71 -400 -72 -169 0 -179 1 -289 33 -294 84 -516 263 -664 532 -38 70 -90 219 -108 309 -7 35 -13 289 -16 688 -4 568 -3 638 12 690 62 215 249 361 465 362 41 1 93 -4 115 -10z`}),(0,U.jsx)(`path`,{d:`M1210 2594 c-120 -52 -173 -198 -116 -320 50 -108 185 -162 292 -118 121 50 179 172 142 295 -15 52 -73 117 -122 140 -50 23 -147 24 -196 3z`}),(0,U.jsx)(`path`,{d:`M2383 2589 c-72 -35 -133 -133 -133 -212 0 -121 116 -237 239 -237 86 0 172 53 212 131 23 46 26 153 5 202 -19 45 -94 115 -136 127 -60 17 -141 12 -187 -11z`}),(0,U.jsx)(`path`,{d:`M2345 1572 c-19 -18 -148 -63 -238 -84 -70 -16 -125 -21 -232 -20 -144 0 -215 11 -344 53 -53 18 -65 19 -73 8 -8 -11 -9 -10 -4 3 3 10 1 20 -4 23 -14 9 -12 -58 3 -131 26 -121 112 -228 240 -296 l82 -43 120 0 c117 0 122 1 197 37 106 50 171 114 219 212 21 43 41 97 44 120 9 57 3 130 -10 118z`})]})}),group:`Windows`},powershell:{icon:(0,U.jsx)(Sd,{size:24}),group:`Windows`},cmd:{icon:(0,U.jsx)(Td,{size:24}),group:`Windows`},linux:{icon:(0,U.jsx)(Cd,{size:24}),group:`Linux & BSD`},ubuntu:{icon:(0,U.jsx)(Vu,{size:24}),group:`Linux & BSD`},ubuntufa:{icon:(0,U.jsx)(Au,{size:24}),group:`Linux & BSD`},ubuntufa6:{icon:(0,U.jsx)(Fu,{size:24}),group:`Linux & BSD`},linuxmint:{icon:(0,U.jsx)(ed,{size:24}),group:`Linux & BSD`},archlinux:{icon:(0,U.jsx)(gd,{size:24}),group:`Linux & BSD`},garuda:{icon:(0,U.jsx)(od,{size:24}),group:`Linux & BSD`},kali:{icon:(0,U.jsx)(J,{size:24}),group:`Linux & BSD`},debian:{icon:(0,U.jsx)(fd,{size:24}),group:`Linux & BSD`},fedora:{icon:(0,U.jsx)(cd,{size:24}),group:`Linux & BSD`},centos:{icon:(0,U.jsx)(pd,{size:24}),group:`Linux & BSD`},redhat:{icon:(0,U.jsx)(Uu,{size:24}),group:`Linux & BSD`},opensuse:{icon:(0,U.jsx)(Yu,{size:24}),group:`Linux & BSD`},manjaro:{icon:(0,U.jsx)($u,{size:24}),group:`Linux & BSD`},nixos:{icon:(0,U.jsx)(Zu,{size:24}),group:`Linux & BSD`},popos:{icon:(0,U.jsx)(Ju,{size:24}),group:`Linux & BSD`},alpine:{icon:(0,U.jsx)(_d,{size:24}),group:`Linux & BSD`},gentoo:{icon:(0,U.jsx)(ad,{size:24}),group:`Linux & BSD`},freebsd:{icon:(0,U.jsx)(sd,{size:24}),group:`Linux & BSD`},docker:{icon:(0,U.jsx)(ld,{size:24}),group:`Hosting`},proxmox:{icon:(0,U.jsx)(qu,{size:24}),group:`Hosting`},digitalocean:{icon:(0,U.jsx)(ud,{size:24}),group:`Hosting`},hetzner:{icon:(0,U.jsx)(id,{size:24}),group:`Hosting`},azure:{icon:(0,U.jsx)(kd,{size:24}),group:`Hosting`},asus:{icon:(0,U.jsx)(md,{size:24}),group:`Brands`},dell:{icon:(0,U.jsx)(dd,{size:24}),group:`Brands`},hp:{icon:(0,U.jsx)(rd,{size:24}),group:`Brands`},hpi:{icon:(0,U.jsx)(Iu,{size:24}),group:`Brands`},lenovo:{icon:(0,U.jsx)(q,{size:24}),group:`Brands`},acer:{icon:(0,U.jsx)(vd,{size:24}),group:`Brands`},msi:{icon:(0,U.jsx)(Qu,{size:24}),group:`Brands`},razer:{icon:(0,U.jsx)(Wu,{size:24}),group:`Brands`},samsung:{icon:(0,U.jsx)(Hu,{size:24}),group:`Brands`},huawei:{icon:(0,U.jsx)(nd,{size:24}),group:`Brands`},xiaomi:{icon:(0,U.jsx)(Bu,{size:24}),group:`Brands`},intel:{icon:(0,U.jsx)(td,{size:24}),group:`Brands`},amd:{icon:(0,U.jsx)(Ou,{size:24}),group:`Brands`},nvidia:{icon:(0,U.jsx)(Xu,{size:24}),group:`Brands`},arm:{icon:(0,U.jsx)(hd,{size:24}),group:`Brands`},qualcomm:{icon:(0,U.jsx)(Ku,{size:24}),group:`Brands`},android:{icon:(0,U.jsx)(V,{icon:Ka}),group:`Other`},chrome:{icon:(0,U.jsx)(Mu,{size:24}),group:`Other`},vscode:{icon:(0,U.jsx)(bd,{size:24}),group:`Other`},github:{icon:(0,U.jsx)(Dd,{size:24}),group:`Other`},githubalt:{icon:(0,U.jsx)(Od,{size:24}),group:`Other`},terminal:{icon:(0,U.jsx)(xd,{size:24}),group:`Other`},bash:{icon:(0,U.jsx)(Ed,{size:24}),group:`Other`},gitbash:{icon:(0,U.jsx)(wd,{size:24}),group:`Other`},zsh:{icon:(0,U.jsx)(zu,{size:24}),group:`Other`},fish:{icon:(0,U.jsx)(Pu,{size:24}),group:`Other`}},jd=[`macos`,`windows`,`linux`];function Md(e){if(e.icon===null)return(0,H.cloneElement)(Ad.computer.icon,{className:e.className});let t=Ad[e.icon];return t===void 0?(0,U.jsx)(V,{icon:jo,className:e.className}):(0,H.cloneElement)(t.icon,{className:e.className})}async function Nd(e,t){if(t.size>52428800)throw Error(`File is larger than 50 MB`);return R(e,`files.upload`,{name:t.name,data:await Pd(t)})}function Pd(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{let e=String(r.result);t(e.slice(e.indexOf(`,`)+1))},r.onerror=()=>n(r.error),r.readAsDataURL(e)})}function Fd(e){return(0,U.jsx)(`div`,{className:z(`mx-auto w-full`,e.width===`chat`&&`max-w-[min(var(--chat-content-max-width),calc(100%-2*var(--wrapper-gutter)))]`,e.width===`composer`&&`max-w-[calc(min(var(--chat-content-max-width),calc(100%-2*var(--wrapper-gutter)))+0.75rem)]`,e.className),children:e.children})}function Id(e){let t=Ct(e.draftKey).images;return(0,U.jsx)(`div`,{className:`mb-3 flex flex-wrap gap-2 px-3 sm:px-4`,children:t.map(t=>(0,U.jsxs)(`div`,{className:`border-border/80 bg-background relative size-16 overflow-hidden rounded-lg border`,children:[(0,U.jsx)(fe,{src:`data:${t.mediaType};base64,${t.data}`,alt:``,name:`Image #${t.number}`,className:`block size-full`,imageClassName:`size-full object-cover`}),(0,U.jsx)(`button`,{className:`absolute top-1 right-1 grid size-5 cursor-pointer place-items-center rounded-full bg-black/60 text-white`,title:`Remove image`,onClick:()=>it(e.draftKey,e=>({...e,text:e.text.replace(RegExp(`\\[Image #${t.number}\\] ?`),``),images:e.images.filter(e=>e.number!==t.number)})),children:(0,U.jsx)(V,{icon:mr,className:`size-3`})})]},t.number))})}function Ld(e,t){let n=0;for(let r of[...t,...e.flatMap(e=>e.parent===null?e.kind===`user`?[e.text]:e.kind===`question`&&e.answers!==null?Object.values(e.answers):[]:[])])for(let e of r.matchAll(/\[Image #(\d+)\]/g))n=Math.max(n,Number(e[1]));return n}function Rd(e){let t=[...new Set([...e.text.matchAll(/\[Image #(\d+)\]/g)].map(e=>Number(e[1])))].sort((e,t)=>e-t);if(t.length===e.images.length)return{text:e.text,images:e.images.map((e,n)=>({...e,number:t[n]}))};let n=Math.max(0,...t)+1,r=e.images.map((e,t)=>({...e,number:n+t}));return{text:`${r.map(e=>`[Image #${e.number}] `).join(``)}${e.text}`,images:r}}function zd(e){let t=(0,H.useRef)(null);return(0,H.useLayoutEffect)(()=>{t.current?.querySelector(`[data-active="true"]`)?.scrollIntoView({block:`nearest`})},[e.active]),(0,U.jsx)(`div`,{ref:t,className:`composer-glass mx-auto -mb-[calc(1rem+1px)] max-h-72 w-[calc(100%-2.75rem)] overflow-y-auto rounded-t-2xl border border-b-0 border-(--composer-outline) p-1 pb-[calc(1rem+1px+0.25rem)]`,children:e.items.map((t,n)=>(0,U.jsxs)(`button`,{"data-active":n===e.active,className:z(`flex min-h-7 w-full cursor-pointer items-center gap-2 rounded-lg px-2 py-1 text-left`,n===e.active&&`bg-accent`),onMouseEnter:()=>e.onHover(n),onMouseDown:n=>{n.preventDefault(),e.onPick(t)},children:[(0,U.jsx)(V,{icon:t.insert.startsWith(`/`)?ps:wo,className:`text-muted-foreground size-4 shrink-0`}),(0,U.jsx)(`span`,{className:`shrink-0 text-xs font-medium`,children:t.label}),(0,U.jsx)(`span`,{className:`text-secondary-label min-w-0 truncate text-xs`,children:t.description})]},t.key))})}var Bd={claude:[{value:`default`,label:`Ask before edits`,icon:ls},{value:`acceptEdits`,label:`Accept edits`,icon:To},{value:`plan`,label:`Plan mode`,icon:Bo},{value:`auto`,label:`Auto mode`,icon:xn},{value:`bypassPermissions`,label:`Bypass permissions`,icon:us}],codex:[{value:`read-only`,label:`Read only`,icon:ls},{value:`auto`,label:`Auto`,icon:To},{value:`full-access`,label:`Full access`,icon:us}]};function Vd(e,t){return e===`opencode`?(t?.agents??[]).map(e=>({value:e.id,label:e.name,icon:e.id===`plan`?Bo:To})):Bd[e]}function Hd(e){let t=L(e=>e.settings),n=L(e=>e.context),r=L(e=>e.capabilities),i=Vd(t.provider,r),a=i.find(e=>e.value===t.mode),o=t.provider===`opencode`?`Agent`:`Permission mode`;return(0,U.jsxs)(ve,{children:[(0,U.jsx)(P,{asChild:!0,children:(0,U.jsx)(B,{variant:`ghost`,size:`icon-sm`,title:`More`,"aria-label":`More composer controls`,children:(0,U.jsx)(V,{icon:nn})})}),(0,U.jsxs)(N,{className:`w-56`,side:`top`,align:`end`,onCloseAutoFocus:e=>{e.preventDefault(),document.querySelector(`[data-composer]`)?.focus()},children:[(0,U.jsxs)(Fe,{children:[(0,U.jsxs)(D,{children:[(0,U.jsx)(V,{icon:a?.icon??ls}),(0,U.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:a?.label??`Default`})]}),(0,U.jsx)(Vn,{children:(0,U.jsxs)(Be,{className:`w-56`,children:[(0,U.jsx)(we,{children:o}),(0,U.jsx)(l,{value:t.mode??``,children:i.map(e=>(0,U.jsxs)(Le,{value:e.value,onSelect:()=>Vt({mode:e.value}),children:[(0,U.jsx)(V,{icon:e.icon}),e.label]},e.value))})]})})]}),t.provider===`codex`&&(0,U.jsxs)(w,{checked:t.plan,onCheckedChange:e=>Vt({plan:e}),children:[(0,U.jsx)(V,{icon:Bo}),`Plan first`]}),n!==null&&(0,U.jsxs)(`div`,{className:`flex min-h-7 items-center gap-2 px-2 py-1 text-sm [&_svg]:size-4`,children:[(0,U.jsx)(V,{icon:oo}),(0,U.jsx)(`span`,{className:`flex-1`,children:`Context`}),(0,U.jsx)(`span`,{className:`text-muted-foreground text-xs tabular-nums`,children:Nn(n.tokens)}),(0,U.jsx)(B,{variant:`outline`,size:`xs`,onClick:()=>Re({text:`/compact`,images:[]},`queue`).catch(Ze),children:`Compact`})]}),e.delivery!==null&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(A,{}),(0,U.jsxs)(se,{disabled:e.empty,onSelect:e.onSubmit,children:[(0,U.jsx)(V,{icon:e.delivery===`steer`?ns:as}),(0,U.jsxs)(`span`,{className:`flex-1`,children:[e.delivery===`steer`&&`Queue`,e.delivery===`queue`&&`Send now`]}),(0,U.jsxs)(`span`,{className:`text-muted-foreground text-xs`,children:[Yn,`+Enter`]})]})]})]})]})}var Ud=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r)setTimeout(function(){r(e)},0);else return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h)d[r]=void 0;else{if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}},Wd=new class extends Ud{};function Gd(e,t,n){return Wd.diff(e,t,n)}function Kd(e,t){let n=0;for(;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function qd(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function Jd(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function Yd(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function Xd(e,t){return Jd(e,t,``)}function Zd(e,t){return Yd(e,t,``)}function Qd(e,t){return t.slice(0,$d(e,t))}function $d(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function ef(e,t){let n=[];for(let r of Array.from(t.segment(e))){let e=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function tf(e,t){if(t)return rf(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function nf(e,t){if(t)return rf(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:``}function rf(e,t){if(!t)return[nf(e),tf(e)];if(t.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);let n=ef(e,t),r=n[0],i=n[n.length-1];return[/\s/.test(r)?r:``,/\s/.test(i)?i:``]}var af=`a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}`,of=RegExp(`[${af}]+|\\s+|[^${af}]`,`ug`);new class extends Ud{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=ef(e,r)}else n=e.match(of)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&sf(n,i,r,e,t.intlSegmenter),n=e,r=null,i=null)}),(r||i)&&sf(n,i,r,null,t.intlSegmenter),e}};function sf(e,t,n,r,i){if(t&&n){let[a,o]=rf(t.value,i),[s,c]=rf(n.value,i);if(e){let r=Kd(a,s);e.value=Yd(e.value,s,r),t.value=Xd(t.value,r),n.value=Xd(n.value,r)}if(r){let e=qd(o,c);r.value=Jd(r.value,c,e),t.value=Zd(t.value,e),n.value=Zd(n.value,e)}}else if(n){if(e){let e=nf(n.value,i);n.value=n.value.substring(e.length)}if(r){let e=nf(r.value,i);r.value=r.value.substring(e.length)}}else if(e&&r){let n=nf(r.value,i),[a,o]=rf(t.value,i),s=Kd(n,a);t.value=Xd(t.value,s);let c=qd(Xd(n,s),o);t.value=Zd(t.value,c),r.value=Jd(r.value,n,c),e.value=Yd(e.value,n,n.slice(0,n.length-c.length))}else if(r){let e=nf(r.value,i),n=Qd(tf(t.value,i),e);t.value=Zd(t.value,n)}else if(e){let n=Qd(tf(e.value,i),nf(t.value,i));t.value=Xd(t.value,n)}}var cf=new class extends Ud{tokenize(e){let t=RegExp(`(\\r?\\n)|[${af}]+|[^\\S\\n\\r]+|[^${af}]`,`ug`);return e.match(t)||[]}};function lf(e,t,n){return cf.diff(e,t,n)}var uf=new class extends Ud{constructor(){super(...arguments),this.tokenize=ff}equals(e,t,n){return n.ignoreWhitespace?(n.newlineIsToken&&e.includes(`
|
|
11
|
+
`)||(e=e.trim()),n.newlineIsToken&&t.includes(`
|
|
12
|
+
`)||(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
|
|
13
|
+
`)&&(e=e.slice(0,-1)),t.endsWith(`
|
|
14
|
+
`)&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function df(e,t,n){return uf.diff(e,t,n)}function ff(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
15
|
+
`));let n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let e=0;e<r.length;e++){let i=r[e];e%2&&!t.newlineIsToken?n[n.length-1]+=i:n.push(i)}return n}function pf(e){return e==`.`||e==`!`||e==`?`}new class extends Ud{tokenize(e){let t=[],n=0;for(let r=0;r<e.length;r++){if(r==e.length-1){t.push(e.slice(n));break}if(pf(e[r])&&e[r+1].match(/\s/)){for(t.push(e.slice(n,r+1)),r=n=r+1;e[r+1]?.match(/\s/);)r++;t.push(e.slice(n,r+1)),n=r+1}}return t}},new class extends Ud{tokenize(e){return e.split(/([{}:;,]|\s+)/)}},new class extends Ud{constructor(){super(...arguments),this.tokenize=ff}get useLongestToken(){return!0}castInput(e,t){let{undefinedReplacement:n,stringifyReplacer:r=(e,t)=>t===void 0?n:t}=t;return typeof e==`string`?e:JSON.stringify(mf(e,null,null,r),null,` `)}equals(e,t,n){return super.equals(e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`),n)}};function mf(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i===void 0?``:i,e));let a=0;for(;a<t.length;a+=1)if(t[a]===e)return n[a];let o;if(Object.prototype.toString.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=mf(e[a],t,n,r,String(a));return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e==`object`&&e){t.push(e),o={},n.push(o);let i=[],s;for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&i.push(s);for(i.sort(),a=0;a<i.length;a+=1)s=i[a],o[s]=mf(e[s],t,n,r,s);t.pop(),n.pop()}else o=e;return o}new class extends Ud{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};function hf(e){for(let t=0;t<e.length;t++)if(e[t]<` `||e[t]>`~`||e[t]===`"`||e[t]===`\\`)return!0;return!1}function gf(e){if(!hf(e))return e;let t=`"`,n=new TextEncoder().encode(e),r=0;for(;r<n.length;){let e=n[r];t+=e===7?`\\a`:e===8?`\\b`:e===9?`\\t`:e===10?`\\n`:e===11?`\\v`:e===12?`\\f`:e===13?`\\r`:e===34?`\\"`:e===92?`\\\\`:e>=32&&e<=126?String.fromCharCode(e):`\\`+e.toString(8).padStart(3,`0`),r++}return t+=`"`,t}var _f={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function vf(e,t,n,r,i,a,o){let s;s=o?typeof o==`function`?{callback:o}:o:{},s.context===void 0&&(s.context=4);let c=s.context;if(s.newlineIsToken)throw Error(`newlineIsToken may not be used with patch-generation functions, only with diffing functions`);if(s.callback){let{callback:e}=s;df(n,r,Object.assign(Object.assign({},s),{callback:t=>{let n=l(t);e(n)}}))}else return l(df(n,r,s));function l(n){if(!n)return;n.push({value:``,lines:[]});function r(e){return e.map(function(e){return` `+e})}let o=[],s=0,l=0,u=[],d=1,f=1;for(let e=0;e<n.length;e++){let t=n[e],i=t.lines||xf(t.value);if(t.lines=i,t.added||t.removed){if(!s){let t=n[e-1];s=d,l=f,t&&(u=c>0?r(t.lines.slice(-c)):[],s-=u.length,l-=u.length)}for(let e of i)u.push((t.added?`+`:`-`)+e);t.added?f+=i.length:d+=i.length}else{if(s){if(i.length<=c*2&&e<n.length-2)for(let e of r(i))u.push(e);else{let e=Math.min(i.length,c);for(let t of r(i.slice(0,e)))u.push(t);let t={oldStart:s,oldLines:d-s+e,newStart:l,newLines:f-l+e,lines:u};o.push(t),s=0,l=0,u=[]}}d+=i.length,f+=i.length}}for(let e of o)for(let t=0;t<e.lines.length;t++)e.lines[t].endsWith(`
|
|
16
|
+
`)?e.lines[t]=e.lines[t].slice(0,-1):(e.lines.splice(t+1,0,`\`),t++);return{oldFileName:e,newFileName:t,oldHeader:i,newHeader:a,hunks:o}}}function yf(e,t){if(t||=_f,Array.isArray(e)){if(e.length>1&&!t.includeFileHeaders&&!e.every(e=>e.isGit))throw Error(`Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)`);return e.map(e=>yf(e,t)).join(`
|
|
17
|
+
`)}let n=[];if(e.isGit){if(t=_f,!e.oldFileName)throw Error(`oldFileName must be specified for Git patches`);if(!e.newFileName)throw Error(`newFileName must be specified for Git patches`);let r=e.oldFileName,i=e.newFileName;e.isCreate&&r===`/dev/null`?r=i.replace(/^b\//,`a/`):e.isDelete&&i===`/dev/null`&&(i=r.replace(/^a\//,`b/`)),n.push(`diff --git `+gf(r)+` `+gf(i)),e.isDelete&&n.push(`deleted file mode `+(e.oldMode??`100644`)),e.isCreate&&n.push(`new file mode `+(e.newMode??`100644`)),e.oldMode&&e.newMode&&!e.isDelete&&!e.isCreate&&(n.push(`old mode `+e.oldMode),n.push(`new mode `+e.newMode)),e.isRename&&(n.push(`rename from `+gf((e.oldFileName??``).replace(/^a\//,``))),n.push(`rename to `+gf((e.newFileName??``).replace(/^b\//,``)))),e.isCopy&&(n.push(`copy from `+gf((e.oldFileName??``).replace(/^a\//,``))),n.push(`copy to `+gf((e.newFileName??``).replace(/^b\//,``))))}else t.includeIndex&&e.oldFileName==e.newFileName&&e.oldFileName!==void 0&&n.push(`Index: `+e.oldFileName),t.includeUnderline&&n.push(`===================================================================`);let r=e.hunks.length>0;t.includeFileHeaders&&e.oldFileName!==void 0&&e.newFileName!==void 0&&(!e.isGit||r)&&(n.push(`--- `+gf(e.oldFileName)+(e.oldHeader?` `+e.oldHeader:``)),n.push(`+++ `+gf(e.newFileName)+(e.newHeader?` `+e.newHeader:``)));for(let t=0;t<e.hunks.length;t++){let r=e.hunks[t],i=r.oldLines===0?r.oldStart-1:r.oldStart,a=r.newLines===0?r.newStart-1:r.newStart;n.push(`@@ -`+i+`,`+r.oldLines+` +`+a+`,`+r.newLines+` @@`);for(let e of r.lines)n.push(e)}return n.join(`
|
|
18
|
+
`)+`
|
|
19
|
+
`}function bf(e,t,n,r,i,a,o){if(typeof o==`function`&&(o={callback:o}),o?.callback){let{callback:s}=o;vf(e,t,n,r,i,a,Object.assign(Object.assign({},o),{callback:e=>{s(e?yf(e,o.headerOptions):void 0)}}))}else{let s=vf(e,t,n,r,i,a,o);return s?yf(s,o?.headerOptions):void 0}}function xf(e){let t=e.endsWith(`
|
|
20
|
+
`),n=e.split(`
|
|
21
|
+
`).map(e=>e+`
|
|
22
|
+
`);return t?n.pop():n.push(n.pop().slice(0,-1)),n}function Sf(e){let t=e.item;switch(t.kind){case`file_change`:return(0,U.jsx)(`div`,{className:`flex flex-col gap-2`,children:t.diffs.map((e,t)=>(0,U.jsx)(Of,{before:e.before,after:e.after},t))});case`todo_list`:return(0,U.jsx)(`ul`,{className:`flex flex-col gap-1 text-sm`,children:t.steps.map((e,t)=>(0,U.jsxs)(`li`,{className:z(`text-secondary-label`,e.status===`completed`&&`text-muted-foreground line-through`,e.status===`running`&&`text-foreground`),children:[e.status===`completed`?`☑`:`☐`,` `,e.text]},t))});case`plan`:return(0,U.jsx)(Rt,{text:t.plan});case`tool`:return wf(t.name)===`other`?(0,U.jsx)(Df,{text:JSON.stringify(t.input,null,2)}):null;default:return null}}function Cf(e,t){switch(e.kind){case`command`:return e.command;case`file_change`:return Af(e.path,t);case`web_search`:return e.url??e.query??``;case`subagent`:return e.description;case`skill`:return e.skill;case`tool`:{let n=wf(e.name);return n===`read`?Af(Tf(e.input),t):n===`search`?kf(e.input.pattern):``}default:return``}}function wf(e){switch(e.toLowerCase()){case`read`:return`read`;case`grep`:case`glob`:return`search`;default:return`other`}}function Tf(e){return[e.file_path,e.filePath,e.path].map(kf).find(e=>e!==``)??``}function Ef(e){let t=0,n=0;for(let r of e.diffs)for(let e of df(r.before,r.after))e.added&&(t+=e.count),e.removed&&(n+=e.count);return{added:t,removed:n}}function Df(e){return(0,U.jsx)(`pre`,{className:`text-foreground/80 text-2xs max-h-64 overflow-auto font-mono leading-relaxed whitespace-pre-wrap`,children:e.text})}function Of(e){return(0,U.jsx)(`pre`,{className:`border-border/60 text-2xs max-h-80 overflow-auto rounded-md border font-mono leading-relaxed`,children:df(e.before,e.after).flatMap((e,t)=>e.value.replace(/\n$/,``).split(`
|
|
23
|
+
`).map((n,r)=>(0,U.jsxs)(`div`,{className:z(`px-2 whitespace-pre-wrap`,e.added&&`bg-diff-addition/10 text-diff-addition`,e.removed&&`bg-diff-deletion/10 text-diff-deletion`,!e.added&&!e.removed&&`text-muted-foreground`),children:[e.added?`+`:e.removed?`-`:` `,` `,n]},`${t}:${r}`)))})}function kf(e){return typeof e==`string`?e:``}function Af(e,t){return e.startsWith(t+`/`)||e.startsWith(t+`\\`)?e.slice(t.length+1):e}var jf=`(Recommended)`;function Mf(e){let t=e.options.map(e=>e.label).filter(e=>e.endsWith(jf));return e.multiSelect?t:t.slice(0,1)}function Nf(e){return(0,U.jsxs)(`span`,{className:z(`mt-0.5 grid size-4 shrink-0 place-items-center border transition-colors`,e.multi?`rounded`:`rounded-full`,e.selected&&`border-primary bg-primary text-primary-foreground`,e.suggested&&`border-primary border-dashed`,!e.selected&&!e.suggested&&`border-muted-foreground/40`),children:[e.selected&&e.multi&&(0,U.jsx)(V,{icon:Dt,strokeWidth:3,className:`size-3`}),e.selected&&!e.multi&&(0,U.jsx)(`span`,{className:`bg-primary-foreground size-1.5 rounded-full`})]})}function Pf(e){let[t,n]=(0,H.useState)(Date.now);(0,H.useEffect)(()=>{let e=setInterval(()=>n(Date.now()),1e3);return()=>clearInterval(e)},[]);let r=Math.max(0,Math.ceil((e.at-t)/1e3));return(0,U.jsxs)(`span`,{className:`text-muted-foreground text-2xs mr-1 tabular-nums`,children:[e.label,` in`,` `,r<60?`${r}s`:`${Math.ceil(r/60)}m`]})}var Ff=`composer-glass relative mx-auto -mb-[calc(1rem+1px)] w-[calc(100%-2.75rem)] rounded-t-2xl border border-b-0 px-1 pt-1 pb-[calc(1rem+1px+0.25rem)] text-xs/4`;function If(e){let t=e.request;if(t.kind===`question`)return(0,U.jsx)(Lf,{machine:e.machine,request:t,draft:e.draft});let n=t.kind===`plan`,r=n?``:Cf(t.item,e.cwd);return(0,U.jsx)(`div`,{className:z(Ff,`border-warning/28 bg-linear-to-b from-warning/8 to-warning/8`),children:(0,U.jsxs)(`div`,{className:`grid grid-cols-[1.5rem_minmax(0,1fr)_auto] items-start gap-x-2 gap-y-3 px-1 py-1`,children:[(0,U.jsx)(`span`,{className:`text-warning flex justify-center pt-0.5`,children:(0,U.jsx)(V,{icon:cs,className:`size-4`})}),(0,U.jsxs)(`span`,{className:`flex min-w-0 flex-col items-start gap-1`,children:[(0,U.jsxs)(`span`,{className:`text-muted-foreground text-2xs flex w-full min-w-0 items-center gap-2`,children:[(0,U.jsx)(`span`,{className:`text-warning shrink-0 font-medium`,children:n?`Ready to code?`:t.title}),e.count>1&&(0,U.jsxs)(`span`,{className:`ml-auto shrink-0 tabular-nums`,children:[`1/`,e.count]})]}),r!==``&&(0,U.jsx)(`span`,{className:`text-foreground block max-h-20 w-full min-w-0 overflow-auto font-mono text-xs whitespace-pre`,children:r})]}),(0,U.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1.5`,children:[t.autoResolve!==void 0&&(0,U.jsx)(Pf,{label:t.autoResolve.decision===`allow`?`Approve`:`Decline`,at:t.autoResolve.at}),(0,U.jsx)(B,{size:`xs`,variant:`outline`,onClick:()=>u(t.id,`deny`,null),children:n?`Keep planning`:`Decline`}),t.kind===`approval`&&t.canAlwaysAllow&&(0,U.jsx)(B,{size:`xs`,variant:`outline`,onClick:()=>u(t.id,`always`,null),children:`Always`}),(0,U.jsx)(B,{size:`xs`,onClick:()=>u(t.id,`allow`,null),children:n?`Approve plan`:`Approve`})]}),n&&(0,U.jsx)(`div`,{className:`col-span-3 max-h-60 overflow-auto px-1 empty:hidden`,children:(0,U.jsx)(Rt,{text:t.plan})}),t.kind===`approval`&&t.item.kind!==`command`&&(0,U.jsx)(`div`,{className:`col-span-3 max-h-60 overflow-auto px-1 empty:hidden`,children:(0,U.jsx)(Sf,{item:t.item})})]})})}function Lf(e){let t=e.request.questions,[n,r]=(0,H.useState)(0),[i,a]=(0,H.useState)({}),[o,s]=(0,H.useState)({}),c=Object.fromEntries(t.map(e=>[e.question,[...i[e.question]??[],o[e.question]?.trim()??``].filter(e=>e!==``)])),l=Object.fromEntries(t.map(e=>[e.question,(c[e.question].length>0?c[e.question]:Mf(e)).join(`, `)])),d=t[n],f=t.flatMap((e,t)=>c[e.question].length===0?[t]:[]),p=f.find(e=>e>n)??f[0];function m(e,c){let l=i[e.question]??[];e.multiSelect?a({...i,[e.question]:l.includes(c)?l.filter(e=>e!==c):[...l,c]}):(a({...i,[e.question]:[c]}),s({...o,[e.question]:``}),n<t.length-1&&r(n+1))}function h(e,t){s({...o,[e.question]:t}),!e.multiSelect&&t.trim()!==``&&a({...i,[e.question]:[]})}async function g(t,n){let r=Ld(I().items,[e.draft,...Object.values(o)]);for(let i of n)try{let n=await Nd(e.machine,i),o=n;i.type.startsWith(`image/`)&&(r+=1,o=`[Image #${r}] (saved at ${n})`),s(e=>{let n=e[t.question]??``;return{...e,[t.question]:`${n}${/(^|\s)$/.test(n)?``:` `}${o}`}}),t.multiSelect||a(e=>({...e,[t.question]:[]}))}catch(e){Ze(e)}}return(0,U.jsx)(`div`,{className:`composer-glass shadow-composer relative z-10 rounded-3xl border border-(--composer-outline)`,children:(0,U.jsxs)(`div`,{className:`flex flex-col gap-2 p-2.5`,children:[(0,U.jsxs)(`div`,{role:`tabpanel`,className:`flex min-w-0 flex-col gap-2`,children:[(0,U.jsxs)(`div`,{className:`mb-1 flex items-start gap-1.5 pt-1 pr-1 pl-1.5`,children:[(0,U.jsx)(`span`,{className:`bg-primary/18 text-primary grid size-6 shrink-0 place-items-center rounded-md`,children:(0,U.jsx)(V,{icon:Uo,className:`size-4`})}),(0,U.jsx)(`p`,{className:`text-foreground min-w-0 flex-1 pt-0.5 text-[15px] leading-5 font-medium`,children:d.question}),(0,U.jsx)(B,{size:`icon-xs`,variant:`ghost`,"aria-label":`Skip questions`,title:`Skip questions`,onClick:()=>u(e.request.id,`deny`,null),children:(0,U.jsx)(V,{icon:mr})})]}),(0,U.jsxs)(`div`,{role:d.multiSelect?`group`:`radiogroup`,"aria-label":d.question,className:`flex max-h-[min(18rem,32dvh)] flex-col gap-0.5 overflow-y-auto`,children:[d.options.map(e=>{let t=i[d.question]?.includes(e.label)===!0,n=c[d.question].length===0&&Mf(d).includes(e.label),r=e.label.endsWith(jf);return(0,U.jsxs)(`button`,{role:d.multiSelect?`checkbox`:`radio`,"aria-checked":t,className:z(`flex cursor-pointer items-start gap-2.5 rounded-lg px-2.5 py-2 text-left transition-colors`,t?`bg-muted/70`:`hover:bg-muted/40`),onClick:()=>m(d,e.label),children:[(0,U.jsx)(Nf,{multi:d.multiSelect,selected:t,suggested:n}),(0,U.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,U.jsxs)(`span`,{className:`flex items-baseline gap-2`,children:[(0,U.jsx)(`span`,{className:`text-foreground text-sm`,children:r?e.label.slice(0,-13).trim():e.label}),r&&(0,U.jsx)(`span`,{className:`text-muted-foreground/70 text-[11px]`,children:`Recommended`})]}),e.description!==``&&(0,U.jsx)(`span`,{className:`text-secondary-label mt-0.5 block text-xs leading-4`,children:e.description})]})]},e.label)}),(0,U.jsxs)(`label`,{className:z(`flex cursor-text items-start gap-2.5 rounded-lg px-2.5 py-2 transition-colors`,(o[d.question]??``).trim()===``?`focus-within:bg-muted/40 hover:bg-muted/40`:`bg-muted/70`),children:[(0,U.jsx)(Nf,{multi:d.multiSelect,selected:(o[d.question]??``).trim()!==``,suggested:!1}),(0,U.jsx)(`textarea`,{value:o[d.question]??``,rows:1,onChange:e=>h(d,e.target.value),onPaste:e=>{let t=e.clipboardData.getData(`text/plain`);if(t!==``){e.preventDefault(),document.execCommand(`insertText`,!1,t);return}let n=[...e.clipboardData.files];n.length!==0&&(e.preventDefault(),g(d,n))},onDragOver:e=>e.preventDefault(),onDrop:e=>{e.preventDefault(),g(d,[...e.dataTransfer.files])},placeholder:`Something else…`,className:`placeholder:text-placeholder/75 [field-sizing:content] max-h-40 min-w-0 flex-1 resize-none bg-transparent text-sm leading-5 outline-none`})]})]})]},d.question),(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[t.length>1&&(0,U.jsx)(`div`,{role:`tablist`,className:`flex min-w-0 [scrollbar-width:none] gap-1 overflow-x-auto`,children:t.map((e,t)=>(0,U.jsxs)(`button`,{role:`tab`,"aria-selected":t===n,className:z(`flex h-6 shrink-0 cursor-pointer items-center gap-1.5 rounded-md px-2.5 text-xs font-medium transition-colors`,t===n?`bg-muted text-foreground`:`text-muted-foreground hover:bg-muted/50 hover:text-foreground`),onClick:()=>r(t),children:[c[e.question].length>0&&(0,U.jsx)(V,{icon:co,"aria-label":`Answered`,className:`text-success size-3.5`}),c[e.question].length===0&&l[e.question]!==``&&(0,U.jsx)(V,{icon:sn,"aria-label":`Using the recommended answer`,className:`text-primary size-3.5`}),l[e.question]===``&&(0,U.jsx)(V,{icon:jo,"aria-label":`Not answered`,className:`text-muted-foreground size-3.5`}),e.header]},e.question))}),(0,U.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-1.5 pr-1`,children:[e.request.autoResolve!==void 0&&(0,U.jsx)(Pf,{label:`Skip`,at:e.request.autoResolve.at}),(0,U.jsx)(B,{size:`xs`,variant:`outline`,onClick:()=>u(e.request.id,`allow`,{}),children:`Skip`}),(0,U.jsx)(B,{size:`xs`,variant:p===void 0?`default`:`outline`,onClick:()=>u(e.request.id,`allow`,Object.fromEntries(t.flatMap(e=>c[e.question].length===0?[]:[[e.question,c[e.question].join(`, `)]]))),children:`Submit`}),p!==void 0&&(0,U.jsx)(B,{size:`xs`,onClick:()=>{c[d.question].length===0&&a({...i,[d.question]:Mf(d)}),r(p)},children:`Next`})]})]})]})})}function Rf(e,t,n,r,i){let a=zf(e,n,r+Math.asin(.5/n)),o=zf(e,n,i-Math.asin(.5/n)),s=zf(e,t,i-Math.asin(.5/t)),c=zf(e,t,r+Math.asin(.5/t)),l=[a,o,s,c,...r<Math.PI/2&&i>Math.PI/2?[zf(e,n,Math.PI/2)]:[]],u=Math.min(...l.map(e=>e.x)),d=Math.min(...l.map(e=>e.y)),f=zf(e,(t+n)/2,(r+i)/2);return{style:{left:u,top:d,width:Math.max(...l.map(e=>e.x))-u,height:Math.max(...l.map(e=>e.y))-d,clipPath:`path('M${a.x-u} ${a.y-d} A${n} ${n} 0 0 0 ${o.x-u} ${o.y-d} L${s.x-u} ${s.y-d} A${t} ${t} 0 0 1 ${c.x-u} ${c.y-d}Z')`},center:{left:f.x-u,top:f.y-d}}}function zf(e,t,n){return{x:e+t*Math.cos(n),y:e-t*Math.sin(n)}}var Bf=`relative inline-flex shrink-0 cursor-pointer items-center justify-center whitespace-nowrap rounded-(--control-radius) border border-transparent outline-none hover:bg-accent data-[state=open]:bg-accent focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-64 [&_svg]:pointer-events-none [&_svg]:shrink-0`,Vf=`h-7 gap-1.5 px-1.5 text-sm font-medium text-secondary-label hover:text-foreground [&_svg:not([class*=text-])]:text-muted-foreground [&_svg:not([class*=size-])]:size-4`;function Hf(){let e=L(e=>e.settings),t=L(e=>e.capabilities)?.models.find(t=>t.value===e.model);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Uf,{}),(0,U.jsx)(`span`,{className:`bg-border mx-0.5 hidden h-4 w-px shrink-0 sm:block`}),t!==void 0&&t.efforts.length>0&&(0,U.jsx)(Wf,{title:`Effort`,trigger:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(V,{icon:to}),(0,U.jsx)(`span`,{className:`capitalize`,children:e.effort??`Default`})]}),value:e.effort??`default`,options:[...e.provider===`opencode`?[{value:`default`,label:`Default`}]:[],...t.efforts.map(e=>({value:e,label:e.charAt(0).toUpperCase()+e.slice(1)}))],onChange:e=>Vt({effort:e==="default"?null:e})})]})}function Uf(){let e=L(e=>e.settings),t=L(e=>e.selection),n=L(e=>e.machines.find(t=>t.id===e.selection?.machine)),r=[...[...n?.claudeAccounts??[],...n?.codexAccounts??[]].filter(e=>e.valid).map(e=>({key:e.id,provider:e.provider,accountId:e.id,name:e.name,color:e.color,plan:e.plan,error:e.error})),...n?.openCode.available===!0?[{key:`opencode`,provider:`opencode`,accountId:null,name:`OpenCode`,color:null,plan:null,error:null}]:[]].filter(n=>t?.sessionId===null||n.provider===e.provider),i=e.provider===`opencode`?`opencode`:e.accountId,a=L(e=>e.capabilities),[o,s]=(0,H.useState)(!1),[c,l]=(0,H.useState)(i),[u,d]=(0,H.useState)(``),[f,p]=(0,H.useState)({}),m=(0,H.useRef)(null),h=a?.models.find(t=>t.value===e.model)?.name??e.model??`Choose a model`,_=r.find(e=>e.key===i),v=c===null?[]:c===i?a?.models??null:f[c]??null,y=r.find(e=>e.key===c)?.provider,x=(v??[]).filter(e=>!e.hidden),S=x.length>=5,C=S?u.trim().toLowerCase():``,w=x.filter(e=>`${e.name} ${e.description}`.toLowerCase().includes(C));function T(e){if(s(e),e&&(l(i),d(``),t!==null))for(let e of r)e.key!==i&&e.error===null&&R(t.machine,`capabilities`,{provider:e.provider,accountId:e.accountId,projectId:t.projectId}).then(t=>p(n=>({...n,[e.key]:t.models})),Ze)}function E(n,i){let a=r.find(e=>e.key===n);if(a===void 0||t===null)return;let o=a.provider,s={accountId:a.accountId,model:i.value,...i.effort===null?{}:{effort:i.effort}};o===e.provider?Vt(s):Vt({...Lt(He(I(),t.machine).composer,o),...s})}return(0,U.jsxs)(b,{open:o,onOpenChange:T,children:[(0,U.jsx)(me,{asChild:!0,children:(0,U.jsxs)(`button`,{className:z(Bf,Vf),title:_===void 0?`Model`:`${_.name} · ${h}`,children:[(0,U.jsxs)(`span`,{className:`relative`,children:[(0,U.jsx)(pc,{provider:e.provider,className:`size-4`}),r.filter(t=>t.provider===e.provider).length>1&&_!==void 0&&(0,U.jsx)(`span`,{className:z(`pointer-events-none absolute -right-1 -bottom-1 flex h-3 min-w-3 items-center justify-center rounded-full border px-0.5 text-[8px] leading-none font-semibold shadow-sm`,_.color===null?`bg-card text-muted-foreground`:`border-card text-white`),style:_.color===null?void 0:{backgroundColor:_.color},children:_.name.charAt(0).toUpperCase()})]}),(0,U.jsx)(`span`,{className:`max-w-40 truncate`,children:h})]})}),(0,U.jsxs)(g,{side:`top`,className:`flex max-h-86.5 w-screen max-w-90 flex-row`,onOpenAutoFocus:e=>{e.preventDefault(),m.current?.focus()},onCloseAutoFocus:e=>{e.preventDefault(),document.querySelector(`[data-composer]`)?.focus()},children:[r.length>1&&(0,U.jsxs)(`div`,{className:`bg-muted/30 flex w-11 shrink-0 [scrollbar-width:none] flex-col gap-1 overflow-y-auto p-1`,children:[r.map(t=>(0,U.jsxs)(`div`,{className:`relative w-full`,children:[t.key===c&&(0,U.jsx)(`div`,{className:`bg-primary pointer-events-none absolute top-1/2 -right-1 z-10 h-5 w-0.75 -translate-y-1/2 rounded-l-full`}),(0,U.jsx)(Pr,{side:`left`,label:t.error===null?[t.name,t.plan].filter(e=>e!==null).join(` · `):`${t.name} — ${t.error}`,children:(0,U.jsxs)(`button`,{className:z(`hover:bg-foreground/10 focus-visible:bg-foreground/10 relative flex aspect-square w-full cursor-pointer items-center justify-center rounded-md transition-colors focus-visible:outline-none`,t.error!==null&&`cursor-not-allowed opacity-50 hover:bg-transparent`),"aria-label":t.name,"aria-pressed":t.key===c,"aria-disabled":t.error!==null,onClick:()=>{if(t.error!==null)return;let n=f[t.key]?.find(t=>t.value===e.model);t.key!==i&&i!==null&&a!==null&&n!==void 0&&(p(e=>({...e,[i]:a.models})),E(t.key,n)),l(t.key)},children:[(0,U.jsx)(pc,{provider:t.provider,className:`size-5`}),r.filter(e=>e.provider===t.provider).length>1&&(0,U.jsx)(`span`,{className:z(`text-3xs pointer-events-none absolute right-0.5 bottom-0.5 flex h-3.5 min-w-3.5 items-center justify-center rounded-full border px-0.5 leading-none font-semibold shadow-sm`,t.color===null?`bg-card text-muted-foreground`:`border-card text-white`),style:t.color===null?void 0:{backgroundColor:t.color},children:t.name.charAt(0).toUpperCase()})]})})]},t.key)),(0,U.jsx)(Pr,{side:`left`,label:`Manage accounts`,children:(0,U.jsx)(`button`,{className:`text-muted-foreground hover:bg-foreground/10 hover:text-foreground focus-visible:bg-foreground/10 mt-auto flex aspect-square w-full shrink-0 cursor-pointer items-center justify-center rounded-md transition-colors focus-visible:outline-none`,"aria-label":`Manage accounts`,onClick:()=>{s(!1),vt(oe[e.provider])},children:(0,U.jsx)(V,{icon:vs,className:`size-4.5`})})})]}),(0,U.jsxs)(`div`,{className:z(`bg-muted/40 flex min-h-0 min-w-0 flex-1 flex-col`,r.length>1&&`border-border/70 border-l`),children:[S&&(0,U.jsx)(`div`,{className:`shrink-0 px-3 pt-2.5`,children:(0,U.jsxs)(`div`,{className:`border-border/70 focus-within:border-ring relative border-b pb-1.5 transition-colors`,children:[(0,U.jsx)(V,{icon:mn,className:`text-muted-foreground/55 pointer-events-none absolute top-1.5 left-0 size-4`}),(0,U.jsx)(`input`,{ref:m,value:u,placeholder:`Search models...`,className:`placeholder:text-muted-foreground/70 h-6.5 w-full bg-transparent ps-5 text-sm outline-none`,onChange:e=>d(e.target.value),onKeyDown:e=>{if(e.key!==`Enter`||c===null)return;let t=w.at(0);t!==void 0&&(e.preventDefault(),E(c,t),s(!1))}})]})}),(0,U.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-2 py-1.5`,children:w.length===0?(0,U.jsx)(`p`,{className:`text-muted-foreground p-2 text-center text-sm`,children:v===null?`Loading models…`:`No models found`}):w.map(t=>(0,U.jsx)(`button`,{className:z(`hover:bg-accent hover:text-accent-foreground mb-0.5 flex min-h-8 w-full cursor-pointer flex-col justify-center rounded-sm px-2 py-1.5 text-left`,c===i&&t.value===e.model&&`text-foreground bg-foreground/[0.08]`),onClick:()=>{c!==null&&(E(c,t),s(!1))},children:(0,U.jsxs)(`span`,{className:`truncate text-sm leading-snug font-medium`,children:[t.name,y===`opencode`&&(0,U.jsx)(`span`,{className:`text-muted-foreground ml-2 text-xs font-normal`,children:t.description})]})},t.value))})]})]})]})}function Wf(e){let t=Math.min(190,(window.innerWidth-16)/2);return(0,U.jsxs)(ve,{modal:e.options.length>5,children:[(0,U.jsx)(P,{asChild:!0,children:(0,U.jsx)(`button`,{className:z(Bf,Vf),title:e.title,children:e.trigger})}),e.options.length>5&&(0,U.jsx)(N,{className:`w-72`,side:`top`,align:`start`,onCloseAutoFocus:e=>{e.preventDefault(),document.querySelector(`[data-composer]`)?.focus()},children:(0,U.jsx)(l,{value:e.value,onValueChange:e.onChange,children:e.options.map(e=>(0,U.jsx)(Le,{value:e.value,children:e.label},e.value))})}),e.options.length<=5&&(0,U.jsx)(Ke,{children:(0,U.jsxs)(ne,{"data-slot":`dropdown-menu-content`,side:`top`,sideOffset:-28,className:`data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 pointer-events-none relative z-50 origin-(--radix-dropdown-menu-content-transform-origin) drop-shadow-[0_12px_28px_rgb(0_0_0/45%)] duration-100 outline-none`,style:{width:t*2,height:t},onCloseAutoFocus:e=>{e.preventDefault(),document.querySelector(`[data-composer]`)?.focus()},children:[(0,U.jsx)(`div`,{className:`bg-background pointer-events-auto absolute`,style:Rf(t,t*.35,t,0,Math.PI).style}),(0,U.jsx)(Ue,{value:e.value,onValueChange:e.onChange,children:e.options.map((n,r)=>{let i=Rf(t,t*.35,t,Math.PI-(r+1)*Math.PI/e.options.length,Math.PI-r*Math.PI/e.options.length);return(0,U.jsx)(Ye,{value:n.value,className:z(`pointer-events-auto absolute cursor-pointer transition-colors outline-none`,n.value===e.value&&`text-foreground bg-[color-mix(in_srgb,var(--primary)_30%,var(--popover))]`,n.value!==e.value&&`bg-popover text-secondary-label data-highlighted:bg-accent data-highlighted:text-accent-foreground`),style:i.style,children:(0,U.jsx)(`span`,{className:`absolute -translate-x-1/2 -translate-y-1/2 text-sm font-medium whitespace-nowrap`,style:i.center,children:n.label})},n.value)})})]})})]})}function Y(e){let t=L(e=>e.selection?.sessionId),n=L(t=>k(t,e.machine,e.projectId)),r=L(e=>e.projects),i=L(e=>e.machines);return(0,U.jsx)(`div`,{className:`absolute inset-x-0 bottom-full pb-4`,children:(0,U.jsxs)(`h1`,{className:`text-foreground w-full text-center text-2xl font-normal tracking-tight sm:text-3xl`,children:[`What should we build in`,` `,t===null?(0,U.jsxs)(ve,{children:[(0,U.jsx)(P,{asChild:!0,children:(0,U.jsxs)(`button`,{className:`border-muted-foreground/35 hover:border-foreground/60 inline-flex max-w-64 cursor-pointer border-b border-dotted align-bottom outline-none`,title:n?.path,children:[(0,U.jsx)(`span`,{className:`min-w-0 truncate`,children:n?.name}),`?`]})}),(0,U.jsx)(N,{className:`max-h-80 w-64`,onCloseAutoFocus:t=>{t.preventDefault(),e.onCloseMenu()},children:(0,U.jsx)(l,{value:kt(e.machine,e.projectId),children:i.map(e=>({machine:e,items:r.filter(t=>t.machine===e.id)})).filter(e=>e.items.length>0).map(({machine:e,items:t},n)=>(0,U.jsxs)(H.Fragment,{children:[n>0&&(0,U.jsx)(A,{}),i.length>1&&(0,U.jsxs)(we,{className:`text-2xs flex items-center gap-1`,children:[(0,U.jsx)(Md,{icon:e.icon,className:`size-3 shrink-0`}),(0,U.jsx)(`span`,{className:`truncate`,children:e.name})]}),t.map(e=>(0,U.jsxs)(Le,{value:kt(e.machine,e.id),title:e.path,onSelect:()=>ce({machine:e.machine,projectId:e.id,sessionId:null}),children:[(0,U.jsx)(dc,{machine:e.machine,projectId:e.id,className:`size-4 shrink-0 [&>img]:rounded-[4px] [&>svg]:rounded-[4px]`}),(0,U.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.name})]},kt(e.machine,e.id)))]},e.id))})})]}):(0,U.jsx)(`span`,{className:`border-muted-foreground/35 inline-block max-w-64 truncate border-b border-dotted align-bottom`,title:n?.path,children:n?.name}),t!==null&&`?`]})})}function Gf(){let e=L(e=>e.queue);return(0,U.jsx)(`div`,{className:`composer-glass relative mx-auto -mb-[calc(1rem+1px)] w-[calc(100%-2.75rem)] rounded-t-2xl border border-b-0 border-(--composer-outline) px-1 pt-1 pb-[calc(1rem+1px+0.25rem)] text-xs/4`,children:e.map(e=>(0,U.jsxs)(`div`,{className:`grid min-h-6 grid-cols-[1.5rem_minmax(0,1fr)_auto_auto] items-center gap-x-1`,children:[(0,U.jsx)(V,{icon:zo,className:`text-muted-foreground mx-auto size-3`}),(0,U.jsx)(`span`,{className:`text-secondary-label truncate`,children:e.prompt.text===``?`${e.prompt.images.length} image(s)`:e.prompt.text}),(0,U.jsx)(B,{variant:`ghost-muted`,size:`icon-xs`,title:`Send now`,onClick:()=>j(e.id),children:(0,U.jsx)(V,{icon:tt})}),(0,U.jsx)(B,{variant:`ghost-muted`,size:`icon-xs`,title:`Remove from queue`,onClick:()=>Ve(e.id),children:(0,U.jsx)(V,{icon:mr})})]},e.id))})}function Kf(e){return(0,U.jsxs)(U.Fragment,{children:[e.running&&e.empty&&(0,U.jsx)(`button`,{className:`bg-destructive/90 shadow-destructive/24 hover:bg-destructive flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-white shadow-xs transition-colors`,title:`Stop (Esc)`,"aria-label":`Stop generation`,onClick:e.onStop,children:(0,U.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 12 12`,fill:`currentColor`,"aria-hidden":`true`,children:(0,U.jsx)(`rect`,{x:`2`,y:`2`,width:`8`,height:`8`,rx:`1.5`})})}),!(e.running&&e.empty)&&(0,U.jsx)(`button`,{className:`bg-message-action text-message-action-foreground shadow-message-action/24 hover:bg-message-action-hover disabled:bg-foreground/12 disabled:text-muted-foreground relative flex size-9 items-center justify-center overflow-hidden rounded-full shadow-xs transition-all duration-150 hover:scale-105 enabled:cursor-pointer disabled:pointer-events-none disabled:shadow-none`,title:e.running&&e.delivery===`steer`?`Send now (Enter) · Queue (${Yn}+Enter)`:e.running?`Queue (Enter) · Send now (${Yn}+Enter)`:`Send (Enter)`,"aria-label":`Send message`,disabled:e.empty,onClick:t=>e.onSubmit(t.metaKey||t.ctrlKey),children:(0,U.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,"aria-hidden":`true`,children:(0,U.jsx)(`path`,{d:`M7 11.5V2.5M7 2.5L3 6.5M7 2.5L11 6.5`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`})})})]})}var qf=[`image/png`,`image/jpeg`,`image/gif`,`image/webp`],Jf=5242880,Yf=window.matchMedia(`(pointer: coarse)`);function Xf(){let e=L(e=>e.selection),t=L(e=>e.loaded),n=L(e=>e.items.length===0&&e.partial===``),r=L(e=>e.requests),i=L(e=>e.queue),a=L(e=>e.draft),o=L(e=>e.capabilities),s=L(e=>e.settings.provider===`opencode`?e.machines.find(t=>t.id===e.selection?.machine)?.openCode.available!==!0:e.settings.accountId===null),[c,l]=(0,H.useState)(!1),[u,d]=(0,H.useState)(0),[f,p]=(0,H.useState)(!1),[m,h]=(0,H.useState)([]),g=(0,H.useRef)(null),_=(0,H.useRef)(null),v=e?.machine??``,y=e?.projectId??``,b=L(e=>k(e,v,y)),x=L(e=>He(e,v).status),S=L(e=>He(e,v).config?.delivery??null),C=e===null?``:M(e),w=Ct(C),T=w.text,E=w.images,D=w.files,[O,A]=(0,H.useState)(T.length),j=L(ie),N=t&&n&&!j,ee=r.at(0);(0,H.useEffect)(()=>{let e=g.current;e===null||Yf.matches||(e.focus(),e.setSelectionRange(e.value.length,e.value.length))},[e]),(0,H.useEffect)(()=>{if(a===null)return;let e=Rd(a);it(C,t=>({...t,...e})),A(e.text.length),Je(null),g.current?.focus()},[a,C]),(0,H.useEffect)(()=>{x===`online`&&R(v,`files.list`,{projectId:y}).then(h,Ze)},[v,y,x]);let te=T.slice(0,O),ne=/^\/\S*$/.exec(te)?.[0]??/(?:^|\s)(@\S*)$/.exec(te)?.[1]??null,re=ne?.slice(1).toLowerCase()??``,P=ne===null||f?[]:ne.startsWith(`/`)?(o?.commands??[]).filter(e=>e.name.toLowerCase().includes(re)).sort((e,t)=>Number(!e.name.toLowerCase().startsWith(re))-Number(!t.name.toLowerCase().startsWith(re))).map(e=>({key:e.name,label:`/${e.name}${e.hint===``?``:` ${e.hint}`}`,description:e.description,insert:`/${e.name}`})):m.filter(e=>e.toLowerCase().includes(re)).slice(0,50).map(e=>({key:e,label:e,description:``,insert:`@${e}`})),ae=Math.min(u,P.length-1),oe=T.trim()===``&&E.length===0||c||s;function se(e,t){it(C,t=>({...t,text:e,images:t.images.filter(t=>e.includes(`[Image #${t.number}]`)),files:t.files.filter(t=>e.includes(Zf(t)))})),A(t),d(0),p(!1)}function ce(e){if(ne===null)return;let t=O-ne.length,n=t+e.insert.length+1;se(`${T.slice(0,t)}${e.insert} ${T.slice(O)}`,n),requestAnimationFrame(()=>g.current?.setSelectionRange(n,n))}async function le(e){if(!oe){l(!0);try{if(S===null)throw Error(`This machine is not connected`);let t=T.trim();for(let e of D){let n=await ft(e.id);if(n===void 0)throw Error(`${e.name} is no longer saved, attach it again`);let r=await Nd(v,n);t=t.replace(Zf(e),()=>`@${r}`)}await Re({text:t,images:E.map(e=>({mediaType:e.mediaType,data:e.data}))},e?S===`queue`?`steer`:`queue`:S),it(C,e=>({...e,text:``,images:[],files:[]})),A(0)}catch(e){Ze(e)}finally{l(!1)}}}async function de(e){let t=O,n=/(^|\s)$/.test(T.slice(0,O))?``:` `;for(let r of e){if(qf.includes(r.type)&&r.size<=Jf){let e=await Pd(r),i=Ld(I().items,[tn(C).text])+1,a={number:i,mediaType:r.type,data:e},o=t,s=`${n}[Image #${i}] `;n=``,it(C,e=>({...e,text:`${e.text.slice(0,o)}${s}${e.text.slice(o)}`,images:[...e.images,a]})),t+=s.length,A(t),requestAnimationFrame(()=>g.current?.setSelectionRange(t,t));continue}if(r.size>52428800){Ze(Error(`${r.name} is larger than 50 MB`));continue}let e=await wn(r),i={number:Math.max(0,...tn(C).files.map(e=>e.number))+1,id:e,name:r.name},a=t,o=`${n}${Zf(i)} `;n=``,it(C,e=>({...e,text:`${e.text.slice(0,a)}${o}${e.text.slice(a)}`,files:[...e.files,i]})),t+=o.length,A(t),requestAnimationFrame(()=>g.current?.setSelectionRange(t,t))}}return(0,U.jsx)(`div`,{className:z(`pointer-events-none z-20`,N?`absolute inset-0 flex items-center pb-3 sm:pb-4`:`relative shrink-0 before:absolute before:right-(--app-scrollbar-width) before:bottom-full before:left-0 before:h-8 before:bg-linear-to-t before:from-background before:to-transparent`),children:(0,U.jsxs)(Fd,{width:`composer`,className:`pointer-events-auto relative z-10`,children:[N&&(0,U.jsx)(Y,{machine:v,projectId:y,onCloseMenu:()=>g.current?.focus()}),i.length>0&&P.length===0&&(0,U.jsx)(Gf,{}),ee!==void 0&&P.length===0&&(0,U.jsx)(If,{request:ee,machine:v,cwd:b?.path??``,count:r.length,draft:T},ee.id),P.length>0&&(0,U.jsx)(zd,{items:P,active:ae,onHover:d,onPick:ce}),(0,U.jsxs)(`div`,{className:z(`composer-glass shadow-composer relative z-10 border border-(--composer-outline) transition-[border-color,box-shadow] duration-150 ease-out focus-within:border-[color-mix(in_srgb,var(--text)_16%,transparent)] focus-within:ring-4 focus-within:ring-[color-mix(in_srgb,var(--text)_4%,transparent)] dark:shadow-none`,N?`rounded-3xl`:`rounded-t-3xl border-b-0`,ee?.kind===`question`&&`hidden`),onMouseDown:e=>{e.target instanceof Element&&e.currentTarget.contains(e.target)&&(e.target.closest(`button, a, input, textarea`)||(e.preventDefault(),g.current?.focus()))},onDragOver:e=>e.preventDefault(),onDrop:e=>{e.preventDefault(),de([...e.dataTransfer.files])},children:[(0,U.jsxs)(`div`,{className:z(`pb-2`,E.length>0&&`pt-3.5 sm:pt-4`),children:[E.length>0&&(0,U.jsx)(Id,{draftKey:C}),(0,U.jsx)(`textarea`,{ref:g,"data-composer":!0,rows:1,spellCheck:!1,autoCorrect:`off`,"data-gramm":`false`,"data-gramm_editor":`false`,"data-enable-grammarly":`false`,"data-lt-active":`false`,value:T,onChange:e=>se(e.target.value,e.target.selectionStart),onSelect:e=>A(e.currentTarget.selectionStart),onPaste:e=>{let t=e.clipboardData.getData(`text/plain`);if(t!==``){e.preventDefault(),document.execCommand(`insertText`,!1,t);return}let n=[...e.clipboardData.files];n.length!==0&&(e.preventDefault(),de(n))},onKeyDown:e=>{if(!e.nativeEvent.isComposing){if(P.length>0){if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault();let t=e.key===`ArrowDown`?1:-1;d((ae+t+P.length)%P.length);return}if(e.key===`Enter`&&!e.shiftKey||e.key===`Tab`){e.preventDefault(),ce(P[ae]);return}if(e.key===`Escape`){e.preventDefault(),p(!0);return}}if(e.key===`Enter`&&!e.shiftKey&&!Yf.matches)e.preventDefault(),le(e.metaKey||e.ctrlKey);else if(e.key===`ArrowUp`&&T===``){let t=Qf(I().items);if(t===null)return;e.preventDefault(),se(t,t.length)}else e.key===`Escape`&&j&&ue()}},placeholder:s?`Add an account in Settings to start`:j&&S===`steer`?`Steer the agent… (${Yn}+Enter to queue)`:j?`Queue a follow-up… (${Yn}+Enter to send now)`:`Ask anything, @tag files/folders, or / for commands`,className:z(`placeholder:text-placeholder/75 block [field-sizing:content] w-full resize-none bg-transparent px-3 text-sm leading-relaxed outline-none sm:px-4`,E.length>0?`max-h-52 min-h-19.5`:`max-h-55.5 min-h-20 pt-3.5 sm:max-h-56 sm:pt-4 [@media(min-height:840px)]:min-h-23 sm:[@media(min-height:840px)]:min-h-23.5`)})]}),(0,U.jsxs)(`div`,{className:z(`flex min-w-0 items-center justify-between gap-2 px-3 sm:px-3.5`,N?`pb-2.5 sm:pb-3.5`:`pb-2 sm:pb-3`),children:[(0,U.jsx)(`div`,{className:`-m-1 -ms-3.5 flex min-w-0 flex-1 [scrollbar-width:none] items-center gap-1 overflow-x-auto p-1 ps-3 sm:ps-4`,children:(0,U.jsx)(Hf,{})}),(0,U.jsxs)(`div`,{className:`flex shrink-0 items-center justify-end gap-2`,children:[(0,U.jsx)(`input`,{ref:_,type:`file`,multiple:!0,hidden:!0,onChange:e=>{de([...e.target.files??[]]),e.target.value=``}}),c&&D.length>0&&(0,U.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:`Uploading…`}),(0,U.jsx)(Hd,{empty:oe,delivery:S,onSubmit:()=>void le(!0)}),(0,U.jsx)(B,{variant:`ghost`,size:`icon-sm`,title:`Attach files`,"aria-label":`Attach files`,onClick:()=>_.current?.click(),children:(0,U.jsx)(V,{icon:Xo})}),(0,U.jsx)(Kf,{running:j,empty:oe,delivery:S,onSubmit:e=>void le(e),onStop:ue})]})]})]})]})})}function Zf(e){return`[File #${e.number}: ${e.name}]`}function Qf(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n.kind===`user`&&n.parent===null&&n.format===`text`&&n.text!==``)return n.text}return null}var $f={working:sn,done:po,failed:Ae},ep=new Set,tp=null,np=0;function rp(e){tp=e;for(let e of ep)e();e?.state===`done`&&setTimeout(()=>{tp?.id===e.id&&rp(null)},5e3)}function ip(e){return ep.add(e),()=>{ep.delete(e)}}function ap(e,t){np+=1,rp(`url`in t?{id:np,state:`done`,label:e,error:``,url:t.url}:{id:np,state:`failed`,label:e,error:t.error,url:null})}async function op(e){np+=1;let t=np;rp({id:t,state:`working`,label:e.labels.working,error:``,url:null});try{let n=await e.task();tp?.id===t&&rp({id:t,state:`done`,label:e.labels.done,error:``,url:n})}catch(n){tp?.id===t&&rp({id:t,state:`failed`,label:e.labels.failed,error:Xn(n),url:null})}finally{e.onRefresh()}}function sp(e,t,n,r){op({labels:r?{working:`Committing and pushing…`,done:`Committed and pushed`,failed:`Commit and push failed`}:{working:`Committing…`,done:`Committed`,failed:`Commit failed`},task:async()=>(await R(e.machine,`git.commit`,{projectId:e.projectId,repo:t,message:n,push:r}),null),onRefresh:e.onRefresh})}function cp(e,t,n){op({labels:{working:`Creating pull request…`,done:`Pull request created`,failed:`Couldn't create pull request`},task:async()=>(await R(e.machine,`git.createPullRequest`,{projectId:e.projectId,repo:t,base:n.base,head:n.head,title:n.title,body:n.body})).url,onRefresh:e.onRefresh})}function lp(){let e=(0,H.useSyncExternalStore)(ip,()=>tp),[t,n]=(0,H.useState)(!1);return e===null?null:(0,U.jsxs)(`div`,{className:`bg-popover text-popover-foreground flex max-w-80 items-center gap-3 rounded-md border py-2 pr-2 pl-3 shadow-md`,children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-2`,children:[(0,U.jsx)(V,{icon:$f[e.state],className:z(`size-4 shrink-0`,e.state===`working`&&`animate-spin`,e.state===`done`&&`text-success`,e.state===`failed`&&`text-destructive`)}),(0,U.jsx)(`span`,{className:`truncate`,children:e.label})]}),e.url!==null&&(0,U.jsx)(B,{asChild:!0,size:`xs`,variant:`outline`,children:(0,U.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,children:`Open`})}),e.state===`failed`&&(0,U.jsx)(B,{type:`button`,size:`xs`,variant:`outline`,onClick:()=>n(!0),children:`View`}),(0,U.jsx)(B,{type:`button`,size:`icon-micro`,variant:`ghost-muted`,"aria-label":`Dismiss`,onClick:()=>{n(!1),rp(null)},children:(0,U.jsx)(V,{icon:mr,className:`size-3.5`})}),(0,U.jsx)(Sr,{open:t&&e.state===`failed`,onOpenChange:n,children:(0,U.jsxs)(hr,{className:`sm:max-w-lg`,children:[(0,U.jsx)(gr,{children:(0,U.jsx)(yr,{children:e.label})}),(0,U.jsx)(`pre`,{className:`bg-muted/50 max-h-[60vh] overflow-y-auto rounded-lg border p-3 font-mono text-xs break-words whitespace-pre-wrap`,children:e.error})]})})]})}function up({className:e,type:t,...n}){return(0,U.jsx)(`input`,{type:t,"data-slot":`input`,className:z(`h-9 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-[color,background-color,border-color,box-shadow] duration-200 ease-out outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/33 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...n})}function dp({...e}){return(0,U.jsx)(sl,{"data-slot":`select`,...e})}function fp({...e}){return(0,U.jsx)(dl,{"data-slot":`select-value`,...e})}function pp({className:e,size:t=`default`,children:n,...r}){return(0,U.jsxs)(ll,{"data-slot":`select-trigger`,"data-size":t,className:z(`flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-[color,background-color,border-color,box-shadow] duration-200 ease-out outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/33 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r,children:[n,(0,U.jsx)(fl,{asChild:!0,children:(0,U.jsx)(V,{icon:gs,className:`text-muted-foreground pointer-events-none size-4`})})]})}function mp({className:e,children:t,position:n=`item-aligned`,align:r=`center`,...i}){return(0,U.jsx)(hl,{children:(0,U.jsxs)(_l,{"data-slot":`select-content`,"data-align-trigger":n===`item-aligned`,className:z(`relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,n===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:n,align:r,...i,children:[(0,U.jsx)(hp,{}),(0,U.jsx)(kl,{"data-position":n,className:z(`data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)`,n===`popper`&&``),children:t}),(0,U.jsx)(gp,{})]})})}function X({className:e,children:t,...n}){return(0,U.jsxs)(Fl,{"data-slot":`select-item`,className:z(`relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...n,children:[(0,U.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`,children:(0,U.jsx)(zl,{children:(0,U.jsx)(V,{icon:Dt,className:`pointer-events-none`})})}),(0,U.jsx)(Ll,{children:t})]})}function hp({className:e,...t}){return(0,U.jsx)(Vl,{"data-slot":`select-scroll-up-button`,className:z(`z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4`,e),...t,children:(0,U.jsx)(V,{icon:fo})})}function gp({className:e,...t}){return(0,U.jsx)(Ul,{"data-slot":`select-scroll-down-button`,className:z(`z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4`,e),...t,children:(0,U.jsx)(V,{icon:uo})})}function _p(e){return e.target?.kind===`failed`?(0,U.jsx)(`span`,{className:`text-destructive truncate text-xs`,children:e.target.text}):(0,U.jsxs)(`span`,{className:`text-muted-foreground flex min-w-0 items-center gap-1.5 text-xs`,children:[(0,U.jsxs)(`span`,{className:`truncate`,children:[e.head,` →`]}),(0,U.jsxs)(dp,{value:e.target?.base??``,disabled:e.target===void 0,onValueChange:e.onBase,children:[(0,U.jsx)(pp,{size:`sm`,className:`max-w-48`,children:(0,U.jsx)(fp,{placeholder:`Loading branches…`})}),(0,U.jsx)(mp,{children:(e.target?.branches??[]).map(e=>(0,U.jsx)(X,{value:e,children:e},e))})]})]})}function vp(e){return(0,U.jsxs)(`div`,{className:`flex flex-col gap-2 ps-6`,children:[(0,U.jsxs)(`span`,{className:`text-muted-foreground truncate text-xs`,children:[e.draft.head,` → `,e.draft.base]}),(0,U.jsx)(up,{value:e.draft.title,onChange:t=>e.onChange({...e.draft,title:t.target.value})}),(0,U.jsx)(`textarea`,{value:e.draft.body,onChange:t=>e.onChange({...e.draft,body:t.target.value}),rows:8,className:`bg-background focus-visible:border-ring focus-visible:ring-ring/33 w-full resize-y rounded-lg border px-3 py-2 font-mono text-xs transition-[border-color,box-shadow] duration-200 ease-out outline-none focus-visible:ring-3`}),(0,U.jsxs)(`div`,{className:`flex flex-wrap justify-end gap-2`,children:[e.onSkip!==null&&(0,U.jsx)(B,{variant:`ghost`,size:`sm`,onClick:e.onSkip,children:`Skip`}),(0,U.jsx)(B,{variant:`outline`,size:`sm`,onClick:e.onRegenerate,children:`Regenerate`}),(0,U.jsx)(B,{size:`sm`,disabled:e.draft.title.trim()===``,onClick:e.onCreate,children:`Create PR`})]})]})}var yp={working:sn,review:ho,done:po,failed:Ae,skipped:qo};function bp(e){let t=L(t=>k(t,e.machine,e.projectId)?.name)??``,[n]=(0,H.useState)(()=>xp(e.repos,e.action)),[r,i]=(0,H.useState)(()=>n.map(e=>e.path)),[a,o]=(0,H.useState)(``),[s,c]=(0,H.useState)({}),[l,u]=(0,H.useState)(null),d=n.filter(e=>r.includes(e.path)&&s[e.path]?.kind!==`failed`),f=e.action===`pullRequest`&&d.some(e=>s[e.path]===void 0),p=d.filter(e=>e.changed>0);(0,H.useEffect)(()=>{if(e.action===`pullRequest`)for(let t of n)R(e.machine,`git.branches`,{projectId:e.projectId,repo:t.path}).then(e=>c(n=>({...n,[t.path]:{kind:`ready`,...e}})),e=>c(n=>({...n,[t.path]:{kind:`failed`,text:Xn(e)}})))},[e.machine,e.projectId,e.action,n]);function m(e,t){u(n=>n?.map(n=>n.path===e?{...n,...t}:n)??null)}async function h(t,r){try{await r()}catch(r){if(n.length===1){e.onClose(),ap(`Pull request failed`,{error:Xn(r)});return}m(t,{state:`failed`,text:Xn(r),draft:null})}finally{e.onRefresh()}}function g(e,t){c(n=>{let r=n[e];return r?.kind===`ready`?{...n,[e]:{...r,base:t}}:n})}function _(e,t){u(d.map(t=>({path:t.path,state:`working`,text:e,url:null,draft:null})));for(let e of d)h(e.path,()=>t(e.path))}function v(t){if(n.length===1){e.onClose(),sp(e,n[0].path,a,t);return}let r=t?`Committed and pushed`:`Committed`;_(t?`Committing and pushing…`:`Committing…`,async n=>{await R(e.machine,`git.commit`,{projectId:e.projectId,repo:n,message:a,push:t}),m(n,{state:`done`,text:r})})}function y(){_(`Pushing…`,async t=>{await R(e.machine,`git.push`,{projectId:e.projectId,repo:t}),m(t,{state:`done`,text:`Pushed`})})}async function b(t,r,i){m(t,{state:`working`,text:r?`Committing local changes and writing pull request…`:`Writing pull request…`,draft:null});let a=await R(e.machine,`git.pullRequest`,{projectId:e.projectId,repo:t,base:i,commit:r});if(a.kind===`open`){if(n.length===1){e.onClose(),ap(`Pull request already open`,{url:a.url});return}m(t,{state:`done`,text:`A pull request is already open`,url:a.url})}else m(t,{state:`review`,text:`Review and create`,draft:{base:a.base,head:a.head,title:a.title,body:a.body}})}function x(e){_(`Starting…`,async t=>{let n=s[t];if(n?.kind!==`ready`)throw Error(`The branches are not loaded`);await b(t,e&&p.some(e=>e.path===t),n.base)})}function S(t,r){n.length===1?(e.onClose(),cp(e,t,r)):h(t,async()=>{m(t,{state:`working`,text:`Creating pull request…`,draft:null}),m(t,{state:`done`,text:`Created pull request`,url:(await R(e.machine,`git.createPullRequest`,{projectId:e.projectId,repo:t,base:r.base,head:r.head,title:r.title,body:r.body})).url})})}return(0,U.jsx)(Sr,{open:!0,onOpenChange:()=>e.onClose(),children:(0,U.jsxs)(hr,{className:`top-[12vh] translate-y-0 sm:max-w-lg`,children:[(0,U.jsxs)(gr,{children:[(0,U.jsxs)(yr,{children:[e.action===`commit`&&`Commit changes`,e.action===`push`&&`Push`,e.action===`pullRequest`&&`Create pull request`]}),(0,U.jsxs)(br,{children:[e.action===`commit`&&(n.length===1?`Stages every change and commits it.`:`Stages every change in the selected repositories and commits it.`),e.action===`push`&&`Pushes the selected repositories to their remote.`,e.action===`pullRequest`&&`AI writes the title and description. You review them before the pull request is created.`]})]}),l===null&&(0,U.jsxs)(U.Fragment,{children:[n.length===1&&(0,U.jsxs)(`div`,{className:`text-muted-foreground flex items-center gap-1.5 text-xs`,children:[e.action===`pullRequest`?(0,U.jsx)(_p,{head:n[0].branch??`detached`,target:s[n[0].path],onBase:e=>g(n[0].path,e)}):n[0].branch??`detached`,(0,U.jsxs)(`span`,{className:`shrink-0`,children:[`· `,n[0].changed,` `,n[0].changed===1?`change`:`changes`]})]}),n.length>1&&(0,U.jsx)(`div`,{className:`flex max-h-60 flex-col gap-0.5 overflow-y-auto`,children:n.map(n=>(0,U.jsxs)(`label`,{className:`hover:bg-accent flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5`,children:[(0,U.jsx)(`input`,{type:`checkbox`,disabled:s[n.path]?.kind===`failed`,checked:r.includes(n.path)&&s[n.path]?.kind!==`failed`,onChange:e=>i(e.target.checked?[...r,n.path]:r.filter(e=>e!==n.path))}),(0,U.jsx)(`span`,{className:`truncate font-medium`,children:Sp(n.path,t)}),e.action===`pullRequest`?(0,U.jsx)(_p,{head:n.branch??`detached`,target:s[n.path],onBase:e=>g(n.path,e)}):(0,U.jsx)(`span`,{className:`text-muted-foreground truncate text-xs`,children:n.branch??`detached`}),(0,U.jsx)(`span`,{className:`text-muted-foreground ml-auto shrink-0 text-xs tabular-nums`,children:e.action===`push`?n.upstream===null?`not pushed yet`:`↑${n.ahead}`:n.changed>0&&`${n.changed} ${n.changed===1?`change`:`changes`}`})]},n.path))}),e.action===`commit`&&(0,U.jsx)(`textarea`,{value:a,onChange:e=>o(e.target.value),placeholder:`Leave empty to write the message with AI`,rows:5,className:`bg-background focus-visible:border-ring focus-visible:ring-ring/33 w-full resize-none rounded-lg border px-3 py-2 font-mono text-xs transition-[border-color,box-shadow] duration-200 ease-out outline-none focus-visible:ring-3`}),e.action===`pullRequest`&&p.length>0&&(0,U.jsxs)(`p`,{children:[`You have local changes`,n.length>1&&` in ${p.map(e=>Sp(e.path,t)).join(`, `)}`,`. Do you want to commit and push them before creating the pull request?`]}),(0,U.jsxs)(`div`,{className:`flex flex-wrap justify-end gap-2`,children:[e.action===`commit`&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(B,{variant:`outline`,size:`sm`,disabled:d.length===0,onClick:()=>v(!1),children:`Commit`}),(0,U.jsx)(B,{size:`sm`,disabled:d.length===0,onClick:()=>v(!0),children:`Commit and Push`})]}),e.action===`push`&&(0,U.jsx)(B,{size:`sm`,disabled:d.length===0,onClick:y,children:`Push`}),e.action===`pullRequest`&&p.length>0&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(B,{variant:`outline`,size:`sm`,disabled:f,onClick:()=>x(!1),children:`Continue without them`}),(0,U.jsx)(B,{size:`sm`,disabled:f,onClick:()=>x(!0),children:`Commit and continue`})]}),e.action===`pullRequest`&&p.length===0&&(0,U.jsx)(B,{size:`sm`,disabled:f||d.length===0,onClick:()=>x(!1),children:`Create pull request`})]})]}),l!==null&&(0,U.jsx)(`div`,{className:`flex max-h-[60vh] flex-col gap-2 overflow-y-auto`,children:l.map(e=>{let r=e.draft;return(0,U.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,U.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,U.jsx)(`span`,{className:`mt-0.5 flex size-4 shrink-0 overflow-hidden`,children:(0,U.jsx)(V,{icon:yp[e.state],className:z(`size-4`,e.state===`working`&&`animate-spin`,e.state===`review`&&`text-info`,e.state===`done`&&`text-success`,e.state===`failed`&&`text-destructive`,e.state===`skipped`&&`text-muted-foreground`)})}),(0,U.jsx)(`span`,{className:`shrink-0 font-medium`,children:Sp(e.path,t)}),(0,U.jsxs)(`span`,{className:z(`min-w-0 text-xs leading-5 break-words whitespace-pre-wrap`,e.state===`failed`?`text-destructive`:`text-muted-foreground`),children:[e.text,e.url!==null&&(0,U.jsxs)(U.Fragment,{children:[` `,(0,U.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:`text-primary hover:underline hover:underline-offset-2`,children:e.url})]})]})]}),e.state===`review`&&r!==null&&(0,U.jsx)(vp,{draft:r,onChange:t=>m(e.path,{draft:t}),onSkip:n.length===1?null:()=>m(e.path,{state:`skipped`,text:`Skipped`,draft:null}),onRegenerate:()=>void h(e.path,()=>b(e.path,!1,r.base)),onCreate:()=>S(e.path,r)})]},e.path)})})]})})}function xp(e,t){if(t===`commit`)return e.filter(e=>e.changed>0);if(t===`push`)return e.filter(e=>e.branch!==null&&(e.upstream===null||e.ahead>0));if(t===`pullRequest`)return e.filter(e=>e.branch!==null);throw Error(`Unknown git action ${String(t)}`)}function Sp(e,t){return e===``?t:e}var Cp=3e3,wp=18e4;function Tp(e,t,n){let[r,i]=(0,H.useState)(null),[a,o]=(0,H.useState)(0);(0,H.useEffect)(()=>{if(t===null)return;let n=kt(e,t),r={projectId:t},a=!0,o=!1,s=!1;async function c(){if(!o){o=!0;try{let t=await R(e,`git.status`,r);if(!a)return;s=!1,i(e=>e!==null&&e.key===n&&on(e.repos,t)?e:{key:n,repos:t})}catch(e){a&&!s&&(s=!0,Ze(e))}finally{o=!1}}}function l(){document.hidden||c()}c();let u=window.setInterval(l,Cp);return window.addEventListener(`focus`,l),()=>{a=!1,window.clearInterval(u),window.removeEventListener(`focus`,l)}},[e,t,n,a]),(0,H.useEffect)(()=>{if(t===null)return;let n={projectId:t},r=!0,i=!1;async function a(){if(!document.hidden)try{await R(e,`git.fetch`,n),r&&(i=!1,o(e=>e+1))}catch(e){r&&!i&&(i=!0,Ze(e))}}a();let s=window.setInterval(a,wp);return()=>{r=!1,window.clearInterval(s)}},[e,t]);let s=(0,H.useCallback)(()=>o(e=>e+1),[]);return{repos:r!==null&&t!==null&&r.key===kt(e,t)?r.repos:[],refresh:s}}function Ep(e){let[t,n]=(0,H.useState)(null),[r,i]=(0,H.useState)(!1),[a,o]=(0,H.useState)(null),[s,c]=(0,H.useState)(!1),l=xp(e.repos,`push`),u=xp(e.repos,`commit`);function d(t){op({labels:{working:`Pushing…`,done:`Pushed`,failed:`Push failed`},task:async()=>(await R(e.machine,`git.push`,{projectId:e.projectId,repo:t}),null),onRefresh:e.onRefresh})}async function f(){if(u.length===1)i(!1),sp(e,u[0].path,``,!1);else{c(!0);try{for(let t of u)await R(e.machine,`git.commit`,{projectId:e.projectId,repo:t.path,message:``,push:!1});i(!1)}catch(e){Ze(e)}finally{c(!1),e.onRefresh()}}}return{target:e,action:t,setAction:n,menuOpen:r,setMenuOpen:i,branchRepo:a,setBranchRepo:o,committing:s,pushable:l,committable:u,push:d,yoloCommit:f}}function Dp(e){let t=e.git,n=t.target.repos,r=n.reduce((e,t)=>e+t.ahead,0);return(0,U.jsxs)(U.Fragment,{children:[e.collapsed&&n.map(e=>(0,U.jsxs)(se,{onSelect:()=>t.setBranchRepo(e.path),children:[(0,U.jsx)(V,{icon:pt}),(0,U.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.path===``?e.branch??`detached`:`${e.path}: ${e.branch??`detached`}`}),(0,U.jsx)(`span`,{className:`text-muted-foreground flex gap-1 text-xs`,children:(0,U.jsx)(An,{behind:e.behind,ahead:e.ahead})})]},e.path)),e.collapsed&&(0,U.jsx)(A,{}),e.collapsed&&(0,U.jsxs)(se,{disabled:t.committable.length===0,onSelect:()=>t.setAction(`commit`),children:[(0,U.jsx)(V,{icon:Eo}),`Commit…`]}),(0,U.jsxs)(se,{disabled:t.pushable.length===0||t.committing,onSelect:()=>{t.pushable.length===1?t.push(t.pushable[0].path):t.setAction(`push`)},children:[(0,U.jsx)(V,{icon:_t}),t.pushable.length>1?`Just Push…`:`Just Push`,r>0&&(0,U.jsxs)(`span`,{className:`text-muted-foreground ml-auto text-xs tabular-nums`,children:[`↑`,r]})]}),(0,U.jsxs)(se,{disabled:t.committable.length===0||t.committing,onSelect:e=>{e.preventDefault(),t.yoloCommit()},children:[(0,U.jsx)(V,{icon:t.committing?sn:Eo,className:z(t.committing&&`animate-spin`)}),t.committing?`Committing…`:`Yolo Commit`]}),(0,U.jsx)(A,{}),(0,U.jsxs)(se,{disabled:xp(n,`pullRequest`).length===0,onSelect:()=>t.setAction(`pullRequest`),children:[(0,U.jsx)(V,{icon:ko}),`Create pull request…`]})]})}function Op(e){let t=e.git,n=t.target.repos.find(e=>e.path===t.branchRepo);return(0,U.jsxs)(U.Fragment,{children:[t.action!==null&&(0,U.jsx)(bp,{machine:t.target.machine,projectId:t.target.projectId,action:t.action,repos:t.target.repos,onClose:()=>t.setAction(null),onRefresh:t.target.onRefresh}),t.branchRepo!==null&&n!==void 0&&(0,U.jsx)(De,{machine:t.target.machine,projectId:t.target.projectId,repo:n,onRefresh:t.target.onRefresh,onClose:()=>t.setBranchRepo(null)})]})}function kp(e){let t=Ep(e),[n,r]=(0,H.useState)(!1),i=[...new Set(e.repos.map(e=>e.branch??`detached`))],a=e.repos.flatMap(e=>{let t=je(e);return t===null?[]:[{repo:e,next:t}]}),o=e.repos.map(e=>e.path===``?e.branch??`detached`:`${e.path}: ${e.branch??`detached`}`).join(`
|
|
24
|
+
`),s=i.length===1?i[0]:`${i.length} branches`;async function c(t){r(!0);try{await R(e.machine,`git.sync`,{projectId:e.projectId,repo:t})}catch(e){Ze(e)}finally{r(!1),e.onRefresh()}}return(0,U.jsxs)(U.Fragment,{children:[e.repos.length===1&&(0,U.jsx)(f,{machine:e.machine,projectId:e.projectId,repo:e.repos[0],onRefresh:e.onRefresh}),e.repos.length>1&&a.length===0&&(0,U.jsxs)(`span`,{className:`text-muted-foreground hidden max-w-48 items-center gap-1 text-xs sm:flex`,title:o,children:[(0,U.jsx)(V,{icon:pt,className:`size-3.5 shrink-0`}),(0,U.jsx)(`span`,{className:`truncate`,children:s})]}),e.repos.length>1&&a.length>0&&(0,U.jsxs)(ve,{children:[(0,U.jsx)(P,{asChild:!0,children:(0,U.jsxs)(`button`,{className:`text-muted-foreground hover:text-foreground hidden max-w-48 cursor-pointer items-center gap-1 text-xs sm:flex`,title:o,children:[(0,U.jsx)(V,{icon:n?sn:a.length===1?a[0].next.icon:Ln,className:z(`size-3.5 shrink-0`,n&&`animate-spin`)}),(0,U.jsx)(`span`,{className:`truncate`,children:s})]})}),(0,U.jsx)(N,{align:`end`,className:`w-64`,children:a.map(e=>(0,U.jsxs)(se,{disabled:n,onSelect:()=>void c(e.repo.path),children:[(0,U.jsx)(V,{icon:e.next.icon}),(0,U.jsxs)(`span`,{className:`min-w-0 flex-1 truncate`,children:[e.next.label,` ·`,` `,e.repo.path===``?e.repo.branch:e.repo.path]}),(0,U.jsx)(`span`,{className:`text-muted-foreground flex gap-1 text-xs`,children:(0,U.jsx)(An,{behind:e.repo.behind,ahead:e.repo.ahead})})]},e.repo.path))})]}),(0,U.jsxs)(`div`,{className:`ml-2.5 flex w-fit`,children:[(0,U.jsxs)(B,{variant:`outline`,size:`xs`,className:`rounded-e-none border-e-0`,disabled:t.committable.length===0,onClick:()=>t.setAction(`commit`),children:[(0,U.jsx)(V,{icon:Eo}),(0,U.jsx)(`span`,{className:`hidden sm:inline`,children:`Commit`})]}),(0,U.jsxs)(ve,{open:t.menuOpen,onOpenChange:t.setMenuOpen,children:[(0,U.jsx)(P,{asChild:!0,children:(0,U.jsx)(B,{variant:`outline`,size:`icon-xs`,className:`rounded-s-none`,"aria-label":`Git actions`,children:(0,U.jsx)(V,{icon:t.committing?sn:uo,className:z(`size-4`,t.committing&&`animate-spin`)})})}),(0,U.jsx)(N,{align:`end`,className:`w-56`,children:(0,U.jsx)(Dp,{git:t,collapsed:!1})})]})]}),(0,U.jsx)(Op,{git:t})]})}function Ap({className:e,size:t=`default`,...n}){return(0,U.jsx)(cu,{"data-slot":`switch`,"data-size":t,className:z(`peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none group-has-[:focus-visible]/field-label:border-transparent group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50`,e),...n,children:(0,U.jsx)(uu,{"data-slot":`switch-thumb`,className:`bg-background dark:data-checked:bg-primary-foreground dark:data-unchecked:bg-foreground pointer-events-none block rounded-full ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0`})})}var jp=`3.6.8`,Mp=`1.3.1`,Np=[{family:`FiraCode Nerd Font`,label:`Fira Code`},{family:`JetBrainsMono Nerd Font`,label:`JetBrains Mono`},{family:`CaskaydiaCove Nerd Font`,label:`Cascadia Code`},{family:`Hack Nerd Font`,label:`Hack`}],Pp=[{value:`macos`,label:`macOS`},{value:`linux`,label:`Linux`},{value:`windows`,label:`Windows`}];async function Fp(e){let t=`${e.font.size}px ${e.font.family}`;await Promise.all([document.fonts.load(t),document.fonts.load(`bold ${t}`)]);let n=document.documentElement.style;n.setProperty(`--pad-top`,`${e.padding.top}px`),n.setProperty(`--pad-right`,`${e.padding.right}px`),n.setProperty(`--pad-bottom`,`${e.padding.bottom}px`),n.setProperty(`--pad-left`,`${e.padding.left}px`)}function Ip(e,t){let n=en();return{fontFamily:e.font.family,fontSize:e.font.size,lineHeight:e.font.lineHeight,ligatures:e.font.ligatures,cursorStyle:e.cursor.style,cursorBlink:e.cursor.blink,scrollback:e.scrollback,boldIsBright:e.boldIsBright,colors:{background:n.background,foreground:n.foreground,cursor:n.cursor,cursorText:n.background,selectionBackground:n.selectionBackground,selectionForeground:n.foreground,palette:n.palette},version:Lp(t),clickToMoveCursor:e.behavior.clickToMoveCursor,optionAsMeta:e.behavior.optionAsMeta,windowsCopyPaste:e.behavior.windowsCopyPaste}}function Lp(e){if(e===`offsite`)return`offsite 0.0.0`;if(e===`ghostty`)return`ghostty ${Mp}`;if(e===`iterm2`)return`iTerm2 ${jp}`;throw Error(`unknown terminal identity ${e}`)}function Z(e){return(0,U.jsxs)(`section`,{children:[(0,U.jsxs)(`h2`,{className:`text-muted-foreground mb-2 px-1 text-xs font-medium`,children:[e.title,e.note&&(0,U.jsxs)(`span`,{className:`font-normal`,children:[` · `,e.note]})]}),(0,U.jsx)(`div`,{className:`@container divide-y overflow-hidden rounded-xl border`,children:e.children})]})}function Q(e){return(0,U.jsxs)(`label`,{className:`flex min-h-13 flex-wrap items-center gap-x-4 gap-y-2 px-4 py-2.5`,children:[(0,U.jsx)(`span`,{className:`min-w-0 flex-1 basis-40 text-sm font-medium`,children:e.label}),(0,U.jsx)(`div`,{className:`max-w-full shrink-0 @max-lg:has-[[data-slot=select-trigger],input:not([type=number])]:w-full @max-lg:has-[[data-slot=select-trigger],input:not([type=number])]:*:w-full @max-lg:**:data-[slot=select-trigger]:w-full`,children:e.children})]})}function Rp(e){let[t,n]=(0,H.useState)(e.value);function r(){t!==e.value&&(e.valid&&!e.valid(t)?n(e.value):e.onCommit(t))}return(0,U.jsx)(up,{className:z(`w-56`,e.className),type:e.type,min:e.type===`number`?0:void 0,step:e.step,placeholder:e.placeholder,disabled:e.disabled,value:t,onChange:e=>n(e.target.value),onBlur:r,onKeyDown:e=>{e.key===`Enter`&&e.currentTarget.blur()}})}function zp(e){return(0,U.jsx)(Rp,{type:`number`,className:`w-24`,step:e.step??1,value:String(e.value),valid:e=>e!==``&&Number(e)>=0,onCommit:t=>e.onCommit(Number(t))},e.value)}function Bp(e){let t=e.prefs.editor,[n,r]=(0,H.useState)(!Np.some(e=>e.family===t.font.family));function i(t){fn({...e.prefs,editor:t})}function a(e,n){i({...t,[e]:{...t[e],...n}})}return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(Z,{title:`Font`,children:[(0,U.jsx)(Q,{label:`Family`,children:(0,U.jsxs)(dp,{value:n?`custom`:t.font.family,onValueChange:e=>{r(e===`custom`),e!==`custom`&&a(`font`,{family:e})},children:[(0,U.jsx)(pp,{className:`w-56`,children:(0,U.jsx)(fp,{})}),(0,U.jsxs)(mp,{children:[Np.map(e=>(0,U.jsx)(X,{value:e.family,children:e.label},e.family)),(0,U.jsx)(X,{value:`custom`,children:`Custom`})]})]})}),n&&(0,U.jsx)(Q,{label:`Custom family`,children:(0,U.jsx)(Rp,{placeholder:`Installed font name`,value:t.font.family,onCommit:e=>a(`font`,{family:e})})}),(0,U.jsx)(Q,{label:`Size`,children:(0,U.jsx)(zp,{value:t.font.size,step:.5,onCommit:e=>a(`font`,{size:e})})}),(0,U.jsx)(Q,{label:`Line height`,children:(0,U.jsx)(zp,{value:t.font.lineHeight,step:.05,onCommit:e=>a(`font`,{lineHeight:e})})}),(0,U.jsx)(Q,{label:`Ligatures`,children:(0,U.jsx)(Ap,{checked:t.font.ligatures,onCheckedChange:e=>a(`font`,{ligatures:e})})}),(0,U.jsx)(Q,{label:`Font features`,children:(0,U.jsx)(Rp,{placeholder:`'ss01', 'zero'`,value:t.font.features,onCommit:e=>a(`font`,{features:e})})})]}),(0,U.jsxs)(Z,{title:`Cursor`,children:[(0,U.jsx)(Q,{label:`Style`,children:(0,U.jsxs)(dp,{value:t.cursor.style,onValueChange:e=>a(`cursor`,{style:e}),children:[(0,U.jsx)(pp,{className:`w-56`,children:(0,U.jsx)(fp,{})}),(0,U.jsxs)(mp,{children:[(0,U.jsx)(X,{value:`block`,children:`Block`}),(0,U.jsx)(X,{value:`bar`,children:`Bar`}),(0,U.jsx)(X,{value:`underline`,children:`Underline`})]})]})}),(0,U.jsx)(Q,{label:`Blink`,children:(0,U.jsx)(Ap,{checked:t.cursor.blink,onCheckedChange:e=>a(`cursor`,{blink:e})})})]}),(0,U.jsxs)(Z,{title:`Text`,children:[(0,U.jsx)(Q,{label:`Tab size`,children:(0,U.jsx)(zp,{value:t.tabSize,onCommit:e=>i({...t,tabSize:e})})}),(0,U.jsx)(Q,{label:`Word wrap`,children:(0,U.jsx)(Ap,{checked:t.wordWrap,onCheckedChange:e=>i({...t,wordWrap:e})})})]})]})}function Vp(e){let t=e.prefs;return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Z,{title:`Appearance`,children:(0,U.jsx)(Q,{label:`Theme`,children:(0,U.jsxs)(dp,{value:t.theme,onValueChange:e=>fn({...t,theme:e}),children:[(0,U.jsx)(pp,{className:`w-56`,children:(0,U.jsx)(fp,{})}),(0,U.jsx)(mp,{children:Cn.map(e=>(0,U.jsx)(X,{value:e.id,children:e.name},e.id))})]})})}),(0,U.jsx)(Z,{title:`Sidebar`,children:(0,U.jsx)(Q,{label:`Group active sessions by project in Inbox`,children:(0,U.jsx)(Ap,{checked:t.groupActiveByProject,onCheckedChange:e=>fn({...t,groupActiveByProject:e})})})}),(0,U.jsx)(Hp,{}),(0,U.jsx)(B,{variant:`outline`,onClick:e.onRestore,children:`Restore browser defaults`})]})}function Hp(){let[e,t]=(0,H.useState)(`idle`),[n,r]=(0,H.useState)(null);async function i(){t(`checking`),r(null);try{let e=`serviceWorker`in navigator?await navigator.serviceWorker.getRegistration():void 0;if(e===void 0){location.reload();return}await e.update(),t(e.installing===null&&e.waiting===null?`current`:`updating`)}catch(e){console.error(`could not check for updates`,e),r(Xn(e)),t(`idle`)}}return(0,U.jsx)(Z,{title:`App`,children:(0,U.jsx)(Q,{label:`Load the newest version of OffSite in this browser`,children:(0,U.jsxs)(`div`,{className:`flex items-center gap-3`,children:[n!==null&&(0,U.jsxs)(`span`,{className:`text-muted-foreground text-xs`,children:[`Could not check: `,n]}),e===`current`&&(0,U.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:`Up to date`}),e===`updating`&&(0,U.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:`Updating, the page reloads when it's ready`}),(0,U.jsx)(B,{size:`sm`,variant:`outline`,disabled:e===`checking`||e===`updating`,onClick:()=>void i(),children:`Check for updates`})]})})})}function Up(e){for(let t=0;t<e.length;t++){let n=e[t];if(!n.startsWith(`-`)&&!n.startsWith(`+`))return!1;let r=n.startsWith(`-`),i=n.slice(1);if(i===``||i===`-`)return!1;if(i.startsWith(`-`)){if(!Wp(i.slice(1),r))return!1}else for(let n=0;n<i.length;n++){let a=i[n];if(a===`o`){let a=i.slice(n+1);if(a===``){if(t++,t===e.length)return!1;a=e[t]}if(!Wp(a,r))return!1;break}if(a===`b`||a===`c`||r&&`dfnprvx`.includes(a)||!r&&a===`i`)return!1}}return!0}function Wp(e,t){let n=e.toLowerCase().replace(/[-_]/g,``),r=t;return n.startsWith(`no`)&&(n=n.slice(2),r=!t),[`rcs`,`globalrcs`,`interactive`,`exec`].includes(n)?r:![`privileged`,`restricted`,`sourcetrace`,`verbose`,`xtrace`].includes(n)||!r}function Gp(e,t,n){if(t===`windows`)return`Not available on Windows`;if(e!==null&&/[\n"'\\$`;&|<>()*?[\]{}#!]/.test(e))return`Not available for commands with shell syntax`;let r=e===null?[n]:e.split(/[ \t]/).filter(e=>e!==``);if(r.length===0)return`Available for bash, zsh and fish`;let i=r[0],a=i.split(`/`).pop(),o=r.slice(1);return a===`bash`?t===`macos`&&(i===`/bin/bash`||!i.includes(`/`))?`Needs a newer bash than the one macOS includes`:o.every(e=>[`-l`,`--login`,`-i`].includes(e))?null:`Not available with these bash options`:a===`zsh`?Up(o)?null:`Not available with these zsh options`:a===`fish`?o.every(e=>{if(e.startsWith(`--`)){let t=e.slice(2).split(`=`)[0];return t===``||![`command`,`no-config`,`no-execute`].some(e=>e.startsWith(t))}return!(e.startsWith(`-`)&&/[cNn]/.test(e))})?null:`Not available with these fish options`:`Available for bash, zsh and fish`}var Kp=[10,15,30,45,60,120,180,300,600,900,1800,3600];function qp(e){let t=e.config;function n(n){le(e.machine,{...t,...n})}return(0,U.jsxs)(Z,{title:`Agents`,children:[(0,U.jsx)(Q,{label:`Send while working`,children:(0,U.jsxs)(dp,{value:t.delivery,onValueChange:n=>{if(n!==`queue`&&n!==`steer`)throw Error(`Unknown delivery ${n}`);le(e.machine,{...t,delivery:n})},children:[(0,U.jsx)(pp,{className:`w-56`,children:(0,U.jsx)(fp,{})}),(0,U.jsxs)(mp,{children:[(0,U.jsx)(X,{value:`queue`,children:`Queue messages`}),(0,U.jsx)(X,{value:`steer`,children:`Steer the agent`})]})]})}),(0,U.jsx)(Q,{label:`Auto-skip questions`,children:(0,U.jsx)(Jp,{value:t.autoSkipQuestionTimeout,onChange:e=>n({autoSkipQuestionTimeout:e})})}),(0,U.jsx)(Q,{label:`Auto-resolve permissions`,children:(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[t.autoPermissionTimeout!==null&&(0,U.jsxs)(dp,{value:t.autoPermissionMode,onValueChange:e=>{if(e!==`allow`&&e!==`deny`)throw Error(`Unknown decision ${e}`);n({autoPermissionMode:e})},children:[(0,U.jsx)(pp,{className:`w-24`,children:(0,U.jsx)(fp,{})}),(0,U.jsxs)(mp,{children:[(0,U.jsx)(X,{value:`allow`,children:`Allow`}),(0,U.jsx)(X,{value:`deny`,children:`Deny`})]})]}),(0,U.jsx)(Jp,{value:t.autoPermissionTimeout,onChange:e=>n({autoPermissionTimeout:e})})]})})]})}function Jp(e){let t=e.value===null||Kp.includes(e.value)?Kp:[...Kp,e.value].sort((e,t)=>e-t);return(0,U.jsxs)(dp,{value:e.value===null?`off`:String(e.value),onValueChange:t=>e.onChange(t===`off`?null:Number(t)),children:[(0,U.jsx)(pp,{className:`w-40`,children:(0,U.jsx)(fp,{})}),(0,U.jsxs)(mp,{children:[(0,U.jsx)(X,{value:`off`,children:`Off`}),t.map(e=>(0,U.jsx)(X,{value:String(e),children:e===3600?`After 1 hour`:e===60?`After 1 minute`:e%60==0?`After ${e/60} minutes`:`After ${e} seconds`},e))]})]})}function Yp(e){let t=e.config.commitMessage,[n,r]=(0,H.useState)(null),[i,a]=(0,H.useState)(null);(0,H.useEffect)(()=>{if(t.provider===null)return;let n=!0;return r(null),a(null),R(e.machine,`capabilities`,{provider:t.provider,accountId:t.accountId,projectId:null}).then(e=>{n&&r(e.models)},e=>{n&&a(Xn(e))}),()=>{n=!1}},[e.machine,t.provider,t.accountId]);function o(t){le(e.machine,{...e.config,commitMessage:t})}function s(t){if(t===`off`){o({provider:null,accountId:null,model:null});return}if(t===`opencode`){o({provider:`opencode`,accountId:null,model:null});return}let n=[...e.claudeAccounts,...e.codexAccounts].find(e=>e.id===t);if(n===void 0)throw Error(`That account was removed`);o({provider:n.provider,accountId:n.id,model:null})}return(0,U.jsxs)(Z,{title:`Commit messages and pull requests`,children:[(0,U.jsx)(Q,{label:`Account`,children:(0,U.jsxs)(dp,{value:t.provider===null?`off`:t.provider===`opencode`?`opencode`:t.accountId??`off`,onValueChange:s,children:[(0,U.jsx)(pp,{className:`w-56`,children:(0,U.jsx)(fp,{})}),(0,U.jsxs)(mp,{children:[(0,U.jsx)(X,{value:`off`,children:`Off`}),[...e.claudeAccounts,...e.codexAccounts].map(e=>(0,U.jsxs)(X,{value:e.id,disabled:!e.valid,children:[(0,U.jsx)(pc,{provider:e.provider,className:`size-4`}),`${y[e.provider]} · ${e.name}`]},e.id)),e.openCode.available&&(0,U.jsxs)(X,{value:`opencode`,children:[(0,U.jsx)(pc,{provider:`opencode`,className:`size-4`}),y.opencode]})]})]})}),t.provider!==null&&(0,U.jsx)(Q,{label:`Model`,children:(0,U.jsxs)(dp,{value:t.model??void 0,disabled:n===null,onValueChange:e=>o({...t,model:e}),children:[(0,U.jsx)(pp,{className:`w-56`,children:(0,U.jsx)(fp,{placeholder:i===null?n===null?`Loading…`:`Choose a model`:`Unavailable`})}),(0,U.jsx)(mp,{children:(n??[]).map(e=>(0,U.jsx)(X,{value:e.value,children:e.name},e.value))})]})}),i!==null&&(0,U.jsx)(`p`,{className:`text-destructive px-4 py-3 text-xs`,children:i})]})}var Xp={zsh:`M11.415 5.038a.58.58 0 0 0-.543.197L.135 18.021a.58.58 0 0 0 .071.814.58.58 0 0 0 .815-.07L11.757 5.979a.58.58 0 0 0-.07-.815.6.6 0 0 0-.272-.126m-8.113.317a3.133 3.133 0 0 0-3.12 3.12 3.13 3.13 0 0 0 3.12 3.119A3.133 3.133 0 0 0 6.42 8.475a3.13 3.13 0 0 0-3.119-3.119m0 1.806a1.3 1.3 0 0 1 1.314 1.313 1.3 1.3 0 0 1-1.314 1.312A1.3 1.3 0 0 1 1.99 8.475a1.3 1.3 0 0 1 1.312-1.314m5.253 5.253a3.13 3.13 0 0 0-3.119 3.119 3.13 3.13 0 0 0 3.12 3.118 3.133 3.133 0 0 0 3.118-3.12 3.133 3.133 0 0 0-3.119-3.118m0 1.805a1.3 1.3 0 0 1 1.313 1.314c0 .735-.577 1.312-1.312 1.312a1.3 1.3 0 0 1-1.314-1.312 1.3 1.3 0 0 1 1.313-1.314m7.201 3.276a.58.58 0 0 0-.578.578.58.58 0 0 0 .578.578h7.666a.58.58 0 0 0 .579-.578.58.58 0 0 0-.579-.578Z`,bash:`M21.038,4.9l-7.577-4.498C13.009,0.134,12.505,0,12,0c-0.505,0-1.009,0.134-1.462,0.403L2.961,4.9 C2.057,5.437,1.5,6.429,1.5,7.503v8.995c0,1.073,0.557,2.066,1.462,2.603l7.577,4.497C10.991,23.866,11.495,24,12,24 c0.505,0,1.009-0.134,1.461-0.402l7.577-4.497c0.904-0.537,1.462-1.529,1.462-2.603V7.503C22.5,6.429,21.943,5.437,21.038,4.9z M15.17,18.946l0.013,0.646c0.001,0.078-0.05,0.167-0.111,0.198l-0.383,0.22c-0.061,0.031-0.111-0.007-0.112-0.085L14.57,19.29 c-0.328,0.136-0.66,0.169-0.872,0.084c-0.04-0.016-0.057-0.075-0.041-0.142l0.139-0.584c0.011-0.046,0.036-0.092,0.069-0.121 c0.012-0.011,0.024-0.02,0.036-0.026c0.022-0.011,0.043-0.014,0.062-0.006c0.229,0.077,0.521,0.041,0.802-0.101 c0.357-0.181,0.596-0.545,0.592-0.907c-0.003-0.328-0.181-0.465-0.613-0.468c-0.55,0.001-1.064-0.107-1.072-0.917 c-0.007-0.667,0.34-1.361,0.889-1.8l-0.007-0.652c-0.001-0.08,0.048-0.168,0.111-0.2l0.37-0.236 c0.061-0.031,0.111,0.007,0.112,0.087l0.006,0.653c0.273-0.109,0.511-0.138,0.726-0.088c0.047,0.012,0.067,0.076,0.048,0.151 l-0.144,0.578c-0.011,0.044-0.036,0.088-0.065,0.116c-0.012,0.012-0.025,0.021-0.038,0.028c-0.019,0.01-0.038,0.013-0.057,0.009 c-0.098-0.022-0.332-0.073-0.699,0.113c-0.385,0.195-0.52,0.53-0.517,0.778c0.003,0.297,0.155,0.387,0.681,0.396 c0.7,0.012,1.003,0.318,1.01,1.023C16.105,17.747,15.736,18.491,15.17,18.946z M19.143,17.859c0,0.06-0.008,0.116-0.058,0.145 l-1.916,1.164c-0.05,0.029-0.09,0.004-0.09-0.056v-0.494c0-0.06,0.037-0.093,0.087-0.122l1.887-1.129 c0.05-0.029,0.09-0.004,0.09,0.056V17.859z M20.459,6.797l-7.168,4.427c-0.894,0.523-1.553,1.109-1.553,2.187v8.833 c0,0.645,0.26,1.063,0.66,1.184c-0.131,0.023-0.264,0.039-0.398,0.039c-0.42,0-0.833-0.114-1.197-0.33L3.226,18.64 c-0.741-0.44-1.201-1.261-1.201-2.142V7.503c0-0.881,0.46-1.702,1.201-2.142l7.577-4.498c0.363-0.216,0.777-0.33,1.197-0.33 c0.419,0,0.833,0.114,1.197,0.33l7.577,4.498c0.624,0.371,1.046,1.013,1.164,1.732C21.686,6.557,21.12,6.411,20.459,6.797z`,fish:`m19.164 9.228-3.016 2.688v.527l3.016 2.688v-1.228l-1.936-1.723 1.936-1.724V9.228m-6.658.046v1.208l1.905 1.696-1.905 1.695v1.209l2.968-2.645v-.518l-2.968-2.645M9.781 7.847a6.519 6.519 0 0 0-2.038-.335c-.672 0-1.349.112-2.03.335a9.23 9.23 0 0 0-2.088 1.017v.723c.69-.4 1.377-.7 2.06-.897a7.388 7.388 0 0 1 2.058-.296c.684 0 1.368.098 2.052.296a9.452 9.452 0 0 1 2.075.897v-.723a9.229 9.229 0 0 0-2.09-1.017m.014 7.78a7.371 7.371 0 0 1-2.052.296 7.388 7.388 0 0 1-2.057-.296 9.18 9.18 0 0 1-2.061-.897v.723a9.228 9.228 0 0 0 2.088 1.017 6.492 6.492 0 0 0 2.03.335c.678 0 1.357-.112 2.038-.335a9.227 9.227 0 0 0 2.089-1.017v-.723c-.7.4-1.391.7-2.075.897m.602-11.23h-.51L7.28 6.92h1.19l1.672-1.62 1.671 1.62h1.191l-2.607-2.525m-2.965 13.68v-.824H6.427v.825l.786 1.527h.614l-.395-1.527M4.127 10.95v1.216H5.13V10.95H4.127m-1.16-1.695L0 11.901v.518l2.967 2.645v-1.208L1.063 12.16l1.904-1.695V9.256m20.68 3.28c-.235-.3-.574-.509-1.017-.626.395-.103.696-.278.902-.525.206-.247.31-.556.31-.926 0-.546-.197-.984-.59-1.314-.393-.33-.919-.495-1.575-.495-.22 0-.473.025-.758.073-.284.048-.61.12-.974.217v.84c.314-.12.613-.21.9-.27a4.05 4.05 0 0 1 .832-.091c.403 0 .714.093.933.278.218.185.328.451.328.798 0 .328-.118.584-.353.768-.235.184-.562.276-.98.276h-.697v.75h.696c.458 0 .821.116 1.09.346.268.23.402.542.402.934 0 .425-.134.75-.402.976-.269.226-.653.339-1.153.339a3.55 3.55 0 0 1-.89-.117 4.395 4.395 0 0 1-.91-.358v.909a6.1 6.1 0 0 0 .95.249c.323.057.639.085.95.085.738 0 1.315-.177 1.733-.53.417-.355.626-.842.626-1.463 0-.449-.118-.823-.353-1.123`,powershell:`M23.181 2.974c.568 0 .923.463.792 1.035l-3.659 15.982c-.13.572-.697 1.035-1.265 1.035H.819c-.568 0-.923-.463-.792-1.035L3.686 4.009c.13-.572.697-1.035 1.265-1.035zm-8.375 9.346c.251-.394.227-.905-.09-1.243L9.122 5.125c-.38-.404-1.037-.407-1.466-.003-.429.402-.468 1.056-.088 1.46l4.662 4.96v.11l-7.42 5.374c-.45.327-.533.977-.187 1.453.346.476.991.597 1.44.27l8.229-5.91c.28-.196.438-.365.514-.52zm-2.796 4.399a.928.928 0 00-.934.923c0 .51.418.923.934.923h4.433a.928.928 0 00.934-.923.928.928 0 00-.934-.923z`,cmd:`M8.165 6V3h7.665v3H8.165zm-.5-3H1c-.55 0-1 .45-1 1v2h7.665V3zM23 3h-6.67v3H24V4c0-.55-.45-1-1-1zM0 6.5h24V20c0 .55-.45 1-1 1H1c-.55 0-1-.45-1-1V6.5zM11.5 18c0 .3.2.5.5.5h8c.3 0 .5-.2.5-.5v-1.5c0-.3-.2-.5-.5-.5h-8c-.3 0-.5.2-.5.5V18zm-5.2-4.55l-3.1 3.1c-.25.25-.25.6 0 .8l.9.9c.25.25.6.25.8 0l4.4-4.4a.52.52 0 0 0 0-.8l-4.4-4.4c-.2-.2-.6-.2-.8 0l-.9.9c-.25.2-.25.55 0 .8l3.1 3.1z`},Zp={zsh:`zsh`,bash:`bash`,fish:`fish`,pwsh:`powershell`,powershell:`powershell`,cmd:`cmd`},Qp={macos:[`zsh`,`bash`,`fish`,`pwsh`],linux:[`bash`,`zsh`,`fish`,`pwsh`],windows:[`pwsh`,`powershell`,`cmd`]};function $p(e){let t=e.trim().split(/[\\/]/).pop()?.toLowerCase().replace(/\.exe$/,``);return t===void 0?void 0:Zp[t]}function em(e){return e.replace(/[\\/][^\\/]*$/,``)}function tm(e){return(0,U.jsx)(`svg`,{viewBox:`0 0 24 24`,className:`size-4 flex-none`,fill:`currentColor`,children:(0,U.jsx)(`path`,{d:Xp[e.logo]})})}function nm(e){let[t,n]=(0,H.useState)(e.value??``),[r,i]=(0,H.useState)(null),[a,o]=(0,H.useState)(null),s=$p(t),c=e.platform===e.device,l=c?r:Qp[e.platform].map(e=>({name:e,path:null}));(0,H.useEffect)(()=>{c&&R(e.machine,`terminal.shells`,void 0).then(i,e=>o(Xn(e)))},[e.machine,c]);function u(t){n(t),t!==(e.value??``)&&e.onCommit(t===``?null:t)}return(0,U.jsxs)(`div`,{className:`relative w-56`,children:[s&&(0,U.jsx)(`span`,{className:`text-muted-foreground pointer-events-none absolute top-1/2 left-2.5 -translate-y-1/2`,children:(0,U.jsx)(tm,{logo:s})}),(0,U.jsx)(up,{className:s?`pr-9 pl-8`:`pr-9`,placeholder:`System default`,value:t,onChange:e=>n(e.target.value),onBlur:()=>u(t),onKeyDown:e=>{e.key===`Enter`&&e.currentTarget.blur()}}),(0,U.jsxs)(ve,{children:[(0,U.jsx)(P,{asChild:!0,children:(0,U.jsx)(B,{variant:`ghost`,size:`icon-xs`,"aria-label":`Known shells`,className:`text-muted-foreground absolute top-1/2 right-1.5 -translate-y-1/2`,children:(0,U.jsx)(V,{icon:lt})})}),(0,U.jsxs)(N,{align:`end`,className:`w-72`,children:[a&&(0,U.jsx)(`p`,{className:`text-destructive px-2 py-1.5 text-xs`,children:a}),l?.length===0&&(0,U.jsx)(`p`,{className:`text-muted-foreground px-2 py-1.5 text-xs`,children:`No known shells found`}),l?.map(e=>(0,U.jsxs)(se,{onSelect:()=>u(e.path??e.name),children:[(0,U.jsx)(tm,{logo:Zp[e.name]}),e.name,e.path!==null&&(0,U.jsx)(`span`,{className:`text-muted-foreground ml-auto min-w-0 truncate pl-3 text-xs [direction:rtl]`,title:e.path,children:(0,U.jsx)(`bdi`,{children:em(e.path)})})]},e.path??e.name)),(0,U.jsx)(A,{}),(0,U.jsx)(se,{onSelect:()=>u(``),children:`System default`})]})]})]})}function rm(e){let t=e.config.workingDir[e.platform]??``,n=e.config.newThreads;return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Z,{title:`Projects`,children:(0,U.jsx)(Q,{label:`Working directory`,children:(0,U.jsx)(Rp,{className:`w-72 font-mono`,value:t,placeholder:`Home folder`,onCommit:t=>le(e.machine,{...e.config,workingDir:{...e.config.workingDir,[e.platform]:t.trim()===``?null:t.trim()}})},`${e.machine}-${t}`)})}),(0,U.jsx)(Z,{title:`New threads`,children:(0,U.jsx)(Q,{label:`Account`,children:(0,U.jsxs)(dp,{value:n.provider===`opencode`?`opencode`:n.accountId??void 0,onValueChange:t=>{if(t===`opencode`){le(e.machine,{...e.config,newThreads:{...n,provider:`opencode`,accountId:null}});return}let r=[...e.claudeAccounts,...e.codexAccounts].find(e=>e.id===t);if(r===void 0)throw Error(`That account was removed`);le(e.machine,{...e.config,newThreads:{...n,provider:r.provider,accountId:r.id}})},children:[(0,U.jsx)(pp,{className:`w-56`,children:(0,U.jsx)(fp,{placeholder:`First available`})}),(0,U.jsxs)(mp,{children:[[...e.claudeAccounts,...e.codexAccounts].map(e=>(0,U.jsxs)(X,{value:e.id,disabled:!e.valid,children:[(0,U.jsx)(pc,{provider:e.provider,className:`size-4`}),`${y[e.provider]} · ${e.name}`]},e.id)),e.openCode.available&&(0,U.jsxs)(X,{value:`opencode`,children:[(0,U.jsx)(pc,{provider:`opencode`,className:`size-4`}),y.opencode]})]})]})})}),(0,U.jsx)(im,{machine:e.machine,config:e.config,platform:e.platform,defaultShell:e.defaultShell},e.machine),(0,U.jsx)(qp,{machine:e.machine,config:e.config}),(0,U.jsx)(Yp,{machine:e.machine,config:e.config,claudeAccounts:e.claudeAccounts,codexAccounts:e.codexAccounts,openCode:e.openCode},`git-${e.machine}`),(0,U.jsx)(B,{variant:`outline`,onClick:e.onRestore,children:`Restore machine defaults`})]})}function im(e){let t=e.config.terminal,[n,r]=(0,H.useState)(e.platform),i=Gp(t.shell[e.platform],e.platform,e.defaultShell);function a(t){le(e.machine,{...e.config,terminal:t})}return(0,U.jsxs)(Z,{title:`Shell`,note:`Applies to new terminals`,children:[(0,U.jsx)(Q,{label:`Platform`,children:(0,U.jsxs)(dp,{value:n,onValueChange:e=>r(e),children:[(0,U.jsx)(pp,{className:`w-56`,children:(0,U.jsx)(fp,{})}),(0,U.jsx)(mp,{children:Pp.map(t=>(0,U.jsxs)(X,{value:t.value,children:[t.label,t.value===e.platform&&(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:`(this machine)`})]},t.value))})]})}),(0,U.jsx)(Q,{label:`Command`,children:(0,U.jsx)(nm,{machine:e.machine,platform:n,device:e.platform,value:t.shell[n],onCommit:e=>a({...t,shell:{...t.shell,[n]:e}})},`${e.machine}-${n}-command`)}),(0,U.jsx)(Q,{label:(0,U.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[`Shell integration`,(0,U.jsx)(Pr,{label:(0,U.jsxs)(`div`,{children:[`Tells the terminal where prompts and commands start and end.`,(0,U.jsxs)(`ul`,{className:`mt-1 list-disc pl-4`,children:[(0,U.jsx)(`li`,{children:`Click in the command line to move the cursor`}),(0,U.jsx)(`li`,{children:`Ignore clipboard reads once the command that asked has finished`})]})]}),children:(0,U.jsx)(`span`,{onClick:e=>e.preventDefault(),children:(0,U.jsx)(V,{icon:Fo,"aria-label":`About shell integration`,className:`text-muted-foreground size-3.5`})})})]}),children:(0,U.jsxs)(`div`,{className:`flex items-center gap-3`,children:[i!==null&&(0,U.jsx)(`span`,{className:`text-muted-foreground max-w-32 text-right text-xs sm:max-w-none`,children:i}),(0,U.jsx)(Ap,{checked:i===null&&t.behavior.shellIntegration,disabled:i!==null,onCheckedChange:e=>a({...t,behavior:{...t.behavior,shellIntegration:e}})})]})}),(0,U.jsx)(am,{identity:t.behavior.terminalIdentity,onChange:e=>a({...t,behavior:{...t.behavior,terminalIdentity:e}})})]})}function am(e){return(0,U.jsx)(Q,{label:`Report the terminal as`,children:(0,U.jsxs)(dp,{value:e.identity,onValueChange:e.onChange,children:[(0,U.jsx)(pp,{className:`w-56`,children:(0,U.jsx)(fp,{})}),(0,U.jsxs)(mp,{children:[(0,U.jsx)(X,{value:`offsite`,children:`OffSite`}),(0,U.jsx)(X,{value:`ghostty`,children:`Ghostty`}),(0,U.jsx)(X,{value:`iterm2`,children:`iTerm2`})]})]})})}var om=(0,H.createContext)({});function sm(e){let t=(0,H.useRef)(null);return t.current===null&&(t.current=e()),t.current}var cm=typeof window<`u`?H.useLayoutEffect:H.useEffect,lm=(0,H.createContext)(null);function um(e,t){e.indexOf(t)===-1&&e.push(t)}function dm(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function fm([...e],t,n){let r=t<0?e.length+t:t;if(r>=0&&r<e.length){let r=n<0?e.length+n:n,[i]=e.splice(t,1);e.splice(r,0,i)}return e}var pm=(e,t,n)=>n>t?t:n<e?e:n,mm={},hm=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),gm=e=>typeof e==`object`&&!!e,_m=e=>/^0[^.\s]+$/u.test(e);function vm(e){let t;return()=>(t===void 0&&(t=e()),t)}var ym=e=>e,bm=(...e)=>e.reduce((e,t)=>n=>t(e(n))),xm=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},Sm=class{constructor(){this.subscriptions=[]}add(e){return um(this.subscriptions,e),()=>this.remove(e)}remove(e){dm(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r){if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},Cm=e=>e*1e3,wm=e=>e/1e3,Tm=(e,t)=>t?1e3/t*e:0,Em=(e,t,n)=>e*(3*(1-e)*((1-e)*t+e*n)+e*e);function Dm(e,t,n,r){return e===t&&n===r?ym:i=>{let a=0,o=1,s=i;for(let t=0;;t++){s>=a&&s<=o||(s=(a+o)/2);let r=Em(s,e,n)-i;if(r*r<1e-28||t===40)break;r>0?o=s:a=s,s-=r*1e-7/(Em(s+1e-7,e,n)-i-r)}return Em(s,t,r)}}var Om=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,km=e=>t=>1-e(1-t),Am=Dm(.33,1.53,.69,.99),jm=km(Am),Mm=Om(jm),Nm=e=>e>=1?1:(e*=2)<1?.5*jm(e):.5*(2-2**(-10*(e-1))),Pm=e=>1-Math.sin(Math.acos(e)),Fm=km(Pm),Im=Om(Pm),Lm=Dm(.42,0,1,1),Rm=Dm(0,0,.58,1),zm=Dm(.42,0,.58,1),Bm=e=>Array.isArray(e)&&typeof e[0]!=`number`,Vm=e=>Array.isArray(e)&&typeof e[0]==`number`,Hm={linear:ym,easeIn:Lm,easeInOut:zm,easeOut:Rm,circIn:Pm,circInOut:Im,circOut:Fm,backIn:jm,backInOut:Mm,backOut:Am,anticipate:Nm},Um=e=>typeof e==`string`,Wm=e=>{if(Vm(e)){let[t,n,r,i]=e;return Dm(t,n,r,i)}return Um(e)?Hm[e]:e},Gm={delta:0,timestamp:0,isProcessing:!1},Km;function qm(){Km=void 0}var Jm={now:()=>(Km===void 0&&Jm.set(Gm.isProcessing||mm.useManualTiming?Gm.timestamp:performance.now()),Km),set:e=>{Km=e,queueMicrotask(qm)}},Ym=e=>Math.round(e*1e5)/1e5,Xm=e=>t=>typeof t==`string`&&t.startsWith(e),Zm=Xm(`--`),Qm=Xm(`var(--`),$m=e=>Qm(e)?eh.test(e.split(`/*`)[0].trim()):!1,eh=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function th(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var nh={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},rh={...nh,transform:e=>pm(0,1,e)},ih={...nh,default:1},ah=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function oh(e){return e==null}var sh=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ch=(e,t)=>n=>!!(typeof n==`string`&&sh.test(n)&&n.startsWith(e)||t&&!oh(n)&&Object.prototype.hasOwnProperty.call(n,t)),lh=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(ah);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},uh=e=>pm(0,255,e),dh={...nh,transform:e=>Math.round(uh(e))},fh={test:ch(`rgb`,`red`),parse:lh(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+dh.transform(e)+`, `+dh.transform(t)+`, `+dh.transform(n)+`, `+Ym(rh.transform(r))+`)`},ph=(e,t,n)=>{let r=e.substring(1+t*n,1+(t+1)*n);return n>1?r:r+r};function mh(e){let t=e.length>5?2:1,n=ph(e,3,t);return{red:parseInt(ph(e,0,t),16),green:parseInt(ph(e,1,t),16),blue:parseInt(ph(e,2,t),16),alpha:n?parseInt(n,16)/255:1}}var hh={test:ch(`#`),parse:mh,transform:fh.transform},gh=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),_h=gh(`deg`),vh=gh(`%`),$=gh(`px`),yh=gh(`vh`),bh=gh(`vw`),xh={...vh,parse:e=>vh.parse(e)/100,transform:e=>vh.transform(e*100)},Sh={test:ch(`hsl`,`hue`),parse:lh(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+vh.transform(Ym(t))+`, `+vh.transform(Ym(n))+`, `+Ym(rh.transform(r))+`)`},Ch={test:e=>fh.test(e)||hh.test(e)||Sh.test(e),parse:e=>fh.test(e)?fh.parse(e):Sh.test(e)?Sh.parse(e):hh.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?fh.transform(e):Sh.transform(e),getAnimatableNone:e=>{let t=Ch.parse(e);return t.alpha=0,Ch.transform(t)}},wh=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Th=new RegExp(ah.source),Eh=new RegExp(wh.source,`i`);function Dh(e){return isNaN(e)&&typeof e==`string`&&(Th.test(e)||Eh.test(e))}var Oh=`number`,kh=`color`,Ah=`var`,jh=`var(`,Mh="${}",Nh=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)(?![a-z]*\()/giu;function Ph(e){let t=e.toString();return Th.test(t)||Eh.test(t)}function Fh(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(Nh,e=>(Ch.test(e)?(r.color.push(a),i.push(kh),n.push(Ch.parse(e))):e.startsWith(jh)?(r.var.push(a),i.push(Ah),n.push(e)):(r.number.push(a),i.push(Oh),n.push(parseFloat(e))),++a,Mh)).split(Mh),indexes:r,types:i}}function Ih(e){return Fh(e).values}function Lh({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];i+=e===Oh?Ym(r[a]):e===kh?Ch.transform(r[a]):r[a]}return i}}function Rh(e){return Lh(Fh(e))}var zh=e=>typeof e==`number`?0:Ch.test(e)?Ch.getAnimatableNone(e):e,Bh=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:zh(e);function Vh(e){let t=Fh(e);return Lh(t)(t.values.map((e,n)=>Bh(e,t.split[n])))}var Hh={test:Dh,parse:Ih,createTransformer:Rh,getAnimatableNone:Vh};function Uh(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Wh({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=Uh(s,r,e+1/3),a=Uh(s,r,e),o=Uh(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Gh(e,t){return n=>n>0?t:e}var Kh=(e,t,n)=>e+(t-e)*n,qh=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Jh=[hh,fh,Sh],Yh=e=>Jh.find(t=>t.test(e));function Xh(e){let t=Yh(e);if(!t)return!1;let n=t.parse(e);return t===Sh&&(n=Wh(n)),n}var Zh=(e,t)=>{let n=Xh(e),r=Xh(t);if(!n||!r)return Gh(e,t);let i={...n};return e=>(i.red=qh(n.red,r.red,e),i.green=qh(n.green,r.green,e),i.blue=qh(n.blue,r.blue,e),i.alpha=Kh(n.alpha,r.alpha,e),fh.transform(i))},Qh=new Set([`none`,`hidden`]);function $h(e,t){return Qh.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function eg(e,t){return n=>Kh(e,t,n)}function tg(e){return typeof e==`number`?eg:typeof e==`string`?$m(e)?Gh:Ch.test(e)?Zh:ag:Array.isArray(e)?ng:typeof e==`object`?Ch.test(e)?Zh:rg:Gh}function ng(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>tg(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function rg(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=tg(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function ig(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]],s=e.values[o]??0;n[i]=s,r[a]++}return n}var ag=(e,t)=>{let n=Fh(e),r=Fh(t);return n.indexes.var.length===r.indexes.var.length&&n.indexes.color.length===r.indexes.color.length&&n.indexes.number.length>=r.indexes.number.length?Qh.has(e)&&!r.values.length||Qh.has(t)&&!n.values.length?$h(e,t):bm(ng(ig(n,r),r.values),Lh(r)):Gh(e,t)},og=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function sg(e,t){let n=og.exec(e);if(!n)return;let r=og.exec(t);if(!r||n[2]!==r[2])return;let i=n[2],a=parseFloat(n[1]),o=parseFloat(r[1]);return e=>Ym(Kh(a,o,e))+i}function cg(e,t,n){if(typeof e==`number`&&typeof t==`number`&&typeof n==`number`)return Kh(e,t,n);if(typeof e==`string`&&typeof t==`string`){let n=sg(e,t);if(n)return n}return tg(e)(e,t)}var lg=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function ug(e){let t=new Set,n=new Set,r=!1,i=!1,a,o=new Set,s={delta:0,timestamp:0,isProcessing:!1};function c(t){o.has(t)&&(n.add(t),e()),(a=t)(s)}let l={schedule:(e,i=!1,s=!1)=>{let c=s&&r,l=c?t:n;return i&&o.add(e),c&&e!==a&&l.delete(e),l.add(e),e},cancel:e=>{n.delete(e),o.delete(e)},process:e=>{if(s=e,r){i=!0;return}r=!0;let o=t;t=n,n=o,t.forEach(c),t.clear(),a=void 0,r=!1,i&&(i=!1,l.process(e))}};return l}var dg=40;function fg(e,t,n={delta:0,timestamp:0,isProcessing:!1}){let r=!1,i=!0,a=()=>r=!0,o=lg.reduce((e,t)=>(e[t]=ug(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=mm.useManualTiming,o=a?n.timestamp:performance.now();r=!1,a||(n.delta=i?1e3/60:Math.max(Math.min(o-n.timestamp,dg),1)),n.timestamp=o,n.isProcessing=!0,s.process(n),c.process(n),l.process(n),u.process(n),d.process(n),f.process(n),p.process(n),m.process(n),n.isProcessing=!1,r&&t&&(i=!1,e(h))},g=()=>{r=!0,i=!0,n.isProcessing||e(h)};return{schedule:lg.reduce((e,t)=>{let n=o[t];return e[t]=(e,t=!1,i=!1)=>(r||g(),n.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<lg.length;t++)o[lg[t]].cancel(e)},state:n,steps:o}}var{schedule:pg,cancel:mg,steps:hg}=fg(typeof requestAnimationFrame<`u`?requestAnimationFrame:ym,!0,Gm),gg=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>pg.update(t,e),stop:()=>mg(t),now:()=>Gm.isProcessing?Gm.timestamp:Jm.now()}},_g=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},vg=2e4;function yg(e,t=50,n=vg,r){let i=0,a=e.next(i);for(r?.push(a.value);!a.done&&i<n;)i+=t,a=e.next(i),r?.push(a.value);return i>=n?1/0:i}function bg(e,t=100,n){let{keyframes:r,velocity:i}=e,a=r&&r[r.length-1]-r[0],o=n({...e,velocity:i&&a?i*t/a:i,keyframes:[0,t]}),s=Math.min(yg(o),vg);return{type:`keyframes`,ease:e=>o.next(s*e).value/t,duration:wm(s)}}var xg=100,Sg=10,Cg=1,wg=800,Tg=.3,Eg=.3,Dg=.01,Og=2,kg=.005,Ag=.5,jg=.01,Mg=10,Ng=.05,Pg=e=>e<0?1/Math.max(1+e,Ng):Math.max(1-e,Ng);function Fg(e,t){if(!(e>1))return 1;let n=Math.sqrt(e*e-1),r=e-n,i=e+n,a=2*n*Math.exp(-t)*(1+t);return Rg(e=>i*Math.exp(-r*e)-r*Math.exp(-i*e)-a,e=>Math.exp(-i*e)-Math.exp(-r*e),t)/t}function Ig(e,t){return e*Math.sqrt(1-t*t)}var Lg=12;function Rg(e,t,n){let r=n;for(let n=1;n<Lg;n++)r-=e(r)/t(r);return r}var zg=.001;function Bg({duration:e=wg,bounce:t=Tg}){let n,r,i=Pg(t);e=pm(jg,Mg,wm(e)),i<1?(n=t=>{let n=t*i,r=n*e,a=Ig(t,i),o=Math.exp(-r);return zg-n/a*o},r=t=>{let r=t*i*e,a=i*i*t*t*e,o=Math.exp(-r),s=Ig(t*t,i);return(-n(t)+zg>0?-1:1)*-a*o/s}):(n=t=>-.001+Math.exp(-t*e)*(t*e+1),r=t=>Math.exp(-t*e)*(-t*(e*e)));let a=5/e,o=Rg(n,r,a),s=o*Fg(i,o*e),c=s*s;return{stiffness:c,damping:i*2*Math.sqrt(c),duration:Cm(e)}}var Vg=(e,t)=>(t?e>=0:e>0)&&e<1/0;function Hg(e,t){if(Vg(e,t))return e}function Ug(e){let t=Hg(e.stiffness),n=Hg(e.damping,!0),r=Hg(e.mass),i={...e,stiffness:t??xg,damping:n??Sg,mass:r??Cg,isResolvedFromDuration:!1,isTimeDefined:(t??n??r)===void 0&&(e.duration!==void 0||e.bounce!==void 0)};if(i.isTimeDefined){if(e.visualDuration){let t=Pg(e.bounce||0),n=2*Math.PI/(e.visualDuration*1.2)*Fg(t,2*Math.PI/1.2);i.stiffness=n*n,i.damping=2*t*Math.sqrt(i.stiffness)}else Object.assign(i,Bg(i)),i.isResolvedFromDuration=!0;Vg(i.stiffness)&&Vg(i.damping,!0)||(i.stiffness=xg,i.damping=Sg)}return i}function Wg(e=Eg,t=Tg){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},r=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:o,damping:s,mass:c,duration:l,isResolvedFromDuration:u,isTimeDefined:d}=Ug({...n}),f=e=>d?0:-wm(e),p=s/(2*Math.sqrt(o*c)),m=wm(Math.sqrt(o/c)),h=p*m,g={target:i,delta:i-r,velocity:f(n.velocity||0)||0,restSpeed:0,restDelta:0},_=()=>{let e=Math.abs(g.delta)<5;g.restSpeed=n.restSpeed||(e?Dg:Og),g.restDelta=n.restDelta||(e?kg:Ag)};_();let v,y,b;if(p<1){let e=Ig(m,p),t={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};b=()=>{t.A=(g.velocity+h*g.delta)/e,t.sinC=h*t.A+g.delta*e,t.cosC=h*g.delta-t.A*e};let n=n=>{n!==t.t&&(t.t=n,t.env=Math.exp(-h*n),t.sin=Math.sin(e*n),t.cos=Math.cos(e*n))};v=e=>(n(e),g.target-t.env*(t.A*t.sin+g.delta*t.cos)),y=e=>(n(e),t.env*(t.sinC*t.sin+t.cosC*t.cos))}else if(p===1){v=e=>g.target-Math.exp(-m*e)*(g.delta+(g.velocity+m*g.delta)*e);let e={C:0};b=()=>{e.C=g.velocity+m*g.delta},y=t=>Math.exp(-m*t)*(m*e.C*t-g.velocity)}else{let e=m*Math.sqrt(p*p-1),t=h-e,n=h+e,r=e<1||d?1/0:300/e,i=(e,t)=>Math.exp(t>r?(h-e)*r-h*t:-e*t),a={S:0,F:0};b=()=>{let t=(g.velocity+h*g.delta)/e;a.S=(g.delta+t)/2,a.F=(g.delta-t)/2},v=e=>g.target-a.S*i(t,e)-a.F*i(n,e),y=e=>t*a.S*i(t,e)+n*a.F*i(n,e)}b();let x=u&&l||null,S={calculatedDuration:x,retarget:(e,t)=>{g.target=e[e.length-1],g.delta=g.target-e[0],g.velocity=f(t),n.restSpeed&&n.restDelta||_(),S.calculatedDuration=x,a.done=!1,b()},velocity:e=>Cm(y(e)),next:e=>{let t=v(e);if(u)a.done=e>=l;else{let n=Cm(y(e));a.done=Math.abs(n)<=g.restSpeed&&Math.abs(g.target-t)<=g.restDelta}return a.value=a.done?g.target:t,a},toString:()=>{let e=Math.min(yg(S),vg),t=_g(t=>S.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return S}var Gg=Object.assign(Wg,{applyToOptions:e=>{let t=bg(e,100,Wg);return e.ease=t.ease,e.duration=Cm(t.duration),e.type=`keyframes`,e}});function Kg({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>e<s||e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o?o(g):g;_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>{let t=v(e);f.done=Math.abs(t)<=l,f.value=f.done?_:e?_+t:d},b,x,S=e=>{p(f.value)&&(b=e,x=Gg({keyframes:[f.value,m(f.value)],velocity:-v(e)/r*1e3,damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return S(0),{calculatedDuration:null,next:e=>{let t=!1;return!x&&b===void 0&&(t=!0,y(e),S(e)),b!==void 0&&e>=b?x.next(e-b):(!t&&y(e),f)}}}function qg(e,t,n){let r=[],i=mm.mix||cg,a=e.length-1;for(let o=0;o<a;o++){let a=n?.(e[o],e[o+1])||i(e[o],e[o+1]);t&&(a=bm(Array.isArray(t)?t[o]||ym:t,a)),r.push(a)}return r}function Jg(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=qg(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=xm(e[r],e[r+1],n);return s[r](i)};return n?t=>l(pm(e[0],e[a-1],t)):l}function Yg(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=xm(0,t,r);e.push(Kh(n,1,i))}}function Xg(e){let t=[0];return Yg(t,e.length-1),t}function Zg(e,t){return e.map(e=>e*t)}function Qg(e,t){return e.map(()=>t||zm).splice(0,e.length-1)}function $g({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`,mixer:i}){let a=typeof t[0]==`number`?void 0:i,o=Bm(r)?r.map(Wm):Wm(r)||zm,s={done:!1,value:t[0]};if(!a&&t.length===2&&!Array.isArray(o)&&(!n||n.length!==2||n[0]===0&&n[1]===1)){let[n,r]=t,i=n===r?void 0:(mm.mix||cg)(n,r);return{calculatedDuration:e,next:t=>(s.value=i?i(o(e>0?pm(0,1,t/e):1)):r,s.done=t>=e,s)}}let c=Jg(Zg(n&&n.length===t.length?n:Xg(t),e),t,{ease:Array.isArray(o)?o:Qg(t,o),mixer:a});return{calculatedDuration:e,next:t=>(s.value=c(t),s.done=t>=e,s)}}var e_=5;function t_(e,t,n){let r=Math.max(t-e_,0);return Tm(n-e(r),t-r)}function n_(e,t,n=0){return t<=0?n:e.velocity?e.velocity(t):t_(t=>e.next(t).value,t,e.next(t).value)}var r_=e=>e!==null;function i_(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(r_),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var a_={decay:Kg,inertia:Kg,tween:$g,keyframes:$g,spring:Gg};function o_(e){typeof e.type==`string`&&(e.type=a_[e.type])}var s_=40,c_=(e,t)=>t-e>s_&&!mm.useManualTiming?t:e;function l_(e,t){return{kind:e,animation:t,timestamp:Jm.now(),frameTimestamp:Gm.timestamp,frameIsProcessing:Gm.isProcessing}}function u_(e,t,n){let r=globalThis.__MOTION_INSPECT__;if(r)try{r({...l_(`animation-start`,e),options:n?{...t,...n}:t})}catch{}}function d_(e,t){let n=globalThis.__MOTION_INSPECT__;if(n)try{n({...l_(`layout-animation-start`,e),node:t})}catch{}}var f_=class{constructor(){this.isResolved=!1}get finished(){return this._finished||=this.isResolved?Promise.resolve():new Promise(e=>{this._resolve=e}),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(e,t){return this.finished.then(e,t)}},p_=e=>e/100,m_=e=>Math.round(e*1e4)/1e4,h_=class extends f_{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==Jm.now()&&this.tick(Jm.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause(),u_(this,this.options)}initAnimation(){let{options:e}=this;o_(e);let{type:t=$g,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||$g;this.mixKeyframes=void 0,s!==$g&&typeof o[0]!=`number`&&(this.mixKeyframes=bm(p_,e.mixer?.(o[0],o[1])||cg(o[0],o[1])),o=[0,100]);let c=s(o===e.keyframes?e:{...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=yg(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){this.currentTime=this.holdTime??Math.round(e-this.startTime)*this.playbackSpeed}tick(e,t=!1){let{generator:n,totalDuration:r,calculatedDuration:i}=this;if(this.startTime===null)return n.next(0);let{delay:a=0,keyframes:o,type:s,onUpdate:c,finalKeyframe:l}=this.options;this.startTime===this.pendingStartTime&&(this.startTime=c_(this.startTime,e)),this.pendingStartTime=void 0,this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let u=this.currentTime-a*(this.playbackSpeed>=0?1:-1),d=this.playbackSpeed>=0?u<0:u>r;this.currentTime=Math.max(u,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let f=this.generate(this.currentTime,d),{done:p}=f;d||(p=this.playbackSpeed>=0?i<1/0?this.currentTime>=r:p:this.currentTime<=0);let m=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&p);return m&&s!==Kg&&(f.value=i_(o,this.options,l,this.speed)),c&&c(f.value),m&&this.finish(),f}at(e){return this.holdTime??m_((e-this.startTime)*this.playbackSpeed)}sampleAt(e,t){let{options:n,totalDuration:r}=this,i=this.at(e)-(n.delay||0);return i>=r&&n.type!==Kg?i_(n.keyframes,n,t?void 0:n.finalKeyframe):this.generate(Math.max(i,0),i<0).value}generate(e,t){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o}=this,{keyframes:s,repeat:c,repeatType:l,repeatDelay:u}=this.options,d=e,f=n;if(c){let t=Math.min(e,r)/o,n=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),i===1&&n--,n=Math.min(n,c+1),n%2&&(l===`reverse`?(i=1-i,u&&(i-=u/o)):l===`mirror`&&(f=a)),d=pm(0,1,i)*o}let p;return t?(this.delayState.value=s[0],p=this.delayState):p=f.next(d),i&&!t&&(p.value=i(p.value)),p}get duration(){return wm(this.calculatedDuration)}get iterationDuration(){return this.duration+wm(this.options.delay??0)}get time(){return wm(this.currentTime)}set time(e){e=Cm(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){return n_(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(Jm.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=wm(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=gg,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??(this.pendingStartTime=n):this.startTime=n-this.holdTime/(this.playbackSpeed||1),this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(Jm.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.driver?.stop(),this.driver=void 0,this.startTime=this.holdTime=null}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}},g_=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function __(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(ah)||[];if(!r)return e;let i=n.replace(r,``),a=+!!g_.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var v_=/\b([a-z-]*)\(.*?\)/gu,y_={...Hh,getAnimatableNone:e=>{let t=e.match(v_);return t?t.map(__).join(` `):e}},b_={...Hh,getAnimatableNone:e=>{let t=Hh.parse(e);return Hh.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},x_={...nh,transform:Math.round},S_={rotate:_h,pathRotation:_h,rotateX:_h,rotateY:_h,rotateZ:_h,scale:ih,scaleX:ih,scaleY:ih,scaleZ:ih,skew:_h,skewX:_h,skewY:_h,distance:$,translateX:$,translateY:$,translateZ:$,x:$,y:$,z:$,perspective:$,transformPerspective:$,opacity:rh,originX:xh,originY:xh,originZ:$},C_={borderWidth:$,borderTopWidth:$,borderRightWidth:$,borderBottomWidth:$,borderLeftWidth:$,borderRadius:$,borderTopLeftRadius:$,borderTopRightRadius:$,borderBottomRightRadius:$,borderBottomLeftRadius:$,width:$,maxWidth:$,height:$,maxHeight:$,top:$,right:$,bottom:$,left:$,inset:$,insetBlock:$,insetBlockStart:$,insetBlockEnd:$,insetInline:$,insetInlineStart:$,insetInlineEnd:$,padding:$,paddingTop:$,paddingRight:$,paddingBottom:$,paddingLeft:$,paddingBlock:$,paddingBlockStart:$,paddingBlockEnd:$,paddingInline:$,paddingInlineStart:$,paddingInlineEnd:$,margin:$,marginTop:$,marginRight:$,marginBottom:$,marginLeft:$,marginBlock:$,marginBlockStart:$,marginBlockEnd:$,marginInline:$,marginInlineStart:$,marginInlineEnd:$,fontSize:$,backgroundPositionX:$,backgroundPositionY:$,...S_,zIndex:x_,fillOpacity:rh,strokeOpacity:rh,numOctaves:x_},w_={...C_,color:Ch,backgroundColor:Ch,outlineColor:Ch,fill:Ch,stroke:Ch,borderColor:Ch,borderTopColor:Ch,borderRightColor:Ch,borderBottomColor:Ch,borderLeftColor:Ch,filter:y_,WebkitFilter:y_,mask:b_,WebkitMask:b_},T_=e=>w_[e],E_=new Set([y_,b_]);function D_(e,t){let n=T_(e);return E_.has(n)||(n=Hh),n.getAnimatableNone?n.getAnimatableNone(t):void 0}function O_(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var k_=e=>e*180/Math.PI,A_=e=>M_(k_(Math.atan2(e[1],e[0]))),j_={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scaleZ:()=>1,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:A_,rotateZ:A_,skewX:e=>k_(Math.atan(e[1])),skewY:e=>k_(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},M_=e=>(e%=360,e<0&&(e+=360),e),N_=A_,P_=e=>Math.hypot(e[0],e[1]),F_=e=>Math.hypot(e[4],e[5]),I_={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:P_,scaleY:F_,scaleZ:e=>Math.hypot(e[8],e[9],e[10]),scale:e=>(P_(e)+F_(e))/2,rotateX:e=>M_(k_(Math.atan2(e[6],e[5]))),rotateY:e=>M_(k_(Math.atan2(-e[2],e[0]))),rotateZ:N_,rotate:N_,skewX:e=>k_(Math.atan(e[4])),skewY:e=>k_(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function L_(e){return+!!e.includes(`scale`)}function R_(e,t){if(!e||e===`none`)return L_(t);let n=e.match(/^matrix(3d)?\(([-\d.e\s,]+)\)$/u);if(!n)return L_(t);let r=(n[1]?I_:j_)[t],i=n[2].split(`,`).map(e=>parseFloat(e));return typeof r==`function`?r(i):i[r]}var z_=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return R_(n,t)},B_=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`scaleZ`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],V_=new Set([...B_,`pathRotation`]),H_=e=>e===nh||e===$,U_=new Set([`x`,`y`,`z`]),W_=B_.filter(e=>!U_.has(e));function G_(e){let t=[];return W_.forEach(n=>{let r=e.getValue(n);if(r!==void 0){let e=r.get(),i=+!!n.startsWith(`scale`);if(e===i)return;t.push([n,e]),r.set(i)}}),t}var K_=new Set([`bottom`,`right`]);function q_(e,t,n,r,i,a){let o=parseFloat(e);if(!isNaN(o))return o;let{min:s,max:c}=t()[n],l=c-s;return a===`border-box`?l:l-parseFloat(r)-parseFloat(i)}var J_=({transform:e})=>R_(e,`x`),Y_=({transform:e})=>R_(e,`y`),X_={width:({width:e,paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r},i)=>q_(e,i,`x`,t,n,r),height:({height:e,paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r},i)=>q_(e,i,`y`,t,n,r),top:({top:e})=>parseFloat(e),left:({left:e})=>parseFloat(e),bottom:({top:e},t)=>{let{y:n}=t();return parseFloat(e)+(n.max-n.min)},right:({left:e},t)=>{let{x:n}=t();return parseFloat(e)+(n.max-n.min)},x:J_,y:Y_,translateX:J_,translateY:Y_},Z_=new Set,Q_=!1,$_=!1,ev=!1;function tv(){if($_){let e=[],t=new Set,n=new Set;Z_.forEach(r=>{r.needsMeasurement&&(e.push(r),t.add(r.element),K_.has(r.name)&&n.add(r.element))});let r=new Map;n.forEach(e=>{let t=G_(e);t.length&&(r.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=r.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}$_=!1,Q_=!1,Z_.forEach(e=>e.complete(ev)),Z_.clear()}function nv(){Z_.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&($_=!0)})}function rv(){ev=!0,nv(),tv(),ev=!1}function iv(e,t,n){if(typeof e==`string`){if(hm(e)||_m(e))return parseFloat(e);if(!Hh.test(e)&&Hh.test(n))return D_(t,n)}return e??void 0}var av=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(Z_.add(this),Q_||(Q_=!0,pg.read(nv),pg.resolveKeyframes(tv))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=iv(n.readValue(t,a),t,a);r!==void 0&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}O_(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Z_.delete(this)}cancel(){this.state===`scheduled`&&(Z_.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},ov=e=>e.startsWith(`--`);function sv(e,t,n){ov(t)?e.style.setProperty(t,n):e.style[t]=n}var cv={};function lv(e,t){let n=vm(e);return()=>cv[t]??n()}var uv=lv(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),dv=lv(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),fv=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,pv={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:fv([0,.65,.55,1]),circOut:fv([.55,0,1,.45]),backIn:fv([.31,.01,.66,-.59]),backOut:fv([.33,1.53,.69,.99])};function mv(e,t){if(e)return typeof e==`function`?dv()?_g(e,t):`ease-out`:Vm(e)?fv(e):Array.isArray(e)?e.map(e=>mv(e,t)||pv.easeOut):pv[e]}function hv(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=mv(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function gv(e){return typeof e==`function`&&`applyToOptions`in e}function _v({type:e,...t}){return gv(e)&&dv()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var vv=class extends f_{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e;let c=_v(e);this.animation=hv(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=i_(r,this.options,o,this.speed);this.updateMotionValue?.(e),sv(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()},u_(this,e,c)}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){this.isStopped||(this.isStopped=!0,this.state!==`idle`&&this.finishedTime===null&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||(this.animation.onfinish=null,this.cancel())))}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return wm(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+wm(e)}get time(){return wm(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Cm(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,onAttach:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&uv()?(this.animation.timeline=e,t?.(this.animation),ym):n(this)}},yv={anticipate:Nm,backInOut:Mm,circInOut:Im};function bv(e){return e in yv}function xv(e){typeof e.ease==`string`&&bv(e.ease)&&(e.ease=yv[e.ease])}var Sv=class extends vv{constructor(e){xv(e),o_(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}elapsed(){return this.state===`running`?(Jm.now()-this.startTime)*this.speed:this.time*1e3}sample(e){if(!this.sampler){let{motionValue:e,onUpdate:t,onComplete:n,onPlay:r,onStop:i,element:a,...o}=this.options;this.sampler=new h_({...o,autoplay:!1}),this.sampler.stop()}return this.sampler.sample(Math.max(0,e)).value}liveValue(){let{state:e}=this;if(e===`running`||e===`paused`)return this.sample(this.elapsed())}updateMotionValue(e){let{motionValue:t,element:n,name:r}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let{speed:i}=this,a=this.elapsed(),o=this.state===`running`&&i?pm(0,10,a):0,s=this.sample(a);n&&r&&sv(n,r,s),t.setWithVelocity(this.sample(a-o*Math.sign(i)),s,o/Math.abs(i||1))}},Cv=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(Hh.test(e)||e===`0`)&&!e.startsWith(`url(`));function wv(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Tv(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=Cv(i,t),s=Cv(a,t);return!o||!s?!1:wv(e)||(n===`spring`||gv(n))&&r}function Ev(e){e.duration=0,e.type=`keyframes`}var Dv=new Set([`opacity`,`clipPath`,`filter`,`transform`]),Ov=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function kv(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&Ov.test(e[t]))return!0;return!1}var Av=({mixer:e,keyframes:t})=>e&&typeof t[0]!=`number`&&t.some((n,r)=>r&&e(t[r-1],n)),jv=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),Mv=()=>!mm.useManualTiming&&Object.hasOwnProperty.call(Element.prototype,`animate`);function Nv(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!n||!(Dv.has(n)||jv.has(n)))return!1;let c=t?.owner?.current;if(!(c instanceof HTMLElement)&&!(c instanceof SVGElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return Mv()&&(Dv.has(n)||jv.has(n)&&kv(s))&&(n!==`transform`||!u)&&!l&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`&&!Av(e)}var Pv=(e,t)=>t&&typeof e==`number`?t.transform(e):e,Fv={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Iv=B_.length,Lv={},Rv=(e,t,n=Pv(t,S_[e]))=>(Lv[e]||(Lv[e]=(Fv[e]||e)+`(`))+n+`)`,zv=(e,t)=>(typeof t==`number`?t:parseFloat(t))===+!!e.startsWith(`scale`);function Bv(e,t,n){let r=``;for(let i=0;i<Iv;i++){let a=B_[i],o=e[a];if(o===void 0)continue;let s=n&&(t[a]=Pv(o,C_[a]));zv(a,o)||(r+=Rv(a,o,s||void 0)+` `)}let i=e.pathRotation;return i&&(r+=Rv(`rotate`,i)),r=r.trim(),n?n(t,r):r||`none`}var Vv=new WeakMap,Hv=200,Uv=.001,Wv=.1,Gv=.001,Kv=100,qv=e=>/^(linear|ease(In|Out|InOut))$/.test(e),Jv=(e,t)=>Math.abs(e-t)<=Uv,Yv=(e,t)=>e-t,Xv=(e,t,n)=>Xg(Array(n+1)).map(n=>Kh(e,t,n)),Zv=e=>e.motionValue.owner,Qv=e=>Vv.get(e),$v=({state:e})=>e===`idle`||e===`finished`,ey=(e,t)=>e.latestValues?e.latestValues[t]:e.getValue(t)?.get(),ty=({name:e,motionValue:t})=>e&&B_.includes(e)&&t?.owner?.current instanceof HTMLElement&&Mv()&&dv();function ny(e){let t=Zv(e),{onUpdate:n,transformTemplate:r}=t.getProps();return!e.isHandoff&&!n&&!e.hasOnUpdate&&!r&&e.type!==`inertia`&&(ey(t,`transform`)||`none`)===`none`&&!ey(t,`pathRotation`)&&!t.projection?.isProjecting()&&!Av(e)}var ry=class extends h_{constructor(e){let t=Zv(e).current,{driver:n=gg}=e,r,i=ny(e);e.driver=e=>{let i=n(e);return{js:i,now:i.now,start:(e=!0)=>{let n=Qv(t);!n||n.isJS?i.start(e):n.schedule(!1,!e)},stop:()=>{i.stop();let e=Qv(t);e&&!e.isFinishing&&e.release(r)}}},super(e),r=this,this.canAccelerate=i;let{stop:a}=this;this.stop=()=>{this.isAccelerated()&&this.sync(),a()}}get group(){return Qv(Zv(this.options).current)}get js(){return this.driver?.js}get name(){return this.options.name}timing(){let{startTime:e,speed:t,totalDuration:n}=this,{delay:r=0,repeatType:i}=this.options;return this.holdTime===null?n===1/0?[e+r/t,this.resolvedDuration*(i===`loop`?1:2)/t||1]:[e+(r+n)/t,0]:[1/0,0]}isAccelerated(){let{group:e,state:t}=this;return e?.tracks.has(this)&&!e.isJS&&this.canAccelerate&&(t===`running`||t===`paused`)}liveValue(){return this.isAccelerated()?this.sampleAt(Jm.now()):void 0}tween(){let{keyframes:e,type:t,ease:n,times:r,repeat:i,delay:a=0}=this.options,o=Vm(n)?fv(n):qv(n)&&pv[n];if(o&&!i&&!r&&e.length===2&&t===$g&&this.holdTime===null){let e=this.startTime+a/this.speed;return[e,e+this.resolvedDuration/this.speed,o]}}boundaries(e,t){let{startTime:n,speed:r,resolvedDuration:i,options:a}=this,{delay:o=0,repeat:s=0,repeatDelay:c=0,repeatType:l,times:u,keyframes:d,type:f}=a,p=(f||$g)===$g?u||Xg(d):[0,1],m=n+o/r,h=[];if(this.holdTime!==null||!(i>0))return h;for(let n=Math.max(0,Math.floor((e-m)*r/i));n<=s;n++){let a=m+n*i/r;if(a>t)break;for(let o of p){let s=a+(n%2&&l&&l!==`loop`?1-o:o)*(i-c)/r;s>e&&s<t&&h.push(s)}}return h}numberAt(e){return parseFloat(this.sampleAt(e,!0))}sync(){let e=Jm.now();this.options.motionValue.setWithVelocity(this.sampleAt(e-10,!0),this.sampleAt(e,!0),10)}play(){this.isStopped||((this.group||iy(Zv(this.options))).tracks.add(this),super.play())}pause(){super.pause(),this.isAccelerated()&&(this.sync(),this.group.schedule(!1))}complete(){super.complete();let{group:e}=this;e&&!e.isJS&&this.canAccelerate&&this.tick(Jm.now())}get time(){return this.isAccelerated()?wm(pm(0,this.totalDuration,this.at(Jm.now())-(this.options.delay||0))):super.time}set time(e){super.time=e,this.isAccelerated()&&this.sync()}attachTimeline(e){return this.canAccelerate=!1,this.group?.demote(!0),super.attachTimeline(e)}};function iy(e){let t=e.current,n=new Set,r=new Map,i={},a=[],o=new Map,s=[],c=!1,l=!1,u=!1,d=!1,f=-1/0,p=e=>{for(let t of n)if(t.name===e)return!0},m=(t,n)=>{let o={};for(let s of t===void 0?B_:a){let a=r.get(s),c=t===void 0?ey(e,s):a?a.sampleAt(n>t&&!a.timing()[1]?n:t):i[s];c!==void 0&&(o[s]=c)}return o},h=(e,t)=>{let n=``;for(let r in e){let i=e[r];t&&zv(r,i)||(n+=Rv(r,i)+` `)}return(t?n.trim():n)||`none`},g=(e,t)=>h(m(e,t)),_=(e=m())=>{t.style.transform=h(e,!0)},v=(e=!0)=>{e&&_(),s.forEach(({animation:e})=>e.cancel()),s=[]},y=(e,n)=>new Animation(new KeyframeEffect(t,e,n)),b=(e,t,n=1/0)=>{let r={animation:e,offset:t,end:n};e.startTime=Jm.now()+t,n<1/0&&(e.onfinish=()=>{r.isDone=!0,s.some(e=>e.end===1/0)&&(e.cancel(),s=s.filter(e=>e!==r)),A.schedule(!1)}),e.oncancel=()=>s.includes(r)&&A.demote(),s.push(r)},x=(e,t,n)=>{let r=(t,n)=>Math.abs(e(n)-e(t)),i=r(t,n);for(;n-t>.01;){let e=(t+n)/2;r(t,e)>r(e,n)?n=e:t=e}return r(t,n)>i/2?[t,n]:[]},S=(e,t,n,r)=>{let i=Math.min(Hv,Math.max(2,Math.ceil((n-t)/10)));if(r.length*4>i)return;let a=Xv(t,n,i).concat(r).sort(Yv),o=e=>xm(t,n,e),s,c;for(let n of e){let e=n.numberAt(t),r=a.map(t=>n.numberAt(t)-e),i=r[r.length-1],o=r.some(e=>Math.abs(e)*Uv>Math.abs(i))?0:i,l=r.map(e=>o?e/o:e);if(o&&!s)s=l,c=t=>(n.numberAt(t)-e)/o;else if(l.some((e,t)=>!Jv(e,o&&s[t])))return}if(!s||s.every((e,t)=>Jv(e,o(a[t]))))return`linear`;let l=[],u=(e,t=c(e))=>l.push(m_(t)+` `+m_(o(e)*100)+`%`);return s.forEach((e,t)=>{t&&Math.abs(e-s[t-1])>.2&&x(c,a[t-1],a[t]).forEach(e=>u(e)),u(a[t],e)}),`linear(`+l+`)`},C=(e,t,n,r)=>{let i=[t],a=(t,n)=>e.every(e=>!(Math.abs(e.numberAt((t+n)/2)-(e.numberAt(t)+e.numberAt(n))/2)>(e.name.startsWith(`scale`)?Gv:Wv))),o=(t,n,r)=>{if(n-t<1||a(t,n))i.push(n);else if(r<4)o(t,(t+n)/2,r+1),o((t+n)/2,n,r+1);else{for(let r of e)i.push(...x(e=>r.numberAt(e),t,n));i.push(n)}},s=Xv(t,n,Math.ceil((n-t)/100));for(let e of r)s.push(e,Math.min(e+.01,n));let c=t;for(let e of s.sort(Yv))e>c&&o(c,e,0),c=e;return i.sort(Yv)},w=e=>{let t;for(let n of e){let e=n.tween();if(!e||t?.some((t,n)=>n<2?Math.abs(e[n]-t)>1:e[n]!==t))return;t=e}return t},T=(e,t,n,r,i={fill:`both`},a)=>{let o=e.flatMap(e=>e.boundaries(t,n)),s=r||S(e,t,n,o),c=s?[t,n]:C(e,t,n,o),l=c.map(e=>g(e,a)),u={transform:l};return s||(u.offset=c.map(e=>xm(t,n,e))),l.every(e=>e===l[0])&&(_(m(t,a)),u=null),y(u,{...i,duration:n-t,easing:s||`linear`})},E=t=>{let c=t,l=0,u=0,d=[],f=[],p=new Set;r.clear(),o=new Map;for(let e of n){r.set(e.name,e);let[n,i]=e.timing(),a=n===1/0;if(o.set(e,[e.at(t),e.speed,a]),a)e.sync();else{if(e.speed<0)return;if(i){if(l){let e=(n-u)/i;if(Math.abs(i-l)>1||Math.abs(e-Math.round(e))*l>1)return}else l=i,u=n;f.push(e)}else p.add(n);d.push(e),c=Math.max(c,n)}}i={},a=B_.filter(t=>{if(r.has(t))return!0;let n=i[t]=ey(e,t);return n!==void 0&&!zv(t,n)}),v(!1);let m=!l&&w(d);try{if(m&&m[1]>t){let[e,n,r]=m;b(T(d,e,n,r),e-t,n-e)}else c>t&&(b(T(d,t,c),0,c-t),p.forEach(e=>e<c-1&&b(y(null,{duration:e-t}),0,e-t)));if(l){let e=u+Math.floor((c-u)/l)*l;b(T(f,e,e+l,void 0,{iterations:1/0,iterationStart:(c-e)/l,fill:`forwards`},c),c-t)}}catch{return}return s.length||v(),!0},D=e=>{let t,r=0;for(let i of n){let n=o.get(i);if(!n)return!1;let[a,s,c]=n,l=i.at(e),u=i.timing()[0]===1/0;if(c){if(u&&l===a)continue;return!1}let d=(l-a)/s,f=u?0:i.speed/s;if(t===void 0)t=d,r=f;else if(Math.abs(d-t)>1||f!==r)return!1}if(t===void 0)return!0;if(!s.length)return!1;for(let{offset:e,end:n,isDone:r}of s){let i=t-e;if(n<1/0&&(r?i<n-1:i<0||i>=n))return!1}for(let{animation:n,offset:i,isDone:a}of s){if(a)continue;let o=t-i;r&&n.updatePlaybackRate&&n.playState===`running`&&Math.abs(Number(n.currentTime)-o)<20?n.playbackRate!==r&&n.updatePlaybackRate(r):r?(n.playbackRate=r,n.startTime=e-o/r):(n.startTime=null,n.currentTime=o)}return!0},O=()=>!n.size&&(u=!0,Qv(t)===A&&Vv.delete(t),A.isJS||v(),!0),k=()=>{let t=Jm.now();if(A.isJS||(A.isFinishing=!0,n.forEach(n=>{let[r,a]=n.timing();n.state===`running`&&n.speed>0&&!a&&r<=t+1&&(n.complete(),i[n.name]=ey(e,n.name),o.has(n)||(c=!0))}),A.isFinishing=!1),l=!1,u||(n.forEach(e=>$v(e)&&n.delete(e)),O()))return;for(let e of n)if(!e.canAccelerate)return A.demote(!0);A.isJS&&(A.isJS=!1,c=!0,n.forEach(e=>e.js?.stop()));let r=c,a=d;if(c=d=!1,r||!D(t)){if(a){if(t-f<Kv)return A.demote();f=t}if(!E(t))return A.demote()}},A={tracks:n,isJS:!1,isFinishing:!1,schedule(e,t){u||(c||=e,d||=!!t,l||(l=!0,Gm.isProcessing?pg.render(k,!1,!0):queueMicrotask(k)))},release(e){$v(e)&&n.delete(e),O()||A.schedule(!0)},check(){if(!A.isJS){for(let t in i)if(ey(e,t)!==i[t]&&!p(t))return A.schedule(!0,!0)}},demote(e){if(!(A.isJS||u))return n.forEach(t=>{t.isAccelerated()&&t.sync(),e||(t.canAccelerate=!1)}),A.isJS=!0,o=new Map,v(),n.forEach(e=>e.state===`running`&&e.js?.start()),!0}};return Vv.set(t,A),A}var ay=class extends f_{constructor(e){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Jm.now();let{keyframes:t,name:n,motionValue:r,element:i}=e,a=e;a.autoplay??=!0,a.delay??=0,a.type??=`keyframes`,a.repeat??=0,a.repeatDelay??=0,a.repeatType??=`loop`;let o=i?.KeyframeResolver||av;this.keyframeResolver=new o(t,(e,t,n)=>this.onKeyframesResolved(e,t,a,!n),n,r,i),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=Jm.now();let u=Tv(e,i,a,o);u||((mm.instantAnimations||!s)&&l?.(i_(e,n,t)),e[0]=e[e.length-1],Ev(n),n.repeat=0);let{onComplete:d}=n;n.finalKeyframe=t,n.keyframes=e,n.onComplete=()=>{d?.(),this.notifyFinished()};let f=u&&!c&&Nv(n),p=!f&&ty(n);r&&(f||p||this.resolvedAt!==this.createdAt)&&(n.startTime??=c_(this.createdAt,this.resolvedAt));let m;if(f){n.element=n.motionValue?.owner?.current;try{m=new Sv(n)}catch{m=new h_(n)}}else m=p?new ry(n):new h_(n);this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this._animation.finished:super.finished}then(e,t){return this.finished.finally(e).then(()=>{})}liveValue(){return this._animation?.liveValue?.()}get animation(){return this._animation||(this.keyframeResolver?.resume(),rv()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation?.cancel(),this.keyframeResolver?.cancel()}};function oy(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var sy=30,cy=e=>!isNaN(parseFloat(e)),ly={current:void 0},uy=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=Jm.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.dirty(),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=Jm.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=cy(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){var n;return e===`change`?this.onChangeSubscribe(t):((n=this.events)[e]||(n[e]=new Sm)).add(t)}onChangeSubscribe(e){let{events:t}=this;return!t.change&&!this.changeSubscriber?this.changeSubscriber=e:(t.change||(t.change=new Sm,t.change.add(this.changeSubscriber),this.changeSubscriber=void 0),t.change.add(e)),()=>{this.changeSubscriber===e?this.changeSubscriber=void 0:t.change?.remove(e),this.stopIfUnobserved()}}stopIfUnobserved(){pg.read(()=>{!this.changeSubscriber&&!this.events.change?.getSize()&&this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){t&&(this.updatedAt=Jm.now(),this.stop()),this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,this.stopPassiveEffect?.()}dirty(){let{current:e,changeSubscriber:t}=this;t?t(e):this.events.change?.notify(e)}addDependent(e){(this.dependents||=new Set).add(e)}removeDependent(e){this.dependents?.delete(e)}get(){ly.current?.push(this);let e=this.animation?.liveValue?.();return e===void 0?this.current:e}getCurrent(){return this.current}getPrevious(){return this.prev}getVelocity(){let e=Jm.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>sy)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,sy);return Tm(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0;let n=!1,r;r=e(()=>{n=!0,this.events.animationComplete?.notify(),this.animation===r&&(this.animation=void 0),t()}),n||(this.animation=r),this.events.animationStart?.notify()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel?.notify()),this.animation=void 0}isAnimating(){return!!this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect?.()}};function dy(e,t){return new uy(e,t)}function fy(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function py(e,t){let n=e?.[t]??e?.default??e;return n===e?n:fy(n,e)}var my={type:`spring`,stiffness:500,damping:25,restSpeed:10},hy=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),gy={type:`keyframes`,duration:.8},_y={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},vy=(e,{keyframes:t})=>t.length>2?gy:V_.has(e)?e.startsWith(`scale`)?hy(t[1]):my:_y,yy=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`,`out`,`mixer`]);function by(e){for(let t in e)if(!yy.has(t))return!0;return!1}var xy=(e,t,n,r={},i,a)=>o=>{let s=py(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=Cm(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i,hasOnUpdate:!!s.onUpdate};by(s)||Object.assign(u,vy(e,u)),u.duration&&=Cm(u.duration),u.repeatDelay&&=Cm(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Ev(u),u.delay===0&&(d=!0)),(mm.instantAnimations||mm.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,Ev(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=i_(u.keyframes,s);if(e!==void 0){pg.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new h_(u):new ay(u)},Sy=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Cy(e){let t=Sy.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function wy(e,t,n=1){let[r,i]=Cy(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return hm(e)?parseFloat(e):e}return $m(i)?wy(i,t,n+1):i}function Ty(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Ey(e,t,n,r){let i=t=>typeof t==`function`?t(n===void 0?e.custom:n,...Ty(r)):t;return t=i(t),typeof t==`string`&&(t=e.variants&&e.variants[t]),i(t)}function Dy(e,t,n){return Ey(e.getProps(),t,n,e)}var Oy=(e,t)=>t===`exit`?e.presenceContext?.custom:void 0,ky=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...B_]),Ay=e=>Array.isArray(e);function jy(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,dy(n))}function My(e){return Ay(e)?e[e.length-1]||0:e}function Ny(e,t){let{transitionEnd:n={},transition:r={},...i}=Dy(e,t)||{};i={...i,...n};for(let t in i)jy(e,t,My(i[t]))}var Py=e=>!!(e&&e.getVelocity);function Fy(e){return!!(Py(e)&&e.add)}function Iy(e,t){let n=e.getValue(`willChange`);if(Fy(n))return n.add(t);if(!n&&mm.WillChange){let n=new mm.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}var Ly=`data-framer-appear-id`;function Ry(e){return e.props[Ly]}var zy=typeof window<`u`;function By({protectedKeys:e,needsAnimating:t},n){let r=n in e&&!t[n];return t[n]=!1,r}function Vy(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?fy(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState?.getState()[i],p=a?.path;p&&(p.animateValues?p.animateValues(t=>e.getValue(t,e.latestValues[t]??0),s,a,n,d):p.animateVisualElement?.(e,s,a,n,d));for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&By(f,t))continue;let o={delay:n,...py(f?.out[t]||a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){pg.update(()=>r.set(i));continue}let p=!1;if(zy&&window.MotionHandoffAnimation){let n=Ry(e);if(n){let e=window.MotionHandoffAnimation(n,t,pg);e!==null&&(o.startTime=e,p=!0)}}Iy(e,t);let m=l??e.shouldReduceMotion;r.start(xy(t,r,i,m&&ky.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>pg.update(()=>{o&&Ny(e,o)});d.length?Promise.all(d).then(t):t()}return d}function Hy(e,t,n={}){let r=Dy(e,t,Oy(e,n.type)),i=n.transitionOverride||(r?.transition??(e.getDefaultTransition()||{})),a=()=>Promise.all(r?Vy(e,r,n):[]),o=(r=0)=>{let{variantChildren:a}=e,{delayChildren:o=0,staggerChildren:s,staggerDirection:c}=i,l=[];return a?.forEach(e=>{e.notify(`AnimationStart`,t),l.push(Hy(e,t,{...n,delay:r+(typeof o==`function`?0:o)+oy(a,e,o,s,c)}).then(()=>e.notify(`AnimationComplete`,t)))}),Promise.all(l)},{when:s}=i;return s?s===`beforeChildren`?a().then(()=>o()):o().then(a):Promise.all([a(),o(n.delay)])}function Uy(e,t,n={}){return e.notify(`AnimationStart`,t),(Array.isArray(t)?Promise.all(t.map(t=>Hy(e,t,n))):typeof t==`string`?Hy(e,t,n):Promise.all(Vy(e,Dy(e,t,n.custom),n))).then(()=>{e.notify(`AnimationComplete`,t)})}var Wy={test:e=>e===`auto`,parse:e=>e},Gy=e=>t=>t.test(e),Ky=[nh,$,vh,_h,bh,yh,Wy],qy=e=>Ky.find(Gy(e));function Jy(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||_m(e)}var Yy=new Set([`auto`,`none`,`0`]);function Xy(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!Yy.has(t)&&Ph(t)&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]!==i&&(e[r]=D_(n,i))}var Zy=class extends av{constructor(){super(...arguments),this.isAsync=!0}scheduleResolve(){if(this.canReadNow()&&(this.readKeyframes(),!this.needsMeasurement))return this.complete();super.scheduleResolve()}canReadNow(){let{unresolvedKeyframes:e,element:t,motionValue:n}=this,r=e[0]??n?.get();if(!t?.current||r===void 0)return!1;for(let t=0;t<e.length;t++)if(th(t?e[t]:r))return!1;return!0}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t?.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),$m(r))){let i=wy(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!ky.has(n)||e.length!==2)return;let[r,i]=e;if(typeof r==`number`&&typeof i==`number`)return;let a=qy(r),o=qy(i);if(th(r)!==th(i)&&X_[n])this.needsMeasurement=!0;else if(a!==o){if(H_(a)&&H_(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else X_[n]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||Jy(e[t]))&&n.push(t);n.length&&Xy(e,n,t)}measure(){let{element:e,name:t}=this;return X_[t](window.getComputedStyle(e.current),()=>e.measureViewportBox())}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e?.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&this.motionValue?.jump(r,!1)}measureEndState(){let{element:e,unresolvedKeyframes:t}=this;if(!e?.current)return;this.motionValue?.jump(this.measuredOrigin,!1);let n=t.length-1,r=t[n];t[n]=this.measure(),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.resolveNoneKeyframes()}},Qy=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`];function $y(e){return gm(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}function eb(e){return gm(e)&&`ownerSVGElement`in e}var tb={};function nb(e){return tb.current?.add(e),e}var rb=e=>tb.current?tb.current.bind(e):e;function ib(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=t?t.current:tb.current?.root||document,i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}function ab(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}function ob(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(V_.has(e))o=!0;else if(Zm(e))i[e]=n;else{let t=Pv(n,C_[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Bv(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}var sb={offset:`stroke-dashoffset`,array:`stroke-dasharray`},cb={offset:`strokeDashoffset`,array:`strokeDasharray`};function lb(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?sb:cb;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var ub=[`transform`,`opacity`,`clipPath`,`filter`,`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function db(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(ob(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;for(let e of ub)d[e]!==void 0&&(f[e]=d[e],delete d[e]);(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&lb(d,i,a,o,!1)}function fb({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function pb({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function mb(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function hb(e){return e===void 0||e===1}function gb({scale:e,scaleX:t,scaleY:n}){return!hb(e)||!hb(t)||!hb(n)}var _b=[`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skewX`,`skewY`];function vb(e){return gb(e)||bb(e)||yb(e)}function yb(e){return e.z||e.rotate||e.rotateX||e.rotateY||e.rotateZ||e.skewX||e.skewY}function bb(e){return xb(e.x)||xb(e.y)}function xb(e){return e&&e!==`0%`}function Sb(e,t,n){return n+t*(e-n)}function Cb(e,t,n,r,i){return i!==void 0&&(e=Sb(e,i,r)),Sb(e,n,r)+t}function wb(e,t=0,n=1,r,i){e.min=Cb(e.min,t,n,r,i),e.max=Cb(e.max,t,n,r,i)}function Tb(e,{x:t,y:n}){wb(e.x,t.translate,t.scale,t.originPoint),wb(e.y,n.translate,n.scale,n.originPoint)}var Eb=.999999999999,Db=1.0000000000001;function Ob(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++)a=n[s],o=a.projectionDelta,a.options.visualElement?.props.style?.display!==`contents`&&(r===!0&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(kb(e.x,-a.scroll.offset.x),kb(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Tb(e,o)),r&&(r.path?.[s]||r)!==a&&vb(a.latestValues)&&Mb(e,a.latestValues,a.layout?.layoutBox));t.x<Db&&t.x>Eb&&(t.x=1),t.y<Db&&t.y>Eb&&(t.y=1)}function kb(e,t){e.min+=t,e.max+=t}function Ab(e,t,n,r,i=.5){wb(e,t,n,Kh(e.min,e.max,i),r)}function jb(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function Mb(e,t,n){let r=n??e;Ab(e.x,jb(t.x,r.x),t.scaleX,t.scale,t.originX),Ab(e.y,jb(t.y,r.y),t.scaleY,t.scale,t.originY)}function Nb(e,t){return fb(mb(e.getBoundingClientRect(),t))}function Pb(e,t,n){let r=Nb(e,n),{scroll:i}=t;return i&&(kb(r.x,i.offset.x),kb(r.y,i.offset.y)),r}var Fb=()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),{schedule:Ib,cancel:Lb}=fg(queueMicrotask,!1);function Rb(e,t,n){let r=Py(e)?e:dy(e);return r.start(xy(``,r,t,n)),r.animation}var zb={},Bb={value:null,addProjectionMetrics:null,countProjection:void 0};function Vb(e,t){let n=Jm.now();e=rb(e);let r=({timestamp:i})=>{let a=i-n;a>=t&&(mg(r),e(a-t))};return pg.setup(r,!0),nb(()=>mg(r))}function Hb(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Ub(e){return eb(e)&&e.tagName===`svg`}function Wb(e){return Py(e)?e.get():e}var Gb=e=>typeof e==`number`?e:parseFloat(e),Kb=Qy.length,qb=e=>typeof e==`number`||$.test(e);function Jb(e,t,n,r,i,a){i?(e.opacity=Kh(0,n.opacity??1,Xb(r)),e.opacityExit=Kh(t.opacity??1,0,Zb(r))):a&&(e.opacity=Kh(t.opacity??1,n.opacity??1,r));for(let i=0;i<Kb;i++){let a=Qy[i],o=Yb(t,a),s=Yb(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||qb(o)===qb(s)?(e[a]=Math.max(Kh(Gb(o),Gb(s),r),0),(vh.test(s)||vh.test(o))&&(e[a]+=`%`)):e[a]=s)}for(let i=0;i<_b.length;i++){let a=_b[i];(t[a]||n[a])&&(e[a]=Kh(t[a]||0,n[a]||0,r))}}function Yb(e,t){return e[t]===void 0?e.borderRadius:e[t]}var Xb=Qb(0,.5,Fm),Zb=Qb(.5,.95,ym);function Qb(e,t,n){return r=>r<e?0:r>t?1:n(xm(e,t,r))}function $b(e,t){e.min=t.min,e.max=t.max}function ex(e,t){$b(e.x,t.x),$b(e.y,t.y)}function tx(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var nx=.9999,rx=1.0001,ix=-.01,ax=.01;function ox(e){return e.max-e.min}function sx(e,t,n){return Math.abs(e-t)<=n}function cx(e,t,n,r=.5){e.origin=r,e.originPoint=Kh(t.min,t.max,e.origin),e.scale=ox(n)/ox(t),e.translate=Kh(n.min,n.max,e.origin)-e.originPoint,(e.scale>=nx&&e.scale<=rx||isNaN(e.scale))&&(e.scale=1),(e.translate>=ix&&e.translate<=ax||isNaN(e.translate))&&(e.translate=0)}function lx(e,t,n,r){cx(e.x,t.x,n.x,r?.originX),cx(e.y,t.y,n.y,r?.originY)}function ux(e,t,n,r=0){e.min=(r?Kh(n.min,n.max,r):n.min)+t.min,e.max=e.min+ox(t)}function dx(e,t,n,r){ux(e.x,t.x,n.x,r?.x),ux(e.y,t.y,n.y,r?.y)}function fx(e,t,n,r=0){let i=r?Kh(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+ox(t)}function px(e,t,n,r){fx(e.x,t.x,n.x,r?.x),fx(e.y,t.y,n.y,r?.y)}function mx(e,t,n,r,i){return e-=t,e=Sb(e,1/n,r),i!==void 0&&(e=Sb(e,1/i,r)),e}function hx(e,t=0,n=1,r=.5,i,a=e,o=e){if(vh.test(t)&&(t=parseFloat(t),t=Kh(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=Kh(a.min,a.max,r);e===a&&(s-=t),e.min=mx(e.min,t,n,s,i),e.max=mx(e.max,t,n,s,i)}function gx(e,t,[n,r,i],a,o){hx(e,t[n],t[r],t[i],t.scale,a,o)}var _x=[`x`,`scaleX`,`originX`],vx=[`y`,`scaleY`,`originY`];function yx(e,t,n,r){gx(e.x,t,_x,n?.x,r?.x),gx(e.y,t,vx,n?.y,r?.y)}var bx=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),xx=bx(`applewebkit/`)&&!bx(`chrome/`)?Math.round:ym;function Sx(e){e.min=xx(e.min),e.max=xx(e.max)}function Cx(e){Sx(e.x),Sx(e.y)}var wx=()=>({translate:0,scale:1,origin:0,originPoint:0}),Tx=()=>({x:wx(),y:wx()}),Ex=()=>({min:0,max:0}),Dx=()=>({x:Ex(),y:Ex()});function Ox(e){return e.translate===0&&e.scale===1}function kx(e){return Ox(e.x)&&Ox(e.y)}function Ax(e,t){return e.min===t.min&&e.max===t.max}function jx(e,t){return Ax(e.x,t.x)&&Ax(e.y,t.y)}function Mx(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Nx(e,t){return Mx(e.x,t.x)&&Mx(e.y,t.y)}function Px(e){return ox(e.x)/ox(e.y)}function Fx(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var Ix=class{constructor(){this.members=[]}add(e){um(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;r&&r.isConnected!==!1||n.snapshot||(dm(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(dm(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}};function Lx(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Rx={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if($.test(e))e=parseFloat(e);else return e}return`${Lx(e,t.target.x)}% ${Lx(e,t.target.y)}%`}},zx={borderRadius:Object.assign({},Rx,{applyTo:Qy.slice()}),borderTopLeftRadius:Rx,borderTopRightRadius:Rx,borderBottomLeftRadius:Rx,borderBottomRightRadius:Rx,boxShadow:{correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=Hh.parse(e);if(i.length>5)return r;let a=Hh.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=Kh(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}}};function Bx(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e}=n;e&&(r=`perspective(${e}px) ${r}`);for(let e=0;e<_b.length;e++){let t=_b[e],i=n[t];i&&(r+=`${t}(${i}deg) `),!e&&n.pathRotation&&(r+=`rotate(${n.pathRotation}deg) `)}}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}function Vx(e){return[e(`x`),e(`y`)]}var Hx=(e,t)=>e.depth-t.depth,Ux=class{constructor(){this.children=[],this.isDirty=!1}add(e){um(this.children,e),this.isDirty=!0}remove(e){dm(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Hx),this.isDirty=!1,this.children.forEach(e)}},Wx={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Gx=[`z`,`skew`,`skewZ`],Kx=1e3,qx=0;function Jx(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}var Yx=e=>e.instance&&Vv.get(e.instance)?.demote()&&e.resetSkewAndRotation();function Xx(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Ry(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,pg,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Xx(r)}function Zx(e){if(e)return e.options.allowProjection===!1?Zx(e.parent):e.projection}function Qx({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return Object.assign(zb,{...zx,...zb}),class{static create(e,t,n){let{layoutId:r,layout:i,drag:a,dragConstraints:o,layoutScroll:s,layoutRoot:c,layoutAnchor:l,layoutCrossfade:u}=t,d=e.projection=new this(e.latestValues,t[`data-framer-portal-id`]?void 0:Zx(e.parent));d.setOptions({layoutId:r,layout:i,alwaysMeasureLayout:!!a||o&&Hb(o),visualElement:e,animationType:typeof i==`string`?i:`both`,initialPromotionConfig:n,crossfade:u,layoutScroll:s,layoutRoot:c,layoutAnchor:l});let f=d.getStack()?.lead;f&&!d.root.isUpdateBlocked()&&(f.willUpdate(),f.scheduleCheckAfterUnmount())}constructor(e={},n=t?.()){this.id=qx++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(tS),this.nodes.forEach(fS),this.nodes.forEach(pS),this.nodes.forEach(nS),Bb.countProjection?.()},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ux)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Sm),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){this.eventHandlers.get(e)?.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=eb(t)&&!Ub(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent?.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;pg.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n?.(),n=Vb(i,250),Wx.hasAnimatedSinceResize&&(Wx.hasAnimatedSinceResize=!1,this.nodes.forEach(dS)))})}n&&this.root.registerSharedNode(n,this),this.addLayoutListener()}addLayoutListener(){let{layoutId:e,layout:t,visualElement:n,animate:r}=this.options;this.instance&&!this.hasLayoutListener&&r!==!1&&n&&(e||t)&&(this.hasLayoutListener=!0,this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:r,layout:i})=>{if(this.isAnimationBlocked){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||n.getDefaultTransition()||yS,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=n.getProps(),c=!this.targetLayout||!Nx(this.targetLayout,i),l=!t&&r;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...py(a,`layout`),onPlay:o,onComplete:s};(n.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||dS(this),this.isLead()&&this.options.onExitComplete?.();this.targetLayout=i}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),this.getStack()?.remove(this),this.parent?.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),this.hasLayoutListener=!1,mg(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes?.forEach(mS),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete?.();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Xx(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;Yx(this),this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,Yx(t),(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1),t.isAnimationBlocked&&(t.dragSnapshot||=t.measure(),this.dragAncestor=t)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(aS),this.nodes.forEach(iS);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(oS);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(cS),this.nodes.forEach(lS),this.nodes.forEach(uS),this.nodes.forEach($x),this.nodes.forEach(eS)):this.nodes.forEach(oS),this.clearAllSnapshots();let e=Jm.now();Gm.delta=pm(0,1e3/60,e-Gm.timestamp),Gm.timestamp=e,Gm.isProcessing=!0,hg.update.process(Gm),hg.preRender.process(Gm),hg.render.process(Gm),Gm.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ib.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(rS),this.sharedNodes.forEach((e,t)=>e.members.length?e.removeLeadSnapshot():this.sharedNodes.delete(t))}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,pg.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){pg.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),this.snapshot&&!ox(this.snapshot.measuredBox.x)&&!ox(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutCorrected||=Dx(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t?.notify(`LayoutMeasure`,this.layout.layoutBox,e?.layoutBox)}updateScroll(e=`measure`){let{scroll:t,instance:i}=this,{animationId:a}=this.root;if(this.options.layoutScroll&&i&&!(t&&t.animationId===a&&t.phase===e)){let o=r(i);this.scroll={animationId:a,phase:e,isRoot:o,offset:n(i),wasRoot:t?t.isRoot:o}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout;e&&Yx(this);let t=this.projectionDelta&&!kx(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||vb(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),Cx(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return Dx();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(SS))){let{scroll:e}=this.root;e&&(kb(t.x,e.offset.x),kb(t.y,e.offset.y))}return t}removeElementScroll(e){let t=Dx();if(ex(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&ex(t,e),kb(t.x,i.offset.x),kb(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n,r,i=0){let a=n||Dx();ex(a,e);for(let e=i;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(kb(a.x,-n.scroll.offset.x),kb(a.y,-n.scroll.offset.y)),vb(n.latestValues)&&Mb(a,n.latestValues,n.layout?.layoutBox)}return!r&&vb(this.latestValues)&&Mb(a,this.latestValues,this.layout?.layoutBox),a}removeTransform(e){let t=Dx();ex(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!vb(n.latestValues))continue;let r;n.instance&&(gb(n.latestValues)&&n.updateSnapshot(),r=Dx(),ex(r,n.measurePageBox())),yx(t,n.latestValues,n.snapshot?.layoutBox,r)}return vb(this.latestValues)&&yx(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0||e.crossfade},this.addLayoutListener()}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Gm.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=Gm.timestamp;let a=this.getClosestProjectingParent();!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target=Dx(),this.targetWithTransforms=Dx()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),dx(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target,!0):ex(this.target,this.layout.layoutBox),Tb(this.target,this.targetDelta)):ex(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&(!a.resumingFrom==!this.resumingFrom||a.options.layoutRoot&&!a.resumingFrom)&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),Bb.countProjection?.(1))}getClosestProjectingParent(){if(!(!this.parent||gb(this.parent.latestValues)||bb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Dx(),this.relativeTargetOrigin=Dx(),px(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),ex(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===Gm.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent?.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;ex(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;Ob(this.layoutCorrected,this.treeScale,this.path,t&&(e.relativeTarget&&!e.relativeParent.resumingFrom?e.relativeParent:!0)),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=Dx());let{target:s}=e;s?(!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(tx(this.prevProjectionDelta.x,this.projectionDelta.x),tx(this.prevProjectionDelta.y,this.projectionDelta.y)),lx(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===a&&this.treeScale.y===o&&Fx(this.projectionDelta.x,this.prevProjectionDelta.x)&&Fx(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),Bb.countProjection?.(2)):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){this.options.visualElement?.scheduleRender(),e&&this.getStack()?.scheduleRender(),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Tx(),this.projectionDelta=Tx(),this.projectionDeltaWithTransform=Tx()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=Tx();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=Dx(),c=r?.source!==this.layout?.source,l=this.getStack(),u=!l||l.members.length<=1,d=!(!c||u||this.options.crossfade!==!0||this.path.some(vS));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);hS(o.x,e.x,n),hS(o.y,e.y,n),r&&(o.x.translate=r.x,o.y.translate=r.y),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(px(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),_S(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&jx(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=Dx(),ex(f,this.relativeTarget)),c&&(this.animationValues=a,Jb(a,i,this.latestValues,n,d,u)),r?.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(mg(this.pendingAnimation),void 0),this.pendingAnimation=pg.update(()=>{Wx.hasAnimatedSinceResize=!0,this.motionValue||=dy(0),this.motionValue.jump(0,!1),this.currentAnimation=Rb(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),d_(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta?.(Kx),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,layout:n,latestValues:r}=e,{target:i}=e;if(t&&i&&n){if(this!==e&&this.layout&&n&&xS(this.options.animationType,this.layout.layoutBox,n.layoutBox)){let{layoutBox:e}=this.layout,t=i;i=this.target||Dx(),bS(i.x,t.x,e.x),bS(i.y,t.y,e.y)}ex(t,i),Mb(t,r),lx(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Ix),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?.transition,preserveFollowOpacity:n?.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){this.getStack()?.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){return this.getStack()?.relegate(this)||!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let{latestValues:t}=e;if(!yb(t))return;let n={};for(let t=0;t<Gx.length;t++)Jx(Gx[t],e,n,this.animationValues);for(let t=0;t<_b.length;t++)Jx(_b[t],e,n,this.animationValues);e.render();for(let t in n)e.setStaticValue(t,n[t]),this.animationValues&&(this.animationValues[t]=n[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;let n=this.getLead();if(!this.isVisible&&n!==this){e.visibility=`hidden`;return}let r=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=Wb(t?.pointerEvents)||``,e.transform=r?r(this.latestValues,``):`none`;return}if(!this.projectionDelta||!this.layout||!n.target){(this.options.layoutId||this.needsShow)&&(this.needsShow=!1,e.visibility=``,e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=Wb(t?.pointerEvents)||``),this.hasProjected&&!vb(this.latestValues)&&(e.transform=r?r({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=n.animationValues||n.latestValues;this.applyTransformsToTarget();let a=Bx(this.projectionDeltaWithTransform,this.treeScale,i);r&&(a=r(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,e.opacity=n.animationValues?n===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:n===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in zb){if(i[t]===void 0)continue;let{correct:r,applyTo:o,isCSSVariable:s}=zb[t],c=a===`none`?i[t]:r(i[t],n);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=n===this?Wb(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=this.dragSnapshot=this.dragAncestor=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(iS),this.root.sharedNodes.clear()}}}function $x(e){e.updateLayout(),sS(e)}function eS(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source,o=(r,a)=>{if(i===`size`)Vx(e=>{let t=ox(r[e]);r[e].min=a[e].min,r[e].max=r[e].min+t});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;$b(r[e],a[e])}else xS(i,t.layoutBox,n)&&Vx(t=>{let n=ox(a[t]);r[t].max=r[t].min+n,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[t].max=e.relativeTarget[t].min+n)})},s=a?t.measuredBox:t.layoutBox;o(s,n);let c=Tx();lx(c,n,t.layoutBox);let l=Tx();lx(l,a?e.applyTransform(r,!0):n,s);let u=!kx(c),d=!1,f=e.getClosestProjectingParent();if((!e.resumeFrom||f?.options.layoutRoot&&e.resumeFrom.path.includes(f))&&f&&!f.resumeFrom){let{snapshot:r,layout:i}=f;if(r&&i){let s=e.options.layoutAnchor||void 0,c=Dx();px(c,a?e.resumeFrom.applyTransform(t.layoutBox,!0,void 0,!0,f.depth+1):t.layoutBox,r.layoutBox,s);let l=Dx();px(l,n,i.layoutBox,s),a&&o(c,l),Nx(c,l)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=l,e.relativeTargetOrigin=c,e.relativeParent=f)}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:l,layoutDelta:c,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else e.isLead()&&e.options.onExitComplete?.();e.options.transition=void 0}function tS(e){Bb.countProjection?.(0),e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function nS(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function rS(e){e.clearSnapshot()}function iS(e){e.clearMeasurements()}function aS(e){e.isLayoutDirty=!0,e.updateLayout()}function oS(e){e.isLayoutDirty=!1}function sS(e){let{snapshot:t,dragAncestor:n}=e,r=n?.isAnimationBlocked&&n.layout;if(!t||!r||e.resumeFrom||e.isAnimationBlocked)return;let i=n.dragSnapshot;Vx(e=>kb(t.layoutBox[e],r.layoutBox[e].min-i.layoutBox[e].min))}function cS(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.dragSnapshot||e.layout,e.isLayoutDirty=!0)}function lS(e){e.relativeTarget&&e.relativeParent?.isLayoutDirty&&(e.currentAnimation?e.isLayoutDirty=!0:(e.targetDelta=void 0,e.removeRelativeTarget()))}function uS(e){let{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function dS(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function fS(e){e.resolveTargetDelta()}function pS(e){e.calcProjection()}function mS(e){e.resetSkewAndRotation()}function hS(e,t,n){e.translate=Kh(t.translate,0,n),e.scale=Kh(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function gS(e,t,n,r){e.min=Kh(t.min,n.min,r),e.max=Kh(t.max,n.max,r)}function _S(e,t,n,r){gS(e.x,t.x,n.x,r),gS(e.y,t.y,n.y,r)}function vS(e){return e.animationValues?.opacityExit!==void 0}var yS={duration:.45,ease:[.4,0,.1,1]};function bS(e,t,n){e.max=ox(n)+(e.min=t.min)}function xS(e,t,n){return e===`position`||e===`preserve-aspect`&&!sx(Px(t),Px(n),.2)}function SS(e){return e!==e.root&&e.scroll?.wasRoot}function CS(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var wS=Qx({attachResizeListener:(e,t)=>CS(e,`resize`,t),measureScroll:Fb,checkIsScrollRoot:()=>!0}),TS={current:void 0},ES=Qx({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!TS.current){let e=new wS({});e.mount(window),e.setOptions({layoutScroll:!0}),TS.current=e}return TS.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),DS=new WeakMap;function OS(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function kS(e){return typeof e==`string`||Array.isArray(e)}var AS=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],jS=[`initial`].concat(AS);function MS(e){if(OS(e.animate))return!0;for(let t=0;t<jS.length;t++)if(kS(e[jS[t]]))return!0;return!1}function NS(e){return!!(MS(e)||e.variants)}function PS(e,t,n){for(let r in t){let i=t[r],a=n[r];if(Py(i))e.addValue(r,i);else if(Py(a))e.addValue(r,dy(i,{owner:e}));else if(a!==i){if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,dy(t===void 0?i:t,{owner:e}))}}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var FS={current:null},IS={current:!1},LS=typeof window<`u`;function RS(){if(IS.current=!0,LS){if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>FS.current=e.matches;e.addEventListener(`change`,t),t()}else FS.current=!1}}var zS=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],BS={};function VS(e){BS=e}function HS(){return BS}var US=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=av,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=Jm.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,pg.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=MS(t),this.isVariantNode=NS(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&Py(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];if(this.current=e,DS.set(e,this),this.projection?.instance||this.projection?.mount(e),this.isVariantNode&&!this.isControllingVariants){let e=this;do e=e.props.inherit!==!1&&e.parent;while(e&&!e.isVariantNode);if(e){let{variantChildren:t}=e;t.add(this),this.removeFromVariantTree=()=>t.delete(this)}}this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(IS.current||RS(),this.shouldReduceMotion=FS.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection?.unmount(),mg(this.notifyUpdate),mg(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree?.(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),(this.enteringChildren||=new Set).add(e)}removeChild(e){this.children.delete(e),this.enteringChildren?.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.get(e)?.(),t.accelerate&&Dv.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new vv({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:Cm(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=V_.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&pg.preRender(this.notifyUpdate),n&&(this.projection&&(this.projection.isTransformDirty=!0),Vv.get(this.current)?.check()),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i?.()})}sortNodePosition(e){return!this.current||!e.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in BS){let t=BS[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Dx()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){let{transformTemplate:n,onUpdate:r}=this.props;(e.transformTemplate||n)&&this.scheduleRender(),(e.transformTemplate&&!n||e.onUpdate&&!r)&&Vv.get(this.current)?.demote(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<zS.length;t++){let n=zS[t];this.propEventSubscriptions[n]?.(),delete this.propEventSubscriptions[n];let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=PS(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue?.()}getProps(){return this.props}getVariant(e){return this.props.variants?.[e]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}addValue(e,t){let n=this.values.get(e);if(t!==n){n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t);let r=t.get();r!==void 0&&(this.latestValues[e]=r)}}removeValue(e){this.values.delete(e),this.valueSubscriptions.get(e)?.(),this.valueSubscriptions.delete(e),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){let n=this.props.values?.[e];return n||(n=this.values.get(e),n===void 0&&t!==void 0&&(n=dy(t??this.getDefaultValue?.(e),{owner:this}),this.addValue(e,n)),n)}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(hm(n)||_m(n))?n=parseFloat(n):typeof n!=`number`&&!Hh.test(n)&&Hh.test(t)&&(n=D_(e,t)),this.setBaseTarget(e,Py(n)?n.get():n)),Py(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}on(e,t){return(this.events[e]||(this.events[e]=new Sm)).add(t)}notify(e,...t){this.events[e]?.notify(...t)}scheduleRenderMicrotask(){Ib.render(this.render)}},WS=class extends US{constructor(){super(...arguments),this.KeyframeResolver=Zy}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;Py(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function GS(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function KS(e,{layout:t,layoutId:n}){return V_.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!zb[e]||e===`opacity`)}function qS(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(Py(r[t])||i&&Py(i[t])||KS(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function JS(e){return window.getComputedStyle(e)}var YS=class extends WS{constructor(){super(...arguments),this.type=`html`,this.renderInstance=GS}mount(e){super.mount(e)}readValueFromInstance(e,t){if(V_.has(t))return this.projection?.isProjecting?L_(t):z_(e,t);{let n=JS(e),r=(Zm(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Nb(e,t)}build(e,t,n){ob(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return qS(e,t,n)}},XS=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1;function ZS(e){return{point:{x:e.pageX,y:e.pageY}}}var QS=e=>t=>XS(t)&&e(t,ZS(t));function $S(e,t,n,r){return CS(e,t,QS(n),r)}var eC=new WeakMap,tC,nC=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:eb(r)&&`getBBox`in r?r.getBBox()[t]:r[n],rC=nC(`inline`,`width`,`offsetWidth`),iC=nC(`block`,`height`,`offsetHeight`);function aC({target:e,borderBoxSize:t}){eC.get(e)?.forEach(n=>{n(e,{get width(){return rC(e,t)},get height(){return iC(e,t)}})})}function oC(e){e.forEach(aC)}function sC(){typeof ResizeObserver<`u`&&(tC=new ResizeObserver(oC))}function cC(e,t){tC||sC();let n=ib(e);return n.forEach(e=>{let n=eC.get(e);n||(n=new Set,eC.set(e,n)),n.add(t),tC?.observe(e)}),()=>{n.forEach(e=>{let n=eC.get(e);n?.delete(t),n?.size||tC?.unobserve(e)})}}var lC=new Set,uC;function dC(){uC=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};lC.forEach(t=>t(e))},window.addEventListener(`resize`,uC)}function fC(e){return lC.add(e),uC||dC(),()=>{lC.delete(e),!lC.size&&typeof uC==`function`&&(window.removeEventListener(`resize`,uC),uC=void 0)}}function pC(e,t){return nb(typeof e==`function`?fC(e):cC(e,t))}var mC=(e,t)=>Math.abs(e-t);function hC(e,t){let n=mC(e.x,t.x),r=mC(e.y,t.y);return Math.sqrt(n**2+r**2)}var gC=new Set([`auto`,`scroll`]),_C=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=yC(this.lastRawMoveEventInfo,this.transformPagePoint));let e=xC(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=hC(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e;this.history.push({...r,timestamp:Jm.now()});let{onStart:i,onMove:a}=this.handlers;t||(i?.(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a?.(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.handleScroll(window),this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=yC(t,this.transformPagePoint),this.hasPendingMove=!0,pg.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.hasPendingMove&&this.updatePoint(),this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i?.(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=xC(e.type===`pointercancel`?this.lastMoveEventInfo:yC(t,this.transformPagePoint),this.history);this.startEvent&&n?.(e,a),r?.(e,a)},!XS(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=yC(ZS(e),this.transformPagePoint),{point:c}=s;this.history=[{...c,timestamp:Jm.now()}];let{onSessionStart:l}=t;l&&l(e,xC(s,this.history));let u={passive:!0,capture:!0};this.removeListeners=bm($S(this.contextWindow,`pointermove`,this.handlePointerMove,u),$S(this.contextWindow,`pointerup`,this.handlePointerUp,u),$S(this.contextWindow,`pointercancel`,this.handlePointerUp,u)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(gC.has(e.overflowX)||gC.has(e.overflowY))&&this.scrollPositions.set(t,vC(t)),t=t.parentElement}this.scrollPositions.set(window,vC(window)),this.removeScrollListeners=bm(CS(window,`scroll`,this.onElementScroll,{capture:!0}),CS(window,`scroll`,this.onWindowScroll,{}))}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=vC(e),i={x:r.x-t.x,y:r.y-t.y};(i.x!==0||i.y!==0)&&(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),pg.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners?.(),this.removeScrollListeners?.(),this.scrollPositions.clear(),mg(this.updatePoint)}},vC=e=>e===window?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop};function yC(e,t){return t?{point:t(e.point)}:e}function bC(e,t){return{x:e.x-t.x,y:e.y-t.y}}function xC({point:e},t){return{point:e,delta:bC(e,CC(t)),offset:bC(e,SC(t)),velocity:wC(t,.1)}}function SC(e){return e[0]}function CC(e){return e[e.length-1]}function wC(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=CC(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Cm(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>Cm(t)*2&&(r=e[1]);let a=wm(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}var TC=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function EC(e){return TC.has(e.tagName)||e.isContentEditable===!0}var DC=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function OC(e){return DC.has(e.tagName)||e.isContentEditable===!0}var kC={x:!1,y:!1};function AC(){return kC.x||kC.y}function jC(e){return e===`x`||e===`y`?kC[e]?null:(kC[e]=!0,()=>{kC[e]=!1}):kC.x||kC.y?null:(kC.x=kC.y=!0,()=>{kC.x=kC.y=!1})}function MC(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Kh(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Kh(n,e,r.max):Math.min(e,n)),e}function NC(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function PC(e,{top:t,left:n,bottom:r,right:i}){return{x:NC(e.x,n,i),y:NC(e.y,t,r)}}function FC(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function IC(e,t){return{x:FC(e.x,t.x),y:FC(e.y,t.y)}}function LC(e,t){let n=.5,r=ox(e),i=ox(t);return i>r?n=xm(t.min,t.max-r,e.min):r>i&&(n=xm(e.min,e.max-i,t.min)),pm(0,1,n)}function RC(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var zC=.35;function BC(e=zC){return e===!1?e=0:e===!0&&(e=zC),{x:VC(e,`left`,`right`),y:VC(e,`top`,`bottom`)}}function VC(e,t,n){return{min:HC(e,t),max:HC(e,n)}}function HC(e,t){return typeof e==`number`?e:e[t]||0}function UC(e){let t=``;for(let n of e.path){n.scroll=void 0,n.updateScroll();let{scroll:r}=n;n!==e.root&&r&&(t+=r.offset.x+`,`+r.offset.y+`,`)}return t}var WC=new WeakMap,GC=class{constructor(e,t=()=>e.getProps()){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Dx(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e,this.readProps=t}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){if(this.visualElement.presenceContext?.isPresent===!1)return;let r=e=>{t&&this.snapToCursor(e),this.stopAnimation()},i=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock?.(),this.openDragLock=jC(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints();let{projection:a}=this.visualElement;a&&(a.isAnimationBlocked=!0,a.target=void 0),Vx(e=>{let t=this.getAxisMotionValue(e).get()||0;if($m(t)&&(t=wy(t,this.visualElement.current)||0),$.test(t))t=parseFloat(t);else if(vh.test(t)){let n=a?.layout?.layoutBox[e];n&&(t=ox(n)*(parseFloat(t)/100))}this.originPoint[e]=t}),i&&pg.update(()=>i(e,t),!1,!0),Iy(this.visualElement,`transform`),this.visualElement.animationState?.setActive(`whileDrag`,!0)},a=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){if(this.currentDirection=ZC(o),this.currentDirection===null)return;i&&i(this.currentDirection)}this.updateAxis(`x`,o),this.updateAxis(`y`,o),this.visualElement.render(),a&&pg.update(()=>a(e,t),!1,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},s=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new _C(e,{onSessionStart:r,onStart:i,onMove:a,onSessionEnd:o,resumeAnimation:s},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:n,contextWindow:this.visualElement.current?.ownerDocument.defaultView,element:this.visualElement.current})}stop(e,t,n){let r=e||this.latestPointerEvent,i=t||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!i||!r)return;let{velocity:o}=i;this.startAnimation(o,n);let{onDragEnd:s}=this.getProps();s&&pg.postRender(()=>s(r,i))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession(),!this.getProps().dragPropagation&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t?.setActive(`whileDrag`,!1)}endPanSession(){this.panSession?.end(),this.panSession=void 0}updateAxis(e,t){let{drag:n}=this.readProps();if(!t||!XC(e,n,this.currentDirection))return;let r=this.getAxisMotionValue(e),i=this.originPoint[e]+t[e],a=this.constraints&&this.constraints[e];a&&(i=MC(i,a,this.elastic[e])),r.set(i)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),{projection:n}=this.visualElement,r=n&&(n.layout||n.measure(!1)),i=this.constraints;KC(e)?this.constraints&&this.scroll===UC(n)||(this.constraints=this.resolveRefConstraints()):this.constraints=e&&r?PC(r.layoutBox,e):!1,this.elastic=BC(t),i!==this.constraints&&!KC(e)&&r&&this.constraints&&!this.hasMutatedConstraints&&Vx(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=RC(r.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!KC(e))return!1;let n=qC(e),{projection:r}=this.visualElement;if(!r||!r.layout)return!1;this.scroll=UC(r);let i=Pb(n,r.root,this.visualElement.getTransformPagePoint()),a=IC(r.layout.layoutBox,r.removeElementScroll(i));if(t){let e=t(pb(a));this.hasMutatedConstraints=!!e,e&&(a=fb(e))}return a}startAnimation(e,t){let{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),c=this.constraints||{},l=Vx(s=>{if(!XC(s,t||n,this.currentDirection))return;let l=c[s]||{};(o===!0||o===s)&&(l={min:0,max:0});let u=i?200:1e6,d=i?40:1e7,f={type:`inertia`,velocity:r?e[s]:0,bounceStiffness:u,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...a,...l};return this.startAxisValueAnimation(s,f)});return Promise.all(l).then(s)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return Iy(this.visualElement,e),n.start(xy(e,n,0,t,this.visualElement,!1))}stopAnimation(){Vx(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.readProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor({clientX:e,clientY:t}){let{drag:n}=this.getProps(),r={x:e,y:t},i=this.visualElement.getTransformPagePoint()?.(r)||r,a=this.visualElement.measureViewportBox();Vx(e=>{if(!XC(e,n,this.currentDirection))return;let t=this.getAxisMotionValue(e),{min:r,max:o}=a[e];t.set((t.get()||0)+i[e]-Kh(r,o,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!KC(t)||!n||!this.constraints)return;this.stopAnimation();let r=this.constraints,i={x:0,y:0};Vx(e=>{let t=this.getAxisMotionValue(e).get();i[e]=LC({min:t,max:t},r[e])});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},``):`none`,n.root?.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Vx(t=>{let n=this.getAxisMotionValue(t);if(!XC(t,e,null)||!n.get())return;let{min:r,max:a}=this.constraints[t];n.set(Kh(r,a,i[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;WC.set(this.visualElement,this);let e=this.visualElement.current,t=$S(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&OC(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps(),r=KC(t)&&qC(t);r&&(this.constraints=this.resolveRefConstraints(),n||=YC(e,r,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i.layout||(i.root?.updateScroll(),i.updateLayout()),pg.read(r);let o=CS(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Vx(t=>{if(!XC(t,this.getProps().drag,this.currentDirection))return;let n=this.getAxisMotionValue(t);this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate)}),this.visualElement.render())}));return()=>{o(),t(),a(),s(),n?.()}}getProps(){let e=this.readProps(),{dragElastic:t=zC,dragMomentum:n=!0}=e;return{...e,dragElastic:t,dragMomentum:n}}};function KC(e){return!!e&&typeof e==`object`&&(`current`in e||`nodeType`in e)}var qC=e=>`current`in e?e.current:e;function JC(e){let t=!0;return()=>{t?t=!1:e()}}function YC(e,t,n){let r=pC(e,JC(n)),i=pC(t,JC(n));return()=>{r(),i()}}function XC(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function ZC(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}function QC(e,t){let n=ib(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},nb(()=>r.abort())]}function $C(e){return!(e.pointerType===`touch`||AC())}function ew(e,t,n={}){t=rb(t);let[r,i,a]=QC(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{e.pointerType!==`touch`&&(n?r=!0:s(e))};e.addEventListener(`pointerenter`,n=>{if(!$C(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var tw=(e,t)=>t?e===t||tw(e,t.parentElement):!1,nw=new WeakSet;function rw(e){return t=>{t.key===`Enter`&&e(t)}}function iw(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var aw=(e,t)=>{let n=!1,r=rw(()=>{nw.has(e)||(n=!0,iw(e,`down`))}),i=rw(()=>{n&&(n=!1,iw(e,`up`))});e.addEventListener(`keydown`,r,t),e.addEventListener(`keyup`,i,t),e.addEventListener(`blur`,()=>{e.removeEventListener(`keydown`,r),e.removeEventListener(`keyup`,i),n&&iw(e,`cancel`)},{...t,once:!0})};function ow(e){return XS(e)&&!AC()}var sw=new WeakSet;function cw(e,t,n={}){t=rb(t);let[r,i,a]=QC(e,n),o=e=>{let r=e.currentTarget;if(!ow(e)||sw.has(e))return;nw.add(r),n.stopPropagation&&sw.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{window.removeEventListener(`pointerup`,c,o),window.removeEventListener(`pointercancel`,l,o),nw.has(r)&&nw.delete(r),ow(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===window||r===document||n.useGlobalTarget||tw(r,e.target))},l=e=>{s(e,!1)};window.addEventListener(`pointerup`,c,o),window.addEventListener(`pointercancel`,l,o)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),$y(e)&&(e.addEventListener(`focus`,()=>aw(e,i),i),!EC(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function lw(...e){let t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],i=e[1+n],a=e[2+n],o=e[3+n],s=Jg(i,a,o);return t?s(r):s}var uw=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},dw=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),fw=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function pw(e,t,n,r){GS(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(dw.has(n)?n:ab(n),t.attrs[n])}function mw(e,t,n){let r=qS(e,t,n);for(let n in e)if(n!==`children`&&(Py(e[n])||Py(t[n]))){let t=B_.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var hw=class extends WS{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Dx}getBaseTargetFromProps(e,t){return V_.has(t)?super.getBaseTargetFromProps(e,t)??L_(t):e[t]}getDefaultValue(e){return V_.has(e)?this.latestValues[e]??L_(e):void 0}readValueFromInstance(e,t){if(V_.has(t)){let e=T_(t);return e&&e.default||0}if(ub.includes(t)){let n=getComputedStyle(e)[t];if(typeof n==`string`&&n)return n.trim()}return t=dw.has(t)?t:ab(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return mw(e,t,n)}build(e,t,n){db(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){pw(e,t,n,r)}mount(e){this.isSVGTag=fw(e.tagName),super.mount(e)}};function gw(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var _w=[...AS].reverse(),vw=e=>e?.out===!0?e:e?.out;function yw(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>Uy(e,t,n))),n=xw(),r=!0,i=!1;function a(a){let{props:o,parent:s,manuallyAnimateOnMount:c}=e,{initial:l}=o,u=r||i,d=[],f=(t=l)=>typeof t!=`boolean`&&Dy(e,Array.isArray(t)?t[0]:t,e.presenceContext?.custom)||void 0,p=new Map,m={},h=1/0,g=e;do g=g.props.inherit!==!1&&g.parent;while(g&&!g.isControllingVariants);let _=u&&vw(f(l??(g&&g.props.initial))?.transition);if(_w.forEach((t,r)=>{let i=n[t],l=o[t],f=g&&g.props[t],v=l===void 0?kS(f)||f===!1?f:void 0:l,y=kS(v),b=t===a?i.isActive:null,x=y&&l===void 0&&!(u&&c);if(i.protectedKeys={...m},!i.isActive&&b===null||!v&&!i.prevProp||OS(v)||typeof v==`boolean`)return;if(b===!1&&(h=r),t===`exit`&&i.isActive&&b!==!0){m={...m,...i.prevResolvedValues};return}let S=bw(i.prevProp,v),C=S||y&&(b&&!x||r>h),w=!1,T=Array.isArray(v)?v:[v],E={},D;if(b!==!1)for(let n of T){let{transition:r,transitionEnd:i,...a}=Dy(e,n,Oy(e,t))||{};E={...E,...a,...i},D=vw(r)||D}let{prevResolvedValues:O}=i;for(let t in{...O,...E}){if(t in m)continue;let n=E[t],r=O[t],a=Array.isArray(n)&&Array.isArray(r)?!gw(n,r)||S:n!==r,o;if(a&&n==null)p.has(t)||p.set(t,i.prevOut);else if(a||n!==void 0&&p.has(t)){C=!0,o=p.get(t)||_,p.delete(t)&&(w=!0),i.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)}else i.protectedKeys[t]=!0;i.out[t]=o}if(i.prevProp=v,i.prevResolvedValues=E,i.prevOut=D,i.isActive&&(m={...m,...E}),C&&(!(x&&S)||w))for(let n of T){let r={type:t};if(typeof n==`string`&&u&&c&&s?.enteringChildren){let t=Dy(s,n)?.transition?.delayChildren;r.delay=oy(s.enteringChildren,e,t)}d.push({animation:n,options:r})}}),p.size){let t={},n=f(),r=n?.transition;p.forEach((i,a)=>{i&&(r={...r||e.getDefaultTransition(),[a]:i});let s=e.getValue(a);s&&(s.liveStyle=!0);let c=n&&!Array.isArray(l)?n[a]:void 0,u=e.getBaseTargetFromProps(o,a);t[a]=(c===void 0?u!==void 0&&!Py(u)?u:e.initialValues[a]===void 0?e.baseTarget[a]:void 0:c)??null}),r&&(t.transition=r),d.push({animation:t})}let v=u&&e.blockInitialAnimation||r&&!c&&(o.initial===!1||o.initial===o.animate);return r=i=!1,!v&&d.length?t(d):Promise.resolve()}function o(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=a(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:a,setActive:o,setAnimateFunction:n=>{t=n(e)},getState:()=>n,reset:()=>{n=xw(),i=!0}}}function bw(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!gw(t,e):!1}function xw(){let e={};for(let t of AS)e[t]={isActive:t===`animate`,protectedKeys:{},needsAnimating:{},prevResolvedValues:{},out:{}};return e}var Sw=(0,H.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function Cw(e=!0){let t=(0,H.useContext)(lm);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,H.useId)();(0,H.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,H.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var ww=(0,H.createContext)({strict:!1}),Tw={animation:[`variants`,...AS],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},Ew=!1;function Dw(){if(Ew)return;let e={};for(let t in Tw)e[t]={isEnabled:e=>Tw[t].some(t=>!!e[t])};VS(e),Ew=!0}function Ow(){return Dw(),HS()}function kw(e){let t=Ow();for(let n in e)t[n]={...t[n],...e[n]};VS(t)}var Aw=(0,H.createContext)({});function jw(e,t){if(MS(e)){let{initial:t,animate:n}=e;return{initial:t===!1||kS(t)?t:void 0,animate:kS(n)?n:void 0}}return e.inherit===!1?{}:t}function Mw(e){let{initial:t,animate:n}=jw(e,(0,H.useContext)(Aw));return(0,H.useMemo)(()=>({initial:t,animate:n}),[Nw(t),Nw(n)])}function Nw(e){return Array.isArray(e)?e.join(` `):e}var Pw=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Fw(e,t,n){for(let r in t)!Py(t[r])&&!KS(r,n)&&(e[r]=t[r])}function Iw({transformTemplate:e},t){return(0,H.useMemo)(()=>{let n=Pw();return ob(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Lw(e,t){let n=e.style||{},r={};return Fw(r,n,e),Object.assign(r,Iw(e,t)),r}function Rw(e,t){let n={},r=Lw(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var zw=()=>({...Pw(),attrs:{}});function Bw(e,t,n,r){let i=(0,H.useMemo)(()=>{let n=zw();return db(n,t,fw(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};return Fw(t,e.style,e),{...i,style:{...t,...i.style}}}return i}var Vw=new Set(`animate.exit.variants.initial.style.values.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function Hw(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||Vw.has(e)}function Uw(e,t){return e.startsWith(`on`)?!Hw(e):t?.(e)??!Hw(e)}function Ww(e,t,n,r){let i={};for(let a in e)a===`values`&&typeof e.values==`object`||Py(e[a])||(Uw(a,r)||n===!0&&Hw(a)||!t&&!Hw(a)||e.draggable&&a.startsWith(`onDrag`))&&(i[a]=e[a]);return i}var Gw=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function Kw(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Gw.indexOf(e)>-1||/[A-Z]/u.test(e))}function qw(e,t,n,{latestValues:r},i,a=!1,o,s){let c=(o??Kw(e)?Bw:Rw)(t,r,i,e),l=Ww(t,typeof e==`string`,a,s),u=e===H.Fragment?{}:{...l,...c,ref:n},{children:d}=t,f=(0,H.useMemo)(()=>Py(d)?d.get():d,[d]);return(0,H.createElement)(e,{...u,children:f})}function Jw({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Yw(n,r,i,e),renderState:t()}}function Yw(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=Wb(a[e]);let{initial:o,animate:s}=e,c=MS(e),l=NS(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!OS(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=Ey(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var Xw=e=>(t,n)=>{let r=(0,H.useContext)(Aw),i=(0,H.useContext)(lm),a=()=>Jw(e,t,r,i);return n?a():sm(a)},Zw=Xw({scrapeMotionValuesFromProps:qS,createRenderState:Pw}),Qw=Xw({scrapeMotionValuesFromProps:mw,createRenderState:zw}),$w=Symbol.for(`motionComponentSymbol`);function eT(e,t,n){let r=(0,H.useRef)(n);(0,H.useInsertionEffect)(()=>{r.current=n});let i=(0,H.useRef)(null);return(0,H.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`){if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n)}else a&&(a.current=n)},[t])}var tT=(0,H.createContext)({});function nT(e,t,n,r,i,a){let{visualElement:o}=(0,H.useContext)(Aw),s=(0,H.useContext)(ww),c=(0,H.useContext)(lm),l=(0,H.useContext)(Sw),u=l.reducedMotion,d=l.skipAnimations,f=(0,H.useRef)(null),p=(0,H.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let m=f.current,h=(0,H.useContext)(tT);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&i.create(m,n,h),(0,H.useInsertionEffect)(()=>{m&&m.props!==n&&m.update(n,c)});let g=n[Ly],_=(0,H.useRef)(!!g&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return cm(()=>{p.current&&m&&(m.animationState?.animateChanges(),m.enteringChildren=void 0)},[]),cm(()=>{p.current=!0,m&&(window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),_.current&&m.animationState&&m.animationState.animateChanges())}),(0,H.useEffect)(()=>{m&&(!_.current&&m.animationState&&m.animationState.animateChanges(),_.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(g)}),!1),m.enteringChildren=void 0)}),m}function rT(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&kw(r);let a=n?n===`svg`:Kw(e),o=a?Qw:Zw;function s(n,s){let c,l=iT(n);sm(()=>!!TS.current?.sharedNodes.get(l)?.lead&&n.initial)&&(n={...n,initial:!1});let u={...(0,H.useContext)(Sw),...n,layoutId:l},{isStatic:d,isValidProp:f}=u,p=Mw(n),m=o(n,d);if(!d&&typeof window<`u`){aT(u,r);let t=oT(u);p.visualElement=nT(e,m,u,i,t.ProjectionNode,a),(t.isEnabled||p.visualElement?.projection?.options.layoutId)&&(c=t.MeasureLayout)}return(0,U.jsxs)(Aw.Provider,{value:p,children:[c&&p.visualElement?(0,U.jsx)(c,{visualElement:p.visualElement,...u}):null,qw(e,n,eT(m,p.visualElement,s),m,d,t,a,f)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,H.forwardRef)(s);return c[$w]=e,c}function iT({layoutId:e}){let t=(0,H.useContext)(om).id;return t&&e!==void 0?t+`-`+e:e}function aT(e,t){(0,H.useContext)(ww).strict}function oT(e){let{drag:t,layout:n}=Ow();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:r.MeasureLayout,isEnabled:t?.isEnabled(e)||n?.isEnabled(e),ProjectionNode:r.ProjectionNode}}function sT(e,t){if(typeof Proxy>`u`)return rT;let n=new Map,r=(n,r)=>rT(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,rT(a,void 0,e,t)),n.get(a))})}var cT=(e,t)=>t.isSVG??Kw(e)?new hw(t):new YS(t,{allowProjection:e!==H.Fragment}),lT=class extends uw{constructor(e){super(e),e.animationState||=yw(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();OS(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){this.node.getProps().animate!==this.node.prevProps?.animate&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},uT=0,dT={animation:{Feature:lT},exit:{Feature:class extends uw{constructor(){super(...arguments),this.id=uT++}update(){let{presenceContext:e,prevPresenceContext:t,animationState:n}=this.node;if(!e||!n)return;let{isPresent:r,onExitComplete:i}=e,a=t?.isPresent;if(r===a)return;if(r&&a===!1){if(this.exit===!0){let{initial:e}=this.node.getProps();if(e&&!Array.isArray(e)){let{transition:t,transitionEnd:n,...r}=Dy(this.node,e)||{};for(let e in r)this.node.getValue(e)?.jump(r[e])}this.node.blockInitialAnimation=!1,n.reset(),n.animateChanges()}else n.setActive(`exit`,!1);this.exit=void 0;return}let o=this.exit=n.setActive(`exit`,!r);i&&!r&&o.then(()=>{this.exit===o&&(this.exit=!0,i(this.id))})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id,this.node))}unmount(){}}}},fT=class extends uw{constructor(e){super(e),this.removeGroupControls=ym,this.removeListeners=ym,this.controls=new GC(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ym}update(){let{dragControls:e,drag:t}=this.node.getProps(),{dragControls:n,drag:r}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls))),r&&!t&&this.controls.stop(void 0,void 0,r)}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},pT=e=>(t,n)=>{e&&pg.update(()=>e(t,n),!1,!0)},mT=class extends uw{constructor(){super(...arguments),this.removePointerDownListener=ym}onPointerDown(e){this.session=new _C(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:this.node.current?.ownerDocument.defaultView})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:pT(e),onStart:pT(t),onMove:pT(n),onEnd:(e,t)=>{delete this.session,r&&pg.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=$S(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session?.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session?.end()}},hT=!1,gT=({layout:e,layoutDependency:t,layoutAnchor:n})=>({layout:e,layoutDependency:t,layoutAnchor:n,animationType:typeof e==`string`?e:`both`}),_T=(e,t)=>{let{snapshot:n}=e,r=e.getStack();r?.remove(e);let i=r?.lead;if(r?.prevLead===e&&i.resumeFrom===e&&(i.resumeFrom=i.currentAnimation=e.resumingFrom=void 0),e.options.layoutId=t,!t)e.needsShow=!0;else return e.root.registerSharedNode(t,e),()=>{let{resumeFrom:t}=e;t?.isPresent!==!1&&e.getStack().members.includes(t)&&(t.hide(),e.resumeFrom=void 0,e.snapshot=n)}},vT=class extends H.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group?.add(i),r&&n?.register?.(i),hT&&i.root.didUpdate(),i.options.layoutId!==r&&_T(i,r)?.(),i.addEventListener(`animationComplete`,()=>this.safeToRemove()),i.setOptions({...i.options,...gT(this.props),onExitComplete:()=>this.safeToRemove()})),Wx.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,layoutId:n,visualElement:r,drag:i,isPresent:a}=this.props,{projection:o}=r;return o&&(o.isPresent=a,this.takeOver=e.layoutId===n?void 0:(o.willUpdate(),_T(o,n)),o.setOptions({...o.options,...gT(this.props)}),hT=!0,i||e.layoutDependency!==t||t===void 0||e.isPresent!==a?o.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?o.promote():o.relegate()||pg.postRender(()=>{o.getStack()?.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(this.takeOver?.(),e.root.didUpdate(),Ib.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;hT=!0,r&&(r.scheduleCheckAfterUnmount(),t.group?.remove(r),n?.deregister?.(r))}safeToRemove(){this.props.safeToRemove?.()}render(){return null}};function yT(e){let[t,n]=Cw(),r=(0,H.useContext)(om);return(0,U.jsx)(vT,{...e,layoutGroup:r,switchLayoutGroup:(0,H.useContext)(tT),isPresent:t,safeToRemove:n})}var bT={pan:{Feature:mT},drag:{Feature:fT,ProjectionNode:ES,MeasureLayout:yT}};function xT(e,t,n,r){let{props:i}=e,a=`while`+n;e.animationState&&i[a]&&e.animationState.setActive(a,r===`Start`);let o=i[`on`+n+r];o&&pg.postRender(()=>o(t,ZS(t)))}var ST=class extends uw{mount(){let{current:e}=this.node;e&&(this.unmount=ew(e,(e,t)=>(xT(this.node,t,`Hover`,`Start`),e=>xT(this.node,e,`Hover`,`End`))))}unmount(){}},CT=class extends uw{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}e&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=bm(CS(this.node.current,`focus`,()=>this.onFocus()),CS(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function wT(e,t,n){e.current instanceof HTMLButtonElement&&e.current.disabled||xT(e,t,`Tap`,n)}var TT=class extends uw{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=cw(e,(e,t)=>(wT(this.node,t,`Start`),(e,{success:t})=>wT(this.node,e,t?``:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},ET=new WeakMap,DT=new WeakMap,OT=e=>{let t=ET.get(e.target);t&&t(e)},kT=e=>{e.forEach(OT)};function AT({root:e,...t}){let n=e||document;DT.has(n)||DT.set(n,{});let r=DT.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(kT,{root:e,...t})),r[i]}function jT(e,t,n){let r=AT(t);return ET.set(e,n),r.observe(e),()=>{ET.delete(e),r.unobserve(e)}}var MT={some:0,all:1},NT=class extends uw{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:MT[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=jT(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(PT(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function PT({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var FT=sT(Object.assign({},dT,{inView:{Feature:NT},tap:{Feature:TT},focus:{Feature:CT},hover:{Feature:ST}},bT,{layout:{ProjectionNode:ES,MeasureLayout:yT}}),cT);function IT(e){let t=sm(()=>dy(e)),{isStatic:n}=(0,H.useContext)(Sw);if(n){let[,n]=(0,H.useState)(e);(0,H.useEffect)(()=>t.on(`change`,n),[])}return t}function LT(e,t){let n=IT(t()),r=()=>n.set(t());return r(),cm(()=>{let t=()=>pg.preRender(r,!1,!0),n=e.map(e=>e.on(`change`,t));return r(),()=>{n.forEach(e=>e()),mg(r)}}),n}function RT(e){ly.current=[],e();let t=LT(ly.current,e);return ly.current=void 0,t}function zT(e,t,n,r){if(typeof e==`function`)return RT(e);if(n!==void 0&&!Array.isArray(n)&&typeof t!=`function`)return VT(e,t,n,r);let i=typeof t==`function`?t:lw(t,n,r),a=Array.isArray(e)?BT(e,i):BT([e],([e])=>i(e)),o=Array.isArray(e)?void 0:e.accelerate;if(o&&!o.isTransformed&&typeof t!=`function`&&Array.isArray(n)&&r?.clamp!==!1&&!r?.mixer){let e=r?.ease;a.accelerate={...o,times:[0,...t,1],keyframes:[n[0],...n,n[n.length-1]],isTransformed:!0,...e?{ease:Array.isArray(e)?[e[0],...e]:e}:{}}}return a}function BT(e,t){let n=sm(()=>[]);return LT(e,()=>{n.length=0;let r=e.length;for(let t=0;t<r;t++)n[t]=e[t].get();return t(n)})}function VT(e,t,n,r){let i=sm(()=>Object.keys(n)),a=sm(()=>({}));for(let o of i)a[o]=zT(e,t,n[o],r);return a}var HT=class{constructor(){this.componentControls=new Set}subscribe(e){return this.componentControls.add(e),()=>this.componentControls.delete(e)}start(e,t){this.componentControls.forEach(n=>{n.start(e.nativeEvent||e,t)})}cancel(){this.componentControls.forEach(e=>{e.cancel()})}stop(){this.componentControls.forEach(e=>{e.stop()})}},UT=()=>new HT;function WT(){return sm(UT)}var GT=(0,H.createContext)(null);function KT(e,t,n,r,i,a=`ltr`){let o=e.findIndex(e=>e.value===t);if(o===-1)return e;if(i===`xy`){let{layout:t}=e[o],r={x:Kh(t.x.min,t.x.max,.5)+n.x,y:Kh(t.y.min,t.y.max,.5)+n.y},i=qT(e),s=i.find(t=>t.items.includes(e[o])),c=i.reduce((e,t)=>JT(r.y,t)<JT(r.y,e)?t:e);if(c!==s)return YT(e,o,r.x,c,a);let l=XT(r,t),u=-1,d=l;return e.forEach((e,t)=>{if(t===o)return;let n=XT(r,e.layout);n<d&&(u=t,d=n)}),u===-1?e:fm(e,o,o+Math.sign(u-o))}if(!r[i])return e;let s=r[i]>0?1:-1,c=e[o+s];if(!c)return e;let l=e[o].layout[i],u=c.layout[i],d=Kh(u.min,u.max,.5);return s===1&&l.max+n[i]>d||s===-1&&l.min+n[i]<d?fm(e,o,o+s):e}function qT(e){let t=[];return e.forEach(e=>{let{min:n,max:r}=e.layout.y,i=t[t.length-1];!i||n>=i.max||r<=i.min?t.push({items:[e],min:n,max:r}):(i.items.push(e),i.min=Math.min(i.min,n),i.max=Math.max(i.max,r))}),t}function JT(e,t){return e<t.min?t.min-e:e>t.max?e-t.max:0}function YT(e,t,n,r,i){let a=e.filter((e,n)=>n!==t),o=r.items.find(e=>{let t=Kh(e.layout.x.min,e.layout.x.max,.5);return i===`ltr`?n<t:n>t}),s=o?a.indexOf(o):a.indexOf(r.items[r.items.length-1])+1,c=[...a];return c.splice(s,0,e[t]),c.every((t,n)=>t===e[n])?e:c}function XT(e,t){let n=Math.max(t.x.min-e.x,0,e.x-t.x.max),r=Math.max(t.y.min-e.y,0,e.y-t.y.max);return n*n+r*r}var ZT=(e,t)=>e.max<=t.min||t.max<=e.min;function QT(e){let t=!1,n=!1;for(let r=0;r<e.length;r++)for(let i=r+1;i<e.length;i++)if(t||=ZT(e[r].x,e[i].x),n||=ZT(e[r].y,e[i].y),t&&n)return`xy`;return t?`x`:`y`}function $T({children:e,as:t=`ul`,axis:n,onReorder:r,values:i,onPointerDownCapture:a,onClickCapture:o,...s},c,l){let u=sm(()=>l[t]),d=(0,H.useRef)(new Map),[f,p]=(0,H.useState)(`y`),m=(0,H.useRef)(!1),h=(0,H.useRef)(!1),g=(0,H.useRef)(null),_=n||f,v=new Set(i);d.current.forEach((e,t)=>{v.has(t)||d.current.delete(t)});let y=()=>i.flatMap(e=>{let t=d.current.get(e);return t?[{value:e,layout:t}]:[]}),b=()=>g.current?.ownerDocument.defaultView?.getComputedStyle(g.current).direction===`rtl`,x=(e,t)=>{let n=0,a=i.map(t=>d.current.has(t)?e[n++].value:t);a.some((e,t)=>e!==i[t])&&r(a,t)},S={axis:_,proxy:l,groupRef:g,hasReordered:h,onKeyDown:(e,t,n,r)=>{let{key:a,currentTarget:o}=e;if(e.defaultPrevented||e.target!==o||e.altKey||e.ctrlKey||e.metaKey)return;let s=y(),c=[`ArrowUp`,`ArrowLeft`,`ArrowDown`,`ArrowRight`].indexOf(a),l=c%2;if(a===` `)e.repeat||r(o,n?void 0:i);else if(!n)return;else if(a===`Escape`){let e=n.flatMap(e=>s.filter(t=>t.value===e));x(s.map(t=>n.includes(t.value)?e.shift():t),t),r(o)}else if(c<0||_!==`xy`&&_!==(l?`x`:`y`))return;else{let e=s.findIndex(({value:e})=>e===t),n=e+(c>1==!!(l&&b())?-1:1);e>-1&&s[n]&&x(fm(s,e,n),t)}e.preventDefault()},registerItem:(e,t)=>{if(d.current.set(e,t),!n){let e=QT(i.flatMap(e=>{let t=d.current.get(e);return t?[t]:[]}));e!==f&&p(e)}},updateOrder:(e,t,n)=>{if(m.current)return;let r=y(),i=KT(r,e,t,n,_,b()?`rtl`:`ltr`);r!==i&&(m.current=!0,h.current=!0,x(i,e))}};(0,H.useEffect)(()=>{m.current=!1},[i]);let C=e=>{g.current=e,typeof c==`function`?c(e):c&&(c.current=e)},w={overflowAnchor:`none`,...s.style};return(0,U.jsx)(u,{...s,style:w,ref:C,onPointerDownCapture:e=>{h.current=!1,a?.(e)},onClickCapture:e=>{h.current&&e.detail&&(h.current=!1,e.stopPropagation(),e.preventDefault()),o?.(e)},ignoreStrict:!0,children:(0,U.jsx)(GT.Provider,{value:S,children:e})})}var eE=e=>(0,H.forwardRef)((t,n)=>$T(t,n,e)),tE=50,nE=1.5,rE=new Set([`auto`,`scroll`]),iE=new WeakMap,aE=new WeakMap,oE=null;function sE(){if(oE){let e=lE(oE,`y`);e&&(aE.delete(e),iE.delete(e));let t=lE(oE,`x`);t&&t!==e&&(aE.delete(t),iE.delete(t)),oE=null}}function cE(e,t){let n=getComputedStyle(e),r=t===`x`?n.overflowX:n.overflowY,i=e===document.body||e===document.documentElement;return rE.has(r)||i}function lE(e,t){let n=e?.parentElement;for(;n;){if(cE(n,t))return n;n=n.parentElement}return null}function uE(e){let t=Math.min(1,1-e/tE);return nE*t*t*Gm.delta}function dE(e,t,n){let r=t.getBoundingClientRect(),i=n===`x`?Math.max(0,r.left):Math.max(0,r.top),a=n===`x`?Math.min(window.innerWidth,r.right):Math.min(window.innerHeight,r.bottom),o=e-i,s=a-e;return o<tE?{amount:-uE(o),edge:`start`}:s<tE?{amount:uE(s),edge:`end`}:{amount:0,edge:null}}function fE(e,t,n,r){if(!e)return;oE=e;let i=lE(e,n);if(!i)return;let{amount:a,edge:o}=dE(t-(n===`x`?window.scrollX:window.scrollY),i,n);if(o===null){aE.delete(i),iE.delete(i);return}let s=aE.get(i),c=i===document.body||i===document.documentElement;if(s!==o){if(!(o===`start`&&r<0||o===`end`&&r>0))return;aE.set(i,o);let e=n===`x`?i.scrollWidth-(c?window.innerWidth:i.clientWidth):i.scrollHeight-(c?window.innerHeight:i.clientHeight);iE.set(i,e)}if(a>0){let e=iE.get(i);if((n===`x`?c?window.scrollX:i.scrollLeft:c?window.scrollY:i.scrollTop)>=e)return}n===`x`?c?window.scrollBy({left:a}):i.scrollLeft+=a:c?window.scrollBy({top:a}):i.scrollTop+=a}function pE(e,t=0){return Py(e)?e:IT(t)}function mE({children:e,style:t={},value:n,as:r=`li`,onDrag:i,onDragEnd:a,onKeyDown:o,onBlur:s,layout:c=!0,...l},u){let d=(0,H.useContext)(GT),f=sm(()=>d.proxy[r]),[p,m]=(0,H.useState)(),h={x:pE(t.x),y:pE(t.y)},g=zT([h.x,h.y],([e,t])=>e||t?1:`unset`),{axis:_,registerItem:v,updateOrder:y,groupRef:b,hasReordered:x,onKeyDown:S}=d,C=_===`xy`||_,w=(e,t)=>{m(t),DS.get(e)?.animationState?.setActive(`whileDrag`,!!t)};return(0,U.jsx)(f,{drag:C,tabIndex:0,...l,dragSnapToOrigin:!0,style:{...t,x:h.x,y:h.y,zIndex:g},layout:c,onDrag:(e,t)=>{let{velocity:r,point:a}=t,o={x:h.x.get(),y:h.y.get()};y(n,o,r);let s=_===`xy`?Math.abs(r.x)>Math.abs(r.y)?`x`:`y`:_;fE(b.current,a[s],s,r[s]),i&&i(e,t)},onDragEnd:(e,t)=>{x.current=!1,sE(),a&&a(e,t)},onKeyDown:e=>{o?.(e),S(e,n,p,w)},onBlur:e=>{s?.(e),p&&w(e.currentTarget)},onLayoutMeasure:e=>{v(n,e)},ref:u,ignoreStrict:!0,children:e})}var hE=(0,H.forwardRef)(mE),gE=eE(FT);function _E(e){let[t,n]=(0,H.useState)(!1),[r,i]=(0,H.useState)(``),[a,o]=(0,H.useState)(``),[s,c]=(0,H.useState)(``),[l,u]=(0,H.useState)(null);return(0,U.jsxs)(`form`,{className:`grid`,onSubmit:async n=>{n.preventDefault(),u(null);try{if(t)await ht([zn(a).address],s.trim()===``?null:s.trim());else{let e=zn(r);await ht([e.address],e.code)}e.onAdded?.()}catch(e){u(Xn(e))}},children:[(0,U.jsxs)(`div`,{className:z(`grid gap-2`,e.fieldsClassName),children:[t?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(up,{"aria-label":`Server URL`,placeholder:`Server URL, e.g. http://127.0.0.1:47841`,spellCheck:!1,autoComplete:`off`,value:a,onChange:e=>o(e.target.value)}),(0,U.jsx)(up,{"aria-label":`Pairing code`,placeholder:`Pairing code, empty if auth is off`,spellCheck:!1,autoComplete:`off`,value:s,onChange:e=>c(e.target.value)})]}):(0,U.jsx)(up,{"aria-label":`Pairing link`,placeholder:`Pairing link`,spellCheck:!1,autoComplete:`off`,value:r,onChange:e=>i(e.target.value)}),l!==null&&(0,U.jsx)(`p`,{className:`text-destructive text-sm break-all`,children:l}),(0,U.jsx)(`button`,{type:`button`,className:`text-muted-foreground hover:text-foreground w-fit cursor-pointer text-xs`,onClick:()=>{n(!t),u(null)},children:t?`Paste a pairing link instead`:`Enter the server URL and code separately`})]}),e.actions(t?a.trim()!==``:r.trim()!==``)]})}function vE(e){return(0,U.jsx)(Sr,{open:!0,onOpenChange:()=>e.onClose(),children:(0,U.jsxs)(hr,{className:`gap-0 overflow-hidden p-0 sm:max-w-md`,children:[(0,U.jsxs)(gr,{className:`gap-1 px-6 pt-4 pr-12`,children:[(0,U.jsx)(yr,{className:`text-base`,children:`Add machine`}),(0,U.jsx)(br,{children:`Paste the pairing link that OffSite printed when it started.`})]}),(0,U.jsx)(_E,{fieldsClassName:`p-6`,onAdded:e.onClose,actions:t=>(0,U.jsxs)(Cr,{className:`bg-muted/40 border-t px-6 py-4`,children:[(0,U.jsx)(B,{type:`button`,variant:`outline`,onClick:e.onClose,children:`Cancel`}),(0,U.jsx)(B,{type:`submit`,disabled:!t,children:`Add machine`})]})})]})})}function yE(e){let t=e.machine,n=t.icon??`computer`,[r,i]=(0,H.useState)(!1);return(0,U.jsxs)(`div`,{className:`flex min-h-13 items-center justify-between gap-4 px-4 py-2.5`,children:[(0,U.jsx)(`span`,{className:`text-sm font-medium`,children:`Icon`}),(0,U.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(jd.includes(n)?jd:[n,...jd]).map(e=>(0,U.jsx)(B,{title:e,size:`icon-sm`,"aria-pressed":e===n,variant:e===n?`default`:`ghost`,onClick:()=>an(t.id,{icon:e}),children:(0,U.jsx)(Md,{icon:e})},e)),(0,U.jsxs)(b,{open:r,onOpenChange:i,modal:!0,children:[(0,U.jsx)(me,{asChild:!0,children:(0,U.jsx)(B,{title:`More icons`,size:`icon-sm`,variant:`ghost`,children:(0,U.jsx)(V,{icon:nn})})}),(0,U.jsx)(g,{align:`end`,collisionPadding:12,className:`flex max-h-96 w-80 flex-col gap-3 overflow-y-auto p-3`,children:[...new Set(Object.values(Ad).map(e=>e.group))].map(e=>(0,U.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,U.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:e}),(0,U.jsx)(`div`,{className:`grid grid-cols-[repeat(auto-fill,minmax(2rem,1fr))] gap-1`,children:Object.keys(Ad).filter(t=>Ad[t].group===e&&!jd.includes(t)).map(e=>(0,U.jsx)(B,{title:e,size:`icon-sm`,className:`aspect-square h-auto! w-full!`,"aria-pressed":e===n,variant:e===n?`default`:`ghost`,onClick:()=>{an(t.id,{icon:e}),i(!1)},children:(0,U.jsx)(Md,{icon:e,className:`block aspect-square! h-auto! w-[66%]! min-w-0! shrink-0!`})},e))})]},e))})]})]})]})}var bE={connecting:`Connecting…`,online:`Online`,offline:`Offline`,unpaired:`Needs pairing`};function xE(){let e=L(e=>e.machines),t=L(e=>e.machines.find(t=>t.id===e.settingsEditedMachine)),[n,r]=(0,H.useState)(!1),[i,a]=(0,H.useState)(null),o=i===null?e:[...e].sort((e,t)=>i.indexOf(e.id)-i.indexOf(t.id));return t===void 0?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Z,{title:`Machines`,note:`This browser connects to each one directly. The list stays in this browser`,children:(0,U.jsx)(gE,{as:`div`,axis:`y`,className:`divide-y`,values:o.map(e=>e.id),onReorder:a,children:o.map(e=>(0,U.jsxs)(CE,{value:e.id,disabled:!1,className:`min-h-13 gap-4`,onDragEnd:()=>{i!==null&&p(i),a(null)},children:[(0,U.jsx)(Md,{icon:e.icon,className:`text-muted-foreground size-5 shrink-0`}),(0,U.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,U.jsx)(`p`,{className:`truncate text-sm font-medium`,children:e.name}),e.addresses.map(e=>(0,U.jsx)(`p`,{className:`text-muted-foreground truncate font-mono text-xs`,children:e},e)),e.providers.filter(e=>e.state===`error`).map(e=>(0,U.jsxs)(`p`,{className:`text-destructive truncate text-xs`,title:e.error??void 0,children:[y[e.provider],` threads: `,e.error]},e.provider))]}),(0,U.jsxs)(`span`,{className:`text-muted-foreground shrink-0 text-xs`,children:[bE[e.status],e.status===`online`&&e.via!==null&&e.via!==e.addresses[0]&&` · via ${new URL(e.via).host}`]}),(0,U.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(0,U.jsx)(B,{size:`icon-sm`,variant:`ghost`,title:`Reconnect, trying the first address first`,onClick:()=>Fn(e.id),children:(0,U.jsx)(V,{icon:rs})}),(0,U.jsx)(B,{size:`icon-sm`,variant:`ghost-muted`,title:`Open machine`,onClick:()=>Xt({settingsEditedMachine:e.id}),children:(0,U.jsx)(V,{icon:kn})})]})]},e.id))})}),(0,U.jsx)(`div`,{className:`flex gap-2`,children:(0,U.jsx)(B,{variant:`outline`,size:`sm`,onClick:()=>r(!0),children:`Add machine…`})}),n&&(0,U.jsx)(vE,{onClose:()=>r(!1)})]}):(0,U.jsx)(SE,{machine:t})}function SE(e){let t=e.machine,[n,r]=(0,H.useState)(!1),[i,a]=(0,H.useState)(``),[o,s]=(0,H.useState)(null),[c,l]=(0,H.useState)(null),u=c??t.addresses,d=t.addresses.some(e=>St!==null&&St.includes(e)),f=(0,H.useRef)(null);(0,H.useEffect)(()=>{n&&f.current?.focus()},[n]);function p(e){s(null);try{return an(t.id,{addresses:[...new Set(e.map(e=>zn(e).address))]}),!0}catch(e){return s(Xn(e)),!1}}async function m(e){s(null);let n=e.trim();if(n===``)return!0;try{let e=n.includes(`#`)?zn(n).code:n;if(e===null)throw Error(`That link has no pairing code`);return await Tt(t.id,e),!0}catch(e){return s(Xn(e)),!1}}return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(Z,{title:`Machine`,children:[(0,U.jsx)(Q,{label:`Name`,children:(0,U.jsx)(Rp,{value:t.label??``,placeholder:t.hostname,onCommit:e=>an(t.id,{label:e.trim()===``?null:e.trim()})},t.label)}),(0,U.jsx)(yE,{machine:t})]}),!d&&(0,U.jsx)(Z,{title:`Pairing`,children:(0,U.jsxs)(`div`,{className:`flex min-h-13 items-center justify-between gap-4 px-4 py-2.5`,children:[t.pairedAt!==null&&t.status!==`unpaired`&&(0,U.jsx)(`span`,{className:`text-sm`,children:t.pairedAt===null?`Paired`:`Paired ${Pe(t.pairedAt)}`}),(t.pairedAt===null||t.status===`unpaired`)&&(0,U.jsxs)(`form`,{className:`flex flex-1 items-center gap-3`,onSubmit:async e=>{e.preventDefault(),await m(i)&&a(``)},children:[(0,U.jsx)(up,{className:`flex-1 font-mono`,placeholder:`Pairing link or code`,spellCheck:!1,autoComplete:`off`,value:i,onChange:e=>a(e.target.value)}),(0,U.jsxs)(B,{type:`submit`,variant:`outline`,className:`px-4`,disabled:i.trim()===``,children:[(0,U.jsx)(V,{icon:Ro}),`Pair`]})]})]})}),(0,U.jsxs)(Z,{title:`Addresses`,note:`OffSite tries them in order whenever it reconnects`,children:[(0,U.jsx)(gE,{as:`div`,axis:`y`,className:`divide-y`,values:u,onReorder:l,children:u.map((e,t)=>(0,U.jsxs)(CE,{value:e,disabled:d,onDragEnd:()=>{c!==null&&p(c),l(null)},children:[(0,U.jsx)(Rp,{className:`flex-1 font-mono`,value:e,disabled:d,onCommit:e=>p(u.map((n,r)=>r===t?e:n))}),(0,U.jsx)(B,{size:`icon-sm`,variant:`ghost`,title:`Remove address`,disabled:d||u.length===1,onClick:()=>p(u.filter((e,n)=>n!==t)),children:(0,U.jsx)(V,{icon:bo})})]},e))}),n&&(0,U.jsx)(`div`,{className:`px-4 py-2.5`,children:(0,U.jsx)(up,{ref:f,className:`font-mono`,placeholder:`http://192.168.1.10:47841`,spellCheck:!1,autoComplete:`off`,onBlur:e=>{let n=e.target.value.trim();(n===``||p([...t.addresses,n]))&&r(!1)},onKeyDown:e=>{e.key===`Enter`&&e.currentTarget.blur()}})}),!n&&!d&&(0,U.jsxs)(`button`,{type:`button`,className:`text-muted-foreground hover:bg-muted/50 hover:text-foreground flex w-full items-center gap-2 px-4 py-3 text-sm transition-colors`,onClick:()=>r(!0),children:[(0,U.jsx)(V,{icon:Va,className:`size-4`}),`Add address`]})]}),o!==null&&(0,U.jsx)(`p`,{className:`text-destructive px-1 text-xs break-all`,children:o}),!d&&(0,U.jsxs)(rn,{children:[(0,U.jsx)(Pn,{asChild:!0,children:(0,U.jsx)(B,{variant:`outline`,className:`text-destructive`,children:`Remove machine`})}),(0,U.jsxs)(wt,{children:[(0,U.jsxs)(Rn,{children:[(0,U.jsxs)(ot,{children:[`Remove `,t.name,`?`]}),(0,U.jsx)(Qe,{children:`This browser forgets the machine. The machine and its threads stay untouched.`})]}),(0,U.jsxs)(En,{children:[(0,U.jsx)(Ot,{children:`Cancel`}),(0,U.jsx)(Kt,{variant:`destructive`,onClick:()=>{Xt({settingsEditedMachine:null}),Oe(t.id)},children:`Remove machine`})]})]})]})]})}function CE(e){let t=WT();return(0,U.jsxs)(hE,{as:`div`,value:e.value,dragListener:!1,dragControls:t,onDragEnd:e.onDragEnd,className:z(`bg-background relative flex items-center gap-3 px-4 py-2.5`,e.className),children:[(0,U.jsx)(`span`,{className:z(`text-muted-foreground hover:text-foreground cursor-grab touch-none active:cursor-grabbing`,e.disabled&&`pointer-events-none opacity-50`),title:`Drag to reorder`,onPointerDown:e=>t.start(e),children:(0,U.jsx)(V,{icon:xo,className:`size-4`})}),e.children]})}var wE=new Map([[`denied`,`Blocked in the browser's site settings`],[`insecure`,`Needs https or localhost`],[`install`,`Add OffSite to the Home Screen first`],[`unsupported`,`Not supported in this browser`]]);function TE(e){let t=e.prefs.terminal,n=t.behavior;function r(r){fn({...e.prefs,terminal:{...t,behavior:{...n,...r}}})}return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(Z,{title:`Notifications`,children:[(0,U.jsx)(Q,{label:`Desktop notifications on this device`,children:(0,U.jsx)(EE,{})}),(0,U.jsx)(Q,{label:`Push terminal alerts when no OffSite page is open`,children:(0,U.jsx)(DE,{})})]}),(0,U.jsxs)(Z,{title:`Terminal bell`,children:[(0,U.jsx)(Q,{label:`Flash the screen on bell`,children:(0,U.jsx)(Ap,{checked:n.bellFlash,onCheckedChange:e=>r({bellFlash:e})})}),(0,U.jsx)(Q,{label:`Play a sound on bell`,children:(0,U.jsx)(Ap,{checked:n.bellSound,onCheckedChange:e=>r({bellSound:e})})})]})]})}function EE(){let[e,t]=(0,H.useState)(oa),[n,r]=(0,H.useState)(sa);(0,H.useEffect)(()=>{let e=oa();if(e===`insecure`||e===`unsupported`)return;let n=new AbortController;return la(n.signal,()=>t(oa())).catch(e=>console.error(`could not watch the notification permission`,e)),()=>n.abort()},[]);async function i(e){await ca(e),r(e),t(oa())}return(0,U.jsxs)(`div`,{className:`flex items-center gap-3`,children:[wE.has(e)&&(0,U.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:wE.get(e)}),(0,U.jsx)(Ap,{checked:e===`granted`&&n,disabled:e!==`granted`&&e!=="default",onCheckedChange:e=>void i(e)})]})}function DE(){let[e,t]=(0,H.useState)(_a),[n,r]=(0,H.useState)(!1),[i,a]=(0,H.useState)(()=>_a()===`supported`),[o,s]=(0,H.useState)(null);(0,H.useEffect)(()=>{if(_a()!==`supported`)return;let e=!0;async function t(){try{let t=await ya();e&&r(t)}catch(e){console.error(`could not read the push subscription`,e)}e&&a(!1)}return t(),()=>{e=!1}},[]);async function c(e){a(!0),s(null);try{e?r(await ba()):(await xa(),r(!1))}catch(e){console.error(`could not change push notifications`,e),s(Xn(e))}t(_a()),a(!1)}return(0,U.jsxs)(`div`,{className:`flex items-center gap-3`,children:[o!==null&&(0,U.jsxs)(`span`,{className:`text-muted-foreground text-xs`,children:[`Could not update: `,o]}),wE.has(e)&&(0,U.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:wE.get(e)}),(0,U.jsx)(Ap,{checked:e===`supported`&&n,disabled:e!==`supported`||i,onCheckedChange:e=>void c(e)})]})}var OE={five_hour:`5h`,seven_day:`Week`,seven_day_opus:`Week (Opus)`,seven_day_sonnet:`Week (Sonnet)`};function kE(e){return OE[e.window]??e.window}function AE(e){let t=e.account,[n,r]=(0,H.useState)(null);async function i(n){r(null);try{await R(e.machine,`accounts.update`,{id:t.id,name:t.name,color:t.color,configDir:t.configDir,enabled:t.enabled,...n})}catch(e){r(Xn(e))}}async function a(){r(null);try{await R(e.machine,`accounts.remove`,{id:t.id}),Xt({settingsAccount:null})}catch(e){r(Xn(e))}}return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(Z,{title:`Account`,children:[(0,U.jsx)(Q,{label:`Name`,children:(0,U.jsx)(Rp,{value:t.name,valid:e=>e.trim()!==``,onCommit:e=>void i({name:e})},t.name)}),(0,U.jsx)(Q,{label:`Color`,children:(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[t.color!==null&&(0,U.jsx)(`span`,{className:`size-5 shrink-0 rounded-full`,style:{backgroundColor:t.color}}),(0,U.jsx)(Rp,{className:`w-28 font-mono`,value:t.color??``,placeholder:`#3b82f6`,valid:e=>e===``||/^#[0-9a-f]{6}$/i.test(e),onCommit:e=>void i({color:e===``?null:e})},t.color??``)]})}),(0,U.jsx)(Q,{label:`Config directory`,children:(0,U.jsx)(Rp,{className:`w-72 font-mono`,value:t.configDir??``,placeholder:t.provider===`claude`?`~/.claude or empty for default`:`~/.codex or empty for default`,onCommit:e=>void i({configDir:e})},t.configDir??``)})]}),n!==null&&(0,U.jsx)(`p`,{className:`text-destructive px-1 text-xs`,children:n}),(0,U.jsxs)(rn,{children:[(0,U.jsx)(Pn,{asChild:!0,children:(0,U.jsx)(B,{variant:`outline`,className:`text-destructive`,children:`Remove account`})}),(0,U.jsxs)(wt,{children:[(0,U.jsxs)(Rn,{children:[(0,U.jsxs)(ot,{children:[`Remove `,t.name,`?`]}),(0,U.jsx)(Qe,{children:`OffSite stops using this account. Its config directory and sessions stay untouched.`})]}),(0,U.jsxs)(En,{children:[(0,U.jsx)(Ot,{children:`Cancel`}),(0,U.jsx)(Kt,{variant:`destructive`,onClick:()=>void a(),children:`Remove account`})]})]})]})]})}function jE(e){let[t,n]=(0,H.useState)(``),[r,i]=(0,H.useState)(``),[a,o]=(0,H.useState)(!1),[s,c]=(0,H.useState)(null);async function l(){o(!0),c(null);try{await R(e.machine,`accounts.add`,{provider:e.provider,name:t,configDir:r}),Xt({settingsAccount:null})}catch(e){c(Xn(e)),o(!1)}}return(0,U.jsxs)(`form`,{className:`space-y-5`,onSubmit:e=>{e.preventDefault(),l()},children:[(0,U.jsxs)(Z,{title:`Account`,children:[(0,U.jsx)(Q,{label:`Name`,children:(0,U.jsx)(up,{className:`w-56`,value:t,onChange:e=>n(e.target.value),placeholder:`Work`})}),(0,U.jsx)(Q,{label:`Config directory`,children:(0,U.jsx)(up,{className:`w-72 font-mono`,value:r,onChange:e=>i(e.target.value),placeholder:e.provider===`claude`?`~/.claude or empty for default`:`~/.codex or empty for default`})})]}),s!==null&&(0,U.jsx)(`p`,{className:`text-destructive px-1 text-xs`,children:s}),(0,U.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,U.jsx)(B,{type:`button`,variant:`ghost`,onClick:()=>Xt({settingsAccount:null}),children:`Cancel`}),(0,U.jsx)(B,{type:`submit`,disabled:a||t.trim()===``,children:`Add account`})]})]})}function ME(e){let t=e.config,n=t.enabledProviders[e.provider],r=e.provider===`claude`?e.claudeAccounts:e.provider===`codex`?e.codexAccounts:[],i=r.find(e=>e.valid),a=t.claudeBaseDir[e.platform]??e.defaultClaudeBaseDir;if(e.selected===`new`){if(e.provider===`opencode`)throw Error(`OpenCode accounts cannot be added`);return(0,U.jsx)(jE,{machine:e.machine,provider:e.provider})}if(e.selected!==null){let t=r.find(t=>t.id===e.selected);return t===void 0?(0,U.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`This account no longer exists.`}):(0,U.jsx)(AE,{machine:e.machine,account:t})}return(0,U.jsxs)(U.Fragment,{children:[e.provider===`claude`&&(0,U.jsx)(`div`,{className:`divide-y overflow-hidden rounded-xl border`,children:(0,U.jsx)(Q,{label:`Base directory`,children:(0,U.jsx)(Rp,{className:`w-72 font-mono`,value:a,valid:e=>e.trim()!==``,onCommit:n=>le(e.machine,{...t,claudeBaseDir:{...t.claudeBaseDir,[e.platform]:n}})},a)})}),(0,U.jsxs)(`div`,{className:z(`space-y-5 transition-opacity`,!n&&`opacity-50`),children:[e.provider!==`opencode`&&(0,U.jsx)(Z,{title:`Accounts`,children:(0,U.jsx)(PE,{machine:e.machine,accounts:r})}),n&&e.provider===`opencode`&&e.openCode.available&&(0,U.jsx)(NE,{machine:e.machine,config:t,provider:e.provider,accountId:null}),n&&e.provider!==`opencode`&&i!==void 0&&(0,U.jsx)(NE,{machine:e.machine,config:t,provider:e.provider,accountId:i.id})]})]})}function NE(e){let[t,n]=(0,H.useState)(null),[r,i]=(0,H.useState)(null),a=e.config.models[e.provider],o=t===null?null:t.models,s=e.config.newThreads.models[e.provider]??(t===null?null:t.defaultModel);(0,H.useEffect)(()=>{let t=!0;return n(null),i(null),R(e.machine,`capabilities`,{provider:e.provider,accountId:e.accountId,projectId:null}).then(e=>{t&&n(e)},e=>{t&&i(Xn(e))}),()=>{t=!1}},[e.machine,e.provider,e.accountId]);function c(t,n){le(e.machine,{...e.config,models:{...e.config.models,[e.provider]:{...a,[t]:n}}})}return(0,U.jsxs)(Z,{title:`Models`,children:[o!==null&&(0,U.jsx)(Q,{label:`Default model`,children:(0,U.jsxs)(dp,{value:s??void 0,onValueChange:t=>void le(e.machine,{...e.config,newThreads:{...e.config.newThreads,models:{...e.config.newThreads.models,[e.provider]:t}}}),children:[(0,U.jsx)(pp,{className:`w-56`,children:(0,U.jsx)(fp,{placeholder:`Choose a model`})}),(0,U.jsx)(mp,{children:o.filter(e=>!(a[e.value]?.hidden??e.deprecated)||e.value===s).map(e=>(0,U.jsx)(X,{value:e.value,children:e.name},e.value))})]})}),r!==null&&(0,U.jsx)(`p`,{className:`text-destructive px-4 py-3 text-xs`,children:r}),r===null&&o===null&&(0,U.jsx)(`p`,{className:`text-muted-foreground px-4 py-3 text-xs`,children:`Loading…`}),(o??[]).map(t=>{let n=a[t.value]??{hidden:t.deprecated,effort:t.effort};return(0,U.jsxs)(`div`,{className:`flex min-h-11 items-center gap-3 px-4 py-1.5`,children:[(0,U.jsxs)(`div`,{className:z(`min-w-0 flex-1 truncate text-sm`,n.hidden&&`text-muted-foreground`),children:[t.name,e.provider===`opencode`&&(0,U.jsx)(`span`,{className:`text-muted-foreground ml-2 text-xs`,children:t.description})]}),t.efforts.length>0&&(0,U.jsxs)(dp,{value:n.effort??t.effort??void 0,onValueChange:e=>c(t.value,{...n,effort:e}),children:[(0,U.jsx)(pp,{size:`sm`,className:`w-28`,children:(0,U.jsx)(fp,{placeholder:`Effort`})}),(0,U.jsx)(mp,{children:t.efforts.map(e=>(0,U.jsx)(X,{value:e,children:e.charAt(0).toUpperCase()+e.slice(1)},e))})]}),(0,U.jsx)(Ap,{size:`sm`,checked:!n.hidden,onCheckedChange:e=>c(t.value,{...n,hidden:!e}),"aria-label":`Show ${t.name}`})]},t.value)})]})}function PE(e){let[t,n]=(0,H.useState)(!1),[r,i]=(0,H.useState)(null);async function a(e){n(!0),i(null);try{await e()}catch(e){i(Xn(e))}finally{n(!1)}}return(0,U.jsxs)(U.Fragment,{children:[e.accounts.map(n=>(0,U.jsxs)(`div`,{className:`flex items-center gap-3 px-4 py-3`,children:[(0,U.jsxs)(`div`,{className:z(`min-w-0 flex-1`,!n.enabled&&`opacity-50`),children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,U.jsx)(`span`,{className:z(`size-2 shrink-0 rounded-full`,!n.enabled&&`bg-muted-foreground/40`,n.enabled&&n.error!==null&&`bg-destructive`,n.enabled&&n.error===null&&!n.linked&&`bg-warning`,n.enabled&&n.error===null&&n.linked&&`bg-success`)}),(0,U.jsx)(`span`,{className:`truncate text-sm font-medium`,children:n.name}),n.plan!==null&&(0,U.jsx)(`span`,{className:`text-muted-foreground shrink-0 text-xs`,children:n.plan})]}),n.error!==null&&(0,U.jsx)(`p`,{className:`text-destructive mt-1 truncate pl-4 text-xs`,children:n.error}),n.error===null&&!n.linked&&(0,U.jsx)(`p`,{className:`text-warning mt-1 truncate pl-4 text-xs`,children:`Not linked to shared threads · hidden in the composer`}),n.error===null&&n.linked&&n.limits.length>0&&(0,U.jsx)(`div`,{className:`mt-1.5 flex flex-wrap gap-x-5 gap-y-1.5 pl-4`,children:n.limits.map(e=>(0,U.jsx)(FE,{limit:e},e.window))})]}),(0,U.jsx)(Ap,{size:`sm`,checked:n.enabled,disabled:t,onCheckedChange:t=>void a(()=>R(e.machine,`accounts.update`,{id:n.id,name:n.name,color:n.color,configDir:n.configDir,enabled:t})),"aria-label":`Enable ${n.name}`}),(0,U.jsx)(B,{size:`icon-sm`,variant:`ghost-muted`,title:`Open account`,onClick:()=>Xt({settingsAccount:n.id}),children:(0,U.jsx)(V,{icon:kn})})]},n.id)),(0,U.jsxs)(`button`,{type:`button`,className:`text-muted-foreground hover:bg-muted/50 hover:text-foreground flex w-full items-center gap-2 px-4 py-3 text-sm transition-colors`,onClick:()=>Xt({settingsAccount:`new`}),children:[(0,U.jsx)(V,{icon:Va,className:`size-4`}),`Add account`]}),r!==null&&(0,U.jsx)(`p`,{className:`text-destructive px-4 py-3 text-xs`,children:r})]})}function FE(e){let t=e.limit,n=t.rejected?100:t.utilization===null?null:Math.min(100,Math.round(t.utilization*100));return n===null?null:(0,U.jsx)(Pr,{label:t.resetsAt===null?`Reset time unknown`:`Resets ${Pe(t.resetsAt*1e3)}`,children:(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5 text-xs`,children:[(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:kE(t)}),(0,U.jsx)(`div`,{className:`bg-foreground/10 h-1 w-16 overflow-hidden rounded-full`,children:(0,U.jsx)(`div`,{className:z(`h-full rounded-full`,t.rejected&&`bg-destructive`,!t.rejected&&n>=80&&`bg-warning`,!t.rejected&&n<80&&`bg-foreground/50`),style:{width:`${n}%`}})}),(0,U.jsxs)(`span`,{className:z(`tabular-nums`,t.rejected&&`text-destructive`,!t.rejected&&`text-muted-foreground`),children:[n,`%`]})]})})}var IE=Kn?`⌘`:`Ctrl+Shift`,LE=[[`Enter`,`Send, or queue or steer while the agent works`],[`${Yn}+Enter`,`Send the other way while the agent works`],[`Shift+Enter`,`New line`],[`↑`,`Recall your last message`],[`Esc`,`Stop the agent`],[`/`,`Slash commands`],[`@`,`Mention a file`],[`${Yn}+K`,`Search sessions and actions`],[`${Yn}+N or ${Yn}+T`,`New thread`],[Kn?"⌘+` or Ctrl+`":"Ctrl+`",`Toggle the terminal`],[`${Yn}+B or ${Yn}+Shift+J`,`Toggle the sidebar`],[`${Yn}+J or ${Yn}+Shift+B`,`Toggle the right panel`],[`${IE}+T`,`New terminal tab, in the terminal`],[`${IE}+W`,`Close the terminal tab`],[`${IE}+F`,`Find in the terminal`],[`Ctrl+Tab`,`Next terminal tab`],[`Ctrl+Shift+Tab`,`Previous terminal tab`]];function RE(){return(0,U.jsx)(Z,{title:`Keyboard shortcuts`,children:LE.map(([e,t])=>(0,U.jsx)(Q,{label:t,children:(0,U.jsx)(`kbd`,{className:`bg-muted text-muted-foreground rounded px-1.5 py-0.5 font-sans text-xs`,children:e})},e))})}var zE=1048576;function BE(e){window.isSecureContext?navigator.clipboard.writeText(e).catch(e=>{console.warn(`could not copy to the clipboard`,e),W(`Could not copy to the clipboard`)}):console.warn(`copy from the terminal needs https or localhost`)}async function VE(e){if(!window.isSecureContext){console.warn(`programs can read the clipboard only over https or localhost`),W(`Programs can read the clipboard only over https or localhost`);return}let t;try{t=await navigator.clipboard.readText()}catch(e){console.warn(`could not read the clipboard`,e),W(`Could not read the clipboard`);return}new TextEncoder().encode(t).length>zE?(console.warn(`the clipboard is over 1 MiB, not replying`),W(`The clipboard is too large to share (over 1 MiB)`)):e(t)}var HE={macos:{label:`Ctrl+V`,ctrl:!0,alt:!1,data:``},linux:{label:`Ctrl+V`,ctrl:!0,alt:!1,data:``},windows:{label:`Alt+V`,ctrl:!1,alt:!0,data:`\x1Bv`}};function UE(e,t){let n=HE[t];return e.key.toLowerCase()===`v`&&e.ctrlKey===n.ctrl&&e.altKey===n.alt&&!e.shiftKey&&!e.metaKey}async function WE(e,t){let n=[];for(let e of await navigator.clipboard.read()){let t=e.types.find(e=>e.startsWith(`image/`));t&&n.push(await e.getType(t))}return n.length===0?(W(`No image in the clipboard`),!1):(await GE(e,t,n),!0)}async function GE(e,t,n){let r=[];for(let t of n){let n=await R(e,`terminal.paste`,{type:t.type,data:await Pd(t)});r.push(/\s/.test(n)?`"${n}"`:n)}t.paste(r.join(` `))}function KE(e){console.error(`could not paste image`,e),W(`Could not paste the image`)}function qE(e){let t=e.prefs.terminal,[n,r]=(0,H.useState)(!Np.some(e=>e.family===t.font.family));function i(t){fn({...e.prefs,terminal:t})}function a(e,n){i({...t,[e]:{...t[e],...n}})}return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(Z,{title:`Font`,children:[(0,U.jsx)(Q,{label:`Family`,children:(0,U.jsxs)(dp,{value:n?`custom`:t.font.family,onValueChange:e=>{r(e===`custom`),e!==`custom`&&a(`font`,{family:e})},children:[(0,U.jsx)(pp,{className:`w-56`,children:(0,U.jsx)(fp,{})}),(0,U.jsxs)(mp,{children:[Np.map(e=>(0,U.jsx)(X,{value:e.family,children:e.label},e.family)),(0,U.jsx)(X,{value:`custom`,children:`Custom`})]})]})}),n&&(0,U.jsx)(Q,{label:`Custom family`,children:(0,U.jsx)(Rp,{placeholder:`Installed font name`,value:t.font.family,onCommit:e=>a(`font`,{family:e})})}),(0,U.jsx)(Q,{label:`Size`,children:(0,U.jsx)(zp,{value:t.font.size,step:.5,onCommit:e=>a(`font`,{size:e})})}),(0,U.jsx)(Q,{label:`Line height`,children:(0,U.jsx)(zp,{value:t.font.lineHeight,step:.05,onCommit:e=>a(`font`,{lineHeight:e})})}),(0,U.jsx)(Q,{label:`Ligatures`,children:(0,U.jsx)(Ap,{checked:t.font.ligatures,onCheckedChange:e=>a(`font`,{ligatures:e})})}),(0,U.jsx)(Q,{label:`Bold text in bright colors`,children:(0,U.jsx)(Ap,{checked:t.boldIsBright,onCheckedChange:e=>i({...t,boldIsBright:e})})})]}),(0,U.jsxs)(Z,{title:`Cursor`,children:[(0,U.jsx)(Q,{label:`Style`,children:(0,U.jsxs)(dp,{value:t.cursor.style,onValueChange:e=>a(`cursor`,{style:e}),children:[(0,U.jsx)(pp,{className:`w-56`,children:(0,U.jsx)(fp,{})}),(0,U.jsxs)(mp,{children:[(0,U.jsx)(X,{value:`block`,children:`Block`}),(0,U.jsx)(X,{value:`bar`,children:`Bar`}),(0,U.jsx)(X,{value:`underline`,children:`Underline`})]})]})}),(0,U.jsx)(Q,{label:`Blink`,children:(0,U.jsx)(Ap,{checked:t.cursor.blink,onCheckedChange:e=>a(`cursor`,{blink:e})})})]}),(0,U.jsx)(JE,{behavior:t.behavior,onChange:e=>a(`behavior`,e)}),(0,U.jsx)(YE,{behavior:t.behavior,onChange:e=>a(`behavior`,e)}),(0,U.jsx)(XE,{behavior:t.behavior,onChange:e=>a(`behavior`,e)}),(0,U.jsxs)(Z,{title:`Layout`,children:[[`top`,`right`,`bottom`,`left`].map(e=>(0,U.jsx)(Q,{label:`Padding ${e}`,children:(0,U.jsx)(zp,{value:t.padding[e],onCommit:t=>a(`padding`,{[e]:t})})},e)),(0,U.jsx)(Q,{label:`Scrollback lines`,children:(0,U.jsx)(zp,{value:t.scrollback,step:1e3,onCommit:e=>i({...t,scrollback:e})})})]})]})}function JE(e){return(0,U.jsxs)(Z,{title:`Behavior`,children:[(0,U.jsx)(Q,{label:`Modernize Shift+Enter`,children:(0,U.jsx)(Ap,{checked:e.behavior.modernizeShiftEnter,onCheckedChange:t=>e.onChange({modernizeShiftEnter:t})})}),(0,U.jsx)(Q,{label:`${HE.linux.label} (${HE.windows.label} on Windows machines) pastes images from the browser clipboard`,children:(0,U.jsx)(Ap,{checked:e.behavior.pasteBrowserImages,onCheckedChange:t=>e.onChange({pasteBrowserImages:t})})}),(0,U.jsx)(Q,{label:`Capture browser shortcuts`,children:(0,U.jsx)(Ap,{checked:e.behavior.captureShortcuts,onCheckedChange:t=>e.onChange({captureShortcuts:t})})}),(0,U.jsx)(Q,{label:`Click moves the cursor in the command line`,children:(0,U.jsx)(Ap,{checked:e.behavior.clickToMoveCursor,onCheckedChange:t=>e.onChange({clickToMoveCursor:t})})}),(0,U.jsx)(Q,{label:`Ask before closing a tab that is running a program`,children:(0,U.jsx)(Ap,{checked:e.behavior.confirmCloseBusyTab,onCheckedChange:t=>e.onChange({confirmCloseBusyTab:t})})})]})}function YE(e){return Kn?(0,U.jsx)(Z,{title:`Mac keys`,note:`Meta keeps that Option key from typing @, | and other symbols. Safari and Firefox use US key positions`,children:(0,U.jsx)(Q,{label:`Use Option as Meta`,children:(0,U.jsxs)(dp,{value:e.behavior.optionAsMeta,onValueChange:t=>e.onChange({optionAsMeta:t}),children:[(0,U.jsx)(pp,{className:`w-56`,children:(0,U.jsx)(fp,{})}),(0,U.jsxs)(mp,{children:[(0,U.jsx)(X,{value:`off`,children:`Off`}),(0,U.jsx)(X,{value:`left`,children:`Left Option`}),(0,U.jsx)(X,{value:`right`,children:`Right Option`}),(0,U.jsx)(X,{value:`both`,children:`Both Options`})]})]})})}):null}function XE(e){return Wn?(0,U.jsx)(Z,{title:`Windows keys`,note:`Ctrl+C sends an interrupt when nothing is selected. Ctrl+Shift+C and Ctrl+Shift+V always copy and paste`,children:(0,U.jsx)(Q,{label:`Ctrl+C copies the selection and Ctrl+V pastes`,children:(0,U.jsx)(Ap,{checked:e.behavior.windowsCopyPaste,onCheckedChange:t=>e.onChange({windowsCopyPaste:t})})})}):null}var ZE=[`General`,`Editor`,`Terminal`,`Notifications`,`Shortcuts`,`Machines`],QE=[`Machine`,`Claude`,`Codex`,`OpenCode`];function $E(){let e=L(e=>e.machines),t=L(e=>e.settingsMachine===null?null:He(e,e.settingsMachine)),n=L(e=>e.settingsPage),r=iD(n),i=L(e=>r===null?null:e.settingsAccount),a=L(e=>n===`Machines`?e.machines.find(t=>t.id===e.settingsEditedMachine)??null:null);return{machines:e,machine:t,config:t===null?null:t.config,system:t===null?null:t.system,page:n,provider:r,account:i,editedMachine:a,subpage:i!==null||a!==null,subpageTitle:i===`new`?`New account`:i===null?a?.name:[...t?.claudeAccounts??[],...t?.codexAccounts??[]].find(e=>e.id===i)?.name}}function eD(){let e=L(e=>e.settingsOpen),t=$E(),n=t.page,r=t.machine;function a(e){return(0,U.jsx)(`button`,{className:z(`text-muted-foreground hover:bg-accent hover:text-foreground flex h-9 flex-none items-center rounded-md px-2 text-sm transition-colors`,e===n&&`bg-accent text-foreground`),onClick:()=>vt(e),children:(0,U.jsx)(tD,{page:e})},e)}return(0,U.jsx)(Sr,{open:e,onOpenChange:i,children:(0,U.jsxs)(hr,{showCloseButton:!1,"aria-describedby":void 0,className:`flex h-[min(44rem,calc(100dvh-2rem))] flex-col gap-0 overflow-hidden p-0 sm:max-w-4xl sm:flex-row`,children:[(0,U.jsxs)(`nav`,{className:`flex flex-none gap-1 overflow-x-auto border-b p-3 sm:w-48 sm:flex-col sm:border-r sm:border-b-0`,children:[(0,U.jsx)(yr,{className:`hidden px-2 pt-1 pb-3 text-base font-semibold sm:block`,children:`Settings`}),ZE.map(a),(0,U.jsxs)(`div`,{className:`flex flex-none items-center gap-1 sm:mt-6 sm:flex-col sm:items-stretch`,children:[r!==null&&t.machines.length>1&&(0,U.jsxs)(dp,{value:r.id,onValueChange:e=>Xt({settingsMachine:e,settingsAccount:null}),children:[(0,U.jsx)(pp,{className:`mb-1 w-40 sm:w-full`,children:(0,U.jsx)(fp,{})}),(0,U.jsx)(mp,{children:t.machines.map(e=>(0,U.jsxs)(X,{value:e.id,children:[(0,U.jsx)(Md,{icon:e.icon}),e.name]},e.id))})]}),r!==null&&t.machines.length===1&&(0,U.jsxs)(`p`,{className:`text-muted-foreground flex h-9 items-center gap-1.5 px-2 text-xs font-medium [&_svg]:size-4`,children:[(0,U.jsx)(Md,{icon:r.icon}),(0,U.jsx)(`span`,{className:`truncate`,children:r.name})]}),QE.map(a)]})]}),(0,U.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-6 pt-4 pb-7`,children:[(0,U.jsxs)(`div`,{className:`mb-5 flex h-9 items-center`,children:[t.subpage&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`button`,{className:`text-muted-foreground hover:text-foreground text-xl font-semibold tracking-tight transition-colors`,onClick:()=>Xt({settingsAccount:null,settingsEditedMachine:null}),children:n}),(0,U.jsx)(V,{icon:kn,className:`text-muted-foreground mx-1.5 size-5`}),(0,U.jsx)(`h2`,{className:`truncate text-xl font-semibold tracking-tight`,children:t.subpageTitle})]}),!t.subpage&&(0,U.jsx)(`h2`,{className:`text-xl font-semibold tracking-tight`,children:n===`Machine`?`General`:n}),(0,U.jsx)(nD,{view:t,className:`ml-3`}),(0,U.jsx)(vr,{asChild:!0,children:(0,U.jsx)(B,{variant:`ghost`,size:`icon`,className:`-mr-2 ml-auto`,"aria-label":`Close settings`,children:(0,U.jsx)(V,{icon:ao})})})]}),(0,U.jsx)(rD,{view:t})]})]})})}function tD(e){let t=iD(e.page);return(0,U.jsxs)(U.Fragment,{children:[t!==null&&(0,U.jsx)(`span`,{className:`mr-2.5 flex size-4 items-center justify-center`,children:(0,U.jsx)(pc,{provider:t,className:z(t===`claude`&&`size-4`,t===`codex`&&`size-[19px] shrink-0`,t===`opencode`&&`h-3.5`)})}),e.page===`Machine`?`General`:e.page]})}function nD(e){let t=e.view.machine,n=e.view.config,r=e.view.provider;return r===null||e.view.account!==null||t===null||n===null?null:(0,U.jsx)(Ap,{className:e.className,checked:n.enabledProviders[r],onCheckedChange:e=>void le(t.id,{...n,enabledProviders:{...n.enabledProviders,[r]:e}}),"aria-label":`Enable ${e.view.page}`})}function rD(e){let t=L(e=>e.prefs),n=e.view.page,r=e.view.machine,i=e.view.config,a=e.view.system,o=QE.includes(n),[s,c]=(0,H.useState)(null),[l,u]=(0,H.useState)(0);return(0,U.jsxs)(U.Fragment,{children:[o&&r!==null&&r.configError!==null&&(0,U.jsxs)(`p`,{className:`text-destructive mb-5 text-sm whitespace-pre-wrap`,children:[`Not saved: `,r.configError]}),(0,U.jsxs)(`div`,{className:`w-full space-y-5`,children:[n===`General`&&(0,U.jsx)(Vp,{prefs:t,onRestore:()=>c(`browser`)}),n===`Machine`&&r!==null&&i!==null&&a!==null&&(0,U.jsx)(rm,{machine:r.id,config:i,platform:a.platform,defaultShell:a.defaultShell,claudeAccounts:r.claudeAccounts,codexAccounts:r.codexAccounts,openCode:r.openCode,onRestore:()=>c(`machine`)}),o&&r===null&&(0,U.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Add a machine to see its settings.`}),o&&r!==null&&(i===null||a===null)&&(0,U.jsxs)(`p`,{className:`text-muted-foreground text-sm`,children:[r.name,` is not connected. Its settings show up once it is.`]}),n===`Editor`&&(0,U.jsx)(Bp,{prefs:t}),n===`Terminal`&&(0,U.jsx)(qE,{prefs:t}),n===`Notifications`&&(0,U.jsx)(TE,{prefs:t}),e.view.provider!==null&&r!==null&&i!==null&&a!==null&&(0,U.jsx)(ME,{machine:r.id,config:i,platform:a.platform,defaultClaudeBaseDir:a.defaultClaudeBaseDir,provider:e.view.provider,claudeAccounts:r.claudeAccounts,codexAccounts:r.codexAccounts,openCode:r.openCode,selected:e.view.account},e.view.provider),n===`Machines`&&(0,U.jsx)(xE,{}),n===`Shortcuts`&&(0,U.jsx)(RE,{})]},l),(0,U.jsx)(rn,{open:s!==null,onOpenChange:e=>{e||c(null)},children:(0,U.jsxs)(wt,{children:[(0,U.jsxs)(Rn,{children:[(0,U.jsx)(ot,{children:s===`browser`?`Restore browser defaults?`:`Restore machine defaults?`}),(0,U.jsx)(Qe,{children:s===`browser`?`All settings of this browser go back to their defaults.`:`All settings of ${r?.name} go back to their defaults.`})]}),(0,U.jsxs)(En,{children:[(0,U.jsx)(Ot,{children:`Cancel`}),(0,U.jsx)(Kt,{variant:`destructive`,onClick:()=>{if(u(l+1),s===`browser`)fn(dt);else{if(r===null||i===null||a===null)throw Error(`Restoring machine defaults needs a connected machine`);le(r.id,{...a.defaults,claudeAccounts:i.claudeAccounts,codexAccounts:i.codexAccounts})}},children:`Restore defaults`})]})]})})]})}function iD(e){return e===`Claude`?`claude`:e===`Codex`?`codex`:e===`OpenCode`?`opencode`:null}function aD(){let e=L(e=>e.settingsOpen),t=L(e=>e.settingsListing),n=$E(),r=n.machine;function a(){t?i(!1):n.subpage?Xt({settingsAccount:null,settingsEditedMachine:null}):Xt({settingsListing:!0})}function o(e){return(0,U.jsxs)(`button`,{className:`active:bg-accent flex min-h-12 w-full items-center px-4 text-left text-sm font-medium`,onClick:()=>vt(e),children:[(0,U.jsx)(tD,{page:e}),(0,U.jsx)(V,{icon:kn,className:`text-muted-foreground ml-auto size-4`})]},e)}return(0,U.jsx)(xr,{open:e,onOpenChange:i,children:(0,U.jsx)(Tr,{children:(0,U.jsxs)(_r,{"aria-describedby":void 0,className:`bg-background text-foreground data-open:animate-in data-open:slide-in-from-right fixed inset-0 z-50 flex flex-col pt-[env(safe-area-inset-top)] pb-[env(safe-area-inset-bottom)] text-sm duration-200 outline-none [--workspace-topbar-height:44px] motion-reduce:animate-none`,children:[(0,U.jsxs)(`header`,{className:`flex h-(--workspace-topbar-height) shrink-0 items-center gap-1.5 pr-3 pl-1`,children:[(0,U.jsx)(B,{variant:`ghost`,size:`icon`,"aria-label":`Back`,onClick:a,children:(0,U.jsx)(V,{icon:Za,className:`text-foreground size-5`,strokeWidth:2})}),(0,U.jsxs)(Dr,{className:`min-w-0 flex-1 truncate font-medium`,children:[t&&`Settings`,!t&&n.subpage&&n.subpageTitle,!t&&!n.subpage&&n.page]}),!t&&(0,U.jsx)(nD,{view:n,className:`shrink-0`})]}),(0,U.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-4 pt-2 pb-6`,children:[t&&(0,U.jsxs)(`div`,{className:`space-y-5`,children:[(0,U.jsx)(Z,{title:`This browser`,children:ZE.map(o)}),(0,U.jsxs)(Z,{title:`Machine`,children:[r!==null&&(0,U.jsxs)(Q,{label:`Machine`,children:[n.machines.length>1&&(0,U.jsxs)(dp,{value:r.id,onValueChange:e=>Xt({settingsMachine:e,settingsAccount:null}),children:[(0,U.jsx)(pp,{className:`w-40`,children:(0,U.jsx)(fp,{})}),(0,U.jsx)(mp,{children:n.machines.map(e=>(0,U.jsxs)(X,{value:e.id,children:[(0,U.jsx)(Md,{icon:e.icon}),e.name]},e.id))})]}),n.machines.length===1&&(0,U.jsxs)(`span`,{className:`text-muted-foreground flex items-center gap-1.5 text-sm [&_svg]:size-4`,children:[(0,U.jsx)(Md,{icon:r.icon}),r.name]})]}),QE.map(o)]})]}),!t&&(0,U.jsx)(rD,{view:n})]})]})})})}function oD(){return(0,U.jsx)(`div`,{className:`grid flex-1 place-items-center p-6`,children:(0,U.jsxs)(`div`,{className:`w-full max-w-md`,children:[(0,U.jsx)(`h1`,{className:`text-foreground text-center text-2xl font-normal tracking-tight sm:text-3xl`,children:`Connect a machine`}),(0,U.jsx)(`p`,{className:`text-muted-foreground mt-2 text-center text-sm`,children:`Run this on the computer you want to use, then open the pairing link it prints.`}),(0,U.jsx)(`pre`,{className:`bg-muted text-foreground mt-5 rounded-lg px-4 py-3 font-mono text-sm select-all`,children:`npx offsite serve`}),(0,U.jsx)(`p`,{className:`text-muted-foreground mt-8 mb-3 text-sm`,children:`Or connect it here.`}),(0,U.jsx)(_E,{actions:e=>(0,U.jsx)(B,{type:`submit`,className:`mt-4`,disabled:!e,children:`Connect`})})]})})}function sD(){let e=L(e=>e.paletteOpen),t=L(e=>e.selection),n=L(e=>e.machines),r=L(e=>e.projects),[a,o]=(0,H.useState)(``),[s]=ic(a,150),[c,l]=(0,H.useState)([]),[u,d]=(0,H.useState)(0),f=(0,H.useRef)(null),p=a.toLowerCase().split(/\s+/).filter(Boolean),m=[...t===null?[]:[{key:`new`,label:`New thread`,detail:r.find(e=>e.machine===t.machine&&e.id===t.projectId)?.path??``,run:()=>ce({...t,sessionId:null})}],{key:`accounts`,label:`Manage accounts`,detail:``,run:()=>vt(oe[I().settings.provider])},{key:`settings`,label:`Settings`,detail:`Theme, notifications, keyboard shortcuts`,run:()=>i(!0)}],h=c.map(e=>({key:kt(e.machine,e.id),label:e.title,detail:`${e.status===`minimized`?`Minimized · `:``}${n.length>1?`${n.find(t=>t.id===e.machine)?.name??``}:`:``}${r.find(t=>t.machine===e.machine&&t.id===e.projectId)?.path??``}`,run:()=>ce({machine:e.machine,projectId:e.projectId,sessionId:e.id})})),g=[...m.filter(e=>{let t=`${e.label} ${e.detail}`.toLowerCase();return p.every(e=>t.includes(e))}),...h],_=Math.min(u,g.length-1);(0,H.useEffect)(()=>{if(!e)return;let t=!0;return Promise.all(I().machines.filter(e=>e.status===`online`).map(async e=>(await R(e.id,`sessions.search`,{query:s})).map(t=>({...t,machine:e.id})))).then(e=>{t&&l(e.flat())}).catch(Ze),()=>{t=!1}},[e,s]),(0,H.useLayoutEffect)(()=>{f.current?.querySelector(`[data-active="true"]`)?.scrollIntoView({block:`nearest`})},[_]);function v(e){Ce(!1),e.run()}return(0,U.jsx)(Sr,{open:e,onOpenChange:e=>{Ce(e),o(``),d(0)},children:(0,U.jsxs)(hr,{showCloseButton:!1,className:`top-[20%] translate-y-0 gap-0 overflow-hidden p-0 sm:max-w-xl`,children:[(0,U.jsx)(yr,{className:`sr-only`,children:`Search threads`}),(0,U.jsxs)(`label`,{className:`flex items-center gap-2 border-b px-4`,children:[(0,U.jsx)(V,{icon:mn,className:`text-muted-foreground size-4 shrink-0`}),(0,U.jsx)(`input`,{value:a,onChange:e=>{o(e.target.value),d(0)},onKeyDown:e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault();let t=e.key===`ArrowDown`?1:-1;d((_+t+g.length)%g.length)}e.key===`Enter`&&_>=0&&(e.preventDefault(),v(g[_]))},placeholder:`Search threads and actions…`,className:`placeholder:text-placeholder/75 h-11 w-full bg-transparent text-sm outline-none`})]}),(0,U.jsxs)(`div`,{ref:f,className:`max-h-96 overflow-y-auto p-1`,children:[g.length===0&&(0,U.jsx)(`p`,{className:`text-muted-foreground px-3 py-6 text-center text-xs`,children:`Nothing matches.`}),g.map((e,t)=>(0,U.jsxs)(`button`,{"data-active":t===_,className:z(`flex w-full cursor-pointer flex-col rounded-lg px-2.5 py-1.5 text-left`,t===_&&`bg-accent`),onMouseMove:()=>d(t),onClick:()=>v(e),children:[(0,U.jsx)(`span`,{className:`truncate text-sm`,children:e.label}),e.detail!==``&&(0,U.jsx)(`span`,{className:`text-secondary-label truncate text-xs`,children:e.detail})]},e.key))]})]})})}function cD(e){let t=e.session,[n,r]=(0,H.useState)(!1),i=e.mobile?nt:se,a=e.mobile?ut:A;return(0,U.jsxs)(U.Fragment,{children:[t.status===`inactive`?(0,U.jsxs)(i,{onSelect:()=>void o(t.machine,t.id,{status:`active`}),children:[(0,U.jsx)(V,{icon:ts}),`Make active`]}):(0,U.jsxs)(i,{onSelect:e.onDeactivate,children:[(0,U.jsx)(V,{icon:es}),`Inactive`]}),(0,U.jsxs)(i,{onSelect:()=>void o(t.machine,t.id,{status:t.status===`snoozed`?`active`:`snoozed`}),children:[(0,U.jsx)(V,{icon:t.status===`snoozed`?Ha:Ua}),t.status===`snoozed`?`Unsnooze`:`Snooze`]}),(0,U.jsxs)(i,{onSelect:()=>void o(t.machine,t.id,{status:t.status===`minimized`?`active`:`minimized`}),children:[(0,U.jsx)(V,{icon:t.status===`minimized`?Vo:Ko}),t.status===`minimized`?`Restore`:`Minimize`]}),(0,U.jsxs)(i,{onSelect:()=>void o(t.machine,t.id,{status:t.status===`pinned`?`active`:`pinned`}),children:[(0,U.jsx)(V,{icon:t.status===`pinned`?Qo:$o}),t.status===`pinned`?`Unpin`:`Pin`]}),(0,U.jsx)(a,{}),(0,U.jsxs)(i,{onSelect:e.onRename,children:[(0,U.jsx)(V,{icon:Zo}),`Rename`]}),(0,U.jsxs)(i,{variant:`destructive`,title:`Also removes it from ${y[t.provider]}`,onSelect:e=>{n?Hn(t.machine,t.id):(e.preventDefault(),r(!0))},children:[(0,U.jsx)(V,{icon:bo}),n?e.mobile?`Tap again to delete`:`Click again to delete`:`Delete`]})]})}function lD(e){return e.activity?.approval===!0&&e.activity?.question===!0?(0,U.jsx)(`span`,{title:`Waiting for approval and an answer`,className:`text-question flex`,children:(0,U.jsx)(V,{icon:ds,className:`size-4 shrink-0`})}):e.activity?.approval===!0?(0,U.jsx)(`span`,{title:`Waiting for approval`,className:`text-question flex`,children:(0,U.jsx)(V,{icon:cs,className:`size-4 shrink-0`})}):e.activity?.question===!0?(0,U.jsx)(`span`,{title:`Waiting for an answer`,className:`text-question flex`,children:(0,U.jsx)(V,{icon:eo,className:`size-4 shrink-0`})}):e.activity?.running===!0?(0,U.jsx)(`span`,{title:`Working`,className:`text-info flex`,children:(0,U.jsx)(V,{icon:mo,className:`size-4 shrink-0 animate-spin`})}):e.backgroundRunning?e.activity?.backgroundAgent===!0?(0,U.jsx)(`span`,{title:`Agent running in background`,className:`text-info flex`,children:(0,U.jsx)(V,{icon:sn,className:`size-4 shrink-0 animate-spin`})}):(0,U.jsx)(`span`,{title:`Task running in background`,className:`text-muted-foreground flex`,children:(0,U.jsx)(V,{icon:sn,className:`size-4 shrink-0 animate-spin`})}):e.done?(0,U.jsx)(`span`,{title:`Done`,className:`text-success flex`,children:(0,U.jsx)(V,{icon:lo,className:`size-4 shrink-0`})}):null}var uD=`group/sidebar-row relative w-full cursor-pointer overflow-hidden rounded-md text-left outline-none select-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset`;function dD(e){let t=e.session,n=ac(t.machine,t.projectId),r=L(e=>He(e,t.machine).icon),[i,a]=(0,H.useState)(null),[s,c]=(0,H.useState)(!1),l=(0,H.useRef)(null),u=e.activity?.waiting===!0,d=Object.values(e.activity?.tasks??{}).includes(`running`),f=!u&&(e.activity?.running===!0||d),p=e.activity?.running===!0||d,m=!u&&!f&&e.unseen,h=!e.selected&&!u&&!m;function g(){zt(t.machine,t.id,e.scope)}function _(){p?c(!0):g()}let v=(0,U.jsx)(rn,{open:s,onOpenChange:c,children:(0,U.jsxs)(wt,{children:[(0,U.jsxs)(Rn,{children:[(0,U.jsx)(ot,{children:`Stop running work?`}),(0,U.jsx)(Qe,{children:`The agent or background tasks are running. Do you really want to stop them?`})]}),(0,U.jsxs)(En,{children:[(0,U.jsx)(Ot,{children:`Cancel`}),(0,U.jsx)(Kt,{variant:`destructive`,onClick:g,children:`Stop and Make Inactive`})]})]})}),y=e.saved&&(0,U.jsxs)(ve,{children:[(0,U.jsx)(P,{asChild:!0,children:(0,U.jsx)(`button`,{className:`text-muted-foreground hover:text-foreground inline-flex h-5 cursor-pointer items-center rounded-md px-1.5`,title:`Thread actions`,onClick:e=>e.stopPropagation(),children:(0,U.jsx)(V,{icon:So,className:`size-3.5`})})}),(0,U.jsx)(N,{align:`end`,className:`w-44`,onClick:e=>e.stopPropagation(),onCloseAutoFocus:e=>{l.current!==null&&(e.preventDefault(),l.current.focus(),l.current.select())},children:(0,U.jsx)(cD,{session:t,mobile:!1,onDeactivate:_,onRename:()=>a(t.title)})})]}),b=i===null?(0,U.jsx)(`span`,{className:z(`min-w-0 flex-1 truncate text-sm`,h?`text-secondary-label font-normal`:`font-medium`,!h&&(e.unseen||u)&&`text-foreground`,!h&&!e.unseen&&!u&&`text-foreground/90`),children:t.title}):(0,U.jsx)(`form`,{className:`min-w-0 flex-1`,onSubmit:e=>{e.preventDefault();let n=i.trim();a(null),n!==``&&n!==t.title&&o(t.machine,t.id,{title:n})},children:(0,U.jsx)(`input`,{ref:l,value:i,onChange:e=>a(e.target.value),onClick:e=>e.stopPropagation(),onBlur:()=>a(null),onKeyDown:e=>{e.stopPropagation(),e.key===`Escape`&&a(null)},className:`text-foreground ring-ring/50 focus:ring-ring w-full rounded-sm bg-transparent text-sm font-medium ring-1 outline-none ring-inset`})}),x=z(e.selected&&`bg-sidebar-row-active text-sidebar-foreground`,h&&`text-sidebar-muted-foreground/75 hover:bg-sidebar-row-hover hover:text-sidebar-foreground`,!e.selected&&!h&&`text-sidebar-foreground hover:bg-sidebar-row-hover bg-transparent`);return e.slim?(0,U.jsxs)(`li`,{className:`list-none`,children:[(0,U.jsxs)(`div`,{role:`button`,tabIndex:0,className:z(uD,x,`flex h-9 items-center gap-2.5 px-2.5`),onClick:e.onSelect,onKeyDown:t=>{t.key===`Enter`&&e.onSelect()},children:[(0,U.jsx)(`span`,{className:`flex shrink-0 items-center opacity-40 grayscale transition-opacity group-hover/sidebar-row:opacity-100 group-hover/sidebar-row:grayscale-0`,children:(0,U.jsx)(dc,{machine:t.machine,projectId:t.projectId})}),b,(0,U.jsxs)(`span`,{className:`relative ml-auto flex h-6 min-w-8 shrink-0 items-center justify-end`,children:[(0,U.jsx)(`span`,{className:`text-secondary-label group-any-hover/sidebar-row:opacity-0 inline-flex justify-end text-xs tabular-nums transition-opacity`,children:_e(t.updatedAt)}),(0,U.jsx)(`span`,{className:`group-any-hover/sidebar-row:opacity-100 absolute inset-y-0 right-0 -mr-1 flex items-center opacity-0 transition-opacity has-[[data-state=open]]:opacity-100`,children:y})]})]}),v]}):(0,U.jsxs)(`li`,{className:`list-none py-0.5`,children:[(0,U.jsxs)(`div`,{role:`button`,tabIndex:0,className:z(uD,x,f&&!e.selected&&`opacity-70 transition-opacity focus-within:opacity-100 hover:opacity-100`),onClick:e.onSelect,onKeyDown:t=>{t.key===`Enter`&&e.onSelect()},children:[(0,U.jsxs)(`div`,{className:`px-(--sidebar-row-content-inset) py-(--sidebar-content-inset)`,children:[(0,U.jsxs)(`div`,{className:`flex h-6 min-w-0 items-center gap-2`,children:[(0,U.jsx)(dc,{machine:t.machine,projectId:t.projectId,className:`size-5`}),b,t.status===`pinned`&&(0,U.jsx)(V,{icon:$o,className:`text-muted-foreground/65 size-3 shrink-0`}),(0,U.jsx)(lD,{activity:e.activity,backgroundRunning:d,done:m})]}),(0,U.jsxs)(`div`,{className:`text-secondary-label mt-1 flex h-5 min-w-0 items-center gap-1.5 text-xs`,children:[(0,U.jsx)(Md,{icon:r,className:`size-3 shrink-0`}),(0,U.jsxs)(`span`,{className:z(`min-w-0 flex-1 truncate`,h?`font-normal`:`font-medium`),children:[n,t.branch!==null&&(0,U.jsx)(`span`,{className:`text-muted-foreground/40 font-normal`,children:` | ${t.branch}`})]}),t.status===`snoozed`&&(0,U.jsx)(V,{icon:Ua,className:`size-3 shrink-0`}),(0,U.jsx)(`span`,{className:`shrink-0 tabular-nums`,children:_e(t.updatedAt)})]})]}),e.saved&&(0,U.jsxs)(`div`,{className:z(`group-any-hover/sidebar-row:pointer-events-auto group-any-hover/sidebar-row:opacity-100 pointer-events-none absolute inset-y-0 right-0 flex w-20 flex-col items-end bg-linear-to-l from-50% to-transparent py-(--sidebar-content-inset) pr-1.5 opacity-0 transition-opacity has-[[data-state=open]]:pointer-events-auto has-[[data-state=open]]:opacity-100`,e.selected?`from-sidebar-row-active`:`from-sidebar-row-hover`),children:[(0,U.jsx)(`div`,{className:`flex h-6 items-center`,children:(0,U.jsx)(`button`,{className:`text-muted-foreground hover:text-foreground inline-flex h-5 cursor-pointer items-center rounded-md px-1.5`,title:`Make inactive`,"aria-label":`Make inactive`,onClick:e=>{e.stopPropagation(),_()},children:(0,U.jsx)(V,{icon:es,className:`size-3.5 scale-160`})})}),(0,U.jsx)(`div`,{className:`mt-1 flex h-5 items-center`,children:y})]})]}),v]})}function fD(e){let t=ac(e.machine,e.projectId),n=L(t=>He(t,e.machine).icon);return(0,U.jsx)(`li`,{className:`list-none py-0.5`,children:(0,U.jsx)(`div`,{role:`button`,tabIndex:0,className:z(uD,`bg-sidebar-row-active text-sidebar-foreground`),onClick:e.onSelect,children:(0,U.jsxs)(`div`,{className:`px-(--sidebar-row-content-inset) py-(--sidebar-content-inset)`,children:[(0,U.jsxs)(`div`,{className:`flex h-6 min-w-0 items-center gap-2`,children:[(0,U.jsx)(dc,{machine:e.machine,projectId:e.projectId,className:`size-5`}),(0,U.jsx)(`span`,{className:`text-foreground min-w-0 flex-1 truncate text-sm font-medium`,children:`New thread`}),(0,U.jsx)(V,{icon:fs,className:`text-warning-foreground size-4 shrink-0`})]}),(0,U.jsxs)(`div`,{className:`text-secondary-label mt-1 flex h-5 min-w-0 items-center gap-1.5 text-xs`,children:[(0,U.jsx)(Md,{icon:n,className:`size-3 shrink-0`}),(0,U.jsxs)(`span`,{className:`min-w-0 flex-1 truncate font-medium`,children:[t,(0,U.jsx)(`span`,{className:`text-muted-foreground/40 font-normal`,children:` | Draft`})]}),(0,U.jsx)(`span`,{className:`shrink-0 tabular-nums`,children:`now`})]})]})})})}function pD(e){return(0,U.jsxs)(ve,{children:[(0,U.jsx)(P,{asChild:!0,children:(0,U.jsx)(`button`,{className:e.className,title:`Menu`,"aria-label":`Menu`,children:(0,U.jsx)(V,{icon:Ho})})}),(0,U.jsxs)(N,{align:`start`,className:`w-48`,children:[(0,U.jsx)(l,{value:e.filter,children:[[`active`,ts],[`snoozed`,Ua],[`minimized`,Ko],[`inactive`,es]].map(([t,n])=>(0,U.jsxs)(Le,{value:t,className:`capitalize`,onSelect:()=>e.onFilter(t),children:[(0,U.jsx)(V,{icon:n}),t]},t))}),(0,U.jsx)(A,{}),(0,U.jsxs)(se,{onSelect:e.onTerminal,children:[(0,U.jsx)(V,{icon:ms}),`Terminal`]}),(0,U.jsxs)(se,{onSelect:()=>i(!0),children:[(0,U.jsx)(V,{icon:ss}),`Settings`]})]})]})}var mD=`relative w-full cursor-pointer overflow-hidden rounded-md text-left outline-none select-none touch-pan-y [-webkit-touch-callout:none] focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset`;function hD(e){let t=e.session,n=ac(t.machine,t.projectId),r=L(e=>He(e,t.machine).icon),[i,a]=(0,H.useState)(null),[s,c]=(0,H.useState)(!1),[l,u]=(0,H.useState)(0),d=(0,H.useRef)(null),f=(0,H.useRef)(null),p=(0,H.useRef)(!1),m=e.activity?.waiting===!0,h=Object.values(e.activity?.tasks??{}).includes(`running`),g=!m&&(e.activity?.running===!0||h),_=e.activity?.running===!0||h,v=!m&&!g&&e.unseen,y=!e.selected&&!m&&!v;function b(){zt(t.machine,t.id,e.scope)}function x(){_?c(!0):b()}function S(e){let n=f.current;f.current=null,u(0),n!==null&&n.swiping&&(p.current=!0,e.clientX-n.x>e.currentTarget.offsetWidth*.4&&(t.status===`inactive`?o(t.machine,t.id,{status:`active`}):x()))}let C={onClick:()=>{p.current?p.current=!1:e.onSelect()},onPointerDown:t=>{e.saved&&t.pointerType===`touch`&&(p.current=!1,f.current={x:t.clientX,y:t.clientY,swiping:!1})},onPointerMove:e=>{let t=f.current;if(t===null)return;let n=e.clientX-t.x,r=e.clientY-t.y;!t.swiping&&Math.abs(n)<10&&Math.abs(r)<10||(!t.swiping&&n<=Math.abs(r)?f.current=null:(t.swiping=!0,u(Math.max(0,n))))},onPointerUp:S,onPointerCancel:()=>{f.current=null,u(0)}},w=l>0&&(0,U.jsx)(`div`,{className:z(`absolute inset-x-0 flex items-center rounded-md px-4 text-white`,e.slim?`inset-y-0`:`inset-y-0.5`,t.status===`inactive`?`bg-success`:`bg-destructive`),children:(0,U.jsx)(V,{icon:t.status===`inactive`?ts:es,className:`size-6`})}),T=(0,U.jsx)(rn,{open:s,onOpenChange:c,children:(0,U.jsxs)(wt,{children:[(0,U.jsxs)(Rn,{children:[(0,U.jsx)(ot,{children:`Stop running work?`}),(0,U.jsx)(Qe,{children:`The agent or background tasks are running. Do you really want to stop them?`})]}),(0,U.jsxs)(En,{children:[(0,U.jsx)(Ot,{children:`Cancel`}),(0,U.jsx)(Kt,{variant:`destructive`,onClick:b,children:`Stop and Make Inactive`})]})]})}),E=(0,U.jsx)(Mt,{className:`w-44`,onCloseAutoFocus:e=>{d.current!==null&&(e.preventDefault(),d.current.focus(),d.current.select())},children:(0,U.jsx)(cD,{session:t,mobile:!0,onDeactivate:x,onRename:()=>a(t.title)})}),D=i===null?(0,U.jsx)(`span`,{className:z(`min-w-0 flex-1 truncate text-sm`,y?`text-secondary-label font-normal`:`font-medium`,!y&&(e.unseen||m)&&`text-foreground`,!y&&!e.unseen&&!m&&`text-foreground/90`),children:t.title}):(0,U.jsx)(`form`,{className:`min-w-0 flex-1`,onSubmit:e=>{e.preventDefault();let n=i.trim();a(null),n!==``&&n!==t.title&&o(t.machine,t.id,{title:n})},children:(0,U.jsx)(`input`,{ref:d,value:i,onChange:e=>a(e.target.value),onClick:e=>e.stopPropagation(),onBlur:()=>a(null),onKeyDown:e=>{e.stopPropagation(),e.key===`Escape`&&a(null)},className:`text-foreground ring-ring/50 focus:ring-ring w-full rounded-sm bg-transparent text-sm font-medium ring-1 outline-none ring-inset`})}),O=z(e.selected&&`bg-sidebar-row-active text-sidebar-foreground`,y&&`text-sidebar-muted-foreground/75`,!e.selected&&!y&&`text-sidebar-foreground bg-transparent`);return e.slim?(0,U.jsxs)(`li`,{className:`relative list-none`,children:[w,(0,U.jsxs)(dn,{children:[(0,U.jsx)(xt,{asChild:!0,disabled:!e.saved,children:(0,U.jsxs)(`div`,{role:`button`,tabIndex:0,className:z(mD,O,`flex h-9 items-center gap-2.5 px-2.5`,l>0&&`bg-sidebar`),style:l>0?{transform:`translateX(${l}px)`}:void 0,...C,onKeyDown:t=>{t.key===`Enter`&&e.onSelect()},children:[(0,U.jsx)(`span`,{className:`flex shrink-0 items-center opacity-40 grayscale`,children:(0,U.jsx)(dc,{machine:t.machine,projectId:t.projectId})}),D,(0,U.jsx)(`span`,{className:`text-secondary-label ml-auto shrink-0 text-xs tabular-nums`,children:_e(t.updatedAt)})]})}),E]}),T]}):(0,U.jsxs)(`li`,{className:`relative list-none py-0.5`,children:[w,(0,U.jsxs)(dn,{children:[(0,U.jsx)(xt,{asChild:!0,disabled:!e.saved,children:(0,U.jsx)(`div`,{role:`button`,tabIndex:0,className:z(mD,O,g&&!e.selected&&`opacity-70`,l>0&&`bg-sidebar`),style:l>0?{transform:`translateX(${l}px)`}:void 0,...C,onKeyDown:t=>{t.key===`Enter`&&e.onSelect()},children:(0,U.jsxs)(`div`,{className:`px-(--sidebar-row-content-inset) py-(--sidebar-content-inset)`,children:[(0,U.jsxs)(`div`,{className:`flex h-6 min-w-0 items-center gap-2`,children:[(0,U.jsx)(dc,{machine:t.machine,projectId:t.projectId,className:`size-5`}),D,t.status===`pinned`&&(0,U.jsx)(V,{icon:$o,className:`text-muted-foreground/65 size-3 shrink-0`}),(0,U.jsx)(lD,{activity:e.activity,backgroundRunning:h,done:v})]}),(0,U.jsxs)(`div`,{className:`text-secondary-label mt-1 flex h-5 min-w-0 items-center gap-1.5 text-xs`,children:[(0,U.jsx)(Md,{icon:r,className:`size-3 shrink-0`}),(0,U.jsxs)(`span`,{className:z(`min-w-0 flex-1 truncate`,y?`font-normal`:`font-medium`),children:[n,t.branch!==null&&(0,U.jsx)(`span`,{className:`text-muted-foreground/40 font-normal`,children:` | ${t.branch}`})]}),t.status===`snoozed`&&(0,U.jsx)(V,{icon:Ua,className:`size-3 shrink-0`}),(0,U.jsx)(`span`,{className:`shrink-0 tabular-nums`,children:_e(t.updatedAt)})]})]})})}),E]}),T]})}function gD(e){let t=ac(e.machine,e.projectId),n=L(t=>He(t,e.machine).icon);return(0,U.jsx)(`li`,{className:`list-none py-0.5`,children:(0,U.jsx)(`div`,{role:`button`,tabIndex:0,className:z(mD,`bg-sidebar-row-active text-sidebar-foreground`),onClick:e.onSelect,children:(0,U.jsxs)(`div`,{className:`px-(--sidebar-row-content-inset) py-(--sidebar-content-inset)`,children:[(0,U.jsxs)(`div`,{className:`flex h-6 min-w-0 items-center gap-2`,children:[(0,U.jsx)(dc,{machine:e.machine,projectId:e.projectId,className:`size-5`}),(0,U.jsx)(`span`,{className:`text-foreground min-w-0 flex-1 truncate text-sm font-medium`,children:`New thread`}),(0,U.jsx)(V,{icon:fs,className:`text-warning-foreground size-4 shrink-0`})]}),(0,U.jsxs)(`div`,{className:`text-secondary-label mt-1 flex h-5 min-w-0 items-center gap-1.5 text-xs`,children:[(0,U.jsx)(Md,{icon:n,className:`size-3 shrink-0`}),(0,U.jsxs)(`span`,{className:`min-w-0 flex-1 truncate font-medium`,children:[t,(0,U.jsx)(`span`,{className:`text-muted-foreground/40 font-normal`,children:` | Draft`})]}),(0,U.jsx)(`span`,{className:`shrink-0 tabular-nums`,children:`now`})]})]})})})}function _D({className:e,...t}){return(0,U.jsx)(_c,{"data-slot":`label`,className:z(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...t})}var vD={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t`,383:`s`,384:`b`,385:`B`,387:`b`,390:`O`,392:`c`,393:`D`,394:`D`,396:`d`,398:`E`,400:`E`,402:`f`,403:`G`,407:`I`,409:`k`,410:`l`,412:`M`,413:`N`,414:`n`,415:`O`,421:`p`,427:`t`,429:`t`,430:`T`,434:`V`,436:`y`,438:`z`,477:`e`,485:`g`,544:`N`,545:`d`,549:`z`,564:`l`,565:`n`,566:`t`,567:`j`,570:`A`,571:`C`,572:`c`,573:`L`,574:`T`,575:`s`,576:`z`,579:`B`,580:`U`,581:`V`,582:`E`,583:`e`,584:`J`,585:`j`,586:`Q`,587:`q`,588:`R`,589:`r`,590:`Y`,591:`y`,592:`a`,593:`a`,595:`b`,596:`o`,597:`c`,598:`d`,599:`d`,600:`e`,603:`e`,604:`e`,605:`e`,606:`e`,607:`j`,608:`g`,609:`g`,610:`G`,613:`h`,614:`h`,616:`i`,618:`I`,619:`l`,620:`l`,621:`l`,623:`m`,624:`m`,625:`m`,626:`n`,627:`n`,628:`N`,629:`o`,633:`r`,634:`r`,635:`r`,636:`r`,637:`r`,638:`r`,639:`r`,640:`R`,641:`R`,642:`s`,647:`t`,648:`t`,649:`u`,651:`v`,652:`v`,653:`w`,654:`y`,655:`Y`,656:`z`,657:`z`,663:`c`,665:`B`,666:`e`,667:`G`,668:`H`,669:`j`,670:`k`,671:`L`,672:`q`,686:`h`,867:`a`,868:`e`,869:`i`,870:`o`,871:`u`,872:`c`,873:`d`,874:`h`,875:`m`,876:`r`,877:`t`,878:`v`,879:`x`,7424:`A`,7427:`B`,7428:`C`,7429:`D`,7431:`E`,7432:`e`,7433:`i`,7434:`J`,7435:`K`,7436:`L`,7437:`M`,7438:`N`,7439:`O`,7440:`O`,7441:`o`,7442:`o`,7443:`o`,7446:`o`,7447:`o`,7448:`P`,7449:`R`,7450:`R`,7451:`T`,7452:`U`,7453:`u`,7454:`u`,7455:`m`,7456:`V`,7457:`W`,7458:`Z`,7522:`i`,7523:`r`,7524:`u`,7525:`v`,7834:`a`,7835:`s`,8305:`i`,8341:`h`,8342:`k`,8343:`l`,8344:`m`,8345:`n`,8346:`p`,8347:`s`,8348:`t`,8580:`c`};for(let e=`̀`.codePointAt(0);e<=`ͯ`.codePointAt(0);++e){let t=String.fromCodePoint(e);for(let e of`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`){let n=(e+t).normalize().codePointAt(0);n>126&&(vD[n]=e)}}var yD={a:[7844,7863],e:[7870,7879],o:[7888,7907],u:[7912,7921]};for(let e of Object.keys(yD)){let t=e.toUpperCase();for(let n=yD[e][0];n<=yD[e][1];++n)vD[n]=n%2==0?t:e}function bD(e){if(e<192||e>8580)return e;let t=vD[e];return t===void 0?e:t.codePointAt(0)}function xD(e){return e}function SD(e){return e}function CD(e,t){return e>t?e:t}var wD=e=>e.split(``).map(e=>e.codePointAt(0)),TD=new Set(` \f
|
|
25
|
+
\r \v\xA0 \u2028\u2029 `.split(``).map(e=>e.codePointAt(0)));for(let e=` `.codePointAt(0);e<=` `.codePointAt(0);e++)TD.add(e);var ED=``.codePointAt(0),DD=`A`.codePointAt(0),OD=`Z`.codePointAt(0),kD=`a`.codePointAt(0),AD=`z`.codePointAt(0),jD=`0`.codePointAt(0),MD=`9`.codePointAt(0);function ND(e,t,n){return n?e:t-e-1}var PD=16,FD=-3,ID=-1,LD=PD/2,RD=PD/2,zD=7,BD=4,VD=2;function HD(e){return e?new Set:null}function UD(e,t,n){if(t!==null&&t.i16.length>e+n){let r=t.i16.subarray(e,e+n);return[e+n,r]}return[e,new Int16Array(n)]}function WD(e,t,n){if(t!==null&&t.i32.length>e+n){let r=t.i32.subarray(e,e+n);return[e+n,r]}return[e,new Int32Array(n)]}function GD(e){return e>=kD&&e<=AD?1:e>=DD&&e<=OD?2:e>=jD&&e<=MD?4:0}function KD(e){let t=String.fromCodePoint(e);return t===t.toUpperCase()?t===t.toLowerCase()?t.match(/\p{Number}/gu)===null?t.match(/\p{Letter}/gu)===null?0:3:4:2:1}function qD(e){return e<=ED?GD(e):KD(e)}function JD(e,t){return e===0&&t!==0?LD:e===1&&t===2||e!==4&&t===4?zD:t===0?RD:0}function YD(e,t){return t===0?LD:JD(qD(e[t-1]),qD(e[t]))}function XD(e,t,n,r){let i=e.slice(r),a=i.indexOf(n);if(a===0)return r;if(!t&&n>=kD&&n<=AD){a>0&&(i=i.slice(0,a));let e=i.indexOf(n-32);e>=0&&(a=e)}return a<0?-1:r+a}function ZD(e){for(let t of e)if(t>=128)return!1;return!0}function QD(e,t,n){if(!ZD(e))return 0;if(!ZD(t))return-1;let r=0,i=0;for(let a=0;a<t.length;a++){if(i=XD(e,n,t[a],i),i<0)return-1;a===0&&i>0&&(r=i-1),i++}return r}var $D=(e,t,n,r,i,a,o)=>{let s=i.length;if(s===0)return[{start:0,end:0,score:0},HD(a)];let c=r.length;if(o!==null&&c*s>o.i16.length)return tO(e,t,n,r,i,a);let l=QD(r,i,e);if(l<0)return[{start:-1,end:-1,score:0},null];let u=0,d=0,f=null,p=null,m=null,h=null;[u,f]=UD(u,o,c),[u,p]=UD(u,o,c),[u,m]=UD(u,o,c),[d,h]=WD(d,o,s);let[,g]=WD(d,o,c);for(let e=0;e<g.length;e++)g[e]=r[e];let _=xD(0),v=0,y=0,b=0,x=i[0],S=i[0],C=xD(0),w=0,T=!1,E=g.subarray(l),D=f.subarray(l).subarray(0,E.length),O=p.subarray(l).subarray(0,E.length),k=m.subarray(l).subarray(0,E.length);for(let[r,a]of E.entries()){let o=null;a<=ED?(o=GD(a),!e&&o===2&&(a+=32)):(o=KD(a),!e&&o===2&&(a=String.fromCodePoint(a).toLowerCase().codePointAt(0)),t&&(a=bD(a))),E[r]=a;let c=JD(w,o);if(k[r]=c,w=o,a===S&&(y<s&&(h[y]=SD(l+r),y++,S=i[Math.min(y,s-1)]),b=l+r),a===x){let e=PD+c*VD;if(D[r]=e,O[r]=1,s===1&&(n&&e>_||!n&&e>=_)&&(_=e,v=l+r,n&&c===LD))break;T=!1}else D[r]=CD(T?C+ID:C+FD,0),O[r]=0,T=!0;C=D[r]}if(y!==s)return[{start:-1,end:-1,score:0},null];if(s===1){let e={start:v,end:v+1,score:_};if(!a)return[e,null];let t=new Set;return t.add(v),[e,t]}let A=h[0],j=b-A+1,M=null;[u,M]=UD(u,o,j*s);{let e=f.subarray(A,b+1);for(let[t,n]of e.entries())M[t]=n}let[,N]=UD(u,o,j*s);{let e=p.subarray(A,b+1);for(let[t,n]of e.entries())N[t]=n}let ee=h.subarray(1),te=i.slice(1).slice(0,ee.length);for(let[e,t]of ee.entries()){let r=!1,i=te[e],a=e+1,o=a*j,c=g.subarray(t,b+1),l=m.subarray(t).subarray(0,c.length),u=N.subarray(o+t-A).subarray(0,c.length),d=N.subarray(o+t-A-1-j).subarray(0,c.length),f=M.subarray(o+t-A).subarray(0,c.length),p=M.subarray(o+t-A-1-j).subarray(0,c.length),h=M.subarray(o+t-A-1).subarray(0,c.length);h[0]=0;for(let[e,o]of c.entries()){let c=e+t,g=0,y=0,b=0;if(y=r?h[e]+ID:h[e]+FD,i===o){g=p[e]+PD;let t=l[e];b=d[e]+1,t===LD?b=1:b>1&&(t=CD(t,CD(BD,m[c-b+1]))),g+t<y?(g+=l[e],b=0):g+=t}u[e]=b,r=g<y;let x=CD(CD(g,y),0);a===s-1&&(n&&x>_||!n&&x>=_)&&(_=x,v=c),f[e]=x}}let ne=HD(a),re=A;if(a&&ne!==null){let e=s-1;re=v;let t=!0;for(;;){let n=e*j,r=re-A,i=M[n+r],a=0,o=0;if(e>0&&re>=h[e]&&(a=M[n-j+r-1]),re>h[e]&&(o=M[n+r-1]),i>a&&(i>o||i===o&&t)){if(ne.add(re),e===0)break;e--}t=N[n+r]>1||n+j+r+1<N.length&&N[n+j+r+1]>0,re--}}return[{start:re,end:v+1,score:_},ne]};function eO(e,t,n,r,i,a,o){let s=0,c=0,l=!1,u=0,d=xD(0),f=HD(o),p=0;i>0&&(p=qD(n[i-1]));for(let m=i;m<a;m++){let i=n[m],a=qD(i);if(e||(i>=DD&&i<=OD?i+=32:i>ED&&(i=String.fromCodePoint(i).toLowerCase().codePointAt(0))),t&&(i=bD(i)),i===r[s]){o&&f!==null&&f.add(m),c+=PD;let e=JD(p,a);u===0?d=e:(e===LD&&(d=e),e=CD(CD(e,d),BD)),c+=s===0?e*VD:e,l=!1,u++,s++}else c+=l?ID:FD,l=!0,u=0,d=0;p=a}return[c,f]}var tO=(e,t,n,r,i,a,o)=>{if(i.length===0)return[{start:0,end:0,score:0},null];if(QD(r,i,e)<0)return[{start:-1,end:-1,score:0},null];let s=0,c=-1,l=-1,u=r.length,d=i.length;for(let a=0;a<u;a++){let o=r[ND(a,u,n)];e||(o>=DD&&o<=OD?o+=32:o>ED&&(o=String.fromCodePoint(o).toLowerCase().codePointAt(0))),t&&(o=bD(o));let f=i[ND(s,d,n)];if(o===f&&(c<0&&(c=a),s++,s===d)){l=a+1;break}}if(c>=0&&l>=0){s--;for(let t=l-1;t>=c;t--){let a=r[ND(t,u,n)];e||(a>=DD&&a<=OD?a+=32:a>ED&&(a=String.fromCodePoint(a).toLowerCase().codePointAt(0)));let o=i[ND(s,d,n)];if(a===o&&(s--,s<0)){c=t;break}}if(!n){let e=c;c=u-l,l=u-e}let[o,f]=eO(e,t,r,i,c,l,a);return[{start:c,end:l,score:o},f]}return[{start:-1,end:-1,score:0},null]},nO=(e,t,n,r,i,a,o)=>{if(i.length===0)return[{start:0,end:0,score:0},null];let s=r.length,c=i.length;if(s<c||QD(r,i,e)<0)return[{start:-1,end:-1,score:0},null];let l=0,u=-1,d=xD(0),f=xD(-1);for(let a=0;a<s;a++){let o=ND(a,s,n),p=r[o];e||(p>=DD&&p<=OD?p+=32:p>ED&&(p=String.fromCodePoint(p).toLowerCase().codePointAt(0))),t&&(p=bD(p));let m=ND(l,c,n);if(i[m]===p){if(m===0&&(d=YD(r,o)),l++,l===c){if(d>f&&(u=a,f=d),d===LD)break;a-=l-1,l=0,d=0}}else a-=l,l=0,d=0}if(u>=0){let a=0,o=0;n?(a=u-c+1,o=u+1):(a=s-(u+1),o=s-(u-c+1));let[l]=eO(e,t,r,i,a,o,!1);return[{start:a,end:o,score:l},null]}return[{start:-1,end:-1,score:0},null]},rO=102400,iO=2048;function aO(e,t){return{i16:new Int16Array(e),i32:new Int32Array(t)}}var oO=aO(rO,iO),sO=(e,t,n)=>{let r=!1;switch(t){case`smart-case`:e.toLowerCase()!==e&&(r=!0);break;case`case-sensitive`:r=!0;break;case`case-insensitive`:e=e.toLowerCase(),r=!1}let i=wD(e);return n&&(i=i.map(bD)),{queryRunes:i,caseSensitive:r}};function cO(e,t){let n=Object.keys(e).map(e=>parseInt(e,10)).sort((e,t)=>t-e),r=[];for(let i of n)if(r=r.concat(e[i]),r.length>=t)break;return r}function lO(e,t,n){return r=>{let i=this.runesList[r];if(t.length>i.length)return;let[a,o]=this.algoFn(n,this.opts.normalize,this.opts.forward,i,t,!0,oO);if(a.start===-1)return;if(this.opts.fuzzy===!1){o=new Set;for(let e=a.start;e<a.end;++e)o.add(e)}let s=this.opts.sort?a.score:0;e[s]===void 0&&(e[s]=[]),e[s].push({item:this.items[r],...a,positions:o??new Set})}}function uO(e){let{queryRunes:t,caseSensitive:n}=sO(e,this.opts.casing,this.opts.normalize),r={},i=lO.bind(this)(r,t,n);for(let e=0,t=this.runesList.length;e<t;++e)i(e);return cO(r,this.opts.limit)}var dO={limit:1/0,selector:e=>e,casing:`smart-case`,normalize:!0,fuzzy:`v2`,tiebreakers:[],sort:!0,forward:!0},fO=class{constructor(e,...t){switch(this.opts={...dO,...t[0]},this.items=e,this.runesList=e.map(e=>wD(this.opts.selector(e).normalize())),this.algoFn=nO,this.opts.fuzzy){case`v2`:this.algoFn=$D;break;case`v1`:this.algoFn=tO}}},pO={...dO,match:uO},mO=class extends fO{constructor(e,...t){super(e,...t),this.opts={...pO,...t[0]}}find(e){return e.length===0||this.items.length===0?this.items.slice(0,this.opts.limit).map(hO):(e=e.normalize(),gO(this.opts.match.bind(this)(e),this.opts))}};({...dO});var hO=e=>({item:e,start:-1,end:-1,score:0,positions:new Set});function gO(e,t){if(t.sort){let{selector:n}=t;e.sort((e,r)=>{if(e.score===r.score)for(let i of t.tiebreakers){let t=i(e,r,n);if(t!==0)return t}return 0})}return Number.isFinite(t.limit)&&e.splice(t.limit),e}function _O(e,t,n){return n(e.item).length-n(t.item).length}var vO=class{constructor(e,...t){this.finder=new mO(e,...t),this.find=this.finder.find.bind(this.finder)}};function yO(e){let[t,n]=(0,H.useState)(null),[r,i]=(0,H.useState)(``),[a,o]=(0,H.useState)(``),[s,c]=(0,H.useState)(null),l=a===``?``:`${a}/`,u=(t??[]).filter(e=>e.startsWith(l)).map(e=>e.slice(l.length)),d=[...new Set(u.filter(e=>e.includes(`/`)).map(e=>e.split(`/`)[0]))].sort((e,t)=>e.localeCompare(t)),f=r===``?u.filter(e=>!e.includes(`/`)).sort((e,t)=>e.localeCompare(t)).map(e=>`${l}${e}`):new vO(t??[],{limit:50,casing:`case-insensitive`,tiebreakers:[(e,t)=>bO(t)-bO(e),_O]}).find(r).map(e=>e.item);return(0,H.useEffect)(()=>{let t=!1;return(async()=>{try{let r=await R(e.machine,`projects.logoFiles`,{id:e.projectId});t||n(r)}catch(e){t||c(Xn(e))}})(),()=>{t=!0}},[e.machine,e.projectId]),(0,U.jsx)(Sr,{open:!0,onOpenChange:()=>e.onClose(),children:(0,U.jsxs)(hr,{className:`gap-0 overflow-hidden p-0 sm:max-w-lg`,showCloseButton:!1,"aria-describedby":void 0,children:[(0,U.jsx)(yr,{className:`sr-only`,children:`Pick icon`}),(0,U.jsxs)(`div`,{className:`flex items-center gap-1 border-b p-1`,children:[(0,U.jsxs)(`label`,{className:`flex h-7 min-w-0 flex-1 items-center gap-2.5 px-2`,children:[(0,U.jsx)(V,{icon:mn,className:`text-muted-foreground size-4 flex-none`}),(0,U.jsx)(`input`,{className:`placeholder:text-muted-foreground min-w-0 flex-1 bg-transparent text-sm outline-none`,placeholder:`Search images in this project`,value:r,onChange:e=>i(e.target.value)})]}),(0,U.jsx)(vr,{asChild:!0,children:(0,U.jsx)(B,{variant:`ghost`,size:`icon-sm`,"aria-label":`Close`,children:(0,U.jsx)(V,{icon:ao})})})]}),r===``&&(0,U.jsxs)(`div`,{className:`flex items-center gap-1 border-b p-1`,children:[(0,U.jsx)(B,{variant:`ghost`,size:`icon-sm`,"aria-label":`Parent folder`,disabled:a===``,onClick:()=>o(a.split(`/`).slice(0,-1).join(`/`)),children:(0,U.jsx)(V,{icon:tt})}),(0,U.jsxs)(`span`,{className:`truncate px-1.5 font-mono text-xs`,children:[`/`,a]})]}),(0,U.jsxs)(`div`,{className:`h-72 overflow-y-auto p-1`,children:[r===``&&d.map(e=>(0,U.jsxs)(`button`,{className:`hover:bg-muted flex h-9 w-full cursor-pointer items-center gap-2.5 rounded-md px-2.5 text-left text-sm transition-colors`,onClick:()=>o(`${l}${e}`),children:[(0,U.jsx)(V,{icon:Gt,className:`text-muted-foreground size-4 flex-none`}),(0,U.jsx)(`span`,{className:`truncate font-mono text-xs`,children:e})]},e)),f.map(t=>(0,U.jsxs)(`button`,{className:`hover:bg-muted flex h-9 w-full cursor-pointer items-center gap-2.5 rounded-md px-2.5 text-left text-sm transition-colors`,onClick:async()=>{try{let n=await R(e.machine,`files.read`,{projectId:e.projectId,path:t});n.kind===`image`?e.onPick(`data:${n.mediaType};base64,${n.data}`):n.kind===`large`?c(`${t} is too large`):c(`${t} is not an image`)}catch(e){c(Xn(e))}},children:[(0,U.jsx)(V,{icon:vn,className:`text-muted-foreground size-4 flex-none`}),(0,U.jsx)(`span`,{className:`truncate font-mono text-xs`,children:r===``?t.slice(l.length):t})]},t)),t?.length===0&&(0,U.jsx)(`p`,{className:`text-muted-foreground grid h-full place-items-center text-sm`,children:`No images in this project`}),t!==null&&t.length>0&&r!==``&&f.length===0&&(0,U.jsx)(`p`,{className:`text-muted-foreground grid h-full place-items-center text-sm`,children:`No matching images`})]}),s!==null&&(0,U.jsx)(`p`,{className:`text-destructive border-t px-3 py-2 text-sm break-all`,children:s})]})})}function bO(e){let t=e.item.lastIndexOf(`/`)+1;return[...e.positions].filter(e=>e>=t).length}function xO(e){let t=L(e=>e.machines),[n,r]=(0,H.useState)(null),[i,a]=(0,H.useState)(null),[o,s]=(0,H.useState)(()=>SO(t.find(t=>t.id===e.machine))),[c,l]=(0,H.useState)(``),[u,d]=(0,H.useState)(!1),f=o.trim()===``?void 0:n?.listing,p=f?.directories.filter(e=>e.name.toLowerCase().includes(c.toLowerCase()));function m(e){s(e),l(``)}return(0,H.useEffect)(()=>{if(o.trim()===``)return;let t=!1,n=setTimeout(async()=>{try{let n=await R(e.machine,`directories.list`,{path:o});if(t)return;r({path:o,listing:n}),a(null)}catch(e){if(t)return;r(null),a(Xn(e))}},150);return()=>{t=!0,clearTimeout(n)}},[e.machine,o]),(0,U.jsx)(Sr,{open:!0,onOpenChange:()=>e.onClose(),children:(0,U.jsxs)(hr,{className:`gap-0 overflow-hidden p-0 sm:max-w-lg`,showCloseButton:!1,"aria-describedby":void 0,children:[(0,U.jsx)(yr,{className:`sr-only`,children:`Add project`}),(0,U.jsxs)(`div`,{className:`flex items-center gap-1 border-b p-1`,children:[(0,U.jsx)(B,{variant:`ghost`,size:`icon-sm`,"aria-label":`Home folder`,onClick:()=>m(`~`),children:(0,U.jsx)(V,{icon:No})}),(0,U.jsx)(`div`,{className:`bg-border mx-0.5 h-4 w-px`}),(0,U.jsx)(B,{variant:`ghost`,size:`icon-sm`,"aria-label":`Parent folder`,disabled:f?.parent===void 0||f.parent===null,onClick:()=>{f?.parent!==void 0&&f.parent!==null&&m(f.parent)},children:(0,U.jsx)(V,{icon:tt})}),(0,U.jsx)(`input`,{"aria-label":`Folder path`,className:`hover:bg-muted focus:bg-muted h-7 min-w-0 flex-1 rounded-md bg-transparent px-1.5 font-mono text-xs outline-none`,spellCheck:!1,value:o,onChange:e=>m(e.target.value)}),(0,U.jsx)(vr,{asChild:!0,children:(0,U.jsx)(B,{variant:`ghost`,size:`icon-sm`,"aria-label":`Close`,children:(0,U.jsx)(V,{icon:ao})})})]}),(0,U.jsxs)(`label`,{className:`flex h-9 items-center gap-2.5 border-b px-3`,children:[(0,U.jsx)(V,{icon:mn,className:`text-muted-foreground size-4 flex-none`}),(0,U.jsx)(`input`,{className:`placeholder:text-muted-foreground min-w-0 flex-1 bg-transparent text-sm outline-none`,placeholder:`Search this folder`,value:c,onChange:e=>l(e.target.value)})]}),(0,U.jsxs)(`div`,{className:`h-72 overflow-y-auto p-1`,children:[p?.map(e=>(0,U.jsxs)(`button`,{className:`hover:bg-muted flex h-9 w-full cursor-pointer items-center gap-2.5 rounded-md px-2.5 text-left text-sm transition-colors`,onClick:()=>m(e.path),children:[(0,U.jsx)(V,{icon:Gt,className:`text-muted-foreground size-4 flex-none`}),(0,U.jsx)(`span`,{className:`truncate`,children:e.name})]},e.path)),p?.length===0&&(0,U.jsx)(`p`,{className:`text-muted-foreground grid h-full place-items-center text-sm`,children:c===``?`No folders here`:`No matching folders`})]}),i!==null&&o.trim()!==``&&(0,U.jsx)(`p`,{className:`text-destructive border-t px-3 py-2 text-sm break-all`,children:i}),(0,U.jsx)(Cr,{className:`border-t p-3`,children:(0,U.jsx)(B,{disabled:n?.path!==o||u,onClick:async()=>{if(n!==null&&n.path===o){d(!0);try{e.onAdd({...await oc(e.machine,n.listing.path),machine:e.machine})}catch(e){a(Xn(e)),d(!1)}}},children:`Add project`})})]})})}function SO(e){return e===void 0||e.config===null||e.system===null?`~`:e.config.workingDir[e.system.platform]??`~`}function CO(e){let t=e.project.path,[n,r]=(0,H.useState)(e.project.name),[i,a]=(0,H.useState)(e.project.logo),[o,s]=(0,H.useState)(null),[c,l]=(0,H.useState)(!1),[u,d]=(0,H.useState)(!1),[f,p]=(0,H.useState)(!1),m=(0,H.useRef)(null);return(0,U.jsx)(Sr,{open:!0,onOpenChange:()=>e.onClose(),children:(0,U.jsxs)(hr,{className:`gap-0 overflow-hidden p-0 sm:max-w-md`,children:[(0,U.jsxs)(`form`,{className:`grid`,onSubmit:async t=>{t.preventDefault(),l(!0);try{await sc(e.project.machine,e.project.id,{name:n,logo:i===e.project.logo?void 0:i}),e.onClose()}catch(e){s(Xn(e)),l(!1)}},children:[(0,U.jsxs)(gr,{className:`gap-1 px-6 pt-4 pr-12`,children:[(0,U.jsx)(yr,{className:`text-base`,children:`Edit project`}),(0,U.jsx)(br,{className:`truncate font-mono text-xs`,title:t,children:t})]}),(0,U.jsxs)(`div`,{className:`grid gap-6 p-6`,children:[(0,U.jsxs)(`div`,{className:`grid gap-2.5`,children:[(0,U.jsx)(_D,{children:`Icon`}),(0,U.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,U.jsxs)(`div`,{className:`relative flex-none`,children:[(0,U.jsx)(fc,{name:n.trim()===``?C(t):n,logo:i,className:`ring-foreground/10 size-16 rounded-2xl ring-1 [&>img]:rounded-2xl [&>svg]:rounded-2xl`}),i!==null&&(0,U.jsx)(`button`,{type:`button`,className:`bg-popover text-muted-foreground hover:text-foreground absolute -top-1.5 -right-1.5 grid size-5 cursor-pointer place-items-center rounded-full border shadow-xs`,title:`Remove icon`,onClick:()=>a(null),children:(0,U.jsx)(V,{icon:ao,className:`size-3`})})]}),(0,U.jsxs)(`div`,{className:`grid gap-2`,children:[(0,U.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,U.jsxs)(B,{type:`button`,variant:`outline`,size:`sm`,title:`Upload an image from this device`,onClick:()=>m.current?.click(),children:[(0,U.jsx)(V,{icon:_s}),`Upload`]}),(0,U.jsxs)(B,{type:`button`,variant:`outline`,size:`sm`,title:`Choose an image from the project on the server`,onClick:()=>p(!0),children:[(0,U.jsx)(V,{icon:Gt}),`Choose from project`]})]}),(0,U.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:`PNG, JPG, WebP, SVG or ICO. SVG and ICO up to 384 KB`})]})]}),(0,U.jsx)(`input`,{ref:m,type:`file`,accept:`image/png,image/jpeg,image/webp,image/svg+xml,image/x-icon`,hidden:!0,onChange:async e=>{let t=e.target.files?.[0];e.target.value=``,t!==void 0&&a(`data:${t.type};base64,${await Pd(t)}`)}})]}),(0,U.jsxs)(`div`,{className:`grid gap-2`,children:[(0,U.jsx)(_D,{htmlFor:`project-name`,children:`Name`}),(0,U.jsx)(up,{id:`project-name`,placeholder:C(t),value:n,onChange:e=>r(e.target.value)})]}),o!==null&&(0,U.jsx)(`p`,{className:`text-destructive text-sm break-all`,children:o})]}),(0,U.jsxs)(Cr,{className:`bg-muted/40 border-t px-6 py-4`,children:[(0,U.jsxs)(B,{type:`button`,variant:u?`destructive`:`ghost`,className:z(`sm:mr-auto`,!u&&`text-destructive hover:bg-destructive/10 hover:text-destructive`),title:`Its threads stay in their provider`,onClick:async()=>{if(!u)d(!0);else try{await cc(e.project.machine,e.project.id),e.onRemoved()}catch(e){s(Xn(e))}},children:[(0,U.jsx)(V,{icon:bo,className:`text-current`}),u?`Click again to remove`:`Remove project`]}),(0,U.jsx)(B,{type:`button`,variant:`outline`,onClick:e.onClose,children:`Cancel`}),(0,U.jsx)(B,{type:`submit`,disabled:n.trim()===``||c,children:`Save`})]})]}),f&&(0,U.jsx)(yO,{machine:e.project.machine,projectId:e.project.id,onClose:()=>p(!1),onPick:e=>{a(e),p(!1)}})]})})}var wO=`group/sidebar-row relative w-full cursor-pointer overflow-hidden rounded-md text-left outline-none select-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset`;function TO(e){let t=e.session,[n,r]=(0,H.useState)(null),[i,a]=(0,H.useState)(!1),s=(0,H.useRef)(null),c=e.activity?.waiting===!0,l=Object.values(e.activity?.tasks??{}).includes(`running`),u=!c&&(e.activity?.running===!0||l),d=e.activity?.running===!0||l,f=!c&&!u&&e.unseen,p=!e.selected&&!c&&!f;function m(){zt(t.machine,t.id,null)}function h(){d?a(!0):m()}let g=(0,U.jsx)(rn,{open:i,onOpenChange:a,children:(0,U.jsxs)(wt,{children:[(0,U.jsxs)(Rn,{children:[(0,U.jsx)(ot,{children:`Stop running work?`}),(0,U.jsx)(Qe,{children:`The agent or background tasks are running. Do you really want to stop them?`})]}),(0,U.jsxs)(En,{children:[(0,U.jsx)(Ot,{children:`Cancel`}),(0,U.jsx)(Kt,{variant:`destructive`,onClick:m,children:`Stop and Make Inactive`})]})]})}),_=e.saved&&(0,U.jsxs)(ve,{children:[(0,U.jsx)(P,{asChild:!0,children:(0,U.jsx)(`button`,{className:`text-muted-foreground hover:text-foreground inline-flex h-5 cursor-pointer items-center rounded-md px-1.5`,title:`Thread actions`,onClick:e=>e.stopPropagation(),children:(0,U.jsx)(V,{icon:So,className:`size-3.5`})})}),(0,U.jsx)(N,{align:`end`,className:`w-44`,onClick:e=>e.stopPropagation(),onCloseAutoFocus:e=>{s.current!==null&&(e.preventDefault(),s.current.focus(),s.current.select())},children:(0,U.jsx)(cD,{session:t,mobile:!1,onDeactivate:h,onRename:()=>r(t.title)})})]}),v=n===null?(0,U.jsx)(`span`,{className:z(`min-w-0 flex-1 truncate text-sm`,p?`text-secondary-label font-normal`:`font-medium`,!p&&(e.unseen||c)&&`text-foreground`,!p&&!e.unseen&&!c&&`text-foreground/90`),children:t.title}):(0,U.jsx)(`form`,{className:`min-w-0 flex-1`,onSubmit:e=>{e.preventDefault();let i=n.trim();r(null),i!==``&&i!==t.title&&o(t.machine,t.id,{title:i})},children:(0,U.jsx)(`input`,{ref:s,value:n,onChange:e=>r(e.target.value),onClick:e=>e.stopPropagation(),onBlur:()=>r(null),onKeyDown:e=>{e.stopPropagation(),e.key===`Escape`&&r(null)},className:`text-foreground ring-ring/50 focus:ring-ring w-full rounded-sm bg-transparent text-sm font-medium ring-1 outline-none ring-inset`})}),y=z(e.selected&&`bg-sidebar-row-active text-sidebar-foreground`,p&&`text-sidebar-muted-foreground/75 hover:bg-sidebar-row-hover hover:text-sidebar-foreground`,!e.selected&&!p&&`text-sidebar-foreground hover:bg-sidebar-row-hover bg-transparent`);return(0,U.jsxs)(`li`,{className:`list-none`,children:[(0,U.jsxs)(`div`,{role:`button`,tabIndex:0,className:z(wO,y,`flex h-9 items-center gap-2 px-2.5`,u&&!e.selected&&`opacity-70 transition-opacity focus-within:opacity-100 hover:opacity-100`),onClick:e.onSelect,onKeyDown:t=>{t.key===`Enter`&&e.onSelect()},children:[v,t.status===`pinned`&&(0,U.jsx)(V,{icon:$o,className:`text-muted-foreground/65 size-3 shrink-0`}),t.status===`snoozed`&&(0,U.jsx)(V,{icon:Ua,className:`text-secondary-label size-3 shrink-0`}),(0,U.jsx)(lD,{activity:e.activity,backgroundRunning:l,done:f}),(0,U.jsx)(`span`,{className:`text-secondary-label shrink-0 text-xs tabular-nums`,children:_e(t.updatedAt)}),e.saved&&(0,U.jsxs)(`div`,{className:z(`group-any-hover/sidebar-row:pointer-events-auto group-any-hover/sidebar-row:opacity-100 pointer-events-none absolute inset-y-0 right-0 flex items-center bg-linear-to-l from-60% to-transparent pr-1.5 pl-6 opacity-0 transition-opacity has-[[data-state=open]]:pointer-events-auto has-[[data-state=open]]:opacity-100`,e.selected?`from-sidebar-row-active`:`from-sidebar-row-hover`),children:[_,(0,U.jsx)(`button`,{className:`text-muted-foreground hover:text-foreground inline-flex h-5 cursor-pointer items-center rounded-md px-1.5`,title:`Make inactive`,"aria-label":`Make inactive`,onClick:e=>{e.stopPropagation(),h()},children:(0,U.jsx)(V,{icon:es,className:`size-3.5 scale-160`})})]})]}),g]})}function EO(e){return(0,U.jsx)(`li`,{className:`list-none`,children:(0,U.jsxs)(`div`,{role:`button`,tabIndex:0,className:z(wO,`bg-sidebar-row-active text-sidebar-foreground flex h-9 items-center gap-2 px-2.5`),onClick:e.onSelect,children:[(0,U.jsx)(`span`,{className:`text-foreground min-w-0 flex-1 truncate text-sm font-medium`,children:`New thread`}),(0,U.jsx)(V,{icon:fs,className:`text-warning-foreground size-4 shrink-0`})]})})}var DO=`relative w-full cursor-pointer overflow-hidden rounded-md text-left outline-none select-none touch-pan-y [-webkit-touch-callout:none] focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset`;function OO(e){let t=e.session,[n,r]=(0,H.useState)(null),[i,a]=(0,H.useState)(!1),[s,c]=(0,H.useState)(0),l=(0,H.useRef)(null),u=(0,H.useRef)(null),d=(0,H.useRef)(!1),f=e.activity?.waiting===!0,p=Object.values(e.activity?.tasks??{}).includes(`running`),m=!f&&(e.activity?.running===!0||p),h=e.activity?.running===!0||p,g=!f&&!m&&e.unseen,_=!e.selected&&!f&&!g;function v(){zt(t.machine,t.id,null)}function y(){h?a(!0):v()}function b(e){let n=u.current;u.current=null,c(0),n!==null&&n.swiping&&(d.current=!0,e.clientX-n.x>e.currentTarget.offsetWidth*.4&&(t.status===`inactive`?o(t.machine,t.id,{status:`active`}):y()))}let x={onClick:()=>{d.current?d.current=!1:e.onSelect()},onPointerDown:t=>{e.saved&&t.pointerType===`touch`&&(d.current=!1,u.current={x:t.clientX,y:t.clientY,swiping:!1})},onPointerMove:e=>{let t=u.current;if(t===null)return;let n=e.clientX-t.x,r=e.clientY-t.y;!t.swiping&&Math.abs(n)<10&&Math.abs(r)<10||(!t.swiping&&n<=Math.abs(r)?u.current=null:(t.swiping=!0,c(Math.max(0,n))))},onPointerUp:b,onPointerCancel:()=>{u.current=null,c(0)}},S=s>0&&(0,U.jsx)(`div`,{className:z(`absolute inset-0 flex items-center rounded-md px-4 text-white`,t.status===`inactive`?`bg-success`:`bg-destructive`),children:(0,U.jsx)(V,{icon:t.status===`inactive`?ts:es,className:`size-6`})}),C=(0,U.jsx)(rn,{open:i,onOpenChange:a,children:(0,U.jsxs)(wt,{children:[(0,U.jsxs)(Rn,{children:[(0,U.jsx)(ot,{children:`Stop running work?`}),(0,U.jsx)(Qe,{children:`The agent or background tasks are running. Do you really want to stop them?`})]}),(0,U.jsxs)(En,{children:[(0,U.jsx)(Ot,{children:`Cancel`}),(0,U.jsx)(Kt,{variant:`destructive`,onClick:v,children:`Stop and Make Inactive`})]})]})}),w=(0,U.jsx)(Mt,{className:`w-44`,onCloseAutoFocus:e=>{l.current!==null&&(e.preventDefault(),l.current.focus(),l.current.select())},children:(0,U.jsx)(cD,{session:t,mobile:!0,onDeactivate:y,onRename:()=>r(t.title)})}),T=n===null?(0,U.jsx)(`span`,{className:z(`min-w-0 flex-1 truncate text-sm`,_?`text-secondary-label font-normal`:`font-medium`,!_&&(e.unseen||f)&&`text-foreground`,!_&&!e.unseen&&!f&&`text-foreground/90`),children:t.title}):(0,U.jsx)(`form`,{className:`min-w-0 flex-1`,onSubmit:e=>{e.preventDefault();let i=n.trim();r(null),i!==``&&i!==t.title&&o(t.machine,t.id,{title:i})},children:(0,U.jsx)(`input`,{ref:l,value:n,onChange:e=>r(e.target.value),onClick:e=>e.stopPropagation(),onBlur:()=>r(null),onKeyDown:e=>{e.stopPropagation(),e.key===`Escape`&&r(null)},className:`text-foreground ring-ring/50 focus:ring-ring w-full rounded-sm bg-transparent text-sm font-medium ring-1 outline-none ring-inset`})}),E=z(e.selected&&`bg-sidebar-row-active text-sidebar-foreground`,_&&`text-sidebar-muted-foreground/75`,!e.selected&&!_&&`text-sidebar-foreground bg-transparent`);return(0,U.jsxs)(`li`,{className:`relative list-none`,children:[S,(0,U.jsxs)(dn,{children:[(0,U.jsx)(xt,{asChild:!0,disabled:!e.saved,children:(0,U.jsxs)(`div`,{role:`button`,tabIndex:0,className:z(DO,E,`flex h-9 items-center gap-2 px-2.5`,m&&!e.selected&&`opacity-70`,s>0&&`bg-sidebar`),style:s>0?{transform:`translateX(${s}px)`}:void 0,...x,onKeyDown:t=>{t.key===`Enter`&&e.onSelect()},children:[T,t.status===`pinned`&&(0,U.jsx)(V,{icon:$o,className:`text-muted-foreground/65 size-3 shrink-0`}),t.status===`snoozed`&&(0,U.jsx)(V,{icon:Ua,className:`text-secondary-label size-3 shrink-0`}),(0,U.jsx)(lD,{activity:e.activity,backgroundRunning:p,done:g}),(0,U.jsx)(`span`,{className:`text-secondary-label shrink-0 text-xs tabular-nums`,children:_e(t.updatedAt)})]})}),w]}),C]})}function kO(e){return(0,U.jsx)(`li`,{className:`list-none`,children:(0,U.jsxs)(`div`,{role:`button`,tabIndex:0,className:z(DO,`bg-sidebar-row-active text-sidebar-foreground flex h-9 items-center gap-2 px-2.5`),onClick:e.onSelect,children:[(0,U.jsx)(`span`,{className:`text-foreground min-w-0 flex-1 truncate text-sm font-medium`,children:`New thread`}),(0,U.jsx)(V,{icon:fs,className:`text-warning-foreground size-4 shrink-0`})]})})}function AO(e){let t=ac(e.machine,e.projectId),n=L(t=>He(t,e.machine).icon),r=L(e=>e.selection),i=L(e=>e.machines),a=L(e=>e.unseen),o=r!==null&&r.sessionId===null&&r.machine===e.machine&&r.projectId===e.projectId,s=e.mobile?kO:EO,c=e.mobile?OO:TO;function l(){ce({machine:e.machine,projectId:e.projectId,sessionId:null})}return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`li`,{className:`text-sidebar-muted-foreground/60 mx-0.5 mt-2 flex h-7 items-center gap-2 pl-2 text-xs font-medium first:mt-0`,children:[(0,U.jsx)(Md,{icon:n,className:`size-3.5 shrink-0`}),(0,U.jsx)(`span`,{className:`bg-sidebar-border/60 h-px min-w-2 flex-1`}),(0,U.jsx)(dc,{machine:e.machine,projectId:e.projectId,className:`size-3.5 shrink-0`}),(0,U.jsx)(`span`,{className:`min-w-0 truncate`,children:t}),(0,U.jsx)(`span`,{className:`bg-sidebar-border/60 h-px min-w-2 flex-1`}),(0,U.jsx)(`button`,{className:`text-sidebar-muted-foreground/80 hover:bg-sidebar-row-hover hover:text-sidebar-foreground flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-[var(--control-radius)]`,title:`New thread`,"aria-label":`New thread`,onClick:l,children:(0,U.jsx)(V,{icon:Va,className:`size-4 text-(--sidebar-icon-color)`})})]}),o&&(0,U.jsx)(s,{onSelect:l}),e.sessions.map(t=>(0,U.jsx)(c,{session:t,selected:r?.machine===t.machine&&r.sessionId===t.id,activity:Ee(i,t.machine,t.id),unseen:a.includes(kt(t.machine,t.id)),saved:t!==e.started,onSelect:()=>ce({machine:t.machine,projectId:t.projectId,sessionId:t.id})},kt(t.machine,t.id)))]})}function jO(e){let t=L(e=>e.machines),n=L(e=>e.projects),r=L(e=>e.sessions),i=L(e=>e.unseen),[a,o]=(0,H.useState)(!1),[s,c]=(0,H.useState)(null),u=(0,H.useRef)(!1),d=t.map(e=>({machine:e,projects:n.filter(t=>t.machine===e.id&&!t.hidden).sort((t,n)=>s!==null&&s.machine===e.id?s.ids.indexOf(t.id)-s.ids.indexOf(n.id):0),hidden:n.filter(t=>t.machine===e.id&&t.hidden)})).filter(e=>t.length>1||e.projects.length>0||e.hidden.length>0),f=r.filter(e=>{let n=Ee(t,e.machine,e.id);return n?.running===!0||n?.waiting===!0||Object.values(n?.tasks??{}).includes(`running`)||i.includes(kt(e.machine,e.id))});function p(e,t){return n.find(n=>n.machine===e&&n.id===t)}function m(t){return t.length>0&&(0,U.jsxs)(Fe,{children:[(0,U.jsx)(D,{className:`text-muted-foreground grid size-5 min-h-0 shrink-0 place-items-center rounded-sm p-0 [&>svg:last-child]:hidden`,title:`Archived projects`,"aria-label":`Archived projects`,children:(0,U.jsx)(V,{icon:Xa,className:`size-3.5`})}),(0,U.jsx)(Vn,{children:(0,U.jsx)(Be,{className:`max-h-(--radix-dropdown-menu-content-available-height) w-56 overflow-y-auto`,children:t.map(t=>(0,U.jsxs)(se,{title:t.path,onSelect:()=>{sc(t.machine,t.id,{hidden:!1}).catch(Ze),e.onScope({machine:t.machine,projectId:t.id})},children:[(0,U.jsx)(dc,{machine:t.machine,projectId:t.id,className:`size-5 shrink-0 [&>img]:rounded-[4px] [&>svg]:rounded-[4px]`}),(0,U.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:t.name})]},t.id))})})]})}function h(e){return e.status===`online`?e.name:e.status===`unpaired`?`${e.name} · needs pairing`:`${e.name} · offline`}return(0,U.jsxs)(ve,{open:a,onOpenChange:o,children:[(0,U.jsx)(P,{asChild:!0,children:(0,U.jsxs)(`button`,{className:`hover:bg-sidebar-row-hover data-[state=open]:bg-sidebar-row-hover -ml-1.5 flex h-7 min-w-0 cursor-pointer items-center gap-1.5 rounded-[var(--control-radius)] px-1.5 text-sm font-medium`,title:e.scope===null?`Inbox`:p(e.scope.machine,e.scope.projectId)?.path,children:[e.scope===null?(0,U.jsx)(V,{icon:Po,className:`size-4 shrink-0 text-(--sidebar-icon-color)`}):(0,U.jsx)(dc,{machine:e.scope.machine,projectId:e.scope.projectId,className:`size-4 shrink-0 [&>img]:rounded-[4px] [&>svg]:rounded-[4px]`}),(0,U.jsx)(`span`,{className:`truncate`,children:e.scope===null?`Inbox`:p(e.scope.machine,e.scope.projectId)?.name}),(0,U.jsx)(V,{icon:uo,className:`text-sidebar-muted-foreground size-3.5 shrink-0`})]})}),(0,U.jsxs)(N,{className:`w-64`,children:[(0,U.jsxs)(l,{value:e.scope===null?``:kt(e.scope.machine,e.scope.projectId),children:[(0,U.jsxs)(Le,{value:``,className:`pr-9 pl-8 *:data-[slot=dropdown-menu-radio-item-indicator]:right-auto *:data-[slot=dropdown-menu-radio-item-indicator]:left-2`,onSelect:()=>e.onScope(null),children:[(0,U.jsx)(V,{icon:Po}),(0,U.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:`Inbox`}),f.length>0&&(0,U.jsx)(`span`,{className:`text-foreground grid h-4 min-w-4 place-items-center rounded-full bg-[color-mix(in_srgb,var(--foreground)_22%,var(--background))] px-1 text-[10px] leading-none font-medium tabular-nums`,children:f.length})]}),d.length>0&&(0,U.jsx)(A,{}),d.map(({machine:n,projects:r,hidden:i},a)=>(0,U.jsxs)(H.Fragment,{children:[a>0&&(0,U.jsx)(A,{}),t.length>1&&(0,U.jsxs)(`div`,{className:`flex items-center`,children:[(0,U.jsxs)(we,{className:`flex min-w-0 flex-1 items-center gap-2 pl-[0.52rem]!`,children:[(0,U.jsx)(Md,{icon:n.icon,className:`size-3.5 shrink-0`}),(0,U.jsx)(`span`,{className:`truncate`,children:h(n)})]}),(0,U.jsxs)(`div`,{className:`flex shrink-0 items-center gap-0.5 pr-1`,children:[m(i),(0,U.jsx)(se,{className:`text-muted-foreground grid size-5 min-h-0 shrink-0 place-items-center rounded-sm p-0`,title:`Add project to ${n.name}`,"aria-label":`Add project to ${n.name}`,disabled:n.status!==`online`,onSelect:()=>e.onAddProject(n.id),children:(0,U.jsx)(V,{icon:Va,className:`size-3.5`})})]})]}),(0,U.jsx)(gE,{as:`div`,axis:`y`,values:r.map(e=>e.id),onReorder:e=>c({machine:n.id,ids:e}),children:r.map(t=>{let n=f.filter(e=>e.machine===t.machine&&e.projectId===t.id).length;return(0,U.jsx)(hE,{as:`div`,value:t.id,className:`relative`,onDragStart:()=>{u.current=!0},onDragEnd:async()=>{if(s!==null){try{await lc(s.machine,[...s.ids,...i.map(e=>e.id)])}catch(e){Ze(e)}c(null)}},children:(0,U.jsxs)(Le,{value:kt(t.machine,t.id),title:t.path,className:`group/project pr-1 pl-8 *:data-[slot=dropdown-menu-radio-item-indicator]:right-auto *:data-[slot=dropdown-menu-radio-item-indicator]:left-2`,onPointerDown:()=>{u.current=!1},onSelect:n=>{u.current?n.preventDefault():e.onScope({machine:t.machine,projectId:t.id})},onContextMenu:n=>{n.preventDefault(),o(!1),e.onEdit(t)},children:[(0,U.jsx)(dc,{machine:t.machine,projectId:t.id,className:`size-5 shrink-0 [&>img]:rounded-[4px] [&>svg]:rounded-[4px]`}),(0,U.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:t.name}),n>0&&(0,U.jsx)(`span`,{className:`text-foreground grid h-4 min-w-4 place-items-center rounded-full bg-[color-mix(in_srgb,var(--foreground)_22%,var(--background))] px-1 text-[10px] leading-none font-medium tabular-nums`,children:n}),(0,U.jsxs)(`div`,{className:`-my-0.5 flex shrink-0 items-center gap-0.5 opacity-0 transition-opacity group-data-highlighted/project:opacity-100 pointer-coarse:opacity-100`,children:[(0,U.jsx)(`button`,{className:`text-muted-foreground hover:text-foreground hover:bg-foreground/10 grid size-5 cursor-pointer place-items-center rounded-sm [&_svg]:size-3.5`,title:`Archive project`,"aria-label":`Archive ${t.name}`,onClick:e=>{e.stopPropagation(),sc(t.machine,t.id,{hidden:!0}).catch(Ze)},children:(0,U.jsx)(V,{icon:Co})}),(0,U.jsx)(`button`,{className:`text-muted-foreground hover:text-foreground hover:bg-foreground/10 grid size-5 cursor-pointer place-items-center rounded-sm [&_svg]:size-3.5`,title:`Configure project`,"aria-label":`Configure ${t.name}`,onClick:n=>{n.stopPropagation(),o(!1),e.onEdit(t)},children:(0,U.jsx)(V,{icon:ss})})]})]})},kt(t.machine,t.id))})})]},n.id))]}),t.length===1&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(A,{}),(0,U.jsxs)(`div`,{className:`flex items-center`,children:[(0,U.jsxs)(se,{className:`flex-1 pl-8`,onSelect:()=>e.onAddProject(t[0].id),children:[(0,U.jsx)(V,{icon:Va}),`Add project…`]}),(0,U.jsx)(`div`,{className:`flex shrink-0 items-center pr-1`,children:m(n.filter(e=>e.hidden))})]})]})]})]})}function MO(e){let t=L(e=>e.errors),n=L(e=>e.machines),r=L(e=>e.sessions),i=L(e=>e.unseen),a=n.filter(e=>e.status===`offline`||e.status===`unpaired`),o=r.filter(e=>Object.values(Ee(n,e.machine,e.id)?.tasks??{}).includes(`failed`)),s=r.filter(e=>Ee(n,e.machine,e.id)?.waiting===!0),c=r.filter(e=>{let t=Ee(n,e.machine,e.id);return i.includes(kt(e.machine,e.id))&&t?.waiting!==!0&&t?.running!==!0&&!Object.values(t?.tasks??{}).includes(`running`)}),l=t.length+a.length+o.length,u=!e.hideDone&&c.length>0;if(l===0&&s.length===0&&!u)return null;let d=c.map(e=>(0,U.jsx)(FO,{session:e,icon:po,className:`text-success`,detail:`Done`},kt(e.machine,e.id))),f=s.map(e=>(0,U.jsx)(FO,{session:e,icon:ds,className:`text-question`,detail:`Waiting for approval`},kt(e.machine,e.id))),p=e.collapsed===!0&&u&&s.length>0&&l>0;return(0,U.jsxs)(`div`,{className:z(`flex shrink-0 items-center gap-1`,e.className),children:[p&&(0,U.jsxs)(NO,{className:`bg-question/15 text-question`,icon:ds,count:s.length+c.length,label:`${s.length} waiting for approval, ${c.length} done`,children:[f,d]}),!p&&u&&(0,U.jsx)(NO,{className:`bg-success/15 text-success`,icon:po,count:c.length,label:`${c.length} done`,children:d}),!p&&s.length>0&&(0,U.jsx)(NO,{className:`bg-question/15 text-question`,icon:ds,count:s.length,label:`${s.length} waiting for approval`,children:f}),l>0&&(0,U.jsxs)(NO,{className:z(t.length>0&&`bg-error/15 text-error`,t.length===0&&`bg-warning/15 text-warning-foreground`),icon:t.length>0?Ae:Wa,count:l,label:l===1?`1 problem`:`${l} problems`,onClose:ze,children:[t.map((e,t)=>(0,U.jsx)(PO,{icon:Ae,className:`text-error`,children:(0,U.jsx)(`span`,{className:`text-error-foreground whitespace-pre-wrap`,children:e})},t)),a.map(e=>(0,U.jsxs)(PO,{icon:Wa,className:`text-warning-foreground`,children:[e.status===`offline`&&`${e.name} is offline`,e.status===`unpaired`&&`${e.name} needs pairing`]},e.id)),o.map(e=>(0,U.jsx)(FO,{session:e,icon:Wa,className:`text-warning-foreground`,detail:`Background task failed`},kt(e.machine,e.id)))]})]})}function NO(e){return(0,U.jsxs)(b,{onOpenChange:t=>!t&&e.onClose?.(),children:[(0,U.jsx)(me,{asChild:!0,children:(0,U.jsxs)(`button`,{className:z(`flex h-5 shrink-0 cursor-pointer items-center gap-0.75 rounded-[6px] px-1.25 text-[11px] font-medium tabular-nums`,e.className),title:e.label,"aria-label":e.label,children:[(0,U.jsx)(V,{icon:e.icon,className:`size-3 shrink-0`}),e.count]})}),(0,U.jsx)(g,{align:`end`,collisionPadding:12,className:`flex max-h-80 w-[min(20rem,calc(100vw-2rem))] flex-col gap-px overflow-y-auto p-1 text-sm`,children:e.children})]})}function PO(e){return(0,U.jsxs)(`div`,{className:`flex items-start gap-2 px-2 py-1.5`,children:[(0,U.jsx)(V,{icon:e.icon,className:z(`mt-0.5 size-4 shrink-0`,e.className)}),(0,U.jsx)(`div`,{className:`min-w-0 flex-1`,children:e.children})]})}function FO(e){return(0,U.jsx)(cn,{asChild:!0,children:(0,U.jsx)(`button`,{className:`hover:bg-accent cursor-pointer rounded-md text-left`,onClick:()=>ce({machine:e.session.machine,projectId:e.session.projectId,sessionId:e.session.id}),children:(0,U.jsxs)(PO,{icon:e.icon,className:e.className,children:[(0,U.jsx)(`div`,{className:`text-foreground truncate`,children:e.session.title}),(0,U.jsx)(`div`,{className:`text-muted-foreground text-xs`,children:e.detail})]})})})}var IO=`text-sidebar-muted-foreground/80 hover:bg-sidebar-row-hover hover:text-sidebar-foreground flex shrink-0 cursor-pointer items-center justify-center rounded-[var(--control-radius)] [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-(--sidebar-icon-color) hover:[&>svg]:text-sidebar-foreground`;function LO(e){let t=L(e=>e.selection),n=L(e=>e.machines),r=L(e=>e.sessions),a=L(e=>e.projects),o=L(e=>e.settings.provider),s=L(e=>e.unseen),c=L(e=>e.loaded),l=L(e=>e.inactive),u=L(e=>e.inactiveVersion),d=L(e=>e.prefs.groupActiveByProject),[f,p]=tc(`sidebarScope`,null),[m,h]=(0,H.useState)(null),[g,_]=(0,H.useState)(null),[v,y]=(0,H.useState)(!1),[b,x]=(0,H.useState)(!1),[S,C]=(0,H.useState)(!1),[w,T]=(0,H.useState)(`active`),[E,D]=tc(`sidebarWidth`,240),O=n.reduce((e,t)=>e+t.terminals.length,0),k=r.filter(e=>f===null||e.machine===f.machine&&e.projectId===f.projectId).sort((e,t)=>t.updatedAt-e.updatedAt),A=k.filter(e=>{let t=Ee(n,e.machine,e.id);return e.status===`snoozed`&&t?.waiting!==!0&&(t?.running===!0||Object.values(t?.tasks??{}).includes(`running`))}),j=[...k.filter(e=>e.status===`pinned`),...k.filter(e=>e.status===`active`||e.status===`snoozed`&&!A.includes(e))],M=k.filter(e=>e.status===`minimized`),N={snoozed:A,minimized:M,inactive:l},ee=e.mobile?w===`inactive`:S,te=f?.machine??null,ne=f?.projectId??null,re=t!==null&&t.sessionId!==null&&c&&!r.some(e=>e.machine===t.machine&&e.id===t.sessionId)?{machine:t.machine,id:t.sessionId,provider:o,title:`New thread`,projectId:t.projectId,branch:null,updatedAt:Date.now(),status:`active`}:null,ie=t!==null&&t.sessionId===null?t:null,P=re===null?j:[re,...j],ae=d&&f===null,oe=[...new Map([...ie===null?[]:[ie],...P].map(e=>[kt(e.machine,e.projectId),e]))],se=e.mobile?gD:fD;(0,H.useEffect)(()=>{if(!ee)return;let e=!0,t=te===null?I().machines.filter(e=>e.status===`online`).map(e=>e.id):[te];return Promise.all(t.map(async e=>(await R(e,`sessions.inactive`,{projectId:ne})).map(t=>({...t,machine:e})))).then(t=>{e&&Xt({inactive:t.flat()})}).catch(Ze),()=>{e=!1}},[ee,te,ne,u]);function le(e,t,n){ce({machine:e,projectId:t,sessionId:n})}function ue(){let e=f??t??de();e===null?n.length>0?h(n[0].id):vt(`Machines`):le(e.machine,e.projectId,null)}function de(){let e=localStorage.getItem(`lastProject`),t=e===null?null:JSON.parse(e),n=(t===null?void 0:a.find(e=>e.machine===t.machine&&e.id===t.projectId))??a.at(0);return n===void 0?null:{machine:n.machine,projectId:n.id}}function fe(){let e=F();if(e===null)throw Error(`there is no machine to open a terminal on`);Te(e)}Ys([`mod+n`,`mod+t`],ue,{enableOnFormTags:!0,preventDefault:!0});function pe(e){let t=e.clientX-E;Jn(e,e=>{let n=Math.min(480,Math.max(200,e.clientX-t));D(n)})}function me(r,i){let a=e.mobile?hD:dD;return(0,U.jsx)(a,{session:r,slim:i,selected:t?.machine===r.machine&&t.sessionId===r.id,activity:Ee(n,r.machine,r.id),unseen:s.includes(kt(r.machine,r.id)),saved:r!==re,scope:f,onSelect:()=>le(r.machine,r.projectId,r.id)},kt(r.machine,r.id))}function he(e,t,n,r,i){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`li`,{className:z(`mx-0.5 h-9 pt-2`,i&&`mt-auto`),children:(0,U.jsxs)(`button`,{"aria-expanded":n,className:`text-sidebar-muted-foreground/60 flex h-9 w-full cursor-pointer items-center gap-2 rounded-md px-2 text-left text-xs font-medium`,onClick:r,children:[(0,U.jsx)(`span`,{className:`shrink-0`,children:e}),(0,U.jsx)(`span`,{className:`bg-sidebar-border/60 h-px min-w-2 flex-1`}),(0,U.jsx)(V,{icon:uo,className:z(`size-3 shrink-0 transition-transform`,!n&&`rotate-180`)})]})}),n&&t.map(e=>me(e,e.status===`inactive`))]})}return(0,U.jsxs)(`aside`,{className:z(`bg-sidebar text-sidebar-foreground border-sidebar-border flex flex-none border-r select-none`,e.className),children:[(0,U.jsxs)(`div`,{className:z(`relative flex min-w-0 flex-col`,e.mobile&&`flex-1`),style:e.mobile?void 0:{width:E},children:[(0,U.jsxs)(`div`,{className:`flex h-(--workspace-topbar-height) shrink-0 items-center gap-2 px-3`,children:[e.mobile?(0,U.jsx)(pD,{className:z(IO,`size-7`),filter:w,onFilter:T,onTerminal:fe}):(0,U.jsx)(`button`,{className:z(IO,`size-7`),title:`Hide sidebar (${Yn}+B)`,"aria-label":`Hide sidebar`,onClick:e.onHide,children:(0,U.jsx)(V,{icon:Yo})}),(0,U.jsx)(jO,{scope:f,onScope:p,onEdit:_,onAddProject:h}),e.mobile&&(0,U.jsx)(MO,{hideDone:!0}),(0,U.jsx)(`button`,{className:z(IO,`ml-auto size-7`),title:`Search (${Yn}+K)`,"aria-label":`Search`,onClick:()=>Ce(!0),children:(0,U.jsx)(V,{icon:mn})}),(0,U.jsx)(`button`,{className:z(IO,`size-7`),title:`New thread (${Yn}+N)`,onClick:ue,children:(0,U.jsx)(V,{icon:fs})})]}),(0,U.jsx)(`nav`,{className:`flex min-h-0 flex-1 [scrollbar-width:none] flex-col overflow-y-auto px-(--sidebar-content-inset) pb-(--sidebar-content-inset)`,children:(0,U.jsxs)(`ul`,{className:`flex flex-1 flex-col gap-px`,children:[e.mobile&&w!==`active`&&(0,U.jsxs)(U.Fragment,{children:[N[w].map(e=>me(e,w===`inactive`)),N[w].length===0&&(0,U.jsxs)(`li`,{className:`text-sidebar-muted-foreground/60 px-2.5 py-6 text-center text-xs`,children:[`No `,w,` threads`]})]}),(!e.mobile||w===`active`)&&(0,U.jsxs)(U.Fragment,{children:[ae?oe.map(([t,n])=>(0,U.jsx)(AO,{machine:n.machine,projectId:n.projectId,sessions:P.filter(e=>kt(e.machine,e.projectId)===t),started:re,mobile:e.mobile},t)):(0,U.jsxs)(U.Fragment,{children:[ie!==null&&(0,U.jsx)(se,{machine:ie.machine,projectId:ie.projectId,onSelect:()=>le(ie.machine,ie.projectId,null)}),P.map(e=>me(e,!1))]}),j.length===0&&re===null&&t?.sessionId!==null&&(0,U.jsx)(`li`,{className:`text-sidebar-muted-foreground/60 px-2.5 py-6 text-center text-xs`,children:`No threads yet`})]}),!e.mobile&&(0,U.jsxs)(U.Fragment,{children:[A.length>0&&he(v?`Snoozed`:`Snoozed (${A.length})`,A,v,()=>y(!v),!0),M.length>0&&he(b?`Minimized`:`Minimized (${M.length})`,M,b,()=>x(!b),A.length===0),he(`Inactive`,l,S,()=>C(!S),A.length===0&&M.length===0)]})]})}),!e.mobile&&(0,U.jsxs)(`div`,{className:`border-sidebar-border @container flex shrink-0 flex-col gap-px border-t p-(--sidebar-content-inset)`,children:[n.length>0&&(0,U.jsxs)(`button`,{className:z(IO,`h-8 justify-start gap-2 px-2.5 text-sm`),title:`Terminal`,onClick:fe,children:[(0,U.jsx)(V,{icon:ms}),`Terminal`,O>0&&(0,U.jsx)(`span`,{className:`text-foreground ml-auto grid h-4 min-w-4 place-items-center rounded-full bg-[color-mix(in_srgb,var(--foreground)_22%,var(--background))] px-1 text-[10px] leading-none font-medium tabular-nums`,children:O})]}),(0,U.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,U.jsxs)(`button`,{className:z(IO,`h-8 min-w-0 flex-1 justify-start gap-2 px-2.5 text-sm`),title:`Settings`,onClick:()=>i(!0),children:[(0,U.jsx)(V,{icon:ss}),(0,U.jsx)(`span`,{className:`truncate`,children:`Settings`})]}),(0,U.jsx)(MO,{className:`@max-[13rem]:hidden`,hideDone:!1}),(0,U.jsx)(MO,{className:`hidden @max-[13rem]:flex`,hideDone:!1,collapsed:!0})]})]}),!e.mobile&&(0,U.jsx)(`div`,{role:`separator`,"aria-orientation":`vertical`,className:`group absolute inset-y-0 -right-1 z-20 w-2 cursor-col-resize select-none`,onPointerDown:pe,children:(0,U.jsx)(`span`,{className:`group-hover:bg-border group-active:bg-primary/60 pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 transition-colors`})})]}),m!==null&&(0,U.jsx)(xO,{machine:m,onClose:()=>h(null),onAdd:e=>{h(null),le(e.machine,e.id,null)}}),g!==null&&(0,U.jsx)(CO,{project:g,onClose:()=>_(null),onRemoved:()=>{f?.machine===g.machine&&f.projectId===g.id&&p(null),_(null)}})]})}var RO=`/assets/ghostty-vt-CQAu1Gs5.wasm`,zO=Uint8Array,BO=Uint16Array,VO=Int32Array,HO=new zO([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),UO=new zO([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),WO=new zO([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),GO=function(e,t){for(var n=new BO(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];for(var i=new VO(n[30]),r=1;r<30;++r)for(var a=n[r];a<n[r+1];++a)i[a]=a-n[r]<<5|r;return{b:n,r:i}},KO=GO(HO,2),qO=KO.b,JO=KO.r;qO[28]=258,JO[258]=28;var YO=GO(UO,0),XO=YO.b;YO.r;for(var ZO=new BO(32768),QO=0;QO<32768;++QO){var $O=(QO&43690)>>1|(QO&21845)<<1;$O=($O&52428)>>2|($O&13107)<<2,$O=($O&61680)>>4|($O&3855)<<4,ZO[QO]=(($O&65280)>>8|($O&255)<<8)>>1}for(var ek=(function(e,t,n){for(var r=e.length,i=0,a=new BO(t);i<r;++i)e[i]&&++a[e[i]-1];var o=new BO(t);for(i=1;i<t;++i)o[i]=o[i-1]+a[i-1]<<1;var s;if(n){s=new BO(1<<t);var c=15-t;for(i=0;i<r;++i)if(e[i])for(var l=i<<4|e[i],u=t-e[i],d=o[e[i]-1]++<<u,f=d|(1<<u)-1;d<=f;++d)s[ZO[d]>>c]=l}else for(s=new BO(r),i=0;i<r;++i)e[i]&&(s[i]=ZO[o[e[i]-1]++]>>15-e[i]);return s}),tk=new zO(288),QO=0;QO<144;++QO)tk[QO]=8;for(var QO=144;QO<256;++QO)tk[QO]=9;for(var QO=256;QO<280;++QO)tk[QO]=7;for(var QO=280;QO<288;++QO)tk[QO]=8;for(var nk=new zO(32),QO=0;QO<32;++QO)nk[QO]=5;var rk=ek(tk,9,1),ik=ek(nk,5,1),ak=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},ok=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(t&7)&n},sk=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(t&7)},ck=function(e){return(e+7)/8|0},lk=function(e,t,n){return(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length),new zO(e.subarray(t,n))},uk=[`unexpected EOF`,`invalid block type`,`invalid length/literal`,`invalid distance`,`stream finished`,`no stream handler`,,`no callback`,`invalid UTF-8 data`,`extra field too long`,`date not in range 1980-2099`,`filename too long`,`stream finishing`,`invalid zip data`],dk=function(e,t,n){var r=Error(t||uk[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,dk),!n)throw r;return r},fk=function(e,t,n,r){var i=e.length,a=r?r.length:0;if(!i||t.f&&!t.l)return n||new zO(0);var o=!n,s=o||t.i!=2,c=t.i;o&&(n=new zO(i*3));var l=function(e){var t=n.length;if(e>t){var r=new zO(Math.max(t*2,e));r.set(n),n=r}},u=t.f||0,d=t.p||0,f=t.b||0,p=t.l,m=t.d,h=t.m,g=t.n,_=i*8;do{if(!p){u=ok(e,d,1);var v=ok(e,d+1,3);if(d+=3,!v){var y=ck(d)+4,b=e[y-4]|e[y-3]<<8,x=y+b;if(x>i){c&&dk(0);break}s&&l(f+b),n.set(e.subarray(y,x),f),t.b=f+=b,t.p=d=x*8,t.f=u;continue}if(v==1)p=rk,m=ik,h=9,g=5;else if(v==2){var S=ok(e,d,31)+257,C=ok(e,d+10,15)+4,w=S+ok(e,d+5,31)+1;d+=14;for(var T=new zO(w),E=new zO(19),D=0;D<C;++D)E[WO[D]]=ok(e,d+D*3,7);d+=C*3;for(var O=ak(E),k=(1<<O)-1,A=ek(E,O,1),D=0;D<w;){var j=A[ok(e,d,k)];d+=j&15;var y=j>>4;if(y<16)T[D++]=y;else{var M=0,N=0;for(y==16?(N=3+ok(e,d,3),d+=2,M=T[D-1]):y==17?(N=3+ok(e,d,7),d+=3):y==18&&(N=11+ok(e,d,127),d+=7);N--;)T[D++]=M}}var ee=T.subarray(0,S),te=T.subarray(S);h=ak(ee),g=ak(te),p=ek(ee,h,1),m=ek(te,g,1)}else dk(1);if(d>_){c&&dk(0);break}}s&&l(f+131072);for(var ne=(1<<h)-1,re=(1<<g)-1,ie=d;;ie=d){var M=p[sk(e,d)&ne],P=M>>4;if(d+=M&15,d>_){c&&dk(0);break}if(M||dk(2),P<256)n[f++]=P;else if(P==256){ie=d,p=null;break}else{var ae=P-254;if(P>264){var D=P-257,oe=HO[D];ae=ok(e,d,(1<<oe)-1)+qO[D],d+=oe}var se=m[sk(e,d)&re],ce=se>>4;se||dk(3),d+=se&15;var te=XO[ce];if(ce>3){var oe=UO[ce];te+=sk(e,d)&(1<<oe)-1,d+=oe}if(d>_){c&&dk(0);break}s&&l(f+131072);var le=f+ae;if(f<te){var ue=a-te,de=Math.min(te,le);for(ue+f<0&&dk(3);f<de;++f)n[f]=r[ue+f]}for(;f<le;++f)n[f]=n[f-te]}}t.l=p,t.p=ie,t.b=f,t.f=u,p&&(u=1,t.m=h,t.d=m,t.n=g)}while(!u);return f!=n.length&&o?lk(n,0,f):n.subarray(0,f)},pk=new zO(0),mk=function(e,t){return((e[0]&15)!=8||e[0]>>4>7||(e[0]<<8|e[1])%31)&&dk(6,`invalid zlib data`),(e[1]>>5&1)==+!t&&dk(6,`invalid zlib data: `+(e[1]&32?`need`:`unexpected`)+` dictionary`),(e[1]>>3&4)+2},hk=function(){function e(e,t){typeof e==`function`&&(t=e,e={}),this.ondata=t;var n=e&&e.dictionary&&e.dictionary.subarray(-32768);this.s={i:0,b:n?n.length:0},this.o=new zO(32768),this.p=new zO(0),n&&this.o.set(n)}return e.prototype.e=function(e){if(this.ondata||dk(5),this.d&&dk(4),!this.p.length)this.p=e;else if(e.length){var t=new zO(this.p.length+e.length);t.set(this.p),t.set(e,this.p.length),this.p=t}},e.prototype.c=function(e){this.s.i=+(this.d=e||!1);var t=this.s.b,n=fk(this.p,this.s,this.o);this.ondata(lk(n,t,this.s.b),this.d),this.o=lk(n,this.s.b-32768),this.s.b=this.o.length,this.p=lk(this.p,this.s.p/8|0),this.s.p&=7},e.prototype.push=function(e,t){this.e(e),this.c(t)},e}(),gk=function(){function e(e,t){hk.call(this,e,t),this.v=e&&e.dictionary?2:1}return e.prototype.push=function(e,t){if(hk.prototype.e.call(this,e),this.v){if(this.p.length<6&&!t)return;this.p=this.p.subarray(mk(this.p,this.v-1)),this.v=0}t&&(this.p.length<4&&dk(6,`invalid zlib data`),this.p=this.p.subarray(0,-4)),hk.prototype.c.call(this,t)},e}();function _k(e,t){return fk(e.subarray(mk(e,t&&t.dictionary),-4),{i:2},t&&t.out,t&&t.dictionary)}var vk=typeof TextDecoder<`u`&&new TextDecoder;try{vk.decode(pk,{stream:!0})}catch{}function yk(e,t=`utf8`){return new TextDecoder(t).decode(e)}var bk=new TextEncoder;function xk(e){return bk.encode(e)}var Sk=8192,Ck=(()=>{let e=new Uint8Array(4),t=new Uint32Array(e.buffer);return!((t[0]=1)&e[0])})(),wk={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array},Tk=class e{buffer;byteLength;byteOffset;length;offset;lastWrittenByte;littleEndian;_data;_mark;_marks;constructor(t=Sk,n={}){let r=!1;typeof t==`number`?t=new ArrayBuffer(t):(r=!0,this.lastWrittenByte=t.byteLength);let i=n.offset?n.offset>>>0:0,a=t.byteLength-i,o=i;(ArrayBuffer.isView(t)||t instanceof e)&&(t.byteLength!==t.buffer.byteLength&&(o=t.byteOffset+i),t=t.buffer),this.lastWrittenByte=r?a:0,this.buffer=t,this.length=a,this.byteLength=a,this.byteOffset=o,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,o,a),this._mark=0,this._marks=[]}available(e=1){return this.offset+e<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(e=1){return this.offset+=e,this}back(e=1){return this.offset-=e,this}seek(e){return this.offset=e,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){let e=this._marks.pop();if(e===void 0)throw Error(`Mark stack empty`);return this.seek(e),this}rewind(){return this.offset=0,this}ensureAvailable(e=1){if(!this.available(e)){let t=(this.offset+e)*2,n=new Uint8Array(t);n.set(new Uint8Array(this.buffer)),this.buffer=n.buffer,this.length=t,this.byteLength=t,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(e=1){return this.readArray(e,`uint8`)}readArray(e,t){let n=wk[t].BYTES_PER_ELEMENT*e,r=this.byteOffset+this.offset,i=this.buffer.slice(r,r+n);if(this.littleEndian===Ck&&t!==`uint8`&&t!==`int8`){let e=new Uint8Array(this.buffer.slice(r,r+n));e.reverse();let i=new wk[t](e.buffer);return this.offset+=n,i.reverse(),i}let a=new wk[t](i);return this.offset+=n,a}readInt16(){let e=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,e}readUint16(){let e=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,e}readInt32(){let e=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,e}readUint32(){let e=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat32(){let e=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat64(){let e=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e}readBigInt64(){let e=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,e}readBigUint64(){let e=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,e}readChar(){return String.fromCharCode(this.readInt8())}readChars(e=1){let t=``;for(let n=0;n<e;n++)t+=this.readChar();return t}readUtf8(e=1){return yk(this.readBytes(e))}decodeText(e=1,t=`utf8`){return yk(this.readBytes(e),t)}writeBoolean(e){return this.writeUint8(e?255:0),this}writeInt8(e){return this.ensureAvailable(1),this._data.setInt8(this.offset++,e),this._updateLastWrittenByte(),this}writeUint8(e){return this.ensureAvailable(1),this._data.setUint8(this.offset++,e),this._updateLastWrittenByte(),this}writeByte(e){return this.writeUint8(e)}writeBytes(e){this.ensureAvailable(e.length);for(let t=0;t<e.length;t++)this._data.setUint8(this.offset++,e[t]);return this._updateLastWrittenByte(),this}writeInt16(e){return this.ensureAvailable(2),this._data.setInt16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(e){return this.ensureAvailable(2),this._data.setUint16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(e){return this.ensureAvailable(4),this._data.setInt32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(e){return this.ensureAvailable(4),this._data.setUint32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(e){return this.ensureAvailable(4),this._data.setFloat32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(e){return this.ensureAvailable(8),this._data.setFloat64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(e){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(e){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(e){return this.writeUint8(e.charCodeAt(0))}writeChars(e){for(let t=0;t<e.length;t++)this.writeUint8(e.charCodeAt(t));return this}writeUtf8(e){return this.writeBytes(xk(e))}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}getWrittenByteLength(){return this.lastWrittenByte-this.byteOffset}_updateLastWrittenByte(){this.offset>this.lastWrittenByte&&(this.lastWrittenByte=this.offset)}},Ek=[];for(let e=0;e<256;e++){let t=e;for(let e=0;e<8;e++)t&1?t=3988292384^t>>>1:t>>>=1;Ek[e]=t}var Dk=4294967295;function Ok(e,t,n){let r=e;for(let e=0;e<n;e++)r=Ek[(r^t[e])&255]^r>>>8;return r}function kk(e,t){return(Ok(Dk,e,t)^Dk)>>>0}function Ak(e,t,n){let r=e.readUint32(),i=kk(new Uint8Array(e.buffer,e.byteOffset+e.offset-t-4,t),t);if(i!==r)throw Error(`CRC mismatch for chunk ${n}. Expected ${r}, found ${i}`)}function jk(e,t,n){for(let r=0;r<n;r++)t[r]=e[r]}function Mk(e,t,n,r){let i=0;for(;i<r;i++)t[i]=e[i];for(;i<n;i++)t[i]=e[i]+t[i-r]&255}function Nk(e,t,n,r){let i=0;if(n.length===0)for(;i<r;i++)t[i]=e[i];else for(;i<r;i++)t[i]=e[i]+n[i]&255}function Pk(e,t,n,r,i){let a=0;if(n.length===0){for(;a<i;a++)t[a]=e[a];for(;a<r;a++)t[a]=e[a]+(t[a-i]>>1)&255}else{for(;a<i;a++)t[a]=e[a]+(n[a]>>1)&255;for(;a<r;a++)t[a]=e[a]+(t[a-i]+n[a]>>1)&255}}function Fk(e,t,n,r,i){let a=0;if(n.length===0){for(;a<i;a++)t[a]=e[a];for(;a<r;a++)t[a]=e[a]+t[a-i]&255}else{for(;a<i;a++)t[a]=e[a]+n[a]&255;for(;a<r;a++)t[a]=e[a]+Ik(t[a-i],n[a],n[a-i])&255}}function Ik(e,t,n){let r=e+t-n,i=Math.abs(r-e),a=Math.abs(r-t),o=Math.abs(r-n);return i<=a&&i<=o?e:a<=o?t:n}function Lk(e,t,n,r,i,a){switch(e){case 0:jk(t,n,i);break;case 1:Mk(t,n,i,a);break;case 2:Nk(t,n,r,i);break;case 3:Pk(t,n,r,i,a);break;case 4:Fk(t,n,r,i,a);break;default:throw Error(`Unsupported filter: ${e}`)}}var Rk=new Uint16Array([255]),zk=new Uint8Array(Rk.buffer)[0]===255;function Bk(e){let{data:t,width:n,height:r,channels:i,depth:a}=e,o=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],s=Math.ceil(a/8)*i,c=new Uint8Array(r*n*s),l=0;for(let e=0;e<7;e++){let i=o[e],a=Math.ceil((n-i.x)/i.xStep),u=Math.ceil((r-i.y)/i.yStep);if(a<=0||u<=0)continue;let d=a*s,f=new Uint8Array(d);for(let e=0;e<u;e++){let o=t[l++],u=t.subarray(l,l+d);l+=d;let p=new Uint8Array(d);Lk(o,u,p,f,d,s),f.set(p);for(let t=0;t<a;t++){let a=i.x+t*i.xStep,o=i.y+e*i.yStep;if(!(a>=n||o>=r))for(let e=0;e<s;e++)c[(o*n+a)*s+e]=p[t*s+e]}}}if(a===16){let e=new Uint16Array(c.buffer);if(zk)for(let t=0;t<e.length;t++)e[t]=Vk(e[t]);return e}return c}function Vk(e){return(e&255)<<8|e>>8&255}var Hk=new Uint16Array([255]),Uk=new Uint8Array(Hk.buffer)[0]===255,Wk=new Uint8Array;function Gk(e){let{data:t,width:n,height:r,channels:i,depth:a}=e,o=Math.ceil(a/8)*i,s=Math.ceil(a/8*i*n),c=new Uint8Array(r*s),l=Wk,u=0,d,f;for(let e=0;e<r;e++){switch(d=t.subarray(u+1,u+1+s),f=c.subarray(e*s,(e+1)*s),t[u]){case 0:jk(d,f,s);break;case 1:Mk(d,f,s,o);break;case 2:Nk(d,f,l,s);break;case 3:Pk(d,f,l,s,o);break;case 4:Fk(d,f,l,s,o);break;default:throw Error(`Unsupported filter: ${t[u]}`)}l=f,u+=s+1}if(a===16){let e=new Uint16Array(c.buffer);if(Uk)for(let t=0;t<e.length;t++)e[t]=Kk(e[t]);return e}return c}function Kk(e){return(e&255)<<8|e>>8&255}var qk=Uint8Array.of(137,80,78,71,13,10,26,10);function Jk(e){if(!Yk(e.readBytes(qk.length)))throw Error(`wrong PNG signature`)}function Yk(e){if(e.length<qk.length)return!1;for(let t=0;t<qk.length;t++)if(e[t]!==qk[t])return!1;return!0}var Xk=`tEXt`,Zk=0,Qk=new TextDecoder(`latin1`);function $k(e){if(tA(e),e.length===0||e.length>79)throw Error(`keyword length must be between 1 and 79`)}var eA=/^[\u0000-\u00FF]*$/;function tA(e){if(!eA.test(e))throw Error(`invalid latin1 text`)}function nA(e,t,n){let r=rA(t);e[r]=iA(t,n-r.length-1)}function rA(e){for(e.mark();e.readByte()!==Zk;);let t=e.offset;e.reset();let n=Qk.decode(e.readBytes(t-e.offset-1));return e.skip(1),$k(n),n}function iA(e,t){return Qk.decode(e.readBytes(t))}var aA={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},oA={UNKNOWN:-1,DEFLATE:0},sA={UNKNOWN:-1,ADAPTIVE:0},cA={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},lA={NONE:0,BACKGROUND:1,PREVIOUS:2},uA={SOURCE:0,OVER:1},dA=class extends Tk{_checkCrc;_inflator;_png;_apng;_end;_hasPalette;_palette;_hasTransparency;_transparency;_compressionMethod;_filterMethod;_interlaceMethod;_colorType;_isAnimated;_numberOfFrames;_numberOfPlays;_frames;_writingDataChunks;_chunks;_inflatorResult;constructor(e,t={}){super(e);let{checkCrc:n=!1}=t;this._checkCrc=n,this._inflator=new gk((e,t)=>{if(this._chunks.push(e),t){let e=this._chunks.reduce((e,t)=>e+t.length,0);this._inflatorResult=new Uint8Array(e);let t=0;for(let e of this._chunks)this._inflatorResult.set(e,t),t+=e.length;this._chunks=[]}}),this._chunks=[],this._png={width:-1,height:-1,channels:-1,data:new Uint8Array,depth:1,text:{}},this._apng={width:-1,height:-1,channels:-1,depth:1,numberOfFrames:1,numberOfPlays:0,text:{},frames:[]},this._end=!1,this._hasPalette=!1,this._palette=[],this._hasTransparency=!1,this._transparency=new Uint16Array,this._compressionMethod=oA.UNKNOWN,this._filterMethod=sA.UNKNOWN,this._interlaceMethod=cA.UNKNOWN,this._colorType=aA.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this._inflatorResult=new Uint8Array,this.setBigEndian()}decode(){for(Jk(this);!this._end;){let e=this.readUint32(),t=this.readChars(4);this.decodeChunk(e,t)}return this._inflator.push(new Uint8Array,!0),this.decodeImage(),this._png}decodeApng(){for(Jk(this);!this._end;){let e=this.readUint32(),t=this.readChars(4);this.decodeApngChunk(e,t)}return this.decodeApngImage(),this._apng}decodeChunk(e,t){let n=this.offset;switch(t){case`IHDR`:this.decodeIHDR();break;case`PLTE`:this.decodePLTE(e);break;case`IDAT`:this.decodeIDAT(e);break;case`IEND`:this._end=!0;break;case`tRNS`:this.decodetRNS(e);break;case`iCCP`:this.decodeiCCP(e);break;case Xk:nA(this._png.text,this,e);break;case`pHYs`:this.decodepHYs();break;default:this.skip(e)}if(this.offset-n!==e)throw Error(`Length mismatch while decoding chunk ${t}`);this._checkCrc?Ak(this,e+4,t):this.skip(4)}decodeApngChunk(e,t){let n=this.offset;switch(t!==`fdAT`&&t!==`IDAT`&&this._writingDataChunks&&this.pushDataToFrame(),t){case`acTL`:this.decodeACTL();break;case`fcTL`:this.decodeFCTL();break;case`fdAT`:this.decodeFDAT(e);break;default:this.decodeChunk(e,t),this.offset=n+e}if(this.offset-n!==e)throw Error(`Length mismatch while decoding chunk ${t}`);this._checkCrc?Ak(this,e+4,t):this.skip(4)}decodeIHDR(){let e=this._png;e.width=this.readUint32(),e.height=this.readUint32(),e.depth=fA(this.readUint8());let t=this.readUint8();this._colorType=t;let n;switch(t){case aA.GREYSCALE:n=1;break;case aA.TRUECOLOUR:n=3;break;case aA.INDEXED_COLOUR:n=1;break;case aA.GREYSCALE_ALPHA:n=2;break;case aA.TRUECOLOUR_ALPHA:n=4;break;case aA.UNKNOWN:default:throw Error(`Unknown color type: ${t}`)}if(this._png.channels=n,this._compressionMethod=this.readUint8(),this._compressionMethod!==oA.DEFLATE)throw Error(`Unsupported compression method: ${this._compressionMethod}`);this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){let e={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array};this._frames.push(e)}decodePLTE(e){if(e%3!=0)throw RangeError(`PLTE field length must be a multiple of 3. Got ${e}`);let t=e/3;this._hasPalette=!0;let n=[];this._palette=n;for(let e=0;e<t;e++)n.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(e){this._writingDataChunks=!0;let t=e,n=this.offset+this.byteOffset;try{this._inflator.push(new Uint8Array(this.buffer,n,t),!1)}catch(e){throw Error(`Error while decompressing the data:`,{cause:e})}this.skip(e)}decodeFDAT(e){this._writingDataChunks=!0;let t=e,n=this.offset+this.byteOffset;n+=4,t-=4;try{this._inflator.push(new Uint8Array(this.buffer,n,t),!1)}catch(e){throw Error(`Error while decompressing the data:`,{cause:e})}this.skip(e)}decodetRNS(e){switch(this._colorType){case aA.GREYSCALE:case aA.TRUECOLOUR:if(e%2!=0)throw RangeError(`tRNS chunk length must be a multiple of 2. Got ${e}`);if(e/2>this._png.width*this._png.height)throw Error(`tRNS chunk contains more alpha values than there are pixels (${e/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(e/2);for(let t=0;t<e/2;t++)this._transparency[t]=this.readUint16();break;case aA.INDEXED_COLOUR:{if(e>this._palette.length)throw Error(`tRNS chunk contains more alpha values than there are palette colors (${e} vs ${this._palette.length})`);let t=0;for(;t<e;t++){let e=this.readByte();this._palette[t].push(e)}for(;t<this._palette.length;t++)this._palette[t].push(255);break}case aA.UNKNOWN:case aA.GREYSCALE_ALPHA:case aA.TRUECOLOUR_ALPHA:default:throw Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(e){let t=rA(this),n=this.readUint8();if(n!==oA.DEFLATE)throw Error(`Unsupported iCCP compression method: ${n}`);let r=this.readBytes(e-t.length-2);this._png.iccEmbeddedProfile={name:t,profile:_k(r)}}decodepHYs(){let e=this.readUint32(),t=this.readUint32(),n=this.readByte();this._png.resolution={x:e,y:t,unit:n}}decodeApngImage(){this._apng.width=this._png.width,this._apng.height=this._png.height,this._apng.channels=this._png.channels,this._apng.depth=this._png.depth,this._apng.numberOfFrames=this._numberOfFrames,this._apng.numberOfPlays=this._numberOfPlays,this._apng.text=this._png.text,this._apng.resolution=this._png.resolution;for(let e=0;e<this._numberOfFrames;e++){let t={sequenceNumber:this._frames[e].sequenceNumber,delayNumber:this._frames[e].delayNumber,delayDenominator:this._frames[e].delayDenominator,data:this._apng.depth===8?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)},n=this._frames.at(e);if(n){if(n.data=Gk({data:n.data,width:n.width,height:n.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),e===0||n.xOffset===0&&n.yOffset===0&&n.width===this._png.width&&n.height===this._png.height)t.data=n.data;else{let r=this._apng.frames.at(e-1);this.disposeFrame(n,r,t),this.addFrameDataToCanvas(t,n)}this._apng.frames.push(t)}}return this._apng}disposeFrame(e,t,n){switch(e.disposeOp){case lA.NONE:break;case lA.BACKGROUND:for(let t=0;t<this._png.height;t++)for(let r=0;r<this._png.width;r++){let i=(t*e.width+r)*this._png.channels;for(let e=0;e<this._png.channels;e++)n.data[i+e]=0}break;case lA.PREVIOUS:n.data.set(t.data);break;default:throw Error(`Unknown disposeOp`)}}addFrameDataToCanvas(e,t){let n=1<<this._png.depth,r=(e,n)=>({index:((e+t.yOffset)*this._png.width+t.xOffset+n)*this._png.channels,frameIndex:(e*t.width+n)*this._png.channels});switch(t.blendOp){case uA.SOURCE:for(let n=0;n<t.height;n++)for(let i=0;i<t.width;i++){let{index:a,frameIndex:o}=r(n,i);for(let n=0;n<this._png.channels;n++)e.data[a+n]=t.data[o+n]}break;case uA.OVER:for(let i=0;i<t.height;i++)for(let a=0;a<t.width;a++){let{index:o,frameIndex:s}=r(i,a);for(let r=0;r<this._png.channels;r++){let i=t.data[s+this._png.channels-1]/n,a=r%(this._png.channels-1)==0?1:t.data[s+r],c=Math.floor(i*a+(1-i)*e.data[o+r]);e.data[o+r]+=c}}break;default:throw Error(`Unknown blendOp`)}}decodeImage(){let e=this._inflatorResult;if(this._filterMethod!==sA.ADAPTIVE)throw Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===cA.NO_INTERLACE)this._png.data=Gk({data:e,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===cA.ADAM7)this._png.data=Bk({data:e,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else throw Error(`Interlace method ${this._interlaceMethod} not supported`);this._hasPalette&&(this._png.palette=this._palette),this._hasTransparency&&(this._png.transparency=this._transparency)}pushDataToFrame(){this._inflator.push(new Uint8Array,!0);let e=this._inflatorResult,t=this._frames.at(-1);t?t.data=e:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:lA.NONE,blendOp:uA.SOURCE,data:e}),this._inflator=new gk((e,t)=>{if(this._chunks.push(e),t){let e=this._chunks.reduce((e,t)=>e+t.length,0);this._inflatorResult=new Uint8Array(e);let t=0;for(let e of this._chunks)this._inflatorResult.set(e,t),t+=e.length;this._chunks=[]}}),this._chunks=[],this._writingDataChunks=!1}};function fA(e){if(e!==1&&e!==2&&e!==4&&e!==8&&e!==16)throw Error(`invalid bit depth: ${e}`);return e}function pA(e){let t=e.palette,n=e.depth;if(!t)throw Error(`Color palette is undefined.`);mA(e);let r=e.width*e.height,i=r*t[0].length,a=new Uint8Array(i),o=0,s=0,c=new Uint8Array(r),l=255;switch(n){case 1:l=128;break;case 2:l=192;break;case 4:l=240;break;case 8:l=255;break;default:throw Error(`Incorrect depth value`)}for(let t of e.data){let r=l,i=8;for(;r&&(i-=n,c[o++]=(t&r)>>i,r>>=n,o%e.width!==0););}if(e.palette)for(let t of c){let n=e.palette.at(t);if(!n)throw Error(`Incorrect index of palette color`);a.set(n,s),s+=n.length}return a}function mA(e){let t=e.depth<8?Math.ceil(e.width*e.depth/8)*e.height*e.channels:e.width*e.height*e.channels;if(e.data.length!==t)throw RangeError(`wrong data size. Found ${e.data.length}, expected ${t}`)}function hA(e,t){return new dA(e,t).decode()}var gA=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_FOREGROUND=e.DEFAULT_BACKGROUND=e.PALETTE_ANSI_256=e.PALETTE_VT340_GREY=e.PALETTE_VT340_COLOR=e.normalizeHLS=e.normalizeRGB=e.nearestColorIndex=e.fromRGBA8888=e.toRGBA8888=e.alpha=e.blue=e.green=e.red=e.BIG_ENDIAN=void 0,e.BIG_ENDIAN=new Uint8Array(new Uint32Array([4278190080]).buffer)[0]===255,e.BIG_ENDIAN&&console.warn(`BE platform detected. This version of node-sixel works only on LE properly.`);function t(e){return e&255}e.red=t;function n(e){return e>>>8&255}e.green=n;function r(e){return e>>>16&255}e.blue=r;function i(e){return e>>>24&255}e.alpha=i;function a(e,t,n,r=255){return((r&255)<<24|(n&255)<<16|(t&255)<<8|e&255)>>>0}e.toRGBA8888=a;function o(e){return[e&255,e>>8&255,e>>16&255,e>>>24]}e.fromRGBA8888=o;function s(e,i){let a=t(e),o=n(e),s=r(e),c=2**53-1,l=-1;for(let e=0;e<i.length;++e){let t=a-i[e][0],n=o-i[e][1],r=s-i[e][2],u=t*t+n*n+r*r;if(!u)return e;u<c&&(c=u,l=e)}return l}e.nearestColorIndex=s;function c(e,t,n){return Math.max(e,Math.min(n,t))}function l(e,t,n){return n<0&&(n+=1),n>1&&--n,n*6<1?t+(e-t)*6*n:n*2<1?e:n*3<2?t+(e-t)*(4-n*6):t}function u(e,t,n){if(!n){let e=Math.round(t*255);return a(e,e,e)}let r=t<.5?t*(1+n):t+n-t*n,i=2*t-r;return a(c(0,255,Math.round(l(r,i,e+1/3)*255)),c(0,255,Math.round(l(r,i,e)*255)),c(0,255,Math.round(l(r,i,e-1/3)*255)))}function d(e,t,n){return(4278190080|Math.round(n/100*255)<<16|Math.round(t/100*255)<<8|Math.round(e/100*255))>>>0}e.normalizeRGB=d;function f(e,t,n){return u((e+240)/360,t/100,n/100)}e.normalizeHLS=f,e.PALETTE_VT340_COLOR=new Uint32Array([d(0,0,0),d(20,20,80),d(80,13,13),d(20,80,20),d(80,20,80),d(20,80,80),d(80,80,20),d(53,53,53),d(26,26,26),d(33,33,60),d(60,26,26),d(33,60,33),d(60,33,60),d(33,60,60),d(60,60,33),d(80,80,80)]),e.PALETTE_VT340_GREY=new Uint32Array([d(0,0,0),d(13,13,13),d(26,26,26),d(40,40,40),d(6,6,6),d(20,20,20),d(33,33,33),d(46,46,46),d(0,0,0),d(13,13,13),d(26,26,26),d(40,40,40),d(6,6,6),d(20,20,20),d(33,33,33),d(46,46,46)]),e.PALETTE_ANSI_256=(()=>{let e=[a(0,0,0),a(205,0,0),a(0,205,0),a(205,205,0),a(0,0,238),a(205,0,205),a(0,250,205),a(229,229,229),a(127,127,127),a(255,0,0),a(0,255,0),a(255,255,0),a(92,92,255),a(255,0,255),a(0,255,255),a(255,255,255)],t=[0,95,135,175,215,255];for(let n=0;n<6;++n)for(let r=0;r<6;++r)for(let i=0;i<6;++i)e.push(a(t[n],t[r],t[i]));for(let t=8;t<=238;t+=10)e.push(a(t,t,t));return new Uint32Array(e)})(),e.DEFAULT_BACKGROUND=a(0,0,0,255),e.DEFAULT_FOREGROUND=a(255,255,255,255)})),_A=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LIMITS=void 0,e.LIMITS={CHUNK_SIZE:16384,PALETTE_SIZE:4096,MAX_WIDTH:16384,BYTES:`AGFzbQEAAAABJAdgAAF/YAJ/fwBgA39/fwF/YAF/AX9gAABgBH9/f38AYAF/AAIlAgNlbnYLaGFuZGxlX2JhbmQAAwNlbnYLbW9kZV9wYXJzZWQAAwMTEgQAAAAAAQQBAQUBAAACAgAGAwQFAXABBwcFBAEBBwcGCAF/AUGAihoLB9wBDgZtZW1vcnkCABFnZXRfc3RhdGVfYWRkcmVzcwADEWdldF9jaHVua19hZGRyZXNzAAQOZ2V0X3AwX2FkZHJlc3MABRNnZXRfcGFsZXR0ZV9hZGRyZXNzAAYEaW5pdAALBmRlY29kZQAMDWN1cnJlbnRfd2lkdGgADQ5jdXJyZW50X2hlaWdodAAOGV9faW5kaXJlY3RfZnVuY3Rpb25fdGFibGUBAAtfaW5pdGlhbGl6ZQACCXN0YWNrU2F2ZQARDHN0YWNrUmVzdG9yZQASCnN0YWNrQWxsb2MAEwkMAQBBAQsGCgcJDxACDAEBCq5UEgMAAQsFAEGgCAsGAEGQiQELBgBBsIkCCwUAQZAJC+okAQh/QeQIKAIAIQVB4AgoAgAhA0HoCCgCACEIIAFBkIkBaiIJQf8BOgAAIAAgAUgEQCAAQZCJAWohBgNAIAMhBCAGQQFqIQECQCAGLQAAQf8AcSIDQTBrQQlLBEAgASEGDAELQewIKAIAQQJ0QewIaiICKAIAIQADQCACIAMgAEEKbGpBMGsiADYCACABLQAAIQMgAUEBaiIGIQEgA0H/AHEiA0Ewa0EKSQ0ACwsCQAJAAkACQAJAAkACQAJ/AkACQCADQT9rIgBBP00EQCAERQ0BIARBIUYEQAJAQfAIKAIAIgFBASABGyIHIAhqIgFB1AgoAgAiA0gNACADQf//AEoNAANAIANBAnQiAkGgiQJqIgRBoAgpAwA3AwAgAkGoiQJqQaAIKQMANwMAIAJBsIkCakGgCCkDADcDACACQbiJAmpBoAgpAwA3AwAgAkHAiQJqQaAIKQMANwMAIAJByIkCakGgCCkDADcDACACQdCJAmpBoAgpAwA3AwAgAkHYiQJqQaAIKQMANwMAIAJB4IkCakGgCCkDADcDACACQeiJAmpBoAgpAwA3AwAgAkHwiQJqQaAIKQMANwMAIAJB+IkCakGgCCkDADcDACACQYCKAmpBoAgpAwA3AwAgAkGIigJqQaAIKQMANwMAIAJBkIoCakGgCCkDADcDACACQZiKAmpBoAgpAwA3AwAgAkGgigJqQaAIKQMANwMAIAJBqIoCakGgCCkDADcDACACQbCKAmpBoAgpAwA3AwAgAkG4igJqQaAIKQMANwMAIAJBwIoCakGgCCkDADcDACACQciKAmpBoAgpAwA3AwAgAkHQigJqQaAIKQMANwMAIAJB2IoCakGgCCkDADcDACACQeCKAmpBoAgpAwA3AwAgAkHoigJqQaAIKQMANwMAIAJB8IoCakGgCCkDADcDACACQfiKAmpBoAgpAwA3AwAgAkGAiwJqQaAIKQMANwMAIAJBiIsCakGgCCkDADcDACACQZCLAmpBoAgpAwA3AwAgAkGYiwJqQaAIKQMANwMAIAJBoIsCakGgCCkDADcDACACQaiLAmpBoAgpAwA3AwAgAkGwiwJqQaAIKQMANwMAIAJBuIsCakGgCCkDADcDACACQcCLAmpBoAgpAwA3AwAgAkHIiwJqQaAIKQMANwMAIAJB0IsCakGgCCkDADcDACACQdiLAmpBoAgpAwA3AwAgAkHgiwJqQaAIKQMANwMAIAJB6IsCakGgCCkDADcDACACQfCLAmpBoAgpAwA3AwAgAkH4iwJqQaAIKQMANwMAIAJBgIwCakGgCCkDADcDACACQYiMAmpBoAgpAwA3AwAgAkGQjAJqQaAIKQMANwMAIAJBmIwCakGgCCkDADcDACACQaCMAmpBoAgpAwA3AwAgAkGojAJqQaAIKQMANwMAIAJBsIwCakGgCCkDADcDACACQbiMAmpBoAgpAwA3AwAgAkHAjAJqQaAIKQMANwMAIAJByIwCakGgCCkDADcDACACQdCMAmpBoAgpAwA3AwAgAkHYjAJqQaAIKQMANwMAIAJB4IwCakGgCCkDADcDACACQeiMAmpBoAgpAwA3AwAgAkHwjAJqQaAIKQMANwMAIAJB+IwCakGgCCkDADcDACACQYCNAmpBoAgpAwA3AwAgAkGIjQJqQaAIKQMANwMAIAJBkI0CakGgCCkDADcDACACQZiNAmpBoAgpAwA3AwAgAkGwiQZqIARBgAT8CgAAQdQIKAIAQQJ0QcCJCmogBEGABPwKAABB1AgoAgBBAnRB0IkOaiAEQYAE/AoAAEHUCCgCAEECdEHgiRJqIARBgAT8CgAAQdQIKAIAQQJ0QfCJFmogBEGABPwKAABB1AhB1AgoAgAiAkGAAWoiAzYCACABIANIDQEgAkGA/wBIDQALCwJAIABFDQAgCEH//wBLDQBBgIABIAhrIAcgAUH//wBLGyECAkAgAEEBcUUNACACRQ0AIAhBAnRBoIkCaiEDIAIhBCACQQdxIgcEQANAIAMgBTYCACADQQRqIQMgBEEBayEEIAdBAWsiBw0ACwsgAkEBa0EHSQ0AA0AgAyAFNgIcIAMgBTYCGCADIAU2AhQgAyAFNgIQIAMgBTYCDCADIAU2AgggAyAFNgIEIAMgBTYCACADQSBqIQMgBEEIayIEDQALCwJAIABBAnFFDQAgAkUNACAIQQJ0QbCJBmohAyACIQQgAkEHcSIHBEADQCADIAU2AgAgA0EEaiEDIARBAWshBCAHQQFrIgcNAAsLIAJBAWtBB0kNAANAIAMgBTYCHCADIAU2AhggAyAFNgIUIAMgBTYCECADIAU2AgwgAyAFNgIIIAMgBTYCBCADIAU2AgAgA0EgaiEDIARBCGsiBA0ACwsCQCAAQQRxRQ0AIAJFDQAgCEECdEHAiQpqIQMgAiEEIAJBB3EiBwRAA0AgAyAFNgIAIANBBGohAyAEQQFrIQQgB0EBayIHDQALCyACQQFrQQdJDQADQCADIAU2AhwgAyAFNgIYIAMgBTYCFCADIAU2AhAgAyAFNgIMIAMgBTYCCCADIAU2AgQgAyAFNgIAIANBIGohAyAEQQhrIgQNAAsLAkAgAEEIcUUNACACRQ0AIAhBAnRB0IkOaiEDIAIhBCACQQdxIgcEQANAIAMgBTYCACADQQRqIQMgBEEBayEEIAdBAWsiBw0ACwsgAkEBa0EHSQ0AA0AgAyAFNgIcIAMgBTYCGCADIAU2AhQgAyAFNgIQIAMgBTYCDCADIAU2AgggAyAFNgIEIAMgBTYCACADQSBqIQMgBEEIayIEDQALCwJAIABBEHFFDQAgAkUNACAIQQJ0QeCJEmohAyACIQQgAkEHcSIHBEADQCADIAU2AgAgA0EEaiEDIARBAWshBCAHQQFrIgcNAAsLIAJBAWtBB0kNAANAIAMgBTYCHCADIAU2AhggAyAFNgIUIAMgBTYCECADIAU2AgwgAyAFNgIIIAMgBTYCBCADIAU2AgAgA0EgaiEDIARBCGsiBA0ACwsgAEEgcUUNACACRQ0AIAJBAWshByAIQQJ0QfCJFmohAyACQQdxIgQEQANAIAMgBTYCACADQQRqIQMgAkEBayECIARBAWsiBA0ACwsgB0EHSQ0AA0AgAyAFNgIcIAMgBTYCGCADIAU2AhQgAyAFNgIQIAMgBTYCDCADIAU2AgggAyAFNgIEIAMgBTYCACADQSBqIQMgAkEIayICDQALC0HcCEHcCCgCACAAcjYCACAGQQFqIgIgBi0AAEH/AHEiA0E/ayIAQT9LDQQaDAMLAkBB7AgoAgAiBEEBRgRAQfAIKAIAIgNBzAgoAgAiAUkNASADIAFwIQMMAQtB+AgoAgAhAkH0CCgCACEBAkACQCAEQQVHDQAgAUEBRw0AIAJB6QJODQQMAQsgAkHkAEoNA0H8CCgCAEHkAEoNA0GACSgCAEHkAEoNAwsCQCABRQ0AIAFBAkoNACACQfwIKAIAQYAJKAIAIAFBAnRBiAhqKAIAEQIAIQFB8AgoAgAiA0HMCCgCACICTwR/IAMgAnAFIAMLQQJ0QZAJaiABNgIAC0HwCCgCACIDQcwIKAIAIgFJDQAgAyABcCEDCyADQQJ0QZAJaigCACEFDAELIANB/QBxQSFHBEAgCCEBIAYhAgwECyAEQSNHDQQCQEHsCCgCACICQQFGBEBB8AgoAgAiAUHMCCgCACIASQ0BIAEgAHAhAQwBC0H4CCgCACEBQfQIKAIAIQACQAJAIAJBBUcNACAAQQFHDQAgAUHpAkgNAQwHCyABQeQASg0GQfwIKAIAQeQASg0GQYAJKAIAQeQASg0GCwJAIABFDQAgAEECSg0AIAFB/AgoAgBBgAkoAgAgAEECdEGICGooAgARAgAhAEHwCCgCACIBQcwIKAIAIgJPBH8gASACcAUgAQtBAnRBkAlqIAA2AgALQfAIKAIAIgFBzAgoAgAiAEkNACABIABwIQELIAFBAnRBkAlqKAIAIQUMBAsgCCEBIAYhAgtB1AgoAgAhBgNAAkAgASAGSA0AIAZB//8ASg0AIAZBAnQiBEGgiQJqIgZBoAgpAwA3AwAgBEGoiQJqQaAIKQMANwMAIARBsIkCakGgCCkDADcDACAEQbiJAmpBoAgpAwA3AwAgBEHAiQJqQaAIKQMANwMAIARByIkCakGgCCkDADcDACAEQdCJAmpBoAgpAwA3AwAgBEHYiQJqQaAIKQMANwMAIARB4IkCakGgCCkDADcDACAEQeiJAmpBoAgpAwA3AwAgBEHwiQJqQaAIKQMANwMAIARB+IkCakGgCCkDADcDACAEQYCKAmpBoAgpAwA3AwAgBEGIigJqQaAIKQMANwMAIARBkIoCakGgCCkDADcDACAEQZiKAmpBoAgpAwA3AwAgBEGgigJqQaAIKQMANwMAIARBqIoCakGgCCkDADcDACAEQbCKAmpBoAgpAwA3AwAgBEG4igJqQaAIKQMANwMAIARBwIoCakGgCCkDADcDACAEQciKAmpBoAgpAwA3AwAgBEHQigJqQaAIKQMANwMAIARB2IoCakGgCCkDADcDACAEQeCKAmpBoAgpAwA3AwAgBEHoigJqQaAIKQMANwMAIARB8IoCakGgCCkDADcDACAEQfiKAmpBoAgpAwA3AwAgBEGAiwJqQaAIKQMANwMAIARBiIsCakGgCCkDADcDACAEQZCLAmpBoAgpAwA3AwAgBEGYiwJqQaAIKQMANwMAIARBoIsCakGgCCkDADcDACAEQaiLAmpBoAgpAwA3AwAgBEGwiwJqQaAIKQMANwMAIARBuIsCakGgCCkDADcDACAEQcCLAmpBoAgpAwA3AwAgBEHIiwJqQaAIKQMANwMAIARB0IsCakGgCCkDADcDACAEQdiLAmpBoAgpAwA3AwAgBEHgiwJqQaAIKQMANwMAIARB6IsCakGgCCkDADcDACAEQfCLAmpBoAgpAwA3AwAgBEH4iwJqQaAIKQMANwMAIARBgIwCakGgCCkDADcDACAEQYiMAmpBoAgpAwA3AwAgBEGQjAJqQaAIKQMANwMAIARBmIwCakGgCCkDADcDACAEQaCMAmpBoAgpAwA3AwAgBEGojAJqQaAIKQMANwMAIARBsIwCakGgCCkDADcDACAEQbiMAmpBoAgpAwA3AwAgBEHAjAJqQaAIKQMANwMAIARByIwCakGgCCkDADcDACAEQdCMAmpBoAgpAwA3AwAgBEHYjAJqQaAIKQMANwMAIARB4IwCakGgCCkDADcDACAEQeiMAmpBoAgpAwA3AwAgBEHwjAJqQaAIKQMANwMAIARB+IwCakGgCCkDADcDACAEQYCNAmpBoAgpAwA3AwAgBEGIjQJqQaAIKQMANwMAIARBkI0CakGgCCkDADcDACAEQZiNAmpBoAgpAwA3AwAgBEGwiQZqIAZBgAT8CgAAQdQIKAIAQQJ0QcCJCmogBkGABPwKAABB1AgoAgBBAnRB0IkOaiAGQYAE/AoAAEHUCCgCAEECdEHgiRJqIAZBgAT8CgAAQdQIKAIAQQJ0QfCJFmogBkGABPwKAABB1AhB1AgoAgBBgAFqIgY2AgALIAFB//8ATQRAIABBAXEgAWxBAnRBoIkCaiAFNgIAIABBAXZBAXEgAWxBAnRBsIkGaiAFNgIAIABBAnZBAXEgAWxBAnRBwIkKaiAFNgIAIABBA3ZBAXEgAWxBAnRB0IkOaiAFNgIAIABBBHZBAXEgAWxBAnRB4IkSaiAFNgIAIABBBXYgAWxBAnRB8IkWaiAFNgIAQdQIKAIAIQYLIAFBAWohAUHcCEHcCCgCACAAcjYCACACLQAAIQAgAkEBaiIEIQIgAEH/AHEiA0E/ayIAQcAASQ0ACyAECyECQQAhBCACIQYgASEIIANB/QBxQSFGDQELIANBJGsOCgEDAwMDAwMDAwIDC0HsCEIBNwIADAQLQdgIIAFB2AgoAgAiACAAIAFIGyIAQYCAASAAQYCAAUgbNgIADAILQegIIAFB2AgoAgAiACAAIAFIGyIAQYCAASAAQYCAAUgbIgA2AgBB2AggADYCACAAQQRrEAAEQEHoCEEENgIAQdgIQQQ2AgBB0AhBATYCAA8LEAgMAQsCQCADQTtHDQBB7AgoAgAiAEEHSg0AQewIIABBAWo2AgAgAEECdEHwCGpBADYCAAsgAiEGIAQhAyABIQgMAQtBBCEIIAIhBiAEIQMLIAYgCUkNAAsLQeQIIAU2AgBB4AggAzYCAEHoCCAINgIAC9ELAgF+CH9B2AhCBDcDAEGojQJBoAgpAwAiADcDAEGgjQIgADcDAEGYjQIgADcDAEGQjQIgADcDAEGIjQIgADcDAEGAjQIgADcDAEH4jAIgADcDAEHwjAIgADcDAEHojAIgADcDAEHgjAIgADcDAEHYjAIgADcDAEHQjAIgADcDAEHIjAIgADcDAEHAjAIgADcDAEG4jAIgADcDAEGwjAIgADcDAEGojAIgADcDAEGgjAIgADcDAEGYjAIgADcDAEGQjAIgADcDAEGIjAIgADcDAEGAjAIgADcDAEH4iwIgADcDAEHwiwIgADcDAEHoiwIgADcDAEHgiwIgADcDAEHYiwIgADcDAEHQiwIgADcDAEHIiwIgADcDAEHAiwIgADcDAEG4iwIgADcDAEGwiwIgADcDAEGoiwIgADcDAEGgiwIgADcDAEGYiwIgADcDAEGQiwIgADcDAEGIiwIgADcDAEGAiwIgADcDAEH4igIgADcDAEHwigIgADcDAEHoigIgADcDAEHgigIgADcDAEHYigIgADcDAEHQigIgADcDAEHIigIgADcDAEHAigIgADcDAEG4igIgADcDAEGwigIgADcDAEGoigIgADcDAEGgigIgADcDAEGYigIgADcDAEGQigIgADcDAEGIigIgADcDAEGAigIgADcDAEH4iQIgADcDAEHwiQIgADcDAEHoiQIgADcDAEHgiQIgADcDAEHYiQIgADcDAEHQiQIgADcDAEHIiQIgADcDAEHAiQIgADcDAEG4iQIgADcDAEGwiQIgADcDAEGoCCgCACIEQf8AakGAAW0hCAJAIARBgQFIDQBBASEBIAhBAiAIQQJKG0EBayICQQFxIQMgBEGBAk4EQCACQX5xIQIDQCABQQl0IgdBEHJBoIkCakGwiQJBgAT8CgAAIAdBsI0CakGwiQJBgAT8CgAAIAFBAmohASACQQJrIgINAAsLIANFDQAgAUEJdEEQckGgiQJqQbCJAkGABPwKAAALAkAgBEEBSA0AIAhBASAIQQFKGyIDQQFxIQUCQCADQQFrIgdFBEBBACEBDAELIANB/v///wdxIQJBACEBA0AgAUEJdCIGQRByQbCJBmpBsIkCQYAE/AoAACAGQZAEckGwiQZqQbCJAkGABPwKAAAgAUECaiEBIAJBAmsiAg0ACwsgBQRAIAFBCXRBEHJBsIkGakGwiQJBgAT8CgAACyAEQQFIDQAgA0EBcSEFIAcEfyADQf7///8HcSECQQAhAQNAIAFBCXQiBkEQckHAiQpqQbCJAkGABPwKAAAgBkGQBHJBwIkKakGwiQJBgAT8CgAAIAFBAmohASACQQJrIgINAAsgAUEHdEEEcgVBBAshASAFBEAgAUECdEHAiQpqQbCJAkGABPwKAAALIARBAUgNACADQQFxIQUgBwR/IANB/v///wdxIQJBACEBA0AgAUEJdCIGQRByQdCJDmpBsIkCQYAE/AoAACAGQZAEckHQiQ5qQbCJAkGABPwKAAAgAUECaiEBIAJBAmsiAg0ACyABQQd0QQRyBUEECyEBIAUEQCABQQJ0QdCJDmpBsIkCQYAE/AoAAAsgBEEBSA0AIANBAXEhBSAHBH8gA0H+////B3EhAkEAIQEDQCABQQl0IgZBEHJB4IkSakGwiQJBgAT8CgAAIAZBkARyQeCJEmpBsIkCQYAE/AoAACABQQJqIQEgAkECayICDQALIAFBB3RBBHIFQQQLIQEgBQRAIAFBAnRB4IkSakGwiQJBgAT8CgAACyAEQQFIDQAgA0EBcSEEIAcEfyADQf7///8HcSECQQAhAQNAIAFBCXQiA0EQckHwiRZqQbCJAkGABPwKAAAgA0GQBHJB8IkWakGwiQJBgAT8CgAAIAFBAmohASACQQJrIgINAAsgAUEHdEEEcgVBBAshASAERQ0AIAFBAnRB8IkWakGwiQJBgAT8CgAAC0HUCCAIQQd0QQRyNgIAC58TAgh/AX5B5AgoAgAhA0HgCCgCACECQegIKAIAIQcgAUGQiQFqIglB/wE6AAAgACABSARAIABBkIkBaiEIA0AgAiEEIAhBAWohAQJAIAgtAABB/wBxIgJBMGtBCUsEQCABIQgMAQtB7AgoAgBBAnRB7AhqIgUoAgAhAANAIAUgAiAAQQpsakEwayIANgIAIAEtAAAhAiABQQFqIgghASACQf8AcSICQTBrQQpJDQALCwJAAkACQAJAAkACQAJ/AkAgAkE/ayIAQT9NBEAgBEUNASAEQSFGBEBB8AgoAgAiAUEBIAEbIgQgB2ohAQJAIABFDQAgB0H//wBLDQBBgIABIAdrIAQgAUH//wBLGyEFAkAgAEEBcUUNACAHQQJ0QaCJAmohAiAFIgRBB3EiBgRAA0AgAiADNgIAIAJBBGohAiAEQQFrIQQgBkEBayIGDQALCyAFQQFrQQdJDQADQCACIAM2AhwgAiADNgIYIAIgAzYCFCACIAM2AhAgAiADNgIMIAIgAzYCCCACIAM2AgQgAiADNgIAIAJBIGohAiAEQQhrIgQNAAsLAkAgAEECcUUNACAHQQJ0QbCJBmohAiAFIgRBB3EiBgRAA0AgAiADNgIAIAJBBGohAiAEQQFrIQQgBkEBayIGDQALCyAFQQFrQQdJDQADQCACIAM2AhwgAiADNgIYIAIgAzYCFCACIAM2AhAgAiADNgIMIAIgAzYCCCACIAM2AgQgAiADNgIAIAJBIGohAiAEQQhrIgQNAAsLAkAgAEEEcUUNACAHQQJ0QcCJCmohAiAFIgRBB3EiBgRAA0AgAiADNgIAIAJBBGohAiAEQQFrIQQgBkEBayIGDQALCyAFQQFrQQdJDQADQCACIAM2AhwgAiADNgIYIAIgAzYCFCACIAM2AhAgAiADNgIMIAIgAzYCCCACIAM2AgQgAiADNgIAIAJBIGohAiAEQQhrIgQNAAsLAkAgAEEIcUUNACAHQQJ0QdCJDmohAiAFIgRBB3EiBgRAA0AgAiADNgIAIAJBBGohAiAEQQFrIQQgBkEBayIGDQALCyAFQQFrQQdJDQADQCACIAM2AhwgAiADNgIYIAIgAzYCFCACIAM2AhAgAiADNgIMIAIgAzYCCCACIAM2AgQgAiADNgIAIAJBIGohAiAEQQhrIgQNAAsLAkAgAEEQcUUNACAHQQJ0QeCJEmohAiAFIgRBB3EiBgRAA0AgAiADNgIAIAJBBGohAiAEQQFrIQQgBkEBayIGDQALCyAFQQFrQQdJDQADQCACIAM2AhwgAiADNgIYIAIgAzYCFCACIAM2AhAgAiADNgIMIAIgAzYCCCACIAM2AgQgAiADNgIAIAJBIGohAiAEQQhrIgQNAAsLIABBIHFFDQAgBUEBayEEIAdBAnRB8IkWaiEAIAVBB3EiAgRAA0AgACADNgIAIABBBGohACAFQQFrIQUgAkEBayICDQALCyAEQQdJDQADQCAAIAM2AhwgACADNgIYIAAgAzYCFCAAIAM2AhAgACADNgIMIAAgAzYCCCAAIAM2AgQgACADNgIAIABBIGohACAFQQhrIgUNAAsLIAhBAWoiBSAILQAAQf8AcSICQT9rIgBBP00NAxoMBAsCQEHsCCgCACIFQQFGBEBB8AgoAgAiAUHMCCgCACIESQ0BIAEgBHAhAQwBC0H4CCgCACEEQfQIKAIAIQECQAJAIAVBBUcNACABQQFHDQAgBEHpAk4NBAwBCyAEQeQASg0DQfwIKAIAQeQASg0DQYAJKAIAQeQASg0DCwJAIAFFDQAgAUECSg0AIARB/AgoAgBBgAkoAgAgAUECdEGICGooAgARAgAhBEHwCCgCACIBQcwIKAIAIgVPBH8gASAFcAUgAQtBAnRBkAlqIAQ2AgALQfAIKAIAIgFBzAgoAgAiBEkNACABIARwIQELIAFBAnRBkAlqKAIAIQMMAQsgAkH9AHFBIUcEQCAHIQEgAiEADAQLIARBI0cNBAJAQewIKAIAIgRBAUYEQEHwCCgCACIBQcwIKAIAIgBJDQEgASAAcCEBDAELQfgIKAIAIQFB9AgoAgAhAAJAAkAgBEEFRw0AIABBAUcNACABQekCSA0BDAcLIAFB5ABKDQZB/AgoAgBB5ABKDQZBgAkoAgBB5ABKDQYLAkAgAEUNACAAQQJKDQAgAUH8CCgCAEGACSgCACAAQQJ0QYgIaigCABECACEAQfAIKAIAIgFBzAgoAgAiBE8EfyABIARwBSABC0ECdEGQCWogADYCAAtB8AgoAgAiAUHMCCgCACIASQ0AIAEgAHAhAQsgAUECdEGQCWooAgAhAwwECyAHIQEgCAshBQNAIAFB//8ATQRAIABBAXEgAWxBAnRBoIkCaiADNgIAIABBAXZBAXEgAWxBAnRBsIkGaiADNgIAIABBAnZBAXEgAWxBAnRBwIkKaiADNgIAIABBA3ZBAXEgAWxBAnRB0IkOaiADNgIAIABBBHZBAXEgAWxBAnRB4IkSaiADNgIAIABBBXYgAWxBAnRB8IkWaiADNgIACyABQQFqIQEgBS0AACEAIAVBAWoiBCEFIABB/wBxIgJBP2siAEHAAEkNAAsgBCEFC0EAIQQgBSEIIAEhByACIQAgAkH9AHFBIUYNAQtBBCEHIAQhAiAAQSRrDgoDAgICAgICAgIBAgtB7AhCATcCAAwCC0GoCCgCAEEEaxAABEBB0AhBATYCAA8LAkBBqAgoAgAiBkEFSA0AQaAIKQMAIQogBkEDa0EBdiIBQQdxIQJBACEAIAFBAWtBB08EQCABQfj///8HcSEFA0AgAEEDdCIBQbCJAmogCjcDACABQQhyQbCJAmogCjcDACABQRByQbCJAmogCjcDACABQRhyQbCJAmogCjcDACABQSByQbCJAmogCjcDACABQShyQbCJAmogCjcDACABQTByQbCJAmogCjcDACABQThyQbCJAmogCjcDACAAQQhqIQAgBUEIayIFDQALCyACRQ0AA0AgAEEDdEGwiQJqIAo3AwAgAEEBaiEAIAJBAWsiAg0ACwtBwIkGQbCJAiAGQQJ0IgD8CgAAQdCJCkGwiQIgAPwKAABB4IkOQbCJAiAA/AoAAEHwiRJBsIkCIAD8CgAAQYCKFkGwiQIgAPwKAAAgBCECDAELAkAgAEE7Rw0AQewIKAIAIgBBB0oNAEHsCCAAQQFqNgIAIABBAnRB8AhqQQA2AgALIAEhBwsgCCAJSQ0ACwtB5AggAzYCAEHgCCACNgIAQegIIAc2AgAL4gcCBX8BfgJAQdAIAn8CQAJAIAAgAU4NACABQZCJAWohBiAAQZCJAWohBQNAIAUtAAAiA0H/AHEhAgJAAkACQAJAAkACQAJAQeAIKAIAIgRBIkcEQCAEDQcgAkEiRgRAQewIQgE3AgBB4AhBIjYCAAwICyACQT9rQcAASQ0GIANBIWsiAkEMTQ0BDAULAkAgAkEwayIEQQlNBEBB7AgoAgBBAnRB7AhqIgIgBCACKAIAQQpsajYCAAwBC0HsCCgCACEEIAJBO0YEQCAEQQdKDQFB7AggBEEBajYCACAEQQJ0QfAIakEANgIADAELIARBBEYEQEHECEECNgIAQbAIQfAIKQMANwMAQbgIQfgIKAIAIgI2AgBBvAhB/AgoAgAiBDYCAEHICEECQQFBwAgoAgAiAxs2AgBBrAggBEEAIAMbNgIAQagIIAJBgIABIAJBgIABSBtBBGpBACADGzYCAEHgCEEANgIADAoLIAJBP2tBwABJDQQLIANBIWsiAkEMTQ0BDAILQQEgAnRBjSBxRQ0DDAQLQQEgAnRBjSBxDQELIANBoQFrIgJBDEsNA0EBIAJ0QY0gcUUNAwtBxAhCgYCAgBA3AgBBsAhB8AgoAgBBAEHsCCgCACICQQBKGzYCAEG0CEH0CCgCAEEAIAJBAUobNgIAQbgIQfgIKAIAQQAgAkECShs2AgBB4AhBADYCAEG8CEEANgIADAQLIANBoQFrIgJBDEsNAUEBIAJ0QY0gcUUNAQtBxAhCgYCAgBA3AgBBsAhCADcDAEG4CEIANwMADAMLIAVBAWoiBSAGSQ0ACwsCQEHICCgCAA4DAwEAAQsCQEGoCCgCACIFQQVIDQBBoAgpAwAhByAFQQNrQQF2IgNBB3EhBEEAIQIgA0EBa0EHTwRAIANB+P///wdxIQYDQCACQQN0IgNBsIkCaiAHNwMAIANBCHJBsIkCaiAHNwMAIANBEHJBsIkCaiAHNwMAIANBGHJBsIkCaiAHNwMAIANBIHJBsIkCaiAHNwMAIANBKHJBsIkCaiAHNwMAIANBMHJBsIkCaiAHNwMAIANBOHJBsIkCaiAHNwMAIAJBCGohAiAGQQhrIgYNAAsLIARFDQADQCACQQN0QbCJAmogBzcDACACQQFqIQIgBEEBayIEDQALC0HAiQZBsIkCIAVBAnQiA/wKAABB0IkKQbCJAiAD/AoAAEHgiQ5BsIkCIAP8CgAAQfCJEkGwiQIgA/wKAABBgIoWQbCJAiAD/AoAAEECDAELEAhByAgoAgALEAEiAjYCACACDQAgACABQcgIKAIAQQJ0QYAIaigCABEBAAsLdABB6AhBBDYCAEHkCCAANgIAQewIQgE3AgBBxAhCADcCAEHACCADNgIAQdwIQgA3AgBBqAhCADcDAEGwCEIANwMAQbgIQgA3AwBBzAggAkGAICACQYAgSRs2AgBBoAggAa1CgYCAgBB+NwMAQdAIQQA2AgALIwBB0AgoAgBFBEAgACABQcgIKAIAQQJ0QYAIaigCABEBAAsLWgECfwJAAkACQEHICCgCAEEBaw4CAAECC0HYCEHoCCgCACIAQdgIKAIAIgEgACABShsiAEGAgAEgAEGAgAFIGyIANgIAIABBBGsPC0GoCCgCAEEEayEACyAAC0IBAX8Cf0EGQdwIKAIAIgBBIHENABpBBSAAQRBxDQAaQQQgAEEIcQ0AGkEDIABBBHENABpBAiAAQQFxIABBAnEbCwu9BQEFfQJ/IAJFBEAgAUH/AWxBMmpB5ABtIgBBCHQgAHIgAEEQdHIMAQsgArJDAADIQpUhBiAAQfABarJDAAC0Q5UhBQJ9IAGyQwAAyEKVIgNDAAAAP10EQCADIAZDAACAP5KUDAELIAYgA0MAAIA/IAaTlJILIQcgAyADkiEGAkAgBUOrqqo+kiIEQwAAAABdBEAgBEMAAIA/kiEEDAELIARDAACAP15FDQAgBEMAAIC/kiEECyAGIAeTIQMgBUMAAAAAXSEAAn8CfSADIAcgA5NDAADAQJQgBJSSIARDq6oqPl0NABogByAEQwAAAD9dDQAaIAMgBEOrqio/XUUNABogAyAHIAOTIARDAADAwJRDAACAQJKUkgtDAAB/Q5RDAAAAP5IiBkMAAIBPXSAGQwAAAABgcQRAIAapDAELQQALIQECQCAABEAgBUMAAIA/kiEEDAELIAUiBEMAAIA/XkUNACAFQwAAgL+SIQQLIAVDq6qqvpIiBUMAAAAAXSECAn8CfSADIAcgA5NDAADAQJQgBJSSIARDq6oqPl0NABogByAEQwAAAD9dDQAaIAMgBEOrqio/XUUNABogAyAHIAOTIARDAADAwJRDAACAQJKUkgtDAAB/Q5RDAAAAP5IiBkMAAIBPXSAGQwAAAABgcQRAIAapDAELQQALIQACQCACBEAgBUMAAIA/kiEFDAELIAVDAACAP15FDQAgBUMAAIC/kiEFCwJAIAVDq6oqPl0EQCADIAcgA5NDAADAQJQgBZSSIQcMAQsgBUMAAAA/XQ0AIAVDq6oqP11FBEAgAyEHDAELIAMgByADkyAFQwAAwMCUQwAAgECSlJIhBwsgAEEIdAJ/IAdDAAB/Q5RDAAAAP5IiBkMAAIBPXSAGQwAAAABgcQRAIAapDAELQQALQRB0ciABcgtBgICAeHILNwAgAEH/AWxBMmpB5ABtIAFB/wFsQTJqQeQAbUEIdHIgAkH/AWxBMmpB5ABtQRB0ckGAgIB4cgsEACMACwYAIAAkAAsQACMAIABrQXBxIgAkACAACwsYAQBBgAgLEQEAAAACAAAAAwAAAAQAAAAF`}})),vA=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.decodeAsync=e.decode=e.Decoder=e.DecoderAsync=void 0;var t=gA(),n=_A();function r(e){if(typeof Buffer<`u`)return Buffer.from(e,`base64`);let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<n.length;++e)n[e]=t.charCodeAt(e);return n}var i=r(n.LIMITS.BYTES),a,o=new Uint32Array,s=class{constructor(){this.bandHandler=e=>1,this.modeHandler=e=>1}handle_band(e){return this.bandHandler(e)}mode_parsed(e){return this.modeHandler(e)}},c={memoryLimit:134217728,sixelColor:t.DEFAULT_FOREGROUND,fillColor:t.DEFAULT_BACKGROUND,palette:t.PALETTE_VT340_COLOR,paletteLimit:n.LIMITS.PALETTE_SIZE,truncate:!0};function l(e){let t=new s,n={env:{handle_band:t.handle_band.bind(t),mode_parsed:t.mode_parsed.bind(t)}};return WebAssembly.instantiate(a||i,n).then(n=>(a||=n.module,new u(e,n.instance||n,t)))}e.DecoderAsync=l;var u=class{constructor(e,r,s){if(this._PIXEL_OFFSET=n.LIMITS.MAX_WIDTH+4,this._canvas=o,this._bandWidths=[],this._maxWidth=0,this._minWidth=n.LIMITS.MAX_WIDTH,this._lastOffset=0,this._currentHeight=0,this._opts=Object.assign({},c,e),this._opts.paletteLimit>n.LIMITS.PALETTE_SIZE)throw Error(`DecoderOptions.paletteLimit must not exceed ${n.LIMITS.PALETTE_SIZE}`);if(r)s.bandHandler=this._handle_band.bind(this),s.modeHandler=this._initCanvas.bind(this);else{let e=a||=new WebAssembly.Module(i);r=new WebAssembly.Instance(e,{env:{handle_band:this._handle_band.bind(this),mode_parsed:this._initCanvas.bind(this)}})}this._instance=r,this._wasm=this._instance.exports,this._chunk=new Uint8Array(this._wasm.memory.buffer,this._wasm.get_chunk_address(),n.LIMITS.CHUNK_SIZE),this._states=new Uint32Array(this._wasm.memory.buffer,this._wasm.get_state_address(),12),this._palette=new Uint32Array(this._wasm.memory.buffer,this._wasm.get_palette_address(),n.LIMITS.PALETTE_SIZE),this._palette.set(this._opts.palette),this._pSrc=new Uint32Array(this._wasm.memory.buffer,this._wasm.get_p0_address()),this._wasm.init(t.DEFAULT_FOREGROUND,0,this._opts.paletteLimit,0)}get _fillColor(){return this._states[0]}get _truncate(){return this._states[8]}get _rasterWidth(){return this._states[6]}get _rasterHeight(){return this._states[7]}get _width(){return this._states[2]?this._states[2]-4:0}get _height(){return this._states[3]}get _level(){return this._states[9]}get _mode(){return this._states[10]}get _paletteLimit(){return this._states[11]}_initCanvas(e){if(e===2){let e=this.width*this.height;if(e>this._canvas.length){if(this._opts.memoryLimit&&e*4>this._opts.memoryLimit)throw this.release(),Error(`image exceeds memory limit`);this._canvas=new Uint32Array(e)}this._maxWidth=this._width}else if(e===1){if(this._level===2){let e=Math.min(this._rasterWidth,n.LIMITS.MAX_WIDTH)*this._rasterHeight;if(e>this._canvas.length){if(this._opts.memoryLimit&&e*4>this._opts.memoryLimit)throw this.release(),Error(`image exceeds memory limit`);this._canvas=new Uint32Array(e)}}else this._canvas.length<65536&&(this._canvas=new Uint32Array(65536))}return 0}_realloc(e,t){let n=e+t;if(n>this._canvas.length){if(this._opts.memoryLimit&&n*4>this._opts.memoryLimit)throw this.release(),Error(`image exceeds memory limit`);let e=new Uint32Array(Math.ceil(n/65536)*65536);e.set(this._canvas),this._canvas=e}}_handle_band(e){let t=this._PIXEL_OFFSET,n=this._lastOffset;if(this._mode===2){let r=this.height-this._currentHeight,i=0;for(;i<6&&r>0;)this._canvas.set(this._pSrc.subarray(t*i,t*i+e),n+e*i),i++,r--;this._lastOffset+=e*i,this._currentHeight+=i}else if(this._mode===1){this._realloc(n,e*6),this._maxWidth=Math.max(this._maxWidth,e),this._minWidth=Math.min(this._minWidth,e);for(let r=0;r<6;++r)this._canvas.set(this._pSrc.subarray(t*r,t*r+e),n+e*r);this._bandWidths.push(e),this._lastOffset+=e*6,this._currentHeight+=6}return 0}get width(){return this._mode===1?Math.max(this._maxWidth,this._wasm.current_width()):this._width}get height(){return this._mode===1?this._wasm.current_width()?this._bandWidths.length*6+this._wasm.current_height():this._bandWidths.length*6:this._height}get palette(){return this._palette.subarray(0,this._paletteLimit)}get memoryUsage(){return this._canvas.byteLength+this._wasm.memory.buffer.byteLength+8*this._bandWidths.length}get properties(){return{width:this.width,height:this.height,mode:this._mode,level:this._level,truncate:!!this._truncate,paletteLimit:this._paletteLimit,fillColor:this._fillColor,memUsage:this.memoryUsage,rasterAttributes:{numerator:this._states[4],denominator:this._states[5],width:this._rasterWidth,height:this._rasterHeight}}}init(e=this._opts.fillColor,t=this._opts.palette,r=this._opts.paletteLimit,i=this._opts.truncate){this._wasm.init(this._opts.sixelColor,e,r,+!!i),t&&this._palette.set(t.subarray(0,n.LIMITS.PALETTE_SIZE)),this._bandWidths.length=0,this._maxWidth=0,this._minWidth=n.LIMITS.MAX_WIDTH,this._lastOffset=0,this._currentHeight=0}decode(e,t=0,r=e.length){let i=t;for(;i<r;){let t=Math.min(r-i,n.LIMITS.CHUNK_SIZE);this._chunk.set(e.subarray(i,i+=t)),this._wasm.decode(0,t)}}decodeString(e,t=0,r=e.length){let i=t;for(;i<r;){let t=Math.min(r-i,n.LIMITS.CHUNK_SIZE);for(let n=0,r=i;n<t;++n,++r)this._chunk[n]=e.charCodeAt(r);i+=t,this._wasm.decode(0,t)}}get data32(){if(this._mode===0||!this.width||!this.height)return o;let e=this._wasm.current_width();if(this._mode===2){let t=this.height-this._currentHeight;if(t>0){let n=this._PIXEL_OFFSET,r=this._lastOffset,i=0;for(;i<6&&t>0;)this._canvas.set(this._pSrc.subarray(n*i,n*i+e),r+e*i),i++,t--;t&&this._canvas.fill(this._fillColor,r+e*i)}return this._canvas.subarray(0,this.width*this.height)}if(this._mode===1){if(this._minWidth===this._maxWidth){let t=!1;if(e){if(e!==this._minWidth)t=!0;else{let t=this._PIXEL_OFFSET,n=this._lastOffset;this._realloc(n,e*6);for(let r=0;r<6;++r)this._canvas.set(this._pSrc.subarray(t*r,t*r+e),n+e*r)}}if(!t)return this._canvas.subarray(0,this.width*this.height)}let t=new Uint32Array(this.width*this.height);t.fill(this._fillColor);let n=0,r=0;for(let e=0;e<this._bandWidths.length;++e){let i=this._bandWidths[e];for(let e=0;e<6;++e)t.set(this._canvas.subarray(r,r+=i),n),n+=this.width}if(e){let r=this._PIXEL_OFFSET,i=this._wasm.current_height();for(let a=0;a<i;++a)t.set(this._pSrc.subarray(r*a,r*a+e),n+this.width*a)}return t}return o}get data8(){return new Uint8ClampedArray(this.data32.buffer,0,this.width*this.height*4)}release(){this._canvas=o,this._bandWidths.length=0,this._maxWidth=0,this._minWidth=n.LIMITS.MAX_WIDTH,this._wasm.init(t.DEFAULT_FOREGROUND,0,this._opts.paletteLimit,0)}};e.Decoder=u;function d(e,t){let n=new u(t);return n.init(),typeof e==`string`?n.decodeString(e):n.decode(e),{width:n.width,height:n.height,data32:n.data32,data8:n.data8}}e.decode=d;async function f(e,t){let n=await l(t);return n.init(),typeof e==`string`?n.decodeString(e):n.decode(e),{width:n.width,height:n.height,data32:n.data32,data8:n.data8}}e.decodeAsync=f})),yA=gA(),bA=vA(),xA=yA.PALETTE_ANSI_256.slice();xA.set(yA.PALETTE_VT340_COLOR);var SA=200,CA=new TextEncoder,wA=`offsite-image:`;async function TA(e){let t=await(0,bA.decodeAsync)(e,{fillColor:0,palette:xA});return!t.width||!t.height?null:createImageBitmap(new ImageData(new Uint8ClampedArray(t.data8),t.width,t.height))}function EA(e,t,n){return e===void 0||e===`auto`?0:e.endsWith(`%`)?parseInt(e.slice(0,-1))*t/100:e.endsWith(`px`)?parseInt(e.slice(0,-2)):parseInt(e)*n}async function DA(e,t){let n=e.indexOf(`:`);if(n===-1)return null;let r=new Map(e.slice(0,n).split(`;`).map(e=>{let t=e.indexOf(`=`);return[e.slice(0,t),e.slice(t+1)]}));if(r.get(`inline`)!==`1`)return null;let i=Uint8Array.from(atob(e.slice(n+1)),e=>e.charCodeAt(0)),a=await createImageBitmap(new Blob([i])),o=EA(r.get(`width`),t.width,t.cellWidth),s=EA(r.get(`height`),t.height,t.cellHeight),c=[a.width,a.height];if(!o&&!s){let e=Math.min(t.width/a.width,(t.height-t.cellHeight)/a.height);e<1&&(c=[a.width*e,a.height*e])}else c=o?r.get(`preserveAspectRatio`)!==`0`||!s?[o,a.height*o/a.width]:[o,s]:[a.width*s/a.height,s];let[l,u]=c.map(e=>Math.max(1,Math.floor(e*t.pixelRatio))),d=await createImageBitmap(a,{resizeWidth:l,resizeHeight:u});return a.close(),d}function OA(e){let t=hA(e),{width:n,height:r,depth:i,channels:a}=t,o=n*r,s=new Uint8Array(o*4);if(t.palette){let e=pA(t),i=t.palette[0].length;for(let t=0;t<o;t+=1)s.set(e.subarray(t*i,t*i+3),t*4),s[t*4+3]=i===4?e[t*i+3]:255;return{width:n,height:r,data:s}}let c=2**i-1,l=Math.ceil(n*i/8);function u(e){if(i>=8)return t.data[e];let r=e%n*i;return t.data[Math.floor(e/n)*l+(r>>3)]>>8-i-(r&7)&c}function d(e){return i===16?e>>8:i===8?e:Math.round(e*255/c)}let f=t.transparency;for(let e=0;e<o;e+=1){let t=e*4;if(a===1||a===2){let n=u(e*a);s.fill(d(n),t,t+3),s[t+3]=a===2?d(u(e*2+1)):f?.[0]===n?0:255}else if(a===3||a===4){let n=u(e*a),r=u(e*a+1),i=u(e*a+2);s[t]=d(n),s[t+1]=d(r),s[t+2]=d(i),s[t+3]=a===4?d(u(e*4+3)):f?.[0]===n&&f[1]===r&&f[2]===i?0:255}else throw Error(`unsupported PNG with ${a} channels`)}return{width:n,height:r,data:s}}var kA=class{core;images=[];nextImage=0;constructor(e){this.core=e}place(e,t,n){let r=`${wA}${this.nextImage++}`;this.core.write(CA.encode(`\x1b]8;;${r}\x1b\\ \x1b]8;;\x1b\\\b`));let i={ref:this.core.trackCursor(),marker:r,bitmap:e,width:e.width/t,height:e.height/t,alternate:this.core.isAlternateScreen()};if(this.images.push(i),this.images.length>SA){let e=this.images.shift();e&&this.remove(e)}let a=Math.ceil(i.height/n);a>1&&this.core.write(CA.encode(`\x1BD`.repeat(a-1)))}visible(e,t,n){if(this.images.length===0)return[];let r=this.core.isAlternateScreen(),i=[],a=[];for(let o of this.images){if(o.alternate!==r){a.push(o);continue}let s=this.core.trackedPoint(o.ref);if(s===null||this.core.trackedHyperlink(o.ref)!==o.marker){this.remove(o);continue}a.push(o);let c=s.y-e;c+Math.ceil(o.height/n)<=0||c>=t||i.push({bitmap:o.bitmap,width:o.width,height:o.height,x:s.x,y:c})}return this.images=a,i}clear(){for(let e of this.images)this.remove(e);this.images=[]}remove(e){this.core.untrack(e.ref),e.bitmap.close()}},AA=new Uint8Array([0,97,115,109,1,0,0,0,1,35,5,96,4,127,127,127,127,0,96,3,127,127,127,1,127,96,2,127,127,0,96,3,127,127,127,0,96,5,127,127,127,127,127,1,127,2,49,6,3,101,110,118,1,119,0,0,3,101,110,118,1,100,0,1,3,101,110,118,1,115,0,1,3,101,110,118,1,98,0,2,3,101,110,118,1,118,0,3,3,101,110,118,1,112,0,4,7,25,6,1,119,0,0,1,100,0,1,1,115,0,2,1,98,0,3,1,118,0,4,1,112,0,5]),jA={userdata:0,writePty:1,bell:2,xtversion:4,size:6,deviceAttributes:8},MA=1,NA=-3,PA={width:0,height:4,data:8,length:12},FA=new TextDecoder,IA=new TextEncoder,LA=class e{memory;layouts;exports;memoryView;hosts=new Map;nextHostId=1;callbacks={writePty:0,deviceAttributes:0,size:0,bell:0,xtversion:0};version={pointer:0,size:0};constructor(e){this.exports=e.exports;let t=e.exports.memory;if(!(t instanceof WebAssembly.Memory))throw Error(`libghostty-vt did not export its memory`);this.memory=t,this.memoryView=new DataView(t.buffer);let n=this.call(`ghostty_type_json`),r=new Uint8Array(t.buffer),i=n;for(;i<r.length&&r[i]!==0;)i+=1;this.layouts=JSON.parse(FA.decode(r.subarray(n,i)))}static async load(){let t=await fetch(RO);if(!t.ok)throw Error(`could not load libghostty-vt (${t.status})`);let n=null,r=await WebAssembly.instantiate(await t.arrayBuffer(),{env:{log:(e,t)=>{n&&console.debug(`[libghostty-vt]`,FA.decode(new Uint8Array(n.buffer,e,t)))}}}),i=new e(r.instance);return n=i.memory,i.installCallbacks(),i}call(e,...t){let n=this.exports[e];if(typeof n!=`function`)throw Error(`libghostty-vt export is missing: ${e}`);return n(...t)}layout(e){let t=this.layouts[e];if(!t)throw Error(`libghostty-vt layout is missing: ${e}`);return t}field(e,t){let n=this.layout(e).fields[t];if(!n)throw Error(`libghostty-vt field is missing: ${e}.${t}`);return n}alloc(e){let t=this.call(`ghostty_wasm_alloc_u8_array`,e);if(t===0)throw Error(`libghostty-vt could not allocate ${e} bytes`);return new Uint8Array(this.memory.buffer,t,e).fill(0),t}free(e,t){e!==0&&this.call(`ghostty_wasm_free_u8_array`,e,t)}allocOpaque(){let e=this.call(`ghostty_wasm_alloc_opaque`);if(e===0)throw Error(`libghostty-vt could not allocate a pointer`);return new DataView(this.memory.buffer).setUint32(e,0,!0),e}freeOpaque(e){e!==0&&this.call(`ghostty_wasm_free_opaque`,e)}readPointer(e){return this.dataView().getUint32(e,!0)}check(e,t){if(t!==0)throw Error(`${e} failed with result ${t}`)}flag(e,t,n){let r=this.alloc(1),i=this.call(e,t,n,r),a=this.bytes(r,1)[0];return this.free(r,1),i===0&&a!==0}encodeOutput(e){let t=this.call(`ghostty_wasm_alloc_usize`),n=``,r=e(0,0,t),i=this.view(t,4).getUint32(0,!0);if(r===NA&&i>0){let r=this.alloc(i),a=e(r,i,t),o=this.view(t,4).getUint32(0,!0);a===0&&(n=FA.decode(this.bytes(r,o))),this.free(r,i)}return this.call(`ghostty_wasm_free_usize`,t),n}attachHost(e,t){let n=this.nextHostId++;this.hosts.set(n,t),this.call(`ghostty_terminal_set`,e,jA.userdata,n);for(let t of[[jA.writePty,this.callbacks.writePty],[jA.deviceAttributes,this.callbacks.deviceAttributes],[jA.size,this.callbacks.size],[jA.bell,this.callbacks.bell],[jA.xtversion,this.callbacks.xtversion]])this.call(`ghostty_terminal_set`,e,t[0],t[1]);return n}detachHost(e,t){this.call(`ghostty_terminal_set`,e,jA.xtversion,0),this.call(`ghostty_terminal_set`,e,jA.bell,0),this.call(`ghostty_terminal_set`,e,jA.size,0),this.call(`ghostty_terminal_set`,e,jA.deviceAttributes,0),this.call(`ghostty_terminal_set`,e,jA.writePty,0),this.call(`ghostty_terminal_set`,e,jA.userdata,0),this.hosts.delete(t)}view(e,t){return new DataView(this.memory.buffer,e,t)}bytes(e,t){return new Uint8Array(this.memory.buffer,e,t)}dataView(){return this.memoryView.buffer!==this.memory.buffer&&(this.memoryView=new DataView(this.memory.buffer)),this.memoryView}setField(e,t,n,r){let i=this.field(t,n),a=this.dataView(),o=e+i.offset;if(i.type===`bool`||i.type===`u8`)a.setUint8(o,r);else if(i.type===`u16`)a.setUint16(o,r,!0);else if(i.type===`i32`)a.setInt32(o,r,!0);else if(i.type===`u32`||i.type===`enum`)a.setUint32(o,r,!0);else if(i.type===`u64`)a.setBigUint64(o,BigInt(r),!0);else throw Error(`unsupported libghostty-vt field type ${i.type}`)}readField(e,t,n){let r=this.field(t,n),i=this.dataView(),a=e+r.offset;if(r.type===`bool`||r.type===`u8`)return i.getUint8(a);if(r.type===`u16`)return i.getUint16(a,!0);if(r.type===`i32`)return i.getInt32(a,!0);if(r.type===`u32`||r.type===`enum`)return i.getUint32(a,!0);if(r.type===`u64`)return Number(i.getBigUint64(a,!0));throw Error(`unsupported libghostty-vt field type ${r.type}`)}installCallbacks(){let e=new WebAssembly.Instance(new WebAssembly.Module(AA),{env:{w:(e,t,n,r)=>{let i=this.hosts.get(t);i&&r!==0&&i.write(FA.decode(new Uint8Array(this.memory.buffer,n,r)))},d:(e,t,n)=>this.hosts.has(t)?(this.writeDeviceAttributes(n),1):0,s:(e,t,n)=>{let r=this.hosts.get(t);if(!r)return 0;let i=r.size(),a=`GhosttySizeReportSize`;return this.setField(n,a,`rows`,i.rows),this.setField(n,a,`columns`,i.columns),this.setField(n,a,`cell_width`,i.cellWidth),this.setField(n,a,`cell_height`,i.cellHeight),1},b:(e,t)=>{this.hosts.get(t)?.bell()},v:(e,t,n)=>{let r=this.hosts.get(n);r&&this.writeVersion(e,r.version())},p:(e,t,n,r,i)=>this.decodePng(t,n,r,i)}}),t=this.exports.__indirect_function_table;if(!(t instanceof WebAssembly.Table))throw Error(`libghostty-vt did not expose its callback table`);let n=[`w`,`d`,`s`,`b`,`v`,`p`].map(n=>{let r=e.exports[n];if(typeof r!=`function`)throw Error(`libghostty-vt callback is missing: ${n}`);let i=t.length;return t.grow(1),t.set(i,r),i});if(this.callbacks={writePty:n[0],deviceAttributes:n[1],size:n[2],bell:n[3],xtversion:n[4]},this.call(`ghostty_sys_set`,MA,n[5])!==0)throw Error(`libghostty-vt did not accept the PNG decoder`)}decodePng(e,t,n,r){let i;try{i=OA(new Uint8Array(this.memory.buffer,t,n))}catch(e){return console.warn(`could not decode a kitty PNG image`,e),0}let a=this.call(`ghostty_alloc`,e,i.data.length);if(a===0)return 0;this.bytes(a,i.data.length).set(i.data);let o=this.dataView();return o.setUint32(r+PA.width,i.width,!0),o.setUint32(r+PA.height,i.height,!0),o.setUint32(r+PA.data,a,!0),o.setUint32(r+PA.length,i.data.length,!0),1}writeVersion(e,t){let n=IA.encode(t);this.free(this.version.pointer,this.version.size);let r=this.alloc(n.length);this.bytes(r,n.length).set(n),this.version={pointer:r,size:n.length},this.dataView().setUint32(e+this.field(`GhosttyString`,`ptr`).offset,r,!0),this.setField(e,`GhosttyString`,`len`,n.length)}writeDeviceAttributes(e){let t=e+this.field(`GhosttyDeviceAttributes`,`primary`).offset,n=e+this.field(`GhosttyDeviceAttributes`,`secondary`).offset,r=e+this.field(`GhosttyDeviceAttributes`,`tertiary`).offset,i=`GhosttyDeviceAttributesPrimary`,a=`GhosttyDeviceAttributesSecondary`,o=t+this.field(i,`features`).offset,s=this.dataView(),c=[4,22];c.forEach((e,t)=>s.setUint16(o+t*2,e,!0)),this.setField(t,i,`conformance_level`,62),this.setField(t,i,`num_features`,c.length),this.setField(n,a,`device_type`,0),this.setField(n,a,`firmware_version`,276),this.setField(n,a,`rom_cartridge`,0),this.setField(r,`GhosttyDeviceAttributesTertiary`,`unit_id`,0)}},RA=null;async function zA(){RA=await LA.load()}function BA(){if(!RA)throw Error(`libghostty-vt is not loaded`);return RA}var VA=new Map(`Unidentified.Backquote.Backslash.BracketLeft.BracketRight.Comma.Digit0.Digit1.Digit2.Digit3.Digit4.Digit5.Digit6.Digit7.Digit8.Digit9.Equal.IntlBackslash.IntlRo.IntlYen.KeyA.KeyB.KeyC.KeyD.KeyE.KeyF.KeyG.KeyH.KeyI.KeyJ.KeyK.KeyL.KeyM.KeyN.KeyO.KeyP.KeyQ.KeyR.KeyS.KeyT.KeyU.KeyV.KeyW.KeyX.KeyY.KeyZ.Minus.Period.Quote.Semicolon.Slash.AltLeft.AltRight.Backspace.CapsLock.ContextMenu.ControlLeft.ControlRight.Enter.MetaLeft.MetaRight.ShiftLeft.ShiftRight.Space.Tab.Convert.KanaMode.NonConvert.Delete.End.Help.Home.Insert.PageDown.PageUp.ArrowDown.ArrowLeft.ArrowRight.ArrowUp.NumLock.Numpad0.Numpad1.Numpad2.Numpad3.Numpad4.Numpad5.Numpad6.Numpad7.Numpad8.Numpad9.NumpadAdd.NumpadBackspace.NumpadClear.NumpadClearEntry.NumpadComma.NumpadDecimal.NumpadDivide.NumpadEnter.NumpadEqual.NumpadMemoryAdd.NumpadMemoryClear.NumpadMemoryRecall.NumpadMemoryStore.NumpadMemorySubtract.NumpadMultiply.NumpadParenLeft.NumpadParenRight.NumpadSubtract.NumpadSeparator.NumpadArrowUp.NumpadArrowDown.NumpadArrowRight.NumpadArrowLeft.NumpadBegin.NumpadHome.NumpadEnd.NumpadInsert.NumpadDelete.NumpadPageUp.NumpadPageDown.Escape.F1.F2.F3.F4.F5.F6.F7.F8.F9.F10.F11.F12.F13.F14.F15.F16.F17.F18.F19.F20.F21.F22.F23.F24.F25.Fn.FnLock.PrintScreen.ScrollLock.Pause.BrowserBack.BrowserFavorites.BrowserForward.BrowserHome.BrowserRefresh.BrowserSearch.BrowserStop.Eject.LaunchApp1.LaunchApp2.LaunchMail.MediaPlayPause.MediaSelect.MediaStop.MediaTrackNext.MediaTrackPrevious.Power.Sleep.AudioVolumeDown.AudioVolumeMute.AudioVolumeUp.WakeUp.Copy.Cut.Paste`.split(`.`).map((e,t)=>[e,t]));function HA(e){return VA.get(e)??0}var UA=new Map([[`!`,`1`],[`@`,`2`],[`#`,`3`],[`$`,`4`],[`%`,`5`],[`^`,`6`],[`&`,`7`],[`*`,`8`],[`(`,`9`],[`)`,`0`],[`~`,"`"],[`_`,`-`],[`+`,`=`],[`{`,`[`],[`}`,`]`],[`|`,`\\`],[`:`,`;`],[`"`,`'`],[`<`,`,`],[`>`,`.`],[`?`,`/`]]),WA;function GA(){return WA||(WA=globalThis.navigator?.keyboard?.getLayoutMap().catch(()=>void 0)??Promise.resolve(void 0),WA)}function KA(){return WA=void 0,GA()}function qA(e){return!e.shiftKey||e.ctrlKey||e.altKey||e.metaKey?0:+([...e.key].length===1)}function JA(e,t){if([...e.key].length!==1)return 0;let n=t?.get(e.code);if(n&&[...n].length===1)return n.codePointAt(0)??0;if(/^[A-Z]$/u.test(e.key))return e.key.charCodeAt(0)+32;if(e.shiftKey){let t=UA.get(e.key);if(t)return t.codePointAt(0)??0;let n=e.key.toLowerCase();return n!==e.key&&[...n].length===1?n.codePointAt(0)??0:0}return e.key.codePointAt(0)??0}var YA=new Map([[`Backquote`,"`"],[`Minus`,`-`],[`Equal`,`=`],[`BracketLeft`,`[`],[`BracketRight`,`]`],[`Backslash`,`\\`],[`Semicolon`,`;`],[`Quote`,`'`],[`Comma`,`,`],[`Period`,`.`],[`Slash`,`/`],[`Space`,` `]]),XA=[...`0123456789`].map(e=>[`Digit${e}`,e]),ZA=new Map([...UA].map(e=>[e[1],e[0]]));function QA(e){return/^Key[A-Z]$/u.test(e)?e[3].toLowerCase():/^Digit[0-9]$/u.test(e)?e[5]:YA.get(e)}function $A(e){return[...YA,...XA].every(t=>t[0]===`Space`||e.get(t[0])===t[1])}function ej(e,t){let n=t?.get(e.code),r=n&&[...n].length===1?n:QA(e.code);if(r===void 0)return[...e.key].length===1?null:e.key;if(!e.shiftKey)return r;let i=r.toUpperCase();return i!==r&&[...i].length===1?i:t===void 0||!$A(t)?null:ZA.get(r)??r}var tj=new TextEncoder,nj=new Map([[`[`,`\x1B`],[`m`,`\r`],[`i`,` `],[`@`,`\0`]]),rj=class{runtime=BA();terminal;keyEncoderSlot;keyEncoder;keyEventSlot;keyEvent;mouseEncoderSlot;mouseEncoder;mouseEventSlot;mouseEvent;scratch;keyboardLayoutMap;constructor(e){let t=this.runtime;this.terminal=e,this.loadKeyboardLayout(GA()),this.keyEncoderSlot=t.allocOpaque(),t.check(`ghostty_key_encoder_new`,t.call(`ghostty_key_encoder_new`,0,this.keyEncoderSlot)),this.keyEncoder=t.readPointer(this.keyEncoderSlot),this.keyEventSlot=t.allocOpaque(),t.check(`ghostty_key_event_new`,t.call(`ghostty_key_event_new`,0,this.keyEventSlot)),this.keyEvent=t.readPointer(this.keyEventSlot),this.mouseEncoderSlot=t.allocOpaque(),t.check(`ghostty_mouse_encoder_new`,t.call(`ghostty_mouse_encoder_new`,0,this.mouseEncoderSlot)),this.mouseEncoder=t.readPointer(this.mouseEncoderSlot),this.mouseEventSlot=t.allocOpaque(),t.check(`ghostty_mouse_event_new`,t.call(`ghostty_mouse_event_new`,0,this.mouseEventSlot)),this.mouseEvent=t.readPointer(this.mouseEventSlot),this.scratch=t.alloc(1)}encodeKey(e,t=`press`,n=!1){let r=this.runtime,i=e.key.toLowerCase(),a=nj.get(i);if(a!==void 0&&t===`press`&&e.ctrlKey&&!e.altKey&&!e.metaKey&&!(e.shiftKey&&/^[a-z]$/u.test(i))&&!r.flag(`ghostty_terminal_get`,this.terminal,8))return a;let o=n?this.metaText(e):null,s=o??e.key;if(o!==null&&t===`press`&&!e.ctrlKey&&[...s].length===1&&(s.codePointAt(0)??0)>127&&r.flag(`ghostty_terminal_mode_get`,this.terminal,1036)&&this.isLegacyKeyboard())return`\x1b${s}`;r.call(`ghostty_key_encoder_setopt_from_terminal`,this.keyEncoder,this.terminal),r.call(`ghostty_key_event_set_action`,this.keyEvent,t===`release`?0:e.repeat?2:1),r.call(`ghostty_key_event_set_key`,this.keyEvent,HA(e.code));let c=+!!e.shiftKey|(e.ctrlKey?2:0)|(e.altKey?4:0)|(e.metaKey?8:0)|(e.getModifierState(`CapsLock`)?16:0)|(e.getModifierState(`NumLock`)?32:0);r.call(`ghostty_key_event_set_mods`,this.keyEvent,c),r.call(`ghostty_key_event_set_consumed_mods`,this.keyEvent,qA(e)),r.call(`ghostty_key_event_set_composing`,this.keyEvent,+!!e.isComposing),r.call(`ghostty_key_event_set_unshifted_codepoint`,this.keyEvent,JA({code:e.code,key:s,shiftKey:e.shiftKey},this.keyboardLayoutMap));let l=tj.encode(s.length===1?s:``),u=l.length===0?0:r.alloc(l.length);u!==0&&r.bytes(u,l.length).set(l),r.call(`ghostty_key_event_set_utf8`,this.keyEvent,u,l.length);let d=r.encodeOutput((e,t,n)=>r.call(`ghostty_key_encoder_encode`,this.keyEncoder,this.keyEvent,e,t,n));return u!==0&&r.free(u,l.length),d}metaText(e){return ej(e,this.keyboardLayoutMap)}refreshKeyboardLayout(){this.loadKeyboardLayout(KA())}encodePaste(e){let t=this.runtime,n=tj.encode(e);if(n.length===0)return``;let r=t.alloc(n.length);t.bytes(r,n.length).set(n);let i=+!!t.flag(`ghostty_terminal_mode_get`,this.terminal,2004),a=t.encodeOutput((e,a,o)=>t.call(`ghostty_paste_encode`,r,n.length,i,e,a,o));return t.free(r,n.length),a}encodeMouse(e){let t=this.runtime;t.call(`ghostty_mouse_encoder_setopt_from_terminal`,this.mouseEncoder,this.terminal);let n=t.layout(`GhosttyMouseEncoderSize`),r=t.alloc(n.size);for(let i of[[`size`,n.size],[`screen_width`,e.screenWidth],[`screen_height`,e.screenHeight],[`cell_width`,e.cellWidth],[`cell_height`,e.cellHeight],[`padding_top`,0],[`padding_bottom`,0],[`padding_right`,0],[`padding_left`,0]])t.setField(r,`GhosttyMouseEncoderSize`,i[0],Math.max(0,Math.round(i[1])));t.call(`ghostty_mouse_encoder_setopt`,this.mouseEncoder,2,r),t.free(r,n.size),t.bytes(this.scratch,1)[0]=+!!e.anyButtonPressed,t.call(`ghostty_mouse_encoder_setopt`,this.mouseEncoder,3,this.scratch),t.bytes(this.scratch,1)[0]=1,t.call(`ghostty_mouse_encoder_setopt`,this.mouseEncoder,4,this.scratch),t.call(`ghostty_mouse_event_set_action`,this.mouseEvent,{press:0,release:1,motion:2}[e.action]),e.button===null?t.call(`ghostty_mouse_event_clear_button`,this.mouseEvent):t.call(`ghostty_mouse_event_set_button`,this.mouseEvent,e.button),t.call(`ghostty_mouse_event_set_mods`,this.mouseEvent,e.mods);let i=t.layout(`GhosttyMousePosition`),a=t.alloc(i.size),o=t.view(a,i.size);return o.setFloat32(t.field(`GhosttyMousePosition`,`x`).offset,e.x,!0),o.setFloat32(t.field(`GhosttyMousePosition`,`y`).offset,e.y,!0),t.call(`ghostty_mouse_event_set_position`,this.mouseEvent,a),t.free(a,i.size),t.encodeOutput((e,n,r)=>t.call(`ghostty_mouse_encoder_encode`,this.mouseEncoder,this.mouseEvent,e,n,r))}dispose(){let e=this.runtime;e.call(`ghostty_mouse_event_free`,this.mouseEvent),e.call(`ghostty_mouse_encoder_free`,this.mouseEncoder),e.call(`ghostty_key_event_free`,this.keyEvent),e.call(`ghostty_key_encoder_free`,this.keyEncoder),e.free(this.scratch,1),e.freeOpaque(this.mouseEventSlot),e.freeOpaque(this.mouseEncoderSlot),e.freeOpaque(this.keyEventSlot),e.freeOpaque(this.keyEncoderSlot)}async loadKeyboardLayout(e){this.keyboardLayoutMap=await e}isLegacyKeyboard(){return this.encodeKey(new KeyboardEvent(`keydown`,{key:`Tab`,code:`Tab`,shiftKey:!0}))===`\x1B[Z`}},ij=26,aj=30,oj=1,sj={imageId:1,placementId:2,isVirtual:3,xOffset:4,yOffset:5,columns:10,rows:11,z:12},cj={width:3,height:4,format:5,data:7,length:8},lj={size:48,pixelWidth:4,pixelHeight:8,column:20,row:24,visible:28,sourceX:32,sourceY:36,sourceWidth:40,sourceHeight:44},uj=new Map([[0,3],[1,4],[3,2],[4,1]]),dj=new Map([773,781,782,784,786,829,830,831,838,842,843,844,848,849,850,855,859,867,868,869,870,871,872,873,874,875,876,877,878,879,1155,1156,1157,1158,1159,1426,1427,1428,1429,1431,1432,1433,1436,1437,1438,1439,1440,1441,1448,1449,1451,1452,1455,1476,1552,1553,1554,1555,1556,1557,1558,1559,1623,1624,1625,1626,1627,1629,1630,1750,1751,1752,1753,1754,1755,1756,1759,1760,1761,1762,1764,1767,1768,1771,1772,1840,1842,1843,1845,1846,1850,1853,1855,1856,1857,1859,1861,1863,1865,1866,2027,2028,2029,2030,2031,2032,2033,2035,2070,2071,2072,2073,2075,2076,2077,2078,2079,2080,2081,2082,2083,2085,2086,2087,2089,2090,2091,2092,2093,2385,2387,2388,3970,3971,3974,3975,4957,4958,4959,6109,6458,6679,6773,6774,6775,6776,6777,6778,6779,6780,7019,7021,7022,7023,7024,7025,7026,7027,7376,7377,7378,7386,7387,7392,7616,7617,7619,7620,7621,7622,7623,7624,7625,7627,7628,7633,7634,7635,7636,7637,7638,7639,7640,7641,7642,7643,7644,7645,7646,7647,7648,7649,7650,7651,7652,7653,7654,7678,8400,8401,8404,8405,8406,8407,8411,8412,8417,8423,8425,8432,11503,11504,11505,11744,11745,11746,11747,11748,11749,11750,11751,11752,11753,11754,11755,11756,11757,11758,11759,11760,11761,11762,11763,11764,11765,11766,11767,11768,11769,11770,11771,11772,11773,11774,11775,42607,42620,42621,42736,42737,43232,43233,43234,43235,43236,43237,43238,43239,43240,43241,43242,43243,43244,43245,43246,43247,43248,43249,43696,43698,43699,43703,43704,43710,43711,43713,65056,65057,65058,65059,65060,65061,65062,68111,68152,119173,119174,119175,119176,119177,119210,119211,119212,119213,119362,119363,119364].map((e,t)=>[e,t]));function fj(e,t,n){let r=Array.from(e).slice(1,4).map(e=>dj.get(e.codePointAt(0)??0)??null),i=r[2]??null;return{imageId:t,placementId:n,row:r[0]??null,column:r[1]??null,imageIdHigh:i!==null&&i<256?i:null}}function pj(e){let t=[];for(let n=0;n<e.length;n+=1){let r=e[n].cells,i=null;for(let e=0;e<r.length;e+=1){let a=r[e].placeholder;i!==null&&a!==null&&a.imageId===i.imageId&&a.placementId===i.placementId&&(a.row===null||a.row===i.row)&&(a.column===null||a.column===i.column+i.width)&&(a.imageIdHigh===null||a.imageIdHigh===i.imageIdHigh)?i.width+=1:(i!==null&&t.push(mj(i)),i=a===null?null:{x:e,y:n,imageId:a.imageId,imageIdHigh:a.imageIdHigh,placementId:a.placementId,row:a.row??0,column:a.column??0,width:1})}i!==null&&t.push(mj(i))}return t}function mj(e){return{x:e.x,y:e.y,imageId:e.imageId+(e.imageIdHigh??0)*2**24,placementId:e.placementId,row:e.row,column:e.column,width:e.width}}function hj(e,t,n,r){let i=t.columns===0?Math.ceil(n.width/r.width):t.columns,a=t.rows===0?Math.ceil(n.height/r.height):t.rows,o=i*r.width,s=a*r.height,c=n.width*s>n.height*o,l=c?o/Math.max(n.width,1):s/Math.max(n.height,1),u=c?0:(o-n.width*l)/2/l,d=c?(s-n.height*l)/2/l:0,f=n.width+u*2,p=n.height+d*2,m={x:f*e.column/i,y:p*e.row/a,width:f*e.width/i,height:p/a},h=0,g=0,_=e.width*r.width,v=r.height;if(m.y<d){let e=d-m.y;m.height-=e,g=e,v-=e*l,m.y=0,m.height>n.height&&(m.height=n.height,v=n.height*l)}else m.y+m.height>p-d?(m.y-=d,m.height=p-d-m.y-d,v=m.height*l):m.y-=d;if(m.x<u){let e=u-m.x;m.width-=e,h=e,_-=e*l,m.x=0,m.width>n.width&&(m.width=n.width,_=n.width*l)}else m.x+m.width>f-u?(m.x-=u,m.width=f-u-m.x-u,_=m.width*l):m.x-=u;if(m.width<=0||m.height<=0)return null;let y={xOffset:Math.round(h*l),yOffset:Math.round(g*l),width:Math.round(_),height:Math.round(v),source:{x:Math.round(m.x),y:Math.round(m.y),width:Math.round(m.width),height:Math.round(m.height)}};return y.width===0||y.height===0?null:y}function gj(e){let t=BA(),n=t.alloc(16),r=t.call(`ghostty_terminal_get`,e,ij,n);return t.free(n,16),r===0}var _j=class{runtime=BA();terminal;iteratorSlot;info;scratch;tail=[0,0];commands=0;cachedCommands=0;bitmaps=new Map;constructor(e){let t=this.runtime;this.terminal=e,this.iteratorSlot=t.allocOpaque(),t.check(`ghostty_kitty_graphics_placement_iterator_new`,t.call(`ghostty_kitty_graphics_placement_iterator_new`,0,this.iteratorSlot)),this.info=t.alloc(lj.size),this.scratch=t.alloc(16)}note(e){let t=[...this.tail,...e.subarray(0,2)],n=t.some((e,n)=>e===27&&t[n+1]===95&&t[n+2]===71),r=e.indexOf(27);for(;!n&&r!==-1;)n=e[r+1]===95&&e[r+2]===71,r=e.indexOf(27,r+1);n&&(this.commands+=1),this.tail=[...this.tail,...e.subarray(-2)].slice(-2)}images(e,t){this.commands!==this.cachedCommands&&(this.cachedCommands=this.commands,this.bitmaps.clear());let n=new Map,r=this.placements(e,t).map(e=>{let t=n.get(e.key)??this.bitmaps.get(e.key)??bj(e.image);return n.set(e.key,t),{placement:e,bitmap:t}});return this.bitmaps=n,r}dispose(){let e=this.runtime;e.call(`ghostty_kitty_graphics_placement_iterator_free`,e.readPointer(this.iteratorSlot)),e.free(this.info,lj.size),e.free(this.scratch,16),e.freeOpaque(this.iteratorSlot),this.bitmaps.clear()}placements(e,t){let n=this.runtime;n.check(`ghostty_terminal_get`,n.call(`ghostty_terminal_get`,this.terminal,aj,this.scratch));let r=n.readPointer(this.scratch);n.check(`ghostty_kitty_graphics_get`,n.call(`ghostty_kitty_graphics_get`,r,oj,this.iteratorSlot));let i=n.readPointer(this.iteratorSlot),a=[],o=[];for(;n.call(`ghostty_kitty_graphics_placement_next`,i);){let e=this.placementU32(i,sj.imageId);if(this.placementData(i,sj.isVirtual).getUint8(0)){o.push({imageId:e,placementId:this.placementU32(i,sj.placementId),columns:this.placementU32(i,sj.columns),rows:this.placementU32(i,sj.rows)});continue}let t=n.call(`ghostty_kitty_graphics_image`,r,e);if(t===0)throw Error(`kitty placement points to missing image ${e}`);n.bytes(this.info,lj.size).fill(0);let s=n.view(this.info,lj.size);s.setUint32(0,lj.size,!0),n.check(`ghostty_kitty_graphics_placement_render_info`,n.call(`ghostty_kitty_graphics_placement_render_info`,i,t,this.terminal,this.info)),s.getUint8(lj.visible)!==0&&a.push({...this.image(t,e),z:this.placementData(i,sj.z).getInt32(0,!0),column:s.getInt32(lj.column,!0),row:s.getInt32(lj.row,!0),xOffset:this.placementU32(i,sj.xOffset),yOffset:this.placementU32(i,sj.yOffset),width:s.getUint32(lj.pixelWidth,!0),height:s.getUint32(lj.pixelHeight,!0),source:{x:s.getUint32(lj.sourceX,!0),y:s.getUint32(lj.sourceY,!0),width:s.getUint32(lj.sourceWidth,!0),height:s.getUint32(lj.sourceHeight,!0)}})}if(o.length===0)return a;for(let i of pj(e)){let e=o.find(e=>e.imageId===i.imageId&&(i.placementId===0||e.placementId===i.placementId));if(e===void 0)continue;let s=n.call(`ghostty_kitty_graphics_image`,r,i.imageId);if(s===0)continue;let c=this.image(s,i.imageId),l=hj(i,e,c.image,t);l!==null&&a.push({...c,...l,z:-1,column:i.x,row:i.y})}return a}image(e,t){let n=this.imageData(e,cj.data),r=this.imageData(e,cj.length);return{key:`${t}:${n}:${r}`,image:{width:this.imageData(e,cj.width),height:this.imageData(e,cj.height),format:this.imageData(e,cj.format),pixels:this.runtime.bytes(n,r)}}}placementData(e,t){return this.runtime.bytes(this.scratch,4).fill(0),this.runtime.check(`ghostty_kitty_graphics_placement_get`,this.runtime.call(`ghostty_kitty_graphics_placement_get`,e,t,this.scratch)),this.runtime.view(this.scratch,4)}placementU32(e,t){return this.placementData(e,t).getUint32(0,!0)}imageData(e,t){return this.runtime.bytes(this.scratch,4).fill(0),this.runtime.check(`ghostty_kitty_graphics_image_get`,this.runtime.call(`ghostty_kitty_graphics_image_get`,e,t,this.scratch)),this.runtime.view(this.scratch,4).getUint32(0,!0)}};function vj(e,t,n,r,i){let a=r.width/i.width,o=r.height/i.height;for(let i of t){let t=i.placement;yj(t.z)===n&&e.drawImage(i.bitmap,t.source.x,t.source.y,t.source.width,t.source.height,t.column*r.width+t.xOffset*a,t.row*r.height+t.yOffset*o,t.width*a,t.height*o)}}function yj(e){return e<-1073741824?`belowBackground`:e<0?`belowText`:`aboveText`}function bj(e){let t=uj.get(e.format);if(t===void 0)throw Error(`unsupported kitty image format ${e.format}`);let n=e.width*e.height,r=e.pixels,i=new Uint8ClampedArray(n*4);if(t===4)i.set(r.subarray(0,n*4));else for(let e=0;e<n;e+=1){let n=e*t,a=e*4;t===3?i.set(r.subarray(n,n+3),a):i.fill(r[n],a,a+3),i[a+3]=t===2?r[n+1]:255}let a=new OffscreenCanvas(e.width,e.height),o=a.getContext(`2d`);if(!o)throw Error(`could not create a canvas for a kitty image`);return o.putImageData(new ImageData(i,e.width,e.height),0,0),a}var xj=8,Sj=16,Cj=0,wj=1,Tj=2,Ej=8,Dj={cols:1,rows:2,dirty:3,rowIterator:4,background:5,foreground:6,cursor:7,cursorHasValue:8,cursorStyle:10,cursorVisible:11,cursorBlinking:12,cursorInViewport:14,cursorX:15,cursorY:16},Oj={dirty:1,raw:2,cells:3},kj={raw:1,style:2,graphemesLength:3,graphemes:4,background:5,foreground:6,selected:7},Aj={keys:0,values:20,graphemesLength:40,selected:44,background:48,foreground:52,written:56,size:60},jj={narrow:0,wide:1,spacerTail:2},Mj={r:229,g:231,b:235},Nj={r:0,g:0,b:0};function Pj(e,t){return Math.floor((e*155+t*100)/255)}function Fj(e,t){return{r:Pj(e.r,t.r),g:Pj(e.g,t.g),b:Pj(e.b,t.b)}}function Ij(e,t){let n=``;for(let r=0;r<t;r+=4096){let i=Math.min(4096,t-r),a=Array(i);for(let t=0;t<i;t+=1)a[t]=e.getUint32((r+t)*4,!0);n+=String.fromCodePoint(...a)}return n}function Lj(e,t){return{text:``,wide:0,foreground:e,background:t,bold:!1,italic:!1,invisible:!1,strikethrough:!1,overline:!1,underline:0,underlineColor:null,selected:!1,placeholder:null}}function Rj(e,t){let n=e.dataView();return{r:n.getUint8(t),g:n.getUint8(t+1),b:n.getUint8(t+2)}}function zj(e,t){let n=e.alloc(768);e.call(`ghostty_terminal_get`,t,21,n);let r=e.bytes(n,768),i=Array.from({length:256},(e,t)=>({r:r[t*3],g:r[t*3+1],b:r[t*3+2]}));return e.free(n,768),i}function Bj(e,t){let n=[],r=[];return e.cells.forEach((e,i)=>{if(e.wide!==2)for(let a of(e.text||` `).split(``))n.push(a),r.push({x:i,y:t})}),{text:n.join(``),points:r}}var Vj=class{runtime=BA();stateSlot;state;rowIteratorSlot;rowCellsSlot;scratch;style;cellQuery;graphemes=0;graphemeCapacity=0;rows=[];palette=[];constructor(){let e=this.runtime;this.stateSlot=e.allocOpaque(),e.check(`ghostty_render_state_new`,e.call(`ghostty_render_state_new`,0,this.stateSlot)),this.state=e.readPointer(this.stateSlot),this.rowIteratorSlot=e.allocOpaque(),e.check(`ghostty_render_state_row_iterator_new`,e.call(`ghostty_render_state_row_iterator_new`,0,this.rowIteratorSlot)),this.rowCellsSlot=e.allocOpaque(),e.check(`ghostty_render_state_row_cells_new`,e.call(`ghostty_render_state_row_cells_new`,0,this.rowCellsSlot)),this.scratch=e.alloc(16),this.style=e.alloc(e.layout(`GhosttyStyle`).size),this.cellQuery=e.alloc(Aj.size);let t=e.dataView();[[kj.style,this.style],[kj.graphemesLength,this.cellQuery+Aj.graphemesLength],[kj.selected,this.cellQuery+Aj.selected],[kj.background,this.cellQuery+Aj.background],[kj.foreground,this.cellQuery+Aj.foreground]].forEach((e,n)=>{t.setUint32(this.cellQuery+Aj.keys+n*4,e[0],!0),t.setUint32(this.cellQuery+Aj.values+n*4,e[1],!0)})}snapshot(e,t){let n=this.runtime;n.check(`ghostty_render_state_update`,n.call(`ghostty_render_state_update`,this.state,e));let r=this.getRender(Dj.cols,2),i=this.getRender(Dj.rows,2),a=this.getRender(Dj.dirty,4),o=this.getColor(Dj.foreground,Mj),s=this.getColor(Dj.background,Nj),c=this.getRender(Dj.cursorHasValue,1)===0?o:this.getColor(Dj.cursor,o),l=this.getRender(Dj.cursorInViewport,1)!==0,u=this.getRender(Dj.cursorVisible,1)!==0&&l;(this.rows.length!==i||this.rows.some(e=>e.cells.length!==r))&&(this.rows=Array.from({length:i},()=>({cells:Array.from({length:r},()=>Lj(o,s)),isWrapContinuation:!1,wrapsToNext:!1})));let d=new Set;if(a!==0){this.palette=zj(n,e),n.check(`ghostty_render_state_get`,n.call(`ghostty_render_state_get`,this.state,Dj.rowIterator,this.rowIteratorSlot));let c=n.readPointer(this.rowIteratorSlot),l=0;for(;l<i&&n.call(`ghostty_render_state_row_iterator_next`,c)!==0;)(a===2||this.getRowFlag(c,Oj.dirty))&&(this.rows[l]=this.readRow(c,r,o,s,t),d.add(l),n.bytes(this.scratch,1)[0]=0,n.call(`ghostty_render_state_row_set`,c,0,this.scratch)),l+=1;n.view(this.scratch,4).setUint32(0,0,!0),n.call(`ghostty_render_state_set`,this.state,0,this.scratch)}return{cols:r,rows:i,foreground:o,background:s,cursor:c,cursorX:l?this.getRender(Dj.cursorX,2):-1,cursorY:l?this.getRender(Dj.cursorY,2):-1,cursorVisible:u,cursorBlinking:this.getRender(Dj.cursorBlinking,1)!==0,cursorStyle:this.getRender(Dj.cursorStyle,4),dirtyRows:d,rowData:this.rows}}invalidate(){this.rows=[]}dispose(){let e=this.runtime,t=e.readPointer(this.rowCellsSlot);t&&e.call(`ghostty_render_state_row_cells_free`,t);let n=e.readPointer(this.rowIteratorSlot);n&&e.call(`ghostty_render_state_row_iterator_free`,n),e.call(`ghostty_render_state_free`,this.state),e.free(this.style,e.layout(`GhosttyStyle`).size),e.free(this.cellQuery,Aj.size),e.free(this.scratch,16),e.free(this.graphemes,this.graphemeCapacity),e.freeOpaque(this.rowCellsSlot),e.freeOpaque(this.rowIteratorSlot),e.freeOpaque(this.stateSlot)}readRow(e,t,n,r,i){let a=this.runtime;a.check(`ghostty_render_state_row_get`,a.call(`ghostty_render_state_row_get`,e,Oj.raw,this.scratch));let o=a.view(this.scratch,8).getBigUint64(0,!0);a.bytes(this.scratch+8,1)[0]=0,a.call(`ghostty_row_get`,o,2,this.scratch+8);let s=a.bytes(this.scratch+8,1)[0]!==0;a.bytes(this.scratch+8,1)[0]=0,a.call(`ghostty_row_get`,o,1,this.scratch+8);let c=a.bytes(this.scratch+8,1)[0]!==0;a.check(`ghostty_render_state_row_get`,a.call(`ghostty_render_state_row_get`,e,Oj.cells,this.rowCellsSlot));let l=a.readPointer(this.rowCellsSlot),u=a.layout(`GhosttyStyle`),d=u.size,f=u.fields,p=[];for(;p.length<t&&a.call(`ghostty_render_state_row_cells_next`,l)!==0;){a.bytes(this.style,d).fill(0),a.setField(this.style,`GhosttyStyle`,`size`,d);let e=a.call(`ghostty_render_state_row_cells_get_multi`,l,5,this.cellQuery+Aj.keys,this.cellQuery+Aj.values,this.cellQuery+Aj.written),t=a.dataView(),o=t.getUint32(this.cellQuery+Aj.written,!0);o<3&&a.check(`ghostty_render_state_row_cells_get_multi`,e);let s=t.getUint32(this.cellQuery+Aj.graphemesLength,!0),c=t.getUint8(this.cellQuery+Aj.selected)!==0,u=o>=4?Rj(a,this.cellQuery+Aj.background):r,m=o===5?Rj(a,this.cellQuery+Aj.foreground):o===3?this.getCellColor(l,n):n,h=``;if(s>0){let e=s*4;if(e>this.graphemeCapacity){let t=Math.max(e,this.graphemeCapacity*2),n=a.alloc(t);a.free(this.graphemes,this.graphemeCapacity),this.graphemes=n,this.graphemeCapacity=t}a.call(`ghostty_render_state_row_cells_get`,l,kj.graphemes,this.graphemes)===0&&(h=Ij(a.view(this.graphemes,e),s))}let g=0;if(h.length===0&&p.at(-1)?.text.length){a.call(`ghostty_render_state_row_cells_get`,l,kj.raw,this.scratch);let e=a.view(this.scratch,8).getBigUint64(0,!0);a.view(this.scratch+8,4).setUint32(0,0,!0),a.call(`ghostty_cell_get`,e,3,this.scratch+8),g=a.view(this.scratch+8,4).getUint32(0,!0)}let _=a.dataView(),v=e=>_.getUint8(this.style+f[e].offset)!==0,y=v(`bold`);if(i&&y&&_.getUint32(this.style+xj,!0)===wj){let e=_.getUint8(this.style+Sj);e<8&&(m=this.palette[e+8]??m)}if(v(`inverse`)){let e=m;m=u,u=e}v(`faint`)&&(m=Fj(m,u));let b=this.style+f.underline_color.offset,x=_.getUint32(b,!0),S=b+Ej,C=null;h.codePointAt(0)===1109742&&(C=fj(h,this.colorId(this.style+xj),this.colorId(b)),h=``),p.push({text:h,wide:g,foreground:m,background:u,bold:y,italic:v(`italic`),invisible:v(`invisible`),strikethrough:v(`strikethrough`),overline:v(`overline`),underline:_.getInt32(this.style+f.underline.offset,!0),underlineColor:x===wj?this.palette[_.getUint8(S)]:x===Tj?Rj(a,S):null,selected:c,placeholder:C})}for(;p.length<t;)p.push(Lj(n,r));return{cells:p,isWrapContinuation:s,wrapsToNext:c}}getRender(e,t){this.runtime.bytes(this.scratch,4).fill(0),this.runtime.check(`ghostty_render_state_get`,this.runtime.call(`ghostty_render_state_get`,this.state,e,this.scratch));let n=this.runtime.view(this.scratch,4);return t===1?n.getUint8(0):t===2?n.getUint16(0,!0):n.getUint32(0,!0)}getColor(e,t){return this.runtime.bytes(this.scratch,3).fill(0),this.runtime.call(`ghostty_render_state_get`,this.state,e,this.scratch)===0?Rj(this.runtime,this.scratch):t}getRowFlag(e,t){return this.runtime.bytes(this.scratch,1)[0]=0,this.runtime.call(`ghostty_render_state_row_get`,e,t,this.scratch)===0&&this.runtime.bytes(this.scratch,1)[0]!==0}getCellColor(e,t){return this.runtime.bytes(this.scratch,3).fill(0),this.runtime.call(`ghostty_render_state_row_cells_get`,e,kj.foreground,this.scratch)===0?Rj(this.runtime,this.scratch):t}colorId(e){let t=this.runtime.dataView(),n=t.getUint32(e,!0);if(n===Cj)return 0;if(n===wj)return t.getUint8(e+Ej);if(n===Tj){let t=Rj(this.runtime,e+Ej);return t.r<<16|t.g<<8|t.b}throw Error(`unknown style color tag ${n}`)}},Hj=16,Uj=589824,Wj=381888,Gj=5e7,Kj=new TextDecoder;function qj(e){let t=[...e],n=[0,95,135,175,215,255];for(let e=16;e<232;e+=1){let r=e-16;t.push({r:n[Math.floor(r/36)],g:n[Math.floor(r/6)%6],b:n[r%6]})}for(let e=0;e<24;e+=1){let n=8+e*10;t.push({r:n,g:n,b:n})}return t}var Jj=class{encoder;kitty;runtime=BA();terminalSlot;terminal;renderState;formatterSlot;formatter;scratch;point;scrollbar;host;hostId=0;sizeReport;disposed=!1;boldIsBright=!1;version=``;constructor(e,t,n,r,i){let a=this.runtime,o=a.layout(`GhosttyTerminalOptions`).size,s=a.alloc(o);a.setField(s,`GhosttyTerminalOptions`,`cols`,e),a.setField(s,`GhosttyTerminalOptions`,`rows`,t);let c=Math.floor(Wj/(8*(e+1)));a.setField(s,`GhosttyTerminalOptions`,`max_scrollback`,n===0?0:Math.min((Math.ceil(n/c)+1)*Uj,Gj)),this.terminalSlot=a.allocOpaque();let l=a.call(`ghostty_terminal_new`,0,this.terminalSlot,s);if(a.free(s,o),a.check(`ghostty_terminal_new`,l),this.terminal=a.readPointer(this.terminalSlot),!gj(this.terminal))throw a.call(`ghostty_terminal_free`,this.terminal),a.freeOpaque(this.terminalSlot),Error(`libghostty-vt was built without kitty graphics, build it with scripts/build-ghostty-wasm.mts`);this.sizeReport={rows:t,columns:e,cellWidth:1,cellHeight:1},this.host={write:r,size:()=>this.sizeReport,bell:i,version:()=>this.version},this.hostId=a.attachHost(this.terminal,this.host),this.renderState=new Vj,this.encoder=new rj(this.terminal),this.kitty=new _j(this.terminal);let u=`GhosttyFormatterTerminalOptions`,d=a.layout(u),f=a.alloc(d.size),p=a.field(u,`extra`),m=a.field(`GhosttyFormatterTerminalExtra`,`screen`);a.setField(f,u,`size`,d.size),a.setField(f,u,`trim`,1),a.setField(f+p.offset,`GhosttyFormatterTerminalExtra`,`size`,p.size),a.setField(f+p.offset+m.offset,`GhosttyFormatterScreenExtra`,`size`,m.size),this.formatterSlot=a.allocOpaque();let h=a.call(`ghostty_formatter_terminal_new`,0,this.formatterSlot,this.terminal,f);a.free(f,d.size),a.check(`ghostty_formatter_terminal_new`,h),this.formatter=a.readPointer(this.formatterSlot),this.scratch=a.alloc(16),this.point=a.alloc(a.layout(`GhosttyPoint`).size),this.scrollbar=a.alloc(a.layout(`GhosttyTerminalScrollbar`).size)}write(e){if(e.length===0)return;this.kitty.note(e);let t=this.runtime.alloc(e.length);this.runtime.bytes(t,e.length).set(e),this.runtime.call(`ghostty_terminal_vt_write`,this.terminal,t,e.length),this.runtime.free(t,e.length)}setReplies(e){e&&this.hostId===0?this.hostId=this.runtime.attachHost(this.terminal,this.host):!e&&this.hostId!==0&&(this.runtime.detachHost(this.terminal,this.hostId),this.hostId=0)}reset(){this.runtime.call(`ghostty_terminal_reset`,this.terminal),this.renderState.invalidate()}resize(e,t,n,r,i){this.sizeReport={rows:t,columns:e,cellWidth:Math.max(1,Math.round(n*i)),cellHeight:Math.max(1,Math.round(r*i))},this.runtime.check(`ghostty_terminal_resize`,this.runtime.call(`ghostty_terminal_resize`,this.terminal,Math.max(1,Math.min(65535,e)),Math.max(1,Math.min(65535,t)),this.sizeReport.cellWidth,this.sizeReport.cellHeight))}setColors(e){let t=this.runtime.alloc(3);for(let n of[[11,e.foreground],[12,e.background],[13,e.cursor]]){let e=n[1];this.runtime.bytes(t,3).set([e.r,e.g,e.b]),this.runtime.call(`ghostty_terminal_set`,this.terminal,n[0],t)}this.runtime.free(t,3);let n=qj(e.palette),r=this.runtime.alloc(n.length*3);this.runtime.bytes(r,n.length*3).set(n.flatMap(e=>[e.r,e.g,e.b])),this.runtime.call(`ghostty_terminal_set`,this.terminal,14,r),this.runtime.free(r,n.length*3),this.renderState.invalidate()}setCursor(e,t){let n={bar:0,block:1,underline:2}[e];this.runtime.view(this.scratch,4).setUint32(0,n,!0),this.runtime.call(`ghostty_terminal_set`,this.terminal,22,this.scratch),this.runtime.bytes(this.scratch,1)[0]=+!!t,this.runtime.call(`ghostty_terminal_set`,this.terminal,23,this.scratch)}title(){if(this.runtime.bytes(this.scratch,8).fill(0),this.runtime.call(`ghostty_terminal_get`,this.terminal,12,this.scratch)!==0)return``;let e=this.runtime.view(this.scratch,8),t=e.getUint32(0,!0),n=e.getUint32(4,!0);return n===0?``:Kj.decode(this.runtime.bytes(t,n))}screenText(){let e=this.runtime.alloc(8),t=this.runtime.call(`ghostty_formatter_format_alloc`,this.formatter,0,e,e+4),n=this.runtime.view(e,8),r=n.getUint32(0,!0),i=n.getUint32(4,!0);if(this.runtime.free(e,8),t!==0)return``;let a=Kj.decode(this.runtime.bytes(r,i));return this.runtime.call(`ghostty_free`,0,r,i),a}scroll(e){let t=this.runtime.layout(`GhosttyTerminalScrollViewport`),n=this.runtime.alloc(t.size);this.runtime.setField(n,`GhosttyTerminalScrollViewport`,`tag`,2);let r=this.runtime.field(`GhosttyTerminalScrollViewport`,`value`);this.runtime.view(n+r.offset,r.size).setInt32(0,e,!0),this.runtime.call(`ghostty_terminal_scroll_viewport`,this.terminal,n),this.runtime.free(n,t.size)}scrollToBottom(){let e=this.runtime.layout(`GhosttyTerminalScrollViewport`),t=this.runtime.alloc(e.size);this.runtime.setField(t,`GhosttyTerminalScrollViewport`,`tag`,1),this.runtime.call(`ghostty_terminal_scroll_viewport`,this.terminal,t),this.runtime.free(t,e.size)}scrollbarState(){let e=this.runtime.layout(`GhosttyTerminalScrollbar`);return this.runtime.bytes(this.scrollbar,e.size).fill(0),this.runtime.call(`ghostty_terminal_get`,this.terminal,9,this.scrollbar)===0?{total:this.runtime.readField(this.scrollbar,`GhosttyTerminalScrollbar`,`total`),offset:this.runtime.readField(this.scrollbar,`GhosttyTerminalScrollbar`,`offset`),len:this.runtime.readField(this.scrollbar,`GhosttyTerminalScrollbar`,`len`)}:null}isMouseTracking(){return this.flag(`ghostty_terminal_get`,11)}isMouseAnyEventTracking(){return this.flag(`ghostty_terminal_mode_get`,1003)}isFocusReporting(){return this.flag(`ghostty_terminal_mode_get`,1004)}isSynchronizedOutput(){return this.flag(`ghostty_terminal_mode_get`,2026)}endSynchronizedOutput(){this.runtime.check(`ghostty_terminal_mode_set`,this.runtime.call(`ghostty_terminal_mode_set`,this.terminal,2026,0))}currentColors(){return{foreground:this.terminalColor(18),background:this.terminalColor(19),cursor:this.terminalColor(20),palette:zj(this.runtime,this.terminal)}}isApplicationCursorKeys(){return this.flag(`ghostty_terminal_mode_get`,1)}isKittyKeyboard(){return this.flag(`ghostty_terminal_get`,8)}isAlternateScreen(){return this.runtime.dataView().setUint32(this.scratch,0,!0),this.runtime.call(`ghostty_terminal_get`,this.terminal,6,this.scratch)===0&&this.runtime.dataView().getUint32(this.scratch,!0)===1}setSelection(e,t){let n=this.runtime.layout(`GhosttyGridRef`).size,r=this.gridRef(e.x,e.y,2);try{let e=this.gridRef(t.x,t.y,2),i=this.runtime.layout(`GhosttySelection`),a=this.runtime.alloc(i.size);this.runtime.setField(a,`GhosttySelection`,`size`,i.size);let o=this.runtime.field(`GhosttySelection`,`start`),s=this.runtime.field(`GhosttySelection`,`end`);this.runtime.bytes(a+o.offset,o.size).set(this.runtime.bytes(r,o.size)),this.runtime.bytes(a+s.offset,s.size).set(this.runtime.bytes(e,s.size)),this.runtime.call(`ghostty_terminal_set`,this.terminal,21,a),this.runtime.free(e,n),this.runtime.free(a,i.size)}finally{this.runtime.free(r,n)}}selectWord(e){return this.selectAt(`GhosttyTerminalSelectWordOptions`,`ghostty_terminal_select_word`,e)}selectLine(e){return this.selectAt(`GhosttyTerminalSelectLineOptions`,`ghostty_terminal_select_line`,e)}clearSelection(){this.runtime.call(`ghostty_terminal_set`,this.terminal,21,0)}selectionText(){let e=this.runtime.alloc(Hj),t=this.runtime.view(e,Hj);t.setUint32(0,Hj,!0),t.setUint8(8,1),t.setUint8(9,1);let n=this.runtime.encodeOutput((t,n,r)=>this.runtime.call(`ghostty_terminal_selection_format_buf`,this.terminal,e,t,n,r));return this.runtime.free(e,Hj),n}hyperlinkAt(e,t){let n=this.gridRef(e,t,1),r=this.hyperlinkOf(n);return this.runtime.free(n,this.runtime.layout(`GhosttyGridRef`).size),r}toScreen(e){let t=this.gridRef(e.x,e.y,1),n=this.pointFromGridRef(t,2);return this.runtime.free(t,this.runtime.layout(`GhosttyGridRef`).size),n}trackCursor(){let e=this.runtime.allocOpaque(),t=this.runtime.call(`ghostty_terminal_grid_ref_track`,this.terminal,this.cursorPoint(),e),n=this.runtime.readPointer(e);return this.runtime.freeOpaque(e),this.runtime.check(`ghostty_terminal_grid_ref_track`,t),n}retrack(e){let t=this.runtime.call(`ghostty_tracked_grid_ref_set`,e,this.terminal,this.cursorPoint());this.runtime.check(`ghostty_tracked_grid_ref_set`,t)}trackedPoint(e){return this.runtime.call(`ghostty_tracked_grid_ref_point`,e,2,this.scratch)===0?{x:this.runtime.readField(this.scratch,`GhosttyPointCoordinate`,`x`),y:this.runtime.readField(this.scratch,`GhosttyPointCoordinate`,`y`)}:null}trackedHyperlink(e){let t=this.runtime.layout(`GhosttyGridRef`).size,n=this.runtime.alloc(t);this.runtime.setField(n,`GhosttyGridRef`,`size`,t);let r=this.runtime.call(`ghostty_tracked_grid_ref_snapshot`,e,n)===0?this.hyperlinkOf(n):null;return this.runtime.free(n,t),r}untrack(e){this.runtime.call(`ghostty_tracked_grid_ref_free`,e)}snapshot(){return this.renderState.snapshot(this.terminal,this.boldIsBright)}invalidate(){this.renderState.invalidate()}cellSize(){return{width:this.sizeReport.cellWidth,height:this.sizeReport.cellHeight}}dispose(){if(this.disposed)return;this.disposed=!0;let e=this.runtime;e.call(`ghostty_formatter_free`,this.formatter),this.encoder.dispose(),this.kitty.dispose(),this.renderState.dispose(),this.hostId!==0&&e.detachHost(this.terminal,this.hostId),e.call(`ghostty_terminal_free`,this.terminal),e.free(this.scrollbar,e.layout(`GhosttyTerminalScrollbar`).size),e.free(this.scratch,16),e.free(this.point,e.layout(`GhosttyPoint`).size),e.freeOpaque(this.formatterSlot),e.freeOpaque(this.terminalSlot)}hyperlinkOf(e){let t=this.runtime.encodeOutput((t,n,r)=>this.runtime.call(`ghostty_grid_ref_hyperlink_uri`,e,t,n,r));return t===``?null:t}cursorPosition(){this.runtime.dataView().setUint32(this.scratch,0,!0),this.runtime.call(`ghostty_terminal_get`,this.terminal,3,this.scratch),this.runtime.call(`ghostty_terminal_get`,this.terminal,4,this.scratch+2);let e=this.runtime.dataView();return{x:e.getUint16(this.scratch,!0),y:e.getUint16(this.scratch+2,!0)}}cursorPoint(){let e=this.cursorPosition();return this.fillPoint(this.point,e.x,e.y,0),this.point}fillPoint(e,t,n,r){this.runtime.setField(e,`GhosttyPoint`,`tag`,r);let i=this.runtime.field(`GhosttyPoint`,`value`),a=this.runtime.dataView();a.setUint16(e+i.offset,Math.max(0,t),!0),a.setUint32(e+i.offset+4,Math.max(0,n),!0)}gridRef(e,t,n){let r=this.runtime.alloc(this.runtime.layout(`GhosttyPoint`).size);this.fillPoint(r,e,t,n);let i=this.runtime.layout(`GhosttyGridRef`).size,a=this.runtime.alloc(i);this.runtime.setField(a,`GhosttyGridRef`,`size`,i);let o=this.runtime.call(`ghostty_terminal_grid_ref`,this.terminal,r,a);return this.runtime.free(r,this.runtime.layout(`GhosttyPoint`).size),o!==0&&(this.runtime.free(a,i),this.runtime.check(`ghostty_terminal_grid_ref`,o)),a}selectAt(e,t,n){let r=this.gridRef(n.x,n.y,2),i=this.runtime.layout(e),a=this.runtime.layout(`GhosttySelection`),o=this.runtime.alloc(i.size),s=this.runtime.alloc(a.size);this.runtime.setField(o,e,`size`,i.size);let c=this.runtime.field(e,`ref`);this.runtime.bytes(o+c.offset,c.size).set(this.runtime.bytes(r,c.size)),this.runtime.setField(s,`GhosttySelection`,`size`,a.size);let l=null;if(this.runtime.call(t,this.terminal,o,s)===0){let e=this.pointFromGridRef(s+this.runtime.field(`GhosttySelection`,`start`).offset,2),t=this.pointFromGridRef(s+this.runtime.field(`GhosttySelection`,`end`).offset,2);e&&t&&(l={start:e,end:t})}return this.runtime.free(s,a.size),this.runtime.free(r,this.runtime.layout(`GhosttyGridRef`).size),this.runtime.free(o,i.size),l}pointFromGridRef(e,t){let n=this.runtime.layout(`GhosttyPointCoordinate`),r=this.runtime.alloc(n.size),i=this.runtime.call(`ghostty_terminal_point_from_grid_ref`,this.terminal,e,t,r)===0?{x:this.runtime.readField(r,`GhosttyPointCoordinate`,`x`),y:this.runtime.readField(r,`GhosttyPointCoordinate`,`y`)}:null;return this.runtime.free(r,n.size),i}flag(e,t){return this.runtime.flag(e,this.terminal,t)}terminalColor(e){return this.runtime.bytes(this.scratch,3).fill(0),this.runtime.check(`ghostty_terminal_get`,this.runtime.call(`ghostty_terminal_get`,this.terminal,e,this.scratch)),Rj(this.runtime,this.scratch)}};function Yj(e,t){let n=[],r=e.toLowerCase(),i=t.toLowerCase(),a=r.indexOf(i);for(;a!==-1;)n.push(a),a=r.indexOf(i,a+i.length);return n}var Xj=class{core;redraw;listeners=new Set;query=``;matches=[];activeMatch=-1;stale=!1;timer=null;constructor(e,t){this.core=e,this.redraw=t}find(e,t,n,r){let i=this.matches[this.activeMatch]??null;if(this.query=e,this.refresh(),this.matches.length===0)this.activeMatch=-1;else if(n||i===null){let e=i?.row??r,t=this.matches.findIndex(t=>t.row>=e);this.activeMatch=t===-1?this.matches.length-1:t}else{let e=this.matches.findIndex(e=>e.row===i.row&&e.index===i.index),n=e===-1?0:e,r=t?-1:1;this.activeMatch=(n+r+this.matches.length)%this.matches.length}return this.emit(),this.matches[this.activeMatch]??null}onResults(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}clear(){this.query=``,this.matches=[],this.activeMatch=-1}outputChanged(){this.query!==``&&(this.stale=!0,this.timer===null&&(this.timer=window.setTimeout(()=>{if(this.timer=null,!this.stale||this.query===``)return;let e=this.matches[this.activeMatch];this.refresh();let t=e?this.matches.findIndex(t=>t.row===e.row&&t.index===e.index):-1;this.activeMatch=t===-1?this.matches.length-1:t,this.emit(),this.redraw()},200)))}highlights(e,t){if(this.query===``)return[];let n=this.matches[this.activeMatch],r=[];return e.rowData.forEach((e,i)=>{let a=Bj(e,i);Yj(a.text,this.query).forEach((e,o)=>{let s=a.points[e],c=a.points[e+this.query.length-1];s&&c&&r.push({row:i,start:s.x,end:c.x+1,active:n?.row===t+i&&n.index===o})})}),r}dispose(){this.timer!==null&&window.clearTimeout(this.timer),this.timer=null}refresh(){this.stale=!1,this.matches=[],this.query!==``&&this.core.screenText().split(`
|
|
26
|
+
`).forEach((e,t)=>{Yj(e,this.query).forEach((e,n)=>this.matches.push({row:t,index:n}))})}emit(){let e={resultIndex:this.activeMatch,resultCount:this.matches.length};for(let t of this.listeners)t(e)}},Zj=new TextDecoder;function Qj(e){function t(e){return e.toString(16).padStart(2,`0`).repeat(2)}return`rgb:${t(e.r)}/${t(e.g)}/${t(e.b)}`}function $j(e){return Math.min(Math.max(e,0),100)}function eM(e){return Zj.decode(Uint8Array.from(atob(e),e=>e.charCodeAt(0)))}function tM(e){return e===``?`s0`:[...e].filter(e=>`cpqs01234567`.includes(e)).join(``)}function nM(e){try{return eM(e)}catch(e){return console.warn(`invalid clipboard sequence`,e),null}}function rM(e,t,n){let r=Array.from(new TextEncoder().encode(e),e=>String.fromCharCode(e)).join(``);return`\x1b]52;${t};${btoa(r)}${n}`}function iM(e,t,n){let r=e===`10;?`?t.foreground:e===`11;?`?t.background:t.cursor;return`\x1b]${e.slice(0,2)};${Qj(r)}${n}`}function aM(e,t,n){let r=e.split(`;`),i=[];for(let e=1;e+1<r.length;e+=2){if(r[e+1]!==`?`||!/^\d+$/.test(r[e]))continue;let a=t[Number(r[e])];a!==void 0&&i.push(`\x1b]4;${r[e]};${Qj(a)}${n}`)}return i}function oM(e,t){let n=e.split(`;`);if(n.length>4)return null;let r=n[2]===void 0||n[2]===``?0:Number(n[2]),i=n[3]===void 0||n[3]===``?-1:Number(n[3]);return!Number.isInteger(r)||!Number.isInteger(i)?null:r===0?{state:r,value:0}:r===1?i<0?null:{state:r,value:$j(i)}:r===2||r===4?i<0?{state:r,value:t.value}:{state:r,value:$j(i||t.value)}:r===3?{state:r,value:t.value}:null}function sM(e,t){if(e.startsWith(`9;`)&&!/^9;\d+(;|$)/.test(e))return{title:``,body:Zj.decode(t.subarray(2))};if(e.startsWith(`777;notify;`)){let e=Zj.decode(t).split(`;`);return{title:e[2]??``,body:e.slice(3).join(`;`)}}return null}var cM=class{pending={id:``,title:``,body:``};add(e){let t=e.indexOf(`;`,3);if(t===-1)return null;let n=new Map;for(let r of e.slice(3,t).split(`:`)){let e=r.indexOf(`=`);e!==-1&&n.set(r.slice(0,e),r.slice(e+1))}let r=n.get(`p`)??`title`;if(r===`?`||r===`close`||r===`alive`)return null;let i=e.slice(t+1);if(n.get(`e`)===`1`)try{i=eM(i)}catch(e){return console.warn(`invalid notification sequence`,e),null}let a=n.get(`i`)??``;if(a!==this.pending.id&&(this.pending={id:a,title:``,body:``}),r===`title`&&(this.pending.title+=i),r===`body`&&(this.pending.body+=i),n.get(`d`)===`0`)return null;let o=this.pending;return this.pending={id:``,title:``,body:``},o.title===``&&o.body===``?null:{title:o.title,body:o.body}}},lM=27,uM=7,dM=24,fM=26,pM=33554432,mM=class{state=`ground`;params=``;collecting=!1;chunks=[];size=0;reset(){this.state=`ground`,this.drop()}scan(e,t){let n=0;for(let r=0;r<e.length;r+=1){let i=e[r];if(i===dM||i===fM)this.state=`ground`,this.drop();else if(this.state===`ground`)i===lM&&(this.state=`escape`);else if(this.state===`escape`){if(this.params=``,i===93){this.state=`osc`,this.begin(),n=r+1;continue}if(i===80){this.state=`dcsHeader`;continue}this.state=i===lM?`escape`:`ground`}else if(this.state===`osc`){if(i===uM){if(this.state=`ground`,this.append(e,n,r),t({type:`osc`,data:this.take(),terminator:`\x07`},r+1))return r+1;continue}i===lM&&(this.state=`oscEscape`,this.append(e,n,r))}else if(this.state===`oscEscape`){if(i===92){if(this.state=`ground`,t({type:`osc`,data:this.take(),terminator:`\x1B\\`},r+1))return r+1;continue}this.drop(),this.state=`escape`,--r}else if(this.state===`dcsHeader`){if(i===lM){this.state=`dcsEscape`;continue}if(i>=32&&i<=63){this.params.length<16&&(this.params+=String.fromCharCode(i));continue}this.state=`dcs`,i===113&&/^[0-9;]*$/.test(this.params)&&(this.begin(),n=r+1)}else if(this.state===`dcs`)i===lM&&(this.state=`dcsEscape`,this.append(e,n,r));else if(i===92){if(this.state=`ground`,this.collecting&&t({type:`sixel`,data:this.take()},r+1))return r+1}else this.drop(),this.state=`escape`,--r}return(this.state===`osc`||this.state===`dcs`)&&this.append(e,n,e.length),e.length}begin(){this.collecting=!0,this.chunks=[],this.size=0}append(e,t,n){!this.collecting||n<=t||(this.size+n-t>pM?this.drop():(this.chunks.push(e.slice(t,n)),this.size+=n-t))}take(){let e=new Uint8Array(this.size),t=0;for(let n of this.chunks)e.set(n,t),t+=n.length;return this.drop(),e}drop(){this.collecting=!1,this.chunks=[],this.size=0}},hM=`0101.0202.1010.2020.........0110.0210.0120.0220.0011.0012.0021.0022.1100.1200.2100.2200.1001.1002.2001.2002.1110.1210.2110.1120.2120.2210.1220.2220.1011.1012.2011.1021.2021.2012.1022.2022.0111.0112.0211.0212.0121.0122.0221.0222.1101.1102.1201.1202.2101.2102.2201.2202.1111.1112.1211.1212.2111.1121.2121.2112.2211.1122.1221.2212.1222.2122.2221.2222`.split(`.`),gM=[`0001`,`1000`,`0100`,`0010`,`0002`,`2000`,`0200`,`0020`,`0201`,`1020`,`0102`,`2010`],_M=`0303.3030.0310.0130.0330.0013.0031.0033.1300.3100.3300.1003.3001.3003.1310.3130.3330.1013.3031.3033.0313.0131.0333.1303.3101.3303.1313.3131.3333`.split(`.`),vM=[0,0,4,4],yM=[4,0,4,4],bM=[0,4,4,4],xM=[4,4,4,4],SM=[[[0,0,8,4]],[[0,7,8,1]],[[0,6,8,2]],[[0,5,8,3]],[[0,4,8,4]],[[0,3,8,5]],[[0,2,8,6]],[[0,1,8,7]],[[0,0,8,8]],[[0,0,7,8]],[[0,0,6,8]],[[0,0,5,8]],[[0,0,4,8]],[[0,0,3,8]],[[0,0,2,8]],[[0,0,1,8]],[[4,0,4,8]],[],[],[],[[0,0,8,1]],[[7,0,1,8]],[bM],[xM],[vM],[vM,bM,xM],[vM,xM],[vM,yM,bM],[vM,yM,xM],[yM],[yM,bM],[yM,bM,xM]],CM={9617:.25,9618:.5,9619:.75},wM={9581:[1,1],9582:[-1,1],9583:[-1,-1],9584:[1,-1]};function TM(e){return e>=9472&&e<=9547?hM[e-9472]:e>=9552&&e<=9580?_M[e-9552]:e>=9588&&e<=9599?gM[e-9588]:``}function EM(e){if(e.length!==1)return!1;let t=e.charCodeAt(0);return TM(t)!==``||wM[t]!==void 0||t>=9600&&t<=9631}function DM(e){return Math.max(1,Math.round(e.height/20))}function OM(e,t,n){let[r,i,a,o]=t,s=DM(n),c=s*2,l=Math.floor(Math.max(0,n.height-s)/2),u=l+s,d=Math.floor(Math.max(0,n.height-c)/2),f=d+c,p=Math.max(0,l-s),m=u+s,h=Math.floor(Math.max(0,n.width-s)/2),g=h+s,_=Math.floor(Math.max(0,n.width-c)/2),v=_+c,y=Math.max(0,h-s),b=g+s;function x(t,r,i,a){e.fillRect(n.left+t,n.top+r,i-t,a-r)}let S=o===`2`||i===`2`?f:o!==i||a===r?o===`3`||i===`3`?m:u:o===`0`&&i===`0`?u:l,C=o===`2`||i===`2`?d:o!==i||r===a?o===`3`||i===`3`?p:l:o===`0`&&i===`0`?l:u,w=r===`2`||a===`2`?v:r!==a||o===i?r===`3`||a===`3`?b:g:r===`0`&&a===`0`?g:h,T=r===`2`||a===`2`?_:r!==a||i===o?r===`3`||a===`3`?y:h:r===`0`&&a===`0`?h:g;r===`1`&&x(h,0,g,S),r===`2`&&x(_,0,v,S),r===`3`&&(x(y,0,h,o===`3`?l:S),x(g,0,b,i===`3`?l:S)),i===`1`&&x(T,l,n.width,u),i===`2`&&x(T,d,n.width,f),i===`3`&&(x(r===`3`?g:T,p,n.width,l),x(a===`3`?g:T,u,n.width,m)),a===`1`&&x(h,C,g,n.height),a===`2`&&x(_,C,v,n.height),a===`3`&&(x(y,o===`3`?u:C,h,n.height),x(g,i===`3`?u:C,b,n.height)),o===`1`&&x(0,l,w,u),o===`2`&&x(0,d,w,f),o===`3`&&(x(0,p,r===`3`?h:w,l),x(0,u,a===`3`?h:w,m))}function kM(e,[t,n],r){let i=DM(r),a=r.left+Math.floor(Math.max(0,r.width-i)/2)+i/2,o=r.top+Math.floor(Math.max(0,r.height-i)/2)+i/2,s=t===1?r.left+r.width:r.left,c=n===1?r.top+r.height:r.top,l=Math.min(r.width,r.height)/2;e.save(),e.strokeStyle=e.fillStyle,e.lineWidth=i,e.beginPath(),e.moveTo(a,c),e.arcTo(a,o,s,o,l),e.lineTo(s,o),e.stroke(),e.restore()}function AM(e,t,n,r){e.save(),e.setTransform(1,0,0,1,0,0),jM(e,t.charCodeAt(0),{left:Math.round(n.left*r),top:Math.round(n.top*r),width:Math.round((n.left+n.width)*r)-Math.round(n.left*r),height:Math.round((n.top+n.height)*r)-Math.round(n.top*r)}),e.restore()}function jM(e,t,n){let r=TM(t);if(r!==``){OM(e,r,n);return}let i=wM[t];if(i!==void 0){kM(e,i,n);return}let a=CM[t];if(a!==void 0)e.globalAlpha=a,e.fillRect(n.left,n.top,n.width,n.height);else for(let[r,i,a,o]of SM[t-9600]){let t=n.left+Math.round(n.width*r/8),s=n.top+Math.round(n.height*i/8);e.fillRect(t,s,n.left+Math.round(n.width*(r+a)/8)-t,n.top+Math.round(n.height*(i+o)/8)-s)}}function MM(e){return`rgb(${e.r}, ${e.g}, ${e.b})`}function NM(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b}function PM(e,t){return Math.round(e*t)/t}function FM(e,t,n,r){let i=PM(e*n.width,r);return{left:i,width:PM(t*n.width,r)-i}}function IM(e,t,n,r,i){let a=i-2,o=n+r;if(t===1)e.fillRect(n,a,r,1);else if(t===2)e.fillRect(n,a,r,1),e.fillRect(n,a-2,r,1);else if(t===3){function t(e){return a-1+Math.sin(e/3*Math.PI)*1.5}e.save(),e.strokeStyle=e.fillStyle,e.lineWidth=1,e.beginPath(),e.moveTo(n,t(n));for(let r=Math.floor(n)+1;r<o;r+=1)e.lineTo(r,t(r));e.lineTo(o,t(o)),e.stroke(),e.restore()}else if(t===4)for(let t=Math.ceil(n/2)*2;t<o;t+=2)e.fillRect(t,a,1,1);else if(t===5)for(let t=Math.floor(n/5)*5;t<o;t+=5){let r=Math.max(t,n),i=Math.min(t+3,o);i>r&&e.fillRect(r,a,i-r,1)}else throw Error(`unknown underline style ${t}`)}function LM(e,t){return e.selected===t.selected&&NM(e.foreground,t.foreground)&&e.bold===t.bold&&e.italic===t.italic&&e.invisible===t.invisible}function RM(e,t){return`${e.italic?`italic`:`normal`} ${e.bold?700:400} ${t.fontSize}px ${t.fontFamily}`}function zM(e,t,n,r,i){e.font=`normal 400 ${t}px ${n}`;let a=e.measureText(`M`).width,o=e.measureText(`Mg`),s=o.fontBoundingBoxAscent||t,c=s+o.fontBoundingBoxDescent,l=Math.max(1,Math.round(c*r*i))/i;return{width:Math.max(1,Math.round(a*i))/i,height:l,baseline:PM((l-c)/2+s,i),faceWidth:a}}function BM(e){return/^[!-/:-@[-`{-~]$/.test(e)}function VM(e,t,n){return!(e===null||t<e.start.y||t>e.end.y||t===e.start.y&&n<e.start.x||t===e.end.y&&n>e.end.x)}function HM(e){let{context:t,snapshot:n,metrics:r,appearance:i,cursorOn:a,previousCursorY:o,pixelRatio:s}=e,c=e.forceFull?Array.from({length:n.rows},(e,t)=>t):[...n.dirtyRows];o!==null&&!c.includes(o)&&c.push(o),n.cursorVisible&&n.cursorY>=0&&!c.includes(n.cursorY)&&c.push(n.cursorY),e.forceFull&&(t.save(),t.resetTransform(),t.fillStyle=MM(n.background),t.fillRect(0,0,t.canvas.width,t.canvas.height),t.restore());function l(e){let t=e*r.height,n=PM(t,s);return{top:t,cellTop:n,cellHeight:PM(t+r.height,s)-n}}t.textBaseline=`alphabetic`;for(let e of c){if(!n.rowData[e])continue;let{cellTop:r,cellHeight:i}=l(e);t.fillStyle=MM(n.background),t.fillRect(0,r,t.canvas.width,i)}e.drawLayer(`belowBackground`);for(let a of c){let o=n.rowData[a];if(!o)continue;let{cellTop:c,cellHeight:u}=l(a),d=0;for(;d<o.cells.length;){let e=o.cells[d],a=d+1;for(;a<o.cells.length&&o.cells[a].selected===e.selected&&NM(o.cells[a].background,e.background);)a+=1;let{left:l,width:f}=FM(d,a,r,s);e.selected?(t.fillStyle=i.selectionBackground,t.fillRect(l,c,f,u)):NM(e.background,n.background)||(t.fillStyle=MM(e.background),t.fillRect(l,c,f,u)),d=a}for(let n of e.highlights){if(n.row!==a)continue;let{left:e,width:o}=FM(n.start,n.end,r,s);t.fillStyle=i.matchBackground,t.fillRect(e,c,o,u),n.active&&(t.strokeStyle=i.activeMatchBorder,t.strokeRect(e+.5,c+.5,o-1,u-1))}}e.drawLayer(`belowText`);for(let a of c){let o=n.rowData[a];if(!o)continue;let{top:c,cellTop:u,cellHeight:d}=l(a);t.save(),t.beginPath(),t.rect(0,u,t.canvas.width,d),t.clip();for(let e=0;e<o.cells.length;e+=1){let n=o.cells[e];if(n.invisible||n.text.trim().length===0)continue;t.fillStyle=n.selected?i.selectionForeground:MM(n.foreground);let a=e*r.width;if(EM(n.text)){AM(t,n.text,{left:a,top:c,width:r.width,height:r.height},s);continue}t.font=RM(n,i);let l=a+(r.width-r.faceWidth)/2,u=e,d=e+1;if(i.ligatures&&BM(n.text)){for(;u>e-3&&u>0&&BM(o.cells[u-1].text)&&LM(o.cells[u-1],n);)--u;for(;d<e+4&&d<o.cells.length&&BM(o.cells[d].text)&&LM(o.cells[d],n);)d+=1}d-u===1?t.fillText(n.text,l,c+r.baseline):(t.save(),t.beginPath(),t.rect(a,c,r.width,r.height),t.clip(),t.fillText(o.cells.slice(u,d).map(e=>e.text).join(``),l-(e-u)*r.faceWidth,c+r.baseline),t.restore())}t.restore();for(let n=0;n<o.cells.length;n+=1){let i=o.cells[n],l=VM(e.hoveredLink,a,n);if(i.underline===0&&!i.strikethrough&&!i.overline&&!l)continue;let{left:f,width:p}=FM(n,n+1,r,s),m=u+d;t.fillStyle=MM(i.foreground),i.strikethrough&&t.fillRect(f,c+Math.floor(r.height*.55),p,1),i.overline&&t.fillRect(f,u+1,p,1),i.underline===0?l&&IM(t,1,f,p,m):(i.underlineColor!==null&&(t.fillStyle=MM(i.underlineColor)),IM(t,i.underline,f,p,m))}}if(!a||!n.cursorVisible||n.cursorX<0||n.cursorY<0)return;let u=n.cursorY*r.height,d=PM(u,s),f=PM(u+r.height,s)-d,p=n.rowData[n.cursorY]?.cells,m=p?.[n.cursorX],h=p?.[n.cursorX+1]?.wide===jj.spacerTail?2:1,{left:g,width:_}=FM(n.cursorX,n.cursorX+h,r,s);t.fillStyle=MM(n.cursor),t.strokeStyle=MM(n.cursor),!e.focused||n.cursorStyle===3?t.strokeRect(g+.5,d+.5,_-1,f-1):n.cursorStyle===0?t.fillRect(g,d,1,f):n.cursorStyle===2?t.fillRect(g,d+f-2,_,2):(t.fillRect(g,d,_,f),m?.text&&(t.fillStyle=i.cursorText,EM(m.text)?AM(t,m.text,{left:n.cursorX*r.width,top:u,width:r.width,height:r.height},s):(t.font=RM(m,i),t.fillText(m.text,n.cursorX*r.width+(r.width-r.faceWidth)/2,u+r.baseline))))}var UM=navigator.userAgent.includes(`Mac`),WM=500,GM=/https?:\/\/[^\s"'`<>]+/g;function KM(e){return e===0?1:e===1?3:e===2?2:null}function qM(e,t){let n=Math.max(0,e.total-e.len);if(t<=0||e.len<=0||n===0)return null;let r=Math.min(t,Math.max(20,t*e.len/e.total)),i=t-r;return{thumbHeight:r,thumbTop:i*(Math.min(e.offset,n)/n),travel:i,maxOffset:n}}var JM=class{hoveredLink=null;context;linkPointer=null;mousePointer=null;mouseButton=null;lastMotion=``;selectionPointer=null;selectionMode=`cell`;selectionAnchor=null;selectionBase=null;selectionMoved=!1;selectionScroll=null;selectionScrollDelta=0;selectionClient=null;clickMove=null;clicks={count:0,time:0,x:0,y:0};touch=null;wheelRemainder=0;scrollbarDrag=null;constructor(e){this.context=e;let t=e.canvas,n=e.scrollbar;t.addEventListener(`pointerdown`,this.onPointerDown),t.addEventListener(`pointermove`,this.onPointerMove),t.addEventListener(`pointerup`,this.onPointerUp),t.addEventListener(`pointercancel`,this.onPointerUp),t.addEventListener(`pointerleave`,this.onPointerLeave),t.addEventListener(`wheel`,this.onWheel,{passive:!1}),t.addEventListener(`mousedown`,this.onMouseDown),n.addEventListener(`pointerdown`,this.onScrollbarDown),n.addEventListener(`pointermove`,this.onScrollbarMove),n.addEventListener(`pointerup`,this.onScrollbarUp),n.addEventListener(`pointercancel`,this.onScrollbarUp)}updateScrollbar(e){let t=this.context.core.scrollbarState(),n=t===null?null:qM(t,e);this.context.scrollbar.hidden=n===null,n!==null&&(this.context.thumb.style.height=`${n.thumbHeight}px`,this.context.thumb.style.transform=`translateY(${n.thumbTop}px)`)}dispose(){this.setSelectionScroll(0)}scrollRows(e,t){let n=this.context.core,r=this.wheelRemainder+e/this.context.view().metrics.height,i=Math.trunc(r);if(this.wheelRemainder=r-i,i!==0){if(this.reportsMouse(t))for(let e=0;e<Math.abs(i);e+=1)this.sendMouse(`press`,i<0?4:5,t);else if(n.isAlternateScreen()){let e=(n.isApplicationCursorKeys()?`\x1BO`:`\x1B[`)+(i<0?`A`:`B`);this.context.onData(e.repeat(Math.abs(i)))}else this.context.scrollViewport(i)}}cellAt(e,t){let n=this.context.view(),r=this.context.canvas.getBoundingClientRect();return{x:Math.max(0,Math.min(n.cols-1,Math.floor((e-r.left)/n.metrics.width))),y:Math.max(0,Math.min(n.rows-1,Math.floor((t-r.top)/n.metrics.height)))}}reportsMouse(e){return this.context.core.isMouseTracking()&&!e.shiftKey&&!e.ctrlKey&&!e.metaKey}sendMouse(e,t,n){let r=this.context.view(),i=this.context.canvas.getBoundingClientRect(),a=window.devicePixelRatio||1,o=this.context.core.encoder.encodeMouse({action:e,button:t,mods:+!!n.shiftKey|(n.ctrlKey?2:0)|(n.altKey?4:0)|(n.metaKey?8:0),x:Math.max(0,n.clientX-i.left)*a,y:Math.max(0,n.clientY-i.top)*a,screenWidth:r.cols*r.metrics.width*a,screenHeight:r.rows*r.metrics.height*a,cellWidth:r.metrics.width*a,cellHeight:r.metrics.height*a,anyButtonPressed:n.buttons!==0});if(o.length!==0){if(e===`motion`){if(o===this.lastMotion)return;this.lastMotion=o}else this.lastMotion=``;this.context.onData(o)}}linkAt(e,t){let n=this.context.view(),r=this.context.core,i=n.snapshot;if(!i)return null;let a=this.context.canvas.getBoundingClientRect(),o=e-a.left,s=t-a.top;if(o<0||s<0||o>=n.cols*n.metrics.width||s>=n.rows*n.metrics.height)return null;let c={x:Math.floor(o/n.metrics.width),y:Math.floor(s/n.metrics.height)},l=r.hyperlinkAt(c.x,c.y);if(l!==null){if(l.startsWith(`offsite-image:`))return null;let e=c.x,t=c.x;for(;e>0&&r.hyperlinkAt(e-1,c.y)===l;)--e;for(;t<n.cols-1&&r.hyperlinkAt(t+1,c.y)===l;)t+=1;return{uri:l,range:{start:{x:e,y:c.y},end:{x:t,y:c.y}}}}let u=c.y;for(;u>0&&i.rowData[u]?.isWrapContinuation;)--u;let d=c.y;for(;d<i.rows-1&&i.rowData[d]?.wrapsToNext;)d+=1;let f=``,p=[];for(let e=u;e<=d;e+=1){let t=i.rowData[e];if(!t)break;let n=Bj(t,e);f+=n.text,p.push(...n.points)}for(let e of f.matchAll(GM)){let t=e[0].replace(/[.,;:!?)\]}'"]+$/,``),n=p[e.index],r=p[e.index+t.length-1];if(!n||!r)continue;let i={start:n,end:r};if(VM(i,c.y,c.x))return{uri:t,range:i}}return null}setHoveredLink(e){let t=this.hoveredLink;this.context.canvas.style.cursor=e?`pointer`:``,(t?.uri!==e?.uri||t?.range.start.x!==e?.range.start.x||t?.range.start.y!==e?.range.start.y)&&(this.hoveredLink=e,this.context.redraw())}beginSelection(e,t){let n=this.context.core,r=this.cellAt(e.clientX,e.clientY),i=n.toScreen(r);if(!i)return;this.selectionMoved=!1,this.selectionMode=t>=3?`line`:t===2?`word`:`cell`;let a=this.selectionMode===`line`?n.selectLine(i):this.selectionMode===`word`?n.selectWord(i):null;this.selectionAnchor=a?a.start:i,this.selectionBase=a,a?n.setSelection(a.start,a.end):(this.selectionMode=`cell`,n.setSelection(i,i)),this.context.redraw()}extendSelection(e,t){let n=this.context.core,r=this.selectionAnchor;if(!r)return;let i=this.cellAt(e,t),a=n.toScreen(i);if(!a)return;this.selectionMoved=!0;let o=this.selectionBase;if(o===null)n.setSelection(r,a);else{let e=this.selectionMode===`line`?n.selectLine(a):n.selectWord(a),t=a.y<o.start.y||a.y===o.start.y&&a.x<o.start.x;n.setSelection(t?o.end:o.start,e?t?e.start:e.end:a)}this.context.redraw()}setSelectionScroll(e){this.selectionScrollDelta=e,e===0?(this.selectionScroll!==null&&window.clearInterval(this.selectionScroll),this.selectionScroll=null):this.selectionScroll===null&&(this.selectionScroll=window.setInterval(()=>{this.context.scrollViewport(this.selectionScrollDelta);let e=this.selectionClient;e&&this.extendSelection(e.x,e.y)},80))}dragScrollbar(e){let t=this.context.core.scrollbarState(),n=this.scrollbarDrag;if(t===null||n===null)return;let r=this.context.scrollbar.getBoundingClientRect(),i=qM(t,r.height);if(i===null||i.travel===0)return;let a=Math.max(0,Math.min(e-r.top-n.offset,i.travel)),o=Math.round(a/i.travel*i.maxOffset);this.context.scrollViewport(o-t.offset)}onPointerDown=e=>{let t=this.context.canvas;if(this.context.focus(),e.pointerType===`touch`){this.touch={id:e.pointerId,y:e.clientY,moved:!1},t.setPointerCapture(e.pointerId);return}if(this.reportsMouse(e)){let n=KM(e.button);if(n===null)return;e.preventDefault(),this.mousePointer=e.pointerId,this.mouseButton=n,this.sendMouse(`press`,n,e),t.setPointerCapture(e.pointerId);return}if(e.button!==0)return;if(this.linkAt(e.clientX,e.clientY)&&(UM?e.metaKey:e.ctrlKey)){e.preventDefault(),this.linkPointer=e.pointerId;return}let n=e.timeStamp-this.clicks.time<=WM&&Math.hypot(e.clientX-this.clicks.x,e.clientY-this.clicks.y)<=4;this.clicks={count:n?this.clicks.count>=3?1:this.clicks.count+1:1,time:e.timeStamp,x:e.clientX,y:e.clientY},this.clickMove=!e.altKey&&!e.shiftKey&&!e.ctrlKey&&!e.metaKey&&this.context.view().clickToMoveCursor&&this.clicks.count===1?this.cellAt(e.clientX,e.clientY):null,this.selectionPointer=e.pointerId,this.beginSelection(e,this.clicks.count),t.setPointerCapture(e.pointerId)};onPointerMove=e=>{let t=this.touch;if(t?.id===e.pointerId){let n=t.y-e.clientY;if(Math.abs(n)<1)return;t.y=e.clientY,t.moved=!0,this.scrollRows(n,e)}else if(this.mousePointer===e.pointerId||this.context.core.isMouseAnyEventTracking()&&this.reportsMouse(e)){let t=e.buttons,n=t&1?1:t&4?3:t&2?2:null;this.sendMouse(`motion`,n,e)}else if(this.selectionPointer===e.pointerId){let t=this.cellAt(e.clientX,e.clientY);this.clickMove!==null&&(t.x!==this.clickMove.x||t.y!==this.clickMove.y)&&(this.clickMove=null),this.selectionClient={x:e.clientX,y:e.clientY};let n=this.context.canvas.getBoundingClientRect();this.setSelectionScroll(e.clientY<n.top?-1:+(e.clientY>n.bottom)),this.extendSelection(e.clientX,e.clientY)}else this.setHoveredLink(this.linkAt(e.clientX,e.clientY))};onPointerUp=e=>{let t=this.context.canvas;if(t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),this.touch?.id===e.pointerId)this.touch=null;else if(this.linkPointer===e.pointerId){this.linkPointer=null;let t=this.linkAt(e.clientX,e.clientY);t&&e.type===`pointerup`&&this.context.onLink(t.uri,e)}else if(this.mousePointer===e.pointerId)this.sendMouse(`release`,this.mouseButton,e),this.mousePointer=null,this.mouseButton=null;else if(this.selectionPointer===e.pointerId){this.selectionPointer=null,this.setSelectionScroll(0),!this.selectionMoved&&this.selectionMode===`cell`&&(this.context.core.clearSelection(),this.selectionAnchor=null,this.context.redraw());let t=this.clickMove;this.clickMove=null,t!==null&&e.type===`pointerup`&&this.context.moveCursorTo(t)}};onPointerLeave=()=>{this.lastMotion=``,this.setHoveredLink(null)};onWheel=e=>{if(e.deltaY===0)return;e.preventDefault();let t=this.context.view(),n=e.deltaMode===1?e.deltaY*t.metrics.height:e.deltaMode===2?e.deltaY*t.rows*t.metrics.height:e.deltaY;this.scrollRows(n,e)};onMouseDown=e=>{e.button===0&&e.preventDefault(),this.context.focus()};onScrollbarDown=e=>{let t=this.context.core.scrollbarState();if(e.button!==0||t===null)return;let n=this.context.scrollbar,r=n.getBoundingClientRect(),i=qM(t,r.height);i!==null&&(e.preventDefault(),e.stopPropagation(),this.scrollbarDrag={id:e.pointerId,offset:e.target===this.context.thumb?e.clientY-r.top-i.thumbTop:i.thumbHeight/2},n.setPointerCapture(e.pointerId),this.dragScrollbar(e.clientY))};onScrollbarMove=e=>{this.scrollbarDrag?.id===e.pointerId&&(e.preventDefault(),this.dragScrollbar(e.clientY))};onScrollbarUp=e=>{if(this.scrollbarDrag?.id!==e.pointerId)return;this.scrollbarDrag=null;let t=this.context.scrollbar;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId)}},YM=[`\r`,`
|
|
27
|
+
`,``,``,``,``,`\x1B[99;5u`,`\x1B[100;5u`,`\x1B[111;5u`,`\x1B[122;5u`];function XM(e,t){return e.y<t.y||e.y===t.y&&e.x<t.x}var ZM=class{shell=`unknown`;generation=0;core;native=!1;input=!1;clickEvents=!1;inputRef=null;constructor(e){this.core=e}mark(e,t){let n=e.startsWith(`133;`),r=n?4:5;if(e.length>r+1&&e[r+1]!==`;`)return;let i=e.charAt(r);if(!this.core.isAlternateScreen()){if(i===`A`){let r=e.split(`;`);if(r.includes(`k=s`)||r.includes(`k=c`))return;let i=n&&r.includes(`click_events=1`),a=this.shell===`prompt`,o=a&&!this.input&&this.native!==n;if(this.shell=`prompt`,this.native=n,t&&this.trackInput(),o){this.clickEvents=this.clickEvents||i;return}if(this.input=!1,this.clickEvents=i,a)return;this.generation+=1}else if(i===`B`)this.shell=`prompt`,this.input=!0,t&&this.trackInput();else if(i===`C`)this.shell=`command`;else if(i===`D`){if(this.shell===`prompt`&&!this.input)return;this.shell=`unknown`}}}beforeInput(e){this.shell===`prompt`&&YM.some(t=>e.includes(t))&&(this.shell=`unknown`)}reset(){this.release(),this.shell=`unknown`,this.input=!1,this.clickEvents=!1}release(){this.inputRef!==null&&this.core.untrack(this.inputRef),this.inputRef=null}moveCursorInput(e,t,n){if(this.shell!==`prompt`||this.inputRef===null||t===null||t.cursorX<0||t.cursorY<0||this.core.isAlternateScreen()||this.core.isMouseTracking())return null;let r=this.core.trackedPoint(this.inputRef);if(r===null)return null;let i={x:r.x,y:r.y-n};if(XM(e,i))return null;if(this.clickEvents){let t=this.core.scrollbarState();if(t===null)return null;let r=e.y+n-(t.total-t.len);return r<0?null:`\x1b[<0;${e.x+1};${r+1}M`}if(!this.input)return null;let a={x:e.x,y:e.y};a.x>0&&t.rowData[a.y]?.cells[a.x]?.wide===jj.spacerTail&&--a.x;let o={x:t.cursorX,y:t.cursorY};if(XM(a,i)||XM(o,i))return null;let s=XM(a,o),c=s?a:o,l=s?o:a,u=0;for(let e=c.y;e<=l.y;e+=1){let n=t.rowData[e];if(n===void 0)return null;let r=e===l.y?l.x:n.cells.length;for(let t=e===c.y?c.x:0;t<r;t+=1)n.cells[t].text!==``&&(u+=1);if(e<l.y&&!n.wrapsToNext){if(s)return null;break}}let d=s?`ArrowLeft`:`ArrowRight`,f=this.core.encoder.encodeKey(new KeyboardEvent(`keydown`,{key:d,code:d}));return u>0?f.repeat(u):``}trackInput(){this.inputRef===null?this.inputRef=this.core.trackCursor():this.core.retrack(this.inputRef)}},QM=navigator.userAgent.includes(`Mac`),$M=navigator.userAgent.includes(`Windows`),eN=600,tN=1e3,nN=1e4,rN=new TextDecoder(`latin1`),iN=new TextDecoder;function aN(e){let t=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e);if(!t)throw Error(`unsupported color ${e}`);return{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}}function oN(e){return[...e.split(`,`).map(e=>e.trim()).filter(e=>e.length>0).map(e=>/^(['"]).*\1$/.test(e)||/^[a-zA-Z][a-zA-Z0-9-]*$/.test(e)?e:`"${e.replaceAll(`"`,``)}"`),`monospace`].join(`, `)}async function sN(e){try{(await e)?.close()}catch(e){console.warn(`could not decode image`,e)}}var cN=class{element;cols=80;rows=24;canvas;input;context;core;scanner=new mM;handlers;observer;prompt;search;images;pointer;notifications=new cM;options;appearance;metrics;snapshot=null;sized=!1;fitted=!1;frame=0;forceFull=!0;renderFailed=!1;cursorOn=!0;cursorTimer=null;syncTimer=null;renderedCursorY=null;focused=!1;composing=!1;suppressedKeys=new Set;heldOptionKeys=new Set;backlog=[];blocked=!1;epoch=0;title=``;progress={state:0,value:0};disposed=!1;constructor(e,t){this.options=e,this.handlers=t,this.element=document.createElement(`div`),this.element.className=`relative h-full overflow-hidden`,this.canvas=document.createElement(`canvas`),this.canvas.className=`absolute top-0 left-0 cursor-text touch-none`,this.input=document.createElement(`textarea`),this.input.setAttribute(`aria-label`,`Terminal input`),this.input.autocapitalize=`off`,this.input.autocomplete=`off`,this.input.spellcheck=!1,this.input.style.cssText=`position:absolute;left:0;top:0;width:1px;height:1px;opacity:0;padding:0;border:0;resize:none;pointer-events:none;`;let n=document.createElement(`div`);n.className=`absolute top-0 right-0 bottom-0 w-2 cursor-default touch-none`,n.hidden=!0;let r=document.createElement(`div`);r.className=`bg-foreground/15 hover:bg-foreground/30 absolute inset-x-0.5 top-0 rounded-full`,n.append(r),this.element.append(this.canvas,this.input,n);let i=this.canvas.getContext(`2d`,{alpha:!1});if(!i)throw Error(`canvas 2d is unavailable`);this.context=i,this.appearance=this.appearanceFor(e),this.metrics=this.measure(),this.core=new Jj(Math.max(1,Math.floor(window.innerWidth/this.metrics.width)),this.rows,e.scrollback,t.onReply,t.onBell),this.prompt=new ZM(this.core),this.search=new Xj(this.core,()=>this.redraw()),this.images=new kA(this.core),this.pointer=new JM({canvas:this.canvas,scrollbar:n,thumb:r,core:this.core,view:()=>({cols:this.cols,rows:this.rows,metrics:this.metrics,snapshot:this.snapshot,clickToMoveCursor:this.options.clickToMoveCursor}),focus:()=>this.focus(),redraw:()=>this.redraw(),scrollViewport:e=>this.scrollViewport(e),moveCursorTo:e=>this.moveCursorTo(e),onData:t.onData,onLink:t.onLink}),this.applyTerminalOptions(),this.resizeCore(),this.installEvents(),this.observer=new ResizeObserver(()=>this.fit()),this.observer.observe(this.element)}setOptions(e){this.options=e,this.appearance=this.appearanceFor(e),this.metrics=this.measure(),e.clickToMoveCursor||this.prompt.release(),this.applyTerminalOptions(),this.resizeCore(),this.forceFull=!0,this.fit(),this.requestRender()}write(e,t){this.disposed||(this.backlog.push({data:e,replay:t}),this.blocked||this.drain())}reset(){this.epoch+=1,this.backlog=[],this.blocked=!1,this.scanner.reset(),this.prompt.reset(),this.core.reset(),this.applyTerminalOptions(),this.images.clear(),this.core.clearSelection(),this.redraw()}focus(){this.input.focus({preventScroll:!0})}isKittyKeyboard(){return this.core.isKittyKeyboard()}paste(e){let t=this.core.encoder.encodePaste(e);t.length>0&&this.sendInput(t)}presize(e,t){this.fitted||e===this.cols&&t===this.rows||(this.cols=e,this.rows=t,this.resizeCore())}fit(){if(this.disposed)return;let e=this.element.clientWidth,t=this.element.clientHeight;if(e===0||t===0){this.sized=!1;return}this.sized=!0,this.fitted=!0;let n=window.devicePixelRatio||1,r=Math.round(e*n),i=Math.round(t*n);(this.canvas.width!==r||this.canvas.height!==i)&&(this.canvas.width=r,this.canvas.height=i,this.canvas.style.width=`${e}px`,this.canvas.style.height=`${t}px`,this.context.setTransform(n,0,0,n,0,0),this.metrics=this.measure(),this.resizeCore(),this.forceFull=!0);let a=Math.max(1,Math.floor(e/this.metrics.width)),o=Math.max(1,Math.floor(t/this.metrics.height));(a!==this.cols||o!==this.rows)&&(this.cols=a,this.rows=o,this.resizeCore(),this.forceFull=!0,this.handlers.onResize(a,o)),this.renderFrame()}find(e,t,n){let r=this.viewportTop(),i=this.search.find(e,t,n,r);i!==null&&(i.row<r||i.row>=r+this.rows)&&this.scrollViewport(i.row-r-Math.floor(this.rows/2)),this.redraw()}onFindResults(e){return this.search.onResults(e)}clearFind(){this.search.clear(),this.redraw()}replyClipboard(e,t){t.epoch!==this.epoch||t.generation!==this.prompt.generation||t.atPrompt&&this.prompt.shell!==`prompt`||this.handlers.onReply(rM(e,t.selection,t.terminator))}beforeInput(e){this.prompt.beforeInput(e)}dispose(){this.disposed||(this.disposed=!0,this.observer.disconnect(),this.cancelRender(),this.pointer.dispose(),this.search.dispose(),window.removeEventListener(`focus`,this.onWindowFocus),document.removeEventListener(`visibilitychange`,this.onVisibilityChange),this.images.clear(),this.prompt.release(),this.core.dispose(),this.element.remove())}redraw(){this.forceFull=!0,this.requestRender()}resizeCore(){this.core.resize(this.cols,this.rows,this.metrics.width,this.metrics.height,window.devicePixelRatio||1)}appearanceFor(e){let t=e.colors;return{fontSize:e.fontSize,fontFamily:oN(e.fontFamily),ligatures:e.ligatures,cursorText:t.cursorText,selectionBackground:t.selectionBackground,selectionForeground:t.selectionForeground,matchBackground:t.palette[8],activeMatchBorder:t.palette[3]}}measure(){return zM(this.context,this.options.fontSize,this.appearance.fontFamily,this.options.lineHeight,window.devicePixelRatio||1)}applyTerminalOptions(){let e=this.options.colors;this.core.setColors({foreground:aN(e.foreground),background:aN(e.background),cursor:aN(e.cursor),palette:e.palette.map(aN)}),this.core.setCursor(this.options.cursorStyle,this.options.cursorBlink),this.core.boldIsBright=this.options.boldIsBright,this.core.version=this.options.version,this.core.invalidate()}drain(){for(;!this.blocked&&this.backlog.length>0;){let e=this.backlog.shift();e&&this.process(e)}let e=this.core.title();e!==this.title&&(this.title=e,this.handlers.onTitle(e)),this.search.outputChanged(),this.cursorOn=!0,this.requestRender()}process(e){let t=e.data,n=e.replay;this.core.setReplies(!n);let r=0,i=this.scanner.scan(t,(e,i)=>(this.core.write(t.subarray(r,i)),r=i,this.handleOutput(e,n)));this.core.write(t.subarray(r,i)),i<t.length&&this.backlog.unshift({data:t.subarray(i),replay:n})}handleOutput(e,t){if(e.type===`sixel`)return this.decodeImage(TA(e.data));let n=rN.decode(e.data);if(n.startsWith(`1337;File=`))return this.decodeImage(DA(n.slice(10),{cellWidth:this.metrics.width,cellHeight:this.metrics.height,width:this.cols*this.metrics.width,height:this.rows*this.metrics.height,pixelRatio:window.devicePixelRatio||1}));if(n.startsWith(`133;`)||n.startsWith(`6973;`))return this.prompt.mark(n,this.options.clickToMoveCursor),!1;if(n.startsWith(`52;`)){let r=n.split(`;`),i=r[2];if(t||i===void 0)return!1;if(i===`?`)return this.handlers.onClipboardRead({selection:tM(r[1]),terminator:e.terminator,generation:this.prompt.generation,epoch:this.epoch,atPrompt:this.prompt.shell===`prompt`}),!1;let a=nM(i);return a!==null&&this.handlers.onClipboard(a),!1}if(n===`10;?`||n===`11;?`||n===`12;?`)return t||this.handlers.onReply(iM(n,this.core.currentColors(),e.terminator)),!1;if(n.startsWith(`4;`)){if(!t)for(let t of aM(n,this.core.currentColors().palette,e.terminator))this.handlers.onReply(t);return!1}if(n===`9;4`||n.startsWith(`9;4;`)){let e=oM(n,this.progress);return e!==null&&(this.progress=e,this.handlers.onProgress(e)),!1}if(t)return!1;let r=n.startsWith(`99;`)?this.notifications.add(iN.decode(e.data)):sM(n,e.data);return r!==null&&this.handlers.onNotify(r.title,r.body),!1}decodeImage(e){return this.blocked=!0,this.placeImage(e,this.epoch,window.devicePixelRatio||1),!0}async placeImage(e,t,n){let r=0,i=new Promise(e=>{r=window.setTimeout(()=>e(`timeout`),nN)});try{let r=await Promise.race([e,i]);r===`timeout`?(console.warn(`image decoding took too long, skipping the image`),sN(e)):r!==null&&(t===this.epoch&&!this.disposed?this.images.place(r,n,this.metrics.height):r.close())}catch(e){console.warn(`could not decode image`,e)}window.clearTimeout(r),t!==this.epoch||this.disposed||(this.blocked=!1,this.drain())}moveCursorTo(e){if(!this.options.clickToMoveCursor)return;let t=this.prompt.moveCursorInput(e,this.snapshot,this.viewportTop());t!==null&&(t!==``&&this.sendInput(t),this.core.clearSelection(),this.redraw())}sendInput(e){this.prompt.beforeInput(e),this.core.scrollbarState()?.offset!==this.maxOffset()&&(this.core.scrollToBottom(),this.redraw()),this.handlers.onData(e)}maxOffset(){let e=this.core.scrollbarState();return e?Math.max(0,e.total-e.len):0}viewportTop(){return this.core.toScreen({x:0,y:0})?.y??0}scrollViewport(e){let t=this.core.scrollbarState(),n=Math.trunc(e);if(t!==null){let e=Math.max(0,t.total-t.len);n=Math.max(0,Math.min(t.offset+n,e))-t.offset}n!==0&&(this.core.scroll(n),this.redraw())}requestRender(){!this.disposed&&this.sized&&this.frame===0&&(this.frame=window.requestAnimationFrame(()=>{this.frame=0,this.renderFrame()}))}cancelRender(){this.frame!==0&&window.cancelAnimationFrame(this.frame),this.frame=0,this.cursorTimer!==null&&window.clearTimeout(this.cursorTimer),this.cursorTimer=null,this.syncTimer!==null&&window.clearTimeout(this.syncTimer),this.syncTimer=null}renderFrame(){if(!this.disposed&&this.sized&&this.element.isConnected){this.frame!==0&&window.cancelAnimationFrame(this.frame),this.frame=0;try{this.draw(),this.renderFailed=!1}catch(e){this.renderFailed||console.error(`could not draw the terminal`,e),this.renderFailed=!0}}}draw(){if(this.core.isSynchronizedOutput()){this.syncTimer===null&&(this.syncTimer=window.setTimeout(()=>{this.syncTimer=null,this.core.endSynchronizedOutput(),this.requestRender()},tN));return}this.syncTimer!==null&&window.clearTimeout(this.syncTimer),this.syncTimer=null;let e=this.core.snapshot();this.snapshot=e;let t=this.focused&&e.cursorBlinking&&e.cursorVisible;t||(this.cursorOn=!0);let n=this.viewportTop(),r=this.images.visible(n,this.rows,this.metrics.height),i=this.core.cellSize(),a=this.core.kitty.images(e.rowData,i);HM({context:this.context,snapshot:e,metrics:this.metrics,appearance:this.appearance,forceFull:this.forceFull||r.length>0||a.length>0,cursorOn:this.cursorOn,previousCursorY:this.renderedCursorY,focused:this.focused,hoveredLink:this.pointer.hoveredLink?.range??null,highlights:this.search.highlights(e,n),pixelRatio:window.devicePixelRatio||1,drawLayer:e=>vj(this.context,a,e,this.metrics,i)}),vj(this.context,a,`aboveText`,this.metrics,i);for(let e of r)this.context.drawImage(e.bitmap,e.x*this.metrics.width,e.y*this.metrics.height,e.width,e.height);this.forceFull=r.length>0||a.length>0,this.renderedCursorY=this.cursorOn&&e.cursorVisible&&e.cursorY>=0?e.cursorY:null,e.cursorX>=0&&e.cursorY>=0&&(this.input.style.left=`${e.cursorX*this.metrics.width}px`,this.input.style.top=`${e.cursorY*this.metrics.height}px`),this.pointer.updateScrollbar(this.element.clientHeight),this.cursorTimer!==null&&window.clearTimeout(this.cursorTimer),this.cursorTimer=null,t&&(this.cursorTimer=window.setTimeout(()=>{this.cursorTimer=null,this.cursorOn=!this.cursorOn,this.requestRender()},eN))}copySelection(){let e=this.core.selectionText();e.length!==0&&(window.isSecureContext?navigator.clipboard.writeText(e):console.warn(`copy from the terminal needs https or localhost`))}optionIsMeta(e){if(!QM||!e.altKey||e.metaKey)return!1;let t=this.options.optionAsMeta;if(t===`off`)return!1;if(t===`both`)return!0;if(t===`left`)return this.heldOptionKeys.has(`AltLeft`);if(t===`right`)return this.heldOptionKeys.has(`AltRight`);throw Error(`unknown option as meta mode ${t}`)}onKeyDown=e=>{if((e.code===`AltLeft`||e.code===`AltRight`)&&this.heldOptionKeys.add(e.code),!this.handlers.beforeKey(e)){this.suppressedKeys.add(e.code);return}let t=this.optionIsMeta(e),n=t&&this.core.encoder.metaText(e)!==null;if(e.isComposing||this.composing||!n&&(e.key===`Process`||e.keyCode===229)||QM&&this.options.optionAsMeta!==`off`&&!t&&e.altKey&&!e.ctrlKey&&!e.metaKey&&([...e.key].length===1||e.key===`Dead`)||!n&&e.getModifierState(`AltGraph`)&&[...e.key].length===1){this.suppressedKeys.add(e.code);return}let r=e.key.toLowerCase(),i=$M&&this.options.windowsCopyPaste&&e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey;if(i&&r===`c`&&this.core.selectionText().length>0){this.copySelection(),this.core.clearSelection(),this.redraw(),e.preventDefault(),this.suppressedKeys.add(e.code);return}if(QM?e.metaKey&&r===`c`:e.ctrlKey&&e.shiftKey&&r===`c`||e.ctrlKey&&!e.shiftKey&&r===`insert`){this.copySelection(),e.preventDefault(),this.suppressedKeys.add(e.code);return}if((QM?e.metaKey&&r===`v`:e.ctrlKey&&e.shiftKey&&r===`v`||e.shiftKey&&!e.ctrlKey&&r===`insert`||i&&r===`v`)||QM&&e.metaKey&&r===`q`){this.suppressedKeys.add(e.code);return}let a=this.core.encoder.encodeKey(e,`press`,n);a.length!==0&&(this.suppressedKeys.delete(e.code),e.preventDefault(),e.stopPropagation(),this.core.selectionText().length>0&&!e.shiftKey&&(this.core.clearSelection(),this.forceFull=!0),this.sendInput(a))};onKeyUp=e=>{if(this.heldOptionKeys.delete(e.code),this.suppressedKeys.delete(e.code)||e.isComposing||this.composing)return;let t=this.core.encoder.encodeKey(e,`release`,this.optionIsMeta(e));t.length!==0&&(e.preventDefault(),this.handlers.onData(t))};onInput=e=>{let t=e;if(this.composing||t.isComposing)return;let n=this.input.value||t.data||``;this.input.value=``,n.length>0&&this.sendInput(n)};onCompositionStart=()=>{this.composing=!0};onCompositionEnd=e=>{this.composing=!1;let t=this.input.value||e.data;this.input.value=``,t.length>0&&this.sendInput(t)};onPaste=e=>{e.preventDefault();let t=e.clipboardData?.getData(`text/plain`)??``;t.length>0&&this.paste(t)};onCopy=e=>{let t=this.core.selectionText();t.length!==0&&e.clipboardData&&(e.preventDefault(),e.clipboardData.setData(`text/plain`,t))};onWindowFocus=()=>{QM&&this.options.optionAsMeta!==`off`&&this.core.encoder.refreshKeyboardLayout()};onContextRestored=()=>{let e=window.devicePixelRatio||1;this.context.setTransform(e,0,0,e,0,0),this.redraw()};onVisibilityChange=()=>{document.visibilityState===`visible`&&this.redraw()};onFocus=()=>{this.focused=!0,this.cursorOn=!0,this.requestRender(),!this.disposed&&this.core.isFocusReporting()&&this.handlers.onReply(`\x1B[I`)};onBlur=()=>{this.focused=!1,this.heldOptionKeys.clear(),this.cursorOn=!0,this.requestRender(),!this.disposed&&this.core.isFocusReporting()&&this.handlers.onReply(`\x1B[O`)};installEvents(){this.input.addEventListener(`keydown`,this.onKeyDown),this.input.addEventListener(`keyup`,this.onKeyUp),this.input.addEventListener(`input`,this.onInput),this.input.addEventListener(`compositionstart`,this.onCompositionStart),this.input.addEventListener(`compositionend`,this.onCompositionEnd),this.input.addEventListener(`paste`,this.onPaste),this.input.addEventListener(`copy`,this.onCopy),this.input.addEventListener(`focus`,this.onFocus),this.input.addEventListener(`blur`,this.onBlur),this.canvas.addEventListener(`contextrestored`,this.onContextRestored),window.addEventListener(`focus`,this.onWindowFocus),document.addEventListener(`visibilitychange`,this.onVisibilityChange)}},lN=new Map,uN=new Map,dN=null,fN=0;function pN(e){return zN().open&&HN()?.tabId===e&&!document.hidden&&document.hasFocus()}function mN(e){if(pN(e))return!1;let t=zN();return t.alerts.includes(e)||BN({alerts:[...t.alerts,e]}),!0}function hN(e){if(!mN(e)||uN.has(e))return;let t=lN.get(e);t!==void 0&&performance.now()-t<5e3||uN.set(e,window.setTimeout(()=>{uN.delete(e),pN(e)||(lN.set(e,performance.now()),_N(e,``,`Bell`))},500))}function gN(e,t,n){mN(e)&&(window.clearTimeout(uN.get(e)),uN.delete(e),lN.set(e,performance.now()),_N(e,t,n))}function _N(e,t,n){let r=GN(e);r&&ma(t||KN(r),n,{machine:LN(),project:r.projectId??`global`,tabId:e}).catch(e=>console.error(`could not show a notification`,e))}function vN(){let e=performance.now();if(e-fN<150)return;fN=e,dN??=new AudioContext,dN.state===`suspended`&&dN.resume();let t=dN.createOscillator(),n=dN.createGain(),r=dN.currentTime;t.frequency.value=880,n.gain.setValueAtTime(.1,r),n.gain.exponentialRampToValueAtTime(.001,r+.15),t.connect(n).connect(dN.destination),t.start(r),t.stop(r+.15)}function yN(e){return{alerts:zN().alerts.filter(t=>e(t)&&!pN(t))}}function bN(e){window.clearTimeout(uN.get(e)),uN.delete(e),lN.delete(e)}function xN(e){return e.key===`Enter`&&e.shiftKey&&!e.ctrlKey&&!e.altKey&&!e.metaKey}function SN(e){let t=new cN(IN(),{onData:t=>{zN().status===`active`&&$N(e,CN(t))},onReply:t=>{t===`\x1B[I`||t===`\x1B[O`?$N(e,t):eP(e,t)},onResize:(t,n)=>XN({type:`resize`,id:e,cols:t,rows:n}),onTitle:t=>BN({titles:{...zN().titles,[e]:t}}),onProgress:t=>BN({progress:{...zN().progress,[e]:t}}),onBell:()=>{let n=VN().behavior;n.bellSound&&vN(),n.bellFlash&&t.element.isConnected&&!document.hidden&&t.element.animate([{opacity:.4},{opacity:1}],{duration:200,easing:`ease-out`}),hN(e)},onNotify:(t,n)=>gN(e,t,n),onClipboard:BE,onClipboardRead:n=>{pN(e)&&VE(e=>t.replyClipboard(e,n))},onLink:e=>{e.startsWith(`file:`)?ln(e):window.open(e,`_blank`,`noopener`)},beforeKey:n=>{if(n.type!==`keydown`)return!0;let r=VN(),i=He(I(),LN()).system;if(i===null)throw Error(`the terminal machine is not connected`);let a=i.platform;if(zN().status===`active`&&r.behavior.modernizeShiftEnter&&xN(n)&&!t.isKittyKeyboard())return n.preventDefault(),t.beforeInput(`\x1B\r`),$N(e,`\x1B\r`),!1;if(zN().status===`active`&&r.behavior.pasteBrowserImages&&window.isSecureContext&&UE(n,a)&&!(Wn&&r.behavior.windowsCopyPaste&&n.ctrlKey)){n.preventDefault();let r=HE[a].data;return t.beforeInput(r),WE(LN(),t).then(t=>{t||$N(e,r)}).catch(t=>{KE(t),$N(e,r)}),!1}return!cP(n)||(n.preventDefault(),BN({finding:e}),document.querySelector(`[data-find]`)?.select(),!1)}});return t.element.addEventListener(`paste`,e=>{if(!e.clipboardData||e.clipboardData.getData(`text/plain`)!==``)return;let n=[...e.clipboardData.files].filter(e=>e.type.startsWith(`image/`));n.length!==0&&(e.preventDefault(),e.stopPropagation(),GE(LN(),t,n).catch(KE))},!0),t}function CN(e){if(!zN().ctrl||(BN({ctrl:!1}),e.length!==1))return e;let t=e.toUpperCase().charCodeAt(0);return t>=64&&t<=95?String.fromCharCode(t-64):e}function wN(){return{titles:{},progress:{},alerts:[],finding:null}}var TN=new TextEncoder,EN=new Map,DN=new Set,ON=new Set,kN={status:`connecting`,failure:null,loaded:!1,open:!1,instance:null,layout:{tabs:[],active:{}},pageView:In,ctrl:!1,...wN()},AN=null,jN=null,MN=!1;async function NN(){JN(),_.history.subscribe(JN);try{await Promise.all([zA(),Fp(VN())]),BN({loaded:!0})}catch(e){console.error(`could not start the terminal`,e),BN({failure:Xn(e)});return}et({close:e=>{e===jN&&BN({status:`connecting`})},terminal:(e,t)=>{e===jN&&oP(t)},frame:(e,t)=>{e===jN&&aP(t)}}),PN(),_.history.subscribe(PN),document.addEventListener(`visibilitychange`,()=>BN({})),window.addEventListener(`focus`,()=>{BN({}),AN!==null&&lP(AN,uP(AN))}),window.addEventListener(`blur`,()=>BN({})),`serviceWorker`in navigator&&navigator.serviceWorker.addEventListener(`message`,e=>{e.data.type===`select`&&YN(e.data.machine,e.data.project,e.data.tabId)});let e=I().prefs,t=FN();yn(()=>{PN();let n=I().prefs,r=FN(),i=n.theme!==e.theme||n.terminal!==e.terminal||r!==t;e=n,t=r,i&&fP()}),pP()}function PN(){let e=Se()??I().selection?.machine??null;if(e!==jN&&(jN!==null&&MN&&XN({type:`detach`}),sP([]),DN.clear(),jN=e,MN=!1,BN({status:`connecting`,instance:null,layout:{tabs:[],active:{}},...wN()})),jN===null)return;let t=He(I(),jN).status===`online`;t&&!MN&&(MN=!0,XN({type:`attach`})),t||(MN=!1)}function FN(){return jN===null?null:He(I(),jN).config?.terminal.behavior.terminalIdentity??null}function IN(){if(jN===null)throw Error(`the terminal has no machine`);let e=He(I(),jN);if(e.config===null||e.system===null)throw Error(`${e.name} is not connected`);return Ip(VN(),e.config.terminal.behavior.terminalIdentity)}function LN(){if(jN===null)throw Error(`the terminal has no machine`);return jN}function RN(e){return ON.add(e),()=>{ON.delete(e)}}function zN(){return kN}function BN(e){kN={...kN,...e},kN={...kN,...yN(e=>EN.has(e))};for(let e of ON)e()}function VN(){return I().prefs.terminal}function HN(){let e=Se()===null?I().selection?.projectId:UN();return e===void 0?null:{view:e,tabs:WN(kN.layout,e),tabId:kN.layout.active[e]??null}}function UN(){return WN(kN.layout,kN.pageView).length>0?kN.pageView:In}function WN(e,t){return e.tabs.filter(e=>(e.projectId??`global`)===t)}function GN(e){return kN.layout.tabs.find(t=>t.id===e)}function KN(e){return(e.customName??kN.titles[e.id])||`Terminal`}function qN(e){e?qe({bottom:`terminal`}):ae(`overlay`,()=>qe({bottom:void 0}))}function JN(){let e=O().bottom===`terminal`||Se()!==null;e!==kN.open&&BN({open:e})}function YN(e,t,n){if(t===`global`)QN(e,In);else{let n=I().selection;(n?.machine!==e||n.projectId!==t)&&ce({machine:e,projectId:t,sessionId:null}),qN(!0)}ZN(e,{type:`select`,view:t,tabId:n})}function XN(e){jN!==null&&ZN(jN,e)}function ZN(e,t){Et(e)&&R(e,`terminal`,t).catch(e=>console.error(`terminal request failed`,e))}function QN(e,t){BN({pageView:t}),Te(e)}function $N(e,t){jN!==null&&Bn(jN,0,e,typeof t==`string`?TN.encode(t):t)}function eP(e,t){jN!==null&&Bn(jN,1,e,TN.encode(t))}function tP(e,t,n,r){uP(e).find(t,n,r)}function nP(e,t){return uP(e).onFindResults(t)}function rP(e){let t=uP(e);t.clearFind(),BN({finding:null}),t.focus()}function iP(){BN({ctrl:!kN.ctrl})}function aP(e){let t=EN.get(e.id);if(!t)return;let n=e.kind===3,r=n&&DN.delete(e.id);r&&t.reset(),t.write(e.data,n),r&&DN.size===0&&BN({status:`active`})}function oP(e){let t=e.type===`active`&&e.instance!==kN.instance;if(t&&sP([]),sP(e.layout.tabs),e.type===`active`){DN.clear(),EN.forEach((e,t)=>{DN.add(t),e.element.isConnected&&lP(t,e)}),BN({...t&&{instance:e.instance,...wN()},status:DN.size===0?`active`:`connecting`,layout:e.layout});return}for(let e of DN)EN.has(e)||DN.delete(e);let n=I().selection?.projectId,r=n!==void 0&&WN(kN.layout,n).length>0&&WN(e.layout,n).length===0;BN({status:DN.size===0?`active`:`connecting`,layout:e.layout}),r&&kN.open&&qN(!1)}function sP(e){let t=new Set(e.map(e=>e.id));EN.forEach((e,n)=>{t.has(n)||(e.dispose(),EN.delete(n),bN(n))});for(let e of t)EN.has(e)||EN.set(e,SN(e))}function cP(e){return e.key.toLowerCase()===`f`?Kn?e.metaKey&&!e.ctrlKey&&!e.altKey:e.ctrlKey&&e.shiftKey&&!e.altKey&&!e.metaKey:!1}function lP(e,t){XN({type:`resize`,id:e,cols:t.cols,rows:t.rows})}function uP(e){let t=EN.get(e);if(!t)throw Error(`terminal ${e} does not exist`);return t}function dP(e,t){let n=uP(e);t.append(n.element),n.fit();for(let e of EN.values())e.presize(n.cols,n.rows);return AN=e,lP(e,n),n.focus(),()=>{n.element.remove(),AN===e&&(AN=null)}}async function fP(){if(await Fp(VN()),EN.size>0){let e=IN();for(let t of EN.values())t.setOptions(e)}BN({})}function pP(){let e=O(),t=Se(),n=t??e.machine,r=t===null?e.project:In,i=e.terminal;if(n===void 0||r===void 0||i===void 0)return;qe({terminal:void 0});let a=RN(()=>{kN.status===`active`&&jN===n&&(a(),YN(n,r,Number(i)))})}var mP=null,hP=new Set,gP=new Set;function _P(e){return gP.add(e),()=>{gP.delete(e)}}function vP(){return mP}function yP(){mP!==null&&bP({open:!1,closing:mP.closing})}function bP(e){mP=e;for(let e of gP)e()}function xP(){return document.querySelector(`[role="dialog"][data-state="open"], [role="alertdialog"][data-state="open"]`)!==null}async function SP(e){try{let t=await Promise.race([R(LN(),`terminal.busy`,{id:e}),new Promise((e,t)=>window.setTimeout(()=>t(Error(`timed out`)),5e3))]);return`error`in t?(console.error(`could not check whether tab ${e} is running a program`,t.error),{checked:!1}):{checked:!0,program:t.program}}catch(e){return console.error(`could not check whether a program is running`,e),{checked:!1}}}async function CP(e){if(!VN().behavior.confirmCloseBusyTab){XN({type:`closeTab`,id:e});return}if(!GN(e)||hP.has(e))return;hP.add(e);let t=await SP(e);if(hP.delete(e),t.checked&&t.program===null){XN({type:`closeTab`,id:e});return}let n=GN(e);n&&!xP()&&bP({open:!0,closing:{id:e,name:KN(n),program:t.checked?t.program:null}})}var wP=Kn?`meta+t`:`ctrl+shift+t`,TP=Kn?`meta+w`:`ctrl+shift+w`,EP=`ctrl+tab`,DP=`ctrl+shift+tab`;function OP(){let e=HN()?.tabId??null;zN().open&&e!==null&&uP(e).focus()}function kP(){return Ys([wP,TP,EP,DP],(e,t)=>{e.preventDefault(),e.stopPropagation();let n=HN();if(n===null)return;if(t.hotkey===wP){XN({type:`createTab`,projectId:n.view===`global`?null:n.view});return}if(n.tabId===null)return;if(t.hotkey===TP){CP(n.tabId);return}let r;if(t.hotkey===EP)r=1;else if(t.hotkey===DP)r=-1;else throw Error(`unknown terminal shortcut ${t.hotkey}`);let i=n.tabs,a=i[(i.findIndex(e=>e.id===n.tabId)+r+i.length)%i.length];a&&XN({type:`select`,view:n.view,tabId:a.id})},{enabled:()=>VN().behavior.captureShortcuts,enableOnFormTags:!0,eventListenerOptions:{capture:!0}})}function AP(e){let[t,n]=(0,H.useState)(e.name);return(0,U.jsx)(Sr,{open:!0,onOpenChange:t=>{t||e.onDone()},children:(0,U.jsx)(hr,{onCloseAutoFocus:MP,children:(0,U.jsxs)(`form`,{className:`grid gap-4`,onSubmit:n=>{n.preventDefault(),XN({type:`renameTab`,id:e.id,name:t.trim()}),e.onDone()},children:[(0,U.jsx)(gr,{children:(0,U.jsx)(yr,{children:`Rename tab`})}),(0,U.jsx)(up,{"aria-label":`Name`,placeholder:`Use terminal title`,value:t,onChange:e=>n(e.target.value)}),(0,U.jsxs)(Cr,{children:[(0,U.jsx)(B,{type:`button`,variant:`outline`,onClick:e.onDone,children:`Cancel`}),(0,U.jsx)(B,{type:`submit`,children:`Rename`})]})]})})})}function jP(){let e=(0,H.useSyncExternalStore)(_P,vP),t=(0,H.useRef)(null);if(e===null)return null;let n=e.closing;return(0,U.jsx)(rn,{open:e.open,onOpenChange:e=>{e||yP()},children:(0,U.jsxs)(wt,{onOpenAutoFocus:e=>{e.preventDefault(),t.current?.focus()},onCloseAutoFocus:MP,children:[(0,U.jsxs)(Rn,{children:[(0,U.jsxs)(ot,{children:[`Close “`,n.name,`”?`]}),(0,U.jsx)(Qe,{children:n.program===null?`OffSite couldn’t check whether a program is still running.`:`${n.program} is still running.`})]}),(0,U.jsxs)(En,{children:[(0,U.jsx)(Ot,{children:`Cancel`}),(0,U.jsx)(Kt,{ref:t,variant:`destructive`,onClick:()=>XN({type:`closeTab`,id:n.id}),children:`Close`})]})]})})}function MP(e){e.preventDefault();let t=document.querySelector(`[role="dialog"], [role="alertdialog"]`);t===null?OP():t.focus()}function NP(e){let t=(0,H.useRef)(null),[n,r]=(0,H.useState)(``),[i,a]=(0,H.useState)({resultIndex:-1,resultCount:0});(0,H.useEffect)(()=>nP(e.id,a),[e.id]),(0,H.useEffect)(()=>t.current?.focus(),[]);function o(t,n,i){r(t),tP(e.id,t,n,i)}return(0,U.jsxs)(`div`,{className:`bg-card absolute top-2 right-4 z-10 flex items-center gap-1 rounded-lg border p-1 shadow-lg`,children:[(0,U.jsx)(up,{ref:t,"data-find":!0,className:`h-7 w-52`,placeholder:`Find`,value:n,onChange:e=>o(e.target.value,!1,!0),onKeyDown:t=>{t.key===`Escape`?(t.preventDefault(),rP(e.id)):t.key===`Enter`?(t.preventDefault(),o(n,t.shiftKey,!1)):cP(t.nativeEvent)&&(t.preventDefault(),t.currentTarget.select())}}),(0,U.jsx)(`span`,{className:`text-muted-foreground w-16 text-center text-xs tabular-nums`,children:n===``?``:i.resultCount===0?`No results`:`${i.resultIndex+1} of ${i.resultCount}`}),(0,U.jsx)(B,{variant:`ghost`,size:`icon-sm`,"aria-label":`Previous match`,onClick:()=>o(n,!0,!1),children:(0,U.jsx)(V,{icon:$a})}),(0,U.jsx)(B,{variant:`ghost`,size:`icon-sm`,"aria-label":`Next match`,onClick:()=>o(n,!1,!1),children:(0,U.jsx)(V,{icon:lt})}),(0,U.jsx)(B,{variant:`ghost`,size:`icon-sm`,"aria-label":`Close find`,onClick:()=>rP(e.id),children:(0,U.jsx)(V,{icon:ao})})]})}var PP=[{label:`Esc`,sequence:`\x1B`},{label:`Tab`,sequence:` `},{label:`↑`,sequence:`\x1B[A`},{label:`↓`,sequence:`\x1B[B`},{label:`←`,sequence:`\x1B[D`},{label:`→`,sequence:`\x1B[C`}];function FP(e){let t=(0,H.useSyncExternalStore)(RN,zN),n=t.status===`active`,r=WN(t.layout,e.view),i=t.layout.active[e.view]??null,a=kP();(0,H.useEffect)(()=>{n&&XN({type:`select`,view:e.view,tabId:null})},[e.view,n]);function o(){XN({type:`createTab`,projectId:e.view===`global`?null:e.view})}return t.loaded?(0,U.jsxs)(`div`,{ref:a,className:`flex h-full flex-col text-sm`,children:[(0,U.jsxs)(`header`,{className:z(`flex h-9 flex-none select-none`,e.tabSize===`lg`&&`h-(--workspace-topbar-height)`,r.length===1?`bg-background`:`bg-sidebar`),children:[(0,U.jsx)(`div`,{className:`flex min-w-0 flex-1 [scrollbar-width:none] overflow-x-auto`,children:r.map(n=>(0,U.jsx)(LP,{tab:n,children:(0,U.jsxs)(`div`,{className:z(`group/tab text-muted-foreground hover:text-foreground relative flex min-w-28 flex-1 items-center justify-center border-r border-b px-7 text-xs transition-colors last:border-r-0`,e.tabSize===`lg`&&`text-[13px]`,n.id===i&&`bg-background text-foreground border-b-transparent`),onMouseDown:e=>e.preventDefault(),onClick:()=>XN({type:`select`,view:e.view,tabId:n.id}),children:[(0,U.jsx)(`span`,{className:`truncate`,children:KN(n)}),(0,U.jsx)(RP,{id:n.id,className:`ml-1.5 size-1.5 flex-none rounded-full`}),(0,U.jsx)(zP,{progress:t.progress[n.id]}),(0,U.jsx)(`button`,{className:z(`text-muted-foreground hover:bg-accent hover:text-foreground absolute left-1.5 grid size-4.5 place-items-center rounded opacity-0 transition-opacity group-hover/tab:opacity-100`,n.id===i&&`pointer-coarse:opacity-100`),"aria-label":`Close tab`,onClick:e=>{e.stopPropagation(),CP(n.id)},children:(0,U.jsx)(V,{icon:ao,className:`size-3`})})]})},n.id))}),(0,U.jsx)(`button`,{className:z(`text-muted-foreground hover:text-foreground grid w-8 flex-none place-items-center transition-colors`,r.length>1&&`border-b border-l`),"aria-label":`New tab`,title:`New tab`,onClick:o,children:(0,U.jsx)(V,{icon:Va,className:`size-4`})})]}),(0,U.jsxs)(`div`,{className:`relative min-h-0 flex-1`,children:[i!==null&&(0,U.jsx)(IP,{id:i},`${t.instance}-${i}`),i!==null&&t.finding===i&&(0,U.jsx)(NP,{id:i},i),n&&i===null&&(0,U.jsx)(`button`,{className:`text-muted-foreground hover:text-foreground grid size-full cursor-pointer place-items-center text-xs transition-colors`,onClick:o,children:`New terminal`}),!n&&(0,U.jsx)(`div`,{className:`bg-background/80 animate-in fade-in absolute inset-0 z-20 grid place-items-center p-6 text-center backdrop-blur-md duration-200`,children:(0,U.jsxs)(`div`,{className:`flex flex-col items-center gap-3`,children:[(0,U.jsx)(`span`,{className:`border-foreground/15 border-t-foreground/70 size-6 animate-spin rounded-full border-[3px]`}),(0,U.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:`Connecting. Your terminals keep running while you wait.`})]})})]}),i!==null&&(0,U.jsxs)(`div`,{className:`bg-card hidden flex-none gap-1.5 overflow-x-auto border-t p-1.5 pointer-coarse:flex`,children:[PP.map(e=>(0,U.jsx)(B,{variant:`secondary`,className:`min-w-11`,onPointerDown:e=>e.preventDefault(),onClick:()=>$N(i,e.sequence),children:e.label},e.label)),(0,U.jsx)(B,{variant:t.ctrl?`default`:`secondary`,className:`min-w-11`,onPointerDown:e=>e.preventDefault(),onClick:iP,children:`Ctrl`})]}),(0,U.jsx)(jP,{})]}):(0,U.jsx)(`div`,{className:`text-muted-foreground grid h-full place-items-center p-4 text-xs whitespace-pre-wrap`,children:t.failure===null?`Starting the terminal…`:`The terminal could not start: ${t.failure}`})}function IP(e){let t=(0,H.useRef)(null);return(0,H.useEffect)(()=>{if(!t.current)throw Error(`terminal container missing`);return dP(e.id,t.current)},[e.id]),(0,U.jsx)(`div`,{className:`bg-background absolute inset-0 pt-(--pad-top) pr-(--pad-right) pb-(--pad-bottom) pl-(--pad-left)`,ref:t})}function LP(e){let[t,n]=(0,H.useState)(!1),r=L(e=>e.projects).filter(e=>e.machine===LN()),i=e.tab;return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(dn,{children:[(0,U.jsx)(xt,{asChild:!0,children:e.children}),(0,U.jsxs)(Mt,{children:[(0,U.jsxs)(nt,{onSelect:()=>n(!0),children:[(0,U.jsx)(V,{icon:Zo}),`Rename`]}),(0,U.jsxs)(Ht,{children:[(0,U.jsxs)(mt,{children:[(0,U.jsx)(V,{icon:Gt}),`Move to`]}),(0,U.jsx)(Sn,{className:`max-h-80 overflow-y-auto`,children:(0,U.jsxs)($t,{value:i.projectId??``,onValueChange:e=>XN({type:`assignTab`,id:i.id,projectId:e===``?null:e}),children:[(0,U.jsx)(hn,{value:``,children:`No project`}),r.length>0&&(0,U.jsx)(ut,{}),r.map(e=>(0,U.jsx)(hn,{value:e.id,children:(0,U.jsx)(`span`,{className:`max-w-60 truncate`,children:e.name})},e.id))]})})]}),(0,U.jsxs)(nt,{variant:`destructive`,onSelect:()=>void CP(i.id),children:[(0,U.jsx)(V,{icon:bo}),`Close tab`]})]})]}),t&&(0,U.jsx)(AP,{id:i.id,name:i.customName??``,onDone:()=>n(!1)})]})}function RP(e){return zN().alerts.includes(e.id)?(0,U.jsx)(`span`,{className:z(`bg-primary`,e.className)}):null}function zP(e){let t=e.progress;return!t||t.state===0?null:t.state===3?(0,U.jsx)(`span`,{className:`bg-primary absolute inset-x-0 bottom-0 h-0.5 animate-pulse`}):(0,U.jsx)(`span`,{className:z(`absolute bottom-0 left-0 h-0.5 transition-[width]`,t.state===1&&`bg-primary`,t.state===2&&`bg-destructive`,t.state===4&&`bg-yellow-500`),style:{width:`${t.state!==1&&t.value===0?100:t.value}%`}})}function BP({...e}){return(0,U.jsx)(Dc,{"data-slot":`hover-card`,...e})}function VP({...e}){return(0,U.jsx)(kc,{"data-slot":`hover-card-trigger`,...e})}function HP({className:e,align:t=`start`,sideOffset:n=4,...r}){return(0,U.jsx)(Nc,{children:(0,U.jsx)(Fc,{"data-slot":`hover-card-content`,sideOffset:n,align:t,className:z(`z-50 origin-(--radix-hover-card-content-transform-origin) overflow-hidden rounded-lg dropdown-glass text-popover-foreground shadow-[0_16px_40px_-18px_rgb(0_0_0/55%)] outline-none dark:shadow-[0_18px_44px_-18px_rgb(0_0_0/80%)] duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...r})})}function UP(e){let t=(0,H.useSyncExternalStore)(RN,zN),n=L(e=>e.machines),r=L(e=>e.projects),i=n.filter(e=>e.status===`online`),a=UN(),o=n.flatMap(e=>{let t=e.status===`online`?e.terminals:[],n=[...new Set(t.flatMap(e=>e.projectId===null?[]:[e.projectId]))];return[{machine:e,view:In,name:e.name,count:t.filter(e=>e.projectId===null).length},...n.map(n=>({machine:e,view:n,name:r.find(t=>t.machine===e.id&&t.id===n)?.name??`Removed project`,count:t.filter(e=>e.projectId===n).length}))]}),s=o.find(t=>t.machine.id===e.machine&&t.view===a);(0,H.useEffect)(()=>{localStorage.setItem(`lastTerminal`,e.machine)},[e.machine]);function c(e,t){ZN(e,{type:`createTab`,projectId:t}),QN(e,t??`global`)}function l(n){return n.machine.id===e.machine&&t.layout.tabs.some(e=>(e.projectId??`global`)===n.view&&t.alerts.includes(e.id))}let u=(0,U.jsxs)(ve,{children:[(0,U.jsx)(P,{asChild:!0,disabled:i.length===0,children:(0,U.jsx)(`button`,{className:`text-muted-foreground enabled:hover:text-foreground grid w-11 flex-none place-items-center self-stretch transition-colors`,"aria-label":`New terminal`,title:`New terminal`,children:(0,U.jsx)(V,{icon:Va,className:`size-4`})})}),(0,U.jsx)(N,{align:`end`,className:`w-auto min-w-56`,children:i.flatMap(e=>[(0,U.jsxs)(se,{onSelect:()=>c(e.id,null),children:[(0,U.jsx)(Md,{icon:e.icon}),(0,U.jsx)(`span`,{className:`max-w-60 truncate`,children:e.name})]},e.id),...r.filter(t=>t.machine===e.id).map(t=>(0,U.jsxs)(se,{className:`pl-7`,onSelect:()=>c(e.id,t.id),children:[(0,U.jsx)(dc,{machine:e.id,projectId:t.id,className:`size-4`}),(0,U.jsx)(`span`,{className:`max-w-60 truncate`,children:t.name})]},`${e.id}:${t.id}`))])})]});return e.mobile?(0,U.jsxs)(`main`,{className:`bg-background flex min-w-0 flex-1 flex-col overflow-hidden pt-[env(safe-area-inset-top)] pb-[env(safe-area-inset-bottom)]`,children:[(0,U.jsxs)(`header`,{className:`grid h-(--workspace-topbar-height) flex-none grid-cols-[auto_1fr_auto] items-center border-b select-none`,children:[e.leading,(0,U.jsxs)(ve,{children:[(0,U.jsx)(P,{asChild:!0,children:(0,U.jsxs)(`button`,{className:`text-muted-foreground hover:text-foreground flex min-w-0 items-center justify-center gap-1.5 self-stretch px-1 text-[13px]`,children:[s!==void 0&&(0,U.jsx)(GP,{group:s}),(0,U.jsx)(`span`,{className:`truncate`,children:s?.name})]})}),(0,U.jsx)(N,{align:`center`,className:`w-auto`,children:o.map(e=>(0,U.jsxs)(se,{className:z(e.view!==`global`&&`pl-7`),onSelect:()=>QN(e.machine.id,e.view),children:[(0,U.jsx)(GP,{group:e}),(0,U.jsx)(`span`,{className:`max-w-60 truncate`,children:e.name}),(0,U.jsx)(KP,{count:e.count,alert:l(e)})]},`${e.machine.id}:${e.view}`))})]}),u]}),(0,U.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,U.jsx)(FP,{view:a})})]}):(0,U.jsxs)(`main`,{className:`bg-background flex min-w-0 flex-1 overflow-hidden`,children:[(0,U.jsxs)(`nav`,{className:`bg-sidebar flex w-56 flex-none flex-col border-r`,children:[e.leading&&(0,U.jsx)(`div`,{className:`flex h-(--workspace-topbar-height) flex-none items-center px-1.5`,children:e.leading}),(0,U.jsx)(`div`,{className:`flex flex-col gap-0.5 overflow-y-auto p-1.5`,children:o.map(e=>(0,U.jsxs)(`div`,{className:z(`group/row hover:bg-accent/60 relative rounded-md transition-colors has-[[data-state=open]]:bg-accent/60`,e===s&&`bg-accent`),children:[(0,U.jsxs)(`button`,{className:z(`text-muted-foreground group-hover/row:text-foreground group-has-[[data-state=open]]/row:text-foreground flex h-8 w-full items-center gap-2 rounded-md px-2 text-left text-[13px] transition-colors`,e.view!==`global`&&`pl-7`,e===s&&`text-foreground`),onClick:()=>QN(e.machine.id,e.view),children:[(0,U.jsx)(GP,{group:e}),(0,U.jsx)(`span`,{className:`truncate`,children:e.name}),(0,U.jsx)(KP,{count:e.count,alert:l(e)})]}),e.view===`global`&&e.machine.status===`online`&&(0,U.jsx)(WP,{machine:e.machine,onCreate:t=>c(e.machine.id,t)})]},`${e.machine.id}:${e.view}`))})]}),(0,U.jsx)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:(0,U.jsx)(FP,{view:a,tabSize:`lg`})})]})}function WP(e){let[t,n]=(0,H.useState)(!1),r=L(e=>e.projects).filter(t=>t.machine===e.machine.id);return(0,U.jsxs)(BP,{open:t,onOpenChange:n,openDelay:100,closeDelay:150,children:[(0,U.jsx)(VP,{asChild:!0,children:(0,U.jsx)(`button`,{className:`bg-accent text-muted-foreground hover:text-foreground absolute top-1 right-1 grid size-6 place-items-center rounded-md opacity-0 transition-opacity group-hover/row:opacity-100 focus-visible:opacity-100 data-[state=open]:opacity-100 pointer-coarse:opacity-100`,"aria-label":`New terminal on ${e.machine.name}`,onClick:()=>e.onCreate(null),children:(0,U.jsx)(V,{icon:Va,className:`size-4`})})}),r.length>0&&(0,U.jsx)(HP,{side:`right`,align:`start`,className:`max-h-80 w-auto max-w-52 min-w-32 overflow-y-auto p-1`,children:r.map(t=>(0,U.jsxs)(`button`,{className:`hover:bg-accent hover:text-accent-foreground flex min-h-7 w-full items-center gap-2 rounded-sm px-2 py-1 text-left text-sm`,onClick:()=>{n(!1),e.onCreate(t.id)},children:[(0,U.jsx)(dc,{machine:e.machine.id,projectId:t.id,className:`size-4 shrink-0`}),(0,U.jsx)(`span`,{className:`truncate`,children:t.name})]},t.id))})]})}function GP(e){return e.group.view===`global`?(0,U.jsx)(Md,{icon:e.group.machine.icon,className:`size-4 shrink-0`}):(0,U.jsx)(dc,{machine:e.group.machine.id,projectId:e.group.view,className:`size-4 shrink-0`})}function KP(e){return e.count===0?null:(0,U.jsx)(`span`,{className:z(`ml-auto grid h-4 min-w-4 shrink-0 place-items-center rounded-full px-1 text-[10px] leading-none font-medium tabular-nums`,e.alert?`bg-primary text-primary-foreground`:`text-foreground bg-[color-mix(in_srgb,var(--foreground)_22%,var(--background))]`),children:e.count})}var qP={running:`Running`,completed:`Done`,failed:`Failed`,stopped:`Stopped`};function JP(e,t){return{agents:e.flatMap(e=>e.kind===`subagent`?[{item:e,agentId:e.agentId,status:XP(e.status,e.agentId,t)}]:[]),tasks:e.flatMap(e=>e.kind===`command`&&e.background!==null?[{item:e,taskId:e.background.taskId,path:e.background.outputPath,events:e.background.events,status:XP(e.status,e.background.taskId,t)}]:[])}}function YP(e){return e.description===``?e.command:e.description}function XP(e,t,n){let r=t===null?void 0:n?.tasks[t];return r===void 0?e===`running`?t===null&&n?.running===!0?`Running`:`Stopped`:qP[e]:qP[r]}function ZP(e){return(0,U.jsx)(`span`,{className:z(e.active&&`text-shimmer`),children:e.text})}function QP(e){return(0,U.jsxs)(`span`,{className:z(`flex min-w-0 items-baseline overflow-hidden text-[13px] leading-4 tracking-[-0.04px]`,e.grouped?`gap-1.5`:`gap-2`),children:[(0,U.jsx)(`span`,{className:z(`text-foreground shrink-0`,e.grouped?`font-normal`:`font-medium`),children:(0,U.jsx)(ZP,{text:e.title,active:e.pending})}),e.subtitle!==void 0&&e.subtitle!==``&&(0,U.jsx)(`span`,{className:z(`min-w-0 truncate tabular-nums`,e.grouped?`text-muted-foreground/70`:`text-muted-foreground`),children:e.subtitle}),e.args?.map(t=>(0,U.jsx)(`span`,{className:z(`min-w-0 truncate tabular-nums`,e.grouped?`text-muted-foreground/70`:`text-muted-foreground`),children:t},t))]})}function $P(e){return(0,U.jsx)(`span`,{"aria-hidden":!0,className:z(`text-muted-foreground/70 flex size-6 shrink-0 items-center justify-center transition-opacity`,e.open?`opacity-100`:`opacity-0 group-hover/tool:opacity-100`,e.className),children:(0,U.jsx)(V,{icon:lt,strokeWidth:2.5,className:z(`size-3.5 transition-transform`,!e.open&&`-rotate-90`)})})}function eF(e){let t=e.onToggle,n=(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`span`,{className:`flex max-w-[calc(100%-24px)] min-w-0 items-center`,children:(0,U.jsx)(QP,{title:e.title,subtitle:e.subtitle,args:e.args,pending:e.pending,grouped:e.grouped})}),t!==null&&(0,U.jsx)($P,{open:e.open})]});return(0,U.jsxs)(`div`,{className:`flex w-full min-w-0 flex-col`,children:[t===null?(0,U.jsx)(`div`,{className:z(`flex w-full items-center select-none`,e.grouped?`min-h-7`:`min-h-9`),children:n}):(0,U.jsx)(`button`,{type:`button`,"aria-expanded":e.open,onClick:t,className:z(`group/tool focus-visible:ring-ring/70 flex w-full cursor-pointer items-center rounded-md text-left select-none focus-visible:ring-2 focus-visible:outline-none`,e.grouped?`h-7`:`h-9`),children:n}),e.open&&e.children!==void 0&&(0,U.jsx)(`div`,{className:z(`min-w-0 pt-1`,e.rail!==!1&&`ps-3`),children:e.children})]})}var tF=new Map([[`build`,`text-blue-400`],[`explore`,`text-yellow-400`],[`plan`,`text-pink-400`],[`review`,`text-green-400`],[`writer`,`text-purple-400`]]),nF=new Map([[`Running`,`Launched agent`],[`Done`,`Agent finished`],[`Failed`,`Agent failed`],[`Stopped`,`Agent stopped`]]),rF=new Map([[`Running`,`Started in background`],[`Done`,`Background task finished`],[`Failed`,`Background task failed`],[`Stopped`,`Background task stopped`]]),iF=[`text-sky-400`,`text-amber-400`,`text-fuchsia-400`,`text-emerald-400`,`text-violet-400`,`text-cyan-400`,`text-orange-400`,`text-teal-400`,`text-rose-400`,`text-indigo-400`,`text-lime-400`,`text-red-400`];function aF(e){let t=e.agent,n=t.toLowerCase(),r=0;for(let e of n)r=r*31+e.charCodeAt(0)>>>0;return{name:t[0].toUpperCase()+t.slice(1),description:e.description,tone:tF.get(n)??iF[r%iF.length]}}function oF(e){return(0,U.jsxs)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":!0,className:z(`size-4 shrink-0`,e.className),children:[(0,U.jsx)(`path`,{d:`M4 4.5C4 4.22386 4.22386 4 4.5 4H11.5C11.7761 4 12 4.22386 12 4.5V11.5C12 11.7761 11.7761 12 11.5 12H4.5C4.22386 12 4 11.7761 4 11.5V4.5Z`,fill:`currentColor`}),(0,U.jsx)(`path`,{d:`M14.5 1C14.7761 1 15 1.22386 15 1.5V14.5C15 14.7761 14.7761 15 14.5 15H1.5C1.22386 15 1 14.7761 1 14.5V1.5C1 1.22386 1.22386 1 1.5 1H14.5ZM2 14H14V2H2V14Z`,fill:`currentColor`})]})}function sF(e){return(0,U.jsx)(`svg`,{viewBox:`0 0 16 16`,"aria-hidden":!0,className:z(`size-4 shrink-0`,e.className),children:Array.from({length:25},(e,t)=>(0,U.jsx)(`rect`,{x:1+t%5*3,y:1+Math.floor(t/5)*3,width:2,height:2,fill:`currentColor`,className:`agent-dot`,style:{animationDelay:`${(t%5+Math.floor(t/5))*90}ms`}},t))})}function cF(e){let t=e.item;if(t.kind===`agent_message`){let n=t.target;return(0,U.jsx)(lF,{label:`Messaged agent`,detail:t.summary,pending:e.sending,onOpen:n===null?null:()=>e.onOpen(n)})}if(t.kind===`command`){let n=e.tasks.find(e=>e.item.id===t.id);if(n===void 0)throw Error(`Task ${t.id} is missing from the thread`);return(0,U.jsx)(lF,{label:rF.get(n.status)??`Background task ${n.status.toLowerCase()}`,detail:YP(n.item),pending:n.status===`Running`,onOpen:()=>e.onOpen(t.id)})}let n=e.agents.find(e=>e.item.id===t.id);if(n===void 0)throw Error(`Agent ${t.id} is missing from the thread`);return(0,U.jsx)(lF,{label:nF.get(n.status)??`Agent ${n.status.toLowerCase()}`,detail:t.description,pending:n.status===`Running`,onOpen:()=>e.onOpen(t.id)})}function lF(e){let t=(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`span`,{className:`text-muted-foreground shrink-0`,children:(0,U.jsx)(ZP,{text:e.detail===``?e.label:`${e.label}:`,active:e.pending})}),e.detail!==``&&(0,U.jsx)(`span`,{className:`text-foreground min-w-0 truncate`,children:e.detail})]});return e.onOpen===null?(0,U.jsx)(`div`,{className:`flex min-h-7 min-w-0 items-center gap-1 text-[13px] leading-4 tracking-[-0.04px] select-none`,children:t}):(0,U.jsxs)(`button`,{type:`button`,title:`Open in Tasks panel`,onClick:e.onOpen,className:`group/agent focus-visible:ring-ring/70 flex min-h-7 w-fit max-w-full cursor-pointer items-center gap-1 rounded-md text-left text-[13px] leading-4 tracking-[-0.04px] select-none focus-visible:ring-2 focus-visible:outline-none`,children:[t,(0,U.jsx)(`span`,{className:`text-muted-foreground/70 flex shrink-0 opacity-0 transition-opacity group-hover/agent:opacity-100 group-focus-visible/agent:opacity-100 pointer-coarse:opacity-100`,children:(0,U.jsx)(V,{icon:kn,className:`size-3.5`})})]})}function uF(e){let[t,n]=(0,H.useState)(!1),r=a(),i=e.plan,o=dF(i),s=i.length>900||i.split(`
|
|
28
|
+
`).length>20,c=s&&!t,l=`${i.trimEnd()}\n`;return(0,U.jsxs)(`div`,{className:`border-border/80 bg-card/70 rounded-3xl border p-4 sm:p-5`,children:[(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,U.jsx)(`span`,{className:`bg-secondary text-secondary-foreground relative inline-flex h-5.5 min-w-5.5 shrink-0 items-center justify-center gap-1 rounded-sm border border-transparent px-[calc(--spacing(1)-1px)] text-sm font-medium whitespace-nowrap sm:h-4.5 sm:min-w-4.5 sm:text-xs`,children:`Plan`}),(0,U.jsx)(`h3`,{className:`text-foreground truncate text-sm font-medium`,children:o??`Proposed plan`})]}),(0,U.jsxs)(ve,{children:[(0,U.jsx)(P,{asChild:!0,children:(0,U.jsx)(B,{"aria-label":`Plan actions`,size:`icon-xs`,variant:`outline`,children:(0,U.jsx)(V,{icon:nn,className:`size-4`})})}),(0,U.jsxs)(N,{align:`end`,children:[(0,U.jsx)(se,{onSelect:e=>{e.preventDefault(),r.copy(l)},children:r.copied?`Copied!`:`Copy to clipboard`}),(0,U.jsx)(se,{onSelect:()=>{let e=URL.createObjectURL(new Blob([l],{type:`text/markdown;charset=utf-8`})),t=document.createElement(`a`);t.href=e,t.download=`${mF(o??`plan`)}.md`,t.click(),setTimeout(()=>URL.revokeObjectURL(e),0)},children:`Download as markdown`})]})]})]}),(0,U.jsxs)(`div`,{className:`mt-4`,children:[(0,U.jsxs)(`div`,{className:z(`relative`,c&&`max-h-104 overflow-hidden`),children:[(0,U.jsx)(Rt,{text:c?pF(i):fF(i)}),c&&(0,U.jsx)(`div`,{className:`from-card/95 via-card/80 pointer-events-none absolute inset-x-0 bottom-0 h-24 bg-linear-to-t to-transparent`})]}),s&&(0,U.jsx)(`div`,{className:`mt-4 flex justify-center`,children:(0,U.jsx)(B,{size:`sm`,variant:`outline`,onClick:()=>n(!t),children:t?`Collapse plan`:`Expand plan`})})]})]})}function dF(e){let t=/^\s{0,3}#{1,6}\s+(.+)$/m.exec(e)?.[1]?.trim();return t===void 0||t===``?null:t}function fF(e){let t=e.trimEnd().split(/\r?\n/),n=/^\s{0,3}#{1,6}\s+/.test(t[0]??``)?t.slice(1):t;for(;n[0]?.trim()===``;)n.shift();if(/^\s{0,3}#{1,6}\s+(.+)$/.exec(n[0]??``)?.[1]?.trim().toLowerCase()===`summary`)for(n.shift();n[0]?.trim()===``;)n.shift();return n.join(`
|
|
29
|
+
`)}function pF(e){let t=fF(e).trimEnd().split(/\r?\n/).map(e=>e.trimEnd()),n=[],r=0,i=!1;for(let e of t){let t=e.trim()!==``;if(t&&r>=10){i=!0;break}n.push(e),t&&(r+=1)}for(;n.length>0&&n.at(-1)?.trim()===``;)n.pop();return n.length===0?dF(e)??`Plan preview unavailable.`:(i&&n.push(``,`...`),n.join(`
|
|
30
|
+
`))}function mF(e){let t=e.toLowerCase().replace(/[`'".,!?()[\]{}]+/g,``).replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``);return t===``?`plan`:t}function hF(e){let t=e.item.answers;return(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3 text-sm leading-6 select-text`,children:[e.item.questions.map(e=>(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`p`,{className:`text-foreground font-medium`,children:e.question}),(0,U.jsx)(`ul`,{className:`text-secondary-label list-disc pl-5`,children:e.options.map(e=>(0,U.jsxs)(`li`,{children:[e.label,e.description!==``&&` — ${e.description}`]},e.label))}),t?.[e.question]!==void 0&&(0,U.jsxs)(`p`,{className:`text-foreground whitespace-pre-wrap`,children:[`Answer: `,t[e.question]]})]},e.question)),e.item.status===`failed`&&(0,U.jsx)(`p`,{className:`text-muted-foreground`,children:`Skipped`})]})}function gF(e){return e.kind===`group`||e.kind===`agent`}function _F(e,t){let n=[],r=e.prompt?.id??`start`;e.prompt!==null&&n.push({kind:`user`,key:e.prompt.id,item:e.prompt,first:e.first});for(let r of e.items){let e=vF(r,t!==null),i=n.at(-1);e?.kind===`group`&&i?.kind===`group`?i.entries.push(...e.entries):e!==null&&n.push(e)}let i=n.at(-1);return t!==null&&t.partial===``&&i?.kind===`group`&&(n[n.length-1]={...i,live:!0}),t!==null&&t.partial!==``&&n.push({kind:`assistant`,key:`${r}:partial`,message:``,text:t.partial,time:null,streaming:!0,meta:!1}),t!==null&&t.partial===``&&n.push({kind:`working`,key:`${r}:working`}),t===null&&i?.kind===`assistant`&&(n[n.length-1]={...i,meta:!0}),n}function vF(e,t){switch(e.kind){case`assistant`:return{kind:`assistant`,key:e.id,message:e.message,text:e.text,time:e.time,streaming:!1,meta:!1};case`reasoning`:case`file_change`:case`web_search`:case`skill`:case`tool`:return{kind:`group`,key:`group:${e.id}`,entries:[e],live:!1};case`command`:return e.background===null?{kind:`group`,key:`group:${e.id}`,entries:[e],live:!1}:{kind:`agent`,key:e.id,item:e,live:t};case`subagent`:case`agent_message`:return{kind:`agent`,key:e.id,item:e,live:t};case`plan`:return{kind:`plan`,key:e.id,plan:e.plan};case`question`:return{kind:`question`,key:e.id,item:e};case`notice`:return{kind:`notice`,key:e.id,text:e.text};case`compaction`:return{kind:`notice`,key:e.id,text:`Conversation compacted`};case`error`:return{kind:`error`,key:e.id,text:e.text,time:e.time};case`user`:case`todo_list`:return null}}function yF(e,t,n){let r=[],i=!1;for(let t of e)t.parent===null&&(t.kind===`user`?r.push({prompt:t,first:!i,items:[]}):(t.kind!==`notice`&&t.kind!==`error`&&t.kind!==`compaction`&&(i=!0),r.length===0&&r.push({prompt:null,first:!0,items:[]}),r[r.length-1].items.push(t)));let a=r.flatMap((e,i)=>_F(e,t&&i===r.length-1?{partial:n}:null));return t&&r.length===0&&a.push({kind:`working`,key:`working`}),a}var bF={all:{label:`Restore code and chat`,description:`This will undo file changes made since this message and remove this message and everything after it from the chat.`,icon:Qa,code:!0,conversation:!0},chat:{label:`Restore chat`,description:`This will remove this message and everything after it from the chat. Files will not change.`,icon:ro,code:!1,conversation:!0},code:{label:`Restore code`,description:`This will undo file changes made since this message. The chat will not change.`,icon:Qt,code:!0,conversation:!1}};function xF(e){if(e===`claude`)return[`all`,`chat`,`code`];if(e===`opencode`)return[`all`,`chat`];if(e===`codex`)return[`chat`];throw Error(`unknown provider ${e}`)}function SF(e){let[t,n]=(0,H.useState)(!1),[r,i]=(0,H.useState)(null),[a,o]=(0,H.useState)(null),[s,c]=(0,H.useState)(!1),[l,u]=(0,H.useState)(null),d=e.target,f=d.messageId,p=L(e=>e.selection),m=L(e=>e.settings.provider),h=xF(m),g=L(e=>e.prefs.rewind),_=h.includes(g)?g:`chat`,v=p?.machine??null,y=p?.sessionId??null,b=p?.projectId??``,x=L(e=>v===null?``:k(e,v,b)?.path??``);(0,H.useEffect)(()=>{if(i(null),o(null),!t||v===null||y===null)return;let e=!0;return R(v,`sessions.rewind`,{sessionId:y,projectId:b,messageId:f,settings:I().settings,code:!0,conversation:!1,dryRun:!0}).then(t=>{e&&i(t)},t=>{e&&o(Xn(t))}),()=>{e=!1}},[t,f,v,y,b]);async function S(e){if(v===null||y===null)return;let{code:t,conversation:r}=bF[e];c(!0);try{let i=r?await Promise.all(d.images.map((e,t)=>e.data===null?R(v,`sessions.image`,{sessionId:y,itemId:d.messageId,index:t}):{mediaType:e.mediaType,data:e.data})):[],a=r&&(!d.first||m===`opencode`);(t||a)&&await R(v,`sessions.rewind`,{sessionId:y,projectId:b,messageId:d.messageId,settings:I().settings,code:t,conversation:a,dryRun:!1}),r&&d.first&&m!==`opencode`&&ce({machine:v,projectId:b,sessionId:null}),r&&Je({text:d.text,images:i}),fn({...I().prefs,rewind:e}),n(!1)}catch(e){Ze(e)}finally{c(!1)}}let C=r!==null&&a===null;return(0,U.jsxs)(U.Fragment,{children:[h.length>1&&(0,U.jsxs)(ve,{open:t,onOpenChange:e=>{s||n(e)},children:[(0,U.jsx)(Pr,{label:`Restore options`,children:(0,U.jsx)(P,{asChild:!0,children:(0,U.jsx)(B,{type:`button`,size:`icon-xs`,variant:`ghost-muted`,"aria-label":`Restore options`,disabled:e.disabled,children:(0,U.jsx)(V,{icon:nn,className:`size-3.5`})})})}),(0,U.jsxs)(N,{align:`end`,className:`w-72`,children:[(0,U.jsxs)(`div`,{className:`text-muted-foreground px-2 py-1.5 text-xs`,children:[a!==null&&`Code can't be restored: ${a}`,a===null&&r===null&&`Checking file changes…`,r!==null&&r.files.length===0&&`No file changes since this message.`,r!==null&&r.files.length>0&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{children:[`Restores `,r.files.length,` `,r.files.length===1?`file`:`files`,` (`,(0,U.jsxs)(`span`,{className:`text-diff-addition`,children:[`+`,r.insertions]}),` `,(0,U.jsxs)(`span`,{className:`text-diff-deletion`,children:[`−`,r.deletions]}),`)`]}),(0,U.jsx)(`ul`,{className:`mt-1 max-h-24 overflow-y-auto font-mono`,children:r.files.map(e=>(0,U.jsx)(`li`,{className:`truncate`,children:Af(e,x)},e))})]})]}),(0,U.jsx)(A,{}),h.map(e=>(0,U.jsxs)(se,{disabled:s||bF[e].code&&!C,onSelect:()=>u(e),children:[(0,U.jsx)(V,{icon:bF[e].icon}),bF[e].label]},e))]})]}),(0,U.jsx)(Pr,{label:bF[_].label,children:(0,U.jsx)(B,{type:`button`,size:`icon-xs`,variant:`ghost-muted`,"aria-label":bF[_].label,disabled:e.disabled||s,onClick:()=>u(_),children:(0,U.jsx)(V,{icon:bF[_].icon,className:`size-3.5`})})}),(0,U.jsx)(rn,{open:l!==null,onOpenChange:e=>{e||u(null)},children:l!==null&&(0,U.jsxs)(wt,{children:[(0,U.jsxs)(Rn,{children:[(0,U.jsxs)(ot,{children:[bF[l].label,`?`]}),(0,U.jsxs)(Qe,{children:[bF[l].description,` Do you really want to continue?`]})]}),(0,U.jsxs)(En,{children:[(0,U.jsx)(Ot,{children:`Cancel`}),(0,U.jsx)(Kt,{variant:`destructive`,onClick:()=>void S(l),children:bF[l].label})]})]})})]})}var CF=20,wF=`linear-gradient(to bottom, black calc(100% - 1.75rem), transparent)`,TF=new Map;function EF(e){let[t,n]=(0,H.useState)(!1),r=e.item,i=r.format===`text`||r.format===`command`?r.text:``,a=i.trim()!==``&&(i.length>600||i.split(`
|
|
31
|
+
`).length>8),o=a&&!t;return(0,U.jsxs)(`div`,{className:`group flex flex-col items-end gap-1`,children:[(0,U.jsxs)(`div`,{className:`bg-message text-message-foreground relative max-w-[80%] rounded-2xl px-3 py-2`,children:[r.images.length>0&&(0,U.jsx)(`div`,{className:`mb-2 grid max-w-[210px] grid-cols-2 gap-2`,children:r.images.map((e,t)=>(0,U.jsx)(`div`,{className:`border-border/80 bg-background/70 aspect-[4/3] overflow-hidden rounded-lg border`,children:(0,U.jsx)(OF,{itemId:r.id,index:t,mediaType:e.mediaType,data:e.data})},t))}),r.text!==``&&(0,U.jsxs)(`div`,{children:[(0,U.jsxs)(`div`,{className:z(`relative`,o&&`max-h-44 overflow-hidden`),style:o?{WebkitMaskImage:wF,maskImage:wF}:void 0,children:[r.format===`command`&&(0,U.jsx)(`span`,{className:`font-mono text-sm`,children:r.text}),r.format===`output`&&(0,U.jsx)(`pre`,{className:`text-muted-foreground font-mono text-xs whitespace-pre-wrap`,children:r.text}),r.format===`text`&&(0,U.jsx)(Rt,{text:r.text,className:`text-foreground`,lineBreaks:!0,rawHtml:!1})]}),a&&(0,U.jsx)(`div`,{className:`mt-1.5 flex items-center justify-end gap-2`,children:(0,U.jsx)(B,{type:`button`,size:`xs`,variant:`ghost-muted`,"aria-expanded":t,className:`-ml-1`,onClick:()=>n(!t),children:t?`Show less`:`Show full message`})})]})]}),(0,U.jsx)(`div`,{className:`flex w-full max-w-[80%] items-center justify-end pe-1 text-xs tabular-nums opacity-0 transition-opacity duration-200 group-hover:opacity-100 focus-within:opacity-100 has-aria-expanded:opacity-100 pointer-coarse:opacity-100`,children:(0,U.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[r.time!==null&&(0,U.jsx)(Pr,{label:Pe(r.time),children:(0,U.jsx)(`p`,{className:`text-muted-foreground text-xs tabular-nums`,children:h(r.time)})}),i!==``&&(0,U.jsxs)(`div`,{className:`flex items-center gap-0.5`,children:[e.rewind&&(0,U.jsx)(SF,{target:{messageId:r.id,text:i,images:r.images,first:e.first},disabled:e.running}),(0,U.jsx)(DF,{text:i})]})]})})]})}function DF(e){let t=a();return(0,U.jsx)(Pr,{label:`Copy message`,children:(0,U.jsx)(B,{type:`button`,size:`icon-xs`,variant:`ghost-muted`,"aria-label":`Copy message`,disabled:t.copied,onClick:()=>void t.copy(e.text),children:(0,U.jsx)(V,{icon:t.copied?Dt:Tn,className:z(`size-3.5`,t.copied&&`text-primary`)})})})}function OF(e){let t=L(e=>e.selection),n=t?.machine??null,r=t?.sessionId??null,[i,a]=(0,H.useState)(null);(0,H.useEffect)(()=>{if(e.data!==null||n===null||r===null)return;let t=!0,i=JSON.stringify([n,r,e.itemId,e.index]),o=TF.get(i);if(o===void 0){if(o=R(n,`sessions.image`,{sessionId:r,itemId:e.itemId,index:e.index}),TF.set(i,o),TF.size>CF){let[e]=TF.keys();TF.delete(e)}o.catch(()=>TF.delete(i))}return o.then(e=>{t&&a(e.data)}).catch(Ze),()=>{t=!1}},[e.data,e.itemId,e.index,n,r]);let o=e.data??i;return o===null?null:(0,U.jsx)(fe,{src:`data:${e.mediaType};base64,${o}`,alt:``,name:`Image`,className:`block size-full`,imageClassName:`block size-full object-cover`})}function kF(e){switch(e.kind){case`command`:return`Shell`;case`file_change`:return`Edit`;case`web_search`:return e.url===null?`Web Search`:`Webfetch`;case`skill`:return`Skill`;case`tool`:return e.name}}function AF(e){let t=e.item,n=e.live&&t.status===`running`;if(t.status===`failed`)return(0,U.jsx)(IF,{title:kF(t),subtitle:LF(t,e.cwd),error:t.output});switch(t.kind){case`command`:return(0,U.jsx)(jF,{command:t.command,output:t.output,pending:n});case`file_change`:return(0,U.jsx)(PF,{items:[t],cwd:e.cwd,live:e.live});case`web_search`:{let e=t.url;return e===null?(0,U.jsx)(MF,{query:t.query??``,links:t.results,pending:n}):(0,U.jsx)(eF,{title:`Webfetch`,subtitle:(0,U.jsx)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,className:`text-primary hover:underline hover:underline-offset-2`,children:e}),pending:n,grouped:!0,open:!1,onToggle:null})}case`skill`:return(0,U.jsxs)(`div`,{className:`flex min-h-7 items-center gap-1 text-[13px] leading-4 tracking-[-0.04px]`,children:[(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:`Loaded`}),(0,U.jsx)(`span`,{className:`text-foreground`,children:(0,U.jsx)(ZP,{text:t.skill,active:n})}),(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:`skill`})]});case`tool`:{let r=t.input;switch(wf(t.name)){case`read`:return(0,U.jsx)(eF,{title:`Read`,subtitle:zF(Tf(r)),args:RF(r,[`offset`,`limit`]),pending:n,grouped:!0,open:!1,onToggle:null});case`search`:return(0,U.jsx)(eF,{title:t.name,subtitle:LF(t,e.cwd),args:[...RF(r,[`pattern`]),...kf(r.glob)===``?[]:[`include=${kf(r.glob)}`]],pending:n,grouped:!0,open:!1,onToggle:null});case`other`:return(0,U.jsx)(eF,{title:`Called ${t.name}`,subtitle:LF(t,e.cwd),args:RF(r,Object.keys(r).filter(e=>![`description`,`query`,`url`,`path`,`pattern`].includes(e))).slice(0,3),pending:n,grouped:!0,open:!1,onToggle:null})}}}}function jF(e){let[t,n]=(0,H.useState)(!1);return(0,U.jsx)(eF,{title:`Shell`,subtitle:t?void 0:e.command,pending:e.pending,grouped:!0,open:t,onToggle:()=>n(!t),rail:!1,children:(0,U.jsxs)(`div`,{dir:`ltr`,className:`group/output border-border relative w-full overflow-hidden rounded-md border`,children:[(0,U.jsx)(`div`,{className:`absolute top-1 right-1 opacity-0 transition-opacity group-hover/output:opacity-100 focus-within:opacity-100`,children:(0,U.jsx)(DF,{text:e.command})}),(0,U.jsx)(`div`,{className:`max-h-60 [scrollbar-width:none] overflow-x-hidden overflow-y-auto`,children:(0,U.jsx)(`pre`,{className:`m-0 font-mono text-[13px] leading-5 tracking-[-0.04px] [overflow-wrap:anywhere] whitespace-pre-wrap select-text`,children:(0,U.jsxs)(`code`,{children:[(0,U.jsx)(`span`,{className:`text-foreground block p-3`,children:e.command}),e.output!==``&&(0,U.jsx)(`span`,{className:`border-border bg-muted text-muted-foreground block border-t p-3`,children:e.output})]})})})]})})}function MF(e){let[t,n]=(0,H.useState)(!1),r=e.links;return(0,U.jsx)(eF,{title:`Web Search`,subtitle:e.query,pending:e.pending,grouped:!0,open:t,onToggle:r.length===0?null:()=>n(!t),children:(0,U.jsxs)(`div`,{className:`flex flex-col gap-1 text-[13px] leading-5`,children:[r.slice(0,10).map(e=>(0,U.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:`text-primary truncate hover:underline hover:underline-offset-2`,children:e.title===``?e.url:e.title},e.url)),r.length>10&&(0,U.jsxs)(`span`,{className:`text-muted-foreground`,children:[`+`,r.length-10,` more`]})]})})}function NF(e){let[t,n]=(0,H.useState)(!1);return(0,U.jsx)(eF,{title:e.streaming?`Thinking`:`Thought`,subtitle:e.streaming?BF(e.text):void 0,pending:e.streaming,grouped:!0,open:t,onToggle:()=>n(!t),children:(0,U.jsx)(Rt,{text:e.text,className:`text-muted-foreground text-[13px]`,lineBreaks:!0})})}function PF(e){let t=new Map;for(let n of e.items){let r=Af(n.path,e.cwd);t.set(r,[...t.get(r)??[],n])}return(0,U.jsx)(`div`,{className:`border-border overflow-hidden rounded-md border`,children:[...t].map(([t,n])=>(0,U.jsx)(FF,{file:t,items:n,pending:e.live&&n.some(e=>e.status===`running`)},t))})}function FF(e){let[t,n]=(0,H.useState)(!1),r=Math.max(e.file.lastIndexOf(`/`),e.file.lastIndexOf(`\\`)),i=0,a=0;for(let t of e.items){let e=Ef(t);i+=e.added,a+=e.removed}return(0,U.jsxs)(`div`,{className:`border-border border-b last:border-b-0`,children:[(0,U.jsxs)(`button`,{type:`button`,"aria-expanded":t,onClick:()=>n(!t),className:`group/tool flex h-9 w-full cursor-pointer items-center gap-2 ps-3 pe-1 text-left text-[13px] leading-4 tracking-[-0.04px] select-none`,children:[(0,U.jsx)(wr,{path:e.file,className:`size-4 shrink-0`}),(0,U.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline`,children:[r>=0&&(0,U.jsx)(`span`,{className:`text-muted-foreground truncate`,children:e.file.slice(0,r+1)}),(0,U.jsx)(`span`,{className:`text-foreground shrink-0`,children:(0,U.jsx)(ZP,{text:e.file.slice(r+1),active:e.pending})})]}),(0,U.jsxs)(`span`,{role:`group`,"aria-label":`${i} additions, ${a} deletions`,className:`inline-flex items-center gap-1 align-middle font-mono text-xs tabular-nums`,children:[(0,U.jsxs)(`span`,{"aria-hidden":!0,className:`text-diff-addition`,children:[`+`,Nn(i)]}),(0,U.jsxs)(`span`,{"aria-hidden":!0,className:`text-diff-deletion`,children:[`-`,Nn(a)]})]}),(0,U.jsx)($P,{open:t})]}),t&&(0,U.jsx)(`div`,{className:`border-border flex flex-col gap-2 border-t p-2`,children:e.items.map(e=>(0,U.jsx)(Sf,{item:e},e.id))})]})}function IF(e){let[t,n]=(0,H.useState)(!1),r=e.error.replace(/<\/?tool_use_error>/g,``).trim(),i=r.split(`: `)[0].trim();return(0,U.jsxs)(`div`,{className:`group/error flex w-full min-w-0 flex-col`,children:[(0,U.jsxs)(`button`,{type:`button`,"aria-expanded":t,onClick:()=>n(!t),className:`flex h-6 w-full cursor-pointer items-center text-left text-[13px] leading-4 tracking-[-0.04px] select-none`,children:[(0,U.jsxs)(`span`,{className:`flex max-w-[calc(100%-20px)] min-w-0 items-center gap-1.5`,children:[(0,U.jsx)(V,{icon:Ga,className:`text-destructive size-4 shrink-0`}),(0,U.jsx)(`span`,{className:`text-foreground shrink-0 font-medium`,children:e.title}),e.subtitle!==``&&!t&&(0,U.jsx)(`span`,{className:`text-muted-foreground min-w-0 truncate`,children:e.subtitle}),!t&&(0,U.jsx)(`span`,{className:`text-destructive min-w-0 truncate`,children:i===``?`Failed`:i[0].toUpperCase()+i.slice(1)})]}),(0,U.jsx)($P,{open:!0,className:`ms-1.5 size-3.5`})]}),t&&(0,U.jsxs)(`div`,{className:`relative ps-6 pe-10 select-text`,children:[(0,U.jsx)(`div`,{className:`absolute top-0 right-0 opacity-0 transition-opacity group-hover/error:opacity-100 focus-within:opacity-100`,children:(0,U.jsx)(DF,{text:r})}),(0,U.jsx)(`p`,{className:`text-destructive text-[13px] leading-5 tracking-[-0.04px] [overflow-wrap:anywhere] whitespace-pre-wrap`,children:r})]})]})}function LF(e,t){switch(e.kind){case`command`:return e.command;case`file_change`:return e.path;case`web_search`:return e.url??e.query??``;case`skill`:return e.skill;case`tool`:{let n=e.input;if(wf(e.name)===`search`){let e=kf(n.path);return e===``||e===t?``:Af(e,t)}return[`description`,`query`,`url`,`file_path`,`path`,`pattern`].map(e=>kf(n[e])).find(e=>e!==``)??``}}}function RF(e,t){return t.flatMap(t=>{let n=e[t];return typeof n==`string`||typeof n==`number`||typeof n==`boolean`?[`${t}=${n}`]:[]})}function zF(e){return e.split(`/`).at(-1)??e}function BF(e){let t=[...e.matchAll(/^\s*(?:#{1,6}[ \t]+(.+?)|\*\*([^*\n]+)\*\*)\s*$/gm)].at(-1);return t===void 0?void 0:(t[1]??t[2]).trim()}var VF=new Intl.ListFormat(`en`,{style:`long`,type:`conjunction`});function HF(e){let t=e.entries.flatMap(e=>e.kind===`reasoning`?[]:[e]),n=e.entries.length-t.length,r=VF.format([...new Set(t.map(kF))]),i=r===``?n===1?`Thought`:`Thoughts`:r,a=t.length>0?t.length:n;return(0,U.jsxs)(`div`,{className:`flex w-full min-w-0 flex-col`,children:[(0,U.jsxs)(`button`,{type:`button`,"aria-expanded":e.open,"aria-label":`Used ${a} ${i}`,onClick:e.onToggle,className:z(`group/tool focus-visible:ring-ring/70 flex h-7 w-full cursor-pointer items-center rounded-md text-left text-xs select-none focus-visible:ring-2 focus-visible:outline-none`,e.open&&`bg-background sticky top-0 z-20 box-content pb-2`),children:[(0,U.jsxs)(`span`,{className:`flex max-w-[calc(100%-24px)] min-w-0 items-center gap-1`,children:[(0,U.jsx)(`span`,{className:`text-muted-foreground shrink-0`,children:`Used`}),(0,U.jsx)(`span`,{className:`text-muted-foreground shrink-0 tabular-nums`,children:a}),(0,U.jsx)(`span`,{className:`text-muted-foreground min-w-0 truncate`,children:i})]}),(0,U.jsx)($P,{open:e.open})]}),e.open&&(0,U.jsx)(`div`,{className:`flex flex-col gap-2`,children:WF(e.entries).map(t=>(0,U.jsx)(`div`,{className:`flex min-h-7 min-w-0 flex-col justify-center`,children:(0,U.jsx)(UF,{item:t,cwd:e.cwd,live:e.live})},t.key))})]})}function UF(e){let t=e.item;switch(t.kind){case`thinking`:return(0,U.jsx)(NF,{text:t.text,streaming:e.live&&t.last});case`tool`:return(0,U.jsx)(AF,{item:t.item,cwd:e.cwd,live:e.live});case`reads`:return(0,U.jsx)(eF,{title:`Read`,subtitle:(0,U.jsx)(`span`,{title:t.items.map(e=>Tf(e.input)).join(`
|
|
32
|
+
`),children:t.items.map((t,n)=>(0,U.jsxs)(`span`,{children:[n>0&&` `,(0,U.jsx)(ZP,{text:Tf(t.input).split(`/`).at(-1)??``,active:e.live&&t.status===`running`})]},t.id))}),pending:e.live&&t.items.some(e=>e.status===`running`),grouped:!0,open:!1,onToggle:null});case`files`:return(0,U.jsx)(PF,{items:t.items,cwd:e.cwd,live:e.live})}}function WF(e){let t=[];return e.forEach((n,r)=>{if(n.kind===`reasoning`){t.push({kind:`thinking`,key:n.id,text:n.text,last:r===e.length-1});return}let i=t.at(-1);n.status!==`failed`&&n.kind===`file_change`?i?.kind===`files`?i.items.push(n):t.push({kind:`files`,key:n.id,items:[n]}):n.status!==`failed`&&n.kind===`tool`&&wf(n.name)===`read`?i?.kind===`reads`?i.items.push(n):t.push({kind:`reads`,key:n.id,items:[n]}):t.push({kind:`tool`,key:n.id,item:n})}),t}var GF=30;function KF(e){let t=L(e=>e.selection),n=L(e=>e.loaded),r=L(e=>e.items),i=L(e=>e.earlier),a=L(e=>e.before),o=L(e=>e.partial),s=L(e=>e.requests),c=L(un),l=(0,H.useRef)(null),u=(0,H.useRef)(null),d=(0,H.useRef)(!0),f=(0,H.useRef)(null),[p,m]=(0,H.useState)(!1),[h,g]=(0,H.useState)([]),[_,v]=(0,H.useState)(null),y=L(e=>t===null?``:k(e,t.machine,t.projectId)?.path??``),b=L(ie),x=L(e=>e.sentAt);(0,H.useLayoutEffect)(()=>{let e=l.current;e!==null&&x!==0&&(d.current=!0,e.scrollTop=e.scrollHeight)},[x]),(0,H.useEffect)(()=>{let e=l.current;if(e===null||u.current===null)throw Error(`transcript is not mounted`);let t=new ResizeObserver(()=>{d.current&&(e.scrollTop=e.scrollHeight)});return t.observe(e),t.observe(u.current),()=>t.disconnect()},[]),(0,H.useLayoutEffect)(()=>{let e=l.current;e!==null&&d.current&&(e.scrollTop=e.scrollHeight)},[r,o,s,b]);let S=(0,H.useMemo)(()=>JP([...i,...r],c),[i,r,c]),C=yF(i,!1,``),w=[...C,...yF(r,b,o)],E=w.findIndex(e=>e.key===_?.key),D=Math.max(0,E===-1?w.length-GF:E-(_?.above??0));(0,H.useLayoutEffect)(()=>{let e=l.current;e!==null&&f.current!==null&&(e.scrollTop=e.scrollHeight-f.current),f.current=null},[i,D]),(0,H.useLayoutEffect)(()=>{let e=l.current;e!==null&&w.length!==0&&(E===-1?v({key:w[D].key,above:0}):O(e))});function O(e){D===0||e.scrollTop>=e.clientHeight||(f.current=e.scrollHeight-e.scrollTop,v({key:w[D].key,above:GF}))}let A=(0,H.useCallback)(e=>{g(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[]);return(0,U.jsx)(`div`,{ref:l,className:`topbar-scroll-fade relative min-h-0 flex-1 overflow-y-auto overscroll-y-contain pb-8`,onScroll:e=>{let t=e.currentTarget;d.current=t.scrollHeight-t.scrollTop-t.clientHeight<40,O(t)},children:(0,U.jsx)(`div`,{ref:u,children:(0,U.jsxs)(Fd,{width:`chat`,className:`pt-3`,children:[!n&&(0,U.jsx)(`p`,{className:`text-muted-foreground py-6 text-center text-xs`,children:`Loading…`}),a!==null&&D===0&&(0,U.jsx)(`div`,{className:`flex justify-center pb-4`,children:(0,U.jsx)(B,{type:`button`,size:`xs`,variant:`ghost-muted`,disabled:p,onClick:async()=>{let e=l.current;e!==null&&(f.current=e.scrollHeight-e.scrollTop),v({key:w[0].key,above:GF}),m(!0),await T(),m(!1)},children:p?`Loading…`:`Load earlier conversation`})}),w.slice(D).map((t,n)=>{let r=D+n,i=w[r-1],a=r<C.length;return(0,U.jsx)(`div`,{className:z(i===void 0?void 0:t.kind===`user`?`pt-6`:t.kind===`working`?void 0:gF(t)&&gF(i)?`pt-2`:gF(t)||gF(i)?`pt-3`:`pt-4`,t.kind===`assistant`&&`group/assistant`),children:(0,U.jsx)(YF,{row:t,agents:S.agents,tasks:S.tasks,running:b,compacting:c?.compacting===!0,fork:!a,expanded:h.includes(t.key),onToggle:A,onOpenTask:e.onOpenTask,rewind:!a,cwd:y})},t.key)})]})})})}var qF=(0,H.memo)(KF);function JF(e){let t=e.row;switch(t.kind){case`user`:return(0,U.jsx)(EF,{item:t.item,first:t.first,running:e.running,rewind:e.rewind});case`working`:return(0,U.jsx)(`div`,{className:`text-muted-foreground h-9 pt-3 text-[13px] leading-5 font-medium tracking-[-0.04px]`,children:(0,U.jsx)(ZP,{text:e.compacting?`Compacting conversation`:`Working`,active:!0})});case`group`:return(0,U.jsx)(HF,{entries:t.entries,cwd:e.cwd,live:t.live,open:e.expanded,onToggle:()=>e.onToggle(t.key)});case`agent`:return(0,U.jsx)(cF,{item:t.item,agents:e.agents,tasks:e.tasks,sending:t.live&&t.item.status===`running`,onOpen:e.onOpenTask});case`assistant`:return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Rt,{text:t.text===``&&!t.streaming?`(empty response)`:t.text,streaming:t.streaming}),t.meta&&(0,U.jsxs)(`div`,{className:`mt-1.5 flex items-center gap-2 text-xs tabular-nums opacity-0 transition-opacity duration-200 group-hover/assistant:opacity-100 focus-within:opacity-100 pointer-coarse:opacity-100`,children:[(0,U.jsx)(DF,{text:t.text}),e.fork&&(0,U.jsx)(XF,{uuid:t.message}),t.time!==null&&(0,U.jsx)(Pr,{label:Pe(t.time),children:(0,U.jsx)(`p`,{className:`text-muted-foreground text-xs tabular-nums`,children:h(t.time)})})]})]});case`error`:return(0,U.jsxs)(`div`,{className:`text-destructive flex gap-1.5 text-[13px] leading-5 tracking-[-0.04px]`,children:[(0,U.jsx)(V,{icon:Ga,className:`mt-0.5 size-4 shrink-0`}),(0,U.jsx)(`p`,{className:`min-w-0 [overflow-wrap:anywhere] whitespace-pre-wrap select-text`,children:t.text})]});case`notice`:return(0,U.jsxs)(`div`,{className:`text-muted-foreground mx-auto flex w-full max-w-(--chat-content-max-width) items-center gap-3 py-1 text-xs`,children:[(0,U.jsx)(`span`,{className:`bg-border/70 h-px flex-1`}),(0,U.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[t.text===`Conversation compacted`&&(0,U.jsx)(V,{icon:Go,className:`size-3`}),t.text]}),(0,U.jsx)(`span`,{className:`bg-border/70 h-px flex-1`})]});case`plan`:return(0,U.jsx)(`div`,{className:`min-w-0`,children:(0,U.jsx)(uF,{plan:t.plan})});case`question`:return(0,U.jsx)(hF,{item:t.item})}}var YF=(0,H.memo)(JF,(e,t)=>t.row.kind===`agent`?on(e,t):on(Xi(e,[`agents`,`tasks`]),Xi(t,[`agents`,`tasks`])));function XF(e){let[t,n]=(0,H.useState)(!1);return(0,U.jsx)(Pr,{label:`Fork from this response`,children:(0,U.jsx)(B,{type:`button`,size:`icon-xs`,variant:`ghost-muted`,disabled:t,"aria-label":`Fork from this response`,onClick:()=>{n(!0),Ft(e.uuid).finally(()=>n(!1))},children:(0,U.jsx)(V,{icon:Oo,className:z(`size-3.5`,t&&`animate-pulse`)})})})}var ZF=bn(`event`,[pn({offsite:Zt(`browser`),event:Zt(`location`),url:Nt(),proxied:Nt(),back:yt(),forward:yt()}),pn({offsite:Zt(`browser`),event:Zt(`navigate`)})]);function QF(e){let t=ke({from:`__root__`,select:e=>e.browse??null}),[n,r]=(0,H.useState)(null),[i,a]=(0,H.useState)(0),[o,s]=(0,H.useState)(0),[c,l]=(0,H.useState)(!1),[u,d]=(0,H.useState)(null),f=(0,H.useRef)(null),p=(0,H.useRef)(null),m=L(t=>He(t,e.machine).status===`online`);(0,H.useEffect)(()=>{if(t===null||!m)return;if(p.current===t){p.current=null;return}let n=!0;return $F(e.machine,t).then(e=>{n&&(r({target:t,src:e,href:e,error:null}),s(e=>e+1),d(null),l(!0))},e=>{n&&(r({target:t,src:null,href:null,error:Xn(e)}),d(null),l(!1))}),()=>{n=!1}},[e.machine,t,i,m]),(0,H.useEffect)(()=>{function e(e){if(e.source===null||e.source!==f.current?.contentWindow)return;let i=ZF.safeParse(e.data);if(!i.success)return;if(i.data.event===`navigate`){d(null),l(!0);return}if(d({back:i.data.back,forward:i.data.forward,proxied:i.data.proxied}),t===null||n===null)throw Error(`a page reported its location outside the browser`);let a=i.data.url;a!==t&&(p.current=a,r({...n,target:a,href:i.data.proxied}),qe({browse:a}))}return window.addEventListener(`message`,e),()=>window.removeEventListener(`message`,e)},[t,n]);let h=t===null?null:n?.src??null,g=n?.target===t?n.href:null,_=n?.target===t?n.error:null,v=t!==null&&m&&(n?.target!==t||c);function y(e){if(u===null)throw Error(`no page is open to send a browser command to`);f.current?.contentWindow?.postMessage({offsite:`browser`,command:e},new URL(u.proxied).origin)}return(0,U.jsxs)(`div`,{className:`bg-background flex h-full min-h-0 min-w-0 flex-col`,children:[(0,U.jsxs)(`div`,{className:`border-border/60 bg-background flex h-(--workspace-topbar-height) shrink-0 items-center gap-2 border-b pr-3 pl-3`,children:[(0,U.jsx)(B,{size:`icon-sm`,variant:`ghost`,title:`Close`,"aria-label":`Close`,onClick:e.onClose,children:(0,U.jsx)(V,{icon:mr,className:`size-3.5`})}),(0,U.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(0,U.jsx)(B,{size:`icon-sm`,variant:`ghost`,title:`Back`,"aria-label":`Back`,disabled:u?.back!==!0,onClick:()=>y(`back`),children:(0,U.jsx)(V,{icon:Za,className:`size-3.5`})}),(0,U.jsx)(B,{size:`icon-sm`,variant:`ghost`,title:`Forward`,"aria-label":`Forward`,disabled:u?.forward!==!0,onClick:()=>y(`forward`),children:(0,U.jsx)(V,{icon:kn,className:`size-3.5`})}),(0,U.jsx)(B,{size:`icon-sm`,variant:`ghost`,title:`Reload`,"aria-label":`Reload`,onClick:()=>{u===null?a(i+1):y(`reload`)},children:(0,U.jsx)(V,{icon:Pt,className:z(`size-3.5`,v&&`animate-spin`)})})]}),(0,U.jsx)(`form`,{className:`min-w-0 flex-1`,onSubmit:e=>{e.preventDefault();let t=new FormData(e.currentTarget).get(`address`);if(typeof t!=`string`)throw Error(`the address field is missing`);let n=t.trim();n!==``&&ln(eI(n))},children:(0,U.jsx)(up,{name:`address`,className:`h-7 font-mono text-xs`,placeholder:`URL or file path`,"aria-label":`URL or file path`,defaultValue:t??``})},t),g!==null&&(0,U.jsx)(B,{size:`icon-sm`,variant:`ghost`,asChild:!0,children:(0,U.jsx)(`a`,{href:g,target:`_blank`,rel:`noopener noreferrer`,title:`Open in a new tab`,"aria-label":`Open in a new tab`,children:(0,U.jsx)(V,{icon:G,className:`size-3.5`})})})]}),_!==null&&(0,U.jsx)(`p`,{className:`text-muted-foreground p-4 text-center text-xs`,children:_}),t===null&&(0,U.jsx)(`p`,{className:`text-muted-foreground p-4 text-center text-xs`,children:`Type a URL or a file path above. URLs load from this machine.`}),h!==null&&(0,U.jsx)(`iframe`,{ref:f,src:h,title:t??``,className:`min-h-0 w-full flex-1 bg-white`,onLoad:()=>l(!1)},o)]})}async function $F(e,t){if(/^https?:\/\//i.test(t)){let n=new URL(t),r=new URL(On(e));return r.port=String(await R(e,`browser.proxy`,{origin:n.origin})),`${r.origin}${n.pathname}${n.search}${n.hash}`}let n=await R(e,`files.browse`,void 0);return`${On(e)}/api/browse/${n}${tI(t)}`}function eI(e){return/^(https?:\/\/|file:)/i.test(e)||/^[/.]/.test(e)||/^[a-z]:[\\/]/i.test(e)?e:/^(localhost|\d+(\.\d+){3}|[\w.-]+:\d+)([:/?#]\S*)?$/i.test(e)?`http://${e}`:/^[\w-]+(\.[\w-]+)+([/?#]\S*)?$/.test(e)?`https://${e}`:`https://www.google.com/search?q=${encodeURIComponent(e)}`}function tI(e){let t=e.replaceAll(`\\`,`/`).split(`/`).map(encodeURIComponent).join(`/`);return t.startsWith(`/`)?t:`/${t}`}var nI=new Set,rI=null;function iI(e){nI.add(e),rI??=requestAnimationFrame(oI)}function aI(e){nI.delete(e)&&nI.size===0&&rI!=null&&(cancelAnimationFrame(rI),rI=null)}function oI(e){let t=new Set(nI);nI.clear();for(let n of t)try{n(e)}catch(e){console.error(e)}rI=nI.size>0?requestAnimationFrame(oI):null}function sI(e,t,n){if(e===t||e==null||t==null)return e===t;let r=new Set(n),i=Object.keys(e),a=new Set(Object.keys(t));for(let n of i)if(a.delete(n),!r.has(n)&&(!(n in t)||e[n]!==t[n]))return!1;for(let e of Array.from(a))if(!r.has(e))return!1;return!0}function cI(e,t){return e==null||t==null||typeof e==`string`||typeof t==`string`?e===t:e.dark===t.dark&&e.light===t.light}function lI(e,t){let n=e?.theme??ti,r=t?.theme??ti,i=uI(e),a=uI(t);return cI(n,r)&&sI(e,t,[`theme`,`parseDiffOptions`])&&sI(i,a)}function uI(e){if(e!=null&&`parseDiffOptions`in e)return e.parseDiffOptions}function dI(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function fI(){return ci({tagName:`button`,properties:{"data-utility-button":``,type:`button`},children:[li({name:`diffs-icon-plus`,properties:{"data-icon":``}})]})}function pI(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}function mI(e){for(let t of e)if(t instanceof HTMLElement&&(t.hasAttribute(`data-utility-button`)||t.hasAttribute(`data-gutter-utility-slot`)||t.getAttribute(`slot`)===`gutter-utility-slot`||t.getAttribute(`name`)===`gutter-utility-slot`))return!0;return!1}var hI=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;selectedRangeHighlightSide;selectedRangeLineNumberOnly=!1;editorActiveLine=null;editorActiveLineSide;editorLineNumberOnly=!1;proposedSelectedRange;renderedSelectedLinesState;renderedEditorActiveLineState;selectionAnchor;pointerSession={mode:`idle`};constructor(e,t){this.mode=e,this.options=t}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener(`click`,this.handlePointerClick),this.pre?.removeEventListener(`pointerdown`,this.handlePointerDown),this.pre?.removeEventListener(`pointermove`,this.handlePointerMove),this.pre?.removeEventListener(`pointerleave`,this.handlePointerLeave),this.pre?.removeAttribute(`data-interactive-lines`),this.pre?.removeAttribute(`data-interactive-line-numbers`),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),aI(this.renderSelection),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1,this.setSelectionDirty()}setup(e){this.setSelectionDirty();let{usesCustomGutterUtility:t=!1,enableGutterUtility:n=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),n?this.ensureGutterUtilityNode(t):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode===`gutterSelecting`&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectedLinesState=void 0,this.renderedEditorActiveLineState=void 0}isSelectionDirty(){return this.renderedSelectedLinesState===void 0||this.renderedEditorActiveLineState===void 0}setSelection(e,t){let n=!(e===this.selectedRange||dI(e??void 0,this.selectedRange??void 0)),r=t?.lineNumberOnly??!1,i=t?.activeLineSide!==this.selectedRangeHighlightSide||r!==this.selectedRangeLineNumberOnly;(this.isSelectionDirty()||n||i)&&(this.proposedSelectedRange=void 0,this.selectedRange=e,this.selectedRangeHighlightSide=t?.activeLineSide,this.selectedRangeLineNumberOnly=r,this.renderSelection(),this.placeUtility(),n&&t?.notify!==!1&&this.notifySelectionCommitted(e))}setEditorActiveLine(e,{lineNumberOnly:t=!1,side:n}={}){let r=e!==this.editorActiveLine,i=n!==this.editorActiveLineSide||t!==this.editorLineNumberOnly;(this.isSelectionDirty()||r||i)&&(this.editorActiveLine=e,this.editorActiveLineSide=n,this.editorLineNumberOnly=t,this.renderSelection())}getSelection(){return this.selectedRange}getHoveredLine=()=>{let e=this.gutterUtilityLine??this.hoveredLine;if(e!=null){if(this.mode===`diff`&&e.type===`diff-line`)return{lineNumber:e.lineNumber,side:e.annotationSide};if(this.mode===`file`&&e.type===`line`)return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{let{onHunkExpand:t,onLineClick:n,onLineNumberClick:r,onTokenClick:i,onMergeConflictActionClick:a}=this.options;t==null&&n==null&&r==null&&a==null&&i==null||this.options.onGutterUtilityClick!=null&&mI(e.composedPath())||(FI(this.options.__debugPointerEvents,`click`,`FileDiff.DEBUG.handlePointerClick:`,e),this.handlePointerEvent({eventType:`click`,event:e}))};handlePointerMove=e=>{if(e.pointerType!==`mouse`)return;let{lineHoverHighlight:t=`disabled`,onLineEnter:n,onLineLeave:r,onTokenEnter:i,onTokenLeave:a,enableGutterUtility:o=!1}=this.options;(t!==`disabled`||o||n!=null||r!=null||i!=null||a!=null)&&(FI(this.options.__debugPointerEvents,`move`,`FileDiff.DEBUG.handlePointerMove:`,e),this.handlePointerEvent({eventType:`move`,event:e}))};handlePointerLeave=e=>{let{__debugPointerEvents:t}=this.options;FI(t,`move`,`FileDiff.DEBUG.handlePointerLeave: no event`),this.hoveredLine==null&&this.hoveredToken==null?FI(t,`move`,`FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token`):(this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility())};handlePointerEvent({eventType:e,event:t}){let{__debugPointerEvents:n}=this.options,r=t.composedPath();FI(n,e,`FileDiff.DEBUG.handlePointerEvent:`,{eventType:e,composedPath:r});let i=this.resolvePointerTarget(r);FI(n,e,`FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:`,i);let{onLineClick:a,onLineNumberClick:o,onLineEnter:s,onLineLeave:c,onTokenClick:l,onTokenEnter:u,onTokenLeave:d,onHunkExpand:f,onMergeConflictActionClick:p}=this.options;switch(e){case`move`:{let e=bI(i)&&this.hoveredLine?.lineElement===i.lineElement;yI(i)&&this.hoveredToken?.tokenElement===i.tokenElement||(this.hoveredToken!=null&&(d?.(this.hoveredToken,t),this.clearHoveredToken()),yI(i)&&(this.setHoveredToken(this.toTokenEventBaseProps(i)),u?.(this.hoveredToken,t))),e||(this.hoveredLine!=null&&(c?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),bI(i)?(this.setHoveredLine(this.toEventBaseProps(i)),this.placeUtility(),s?.({...this.hoveredLine,event:t})):this.placeUtility());break}case`click`:{if(i==null)break;if(SI(i)&&p!=null){p(i);break}if(xI(i)&&f!=null){f(i.hunkIndex,i.all||t.shiftKey?`both`:i.direction,i.all||t.shiftKey?1/0:void 0);break}if(!bI(i))break;yI(i)&&l!=null&&l(this.toTokenEventBaseProps(i),t);let e=this.toEventBaseProps(i);o!=null&&i.numberColumn?o({...e,event:t}):a?.({...e,event:t});break}}}syncPointerListeners(e){let{__debugPointerEvents:t,lineHoverHighlight:n=`disabled`,onLineClick:r,onLineNumberClick:i,onLineEnter:a,onLineLeave:o,onTokenClick:s,onTokenEnter:c,onTokenLeave:l,onHunkExpand:u,onMergeConflictActionClick:d,enableGutterUtility:f=!1,enableLineSelection:p=!1,onGutterUtilityClick:m}=this.options,h=m!=null,g=n!==`disabled`||r!=null||i!=null||a!=null||o!=null||s!=null||c!=null||l!=null||u!=null||d!=null||f||p||h;g&&!this.hasPointerListeners?(e.addEventListener(`click`,this.handlePointerClick),e.addEventListener(`pointerdown`,this.handlePointerDown),e.addEventListener(`pointermove`,this.handlePointerMove),e.addEventListener(`pointerleave`,this.handlePointerLeave),this.hasPointerListeners=!0,FI(t,`click`,`FileDiff.DEBUG.attachEventListeners: Attaching click events for:`,(()=>{let e=[];return(t===`both`||t===`click`)&&(r!=null&&e.push(`onLineClick`),i!=null&&e.push(`onLineNumberClick`),u!=null&&e.push(`expandable hunk separators`),d!=null&&e.push(`merge conflict actions`)),e})()),FI(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer move event`),FI(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event`)):!g&&this.hasPointerListeners&&(e.removeEventListener(`click`,this.handlePointerClick),e.removeEventListener(`pointerdown`,this.handlePointerDown),e.removeEventListener(`pointermove`,this.handlePointerMove),e.removeEventListener(`pointerleave`,this.handlePointerLeave),this.hasPointerListeners=!1);let _=this.pointerSession.mode===`selecting`||this.pointerSession.mode===`pendingSingleLineUnselect`,v=this.pointerSession.mode===`gutterSelecting`;(!p&&_||!h&&v)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;let{onLineClick:e,onLineNumberClick:t,enableLineSelection:n=!1}=this.options,r=e!=null,i=t!=null||n;r&&!this.interactiveLinesAttr?(this.pre.setAttribute(`data-interactive-lines`,``),this.interactiveLinesAttr=!0):!r&&this.interactiveLinesAttr&&(this.pre.removeAttribute(`data-interactive-lines`),this.interactiveLinesAttr=!1),i&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute(`data-interactive-line-numbers`,``),this.interactiveLineNumbersAttr=!0):!i&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute(`data-interactive-line-numbers`),this.interactiveLineNumbersAttr=!1)}handlePointerDown=e=>{if(e.pointerType===`mouse`&&e.button!==0||this.pre==null||this.pointerSession.mode!==`idle`)return;let t=e.composedPath();mI(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!==`mouse`&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){let{enableLineSelection:t=!1}=this.options;if(!t)return;let n=this.resolveSelectionInfo(e,{source:`event-path`,requireNumberColumn:!0});if(n==null)return;let{pre:r}=this;if(r==null)return;let{lineNumber:i,eventSide:a,lineIndex:o}=n;if(e.shiftKey&&this.selectedRange!=null){let t=this.getIndexesFromSelection(this.selectedRange,r.getAttribute(`data-diff-type`)===`split`);if(t==null)return;let n=t.start<=t.end?o>=t.start:o<=t.end;this.selectionAnchor={lineNumber:n?this.selectedRange.start:this.selectedRange.end,side:n?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(i,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners()}else if(this.selectedRange?.start===i&&this.selectedRange?.end===i){let t={lineNumber:i,side:a};this.selectionAnchor=t,this.pointerSession={mode:`pendingSingleLineUnselect`,pointerId:e.pointerId,anchor:t,pending:t},this.attachDocumentPointerListeners()}else this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:i,side:a},this.updateSelection(i,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){let{onGutterUtilityClick:t}=this.options;if(t==null)return;let n=this.currentSelectionEnds(),r=n?.bottom??this.resolveSelectionPoint(e,{source:`event-path`,excludeUtility:!1}),i=n?.top??r;r!=null&&i!=null&&(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:`gutterSelecting`,pointerId:e.pointerId,anchor:i,current:r},this.selectionAnchor={lineNumber:i.lineNumber,side:i.side},this.updateSelection(r.lineNumber,r.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionPoint(e,{source:`coordinates-first`});if(t==null)return;this.pointerSession.current=t,this.updateSelection(t.lineNumber,t.side);return}case`selecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionInfo(e,{source:`coordinates-first`,requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;this.updateSelection(t.lineNumber,t.eventSide);return}case`pendingSingleLineUnselect`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionInfo(e,{source:`coordinates-first`,requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;let n={lineNumber:t.lineNumber,side:t.eventSide};if(pI(this.pointerSession.pending,n))return;this.updateSelection(t.lineNumber,t.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:`selecting`,pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{let{onGutterUtilityClick:t}=this.options;switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{let{pointerSession:n}=this;if(e.pointerId!==n.pointerId)return;e.preventDefault();let r=this.resolveSelectionPoint(e,{source:`coordinates-first`});r!=null&&(n.current=r,this.updateSelection(r.lineNumber,r.side));let i=this.buildSelectedLineRange(n.anchor,n.current);t?.({...i}),this.selectionAnchor=void 0,this.notifySelectionEnd(i),this.notifySelectionCommitted(i),this.clearProposedSelection(),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case`pendingSingleLineUnselect`:if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(this.getCurrentSelectionRange()),this.clearProposedSelection();return;case`selecting`:if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(this.getCurrentSelectionRange()),this.clearProposedSelection()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:case`selecting`:case`pendingSingleLineUnselect`:if(`pointerId`in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute(`data-hovered`),this.hoveredLine.numberElement.removeAttribute(`data-hovered`),this.hoveredLine=void 0)}setHoveredLine(e){let{lineHoverHighlight:t=`disabled`}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,t!==`disabled`&&((t===`both`||t===`line`)&&this.hoveredLine.lineElement.setAttribute(`data-hovered`,``),(t===`both`||t===`number`)&&this.hoveredLine.numberElement.setAttribute(`data-hovered`,``))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer??(this.gutterUtilityContainer=document.createElement(`div`),this.gutterUtilityContainer.setAttribute(`data-gutter-utility-slot`,``)),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot??(this.gutterUtilitySlot=document.createElement(`slot`),this.gutterUtilitySlot.name=`gutter-utility-slot`),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){let e=document.createElement(`div`);e.innerHTML=gi(fI());let t=e.firstElementChild;if(!(t instanceof HTMLButtonElement))throw Error(`InteractionManager.ensureGutterUtilityNode: Node element should be a button`);t.remove(),this.gutterUtilityButton=t}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;let t=this.resolvePointerTarget(e);vI(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}placeUtility(){this.placeUtilityFromSelection()||(this.hoveredLine==null?this.hideUtility():this.showUtilityOnLine(this.hoveredLine))}placeUtilityFromSelection(){let e=this.currentSelectionEnds();if(e==null)return!1;let t=this.targetForSelectionPoint(e.bottom);return t==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(t)),!0}showUtilityOnLine(e){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){let e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){let t={lineNumber:e.start,side:e.side},n={lineNumber:e.end,side:e.endSide??e.side},r=this.selectionPointRowIndex(t),i=this.selectionPointRowIndex(n);if(r!=null&&i!=null)return r>i?{top:n,bottom:t}:{top:t,bottom:n}}selectionPointRowIndex(e){let t=this.getLineIndex(e.lineNumber,e.side);if(t!=null)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(this.pre==null)return;let t=this.getLineIndex(e.lineNumber,e.side);if(t==null)return;let n=this.mode===`diff`?`${t[0]},${t[1]}`:`${t[0]}`,r=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${n}"]`);for(let t of r){if(!(t instanceof HTMLElement))continue;let n=this.resolvePointerTarget(TI(t));if(vI(n)&&(this.mode!==`diff`||e.side==null||n.side===e.side))return n}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||=(document.addEventListener(`pointermove`,this.handleDocumentPointerMove),document.addEventListener(`pointerup`,this.handleDocumentPointerUp),document.addEventListener(`pointercancel`,this.handleDocumentPointerCancel),!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&=(document.removeEventListener(`pointermove`,this.handleDocumentPointerMove),document.removeEventListener(`pointerup`,this.handleDocumentPointerUp),document.removeEventListener(`pointercancel`,this.handleDocumentPointerCancel),!1)}clearPointerSession(){this.pointerSession={mode:`idle`}}clearPendingSingleLineState(){this.pointerSession.mode===`pendingSingleLineUnselect`&&(this.pointerSession={mode:`idle`})}selectionInfoFromPath(e,t){let n=this.resolvePointerTarget(e);if(vI(n)&&(!t||n.numberColumn)&&n.splitLineIndex!=null)return{lineIndex:n.splitLineIndex,lineNumber:n.lineNumber,eventSide:this.mode===`diff`?n.side:void 0}}resolveSelectionInfo(e,t){let n=this.resolveSelectionPath(e,t);return n==null?void 0:this.selectionInfoFromPath(n,t.requireNumberColumn)}selectionPointFromPath(e){let t=this.resolvePointerTarget(e);if(vI(t))return{lineNumber:t.lineNumber,side:this.mode===`diff`?t.side:void 0}}resolveSelectionPoint(e,t){let n=this.resolveSelectionPath(e,t);return n==null?void 0:this.selectionPointFromPath(n)}resolveSelectionPath(e,t){let n=t.excludeUtility!==!1;switch(t.source){case`event-path`:return this.pathFromEventPath(e.composedPath(),n);case`coordinates-first`:{let t=this.pathFromCoordinates(e,n);return t===void 0?this.pathFromEventPath(e.composedPath(),n):t??void 0}}}pathFromCoordinates(e,t){let n=this.hitTest(e);if(n!==void 0)return n===null?null:this.pathFromElement(n,t)??null}pathFromEventPath(e,t){if(!(t&&mI(e))){for(let n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){let n=TI(e);if(t&&mI(n))return;let r=EI(e);return r==null?this.pathFromAnnotationSlot(e):TI(r)}pathFromAnnotationSlot(e){let t=DI(e)?.previousElementSibling;if(t instanceof HTMLElement&&(t.hasAttribute(`data-line`)||t.hasAttribute(`data-column-number`)))return TI(t);let n=kI(OI(e));if(n==null)return;let r=this.targetForSelectionPoint(n);return r==null?void 0:TI(r.lineElement)}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;let t=this.pre?.getRootNode(),n=AI(t)?t:AI(document)?document:void 0;if(n!=null)return n.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){let{getLineIndex:n}=this.options;return n==null?[e-1,e-1]:n(e,t)}getCurrentSelectionRange(){return this.proposedSelectedRange===void 0?this.selectedRange:this.proposedSelectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,n=!0){let r=this.getCurrentSelectionRange(),i;if(e==null)i=null;else{let n=this.selectionAnchor?.side??t,r=this.selectionAnchor?.lineNumber??e;i=this.buildSelectionRange(r,e,n,t)}dI(r??void 0,i??void 0)||(this.selectedRangeHighlightSide=void 0,this.selectedRangeLineNumberOnly=!1,this.options.controlledSelection===!0?this.proposedSelectedRange=i:(this.selectedRange=i,iI(this.renderSelection)),this.placeUtility(),n&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,t){if(this.pre==null)return;let n=this.getLineIndex(e.start,e.side),r=this.getLineIndex(e.end,e.endSide??e.side);return n!=null&&r!=null?{start:t?n[1]:n[0],end:t?r[1]:r[0]}:void 0}getSelectionRenderState(){return{selectedLines:{range:this.selectedRange,highlightSide:this.selectedRangeHighlightSide,lineNumberOnly:this.selectedRangeLineNumberOnly},editorActiveLine:{range:this.editorActiveLine==null?null:{start:this.editorActiveLine,end:this.editorActiveLine,side:this.editorActiveLineSide},highlightSide:this.editorActiveLineSide,lineNumberOnly:this.editorLineNumberOnly}}}resolveLineRenderRange(e,t,n){if(e.range==null)return;let r=this.getIndexesFromSelection(e.range,t);if(r==null)throw console.error({rowRange:r,range:e.range}),Error(`InteractionManager.renderSelection: No valid ${n} rowRange`);return r}getLineRenderColumns(e,t,n,r){if(this.pre==null||t==null&&r==null)return[];let{children:i}=this.pre;if(i.length>2)throw console.error(i),Error(`InteractionManager.renderSelection: Somehow there are more than 2 code elements...`);let a=[];for(let o of i){let i=o.hasAttribute(`data-deletions`)?`deletions`:o.hasAttribute(`data-additions`)?`additions`:void 0,s=e!=null&&t!=null&&(e.highlightSide==null||i==null||e.highlightSide===i),c=n!=null&&r!=null&&(n.highlightSide==null||i==null||n.highlightSide===i);if(!s&&!c)continue;let[l,u]=o.children;if(!(l instanceof HTMLElement)||!(u instanceof HTMLElement))throw Error(`InteractionManager.renderSelection: missing gutter or content element`);if(u.children.length!==l.children.length)throw Error(`InteractionManager.renderSelection: gutter and content children dont match, something is wrong`);a.push({content:u,gutter:l,renderEditorActiveLine:c,renderSelectedLines:s})}return a}renderSelection=()=>{aI(this.renderSelection);let e=this.getSelectionRenderState();if(this.pre==null)return;let{editorActiveLine:t,selectedLines:n}=e,r=!MI(this.renderedSelectedLinesState,n),i=!MI(this.renderedEditorActiveLineState,t);if(!r&&!i)return;r&&(this.renderedSelectedLinesState=void 0),i&&(this.renderedEditorActiveLineState=void 0);let a=this.pre.getAttribute(`data-diff-type`)===`split`,o=r?this.resolveLineRenderRange(n,a,`selected-lines`):void 0,s=i?this.resolveLineRenderRange(t,a,`editor-active-line`):void 0,c=this.getLineRenderColumns(r?n:void 0,o,i?t:void 0,s),l=n.range==null||c.some(e=>e.renderSelectedLines),u=t.range==null||c.some(e=>e.renderEditorActiveLine);if(r)for(let e of this.pre.querySelectorAll(`[data-selected-line]`))e.removeAttribute(`data-selected-line`);if(i)for(let e of this.pre.querySelectorAll(`[data-editor-active-line]`))e.removeAttribute(`data-editor-active-line`);let d=o==null?void 0:Math.min(o.start,o.end),f=o==null?void 0:Math.max(o.start,o.end),p=d===f,m=s?.start;for(let e of c){let{content:r,gutter:i,renderEditorActiveLine:o,renderSelectedLines:s}=e,c=Math.max(s?f??-1/0:-1/0,o?m??-1/0:-1/0),l=r.children.length;for(let e=0;e<l;e++){let l=r.children[e],u=i.children[e];if(!(l instanceof HTMLElement)||!(u instanceof HTMLElement))continue;let h=this.parseLineIndex(l,a);if((h??0)>c)break;if(h!=null){if(s&&d!=null&&f!=null&&h>=d&&h<=f){let e=p?`single`:h===d?`first`:h===f?`last`:``;u.setAttribute(`data-selected-line`,e),n.lineNumberOnly||(l.setAttribute(`data-selected-line`,e),u.nextSibling instanceof HTMLElement&&l.nextSibling instanceof HTMLElement&&(l.nextSibling.hasAttribute(`data-line-annotation`)||l.nextSibling.hasAttribute(`data-merge-conflict-actions`))&&(p?(e=`last`,l.setAttribute(`data-selected-line`,`first`)):h===d?e=``:h===f&&l.setAttribute(`data-selected-line`,``),l.nextSibling.setAttribute(`data-selected-line`,e),u.nextSibling.setAttribute(`data-selected-line`,e)))}o&&h===m&&(u.setAttribute(`data-editor-active-line`,``),t.lineNumberOnly||l.setAttribute(`data-editor-active-line`,``))}}}r&&l&&(this.renderedSelectedLinesState=n),i&&u&&(this.renderedEditorActiveLineState=t)};notifySelectionCommitted(e){this.options.onLineSelected?.(e)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.getCurrentSelectionRange()??null)}notifySelectionStart(e){this.options.onLineSelectionStart?.(e)}notifySelectionEnd(e){this.options.onLineSelectionEnd?.(e)}toEventBaseProps(e){return this.mode===`file`?{type:`line`,lineElement:e.lineElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn,numberElement:e.numberElement}:{type:`diff-line`,annotationSide:e.side,lineType:e.lineType,lineElement:e.lineElement,numberElement:e.numberElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn}}toTokenEventBaseProps({lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}){return this.mode===`file`?{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,tokenElement:i,tokenText:a}:{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}}buildSelectedLineRange(e,t){return this.buildSelectionRange(e.lineNumber,t.lineNumber,e.side,t.side)}buildSelectionRange(e,t,n,r){return{start:e,end:t,...n==null?{}:{side:n},...n!==r&&r!=null?{endSide:r}:{}}}resolvePointerTarget(e){let t=!1,n,r,i,a,o,s,c,l,u,d;for(let f of e){if(!(f instanceof HTMLElement))continue;if(d==null&&f.hasAttribute(`data-merge-conflict-action`)){let e=f.getAttribute(`data-merge-conflict-action`)??void 0,t=f.getAttribute(`data-merge-conflict-conflict-index`)??void 0,n=t==null?NaN:Number.parseInt(t,10);CI(e)&&Number.isFinite(n)&&(d={kind:`merge-conflict-action`,resolution:e,conflictIndex:n})}if(s==null&&f.hasAttribute(`data-char`)){s=f;let e=f.getAttribute(`data-char`);if(e!=null){let t=Number.parseInt(e,10);if(!Number.isNaN(t)){let e=f.textContent??``,n=t+e.length;(e.trim()!==``||this.options.enableTokenInteractionsOnWhitespace===!0)&&(c={tokenElement:s,lineCharStart:t,lineCharEnd:n,tokenText:e});continue}}}let e=o==null?f.getAttribute(`data-column-number`)??void 0:void 0;if(e!=null){o=f,u=Number.parseInt(e,10),t=!0,n=PI(f),a=f.getAttribute(`data-line-index`)??void 0;continue}let p=i==null?f.getAttribute(`data-line`)??void 0:void 0;if(p!=null){i=f,u=Number.parseInt(p,10),n=PI(f),a=f.getAttribute(`data-line-index`)??void 0;continue}if(l==null&&(f.hasAttribute(`data-expand-button`)||f.hasAttribute(`data-unmodified-lines`))){l={hunkIndex:void 0,direction:f.hasAttribute(`data-expand-up`)?`up`:f.hasAttribute(`data-expand-down`)?`down`:`both`,all:f.hasAttribute(`data-expand-all-button`)};continue}let m=l==null?void 0:f.getAttribute(`data-expand-index`)??void 0;if(l!=null&&m!=null){let e=Number.parseInt(m,10);Number.isNaN(e)||(l.hunkIndex=e)}else if(r==null&&f.hasAttribute(`data-code`)){r=f;break}}if(d!=null)return d;if(l?.hunkIndex!=null)return{type:`line-info`,hunkIndex:l.hunkIndex,direction:l.direction,all:l.all};if(i??=a==null?void 0:wI(r,`[data-line][data-line-index="${a}"]`),o??=a==null?void 0:wI(r,`[data-column-number][data-line-index="${a}"]`),r==null||i==null||o==null||n==null||u==null||Number.isNaN(u))return;let f=this.parseLineIndex(i,this.isSplitDiff());return c==null?this.mode===`file`?{kind:`line`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:void 0,splitLineIndex:f}:{kind:`line`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:NI(n,r),splitLineIndex:f}:this.mode===`file`?{kind:`token`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:void 0,splitLineIndex:f,...c}:{kind:`token`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:NI(n,r),splitLineIndex:f,...c}}isSplitDiff(){return this.pre?.getAttribute(`data-diff-type`)===`split`}parseLineIndex(e,t){let n=(e.getAttribute(`data-line-index`)??``).split(`,`).map(e=>Number.parseInt(e,10)).filter(e=>!Number.isNaN(e));if(t&&n.length===2)return n[1];if(!t)return n[0]}};function gI({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:n,onGutterUtilityClick:r,onLineClick:i,onLineEnter:a,onLineLeave:o,onLineNumberClick:s,onTokenClick:c,onTokenEnter:l,onTokenLeave:u,renderGutterUtility:d,__debugPointerEvents:f,enableLineSelection:p,controlledSelection:m,onLineSelected:h,onLineSelectionStart:g,onLineSelectionChange:_,onLineSelectionEnd:v},y,b,x){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:_I({enableGutterUtility:t,renderGutterUtility:d,onGutterUtilityClick:r}),usesCustomGutterUtility:d!=null,lineHoverHighlight:n,onGutterUtilityClick:r,onHunkExpand:y,onMergeConflictActionClick:x,onLineClick:i,onLineEnter:a,onLineLeave:o,onLineNumberClick:s,onTokenClick:c,onTokenEnter:l,onTokenLeave:u,__debugPointerEvents:f,enableLineSelection:p,controlledSelection:m,onLineSelected:h,onLineSelectionStart:g,onLineSelectionChange:_,onLineSelectionEnd:v,getLineIndex:b}}function _I({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:n}){if(n!=null&&t!=null)throw Error(`Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.`);return e??!1}function vI(e){return e!=null&&`kind`in e&&e.kind===`line`}function yI(e){return e!=null&&`kind`in e&&e.kind===`token`}function bI(e){return vI(e)||yI(e)}function xI(e){return`type`in e&&e.type===`line-info`}function SI(e){return`kind`in e&&e.kind===`merge-conflict-action`}function CI(e){return e===`current`||e===`incoming`||e===`both`}function wI(e,t){let n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function TI(e){let t=[],n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function EI(e){let t=e.closest(`[data-line], [data-column-number]`);if(t instanceof HTMLElement)return t;let n=e.closest(`[data-line-annotation], [data-gutter-buffer="annotation"]`);if(!(n instanceof HTMLElement))return;let r=n.previousElementSibling;return r instanceof HTMLElement&&(r.hasAttribute(`data-line`)||r.hasAttribute(`data-column-number`))?r:void 0}function DI(e){let t=e.closest(`[slot^="annotation-"]`),n=(t instanceof HTMLElement&&t.assignedSlot!=null?t.assignedSlot:e.tagName===`SLOT`?e:void 0)?.closest(`[data-line-annotation]`);return n instanceof HTMLElement?n:void 0}function OI(e){let t=e.closest(`[slot^="annotation-"]`);if(t instanceof HTMLElement)return t.getAttribute(`slot`)??void 0;if(e instanceof HTMLElement){let t=e.getAttribute(`name`)??void 0;return t!=null&&t.startsWith(`annotation-`)?t:void 0}}function kI(e){if(e==null)return;let t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;let n=Number.parseInt(t[2],10);if(!(!Number.isFinite(n)||n<=0))return{lineNumber:n,side:t[1]}}function AI(e){return e!=null&&typeof e.elementFromPoint==`function`}function jI(e,t){return e===t||dI(e??void 0,t??void 0)}function MI(e,t){return e?.highlightSide===t.highlightSide&&e?.lineNumberOnly===t.lineNumberOnly&&jI(e?.range??null,t.range)}function NI(e,t){switch(e){case`change-deletion`:return`deletions`;case`change-addition`:return`additions`;default:return t.hasAttribute(`data-deletions`)?`deletions`:`additions`}}function PI(e){let t=e.getAttribute(`data-line-type`);if(t!=null)switch(t){case`change-deletion`:case`change-addition`:case`context`:case`context-expanded`:return t;default:return}}function FI(e=`none`,t,...n){switch(e){case`none`:return;case`both`:break;case`click`:if(t!==`click`)return;break;case`move`:if(t!==`move`)return}console.log(...n)}var II=class e{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){let t=e.resizeObserver??new ResizeObserver(e.handleSharedResizeEntries);return e.resizeObserver=t,t}static handleSharedResizeEntries(t){let n=new Map;for(let r of t){let t=e.managersByElement.get(r.target);if(t==null)continue;let i=n.get(t);i==null?n.set(t,[r]):i.push(r)}for(let[e,t]of n)e.handleResizeEntries(t)}observedNodes=new Map;setup(e,{disableAnnotations:t,columnVariables:n=`apply`}){let r=new Set,i=n===`apply`,a=0,o=new Map(this.observedNodes);this.observedNodes.clear();for(let t of e.children){if(a===2)break;let e=(()=>{if(t instanceof HTMLElement&&t.tagName===`CODE`)return t})();if(e==null)continue;a++;let n=o.get(e);if(n!=null&&n.type!==`code`)throw Error(`ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible`);let r=e.firstElementChild;r instanceof HTMLElement||(r=null),n==null?(n={type:`code`,codeElement:e,numberElement:r,codeWidth:`auto`,numberWidth:0,applyColumnVariables:i},this.observedNodes.set(e,n),this.observe(e),r!=null&&(this.observedNodes.set(r,n),this.observe(r))):(this.observedNodes.set(e,n),o.delete(e),n.numberElement===r?n.numberElement==null?n.numberWidth=0:(o.delete(n.numberElement),this.observedNodes.set(n.numberElement,n)):(n.numberElement!=null&&(this.unobserve(n.numberElement),o.delete(n.numberElement)),r!=null&&(this.observe(r),o.delete(r),this.observedNodes.set(r,n)),n.numberElement=r,n.numberWidth=0),zI(n,i))}if(a>1&&!t){let t=e.querySelectorAll(`[data-line-annotation*=","]`),n=new Map;for(let e of t){if(!(e instanceof HTMLElement))continue;let t=e.getAttribute(`data-line-annotation`)??``;if(!/^-?\d+,-?\d+$/.test(t)){console.error(`DiffFileRenderer.setupResizeObserver: Invalid element or annotation`,{lineAnnotation:t,element:e});continue}let r=n.get(t);r??(r=[],n.set(t,r)),r.push(e)}for(let[e,t]of n){if(t.length!==2){console.error(`DiffFileRenderer.setupResizeObserver: Bad Pair`,e,t);continue}let[n,i]=t,a=n.firstElementChild,s=i.firstElementChild;if(!(n instanceof HTMLElement)||!(i instanceof HTMLElement)||!(a instanceof HTMLElement)||!(s instanceof HTMLElement))continue;let c=o.get(a);if(c!=null){this.observedNodes.set(a,c),this.observedNodes.set(s,c),o.delete(a),o.delete(s);continue}let l=a.getBoundingClientRect().height,u=s.getBoundingClientRect().height;c={type:`annotations`,column1:{container:n,child:a,childHeight:l},column2:{container:i,child:s,childHeight:u},currentHeight:`auto`},r.add({child1:a,child2:s,item:c,newHeight:Math.max(l,u)})}for(let e of r)this.applyNewHeight(e.item,e.newHeight),this.observedNodes.set(e.child1,e.item),this.observedNodes.set(e.child2,e.item),this.observe(e.child1),this.observe(e.child2);r.clear()}for(let[e,t]of o)this.unobserve(e),t.type===`code`?HI(t):UI(t);o.clear()}cleanUp(){for(let e of this.observedNodes.keys())this.unobserve(e);this.observedNodes.clear()}observe(t){let{managersByElement:n}=e,r=n.get(t);if(r!==this){if(r!=null&&r!==this)throw Error(`ResizeManager.observe: element is already owned by another ResizeManager`);n.set(t,this),e.getResizeObserver().observe(t)}}unobserve(t){let{managersByElement:n,resizeObserver:r}=e,i=n.get(t);if(i!=null){if(i!==this)throw Error(`ResizeManager.unobserve: element is owned by another ResizeManager`);n.delete(t),r?.unobserve(t),r!=null&&n.size===0&&(r.disconnect(),e.resizeObserver=void 0)}}handleResizeEntries(e){let t=new Map,n=new Set;for(let r of e){let{target:e,borderBoxSize:i,contentBoxSize:a}=r;if(!(e instanceof HTMLElement)){console.error(`ResizeManager.handleResizeEntries: Invalid element for ResizeObserver`,r);continue}let o=this.observedNodes.get(e);if(o==null)console.error(`ResizeManager.handleResizeEntries: Not a valid observed node`,r);else if(o.type===`annotations`){let t=(()=>{if(e===o.column1.child)return o.column1;if(e===o.column2.child)return o.column2})();if(t==null){console.error(`ResizeManager.handleResizeEntries: Couldn't find a column for`,{item:o,target:e});continue}t.childHeight=i[0].blockSize,n.add(o)}else if(o.type===`code`){let n=t.get(o)??{},r=a[0].inlineSize;e===o.codeElement?n.codeInlineSize=r:e===o.numberElement&&(n.numberInlineSize=r),t.set(o,n)}}this.applyAnnotationUpdates(n),n.clear(),this.applyColumnUpdates(t),t.clear()}applyAnnotationUpdates(e){for(let t of e)this.applyNewHeight(t,Math.max(t.column1.childHeight,t.column2.childHeight))}applyColumnUpdates=e=>{for(let[t,n]of e){let e=n.codeInlineSize==null?t.codeWidth:LI(n.codeInlineSize),r=n.numberInlineSize==null?t.numberWidth:RI(n.numberInlineSize),i=e!==t.codeWidth,a=r!==t.numberWidth;(i||a)&&(t.codeWidth=e,t.numberWidth=r,t.applyColumnVariables&&BI(t,{codeWidthChanged:i,numberWidthChanged:a}))}};applyNewHeight(e,t){t!==e.currentHeight&&(e.currentHeight=Math.max(t,0),e.column1.container.style.setProperty(`--diffs-annotation-min-height`,`${e.currentHeight}px`),e.column2.container.style.setProperty(`--diffs-annotation-min-height`,`${e.currentHeight}px`))}};function LI(e){let t=Math.max(Math.floor(e),0);return t===0?`auto`:t}function RI(e){return Math.max(Math.ceil(e),0)}function zI(e,t){e.applyColumnVariables!==t&&(e.applyColumnVariables=t,t?BI(e,{codeWidthChanged:!0,numberWidthChanged:!0}):VI(e))}function BI(e,{codeWidthChanged:t,numberWidthChanged:n}){let{codeElement:r,codeWidth:i,numberWidth:a}=e;if(t&&r.style.setProperty(`--diffs-column-width`,`${typeof i==`number`?`${i}px`:`auto`}`),n&&r.style.setProperty(`--diffs-column-number-width`,`${a===0?`auto`:`${a}px`}`),t||n&&i!==`auto`){let e=typeof i==`number`?Math.max(i-a,0):0;r.style.setProperty(`--diffs-column-content-width`,`${e>0?`${e}px`:`auto`}`)}}function VI(e){e.codeElement.style.removeProperty(`--diffs-column-content-width`),e.codeElement.style.removeProperty(`--diffs-column-number-width`),e.codeElement.style.removeProperty(`--diffs-column-width`)}function HI(e){e.codeElement.isConnected&&VI(e)}function UI(e){e.column1.container.isConnected&&e.column1.container.style.removeProperty(`--diffs-annotation-min-height`),e.column2.container.isConnected&&e.column2.container.style.removeProperty(`--diffs-annotation-min-height`)}function WI(e,t){let n=Array.isArray(e)?e:[e];return t==null?n.every(e=>e===`text`||e===`ansi`||vi.has(e)):t.hasLoadedLanguages(n)}function GI(e,t){return e==null||t==null?e===t:e.startingLine===t.startingLine&&e.totalLines===t.totalLines&&e.bufferBefore===t.bufferBefore&&e.bufferAfter===t.bufferAfter}function KI(e){return ci({tagName:`div`,children:[ci({tagName:`div`,children:e.annotations?.map(e=>ci({tagName:`slot`,properties:{name:e}})),properties:{"data-annotation-content":``}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function qI(e){switch(e){case`file`:return`diffs-icon-file-code`;case`change`:return`diffs-icon-symbol-modified`;case`new`:return`diffs-icon-symbol-added`;case`deleted`:return`diffs-icon-symbol-deleted`;case`rename-pure`:case`rename-changed`:return`diffs-icon-symbol-moved`}}function JI({fileOrDiff:e,mode:t,stickyHeader:n}){let r=`type`in e?e:void 0,i={"data-diffs-header":t,"data-change-type":r?.type,"data-sticky":n?``:void 0};return ci({tagName:`div`,children:[t===`custom`?ci({tagName:`slot`,properties:{name:ei}}):YI({name:e.name,prevName:`prevName`in e?e.prevName:void 0,iconType:r?.type??`file`}),...t===`custom`?[]:[XI(r)]],properties:i})}function YI({name:e,prevName:t,iconType:n}){let r=[ci({tagName:`slot`,properties:{name:Lr}}),li({name:qI(n),properties:{"data-change-icon":n}})];return t!=null&&(r.push(ci({tagName:`div`,children:[ci({tagName:`bdi`,children:[hi(t)]})],properties:{"data-prev-name":``}})),r.push(li({name:`diffs-icon-arrow-right-short`,properties:{"data-rename-icon":``}}))),r.push(ci({tagName:`div`,children:[ci({tagName:`bdi`,children:[hi(e)]})],properties:{"data-title":``}})),r.push(ci({tagName:`slot`,properties:{name:Vr}})),ci({tagName:`div`,children:r,properties:{"data-header-content":``}})}function XI(e){let t=[];if(e!=null){let n=0,r=0;for(let t of e.hunks)n+=t.additionLines,r+=t.deletionLines;(r>0||n===0)&&t.push(ci({tagName:`span`,children:[hi(`-${r}`)],properties:{"data-deletions-count":``}})),(n>0||r===0)&&t.push(ci({tagName:`span`,children:[hi(`+${n}`)],properties:{"data-additions-count":``}}))}return t.push(ci({tagName:`slot`,properties:{name:ii}})),ci({tagName:`div`,children:t,properties:{"data-metadata":``}})}function ZI(e){return ci({tagName:`pre`,properties:QI(e)})}function QI({diffIndicators:e,disableBackground:t,disableLineNumbers:n,overflow:r,split:i,totalLines:a,type:o,customProperties:s}){return{...s,"data-diff":o===`diff`?``:void 0,"data-file":o===`file`?``:void 0,"data-diff-type":o===`diff`?i?`split`:`single`:void 0,"data-overflow":r,"data-disable-line-numbers":n?``:void 0,"data-background":t?void 0:``,"data-indicators":e===`bars`||e===`classic`?e:void 0,style:`--diffs-min-number-column-width-default:${`${a}`.length}ch;`}}function $I(e,{theme:t,preferredHighlighter:n}){return{langs:Array.isArray(e)?e:[e??`text`],themes:Br(t),preferredHighlighter:oi(n)}}function eL(e){return`annotation-${`side`in e?`${e.side}-`:``}${e.lineNumber}`}function tL(e){return e.startingLine===0&&e.totalLines===1/0&&e.bufferBefore===0&&e.bufferAfter===0}var nL=/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i,rL=/^0(?:\.0+)?%?$/;function iL(e){let t=e.indexOf(`(`);if(t<=0||!e.endsWith(`)`))return;let n=e.slice(0,t).trim();if(!/^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)$/i.test(n))return;let r=e.slice(t+1,-1).trim();if(r.length===0)return;let i=r.lastIndexOf(`/`);if(i!==-1)return r.slice(i+1).trim();if(/^(?:rgba|hsla)$/i.test(n)){let e=r.split(`,`);if(e.length===4)return e[3]?.trim()}}function aL(e){let t=/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})\b/i.exec(e.trim());if(t==null)return null;let n=t[1],r,i=1;return n.length===3?r=n.split(``).map(e=>e+e).join(``):n.length===6?r=n:(r=n.slice(0,6),i=parseInt(n.slice(6,8),16)/255),[parseInt(r.slice(0,2),16),parseInt(r.slice(2,4),16),parseInt(r.slice(4,6),16),i]}function oL(e){if(e==null)return null;let t=aL(e);if(t==null)return null;let n=t[0]/255,r=t[1]/255,i=t[2]/255,a=e=>e<=.03928?e/12.92:((e+.055)/1.055)**2.4;return .2126*a(n)+.7152*a(r)+.0722*a(i)}function sL(e){if(e==null)return!1;let t=e.trim().toLowerCase();if(t===`transparent`||nL.test(t))return!0;let n=iL(t);return n!=null&&rL.test(n)}function cL(e,t,n){if(t==null||n==null)return!1;let r=oL(e),i=oL(t),a=oL(n);return r==null||i==null||a==null?!1:Math.abs(r-a)<Math.abs(r-i)}var lL=new WeakMap;function uL(e){let t=lL.get(e);if(t!=null)return t;let n=e.colors??{},r={...n},i=n[`editor.background`]??e.bg,a=n[`editor.foreground`]??e.fg,o=n[`sideBar.background`]??i,s=n[`sideBar.foreground`]??a;dL(r,`editor.background`,i),dL(r,`editor.foreground`,a),dL(r,`sideBar.background`,o),dL(r,`sideBar.foreground`,s),dL(r,`input.background`,n[`input.background`]??o),dL(r,`sideBarSectionHeader.foreground`,n[`sideBarSectionHeader.foreground`]??s),dL(r,`list.activeSelectionForeground`,n[`list.activeSelectionForeground`]??s),dL(r,`gitDecoration.addedResourceForeground`,fL(n[`gitDecoration.addedResourceForeground`],n[`terminal.ansiGreen`],n[`editorGutter.addedBackground`])),dL(r,`gitDecoration.modifiedResourceForeground`,fL(n[`gitDecoration.modifiedResourceForeground`],n[`terminal.ansiBlue`],n[`editorGutter.modifiedBackground`])),dL(r,`gitDecoration.deletedResourceForeground`,fL(n[`gitDecoration.deletedResourceForeground`],n[`terminal.ansiRed`],n[`editorGutter.deletedBackground`]));let c=(sL(n[`list.focusOutline`])?void 0:n[`list.focusOutline`])??(sL(n.focusBorder)?void 0:n.focusBorder);c==null?delete r[`list.focusOutline`]:r[`list.focusOutline`]=c;let l=n[`list.hoverBackground`];l!=null&&(pL(l,o)||cL(l,o,s))&&delete r[`list.hoverBackground`];let u=Object.freeze({...e,colors:Object.freeze(r)});return lL.set(e,u),u}function dL(e,t,n){n!=null&&n!==``&&(e[t]=n)}function fL(...e){for(let t of e)if(t!=null&&t!==``)return t}function pL(e,t){return t!=null&&e.toLowerCase()===t.toLowerCase()}function mL({theme:e=ti,highlighter:t,prefix:n}){let r=``;if(typeof e==`string`){let i=t.getTheme(e),a=hL(i,t);r+=`color:${a.fg};`,r+=`background-color:${a.bg};`,r+=`${yi(`global`)}fg:${a.fg};`,r+=`${yi(`global`)}bg:${a.bg};`,r+=gL(i,n)}else{let n=t.getTheme(e.dark),i=hL(n,t);r+=`${yi(`global`)}dark:${i.fg};`,r+=`${yi(`global`)}dark-bg:${i.bg};`,r+=gL(n,`dark`),n=t.getTheme(e.light),i=hL(n,t),r+=`${yi(`global`)}light:${i.fg};`,r+=`${yi(`global`)}light-bg:${i.bg};`,r+=gL(n,`light`)}return r}function hL(e,t){if(t.name===`highlights`&&e.zed?.cssVariables===!0){let e=yi(`token`);return{fg:`var(${e}foreground)`,bg:`var(${e}background)`}}return uL(e)}function gL(e,t){t=t==null?``:`${t}-`;let n=``,r=e.colors?.[`gitDecoration.addedResourceForeground`]??e.colors?.[`terminal.ansiGreen`];r!=null&&(n+=`${yi(`global`)}${t}addition-color:${r};`);let i=e.colors?.[`gitDecoration.deletedResourceForeground`]??e.colors?.[`terminal.ansiRed`];i!=null&&(n+=`${yi(`global`)}${t}deletion-color:${i};`);let a=e.colors?.[`gitDecoration.modifiedResourceForeground`]??e.colors?.[`terminal.ansiBlue`];return a!=null&&(n+=`${yi(`global`)}${t}modified-color:${a};`),n}function _L(e,t,n){return{lang:e,...typeof t==`string`?{theme:t}:{themes:t},defaultColor:!1,cssVariablePrefix:yi(`token`),tokenizeMaxLineLength:n,tokenizeTimeLimit:0}}function vL(e,t){return e?.getPreferredHighlighter()??t.preferredHighlighter}function yL(e,t){return e?.cacheKey!=null||t?.cacheKey!=null?e?.cacheKey===t?.cacheKey:e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function bL(e){return e?.some(e=>e.lineNumber===0)??!1}function xL(e){let t=e[0];return t!=null&&t.length>0?t:void 0}function SL(e){return e.startingLine===0&&e.totalLines>0}function CL(e,t){return e.endsWith(`\r
|
|
33
|
+
`)?t+`\r
|
|
34
|
+
`:e.endsWith(`\r`)?t+`\r`:e.endsWith(`
|
|
35
|
+
`)?t+`
|
|
36
|
+
`:t}function wL(e,t){return ci({tagName:`div`,children:e,properties:{"data-content":``,style:`grid-row: span ${t}`}})}var TL=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
|
|
37
|
+
<symbol id="diffs-icon-arrow-right-short" viewBox="0 0 16 16">
|
|
38
|
+
<path d="M8.47 4.22a.75.75 0 0 0 0 1.06l1.97 1.97H3.75a.75.75 0 0 0 0 1.5h6.69l-1.97 1.97a.75.75 0 1 0 1.06 1.06l3.25-3.25a.75.75 0 0 0 0-1.06L9.53 4.22a.75.75 0 0 0-1.06 0"/>
|
|
39
|
+
</symbol>
|
|
40
|
+
<symbol id="diffs-icon-brand-github" viewBox="0 0 16 16">
|
|
41
|
+
<path d="M8 0c4.42 0 8 3.58 8 8a8.01 8.01 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27s-1.36.09-2 .27c-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8"/>
|
|
42
|
+
</symbol>
|
|
43
|
+
<symbol id="diffs-icon-chevron" viewBox="0 0 16 16">
|
|
44
|
+
<path d="M1.47 4.47a.75.75 0 0 1 1.06 0L8 9.94l5.47-5.47a.75.75 0 1 1 1.06 1.06l-6 6a.75.75 0 0 1-1.06 0l-6-6a.75.75 0 0 1 0-1.06"/>
|
|
45
|
+
</symbol>
|
|
46
|
+
<symbol id="diffs-icon-chevrons-narrow" viewBox="0 0 10 16">
|
|
47
|
+
<path d="M4.47 2.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1-1.06 1.06L5 3.81 2.28 6.53a.75.75 0 0 1-1.06-1.06zM1.22 9.47a.75.75 0 0 1 1.06 0L5 12.19l2.72-2.72a.75.75 0 0 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0l-3.25-3.25a.75.75 0 0 1 0-1.06"/>
|
|
48
|
+
</symbol>
|
|
49
|
+
<symbol id="diffs-icon-diff-split" viewBox="0 0 16 16">
|
|
50
|
+
<path d="M14 0H8.5v16H14a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2m-1.5 6.5v1h1a.5.5 0 0 1 0 1h-1v1a.5.5 0 0 1-1 0v-1h-1a.5.5 0 0 1 0-1h1v-1a.5.5 0 0 1 1 0"/><path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h5.5V0zm.5 7.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1" opacity=".3"/>
|
|
51
|
+
</symbol>
|
|
52
|
+
<symbol id="diffs-icon-diff-unified" viewBox="0 0 16 16">
|
|
53
|
+
<path fill-rule="evenodd" d="M16 14a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V8.5h16zm-8-4a.5.5 0 0 0-.5.5v1h-1a.5.5 0 0 0 0 1h1v1a.5.5 0 0 0 1 0v-1h1a.5.5 0 0 0 0-1h-1v-1A.5.5 0 0 0 8 10" clip-rule="evenodd"/><path fill-rule="evenodd" d="M14 0a2 2 0 0 1 2 2v5.5H0V2a2 2 0 0 1 2-2zM6.5 3.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1z" clip-rule="evenodd" opacity=".4"/>
|
|
54
|
+
</symbol>
|
|
55
|
+
<symbol id="diffs-icon-expand" viewBox="0 0 16 16">
|
|
56
|
+
<path d="M3.47 5.47a.75.75 0 0 1 1.06 0L8 8.94l3.47-3.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06"/>
|
|
57
|
+
</symbol>
|
|
58
|
+
<symbol id="diffs-icon-expand-all" viewBox="0 0 16 16">
|
|
59
|
+
<path d="M11.47 9.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06L8 12.94zM7.526 1.418a.75.75 0 0 1 1.004.052l4 4a.75.75 0 1 1-1.06 1.06L8 3.06 4.53 6.53a.75.75 0 1 1-1.06-1.06l4-4z"/>
|
|
60
|
+
</symbol>
|
|
61
|
+
<symbol id="diffs-icon-eye-slash" viewBox="0 0 16 16">
|
|
62
|
+
<path d="m13.47 1.47-12 12 1.06 1.06 12-12zM8 14c-.92 0-1.802-.208-2.624-.547l1.173-1.174c.476.142.963.221 1.451.221 1.66 0 3.307-.949 4.626-2.196a10.4 10.4 0 0 0 1.494-1.751A5 5 0 0 0 14.443 8a5 5 0 0 0-.323-.553 10 10 0 0 0-1.238-1.5l1.061-1.062C15.222 6.173 16 7.511 16 8c0 1.05-3.582 6-8 6"/><path d="M8 11q-.084 0-.167-.005l3.162-3.162q.006.083.005.167a3 3 0 0 1-3 3M5.005 8.167l3.162-3.162a3 3 0 0 0-3.162 3.162"/><path d="M8 3.5c.485 0 .97.081 1.445.227l1.168-1.169C9.794 2.212 8.915 2 8 2 3.582 2 0 6.8 0 8c0 .555.766 1.88 2.027 3.144l1.06-1.06a9.5 9.5 0 0 1-1.203-1.461 4.3 4.3 0 0 1-.345-.617L1.536 8l.003-.006c.064-.149.176-.359.345-.617a9.8 9.8 0 0 1 1.482-1.73C4.675 4.427 6.326 3.5 8 3.5"/>
|
|
63
|
+
</symbol>
|
|
64
|
+
<symbol id="diffs-icon-file-code" viewBox="0 0 16 16">
|
|
65
|
+
<path d="M10.75 0c.199 0 .39.08.53.22l3.5 3.5c.14.14.22.331.22.53v9A2.75 2.75 0 0 1 12.25 16h-8.5A2.75 2.75 0 0 1 1 13.25V2.75A2.75 2.75 0 0 1 3.75 0zm-7 1.5c-.69 0-1.25.56-1.25 1.25v10.5c0 .69.56 1.25 1.25 1.25h8.5c.69 0 1.25-.56 1.25-1.25V5h-1.25A2.25 2.25 0 0 1 10 2.75V1.5z"/><path d="M7.248 6.19a.75.75 0 0 1 .063 1.058L5.753 9l1.558 1.752a.75.75 0 0 1-1.122.996l-2-2.25a.75.75 0 0 1 0-.996l2-2.25a.75.75 0 0 1 1.06-.063M8.69 7.248a.75.75 0 1 1 1.12-.996l2 2.25a.75.75 0 0 1 0 .996l-2 2.25a.75.75 0 1 1-1.12-.996L10.245 9z"/>
|
|
66
|
+
</symbol>
|
|
67
|
+
<symbol id="diffs-icon-plus" viewBox="0 0 16 16">
|
|
68
|
+
<path d="M8 3a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-3.5v3.5a.75.75 0 0 1-1.5 0v-3.5h-3.5a.75.75 0 0 1 0-1.5h3.5v-3.5A.75.75 0 0 1 8 3"/>
|
|
69
|
+
</symbol>
|
|
70
|
+
<symbol id="diffs-icon-symbol-added" viewBox="0 0 16 16">
|
|
71
|
+
<path d="M8 4a.75.75 0 0 1 .75.75v2.5h2.5a.75.75 0 0 1 0 1.5h-2.5v2.5a.75.75 0 0 1-1.5 0v-2.5h-2.5a.75.75 0 0 1 0-1.5h2.5v-2.5A.75.75 0 0 1 8 4"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
|
|
72
|
+
</symbol>
|
|
73
|
+
<symbol id="diffs-icon-symbol-added-duo" viewBox="0 0 16 16">
|
|
74
|
+
<path d="M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8" opacity=".2"/><path d="M8 4a.75.75 0 0 1 .75.75v2.5h2.5a.75.75 0 0 1 0 1.5h-2.5v2.5a.75.75 0 0 1-1.5 0v-2.5h-2.5a.75.75 0 0 1 0-1.5h2.5v-2.5A.75.75 0 0 1 8 4"/>
|
|
75
|
+
</symbol>
|
|
76
|
+
<symbol id="diffs-icon-symbol-added-fill" viewBox="0 0 16 16">
|
|
77
|
+
<path fill-rule="evenodd" d="M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8m0 4a.75.75 0 0 0-.75.75v2.5h-2.5a.75.75 0 0 0 0 1.5h2.5v2.5a.75.75 0 0 0 1.5 0v-2.5h2.5a.75.75 0 0 0 0-1.5h-2.5v-2.5A.75.75 0 0 0 8 4" clip-rule="evenodd"/>
|
|
78
|
+
</symbol>
|
|
79
|
+
<symbol id="diffs-icon-symbol-deleted" viewBox="0 0 16 16">
|
|
80
|
+
<path d="M4 8a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5A.75.75 0 0 1 4 8"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
|
|
81
|
+
</symbol>
|
|
82
|
+
<symbol id="diffs-icon-symbol-deleted-duo" viewBox="0 0 16 16">
|
|
83
|
+
<path d="M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8" opacity=".2"/><path d="M4 8a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5A.75.75 0 0 1 4 8"/>
|
|
84
|
+
</symbol>
|
|
85
|
+
<symbol id="diffs-icon-symbol-deleted-fill" viewBox="0 0 16 16">
|
|
86
|
+
<path fill-rule="evenodd" d="M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8M4.75 7.25a.75.75 0 0 0 0 1.5h6.5a.75.75 0 0 0 0-1.5z" clip-rule="evenodd"/>
|
|
87
|
+
</symbol>
|
|
88
|
+
<symbol id="diffs-icon-symbol-diffstat" viewBox="0 0 16 16">
|
|
89
|
+
<path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.75 4.296a.75.75 0 0 0-1.5 0V6.25h-2a.75.75 0 0 0 0 1.5h2v1.5h1.5v-1.5h2a.75.75 0 0 0 0-1.5h-2zM5.25 10a.75.75 0 0 0 0 1.5h5.5a.75.75 0 0 0 0-1.5z"/>
|
|
90
|
+
</symbol>
|
|
91
|
+
<symbol id="diffs-icon-symbol-diffstat-duo" viewBox="0 0 16 16">
|
|
92
|
+
<path d="M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8" opacity=".2"/><path d="M8.75 4.296a.75.75 0 0 0-1.5 0V6.25h-2a.75.75 0 0 0 0 1.5h2v1.5h1.5v-1.5h2a.75.75 0 0 0 0-1.5h-2zM5.25 10a.75.75 0 0 0 0 1.5h5.5a.75.75 0 0 0 0-1.5z"/>
|
|
93
|
+
</symbol>
|
|
94
|
+
<symbol id="diffs-icon-symbol-diffstat-fill" viewBox="0 0 16 16">
|
|
95
|
+
<path fill-rule="evenodd" d="M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8M5.25 10a.75.75 0 0 0 0 1.5h5.5a.75.75 0 0 0 0-1.5zM8 3.546a.75.75 0 0 0-.75.75V6.25h-2a.75.75 0 0 0 0 1.5h2v1.5h1.5v-1.5h2a.75.75 0 0 0 0-1.5h-2V4.296a.75.75 0 0 0-.75-.75" clip-rule="evenodd"/>
|
|
96
|
+
</symbol>
|
|
97
|
+
<symbol id="diffs-icon-symbol-extracted" viewBox="0 0 16 16">
|
|
98
|
+
<path d="M8.25 4.25a.75.75 0 0 1 0 1.5H6.81l3.302 3.302a1.5 1.5 0 1 1-1.06 1.06L5.75 6.811V8.25a.75.75 0 0 1-1.5 0V5A.75.75 0 0 1 5 4.25z"/><path fill-rule="evenodd" d="M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8m0 1.5c-1.613 0-2.807.089-3.704.288-.88.196-1.382.477-1.706.802-.325.324-.606.826-.802 1.706C1.588 5.193 1.5 6.387 1.5 8s.089 2.807.288 3.704c.196.88.477 1.382.802 1.706.324.325.826.606 1.706.802.897.2 2.091.288 3.704.288s2.807-.089 3.704-.288c.88-.196 1.382-.477 1.706-.802.325-.324.606-.826.802-1.706.2-.897.288-2.091.288-3.704s-.089-2.807-.288-3.704c-.196-.88-.477-1.382-.802-1.706-.324-.325-.826-.606-1.706-.802C10.807 1.588 9.613 1.5 8 1.5" clip-rule="evenodd"/>
|
|
99
|
+
</symbol>
|
|
100
|
+
<symbol id="diffs-icon-symbol-extracted-duo" viewBox="0 0 16 16">
|
|
101
|
+
<path fill-rule="evenodd" d="M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8" clip-rule="evenodd" opacity=".2"/><path d="M8.25 4.25a.75.75 0 0 1 0 1.5H6.81l3.302 3.302a1.5 1.5 0 1 1-1.06 1.06L5.75 6.811V8.25a.75.75 0 0 1-1.5 0V5A.75.75 0 0 1 5 4.25z"/>
|
|
102
|
+
</symbol>
|
|
103
|
+
<symbol id="diffs-icon-symbol-extracted-fill" viewBox="0 0 16 16">
|
|
104
|
+
<path fill-rule="evenodd" d="M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8M5 4.25a.75.75 0 0 0-.75.75v3.25a.75.75 0 0 0 1.5 0V6.81l3.302 3.302a1.5 1.5 0 1 0 1.06-1.06L6.811 5.75H8.25a.75.75 0 0 0 0-1.5z" clip-rule="evenodd"/>
|
|
105
|
+
</symbol>
|
|
106
|
+
<symbol id="diffs-icon-symbol-ignored" viewBox="0 0 16 16">
|
|
107
|
+
<path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m11.53-2.47a.75.75 0 0 0-1.06-1.06l-6 6a.75.75 0 1 0 1.06 1.06z"/>
|
|
108
|
+
</symbol>
|
|
109
|
+
<symbol id="diffs-icon-symbol-ignored-duo" viewBox="0 0 16 16">
|
|
110
|
+
<path d="M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8" opacity=".2"/><path d="M11.53 4.47a.75.75 0 0 1 0 1.06l-6 6a.75.75 0 0 1-1.06-1.06l6-6a.75.75 0 0 1 1.06 0"/>
|
|
111
|
+
</symbol>
|
|
112
|
+
<symbol id="diffs-icon-symbol-ignored-fill" viewBox="0 0 16 16">
|
|
113
|
+
<path fill-rule="evenodd" d="M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8m3.53 4.47a.75.75 0 0 0-1.06 0l-6 6a.75.75 0 1 0 1.06 1.06l6-6a.75.75 0 0 0 0-1.06" clip-rule="evenodd"/>
|
|
114
|
+
</symbol>
|
|
115
|
+
<symbol id="diffs-icon-symbol-inlined" viewBox="0 0 16 16">
|
|
116
|
+
<path d="M7.75 11.75a.75.75 0 0 1 0-1.5h1.44L5.887 6.948a1.5 1.5 0 1 1 1.06-1.06l3.302 3.301V7.75a.75.75 0 0 1 1.5 0V11a.75.75 0 0 1-.75.75z"/><path fill-rule="evenodd" d="M8 16c-6.588 0-8-1.412-8-8s1.412-8 8-8 8 1.412 8 8-1.412 8-8 8m0-1.5c1.613 0 2.807-.089 3.704-.288.88-.196 1.382-.477 1.706-.802.325-.324.606-.826.802-1.706.2-.897.288-2.091.288-3.704s-.089-2.807-.288-3.704c-.196-.88-.477-1.382-.802-1.706-.324-.325-.826-.606-1.706-.802C10.807 1.588 9.613 1.5 8 1.5s-2.807.089-3.704.288c-.88.196-1.382.477-1.706.802-.325.324-.606.826-.802 1.706C1.588 5.193 1.5 6.387 1.5 8s.089 2.807.288 3.704c.196.88.477 1.382.802 1.706.324.325.826.606 1.706.802.897.2 2.091.288 3.704.288" clip-rule="evenodd"/>
|
|
117
|
+
</symbol>
|
|
118
|
+
<symbol id="diffs-icon-symbol-inlined-duo" viewBox="0 0 16 16">
|
|
119
|
+
<path fill-rule="evenodd" d="M8 16c-6.588 0-8-1.412-8-8s1.412-8 8-8 8 1.412 8 8-1.412 8-8 8" clip-rule="evenodd" opacity=".2"/><path d="M7.75 11.75a.75.75 0 0 1 0-1.5h1.44L5.887 6.948a1.5 1.5 0 1 1 1.06-1.06l3.302 3.301V7.75a.75.75 0 0 1 1.5 0V11a.75.75 0 0 1-.75.75z"/>
|
|
120
|
+
</symbol>
|
|
121
|
+
<symbol id="diffs-icon-symbol-inlined-fill" viewBox="0 0 16 16">
|
|
122
|
+
<path fill-rule="evenodd" d="M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8M5.5 4a1.5 1.5 0 1 0 .388 2.948l3.301 3.302H7.75a.75.75 0 0 0 0 1.5H11a.75.75 0 0 0 .75-.75V7.75a.75.75 0 0 0-1.5 0v1.44L6.948 5.887A1.5 1.5 0 0 0 5.5 4" clip-rule="evenodd"/>
|
|
123
|
+
</symbol>
|
|
124
|
+
<symbol id="diffs-icon-symbol-modified" viewBox="0 0 16 16">
|
|
125
|
+
<path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m8 3a3 3 0 1 0 0-6 3 3 0 0 0 0 6"/>
|
|
126
|
+
</symbol>
|
|
127
|
+
<symbol id="diffs-icon-symbol-modified-duo" viewBox="0 0 16 16">
|
|
128
|
+
<path d="M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8" opacity=".2"/><path d="M11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0"/>
|
|
129
|
+
</symbol>
|
|
130
|
+
<symbol id="diffs-icon-symbol-modified-fill" viewBox="0 0 16 16">
|
|
131
|
+
<path fill-rule="evenodd" d="M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8m0 5a3 3 0 1 0 0 6 3 3 0 0 0 0-6" clip-rule="evenodd"/>
|
|
132
|
+
</symbol>
|
|
133
|
+
<symbol id="diffs-icon-symbol-moved" viewBox="0 0 16 16">
|
|
134
|
+
<path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.495 4.695a.75.75 0 0 0-.05 1.06L10.486 8l-2.041 2.246a.75.75 0 0 0 1.11 1.008l2.5-2.75a.75.75 0 0 0 0-1.008l-2.5-2.75a.75.75 0 0 0-1.06-.051m-4 0a.75.75 0 0 0-.05 1.06l2.044 2.248-1.796 1.995a.75.75 0 0 0 1.114 1.004l2.25-2.5a.75.75 0 0 0-.002-1.007l-2.5-2.75a.75.75 0 0 0-1.06-.05"/>
|
|
135
|
+
</symbol>
|
|
136
|
+
<symbol id="diffs-icon-symbol-moved-duo" viewBox="0 0 16 16">
|
|
137
|
+
<path d="M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8" opacity=".2"/><path d="M8.496 4.695a.75.75 0 0 0-.051 1.06L10.486 8l-2.041 2.246a.75.75 0 0 0 1.11 1.008l2.5-2.75a.75.75 0 0 0 0-1.008l-2.5-2.75a.75.75 0 0 0-1.06-.051m-4 0a.75.75 0 0 0-.051 1.06L6.49 8.003 4.693 9.998a.75.75 0 0 0 1.114 1.004l2.25-2.5a.75.75 0 0 0-.002-1.007l-2.5-2.75a.75.75 0 0 0-1.06-.05"/>
|
|
138
|
+
</symbol>
|
|
139
|
+
<symbol id="diffs-icon-symbol-moved-fill" viewBox="0 0 16 16">
|
|
140
|
+
<path fill-rule="evenodd" d="M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8m1.555 4.745a.75.75 0 0 0-1.11 1.01L10.486 8l-2.04 2.245a.75.75 0 0 0 1.109 1.01l2.5-2.75a.75.75 0 0 0 0-1.01zm-4 0a.75.75 0 0 0-1.11 1.01l2.043 2.248-1.796 1.995a.75.75 0 0 0 1.116 1.004l2.25-2.5a.75.75 0 0 0-.003-1.007z" clip-rule="evenodd"/>
|
|
141
|
+
</symbol>
|
|
142
|
+
<symbol id="diffs-icon-symbol-ref" viewBox="0 0 16 16">
|
|
143
|
+
<path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706.286.286.71.54 1.41.73V1.86c-.7.19-1.124.444-1.41.73-.324.325-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8m4 6.397c.697.07 1.522.103 2.5.103 1.613 0 2.806-.088 3.704-.288.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5c-.978 0-1.803.033-2.5.103zM0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m7-2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z"/>
|
|
144
|
+
</symbol>
|
|
145
|
+
</svg>`;function EL(e,t){return e==null||t==null?e===t:OL(e.customProperties,t.customProperties)&&e.type===t.type&&e.diffIndicators===t.diffIndicators&&e.disableBackground===t.disableBackground&&e.disableLineNumbers===t.disableLineNumbers&&e.overflow===t.overflow&&e.split===t.split&&e.totalLines===t.totalLines}var DL={};function OL(e=DL,t=DL){if(e===t)return!0;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(e[r]!==t[r])return!1;return!0}function kL(e){let t=document.createElement(`div`);return t.dataset.annotationSlot=``,t.slot=e,t.style.whiteSpace=`normal`,t}function AL(){let e=document.createElement(`div`);return e.slot=`gutter-utility-slot`,e.style.position=`absolute`,e.style.top=`0`,e.style.bottom=`0`,e.style.textAlign=`center`,e.style.whiteSpace=`normal`,e.style.touchAction=`none`,e}function jL(){let e=document.createElement(`style`);return e.setAttribute(Ir,``),e}var ML=`@layer base,theme,rendered,unsafe;@layer base{:host{--diffs-font-fallback:"SF Mono", Monaco, Consolas, "Ubuntu Mono", "Liberation Mono", "Courier New", monospace;--diffs-header-font-fallback:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;--diffs-mixer:light-dark(#000,#fff);--diffs-gap-fallback:8px;--diffs-scrollbar-gutter-fallback:6px;--diffs-scrollbar-gutter:var(--diffs-scrollbar-gutter-override,var(--diffs-scrollbar-gutter-measured,var(--diffs-scrollbar-gutter-fallback)));--diffs-added-light:#0dbe4e;--diffs-added-dark:#5ecc71;--diffs-modified-light:#009fff;--diffs-modified-dark:#69b1ff;--diffs-deleted-light:#ff2e3f;--diffs-deleted-dark:#ff6762;--diffs-warning-light:#d5a910;--diffs-warning-dark:#ffd452;color-scheme:light dark;font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback));font-size:var(--diffs-font-size,13px);line-height:var(--diffs-line-height,20px);font-feature-settings:var(--diffs-font-features);--diffs-bg:light-dark(var(--diffs-light-bg,#fff),var(--diffs-dark-bg,#000));--diffs-bg-buffer:var(--diffs-bg-buffer-override,light-dark(color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer)),color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer))));--diffs-bg-context:var(--diffs-bg-context-override,light-dark(color-mix(in lab, var(--diffs-bg) 98.5%, var(--diffs-mixer)),color-mix(in lab, var(--diffs-bg) 92.5%, var(--diffs-mixer))));--diffs-bg-context-gutter:var(--diffs-bg-context-gutter-override,light-dark(color-mix(in lab, var(--diffs-bg-context) 90%, var(--diffs-bg)),color-mix(in lab, var(--diffs-bg-context) 45%, var(--diffs-bg))));--diffs-bg-separator:var(--diffs-bg-separator-override,light-dark(color-mix(in lab, var(--diffs-bg) 96%, var(--diffs-mixer)),color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-mixer))));--diffs-fg:light-dark(var(--diffs-light,#000),var(--diffs-dark,#fff));--diffs-fg-number:var(--diffs-fg-number-override,light-dark(color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg)),color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg))));--diffs-fg-conflict-marker:var(--diffs-fg-conflict-marker-override,var(--diffs-fg-number));--diffs-deletion-base:var(--diffs-deletion-color-override,light-dark(var(--diffs-light-deletion-color,var(--diffs-deletion-color,var(--diffs-deleted-light))),var(--diffs-dark-deletion-color,var(--diffs-deletion-color,var(--diffs-deleted-dark)))));--diffs-addition-base:var(--diffs-addition-color-override,light-dark(var(--diffs-light-addition-color,var(--diffs-addition-color,var(--diffs-added-light))),var(--diffs-dark-addition-color,var(--diffs-addition-color,var(--diffs-added-dark)))));--diffs-modified-base:var(--diffs-modified-color-override,light-dark(var(--diffs-light-modified-color,var(--diffs-modified-color,var(--diffs-modified-light))),var(--diffs-dark-modified-color,var(--diffs-modified-color,var(--diffs-modified-dark)))));--diffs-bg-deletion:var(--diffs-bg-deletion-override,light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-deletion-base)),color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-deletion-base))));--diffs-bg-deletion-emphasis:var(--diffs-bg-deletion-emphasis-override,light-dark(rgb(from var(--diffs-deletion-base) r g b / .15),rgb(from var(--diffs-deletion-base) r g b / .2)));--diffs-bg-addition:var(--diffs-bg-addition-override,light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-addition-base)),color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-addition-base))));--diffs-bg-addition-emphasis:var(--diffs-bg-addition-emphasis-override,light-dark(rgb(from var(--diffs-addition-base) r g b / .15),rgb(from var(--diffs-addition-base) r g b / .2)));--diffs-selection-base:var(--diffs-modified-base);--diffs-selection-number-fg:light-dark(color-mix(in lab, var(--diffs-selection-base) 65%, var(--diffs-mixer)),color-mix(in lab, var(--diffs-selection-base) 75%, var(--diffs-mixer)));background-color:var(--diffs-bg);color:var(--diffs-fg);display:block}pre,code,[data-error-wrapper]{isolation:isolate;font-family:var(--diffs-font-family,var(--diffs-font-fallback));outline:none;margin:0;padding:0;display:block}pre,code{background-color:var(--diffs-bg)}code{contain:content}input,button{font-family:inherit;font-size:inherit;line-height:inherit}*,:before,:after{box-sizing:border-box}[data-icon-sprite]{display:none}[data-diffs-header],[data-separator]{font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback))}[data-diffs-header][data-sticky]{z-index:1;background-color:var(--diffs-bg);position:sticky;top:0}[data-file-info]{color:var(--fg);background-color:color-mix(in lab, var(--bg) 98%, var(--fg));border-block:1px solid color-mix(in lab, var(--bg) 95%, var(--fg));padding:10px;font-weight:700}[data-diff],[data-file]{--diffs-grid-number-column-width:minmax(min-content, max-content);--diffs-code-grid:var(--diffs-grid-number-column-width) 1fr;&[data-dehydrated]{--diffs-code-grid:var(--diffs-grid-number-column-width) minmax(0, 1fr)}&:hover [data-code]::-webkit-scrollbar-thumb{background-color:var(--diffs-bg-context)}}@supports (-webkit-touch-callout:none){:host{--diffs-scrollbar-gutter-fallback:0px}}[data-line] span,[data-edit-prediction-suffix] span{color:light-dark(var(--diffs-token-light,var(--diffs-light)),var(--diffs-token-dark,var(--diffs-dark)));background-color:light-dark(var(--diffs-token-light-bg,inherit),var(--diffs-token-dark-bg,inherit))}[data-line],[data-gutter-buffer],[data-column-number],[data-line-annotation],[data-no-newline],[data-merge-conflict],[data-merge-conflict-actions],[data-editor-overlay]{--diffs-computed-decoration-bg:var(--diffs-bg);--diffs-computed-diff-line-bg:var(--diffs-computed-decoration-bg);--diffs-computed-selected-line-bg:var(--diffs-computed-diff-line-bg);--diffs-computed-editor-active-line-bg:var(--diffs-computed-selected-line-bg);--diffs-computed-hovered-line-bg:var(--diffs-computed-editor-active-line-bg);--diffs-hover-mix-target:var(--diffs-bg-hover-override,var(--diffs-mixer));--diffs-line-bg:var(--diffs-computed-hovered-line-bg);color:var(--diffs-fg);background-color:var(--diffs-line-bg,var(--diffs-bg))}[data-line],[data-no-newline]{&[data-decoration-bg]{--mix-deco-light:92%;--mix-deco-dark:85%;&[data-decoration-bg-depth="2"]{--mix-deco-light:88%;--mix-deco-dark:80%}&[data-decoration-bg-depth="3"]{--mix-deco-light:85%;--mix-deco-dark:78%}--diffs-hover-mix-target:var(--diffs-decoration-bg);--diffs-computed-decoration-bg:light-dark(color-mix(in lab, var(--diffs-bg) var(--mix-deco-light), var(--diffs-decoration-bg)),color-mix(in lab, var(--diffs-bg) var(--mix-deco-dark), var(--diffs-decoration-bg)))}}[data-line-annotation],[data-gutter-buffer=annotation]{--diffs-annotation-bg:var(--diffs-bg-context);--diffs-computed-decoration-bg:var(--diffs-annotation-bg);--diffs-hover-mix-target:var(--diffs-computed-editor-active-line-bg)}[data-merge-conflict-actions],[data-gutter-buffer=merge-conflict-action],[data-gutter-buffer=merge-conflict-marker-base],[data-gutter-buffer=merge-conflict-marker-separator],[data-merge-conflict=marker-base],[data-merge-conflict=marker-separator]{--diffs-computed-decoration-bg:var(--diffs-bg-context);--diffs-hover-mix-target:var(--diffs-computed-editor-active-line-bg)}[data-gutter-buffer=merge-conflict-marker-start],[data-merge-conflict=marker-start]{--diffs-computed-decoration-bg:light-dark(color-mix(in lab, var(--diffs-bg) 78%, var(--conflict-bg-current-header-override,var(--diffs-addition-base))),color-mix(in lab, var(--diffs-bg) 68%, var(--conflict-bg-current-header-override,var(--diffs-addition-base))));--diffs-hover-mix-target:var(--diffs-computed-editor-active-line-bg)}[data-gutter-buffer=merge-conflict-marker-end],[data-merge-conflict=marker-end]{--diffs-computed-decoration-bg:light-dark(color-mix(in lab, var(--diffs-bg) 78%, var(--conflict-bg-incoming-header-override,var(--diffs-modified-base))),color-mix(in lab, var(--diffs-bg) 68%, var(--conflict-bg-incoming-header-override,var(--diffs-modified-base))));--diffs-hover-mix-target:var(--diffs-computed-editor-active-line-bg)}[data-has-merge-conflict] [data-line-annotation],[data-has-merge-conflict] [data-gutter-buffer=annotation]{--diffs-computed-decoration-bg:var(--diffs-bg);--diffs-hover-mix-target:var(--diffs-computed-editor-active-line-bg)}:where([data-background]){& [data-gutter-buffer],& [data-column-number]{--mix-light:91%;--mix-dark:85%}& [data-line],& [data-no-newline]{--mix-light:88%;--mix-dark:80%}& [data-gutter-buffer],& [data-column-number],& [data-line],& [data-no-newline]{--diffs-diff-line-mix-target:var(--diffs-bg);&[data-line-type=change-deletion]{--diffs-diff-line-mix-target:var(--diffs-bg-deletion-override,var(--diffs-deletion-base));--diffs-hover-mix-target:var(--diffs-diff-line-mix-target);&:where([data-gutter-buffer],[data-column-number]){color:var(--diffs-fg-number-deletion-override,var(--diffs-deletion-base));--diffs-diff-line-mix-target:var(--diffs-bg-deletion-number-override,var(--diffs-deletion-base))}--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)))}&[data-line-type=change-addition]{--diffs-diff-line-mix-target:var(--diffs-bg-addition-override,var(--diffs-addition-base));--diffs-hover-mix-target:var(--diffs-diff-line-mix-target);&:where([data-gutter-buffer],[data-column-number]){color:var(--diffs-fg-number-addition-override,var(--diffs-addition-base));--diffs-diff-line-mix-target:var(--diffs-bg-addition-number-override,var(--diffs-addition-base))}--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)))}&[data-merge-conflict=current]{--diffs-diff-line-mix-target:var(--conflict-bg-current-override,var(--diffs-addition-base));--diffs-hover-mix-target:var(--diffs-diff-line-mix-target);&:where([data-gutter-buffer],[data-column-number]){color:var(--diffs-fg-number-addition-override,var(--diffs-addition-base));--diffs-diff-line-mix-target:var(--conflict-bg-current-number-override,var(--diffs-addition-base))}--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)))}&[data-merge-conflict=incoming]{--diffs-diff-line-mix-target:var(--conflict-bg-incoming-override,var(--diffs-modified-base));--diffs-hover-mix-target:var(--diffs-diff-line-mix-target);&:where([data-gutter-buffer],[data-column-number]){color:var(--diffs-modified-base);--diffs-diff-line-mix-target:var(--conflict-bg-incoming-number-override,var(--diffs-modified-base))}--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)))}}}[data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline],[data-editor-overlay]{--diffs-selection-mix-target:var(--diffs-bg-selection-override,var(--diffs-selection-base));--diffs-selection-emphasis-mix-target:var(--diffs-selection-mix-target);&:where([data-editor-overlay]),&:where([data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline])[data-selected-line]{--mix-selection-light:82%;--mix-selection-dark:75%;--diffs-hover-mix-target:var(--diffs-selection-mix-target)}&:where([data-gutter-buffer][data-selected-line],[data-column-number]:is([data-selected-line],[data-editor-active-line])){--mix-selection-light:75%;--mix-selection-dark:60%;--diffs-selection-mix-target:var(--diffs-bg-selection-number-override,var(--diffs-selection-base));--diffs-hover-mix-target:var(--diffs-selection-mix-target)}&:where([data-line][data-selected-line]):is([data-line-type=change-addition],[data-line-type=change-deletion]){--diffs-selection-emphasis-mix-target:light-dark(color-mix(in lab, var(--diffs-diff-line-mix-target,var(--diffs-selection-mix-target)) var(--mix-selection-light), var(--diffs-selection-mix-target)),var(--diffs-selection-mix-target))}&:where([data-editor-overlay]),&[data-selected-line]{--diffs-computed-selected-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-diff-line-bg) var(--mix-selection-light), var(--diffs-selection-mix-target)),color-mix(in lab, var(--diffs-computed-diff-line-bg) var(--mix-selection-dark), var(--diffs-selection-mix-target)))}}[data-line][data-editor-active-line],[data-column-number][data-editor-active-line]{--diffs-computed-editor-active-line-bg:color-mix(in lab, var(--diffs-computed-selected-line-bg) var(--diffs-editor-active-line-source-mix,100%), var(--diffs-selection-emphasis-mix-target))}@media (pointer:fine){[data-line][data-hovered],[data-gutter-buffer][data-hovered],[data-column-number][data-hovered],[data-line-annotation][data-hovered],[data-no-newline][data-hovered],[data-merge-conflict][data-hovered],[data-merge-conflict-actions][data-hovered],[data-editor-overlay][data-hovered]{--diffs-computed-hovered-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-editor-active-line-bg) 97%, var(--diffs-hover-mix-target)),color-mix(in lab, var(--diffs-computed-editor-active-line-bg) 91%, var(--diffs-hover-mix-target)))}}[data-gutter-buffer][data-selected-line],[data-column-number]:is([data-selected-line],[data-editor-active-line]){color:var(--diffs-selection-number-fg)}[data-no-newline]{user-select:none;& span{opacity:.6}}[data-diff-type=split][data-overflow=scroll]{grid-template-columns:1fr 1fr;display:grid;& [data-additions]{border-left:1px solid var(--diffs-bg)}& [data-deletions]{border-right:1px solid var(--diffs-bg)}}[data-code]{grid-auto-flow:dense;grid-template-columns:var(--diffs-code-grid);overflow:var(--diffs-overflow-override,scroll) clip;overscroll-behavior-x:none;tab-size:var(--diffs-tab-size,2);padding-top:var(--diffs-gap-block,var(--diffs-gap-fallback));padding-bottom:max(0px, calc(var(--diffs-gap-block,var(--diffs-gap-fallback)) - var(--diffs-scrollbar-gutter)));scrollbar-gutter:stable;align-self:flex-start;display:grid}[data-diffs-scrollbar-measure]{opacity:0;pointer-events:none;scrollbar-gutter:auto;grid-template-columns:none;width:100px;height:100px;padding:0;position:absolute;top:-200px;left:-200px}[data-container-size]{container-type:inline-size}[data-code]::-webkit-scrollbar{width:0;height:var(--diffs-scrollbar-gutter)}[data-code]::-webkit-scrollbar-track{background:0 0}[data-code]::-webkit-scrollbar-thumb{background-color:#0000;background-clip:content-box;border:1px solid #0000;border-radius:3px}[data-code]::-webkit-scrollbar-corner{background-color:#0000}@supports ((-moz-appearance:none)){[data-code]{scrollbar-width:thin;scrollbar-color:var(--diffs-bg-context) transparent;padding-bottom:var(--diffs-gap-block,var(--diffs-gap-fallback))}}[data-diffs-header]~[data-diff],[data-diffs-header]~[data-file]{& [data-code],&[data-overflow=wrap],&[data-dehydrated][data-diff-type=split][data-overflow=scroll]{padding-top:0}}[data-gutter]{grid-template-rows:subgrid;grid-template-columns:subgrid;z-index:3;background-color:var(--diffs-bg);grid-column:1;display:grid;position:relative;& [data-gutter-buffer],& [data-column-number]{border-right:var(--diffs-gap-style,2px solid var(--diffs-bg))}}[data-content]{grid-template-rows:subgrid;grid-template-columns:subgrid;background-color:var(--diffs-bg);grid-column:2;min-width:0;display:grid}[data-overflow=scroll]:not([data-dehydrated],[data-custom-styles],:has(>[data-code]>[contenteditable],>[data-code]>*>:is([data-line-annotation],[data-separator],[data-merge-conflict],[data-merge-conflict-actions])))>[data-code]{display:flex;&>[data-gutter]{flex-shrink:0;display:block}&>[data-content]{flex:1 0 max-content;display:block}}[data-diff-type=split][data-overflow=wrap],[data-dehydrated][data-diff-type=split][data-overflow=scroll]{grid-auto-flow:dense;grid-template-columns:repeat(2, var(--diffs-code-grid));padding-block:var(--diffs-gap-block,var(--diffs-gap-fallback));display:grid;& [data-code]{display:contents}& [data-deletions]{& [data-gutter]{grid-column:1}& [data-content]{border-right:1px solid var(--diffs-bg);grid-column:2}}& [data-additions]{& [data-gutter]{border-left:1px solid var(--diffs-bg);grid-column:3}& [data-content]{grid-column:4}}}[data-dehydrated][data-diff-type=split][data-overflow=scroll] [data-content]{overflow:clip}[data-overflow=scroll] [data-gutter]{position:sticky;left:0}[data-interactive-lines] [data-line]{cursor:pointer}[data-interactive-line-numbers] [data-column-number]{cursor:pointer;touch-action:none}[data-content-buffer],[data-gutter-buffer]{user-select:none;min-height:1lh;position:relative}[data-gutter-buffer]{padding-left:2ch;padding-right:1ch;&:before{content:"";min-width:var(--diffs-min-number-column-width,var(--diffs-min-number-column-width-default,3ch));display:block}}[data-gutter-buffer=annotation]{--diffs-annotation-bg:var(--diffs-bg-context-gutter);min-height:0}[data-gutter-buffer=buffer]{--diffs-line-bg:var(--diffs-bg-context-gutter)}[data-content-buffer]{background-position:5px 0;background-size:8px 8px;background-origin:border-box;background-image:repeating-linear-gradient(-45deg, transparent, transparent calc(3px * 1.414), var(--diffs-bg-buffer) calc(3px * 1.414), var(--diffs-bg-buffer) calc(4px * 1.414));grid-column:1}[data-separator]{box-sizing:content-box;background-color:var(--diffs-bg)}[data-separator=simple]{min-height:4px}[data-separator=line-info],[data-separator=line-info-basic],[data-separator=metadata],[data-separator=simple]{background-color:var(--diffs-bg-separator)}[data-separator=line-info],[data-separator=line-info-basic],[data-separator=metadata]{height:32px;position:relative}[data-separator-wrapper]{user-select:none;fill:currentColor;background-color:var(--diffs-bg);align-items:center;height:100%;display:flex;position:absolute;inset-inline:0}[data-content] [data-separator-wrapper]{display:none}[data-separator=metadata] [data-separator-wrapper]{background-color:var(--diffs-bg-separator);height:100%;color:var(--diffs-fg-number);white-space:nowrap;text-overflow:ellipsis;min-width:min-content;padding-inline:1ch;inset-inline:100% auto;overflow:hidden}[data-separator=line-info]{margin-block:var(--diffs-gap-block,var(--diffs-gap-fallback));& [data-separator-wrapper]{min-width:16px}}[data-separator=line-info-basic],[data-separator=metadata]{margin-block:0}[data-separator=line-info][data-separator-first]{margin-top:0}[data-separator=line-info][data-separator-last]{margin-bottom:0}[data-expand-index] [data-separator-wrapper]{grid-template-columns:32px auto;display:grid}[data-expand-index] [data-separator-wrapper][data-separator-multi-button]{grid-template-columns:32px 32px auto}[data-expand-button],[data-separator-content]{background-color:var(--diffs-bg-separator);flex:none;align-items:center;display:flex}[data-expand-index] [data-separator-content]:hover{cursor:pointer;text-decoration:underline}[data-expand-button]{cursor:pointer;min-width:32px;color:var(--diffs-fg-number);border-right:2px solid var(--diffs-bg);flex-shrink:0;justify-content:center;align-self:stretch;&:hover{color:var(--diffs-fg)}&[data-expand-all-button]{display:none}}[data-expand-down] [data-icon]{transform:scaleY(-1)}[data-separator-content]{height:100%;color:var(--diffs-fg-number);flex:auto;justify-content:flex-start;padding:0 1ch;overflow:hidden}[data-separator=line-info],[data-separator=line-info-basic]{& [data-separator-content]{user-select:none;height:100%;overflow:clip}}[data-unmodified-lines]{text-overflow:ellipsis;white-space:nowrap;flex:0 auto;min-width:0;display:block;overflow:hidden}@supports (width:1cqi){[data-unified]{& [data-separator=line-info] [data-separator-wrapper]{padding-inline:var(--diffs-gap-inline,var(--diffs-gap-fallback));width:100cqi;& [data-separator-content]{border-radius:6px}}& [data-separator=line-info][data-expand-index] [data-separator-wrapper] [data-separator-content]{border-top-left-radius:unset;border-bottom-left-radius:unset}}[data-gutter]{& [data-separator=line-info] [data-separator-wrapper]{padding-left:var(--diffs-gap-inline,var(--diffs-gap-fallback))}& [data-separator=line-info] [data-separator-content]{border-top-left-radius:6px;border-bottom-left-radius:6px}& [data-separator=line-info][data-expand-index] [data-separator-content]{border-top-left-radius:unset;border-bottom-left-radius:unset}}[data-additions]{& [data-content] [data-separator=line-info]{background-color:var(--diffs-bg);& [data-separator-wrapper]{display:none}}& [data-gutter] [data-separator=line-info] [data-separator-wrapper]{background-color:var(--diffs-bg-separator);border-top-right-radius:6px;border-bottom-right-radius:6px;height:100%;display:block;& [data-separator-content],& [data-expand-button]{display:none}}}[data-overflow=scroll] [data-additions] [data-gutter] [data-separator=line-info] [data-separator-wrapper]{width:calc(100cqi - var(--diffs-gap-inline,var(--diffs-gap-fallback)))}[data-overflow=wrap] [data-additions] [data-content] [data-separator=line-info] [data-separator-wrapper]{background-color:var(--diffs-bg-separator);height:100%;margin-right:var(--diffs-gap-inline,var(--diffs-gap-fallback));border-top-right-radius:6px;border-bottom-right-radius:6px;display:block;& [data-separator-content],& [data-expand-button]{display:none}}[data-separator=line-info] [data-separator-wrapper]{& [data-expand-both],& [data-expand-down],& [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:6px}}@media (pointer:fine){[data-separator=line-info] [data-separator-wrapper]{&[data-separator-multi-button]{& [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:unset}& [data-expand-down]{border-bottom-left-radius:6px;border-top-left-radius:unset}}}}}@media (pointer:coarse){[data-separator=line-info-basic] [data-separator-wrapper][data-separator-multi-button]{grid-template-columns:34px 34px auto;& [data-separator-content]{grid-column:unset;grid-row:unset}}@supports (width:1cqi){[data-separator=line-info] [data-separator-wrapper]{& [data-expand-both],& [data-expand-down],& [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:6px}&[data-separator-multi-button]{& [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:6px}& [data-expand-down]{border-bottom-left-radius:unset;border-top-left-radius:unset}}}}}@media (pointer:fine){[data-separator-wrapper][data-separator-multi-button]{grid-template-rows:50% 50%;display:grid;& [data-separator-content]{grid-area:1/2/-1;min-width:min-content}& [data-expand-button]{grid-column:1}}[data-separator=line-info] [data-separator-wrapper],[data-separator=line-info] [data-separator-wrapper][data-separator-multi-button]{grid-template-columns:34px auto}[data-separator=line-info-basic][data-expand-index] [data-separator-wrapper]{grid-template-columns:100% auto}[data-separator=line-info],[data-separator=line-info-basic]{& [data-separator-multi-button]{& [data-expand-up]{border-bottom:1px solid var(--diffs-bg);border-right:2px solid var(--diffs-bg)}& [data-expand-down]{border-top:1px solid var(--diffs-bg);border-right:2px solid var(--diffs-bg)}}}}[data-additions] [data-gutter] [data-separator-wrapper],[data-additions] [data-separator=line-info-basic] [data-separator-wrapper],[data-content] [data-separator-wrapper]{display:none}[data-line-annotation]{min-height:var(--diffs-annotation-min-height,0);z-index:2}[data-merge-conflict-actions]{z-index:2}[data-separator=custom]{grid-template-columns:subgrid;display:grid}[data-line],[data-column-number],[data-no-newline]{padding-inline:1ch;position:relative}[data-indicators=classic] [data-line]{padding-inline-start:2ch}[data-indicators=classic]{& [data-line-type=change-addition],& [data-line-type=change-deletion]{&[data-no-newline],&[data-line]{&:before{user-select:none;width:1ch;height:1lh;display:inline-block;position:absolute;top:0;left:0}}}& [data-line-type=change-addition]{&[data-line],&[data-no-newline]{&:before{content:"+";color:var(--diffs-addition-base)}}}& [data-line-type=change-deletion]{&[data-line],&[data-no-newline]{&:before{content:"-";color:var(--diffs-deletion-base)}}}}[data-indicators=bars]{& [data-line-type=change-deletion],& [data-line-type=change-addition]{&[data-column-number]{&:before{content:"";user-select:none;contain:strict;width:4px;height:100%;display:block;position:absolute;top:0;left:0}}}& [data-line-type=change-deletion]{&[data-column-number]{&:before{background-image:linear-gradient(0deg, var(--diffs-bg-deletion) 50%, var(--diffs-deletion-base) 50%);background-repeat:repeat;background-size:2px 2px;background-size:calc(1lh / round(1lh / 2px)) calc(1lh / round(1lh / 2px))}}}& [data-line-type=change-addition]{&[data-column-number]{&:before{background-color:var(--diffs-addition-base)}}}}[data-overflow=wrap]{& [data-line]{white-space:pre-wrap;word-break:break-word}& [data-annotation-content]{word-break:break-word}}[data-overflow=scroll] [data-line]{white-space:pre;min-height:1lh}[data-overflow=scroll] [data-column-number]{min-height:1lh}[data-column-number]{box-sizing:content-box;text-align:right;user-select:none;color:var(--diffs-fg-number);padding-left:2ch}[data-line-number-content]{min-width:var(--diffs-min-number-column-width,var(--diffs-min-number-column-width-default,3ch));z-index:1;display:inline-block;position:relative}[data-disable-line-numbers]{& [data-gutter-buffer],& [data-column-number]{min-width:4px;padding:0;&:before{min-width:0}}& [data-line-number-content]{display:none}& [data-gutter-utility-slot]{right:unset;justify-content:flex-start;left:0}&[data-indicators=bars] [data-gutter-utility-slot]{left:6px}}[data-file][data-disable-line-numbers]{& [data-gutter-buffer],& [data-column-number]{border-right:0;min-width:0}}[data-diff-span]{box-decoration-break:clone;border-radius:3px}[data-line-type=change-addition] [data-diff-span]{background-color:var(--diffs-bg-addition-emphasis)}[data-line-type=change-deletion] [data-diff-span]{background-color:var(--diffs-bg-deletion-emphasis)}[data-merge-conflict=marker-start],[data-merge-conflict=marker-base],[data-merge-conflict=marker-separator],[data-merge-conflict=marker-end]{color:var(--diffs-fg);padding-left:1ch}[data-merge-conflict=marker-start],[data-merge-conflict=marker-end]{align-items:center;display:flex;&:after{color:var(--diffs-fg-conflict-marker);font-size:.75rem;font-style:normal;line-height:1.25rem;font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback));padding-left:1ch}}[data-merge-conflict=marker-start]:after{content:"(Current Change)"}[data-merge-conflict=marker-end]:after{content:"(Incoming Change)"}[data-merge-conflict-actions-content]{min-height:1.75rem;font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback));color:var(--diffs-fg);align-items:center;gap:.25rem;padding-inline:.5rem;font-size:.75rem;line-height:1.2;display:flex}[data-merge-conflict-action]{appearance:none;color:var(--diffs-fg-number);font:inherit;cursor:pointer;background:0 0;border:0;padding:0;font-style:normal}[data-merge-conflict-action]:hover{color:var(--diffs-fg)}[data-merge-conflict-action=current]:hover{color:var(--diffs-addition-base)}[data-merge-conflict-action=incoming]:hover{color:var(--diffs-modified-base)}[data-merge-conflict-action-separator]{color:var(--diffs-fg-number);opacity:.6;user-select:none}[data-diffs-header=default]{background-color:var(--diffs-bg);justify-content:space-between;align-items:center;gap:var(--diffs-gap-inline,var(--diffs-gap-fallback));min-height:calc(1lh + (var(--diffs-gap-block,var(--diffs-gap-fallback)) * 3));z-index:2;flex-direction:row;padding-inline:16px;display:flex;position:relative;top:0}[data-header-content]{align-items:center;gap:var(--diffs-gap-inline,var(--diffs-gap-fallback));white-space:nowrap;flex-direction:row;min-width:0;display:flex}[data-header-content] [data-prev-name],[data-header-content] [data-title]{text-overflow:ellipsis;white-space:nowrap;direction:rtl;min-width:0;overflow:hidden}[data-prev-name]{opacity:.7}[data-rename-icon]{fill:currentColor;flex-grow:0;flex-shrink:0}[data-diffs-header=default] [data-metadata]{white-space:nowrap;align-items:center;gap:1ch;display:flex}[data-diffs-header=default] [data-additions-count]{font-family:var(--diffs-font-family,var(--diffs-font-fallback));color:var(--diffs-addition-base)}[data-diffs-header=default] [data-deletions-count]{font-family:var(--diffs-font-family,var(--diffs-font-fallback));color:var(--diffs-deletion-base)}[data-change-icon]{fill:currentColor;flex-shrink:0}[data-change-icon=change],[data-change-icon=rename-pure],[data-change-icon=rename-changed]{color:var(--diffs-modified-base)}[data-change-icon=new]{color:var(--diffs-addition-base)}[data-change-icon=deleted]{color:var(--diffs-deletion-base)}[data-change-icon=file]{opacity:.6}[data-annotation-content]{z-index:2;isolation:isolate;white-space:normal;align-self:flex-start;min-width:0;display:flow-root;position:relative}[data-overflow=scroll] [data-annotation-content],[data-overflow=scroll] [data-merge-conflict-actions-content]{width:var(--diffs-column-content-width,auto);left:var(--diffs-column-number-width,0);position:sticky}[data-annotation-slot]{text-wrap-mode:wrap;word-break:normal;white-space-collapse:collapse}[data-gutter-utility-slot]{touch-action:none;justify-content:flex-end;display:flex;position:absolute;top:0;bottom:0;right:0}[data-utility-button]{appearance:none;cursor:pointer;width:1lh;height:1lh;font-size:var(--diffs-font-size,13px);line-height:var(--diffs-line-height,20px);background-color:var(--diffs-modified-base);color:var(--diffs-bg);fill:currentColor;z-index:4;touch-action:none;border:none;border-radius:4px;justify-content:center;align-items:center;margin-right:calc(-1lh + 1ch);padding:0;display:flex;position:relative;&:before{content:"";display:block;position:absolute;inset:0 0 0 -4px}}[data-decoration-bar-stack]{pointer-events:none;isolation:isolate;z-index:1;background-color:var(--diffs-decoration-bar-color,transparent);box-sizing:content-box;border-left:2px solid var(--diffs-bg);border-right:2px solid var(--diffs-bg);width:6px;position:absolute;top:0;bottom:0;right:-2px;[data-decoration-bar-depth="1"] &{background-color:color-mix(in lab, var(--diffs-bg) 20%, var(--diffs-decoration-bar-color,transparent))}[data-decoration-bar-depth="2"] &{background-color:color-mix(in lab, var(--diffs-bg) 45%, var(--diffs-decoration-bar-color,transparent))}[data-decoration-bar-depth="3"] &{background-color:color-mix(in lab, var(--diffs-bg) 65%, var(--diffs-decoration-bar-color,transparent))}[data-decoration-bar-start] &{border-top-left-radius:5px;border-top-right-radius:5px}[data-decoration-bar-end] &{z-index:3;border-bottom-right-radius:5px;border-bottom-left-radius:5px}}[data-placeholder]{contain:strict}[data-error-wrapper]{padding:var(--diffs-gap-block,var(--diffs-gap-fallback)) var(--diffs-gap-inline,var(--diffs-gap-fallback));scrollbar-width:none;max-height:400px;overflow:auto;& [data-error-message]{color:var(--diffs-deletion-base);font-size:18px;font-weight:700}& [data-error-stack]{color:var(--diffs-fg-number)}}}@layer theme,rendered,unsafe;
|
|
146
|
+
`,NL;function PL(e){if(NL!=null)return NL;let t=e.host;if(typeof HTMLElement<`u`&&t instanceof HTMLElement&&!t.isConnected)return;let n=document.createElement(`div`);n.setAttribute(`data-code`,``),n.setAttribute(Yr,`true`);let r=document.createElement(`div`);return r.style.position=`relative`,r.style.width=`200%`,r.style.height=`200%`,n.appendChild(r),e.appendChild(n),NL=Math.max(n.offsetHeight-n.clientHeight,0),n.remove(),NL}function FL(e){let t=e==null?`var(--diffs-scrollbar-gutter-fallback)`:`${e}px`;return`${Qr}: ${t};`}var IL=`@layer base, theme, rendered, unsafe;`,LL=RegExp(`${VL(Qr)}\\s*:\\s*[^;]+;`);function RL(e){return`${IL}
|
|
147
|
+
@layer unsafe {
|
|
148
|
+
${e}
|
|
149
|
+
}`}function zL(e,t=`system`,n){let r=t===`system`?``:`
|
|
150
|
+
color-scheme: ${t};`,i=FL(n);return`${IL}
|
|
151
|
+
@layer base {
|
|
152
|
+
${(t===`system`?[`light`,`dark`]:[t]).map(e=>{let n=`
|
|
153
|
+
[data-line] span, [data-edit-prediction-suffix] span {
|
|
154
|
+
font-weight: var(--diffs-token-${e}-font-weight, inherit);
|
|
155
|
+
font-style: var(--diffs-token-${e}-font-style, inherit);
|
|
156
|
+
text-decoration: var(--diffs-token-${e}-text-decoration, inherit);
|
|
157
|
+
}`;return t===`system`&&e===`dark`?`@media (prefers-color-scheme: dark) {${n}\n}`:n}).join(`
|
|
158
|
+
`)}
|
|
159
|
+
}
|
|
160
|
+
@layer rendered {
|
|
161
|
+
:host {${r}
|
|
162
|
+
${i}
|
|
163
|
+
${e}
|
|
164
|
+
}
|
|
165
|
+
}`}function BL(e,t){let n=FL(t);return e.replace(LL,n)}function VL(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}var HL=new WeakMap;function UL(e){return HL.get(e)??e}function WL({code:e,pre:t,columnType:n,rowSpan:r,containerSize:i=!1}={}){return e??(e=document.createElement(`code`),e.setAttribute(`data-code`,``),n!=null&&e.setAttribute(`data-${n}`,``),t?.appendChild(e)),r==null?e.style.removeProperty(`grid-row`):e.style.setProperty(`grid-row`,`span ${r}`),i?e.setAttribute(`data-container-size`,``):e.removeAttribute(`data-container-size`),e}function GL(e,t){if(t==null)return;let n=e.shadowRoot??e.attachShadow({mode:`open`});n.innerHTML===``&&(n.innerHTML=t)}function KL(e,{type:t,diffIndicators:n,disableBackground:r,disableLineNumbers:i,overflow:a,split:o,totalLines:s,customProperties:c}){if(c!=null)for(let t in c){let n=c[t];n!=null&&e.setAttribute(t,`${n}`)}switch(t===`diff`?(e.setAttribute(`data-diff`,``),e.removeAttribute(`data-file`)):(e.setAttribute(`data-file`,``),e.removeAttribute(`data-diff`)),n){case`bars`:case`classic`:e.setAttribute(`data-indicators`,n);break;case`none`:e.removeAttribute(`data-indicators`)}return i?e.setAttribute(`data-disable-line-numbers`,``):e.removeAttribute(`data-disable-line-numbers`),r?e.removeAttribute(`data-background`):e.setAttribute(`data-background`,``),t===`diff`?e.setAttribute(`data-diff-type`,o?`split`:`single`):e.removeAttribute(`data-diff-type`),e.setAttribute(`data-overflow`,a),e.style.setProperty(`--diffs-min-number-column-width-default`,`${`${s}`.length}ch`),e}function qL(e){if(typeof HTMLStyleElement<`u`&&e instanceof HTMLStyleElement)return!0;let t=e.tagName??e.nodeName;return typeof t==`string`&&t.toLowerCase()===`style`}var JL=void 0;function YL(){return JL??=`safari`in window&&`pushNotification`in window.safari||/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function XL(e,t,n){let r=new Map;for(let i of e){let e=UL(i);r.set(e,n?.slotNames.get(e)??t(i))}return{provided:e,current:e,slotNames:r}}function ZL(e,t,n){for(let r of t){let t=UL(r);e.slotNames.has(t)||e.slotNames.set(t,n(r))}e.provided=t,e.current=t}function QL(e,t,n){if(e==null)return n(t);let r=UL(t),i=e.slotNames.get(r);return i??(i=n(t),e.slotNames.set(r,i)),i}function $L(e){return e?.useTokenTransformer===!0||e?.onTokenClick!=null||e?.onTokenEnter!=null||e?.onTokenLeave!=null}function eR(e,t){let n=e?.offsetHeight??0;if(e==null||n===0)t();else{e.style.minHeight=`${n}px`;try{t(),e.offsetHeight}finally{e.style.minHeight=``}}}function tR({shadowRoot:e,currentNode:t,themeCSS:n}){if(n.trim()===``)t?.remove();else return t??=nR(),t.textContent=n,t.parentNode!==e&&e.appendChild(t),t}function nR(){let e=document.createElement(`style`);return e.setAttribute(Rr,``),e}var rR=class extends Error{constructor(){super(`WorkerPoolManager: operation canceled because the pool terminated`),this.name=`WorkerPoolTerminatedError`}},iR=class extends Error{constructor(){super(`WorkerPoolManager: operation canceled before the task completed`),this.name=`WorkerPoolTaskCanceledError`}},aR=class extends Error{constructor(e,t){super(e,t),this.name=`WorkerPoolWorkerError`}},oR=new WeakSet;function sR(e){return e instanceof rR||e instanceof iR}function cR(e){return sR(e)||e instanceof aR&&oR.has(e)}if(typeof HTMLElement<`u`&&customElements.get(`diffs-container`)==null){let e;class t extends HTMLElement{constructor(){if(super(),this.shadowRoot!=null)return;let t=this.attachShadow({mode:`open`});e??(e=new CSSStyleSheet,e.replaceSync(ML)),t.adoptedStyleSheets=[e]}connectedCallback(){PL(this.shadowRoot??this.attachShadow({mode:`open`}))}}customElements.define(Kr,t)}function lR(e){return{...Wr,...e}}function uR(e,t){return dR(e,t)+fR(e,t)}function dR(e,t){return t?0:e.diffHeaderHeight}function fR(e,t){return e.paddingTop??(t?e.spacing:0)}function pR(e){return e.paddingBottom??e.spacing}function mR(e){switch(e){case`simple`:return 4;case`metadata`:case`line-info`:case`line-info-basic`:case`custom`:return 32}}function hR(e,t){return e?.cacheKey!=null||t?.cacheKey!=null?e?.cacheKey===t?.cacheKey:e===t}function gR(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function _R(e){return e.map(e=>({...e,hunkContent:e.hunkContent.map(e=>({...e}))}))}function vR(e){return{...e,hunks:_R(e.hunks),deletionLines:[...e.deletionLines],additionLines:[...e.additionLines]}}function yR(e,t){return e-(t===0?0:1)}function bR(e,t){return yR(e,t)+t}var xR=1;function SR(e,...t){return`ck${xR}:${JSON.stringify([e,...t])}`}function CR(e){return e===``?[]:e.split(ri)}function wR(e,t,n){let r=e===`clone`?vR(t):t;if(!r.isPartial)throw Error(`hydratePartialDiff: fileDiff must be partial`);switch(r.type){case`change`:case`rename-changed`:return TR(r,DR(r,n),OR(r,n));case`rename-pure`:{let e=OR(r,n);kR(r,n);let t=CR(e.contents);return r.isPartial=!1,r.deletionLines=t,r.additionLines=t,r.deletionCharacterCount=e.contents.length,r.additionCharacterCount=e.contents.length,jR(r,null,e),r}}throw Error(`hydratePartialDiff: ${r.type} diffs cannot be hydrated from loaded files`)}function TR(e,t,n){let r=CR(t.contents),i=CR(n.contents),{hunks:a,splitLineCount:o,unifiedLineCount:s}=ER(e.hunks,i.length);return e.hunks=a,e.splitLineCount=o,e.unifiedLineCount=s,e.isPartial=!1,e.deletionLines=r,e.additionLines=i,e.deletionCharacterCount=t.contents.length,e.additionCharacterCount=n.contents.length,jR(e,t,n),e}function ER(e,t){let n=0,r=0,i=0,a=[];for(let t of e){let e=Math.max(t.additionStart-1,0),o=Math.max(t.deletionStart-1,0),s=e,c=o,l=0,u=0,d=0,f=0,p=[];for(let e of t.hunkContent)e.type===`context`?(p.push({...e,additionLineIndex:s,deletionLineIndex:c}),s+=e.lines,c+=e.lines,d+=e.lines,f+=e.lines):(p.push({...e,additionLineIndex:s,deletionLineIndex:c}),s+=e.additions,c+=e.deletions,l+=e.additions,u+=e.deletions,d+=Math.max(e.additions,e.deletions),f+=e.additions+e.deletions);let m=Math.max(yR(t.additionStart,t.additionCount)-i,0);a.push({...t,collapsedBefore:m,additionLineIndex:e,deletionLineIndex:o,additionLines:l,deletionLines:u,hunkContent:p,splitLineStart:n+m,unifiedLineStart:r+m,splitLineCount:d,unifiedLineCount:f}),n+=m+d,r+=m+f,i=bR(t.additionStart,t.additionCount)}if(a.length>0){let e=a[a.length-1],i=bR(e.additionStart,e.additionCount),o=Math.max(t-i,0);n+=o,r+=o}return{hunks:a,splitLineCount:n,unifiedLineCount:r}}function DR(e,t){if(t.oldFile==null)throw Error(`hydratePartialDiff: ${e.type} diff for ${e.name} requires oldFile`);return t.oldFile}function OR(e,t){if(t.newFile==null)throw Error(`hydratePartialDiff: ${e.type} diff for ${e.name} requires newFile`);return t.newFile}function kR(e,t){if(t.oldFile!==null)throw Error(`hydratePartialDiff: ${e.type} diff for ${e.name} requires oldFile to be null`)}function AR(e,t,n){return e.cacheKey==null?MR(t,n):`${e.cacheKey}:hydrated`}function jR(e,t,n){let r=AR(e,t,n);r==null?delete e.cacheKey:e.cacheKey=r}function MR(e,t){return e!=null&&t!=null?e.cacheKey!=null&&t.cacheKey!=null?SR(`hydrated-files`,e.cacheKey,t.cacheKey):void 0:e?.cacheKey??t?.cacheKey}function NR(e){let t=e.length;return e.charCodeAt(t-1)===10&&(t--,e.charCodeAt(t-1)===13&&t--),e.slice(0,t)}var PR=new TextEncoder,FR=new TextDecoder(`utf-8`,{ignoreBOM:!0}),IR=/[\uD800-\uDFFF]/,LR=1024,RR=new Uint8Array(LR);function zR(){RR.length!==LR&&(RR=new Uint8Array(LR))}function BR(e){if(e.length===0)return e;if(IR.test(e))return JSON.parse(JSON.stringify(e));let t=e.length*3;RR.length<t&&(RR=new Uint8Array(t));let{written:n}=PR.encodeInto(e,RR);return FR.decode(RR.subarray(0,n))}var VR=new TextDecoder(`utf-8`,{ignoreBOM:!0}),HR={'"':`"`,"\\":`\\`,a:`\x07`,b:`\b`,t:` `,n:`
|
|
166
|
+
`,v:`\v`,f:`\f`,r:`\r`};function UR(e){if(e[0]!==`"`)return;let t=``,n=1;for(;n<e.length;){let r=e[n];if(r===`"`)return{fileName:t,rawLength:n+1};if(r!==`\\`){t+=r,n++;continue}let i=HR[e[n+1]];if(i!=null){t+=i,n+=2;continue}let a=[];do{let t=WR(e,n+1);if(t==null)return;a.push(t),n+=4}while(e[n]===`\\`&&e[n+1]>=`0`&&e[n+1]<=`7`);t+=VR.decode(new Uint8Array(a))}}function WR(e,t){let n=e.charCodeAt(t)-48,r=e.charCodeAt(t+1)-48,i=e.charCodeAt(t+2)-48;if(n>=0&&n<=3&&r>=0&&r<=7&&i>=0&&i<=7)return n*64+r*8+i}var GR=4096,KR=.5;function qR(e){for(let t of e.hunks)for(let n=0;n<t.hunkContent.length;n++){let r=t.hunkContent[n];if(r.type!==`change`)continue;let i=YR(e,r);i!=null&&(t.hunkContent.splice(n,1,...i),n+=i.length-1)}}function JR(e,t,n){let{hunkContent:r}=e;for(let e=1;e<r.length;e++){let i=r[e],a=r[e-1];if(i.type!==`change`||i.additions>0&&i.deletions>0||a.type!==`context`)continue;let o=i.additions>0,s=o?t.additionLines:t.deletionLines,c=o?i.additionLineIndex:i.deletionLineIndex,l=o?i.additions:i.deletions,u=s[c]??``;if(u.trim()!==``)continue;let d=!0;for(let e=1;e<l;e++)if(s[c+e]!==u){d=!1;break}if(!d)continue;let f=0;for(;f<a.lines&&t.additionLines[a.additionLineIndex+a.lines-1-f]===u;)f++;if(f===0||e===1&&f===a.lines||n!=null&&(f=n(i,f),f===0))continue;i.additionLineIndex-=f,i.deletionLineIndex-=f;let p=i.additionLineIndex+i.additions,m=i.deletionLineIndex+i.deletions,h=r[e+1];h?.type===`context`?(h.lines+=f,h.additionLineIndex=p,h.deletionLineIndex=m):r.splice(e+1,0,{type:`context`,lines:f,additionLineIndex:p,deletionLineIndex:m}),a.lines-=f,a.lines===0&&(r.splice(e-1,1),e--)}}function YR(e,t){let{deletions:n,additions:r,deletionLineIndex:i,additionLineIndex:a}=t,o=Math.min(n,r),s=Math.abs(r-n);if(o===0||s===0||o*(s+1)>GR)return null;let c=[];for(let t=0;t<n;t++)c.push(ZR(e.deletionLines[i+t]??``));let l=[];for(let t=0;t<r;t++)l.push(ZR(e.additionLines[a+t]??``));let u=r>n,d=0,f=-1;for(let e=0;e<=s;e++){let t=0;for(let n=0;n<o;n++)t+=QR(c[n+(u?0:e)],l[n+(u?e:0)]);e===0?f=t+o*KR:t>f&&(f=t,d=e)}if(d===0)return null;let p=[],m=(e,t,n,r)=>{(e>0||t>0)&&p.push({type:`change`,deletions:e,additions:t,deletionLineIndex:n,additionLineIndex:r})};return u?(m(0,d,i,a),m(o,o,i,a+d),m(0,r-o-d,i+o,a+d+o)):(m(d,0,i,a),m(o,o,i+d,a),m(n-o-d,0,i+d+o,a+o)),p}var XR=/\s+/g;function ZR(e){return e.replace(XR,``)}function QR(e,t){if(e===t)return 1;let n=Math.max(e.length,t.length),r=Math.min(e.length,t.length);if(r===0)return 0;let i=0;for(;i<r&&e[i]===t[i];)i++;let a=0;for(;a<r-i&&e[e.length-1-a]===t[t.length-1-a];)a++;return(i+a)/n}var $R=/^diff --git ("a\/(?:[^"\\]|\\.)*"|a\/.+?) ("b\/(?:[^"\\]|\\.)*"|b\/.+?)$/;function ez(e,t,n=!1,r){let i=yz(e),a=i?cz(e):lz(e),o,s=[];for(let e of a){if(i&&!ai.test(e)||!i&&!uz(e)){if(o==null)o=BR(e);else if(n)throw Error(`parsePatchContent: unknown file blob`);else console.error(`parsePatchContent: unknown file blob:`,e);continue}let a=nz(e,{cacheKey:t==null?void 0:r==null?SR(`patch-file`,t,String(s.length)):SR(`patch-file`,t,String(r),String(s.length)),isGitDiff:i,throwOnError:n});a!=null&&s.push(a)}return{patchMetadata:o,files:s}}function tz(e,t){try{return nz(e,t)}finally{zR()}}function nz(e,{cacheKey:t,isGitDiff:n=ai.test(e),oldFile:r,newFile:i,throwOnError:a=!1}={}){let o=0,s=bz(e,`@@ `),c,l=r==null||i==null,u=0,d=0;for(let e of s){let s=sz(e),f=s[0];if(f==null){if(a)throw Error(`parsePatchContent: invalid hunk`);console.error(`parsePatchContent: invalid hunk`,e);continue}let p=gz(f),m=0,h=0;if(p==null||c==null){if(c!=null){if(a)throw Error(`parsePatchContent: Invalid hunk`);console.error(`parsePatchContent: Invalid hunk`,e);continue}c={name:``,type:`change`,hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:l,additionLines:!l&&r!=null&&i!=null?oz(i.contents):[],deletionLines:!l&&r!=null&&i!=null?oz(r.contents):[],additionCharacterCount:!l&&r!=null&&i!=null?i.contents.length:0,deletionCharacterCount:!l&&r!=null&&i!=null?r.contents.length:0,cacheKey:Sz(t)},c.additionLines.length===1&&i?.contents===``&&(c.additionLines.length=0),c.deletionLines.length===1&&r?.contents===``&&(c.deletionLines.length=0);for(let e of s){if(e.startsWith(`diff --git`)){let t=e.trim().match($R);if(t==null){if(a)throw Error(`parsePatchContent: invalid git diff header`);console.error(`parsePatchContent: invalid git diff header`,e);continue}let n=iz(t[1],!0),r=iz(t[2],!0);c.name=BR(r),n!==r&&(c.prevName=BR(n));continue}let t=e.startsWith(`---`)||e.startsWith(`+++`)?e.match(ni):null;if(t!=null){let[,e,r]=t,i=iz(r,n);if(e===`---`&&i!==`/dev/null`){let e=BR(i);c.prevName=e,c.name=e}else e===`+++`&&i!==`/dev/null`&&(c.name=BR(i))}else if(n){if(e.startsWith(`new mode `)&&(c.mode=BR(e.slice(8).trim())),e.startsWith(`old mode `)&&(c.prevMode=BR(e.slice(8).trim())),e.startsWith(`new file mode`)&&(c.type=`new`,c.mode=BR(e.slice(13).trim())),e.startsWith(`deleted file mode`)&&(c.type=`deleted`,c.mode=BR(e.slice(17).trim())),e.startsWith(`similarity index`)&&(e.startsWith(`similarity index 100%`)?c.type=`rename-pure`:c.type=`rename-changed`),e.startsWith(`index `)){let[,t,n,r]=e.trim().match(Fr)??[];t!=null&&(c.prevObjectId=BR(t)),n!=null&&(c.newObjectId=BR(n)),r!=null&&(c.mode=BR(r))}(e.startsWith(`rename from `)||e.startsWith(`copy from `))&&(c.prevName=BR(iz(e.slice(e.startsWith(`rename`)?12:10)))),(e.startsWith(`rename to `)||e.startsWith(`copy to `))&&(c.name=BR(iz(e.slice(e.startsWith(`rename`)?10:8))))}}continue}let g,_;for(;s.length>0&&(s[s.length-1]===`
|
|
167
|
+
`||s[s.length-1]===`\r`||s[s.length-1]===`\r
|
|
168
|
+
`||s[s.length-1]===``);)s.pop();let{additionStart:v,deletionStart:y}=p;u=l?u:y-1,d=l?d:v-1;let b={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:p.additionCount,additionStart:v,additionLines:m,deletionCount:p.deletionCount,deletionStart:y,deletionLines:h,deletionLineIndex:u,additionLineIndex:d,hunkContent:[],hunkContext:Sz(p.hunkContext),hunkSpecs:BR(f),noEOFCRAdditions:!1,noEOFCRDeletions:!1},x=0,S=0;for(let e=1;e<s.length;e++){let t=s[e];if(x>=b.additionCount&&S>=b.deletionCount&&!t.startsWith(`\\`)){if(!mz(t)||hz(t))break;if(a)throw Error(`parsePatchContent: hunk has more lines than expected`)}let n=t[0];if(n!==`+`&&n!==`-`&&n!==` `&&n!==`\\`){if(a)throw Error(`parsePatchContent: invalid hunk line`);console.error(`parseLineType: Invalid firstChar: "${n}", full line: "${t}"`),console.error(`processFile: invalid rawLine:`,t);continue}let r=Cz(n);if(r===`addition`){if(a&&x>=b.additionCount)throw Error(`parsePatchContent: hunk has too many addition lines`);let e=wz(t);(g==null||g.type!==`change`)&&(g=Tz(`change`,u,d),b.hunkContent.push(g)),d++,x++,l&&(c.additionLines.push(e),c.additionCharacterCount+=e.length),g.additions++,m++,_=`addition`}else if(r===`deletion`){if(a&&S>=b.deletionCount)throw Error(`parsePatchContent: hunk has too many deletion lines`);let e=wz(t);(g==null||g.type!==`change`)&&(g=Tz(`change`,u,d),b.hunkContent.push(g)),u++,S++,l&&(c.deletionLines.push(e),c.deletionCharacterCount+=e.length),g.deletions++,h++,_=`deletion`}else if(r===`context`){if(a&&(S>=b.deletionCount||x>=b.additionCount))throw Error(`parsePatchContent: hunk has too many context lines`);let e=wz(t);(g==null||g.type!==`context`)&&(g=Tz(`context`,u,d),b.hunkContent.push(g)),d++,u++,x++,S++,l&&(c.deletionLines.push(e),c.additionLines.push(e),c.deletionCharacterCount+=e.length,c.additionCharacterCount+=e.length),g.lines++,_=`context`}else if(r===`metadata`&&g!=null){if(g.type===`context`?(b.noEOFCRAdditions=!0,b.noEOFCRDeletions=!0):_===`deletion`?b.noEOFCRDeletions=!0:_===`addition`&&(b.noEOFCRAdditions=!0),l&&(_===`addition`||_===`context`)){let e=c.additionLines.length-1;if(e>=0){let t=c.additionLines[e],n=NR(t);c.additionLines[e]=n,c.additionCharacterCount+=n.length-t.length}}if(l&&(_===`deletion`||_===`context`)){let e=c.deletionLines.length-1;if(e>=0){let t=c.deletionLines[e],n=NR(t);c.deletionLines[e]=n,c.deletionCharacterCount+=n.length-t.length}}}}if(x!==b.additionCount||S!==b.deletionCount){if(a)throw Error(`parsePatchContent: hunk line count mismatch`);console.error(`parsePatchContent: hunk line count mismatch: "${f.trimEnd()}", declared old/new ${b.deletionCount}/${b.additionCount}, parsed old/new ${S}/${x}`);let e=yR(b.additionStart,b.additionCount)+(x===0?0:1),t=yR(b.deletionStart,b.deletionCount)+(S===0?0:1);if(!l){let n=e-b.additionStart,r=t-b.deletionStart;b.additionLineIndex+=n,b.deletionLineIndex+=r;for(let e of b.hunkContent)e.additionLineIndex+=n,e.deletionLineIndex+=r}b.additionStart=e,b.deletionStart=t,b.additionCount=x,b.deletionCount=S}b.additionLines=m,b.deletionLines=h,b.collapsedBefore=Math.max(yR(b.additionStart,b.additionCount)-o,0),c.hunks.push(b),o=bR(b.additionStart,b.additionCount);for(let e of b.hunkContent)e.type===`context`?(b.splitLineCount+=e.lines,b.unifiedLineCount+=e.lines):(b.splitLineCount+=Math.max(e.additions,e.deletions),b.unifiedLineCount+=e.deletions+e.additions);b.splitLineStart=c.splitLineCount+b.collapsedBefore,b.unifiedLineStart=c.unifiedLineCount+b.collapsedBefore,c.splitLineCount+=b.collapsedBefore+b.splitLineCount,c.unifiedLineCount+=b.collapsedBefore+b.unifiedLineCount}if(c!=null){if(a&&l&&!n&&c.hunks.length===0)throw Error(`parsePatchContent: unified file has no hunks`);if(c.hunks.length>0&&!l&&c.additionLines.length>0&&c.deletionLines.length>0){let e=c.hunks[c.hunks.length-1],t=bR(e.additionStart,e.additionCount),n=c.additionLines.length,r=Math.max(n-t,0);c.splitLineCount+=r,c.unifiedLineCount+=r}return n||(c.prevName!=null&&c.name!==c.prevName?c.hunks.length>0?c.type=`rename-changed`:c.type=`rename-pure`:(r==null||r.contents===``)&&i!=null&&i.contents!==``?c.type=`new`:r!=null&&r.contents!==``&&(i==null||i.contents===``)&&(c.type=`deleted`)),c.type!==`rename-pure`&&c.type!==`rename-changed`&&(c.prevName=void 0),qR(c),c}}function rz(e,t,n=!1){let r=[],i=az(e)?e.split(Zr):[e];for(let e of i)try{r.push(ez(e,t,n,t==null?void 0:r.length))}catch(e){if(n)throw e;console.error(e)}finally{zR()}return r}function iz(e,t=!1){let n=e.trim(),r=n.startsWith(`"`)?UR(n)?.fileName??n:n;return t&&(r.startsWith(`a/`)||r.startsWith(`b/`))?r.slice(2):r}function az(e){return e.startsWith(`From `)||e.includes(`
|
|
169
|
+
From `)}function oz(e){let t=sz(e);for(let e=0;e<t.length;e++)t[e]=BR(t[e]);return t}function sz(e){if(e.length===0)return[``];let t=[],n=0;for(;;){let r=e.indexOf(`
|
|
170
|
+
`,n);if(r===-1)break;t.push(e.slice(n,r+1)),n=r+1}return n<e.length&&t.push(e.slice(n)),t}function cz(e){return bz(e,`diff --git`)}function lz(e){if(e.length===0)return[``];let t=[],n=0,r=0,i=0,a=0,o=!1;for(;r<e.length;){let s=pz(e,r);if(i<=0&&a<=0){if(dz(e,r)){r>n&&t.push(e.slice(n,r)),n=r,o=!0,r=pz(e,s);continue}if(o&&e.startsWith(`@@ -`,r)){let t=gz(e.slice(r,s));t!=null&&(i=t.deletionCount,a=t.additionCount)}r=s;continue}let c=e[r];c===`\\`||(c===` `?(i=Math.max(i-1,0),a=Math.max(a-1,0)):c===`-`?i=Math.max(i-1,0):c===`+`&&(a=Math.max(a-1,0))),r=s}return t.push(e.slice(n)),t}function uz(e){return dz(e,0)}function dz(e,t){let n=pz(e,t);return fz(e,t,`---`)&&fz(e,n,`+++`)}function fz(e,t,n){if(!e.startsWith(n,t))return!1;let r=e[t+n.length];if(r!==` `&&r!==` `)return!1;for(let r=t+n.length+1;r<e.length;r++){let t=e[r];if(t===`
|
|
171
|
+
`||t===`\r`)break;if(t!==` `&&t!==` `)return!0}return!1}function pz(e,t){let n=e.indexOf(`
|
|
172
|
+
`,t);return n===-1?e.length:n+1}function mz(e){let t=e[0];return t===`+`||t===`-`||t===` `}function hz(e){if(!e.startsWith(`--`))return!1;for(let t=2;t<e.length;t++){let n=e[t];if(n!==` `&&n!==` `&&n!==`
|
|
173
|
+
`&&n!==`\r`)return!1}return!0}function gz(e){if(!e.startsWith(`@@ -`))return;let t=4,n=_z(e,t);if(n==null)return;let r=n.value;t=n.endIndex;let i=1;if(e[t]===`,`){let n=_z(e,t+1);if(n==null)return;i=n.value,t=n.endIndex}if(e[t]!==` `||e[t+1]!==`+`)return;t+=2;let a=_z(e,t);if(a==null)return;let o=a.value;t=a.endIndex;let s=1;if(e[t]===`,`){let n=_z(e,t+1);if(n==null)return;s=n.value,t=n.endIndex}if(e[t]!==` `||e[t+1]!==`@`||e[t+2]!==`@`)return;let c,l=t+3;return e[l]===` `&&(c=vz(e.slice(l+1))),{additionCount:s,additionStart:o,deletionCount:i,deletionStart:r,hunkContext:c}}function _z(e,t){let n=t,r=0;for(;n<e.length;n++){let t=e.charCodeAt(n)-48;if(t<0||t>9)break;r=r*10+t}if(n!==t)return{value:r,endIndex:n}}function vz(e){return e.endsWith(`\r
|
|
174
|
+
`)?e.slice(0,-2):e.endsWith(`
|
|
175
|
+
`)?e.slice(0,-1):e}function yz(e){return e.startsWith(`diff --git`)||e.includes(`
|
|
176
|
+
diff --git`)}function bz(e,t){if(e.length===0)return[``];let n=`\n${t}`,r=e.startsWith(t)?0:xz(e,n,0);if(r===-1)return[e];let i=[];r>0&&i.push(e.slice(0,r));let a=r;for(;;){let t=xz(e,n,a+1);if(t===-1)break;i.push(e.slice(a,t)),a=t}return i.push(e.slice(a)),i}function xz(e,t,n){let r=e.indexOf(t,n);return r===-1?-1:r+1}function Sz(e){return e==null?e:BR(e)}function Cz(e){return e===` `?`context`:e===`\\`?`metadata`:e===`+`?`addition`:`deletion`}function wz(e){let t=e.slice(1);return BR(t===``?`
|
|
177
|
+
`:t)}function Tz(e,t,n){return e===`change`?{type:`change`,additions:0,deletions:0,additionLineIndex:n,deletionLineIndex:t}:{type:`context`,lines:0,additionLineIndex:n,deletionLineIndex:t}}var Ez=`/dev/null`;function Dz(e,t,n,r=!1){if(e===null&&t===null)throw Error(`parseDiffFromFile: You must pass oldFile, newFile, or both`);let i=e??Oz(),a=t??Oz(),o=tz(bf(i.name,a.name,i.contents,a.contents,i.header,a.header,n),{cacheKey:(()=>{let n=e?.cacheKey,r=t?.cacheKey;return n!=null&&r!=null?SR(`diff`,n,r):void 0})(),oldFile:i,newFile:a,throwOnError:r});if(o==null)throw Error(`parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?`);e===null?(o.type=`new`,o.prevName=void 0):t===null&&(o.type=`deleted`,o.prevName=void 0);let s=t?.lang??(t===null?e?.lang:void 0);return s!=null&&(o.lang=s),o}function Oz(){return{name:Ez,contents:``}}var kz=class{isDeletionsScrolling=!1;isAdditionsScrolling=!1;timeoutId=-1;codeDeletions;codeAdditions;enabled=!1;cleanUp(){this.enabled&&=(this.codeDeletions?.removeEventListener(`scroll`,this.handleDeletionsScroll),this.codeAdditions?.removeEventListener(`scroll`,this.handleAdditionsScroll),clearTimeout(this.timeoutId),this.codeDeletions=void 0,this.codeAdditions=void 0,!1)}setup(e,t,n){if(t==null||n==null)for(let r of e.children??[])r instanceof HTMLElement&&(`deletions`in r.dataset?t=r:`additions`in r.dataset&&(n=r));n==null||t==null?this.cleanUp():(this.codeDeletions!==t&&(this.codeDeletions?.removeEventListener(`scroll`,this.handleDeletionsScroll),this.codeDeletions=t,t.addEventListener(`scroll`,this.handleDeletionsScroll,{passive:!0})),this.codeAdditions!==n&&(this.codeAdditions?.removeEventListener(`scroll`,this.handleAdditionsScroll),this.codeAdditions=n,n.addEventListener(`scroll`,this.handleAdditionsScroll,{passive:!0})),this.enabled=!0)}handleDeletionsScroll=()=>{this.isAdditionsScrolling||(this.isDeletionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isDeletionsScrolling=!1},300),this.codeAdditions?.scrollTo({left:this.codeDeletions?.scrollLeft}))};handleAdditionsScroll=()=>{this.isDeletionsScrolling||(this.isAdditionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isAdditionsScrolling=!1},300),this.codeDeletions?.scrollTo({left:this.codeAdditions?.scrollLeft}))}};function Az(e,t){return cI(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength&&e.lineDiffType===t.lineDiffType&&e.maxLineDiffLength===t.maxLineDiffLength}function jz(e){return ci({tagName:`div`,properties:{"data-content-buffer":``,"data-buffer-size":e,style:`grid-row: span ${e};min-height:calc(${e} * 1lh)`}})}function Mz(e){return ci({tagName:`div`,children:[ci({tagName:`span`,children:[hi(`No newline at end of file`)]})],properties:{"data-no-newline":``,"data-line-type":e,"data-column-content":``}})}function Nz(e){return ci({tagName:`div`,children:[li({name:e===`both`?`diffs-icon-expand-all`:`diffs-icon-expand`,properties:{"data-icon":``}})],properties:{role:`button`,"data-expand-button":``,"data-expand-both":e===`both`?``:void 0,"data-expand-up":e===`up`?``:void 0,"data-expand-down":e===`down`?``:void 0}})}function Pz({type:e,content:t,expandIndex:n,chunked:r=!1,slotName:i,isFirstHunk:a,isLastHunk:o}){let s=0,c=[];if(e===`metadata`&&t!=null&&c.push(ci({tagName:`div`,children:[hi(t)],properties:{"data-separator-wrapper":``}})),(e===`line-info`||e===`line-info-basic`)&&t!=null){let e=[];n!=null&&(r?(a||(e.push(Nz(`up`)),s++),o||(e.push(Nz(`down`)),s++)):(e.push(Nz(!a&&!o?`both`:a?`down`:`up`)),s++)),e.push(ci({tagName:`div`,children:[ci({tagName:`span`,children:[hi(t)],properties:{"data-unmodified-lines":``}})],properties:{"data-separator-content":``}})),r&&n!=null&&e.push(ci({tagName:`div`,children:[hi(`Expand all`)],properties:{role:`button`,"data-expand-button":``,"data-expand-all-button":``}})),c.push(ci({tagName:`div`,children:e,properties:{"data-separator-wrapper":``,"data-separator-multi-button":s>1?``:void 0}}))}return e===`custom`&&i!=null&&c.push(ci({tagName:`slot`,properties:{name:i}})),ci({tagName:`div`,children:c,properties:{"data-separator":c.length===0?`simple`:e,"data-expand-index":n,"data-separator-first":a?``:void 0,"data-separator-last":o?``:void 0}})}function Fz(e,t){return`hunk-separator-${e}-${t}`}function Iz(e){let t=e.at(-1);return t==null?0:Math.max(bR(t.additionStart,t.additionCount),bR(t.deletionStart,t.deletionCount))}function Lz({line:e,spanStart:t,spanLength:n}){return{start:{line:e,character:t},end:{line:e,character:t+n},properties:{"data-diff-span":``},alwaysWrap:!0}}function Rz({item:e,arr:t,enableJoin:n,isNeutral:r=!1,isLastItem:i=!1}){let a=t[t.length-1];if(a==null||i||!n){t.push([+!r,e.value]);return}let o=a[0]===0;r===o||r&&e.value.length===1&&!o?a[1]+=e.value:t.push([+!r,e.value])}function zz(e){return[yR(e.additionStart,e.additionCount)+1,bR(e.additionStart,e.additionCount)+1]}function Bz({isPartial:e,rangeSize:t,expandedHunks:n,hunkIndex:r,collapsedContextThreshold:i}){let a=Math.max(t,0);if(a===0||e)return{fromStart:0,fromEnd:0,rangeSize:a,collapsedLines:a,renderAll:!1};if(n===!0||a<=i)return{fromStart:a,fromEnd:0,rangeSize:a,collapsedLines:0,renderAll:!0};let o=n?.get(r),s=Math.min(Math.max(o?.fromStart??0,0),a),c=Math.min(Math.max(o?.fromEnd??0,0),a),l=s+c,u=l>=a;return{fromStart:u?a:s,fromEnd:u?0:c,rangeSize:a,collapsedLines:Math.max(a-l,0),renderAll:u}}function Vz(e){let t=e.hunks[e.hunks.length-1];if(t==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return!1;let n=e.additionLines.length-bR(t.additionStart,t.additionCount),r=e.deletionLines.length-bR(t.deletionStart,t.deletionCount);return n<=0&&r<=0?!1:n!==r}function Hz({fileDiff:e,errorPrefix:t}){let n=e.hunks[e.hunks.length-1];if(n==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return 0;let r=e.additionLines.length-bR(n.additionStart,n.additionCount),i=e.deletionLines.length-bR(n.deletionStart,n.deletionCount);if(r<=0&&i<=0)return 0;if(r!==i)throw Error(`${t}: trailing context mismatch (additions=${r}, deletions=${i}) for ${e.name}`);return Math.min(r,i)}function Uz({fileDiff:e,hunkIndex:t,expandedHunks:n,collapsedContextThreshold:r,errorPrefix:i}){if(t!==e.hunks.length-1)return;let a=Hz({fileDiff:e,errorPrefix:i});if(a<=0)return;if(n===!0||a<=r)return{fromStart:a,fromEnd:0,rangeSize:a,collapsedLines:0,renderAll:!0};let o=n?.get(e.hunks.length),s=Math.min(Math.max(o?.fromStart??0,0),a);return{fromStart:s,fromEnd:0,rangeSize:a,collapsedLines:a-s,renderAll:s>=a}}function Wz({fileDiff:e,lineNumber:t,expandedHunks:n,collapsedContextThreshold:r}){if(n===!0||e.isPartial)return!0;for(let[i,a]of e.hunks.entries()){let[o,s]=zz(a);if(t<o){let s=Bz({isPartial:e.isPartial,rangeSize:a.collapsedBefore,expandedHunks:n,hunkIndex:i,collapsedContextThreshold:r}),c=o-s.rangeSize;return s.renderAll||t<c+s.fromStart||t>=o-s.fromEnd}if(t<s)return!0}let i=Uz({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:n,collapsedContextThreshold:r,errorPrefix:`isAdditionLineRenderable`});if(i==null||i.renderAll)return!0;let a=e.hunks[e.hunks.length-1],[,o]=zz(a);return t<o+i.fromStart||t>=o+i.rangeSize}function Gz({fileDiff:e,lineNumber:t,direction:n,expandedHunks:r,collapsedContextThreshold:i}){if(r===!0||e.isPartial)return t;let a=[],o=1;for(let[t,n]of e.hunks.entries()){let[s,c]=zz(n),l=Bz({isPartial:e.isPartial,rangeSize:n.collapsedBefore,expandedHunks:r,hunkIndex:t,collapsedContextThreshold:i}),u=s-l.rangeSize;l.renderAll?a.push([u,s]):(l.fromStart>0&&a.push([u,u+l.fromStart]),l.fromEnd>0&&a.push([s-l.fromEnd,s])),a.push([s,c]),o=c}let s=Uz({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:r,collapsedContextThreshold:i,errorPrefix:`getNearestRenderableAdditionLine`});if(s!=null){let e=o;o=e+s.rangeSize,s.renderAll?a.push([e,o]):s.fromStart>0&&a.push([e,e+s.fromStart])}if(t>=o)return t;if(n===`down`){for(let[e,n]of a)if(n>t)return Math.max(e,t)}else for(let e=a.length-1;e>=0;e--){let[n,r]=a[e];if(n<=t)return Math.min(r-1,t)}}function Kz({type:e,metrics:t}){return t.hunkSeparatorHeight??mR(e)}function qz({type:e,metrics:t}){return e===`simple`||e===`metadata`||e===`line-info-basic`?0:t.spacing}function Jz({type:e,hunkIndex:t,hunkSpecs:n}){switch(e){case`simple`:return t>0;case`metadata`:return n!=null;case`line-info`:case`line-info-basic`:case`custom`:return!0}}function Yz(e){return e!==`simple`&&e!==`metadata`}function Xz({type:e,metrics:t,hunkIndex:n,hunkSpecs:r}){if(!Jz({type:e,hunkIndex:n,hunkSpecs:r}))return;let i=Kz({type:e,metrics:t}),a=qz({type:e,metrics:t}),o=n>0?a:0,s=a;return{height:i,gapBefore:o,gapAfter:s,totalHeight:o+i+s}}function Zz({type:e,metrics:t}){if(!Yz(e))return;let n=Kz({type:e,metrics:t}),r=qz({type:e,metrics:t});return{height:n,gapBefore:r,gapAfter:0,totalHeight:r+n}}function Qz({diff:e,diffStyle:t,startingLine:n=0,totalLines:r=1/0,expandedHunks:i,collapsedContextThreshold:a=1,callback:o}){let s=$z({diff:e,diffStyle:t,startingLine:n,expandedHunks:i,collapsedContextThreshold:a}),c={viewportStart:n,viewportEnd:n+r,isWindowedHighlight:n>0||r<1/0,splitCount:s.splitCount,unifiedCount:s.unifiedCount,finalHunkIndex:e.hunks.length-1,shouldBreak(){if(!c.isWindowedHighlight)return!1;let e=c.unifiedCount>=n+r,i=c.splitCount>=n+r;return t===`unified`?e:(t===`split`||e)&&i},shouldSkip(e,r){if(!c.isWindowedHighlight)return!1;let i=e>0&&c.unifiedCount+e<=n,a=r>0&&c.splitCount+r<=n;return t===`unified`?i:(t===`split`||i)&&a},incrementCounts(e,n){(t===`unified`||t===`both`)&&(c.unifiedCount+=e),(t===`split`||t===`both`)&&(c.splitCount+=n)},isInWindow(e,n){if(!c.isWindowedHighlight)return!0;let r=c.isInUnifiedWindow(e),i=c.isInSplitWindow(n);return t===`unified`?r:t===`split`?i:r||i},isInUnifiedWindow(e){return!c.isWindowedHighlight||c.unifiedCount>=n-e&&c.unifiedCount<n+r},isInSplitWindow(e){return!c.isWindowedHighlight||c.splitCount>=n-e&&c.splitCount<n+r},emit(e,n=!1){return n||(t===`unified`?c.incrementCounts(1,0):t===`split`?c.incrementCounts(0,1):c.incrementCounts(1,1)),o(e)??!1}};hunkIterator:for(let n=s.hunkIndex;n<e.hunks.length;n++){let r=e.hunks[n];if(r==null)throw Error(`iterateOverDiff: invalid hunk index`);if(c.shouldBreak())break;let o=yR(r.deletionStart,r.deletionCount),s=yR(r.additionStart,r.additionCount),l=!e.isPartial&&r.deletionCount===0?o:r.deletionLineIndex,u=!e.isPartial&&r.additionCount===0?s:r.additionLineIndex,d=Bz({isPartial:e.isPartial,rangeSize:r.collapsedBefore,expandedHunks:i,hunkIndex:n,collapsedContextThreshold:a}),f=n===c.finalHunkIndex?Uz({fileDiff:e,hunkIndex:n,expandedHunks:i,collapsedContextThreshold:a,errorPrefix:`iterateOverDiff`}):void 0,p=d.fromStart+d.fromEnd;function m(e,n){return f==null||f.collapsedLines<=0||f.fromStart+f.fromEnd>0?0:t===`unified`?e===r.unifiedLineStart+r.unifiedLineCount-1?f.collapsedLines:0:n===r.splitLineStart+r.splitLineCount-1?f.collapsedLines:0}let h=d.collapsedLines===0;function g(){return h?0:(h=!0,d.collapsedLines)}if(c.shouldSkip(p,p))c.incrementCounts(p,p),g();else{let e=r.unifiedLineStart-d.rangeSize,i=r.splitLineStart-d.rangeSize,a=l-d.rangeSize,f=u-d.rangeSize,p=o+1-d.rangeSize,m=s+1-d.rangeSize;if(nB(c,d.fromStart,t,t=>c.emit({hunkIndex:n,hunk:r,collapsedBefore:0,collapsedAfter:0,type:`context-expanded`,deletionLine:{lineNumber:p+t,lineIndex:a+t,noEOFCR:!1,unifiedLineIndex:e+t,splitLineIndex:i+t},additionLine:{unifiedLineIndex:e+t,splitLineIndex:i+t,lineIndex:f+t,lineNumber:m+t,noEOFCR:!1}}))||(e=r.unifiedLineStart-d.fromEnd,i=r.splitLineStart-d.fromEnd,a=l-d.fromEnd,f=u-d.fromEnd,p=o+1-d.fromEnd,m=s+1-d.fromEnd,nB(c,d.fromEnd,t,t=>c.emit({hunkIndex:n,hunk:r,collapsedBefore:g(),collapsedAfter:0,type:`context-expanded`,deletionLine:{lineNumber:p+t,lineIndex:a+t,noEOFCR:!1,unifiedLineIndex:e+t,splitLineIndex:i+t},additionLine:{unifiedLineIndex:e+t,splitLineIndex:i+t,lineIndex:f+t,lineNumber:m+t,noEOFCR:!1}}),()=>{g()})))break hunkIterator}let _=r.unifiedLineStart,v=r.splitLineStart,y=l,b=u,x=o+1,S=s+1,C=r.hunkContent.at(-1);for(let e of r.hunkContent){if(c.shouldBreak())break hunkIterator;let i=e===C;if(e.type===`context`){if(c.shouldSkip(e.lines,e.lines))c.incrementCounts(e.lines,e.lines),g();else if(nB(c,e.lines,t,t=>{let a=i&&t===e.lines-1,o=_+t,s=v+t;return c.emit({hunkIndex:n,hunk:r,collapsedBefore:g(),collapsedAfter:m(o,s),type:`context`,deletionLine:{lineNumber:x+t,lineIndex:y+t,noEOFCR:a&&r.noEOFCRDeletions,unifiedLineIndex:o,splitLineIndex:s},additionLine:{unifiedLineIndex:o,splitLineIndex:s,lineIndex:b+t,lineNumber:S+t,noEOFCR:a&&r.noEOFCRAdditions}})},()=>{g()}))break hunkIterator;_+=e.lines,v+=e.lines,y+=e.lines,b+=e.lines,x+=e.lines,S+=e.lines}else{let a=Math.max(e.deletions,e.additions),o=e.deletions+e.additions;if(!c.shouldSkip(o,a)){let s=rB(c,e,t);(s[0]?.[0]??0)>0&&g();for(let[l,u]of s)for(let s=l;s<u;s++){let l=m(_+s,t===`unified`?v+(s<e.deletions?s:s-e.deletions):v+s);if(c.emit(iB({hunkIndex:n,hunk:r,collapsedBefore:g(),collapsedAfter:l,diffStyle:t,index:s,unifiedLineIndex:_,splitLineIndex:v,additionLineIndex:b,deletionLineIndex:y,additionLineNumber:S,deletionLineNumber:x,content:e,isLastContent:i,unifiedCount:o,splitCount:a}),!0))break hunkIterator}}g(),c.incrementCounts(o,a),_+=o,v+=a,y+=e.deletions,b+=e.additions,x+=e.deletions,S+=e.additions}}if(f!=null){let{collapsedLines:n,fromStart:r,fromEnd:i}=f,a=r+i;if(nB(c,a,t,t=>{let r=t===a-1;return c.emit({hunkIndex:e.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:r?n:0,type:`context-expanded`,deletionLine:{lineNumber:x+t,lineIndex:y+t,noEOFCR:!1,unifiedLineIndex:_+t,splitLineIndex:v+t},additionLine:{unifiedLineIndex:_+t,splitLineIndex:v+t,lineIndex:b+t,lineNumber:S+t,noEOFCR:!1}})},void 0,()=>c.shouldBreak()))break hunkIterator}}}function $z({diff:e,diffStyle:t,startingLine:n,expandedHunks:r,collapsedContextThreshold:i}){if(n<=0||t===`both`)return{hunkIndex:0,splitCount:0,unifiedCount:0};let a=eB({diff:e,expandedHunks:r,collapsedContextThreshold:i}),o=0,s=e.hunks.length-1,c=e.hunks.length;for(;o<=s;){let e=o+s>>1,r=a[e+1];if(r==null)throw Error(`iterateOverDiff: invalid hunk prefix index`);(t===`unified`?r.unifiedCount:r.splitCount)>n?(c=e,s=e-1):o=e+1}if(c>=e.hunks.length){let t=a[e.hunks.length];if(t==null)throw Error(`iterateOverDiff: invalid terminal hunk prefix index`);return{hunkIndex:e.hunks.length,splitCount:t.splitCount,unifiedCount:t.unifiedCount}}let l=a[c];if(l==null)throw Error(`iterateOverDiff: invalid selected hunk prefix index`);return{hunkIndex:c,splitCount:l.splitCount,unifiedCount:l.unifiedCount}}function eB({diff:e,expandedHunks:t,collapsedContextThreshold:n}){let r=0,i=0,a=e.hunks.length-1,o=[{splitCount:0,unifiedCount:0}];for(let s=0;s<e.hunks.length;s++){let c=e.hunks[s];if(c==null)throw Error(`iterateOverDiff: invalid hunk summary index`);let l=Bz({isPartial:e.isPartial,rangeSize:c.collapsedBefore,expandedHunks:t,hunkIndex:s,collapsedContextThreshold:n}),u=l.fromStart+l.fromEnd;r+=u+c.splitLineCount,i+=u+c.unifiedLineCount;let d=s===a?Uz({fileDiff:e,hunkIndex:s,expandedHunks:t,collapsedContextThreshold:n,errorPrefix:`iterateOverDiff`}):void 0;if(d!=null){let e=d.fromStart+d.fromEnd;r+=e,i+=e}o.push({splitCount:r,unifiedCount:i})}return o}function tB(e,t,n){if(!e.isWindowedHighlight||t<=0)return[0,t];let r=[];function i(n){let i=Math.max(0,e.viewportStart-n),a=Math.min(t,e.viewportEnd-n);a>i&&r.push([i,a])}if(n!==`split`&&i(e.unifiedCount),n!==`unified`&&i(e.splitCount),r.length===0)return[0,0];let a=r[0][0],o=r[0][1];for(let e=1;e<r.length;e++){let t=r[e];a=Math.min(a,t[0]),o=Math.max(o,t[1])}return[a,o]}function nB(e,t,n,r,i,a){let[o,s]=tB(e,t,n);o>0&&(e.incrementCounts(o,o),i?.());let c=o;for(;c<t;){if(a?.()===!0)return!0;if(c>=s){e.incrementCounts(t-c,t-c);break}if(e.isInWindow(0,0)){if(r(c)===!0)return!0}else e.incrementCounts(1,1);c++}return!1}function rB(e,t,n){if(!e.isWindowedHighlight)return[[0,n===`unified`?t.deletions+t.additions:Math.max(t.deletions,t.additions)]];let r=n!==`split`,i=n!==`unified`,a=n===`unified`?`unified`:`split`,o=[];function s(t,n){if(t+n<=e.viewportStart||t>=e.viewportEnd)return;let r=Math.max(0,e.viewportStart-t),i=Math.min(n,e.viewportEnd-t);return i>r?[r,i]:void 0}function c(e,n){return a===`split`?e:n===`additions`?[e[0]+t.deletions,e[1]+t.deletions]:e}function l(e,t){if(e==null)return;let[n,r]=c(e,t);r>n&&o.push([n,r])}if(r&&(l(s(e.unifiedCount,t.deletions),`deletions`),l(s(e.unifiedCount+t.deletions,t.additions),`additions`)),i&&(l(s(e.splitCount,t.deletions),`deletions`),l(s(e.splitCount,t.additions),`additions`)),o.length===0)return o;o.sort((e,t)=>e[0]-t[0]);let u=[o[0]];for(let[e,t]of o.slice(1)){let n=u[u.length-1];e<=n[1]?n[1]=Math.max(n[1],t):u.push([e,t])}return u}function iB({hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,diffStyle:i,index:a,unifiedLineIndex:o,splitLineIndex:s,additionLineIndex:c,deletionLineIndex:l,additionLineNumber:u,deletionLineNumber:d,content:f,isLastContent:p,unifiedCount:m,splitCount:h}){let g=a<f.deletions?o+a:void 0,_=i===`unified`?a>=f.deletions?o+a:void 0:a<f.additions?o+f.deletions+a:void 0,v=i===`unified`?s+(a<f.deletions?a:a-f.deletions):s+a,y=a<f.deletions?l+a:void 0,b=a<f.deletions?d+a:void 0,x=i===`unified`?a>=f.deletions?c+(a-f.deletions):void 0:a<f.additions?c+a:void 0,S=i===`unified`?a>=f.deletions?u+(a-f.deletions):void 0:a<f.additions?u+a:void 0,C=i===`unified`?p&&a===f.deletions-1&&t.noEOFCRDeletions:p&&a===h-1&&t.noEOFCRDeletions,w=i===`unified`?p&&a===m-1&&t.noEOFCRAdditions:p&&a===h-1&&t.noEOFCRAdditions,T=y!=null&&b!=null&&g!=null?{lineNumber:b,lineIndex:y,noEOFCR:C,unifiedLineIndex:g,splitLineIndex:v}:void 0,E=x!=null&&S!=null&&_!=null?{unifiedLineIndex:_,splitLineIndex:v,lineIndex:x,lineNumber:S,noEOFCR:w}:void 0;if(T==null&&E!=null)return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:void 0,additionLine:E};if(T!=null&&E==null)return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:T,additionLine:void 0};if(T==null||E==null)throw Error(`iterateOverDiff: missing change line data`);return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:T,additionLine:E}}var aB={forcePlainText:!1};function oB(e,t,n,{forcePlainText:r,lazyLineAST:i=!1,startingLine:a,totalLines:o,expandedHunks:s,collapsedContextThreshold:c=1}=aB){r?(a??=0,o??=1/0):(a=0,o=1/0);let l=a>0||o<1/0;i&&=!r&&!n.useTokenTransformer;let u=typeof n.theme==`string`?t.getTheme(n.theme).type:void 0,d=mL({theme:n.theme,highlighter:t}),f=r&&!l&&(e.unifiedLineCount>1e3||e.splitLineCount>1e3)?`none`:n.lineDiffType,p={deletionLines:[],additionLines:[]},{maxLineDiffLength:m}=n,h=!r&&!e.isPartial,g=r?s:void 0,_=new Map;function v(e){let t=h?0:e,n=_.get(t)??lB();return _.set(t,n),n}function y(e,t,n,r){if(l){let e=n.at(-1);(e==null||e.targetIndex+e.count!==t)&&(e={targetIndex:t,originalOffset:r.length,count:0},n.push(e)),e.count++}r.push(e)}Qz({diff:e,diffStyle:`both`,startingLine:a,totalLines:o,expandedHunks:!l||g,collapsedContextThreshold:c,callback:({hunkIndex:t,additionLine:n,deletionLine:r,type:i})=>{let a=v(t),o=n==null?r.splitLineIndex:n.splitLineIndex;i===`change`&&n!=null&&r!=null&&cB({additionLine:e.additionLines[n.lineIndex],deletionLine:e.deletionLines[r.lineIndex],deletionLineIndex:a.deletionContent.length,additionLineIndex:a.additionContent.length,deletionDecorations:a.deletionDecorations,additionDecorations:a.additionDecorations,lineDiffType:f,maxLineDiffLength:m}),r!=null&&(y(e.deletionLines[r.lineIndex],r.lineIndex,a.deletionSegments,a.deletionContent),a.deletionInfo.push({type:i===`change`?`change-deletion`:i,lineNumber:r.lineNumber,altLineNumber:i===`change`?void 0:n.lineNumber??void 0,lineIndex:`${r.unifiedLineIndex},${o}`})),n!=null&&(y(e.additionLines[n.lineIndex],n.lineIndex,a.additionSegments,a.additionContent),a.additionInfo.push({type:i===`change`?`change-addition`:i,lineNumber:n.lineNumber,altLineNumber:i===`change`?void 0:r.lineNumber??void 0,lineIndex:`${n.unifiedLineIndex},${o}`}))}});for(let a of _.values()){if(a.deletionContent.length===0&&a.additionContent.length===0)continue;let o={name:e.prevName??e.name,contents:a.deletionContent.value},s={name:e.name,contents:a.additionContent.value},{deletionLines:c,additionLines:l}=uB({deletionFile:o,deletionInfo:a.deletionInfo,deletionDecorations:a.deletionDecorations,additionFile:s,additionInfo:a.additionInfo,additionDecorations:a.additionDecorations,highlighter:t,options:n,languageOverride:r?`text`:e.lang,lazyLineAST:i});if(h)p.deletionLines=c,p.additionLines=l;else for(let[e,t,n]of[[p.deletionLines,c,a.deletionSegments],[p.additionLines,l,a.additionSegments]])if(n.length>0)for(let r of n)for(let n=0;n<r.count;n++)e[r.targetIndex+n]=t[r.originalOffset+n];else if(i){let n=e.length;for(let r=0;r<t.length;r++)ui(e,n+r,()=>t[r])}else _i(e,t)}return{code:p,themeStyles:d,baseThemeType:u}}function sB(e,{deletionLineIndex:t,additionLineIndex:n,deletionDecorations:r,additionDecorations:i}){let a=0,o=0,s=-1,c=0,l=-1,u=0;for(let{value:t,added:n,removed:r}of e)r?(s===-1&&(s=a),a+=t.length,c=a):n?(l===-1&&(l=o),o+=t.length,u=o):(a+=t.length,o+=t.length);s!==-1&&r.push(Lz({line:t,spanStart:s,spanLength:c-s})),l!==-1&&i.push(Lz({line:n,spanStart:l,spanLength:u-l}))}function cB({deletionLine:e,additionLine:t,deletionLineIndex:n,additionLineIndex:r,deletionDecorations:i,additionDecorations:a,lineDiffType:o,maxLineDiffLength:s}){if(e==null||t==null||o===`none`||(e=NR(e),t=NR(t),e.length>s||t.length>s))return;let c=o===`char`?Gd(e,t):lf(e,t);if(o===`word-line`){sB(c,{deletionLineIndex:n,additionLineIndex:r,deletionDecorations:i,additionDecorations:a});return}let l=[],u=[],d=o===`word-alt`,f=c.at(-1);for(let e of c){let t=e===f;!e.added&&!e.removed?(Rz({item:e,arr:l,enableJoin:d,isNeutral:!0,isLastItem:t}),Rz({item:e,arr:u,enableJoin:d,isNeutral:!0,isLastItem:t})):e.removed?Rz({item:e,arr:l,enableJoin:d,isLastItem:t}):Rz({item:e,arr:u,enableJoin:d,isLastItem:t})}let p=0;for(let e of l)e[0]===1&&i.push(Lz({line:n,spanStart:p,spanLength:e[1].length})),p+=e[1].length;p=0;for(let e of u)e[0]===1&&a.push(Lz({line:r,spanStart:p,spanLength:e[1].length})),p+=e[1].length}function lB(){return{deletionContent:{push(e){this.value+=e,this.length++},value:``,length:0},additionContent:{push(e){this.value+=e,this.length++},value:``,length:0},deletionInfo:[],additionInfo:[],deletionDecorations:[],additionDecorations:[],deletionSegments:[],additionSegments:[]}}function uB({lazyLineAST:e,deletionFile:t,additionFile:n,deletionInfo:r,additionInfo:i,highlighter:a,deletionDecorations:o,additionDecorations:s,languageOverride:c,options:{theme:l,useTokenTransformer:u,tokenizeMaxLineLength:d}}){let f=(t,n,r)=>t.contents===``?[]:mi(a.codeToTokens(NR(t.contents),_L(c??Yt(t.name),l,d)).tokens,{state:{lineInfo:n},useTokenTransformer:u,decorations:r,lazyLineAST:e,cacheHtmlStyles:a.name===`highlights`});return{deletionLines:f(t,r,o),additionLines:f(n,i,s)}}function dB(e,t){let n=Dz({name:e.prevName??e.name,contents:e.deletionLines.join(``)},{name:e.name,contents:e.additionLines.join(``),lang:e.lang},t);return{hunks:n.hunks,splitLineCount:n.splitLineCount,unifiedLineCount:n.unifiedLineCount,additionLines:n.additionLines,deletionLines:n.deletionLines,additionCharacterCount:n.additionCharacterCount,deletionCharacterCount:n.deletionCharacterCount,type:n.type}}function fB(e,t){let n=Math.max(e,1),r=Array.from({length:n},(e,t)=>`${` `.repeat(t+1)}\n`).join(``);return r===t&&(r=Array.from({length:n},(e,t)=>`\u0000${` `.repeat(t)}\n`).join(``)),r}function pB(e){for(let t of e)if(t.trim().length>0)return!1;return!0}function mB(e,t){return t.length>0&&t.length<e.deletionLines.length&&pB(t)}function hB(e,t,n,r){let i=e.deletionLines.join(``),a=fB(t.length,i),o=Dz({name:e.prevName??e.name,contents:i},{name:e.name,contents:a,lang:e.lang},r);return{hunks:o.hunks,splitLineCount:o.splitLineCount,unifiedLineCount:o.unifiedLineCount,additionLines:t,deletionLines:o.deletionLines,additionCharacterCount:n,deletionCharacterCount:o.deletionCharacterCount,type:o.type}}function gB(e,t){return hB(e,[``],0,t)}function _B(e,t){if(e.additionLines.length===0)return gB(e,t);if(mB(e,e.additionLines))return hB(e,e.additionLines,e.additionCharacterCount,t);let n=e.additionLines,r=dB(e,t);return yB(r,n),r}function vB(e){return e.length>1&&e.at(-1)===``}function yB(e,t){if(!vB(t))return;let n=t.length-e.additionLines.length;if(n<=0)return;let r=e.additionLines.length,i=e.hunks.at(-1);if(i!=null&&bR(i.additionStart,i.additionCount)===r){for(let a of i.hunkContent)if(a.type===`change`&&a.additions<a.deletions&&a.additionLineIndex+a.additions===r){e.additionLines=t,a.additions+=n,i.additionCount+=n,i.additionLines+=n,kB(e);return}}}function bB(e,t,n){if(e.isPartial||e.deletionLines.length!==e.additionLines.length)return xB(e,dB(e,n));let r=Array.from(t);if(r.length===0)return xB(e,{hunks:e.hunks,splitLineCount:e.splitLineCount,unifiedLineCount:e.unifiedLineCount,type:e.type});for(let t of r){let r=e.additionLines[t],i=e.deletionLines[t];if(r==null||i==null||NR(r)===NR(i))return xB(e,dB(e,n))}let i=SB(e,r);if(i.size===0)return xB(e,dB(e,n));for(let t of i)if(!wB(e,t,n))return xB(e,dB(e,n));return kB(e),Vz(e)?xB(e,dB(e,n)):xB(e,{hunks:e.hunks,splitLineCount:e.splitLineCount,unifiedLineCount:e.unifiedLineCount,type:e.type})}function xB(e,t){return Object.assign(e,t),t}function SB(e,t){let n=new Set;for(let r of t){let t=CB(e,r);if(t==null)return new Set;n.add(t)}return n}function CB(e,t){for(let[n,r]of e.hunks.entries()){let e=r.additionLineIndex+r.additionCount;if(t>=r.additionLineIndex&&t<e)return n}}function wB(e,t,n){let r=e.hunks[t];if(r==null)return!1;let i=e.deletionLines.slice(r.deletionLineIndex,r.deletionLineIndex+r.deletionCount),a=e.additionLines.slice(r.additionLineIndex,r.additionLineIndex+r.additionCount),o=Dz({name:e.prevName??e.name,contents:i.join(``)},{name:e.name,contents:a.join(``),lang:e.lang},{...n,context:0}),s=o.hunks[0];return s==null||o.hunks.length!==1?!1:(EB(r,s),TB(e,t),!0)}function TB(e,t){let n=e.hunks[t];if(n==null)return;if(t!==e.hunks.length-1){n.noEOFCRAdditions=!1,n.noEOFCRDeletions=!1;return}let r=e.additionLines.at(-1),i=e.deletionLines.at(-1);n.noEOFCRAdditions=r!=null&&r!==``&&!r.endsWith(`
|
|
178
|
+
`),n.noEOFCRDeletions=i!=null&&i!==``&&!i.endsWith(`
|
|
179
|
+
`)}function EB(e,t){let n=e.additionLineIndex,r=e.deletionLineIndex;e.hunkContent=t.hunkContent.map(e=>DB(e,n,r)),e.additionLineIndex=n+t.additionLineIndex,e.additionStart+=t.additionLineIndex,e.additionCount=t.additionCount,e.additionLines=t.additionLines,t.deletionLineIndex>=0&&(e.deletionLineIndex=r+t.deletionLineIndex,e.deletionStart+=t.deletionLineIndex),e.deletionCount=t.deletionCount,e.deletionLines=t.deletionLines,e.noEOFCRAdditions=t.noEOFCRAdditions,e.noEOFCRDeletions=t.noEOFCRDeletions,OB(e)}function DB(e,t,n){return{...e,additionLineIndex:e.additionLineIndex+t,deletionLineIndex:e.deletionLineIndex+n}}function OB(e){let t=0,n=0;for(let r of e.hunkContent)r.type===`context`?(t+=r.lines,n+=r.lines):(t+=Math.max(r.additions,r.deletions),n+=r.additions+r.deletions);e.splitLineCount=t,e.unifiedLineCount=n}function kB(e){let t=0,n=0,r=0;for(let i of e.hunks)i.collapsedBefore=Math.max(yR(i.additionStart,i.additionCount)-r,0),i.splitLineStart=t+i.collapsedBefore,i.unifiedLineStart=n+i.collapsedBefore,OB(i),t+=i.collapsedBefore+i.splitLineCount,n+=i.collapsedBefore+i.unifiedLineCount,r=bR(i.additionStart,i.additionCount);if(e.hunks.length>0){let r=e.hunks[e.hunks.length-1],i=Math.max(e.additionLines.length-bR(r.additionStart,r.additionCount),0);t+=i,n+=i}e.splitLineCount=t,e.unifiedLineCount=n}var AB=new WeakMap;function jB(e){return e.length>1&&e[e.length-1]===``?e.slice(0,-1):e}function MB(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e[r]===t[r];)r++;let i=e.length,a=t.length;for(;i>r&&a>r&&e[i-1]===t[a-1];)i--,a--;if(r!==i||r!==a)return{start:r,deletionEnd:i,additionEnd:a}}function NB(e,t,n){let r=e.hunks,i=e.additionLines,a=jB(i),o=a===i?e:{...e,additionLines:a},s=WB(r,HB(o,t,n),e.deletionLines.length),c=qB(o,s);if(e.additionLines=a,e.hunks=c,e.editSessionDirty=!0,rV(e),yB(e,i),XB(r,e.hunks))return{regions:s.map(e=>e.previousSpan)}}function PB(e,t,n,r){let i=new Set(t),a=Array.from(i).filter(t=>t>=0&&t<e.additionLines.length).sort((e,t)=>e-t);if(a.length===0)return;let o=t=>i.has(t)?r?.get(t):e.additionLines[t],{hunks:s}=e,c,l=0;for(let t of a){for(;l<s.length;){let e=s[l];if(t<$B(e)+e.additionCount)break;l++}let r=s[l],i=r==null?void 0:$B(r);if(i==null||t<i||c!=null&&c!==l)return NB(e,n,o);c=l}if(c!=null){if(FB(e,a,c,r,n))e.editSessionDirty=!0;else return NB(e,n,o)}}function FB(e,t,n,r,i){if(r==null||i?.ignoreWhitespace===!0||i?.stripTrailingCr===!0)return!1;let a=IB(e),o=e.hunks[n];if(o.hunkContent.some(LB))return!1;for(let n of t){let t=r.get(n),i=e.additionLines[n];if(t==null||i==null||a.has(t)||a.has(i))return!1;let s=!1;for(let e of o.hunkContent)if(e.type===`change`&&e.additions===e.deletions&&n>=e.additionLineIndex&&n<e.additionLineIndex+e.additions){s=!0;break}if(!s)return!1}return!0}function IB(e){let t=AB.get(e);if(t?.lines===e.deletionLines)return t.set;let n=new Set(e.deletionLines);return AB.set(e,{lines:e.deletionLines,set:n}),n}function LB(e){return e?.type===`change`&&(e.additions===0||e.deletions===0)}function RB(e,t){let n=new Map,{regions:r}=t;for(let t=0;t<=r.length;t++){let i=r[t-1],a=r[t],o=t===0?e.get(0):i==null?void 0:e.get(i.lastIndex+1),s=a==null?void 0:e.get(a.firstIndex),c=o?.fromStart??0,l=s?.fromEnd??0;(c>0||l>0)&&n.set(t,{fromStart:c,fromEnd:l})}return n}function zB(e,t,n){let r=[];if(e.isPartial)return r;for(let[i,a]of e.hunks.entries()){let o=Bz({isPartial:e.isPartial,rangeSize:a.collapsedBefore,expandedHunks:t,hunkIndex:i,collapsedContextThreshold:n});if(o.rangeSize<=n)continue;let s=eV(a),c=s-o.rangeSize;o.fromStart>0&&r.push([c,c+o.fromStart]),o.fromEnd>0&&r.push([s-o.fromEnd,s])}let i=Uz({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:t,collapsedContextThreshold:n,errorPrefix:`captureExpansionAnchors`});if(i!=null&&i.fromStart>0&&i.rangeSize>n){let t=e.hunks[e.hunks.length-1],n=eV(t)+t.deletionCount;r.push([n,n+i.fromStart])}return r}function BB(e,t){let n=new Map;if(t.length===0)return n;let r=(e,r,i)=>{if(i<=r)return;let a=0,o=0;for(let[e,n]of t)n<=r||e>=i||(e<=r&&(a=Math.max(a,Math.min(n,i)-r)),n>=i&&(o=Math.max(o,i-Math.max(e,r))));(a>0||o>0)&&n.set(e,{fromStart:a,fromEnd:o})};for(let[t,n]of e.hunks.entries()){let e=eV(n);r(t,e-Math.max(n.collapsedBefore,0),e)}let i=e.hunks[e.hunks.length-1];return i!=null&&!e.isPartial&&e.deletionLines.length>0&&r(e.hunks.length,eV(i)+i.deletionCount,e.deletionLines.length),n}function VB(e,t){return e.editSessionDirty===!0&&(delete e.editSessionDirty,Object.assign(e,e.additionLines.length<=1&&e.additionLines.join(``)===``?dB(e,t):_B(e,t)),!0)}function HB(e,t,n){if(MB(e.deletionLines,e.additionLines)==null)return[];let r=Dz({name:e.prevName??e.name,contents:e.deletionLines.join(``)},{name:e.name,contents:e.additionLines.join(``),lang:e.lang},t),i,a=(t,a)=>{i??=UB(e.hunks);for(let e=0;e<=a;e++){let o=i.get(t.deletionLineIndex-e);if(o!=null&&o.additions===t.additions&&o.deletions===t.deletions){if(t.additions>0&&n!=null){for(let e=0;e<t.additions;e++)if(n(o.additionLineIndex+e)!==r.additionLines[t.additionLineIndex+e])return a}return e}}return a},o=[],s=0,c=0;for(let e of r.hunks){JR(e,r,a);let t=e.additionCount>0?e.additionLineIndex-s:e.deletionLineIndex-c;s+=t,c+=t;for(let t of e.hunkContent){if(t.type===`context`){s+=t.lines,c+=t.lines;continue}let e=DB(t,0,0);e.additions===0&&(e.additionLineIndex=s),e.deletions===0&&(e.deletionLineIndex=c),o.push(e),s+=e.additions,c+=e.deletions}}return o}function UB(e){let t=new Map;for(let n of e)for(let e of n.hunkContent)e.type===`change`&&(e.additions===0||e.deletions===0)&&t.set(e.deletionLineIndex,e);return t}function WB(e,t,n){let r=e.map((e,t)=>{let n=eV(e);return{deletionStart:n,deletionEnd:n+e.deletionCount,blocks:[],previousSpan:{firstIndex:t,lastIndex:t}}}),i=[],a=0;for(let e of t){let t=e.deletionLineIndex,o=t+e.deletions;for(;a<r.length&&r[a].deletionEnd<t;)i.push(r[a]),a++;let s=i.length>0&&GB(t,o,i[i.length-1])?i.pop():void 0;for(;a<r.length&&r[a].deletionStart<=o;)s=KB(s,r[a]),a++;if(s==null){let c=t,l=o;if((e.deletions===0||e.additions===0)&&n>e.deletions){let e=i[i.length-1]?.deletionEnd??0,s=r[a]?.deletionStart??n;t>e?c--:o<s&&l++}s={deletionStart:c,deletionEnd:l,blocks:[],previousSpan:void 0}}s.deletionStart=Math.min(s.deletionStart,t),s.deletionEnd=Math.max(s.deletionEnd,o),s.blocks.push(e),i.push(s)}for(;a<r.length;)i.push(r[a]),a++;return i}function GB(e,t,n){return e<=n.deletionEnd&&t>=n.deletionStart}function KB(e,t){return e==null?t:(e.deletionStart=Math.min(e.deletionStart,t.deletionStart),e.deletionEnd=Math.max(e.deletionEnd,t.deletionEnd),e.blocks.push(...t.blocks),t.previousSpan!=null&&(e.previousSpan??={...t.previousSpan},e.previousSpan.firstIndex=Math.min(e.previousSpan.firstIndex,t.previousSpan.firstIndex),e.previousSpan.lastIndex=Math.max(e.previousSpan.lastIndex,t.previousSpan.lastIndex)),e)}function qB(e,t){let n=[],r=0,i=0;for(let a of t){let t=a.deletionStart-r;if(t<0)throw Error(`buildRegionHunks: overlapping old-side regions`);r+=t,i+=t;let o=i,s=[];for(let e of a.blocks){let t=e.deletionLineIndex-r,n=e.additionLineIndex-i;if(t<0||t!==n)throw Error(`buildRegionHunks: canonical block context mismatch`);YB(s,t,i,r),r+=t,i+=n,s.push({...e}),r+=e.deletions,i+=e.additions}let c=a.deletionEnd-r;if(c<0)throw Error(`buildRegionHunks: block exceeds its old-side region`);YB(s,c,i,r),r+=c,i+=c,n.push(JB(e,{additionStart:o,additionEnd:i,deletionStart:a.deletionStart,deletionEnd:a.deletionEnd},s))}if(e.deletionLines.length-r!==e.additionLines.length-i)throw Error(`buildRegionHunks: trailing context mismatch`);return n}function JB(e,t,n){let r=t.additionEnd-t.additionStart,i=t.deletionEnd-t.deletionStart,a=0,o=0;for(let e of n)e.type===`change`&&(a+=e.additions,o+=e.deletions);let s={collapsedBefore:0,additionStart:tV(t.additionStart,r),additionCount:r,additionLines:a,additionLineIndex:nV(t.additionStart,r),deletionStart:tV(t.deletionStart,i),deletionCount:i,deletionLines:o,deletionLineIndex:nV(t.deletionStart,i),hunkContent:n,hunkSpecs:`@@ -${tV(t.deletionStart,i)},${i} +${tV(t.additionStart,r)},${r} @@`,splitLineStart:0,splitLineCount:0,unifiedLineStart:0,unifiedLineCount:0,noEOFCRAdditions:!1,noEOFCRDeletions:!1};return OB(s),s}function YB(e,t,n,r){t>0&&e.push({type:`context`,lines:t,additionLineIndex:n,deletionLineIndex:r})}function XB(e,t){if(e.length!==t.length)return!0;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(eV(r)!==eV(i)||r.deletionCount!==i.deletionCount||$B(r)!==$B(i)||r.additionCount!==i.additionCount||r.splitLineCount!==i.splitLineCount||!ZB(r,i))return!0}return!1}function ZB(e,t){let n=QB(e),r=QB(t);for(;;){let e=n.next(),t=r.next();if(e.done===!0||t.done===!0)return e.done===t.done;if(e.value[0]!==t.value[0]||e.value[1]!==t.value[1])return!1}}function*QB(e){for(let t of e.hunkContent){if(t.type===`context`){for(let e=0;e<t.lines;e++)yield[t.deletionLineIndex+e,t.additionLineIndex+e];continue}let e=Math.max(t.deletions,t.additions);for(let n=0;n<e;n++)yield[n<t.deletions?t.deletionLineIndex+n:void 0,n<t.additions?t.additionLineIndex+n:void 0]}}function $B(e){return yR(e.additionStart,e.additionCount)}function eV(e){return yR(e.deletionStart,e.deletionCount)}function tV(e,t){return t===0?e:e+1}function nV(e,t){return t===0?e-1:e}function rV(e){kB(e);for(let t=0;t<e.hunks.length;t++)TB(e,t)}function iV(e){let t=e.lang??Yt(e.name),n=e.lang??(e.prevName==null?`text`:Yt(e.prevName));return t===`text`&&n===`text`}var aV=-1,oV=class{options;annotationSlotName;onRenderUpdate;workerManager;__id=`diff-hunks-renderer:${++aV}`;diff;expandedHunks=new Map;deletionAnnotations={};additionAnnotations={};computedLangs=[`text`];renderCache;pendingHighlightResult;pendingStructuralRows;editSessionActive=!1;constructor(e={theme:ti},t=eL,n,r){this.options=e,this.annotationSlotName=t,this.onRenderUpdate=n,this.workerManager=r}cleanUp(){this.endEditSession(),this.recycle(),this.expandedHunks.clear(),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.diff=void 0,this.editSessionActive?(this.renderCache!=null&&(this.renderCache.renderRange=void 0),this.pendingHighlightResult=void 0,this.pendingStructuralRows=void 0):this.clearRenderCache(),this.additionAnnotations={},this.deletionAnnotations={},this.workerManager?.cleanUpTasks(this)}beginEditSession(e,t){let{editSessionActive:n}=this;this.editSessionActive=!0,n||(this.pendingHighlightResult=void 0),this.diff=e,n&&this.renderCache!=null&&this.renderCache.diff!==e&&this.clearRenderCache();let{renderCache:r}=this;if(!e.isPartial&&e.additionLines.length===0){Object.assign(e,gB(e,this.options.parseDiffOptions)),this.markEditSessionPass(e),this.clearRenderCache();return}if(r==null||n&&r.diff===e)return;let{options:i}=this.getRenderOptions(e),a=r.diff===e,o=t!=null&&hR(r.diff,t),{result:s}=r;!r.highlighted||s==null||!Az(r.options,i)||!a&&!o?this.clearRenderCache():a||(this.renderCache={diff:e,options:i,highlighted:!0,result:{...s,code:{...s.code,additionLines:[...s.code.additionLines]}},renderRange:r.renderRange})}endEditSession(){this.editSessionActive=!1,this.pendingHighlightResult=void 0,this.diff??this.clearRenderCache()}editorRenderReady(){return this.renderCache?.options.useTokenTransformer===!0&&this.renderCache.highlighted&&this.renderCache.result!=null}refreshHighlightedResult(){let{diff:e,renderCache:t,workerManager:n}=this;return e==null||t==null||!hR(t.diff,e)||iV(e)||bV(e,this.getTokenizeMaxLength())?Promise.resolve():!this.editSessionActive&&n?.isWorkingPool()===!0&&e.cacheKey!=null?(n.evictDiffFromCache(e.cacheKey),n.primeDiffHighlightCache(e).then(()=>{this.applyRefreshedResult(e,n.getDiffResultCache(e))}).catch(e=>{cR(e)||this.onHighlightError(e)})):this.asyncHighlight(e).then(t=>this.applyRefreshedResult(e,t)).catch(e=>this.onHighlightError(e))}applyRefreshedResult(e,t){let{diff:n,renderCache:r}=this;if(t==null||n==null||r==null||!hR(n,e)||!hR(r.diff,e)||this.editSessionActive)return;let{options:i}=this.getRenderOptions(n);Az(i,t.options)&&(this.pendingHighlightResult={diff:n,options:t.options,highlighted:!0,result:t.result},this.onRenderUpdate?.())}get diffCache(){return this.renderCache?.diff??this.diff}clearRenderCache(){this.renderCache=void 0,this.pendingHighlightResult=void 0,this.pendingStructuralRows=void 0}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}expandHunk(e,t,n=this.getOptionsWithDefaults().expansionLineCount){let r={...this.expandedHunks.get(e)??{fromStart:0,fromEnd:0}};(t===`up`||t===`both`)&&(r.fromStart+=n),(t===`down`||t===`both`)&&(r.fromEnd+=n),this.renderCache?.highlighted!==!0&&this.clearRenderCache(),this.expandedHunks.set(e,r)}getExpandedHunk(e){return this.expandedHunks.get(e)??Hr}getExpandedHunksMap(){return this.expandedHunks}setExpandedHunksMap(e){this.expandedHunks=e}setLineAnnotations(e){this.additionAnnotations={},this.deletionAnnotations={};for(let t of e){let e=(()=>{switch(t.side){case`deletions`:return this.deletionAnnotations;case`additions`:return this.additionAnnotations}})(),n=e[t.lineNumber]??[];e[t.lineNumber]=n,n.push(t)}}updateRenderCache(e,t,n=!1,r,i){this.pendingStructuralRows=void 0;let{renderCache:a}=this;if(a==null)return!1;let{result:o,diff:s}=a;if(o==null)return!1;if(s.isPartial)throw Error(`Could not update render cache for partial diff`);let c=o.code.additionLines,l=this.pendingStructuralRows=n?new Map:void 0,u=[],d=new Map;if(l==null&&r!=null){let t=s.additionLines.length,n=gV(s.additionLines,i);for(let[i,a]of r){if(i<0||i>t||i===t&&(a===``||!n))continue;let r=s.additionLines[i]??``;r!==a&&(s.additionLines[i]=a,s.additionCharacterCount+=a.length-r.length,u.push(i),d.set(i,r),e.has(i)||(c[i]=_V(i,NR(a))))}}for(let[t,n]of e){let e=c[t]?.properties??{},i=n.map(e=>e[2]).join(``),a=t<s.additionLines.length,o=a?s.additionLines[t]??``:``,f=NR(o);if(l==null&&a&&r?.has(t)!==!0){let e=CL(o,i);s.additionLines[t]=e,s.additionCharacterCount+=e.length-o.length,f!==i&&(u.push(t),d.set(t,o))}let p={type:`element`,tagName:`div`,properties:{"data-line":e[`data-line`]??t+1,"data-line-index":e[`data-line-index`]??t,"data-line-type":e[`data-line-type`]??`context`},children:n.map(([e,t,n])=>e===0&&t===``?n===``?{type:`element`,tagName:`br`,properties:{},children:[]}:{type:`text`,value:n}:{type:`element`,tagName:`span`,properties:{"data-char":e,style:`color:${t};`},children:[{type:`text`,value:n}]})};l==null?c[t]=p:l.set(t,p)}let f=!1;if(u.length>0){if(this.editSessionActive){if(s.additionLines.length<=1&&s.additionLines.join(``)===``)this.applyRecomputePreservingSessionType(s,gB(s,this.options.parseDiffOptions)),f=!0;else if(mB(s,s.additionLines))this.applyRecomputePreservingSessionType(s,hB(s,s.additionLines,s.additionCharacterCount,this.options.parseDiffOptions)),f=!0;else{let e=PB(s,u,this.options.parseDiffOptions,d);this.applyExpansionRemap(e),f=e!=null}}else Object.assign(s,bB(s,u,this.options.parseDiffOptions))}return o.baseThemeType=t,a.isDirty=!0,f}applyExpansionRemap(e){e!=null&&(this.expandedHunks=RB(this.expandedHunks,e))}applyDocumentChange(e){let{pendingStructuralRows:t,renderCache:n}=this;this.pendingStructuralRows=void 0;let r=this.diff??n?.diff;if(r==null)return;let i=n?.result;if(r.isPartial)throw Error(`Could not apply document change for partial diff`);let{additionLines:a}=r,{lines:o,characterCount:s}=vV(e);if(r.additionLines=o,r.additionCharacterCount=s,i!=null&&(i.code.additionLines=hV(a,r.additionLines,i.code.additionLines,e)),r.additionLines.length<=1&&r.additionLines.join(``)===``?(this.applyRecomputePreservingSessionType(r,gB(r,this.options.parseDiffOptions)),i!=null&&(i.code.additionLines[0]=_V(0,e.getLineText(0)))):this.editSessionActive?this.applySessionDocumentChange(r,a):Object.assign(r,_B(r,this.options.parseDiffOptions)),t!=null&&i!=null)for(let[e,n]of t)e<i.code.additionLines.length&&(i.code.additionLines[e]=n);n!=null&&(n.isDirty=!0)}applySessionDocumentChange(e,t){let{parseDiffOptions:n}=this.options,r=e.additionLines;mB(e,r)?this.applyRecomputePreservingSessionType(e,hB(e,r,e.additionCharacterCount,n)):this.applyExpansionRemap(NB(e,n,e=>t[e]))}applyRecomputePreservingSessionType(e,t){let n=this.editSessionActive?e.type:void 0;Object.assign(e,t),n!=null&&(e.type=n),this.markEditSessionPass(e)}markEditSessionPass(e){this.editSessionActive&&(e.editSessionDirty=!0)}getUnifiedLineDecoration({lineType:e}){return{gutterLineType:e,contentProperties:{"data-line-type":e}}}getSplitLineDecoration({side:e,type:t}){let n=t===`change`?e===`deletions`?`change-deletion`:`change-addition`:t;return{gutterLineType:n,contentProperties:{"data-line-type":n}}}createAnnotationElement=e=>KI(e);getOptionsWithDefaults(){let{diffIndicators:e=`bars`,diffStyle:t=`split`,disableBackground:n=!1,disableFileHeader:r=!1,disableLineNumbers:i=!1,disableVirtualizationBuffers:a=!1,collapsed:o=!1,expandUnchanged:s=!1,collapsedContextThreshold:c=1,expansionLineCount:l=100,hunkSeparators:u=`line-info`,lineDiffType:d=`word-alt`,maxLineDiffLength:f=1e3,overflow:p=`scroll`,stickyHeader:m=!1,theme:h=ti,headerRenderMode:g=`default`,tokenizeMaxLineLength:_=1e3,tokenizeMaxLength:v=Ur,useTokenTransformer:y=!1,useCSSClasses:b=!1}=this.options;return{diffIndicators:e,diffStyle:t,disableBackground:n,disableFileHeader:r,disableLineNumbers:i,disableVirtualizationBuffers:a,collapsed:o,expandUnchanged:s,collapsedContextThreshold:c,expansionLineCount:l,hunkSeparators:u,lineDiffType:d,maxLineDiffLength:f,overflow:p,stickyHeader:m,theme:this.workerManager?.getDiffRenderOptions().theme??h,headerRenderMode:g,tokenizeMaxLineLength:_,tokenizeMaxLength:v,useTokenTransformer:y,useCSSClasses:b}}initializeHighlighter(){return $r($I(this.computedLangs,{theme:this.getLocalHighlightTheme(),preferredHighlighter:vL(this.workerManager,this.options)}))}hydrate(e){if(e==null)return;this.diff=e;let{options:t}=this.getRenderOptions(e),n=bV(e,this.getTokenizeMaxLength()),r=this.workerManager?.getDiffResultCache(e);r!=null&&!Az(t,r.options)&&(r=void 0),this.renderCache??={diff:e,hydrated:!0,highlighted:!n&&!iV(e),options:t,result:n?void 0:r?.result,renderRange:void 0};let i=this.getHighlightWorkerManager(e);i==null?Xr({theme:this.getLocalHighlightTheme()})??(this.computedLangs=yV(e),this.initializeHighlighter().catch(e=>{e instanceof fi||this.onHighlightError(e)})):this.renderCache.result==null&&!n&&i.highlightDiffAST(this,this.diff)}getHighlightWorkerManager(e){let{editSessionActive:t,workerManager:n}=this;return!t&&n?.isWorkingPool()===!0&&!n.shouldHighlightOnMainThread(e)?n:void 0}cacheHighlightResult(e,t){let{editSessionActive:n,workerManager:r}=this;!n&&r?.isWorkingPool()===!0&&r.setDiffResultCache(e.cacheKey,t)}getLocalHighlightTheme(){return this.workerManager?.getDiffRenderOptions().theme??this.options.theme??ti}getEffectiveCodeOptions(){let e=this.workerManager?.isWorkingPool()===!0?this.workerManager.getDiffRenderOptions():void 0;return{theme:this.getLocalHighlightTheme(),tokenizeMaxLineLength:e?.tokenizeMaxLineLength??this.options.tokenizeMaxLineLength}}getRenderOptions(e){let t=(()=>{if(this.workerManager?.isWorkingPool()===!0){let e=this.workerManager.getDiffRenderOptions();return this.editSessionActive&&e.useTokenTransformer!==!0?{...e,useTokenTransformer:!0}:e}let{theme:e,tokenizeMaxLineLength:t,lineDiffType:n,maxLineDiffLength:r}=this.getOptionsWithDefaults();return{theme:e,useTokenTransformer:this.editSessionActive||this.options.useTokenTransformer===!0,tokenizeMaxLineLength:t,lineDiffType:n,maxLineDiffLength:r}})();this.getOptionsWithDefaults();let{renderCache:n}=this;return n?.result==null||!hR(e,n.diff)||!Az(t,n.options)?{options:t,forceHighlight:!0}:{options:t,forceHighlight:!1}}getDiffForNextRender(e){let{options:t}=this.getRenderOptions(e);if(this.getReadyRenderResult(e,t)!=null||this.renderCache==null)return e;if(hR(this.renderCache.diff,e))return this.renderCache.diff;let n=!(e.additionLines.length>0||e.deletionLines.length>0)||iV(e)||bV(e,this.getTokenizeMaxLength());return this.canRenderDiff(e,t,n)?e:this.renderCache.diff}canRenderDiff(e,t,n){let{renderCache:r}=this;return r==null||hR(r.diff,e)?!0:n?r.result==null&&r.hydrated!==!0||this.workerManager?.isWorkingPool()===!0&&!this.workerManager.shouldHighlightOnMainThread(e)||Xr({theme:t.theme})!=null:r.result==null&&r.hydrated!==!0?!0:this.getHighlightWorkerManager(e)==null?Xr({theme:t.theme})!=null:!r.highlighted}renderDiff(e=this.diff,t=Jr){if(this.diff=e,e==null){this.pendingHighlightResult=void 0;return}let{expandUnchanged:n,collapsedContextThreshold:r}=this.getOptionsWithDefaults(),{options:i,forceHighlight:a}=this.getRenderOptions(e),o=this.getReadyRenderResult(e,i);this.pendingHighlightResult=void 0,o!=null&&(this.renderCache={...o,diff:e,renderRange:void 0},a=!1),this.renderCache??={diff:e,highlighted:!1,options:i,result:void 0,renderRange:void 0};let s=e.additionLines.length>0||e.deletionLines.length>0,c=!s||iV(e)||bV(e,this.getTokenizeMaxLength()),l=this.canRenderDiff(e,i,c),u=!hR(e,this.renderCache.diff),d=!GI(this.renderCache.renderRange,t),f=this.getHighlightWorkerManager(e);if(f!=null){let o=this.renderCache.result==null&&this.renderCache.highlighted&&!c&&!u&&tL(t);l&&!o&&(c||this.renderCache.result==null||!this.renderCache.highlighted&&(u||d))&&(this.renderCache.diff=e,this.renderCache.options=i,this.renderCache.highlighted=!1,(this.renderCache.result==null||u||d||a)&&(this.renderCache.result=f.getPlainDiffAST(e,t.startingLine,t.totalLines,tL(t)||n?!0:this.expandedHunks,r)),this.renderCache.renderRange=t),!c&&s&&(!this.renderCache.highlighted||a)&&f.highlightDiffAST(this,e)}else{this.computedLangs=yV(e);let n=Xr(),r=n!=null&&qr(i.theme,n),o=n!=null&&WI(this.computedLangs,n),s=!c&&o,u=Number.isFinite(t.totalLines);if(l&&n!=null&&r&&(a||c||!this.renderCache.highlighted&&s||this.renderCache.result==null)){let{result:t,options:r}=this.renderDiffWithHighlighter(e,n,c||!o,u);this.renderCache={diff:e,options:r,highlighted:s,result:t,renderRange:void 0},s&&this.cacheHighlightResult(e,{result:t,options:r})}r&&(c||o)||this.asyncHighlight(e,u).then(({result:t,options:n})=>{c||this.cacheHighlightResult(e,{result:t,options:n}),this.applyHighlightResult(e,t,n,!c)}).catch(e=>{e instanceof fi||this.onHighlightError(e)})}return this.renderCache.result==null?void 0:this.processDiffResult(this.renderCache.diff,t,this.renderCache.result)}async asyncRender(e,t=Jr){this.diff=e;let{result:n}=await this.asyncHighlight(e,Number.isFinite(t.totalLines));return this.processDiffResult(e,t,n)}createPreElement(e,t,n){let{diffIndicators:r,disableBackground:i,disableLineNumbers:a,overflow:o}=this.getOptionsWithDefaults();return ZI({type:`diff`,diffIndicators:r,disableBackground:i,disableLineNumbers:a,overflow:o,split:e,totalLines:t,customProperties:n})}async asyncHighlight(e,t=!1){let n=bV(e,this.getTokenizeMaxLength());this.computedLangs=n?[`text`]:yV(e);let r=Xr(),i=r!=null&&qr(this.getLocalHighlightTheme(),r),a=n||r!=null&&WI(this.computedLangs,r);return r!=null&&i&&a||(r=await this.initializeHighlighter()),this.renderDiffWithHighlighter(e,r,n,t)}renderDiffWithHighlighter(e,t,n=!1,r=!1){let{options:i}=this.getRenderOptions(e),{collapsedContextThreshold:a}=this.getOptionsWithDefaults(),o=oB(e,t,i,{forcePlainText:n,lazyLineAST:r,expandedHunks:n?!0:void 0,collapsedContextThreshold:a});if(this.editSessionActive&&e.additionLines.length===1&&e.additionLines[0]===``&&o.code.additionLines[0]==null){let t;if(Qz({diff:e,diffStyle:`both`,expandedHunks:n?!0:void 0,collapsedContextThreshold:a,callback:({additionLine:e})=>{if(e?.lineIndex===0)return t=e,!0}}),t==null)throw Error(`DiffHunksRenderer: missing empty addition line`);o.code.additionLines[0]=_V(0,``,t.unifiedLineIndex,t.splitLineIndex)}return{result:o,options:i}}onHighlightSuccess(e,t,n,r=!0){this.editSessionActive||this.applyHighlightResult(e,t,n,r)}applyHighlightResult(e,t,n,r=!0){let{diff:i,renderCache:a}=this;i!=null&&a!=null&&hR(i,e)&&Az(n,this.getRenderOptions(i).options)&&(a.result!=null&&a.highlighted&&Az(a.options,n)&&hR(a.diff,i)||(this.pendingHighlightResult={diff:i,options:n,highlighted:r,result:t},this.onRenderUpdate?.()))}getMatchingWorkerResultCache(e,t){if(this.editSessionActive)return;let n=this.workerManager?.getDiffResultCache(e);if(n!=null&&Az(t,n.options))return n}getReadyRenderResult(e,t){let{pendingHighlightResult:n}=this;if(n!=null&&hR(n.diff,e)&&Az(n.options,t))return n;let r=this.getMatchingWorkerResultCache(e,t);if(!(r==null||this.hasHighlightedRenderCache(e,t)))return{diff:e,highlighted:!0,...r}}hasHighlightedRenderCache(e,t){let{renderCache:n}=this;return n?.result!=null&&n.highlighted&&hR(e,n.diff)&&Az(t,n.options)}onHighlightError(e){console.error(e)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??1e5}processDiffResult(e,t,{code:n,themeStyles:r,baseThemeType:i}){let{diffStyle:a,disableFileHeader:o,expandUnchanged:s,expansionLineCount:c,collapsedContextThreshold:l,hunkSeparators:u}=this.getOptionsWithDefaults(),d=this.renderCache?.isDirty??!1,f=a===`unified`,p=xV(e,this.options.loadDiffFiles!=null),m=!e.isPartial||p,h=[],g=[],_=[],v=[],{additionLines:y,deletionLines:b}=n,x={rowCount:0,hunkSeparators:u,additionsContentAST:h,deletionsContentAST:g,unifiedContentAST:_,unifiedGutterAST:pi(),deletionsGutterAST:pi(),additionsGutterAST:pi(),expansionLineCount:c,hunkData:v,incrementRowCount(e=1){x.rowCount+=e},pushToGutter(e,t){switch(e){case`unified`:x.unifiedGutterAST.children.push(t);break;case`deletions`:x.deletionsGutterAST.children.push(t);break;case`additions`:x.additionsGutterAST.children.push(t)}}},S=Hz({fileDiff:e,errorPrefix:`DiffHunksRenderer.processDiffResult`}),C={size:0,side:void 0,increment(){this.size+=1},flush(){a!==`unified`&&(this.size<=0||this.side==null?(this.side=void 0,this.size=0):(this.side===`additions`?(x.pushToGutter(`additions`,si(void 0,`buffer`,this.size)),h?.push(jz(this.size))):(x.pushToGutter(`deletions`,si(void 0,`buffer`,this.size)),g?.push(jz(this.size))),this.size=0,this.side=void 0))}},w=(e,t,n,r,i)=>{x.pushToGutter(e,di(t,n,r,i))};function T(e){C.flush(),a===`unified`?fV(`unified`,e,x):(fV(`deletions`,e,x),fV(`additions`,e,x))}this.pushFileLevelAnnotations(e,a,t,x),Qz({diff:e,diffStyle:a,startingLine:t.startingLine,totalLines:t.totalLines,expandedHunks:s?!0:this.expandedHunks,collapsedContextThreshold:l,callback:({hunkIndex:t,hunk:n,collapsedBefore:r,collapsedAfter:i,additionLine:o,deletionLine:s,type:c})=>{let l=s==null?o.splitLineIndex:s.splitLineIndex,h=o==null?s.unifiedLineIndex:o.unifiedLineIndex;a===`split`&&c!==`change`&&C.flush(),r>0&&T({hunkIndex:t,collapsedLines:r,rangeSize:Math.max(n?.collapsedBefore??0,0),hunkSpecs:n?.hunkSpecs,isFirstHunk:t===0,isLastHunk:!1,isExpandable:m});let g=a===`unified`?h:l,_={type:c,hunkIndex:t,lineIndex:g,unifiedLineIndex:h,splitLineIndex:l,deletionLine:s,additionLine:o};if(a===`unified`){let n=this.getUnifiedInjectedRowsForLine?.(_);n?.before!=null&&lV(n.before,x);let r=s==null?void 0:b[s.lineIndex],i=o==null?void 0:y[o.lineIndex];if(r==null&&i==null){let t=`DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong`;throw console.error(t,{file:e.name}),Error(t)}let a=c===`change`?o==null?`change-deletion`:`change-addition`:c,u=this.getUnifiedLineDecoration({type:c,lineType:a,additionLineIndex:o?.lineIndex,deletionLineIndex:s?.lineIndex});w(`unified`,u.gutterLineType,o==null?s.lineNumber:o.lineNumber,`${h},${l}`,u.gutterProperties),i==null?r!=null&&(r=pV(r,u.contentProperties,d&&s!=null?{"data-line":s.lineNumber,"data-line-index":`${h},${l}`}:void 0)):i=pV(i,u.contentProperties,d&&o!=null?{"data-line":o.lineNumber,"data-line-index":`${h},${l}`}:void 0),dV({diffStyle:`unified`,type:c,deletionLine:r,additionLine:i,unifiedSpan:this.getAnnotations(`unified`,s?.lineNumber,o?.lineNumber,t,g),createAnnotationElement:e=>this.createAnnotationElement(e),context:x}),n?.after!=null&&lV(n.after,x)}else{let n=this.getSplitInjectedRowsForLine?.(_);n?.before!=null&&uV(n.before,x,C);let r=s==null?void 0:b[s.lineIndex],i=o==null?void 0:y[o.lineIndex],a=this.getSplitLineDecoration({side:`deletions`,type:c,lineIndex:s?.lineIndex}),u=this.getSplitLineDecoration({side:`additions`,type:c,lineIndex:o?.lineIndex});if(r==null&&i==null){let t=`DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong`;throw console.error(t,{file:e.name}),Error(t)}let f=(()=>{if(c===`change`){if(i==null)return`additions`;if(r==null)return`deletions`}})();f==null?c===`change`&&C.flush():(C.side!=null&&C.side!==f&&C.flush(),C.side=f,C.increment());let p=this.getAnnotations(`split`,s?.lineNumber,o?.lineNumber,t,g);if(p!=null&&C.size>0&&C.flush(),s!=null){let e=pV(r,a.contentProperties,d?{"data-line":s.lineNumber,"data-line-index":`${s.unifiedLineIndex},${l}`}:void 0);w(`deletions`,a.gutterLineType,s.lineNumber,`${s.unifiedLineIndex},${l}`,a.gutterProperties),e!=null&&(r=e)}if(o!=null){let e=pV(i,u.contentProperties,d?{"data-line":o.lineNumber,"data-line-index":`${o.unifiedLineIndex},${l}`}:void 0);w(`additions`,u.gutterLineType,o.lineNumber,`${o.unifiedLineIndex},${l}`,u.gutterProperties),e!=null&&(i=e)}dV({diffStyle:`split`,type:c,additionLine:i,deletionLine:r,...p,createAnnotationElement:e=>this.createAnnotationElement(e),context:x}),n?.after!=null&&uV(n.after,x,C)}let v=a===`split`&&n!=null&&l===n.splitLineStart+n.splitLineCount-1,E=t===e.hunks.length-1&&n!=null&&(a===`split`?l===n.splitLineStart+n.splitLineCount-1:h===n.unifiedLineStart+n.unifiedLineCount-1),D=v?n.noEOFCRDeletions:!1,O=v?n.noEOFCRAdditions:!1,k=(s?.noEOFCR??!1)||D,A=(o?.noEOFCR??!1)||O;if(A||k){if(a===`split`&&C.flush(),k){let e=c===`context`||c===`context-expanded`?c:`change-deletion`;a===`unified`?(x.unifiedContentAST.push(Mz(e)),x.pushToGutter(`unified`,si(e,`metadata`,1))):(x.deletionsContentAST.push(Mz(e)),x.pushToGutter(`deletions`,si(e,`metadata`,1)),A||(x.pushToGutter(`additions`,si(void 0,`buffer`,1)),x.additionsContentAST.push(jz(1))))}if(A&&!(f&&k&&c!==`change`)){let e=c===`context`||c===`context-expanded`?c:`change-addition`;a===`unified`?(x.unifiedContentAST.push(Mz(e)),x.pushToGutter(`unified`,si(e,`metadata`,1))):(x.additionsContentAST.push(Mz(e)),x.pushToGutter(`additions`,si(e,`metadata`,1)),k||(x.pushToGutter(`deletions`,si(void 0,`buffer`,1)),x.deletionsContentAST.push(jz(1))))}x.incrementRowCount(1)}u!==`simple`&&u!==`metadata`&&(i>0||E&&p)&&T({hunkIndex:c===`context-expanded`?t:t+1,collapsedLines:E&&p?`unknown`:i,rangeSize:S,hunkSpecs:void 0,isFirstHunk:!1,isLastHunk:!0,isExpandable:m}),x.incrementRowCount(1)}}),a===`split`&&C.flush();let E=Math.max(Iz(e.hunks),e.additionLines.length??0,e.deletionLines.length??0),D=t.bufferBefore>0||t.bufferAfter>0,O=!f&&e.type!==`deleted`,k=!f&&e.type!==`new`,A=x.rowCount>0||D;h=O&&A?h:void 0,g=k&&A?g:void 0,_=f&&A?_:void 0;let j=this.createPreElement(g!=null&&h!=null,E);return{fileDiff:e,unifiedGutterAST:f&&A?x.unifiedGutterAST.children:void 0,unifiedContentAST:_,deletionsGutterAST:k&&A?x.deletionsGutterAST.children:void 0,deletionsContentAST:g,additionsGutterAST:O&&A?x.additionsGutterAST.children:void 0,additionsContentAST:h,hunkData:v,preNode:j,themeStyles:r,baseThemeType:i,headerElement:o?void 0:this.renderHeader(e),totalLines:E,rowCount:x.rowCount,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:``}}renderCodeAST(e,t){let n=e===`unified`?t.unifiedGutterAST:e===`deletions`?t.deletionsGutterAST:t.additionsGutterAST,r=e===`unified`?t.unifiedContentAST:e===`deletions`?t.deletionsContentAST:t.additionsContentAST;if(n==null||r==null)return;let i=pi(n);return i.properties.style=`grid-row: span ${t.rowCount}`,[i,wL(r,t.rowCount)]}renderFullAST(e,t=[]){let n=this.getOptionsWithDefaults().hunkSeparators===`line-info`,r=this.renderCodeAST(`unified`,e);if(r!=null)return t.push(ci({tagName:`code`,children:r,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-unified":``}})),{...e.preNode,children:t};let i=this.renderCodeAST(`deletions`,e);i!=null&&t.push(ci({tagName:`code`,children:i,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-deletions":``}}));let a=this.renderCodeAST(`additions`,e);return a!=null&&t.push(ci({tagName:`code`,children:a,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-additions":``}})),{...e.preNode,children:t}}renderFullHTML(e,t=[]){return gi(this.renderFullAST(e,t))}renderPartialHTML(e,t){return gi(t==null?e:ci({tagName:`code`,children:e,properties:{"data-code":``,"data-container-size":this.getOptionsWithDefaults().hunkSeparators===`line-info`?``:void 0,[`data-${t}`]:``}}))}pushFileLevelAnnotations(e,t,n,r){if(!SL(n))return;let i=e.type===`new`?[]:this.getAnnotationNames(xL(this.deletionAnnotations)),a=e.type===`deleted`?[]:this.getAnnotationNames(xL(this.additionAnnotations));if(i.length===0&&a.length===0)return;let{createAnnotationElement:o}=this;dV(t===`unified`?{diffStyle:t,type:`context`,unifiedSpan:{type:`annotation`,hunkIndex:-1,lineIndex:-1,annotations:i.concat(a)},createAnnotationElement:o,context:r}:{diffStyle:t,type:`context`,deletionSpan:{type:`annotation`,hunkIndex:-1,lineIndex:-1,annotations:i},additionSpan:{type:`annotation`,hunkIndex:-1,lineIndex:-1,annotations:a},createAnnotationElement:o,context:r})}getAnnotations(e,t,n,r,i){let a={type:`annotation`,hunkIndex:r,lineIndex:i,annotations:[]};if(t!=null)for(let e of this.deletionAnnotations[t]??[])a.annotations.push(this.annotationSlotName(e));let o={type:`annotation`,hunkIndex:r,lineIndex:i,annotations:[]};if(n!=null)for(let t of this.additionAnnotations[n]??[])(e===`unified`?a:o).annotations.push(this.annotationSlotName(t));if(e===`unified`)return a.annotations.length>0?a:void 0;if(o.annotations.length!==0||a.annotations.length!==0)return{deletionSpan:a,additionSpan:o}}getAnnotationNames(e){return e?.map(e=>this.annotationSlotName(e))??[]}renderHeader(e){let{headerRenderMode:t,stickyHeader:n}=this.getOptionsWithDefaults();return JI({fileOrDiff:e,mode:t,stickyHeader:n})}},sV=new Intl.PluralRules(`en-US`);function cV(e){return`${e} unmodified line${sV.select(e)===`one`?``:`s`}`}function lV(e,t){for(let n of e)t.unifiedContentAST.push(n.content),t.pushToGutter(`unified`,n.gutter),t.incrementRowCount(1)}function uV(e,t,n){for(let{deletion:r,addition:i}of e){if(r==null&&i==null)continue;let e=r!=null&&i!=null?void 0:r==null?`deletions`:`additions`;(e==null||n.side!==e)&&n.flush(),r!=null&&(t.deletionsContentAST.push(r.content),t.pushToGutter(`deletions`,r.gutter)),i!=null&&(t.additionsContentAST.push(i.content),t.pushToGutter(`additions`,i.gutter)),e!=null&&(n.side=e,n.increment()),t.incrementRowCount(1)}}function dV({diffStyle:e,type:t,deletionLine:n,additionLine:r,unifiedSpan:i,deletionSpan:a,additionSpan:o,createAnnotationElement:s,context:c}){let l=!1;if(e===`unified`){if(r==null?n!=null&&c.unifiedContentAST.push(n):c.unifiedContentAST.push(r),i!=null){let e=t===`change`?n==null?`change-addition`:`change-deletion`:t;c.unifiedContentAST.push(s(i)),c.pushToGutter(`unified`,si(e,`annotation`,1)),l=!0}}else if(e===`split`){if(n!=null&&c.deletionsContentAST.push(n),r!=null&&c.additionsContentAST.push(r),a!=null){let e=t===`change`?n==null?`context`:`change-deletion`:t;c.deletionsContentAST.push(s(a)),c.pushToGutter(`deletions`,si(e,`annotation`,1)),l=!0}if(o!=null){let e=t===`change`?r==null?`context`:`change-addition`:t;c.additionsContentAST.push(s(o)),c.pushToGutter(`additions`,si(e,`annotation`,1)),l=!0}}l&&c.incrementRowCount(1)}function fV(e,{hunkIndex:t,collapsedLines:n,rangeSize:r,hunkSpecs:i,isFirstHunk:a,isLastHunk:o,isExpandable:s},c){if(typeof n==`number`&&n<=0)return;let l=e===`unified`?c.unifiedContentAST:e===`deletions`?c.deletionsContentAST:c.additionsContentAST;if(c.hunkSeparators===`metadata`){i!=null&&(c.pushToGutter(e,Pz({type:`metadata`,content:i,isFirstHunk:a,isLastHunk:o})),l.push(Pz({type:`metadata`,content:i,isFirstHunk:a,isLastHunk:o})),e!==`additions`&&c.incrementRowCount(1));return}if(c.hunkSeparators===`simple`){t>0&&(c.pushToGutter(e,Pz({type:`simple`,isFirstHunk:a,isLastHunk:!1})),l.push(Pz({type:`simple`,isFirstHunk:a,isLastHunk:!1})),e!==`additions`&&c.incrementRowCount(1));return}let u=Fz(e,t),d=r>c.expansionLineCount,f=s?t:void 0,p=typeof n==`number`?cV(n):`More unchanged context may be available`;c.pushToGutter(e,Pz({type:c.hunkSeparators,content:p,expandIndex:f,chunked:d,slotName:u,isFirstHunk:a,isLastHunk:o})),l.push(Pz({type:c.hunkSeparators,content:p,expandIndex:f,chunked:d,slotName:u,isFirstHunk:a,isLastHunk:o})),e!==`additions`&&c.incrementRowCount(1),c.hunkData.push({slotName:u,hunkIndex:t,lines:typeof n==`number`?n:0,lineCountKnown:typeof n==`number`,type:e,expandable:s?{up:!a,down:!o,chunked:d}:void 0})}function pV(e,t,n){return e==null||e.type!==`element`||t==null&&n==null?e:{...e,properties:{...e.properties,...t,...n}}}function mV(e){return e.length>0&&e[e.length-1]===``?e.length-1:e.length}function hV(e,t,n,r){let i=mV(e),a=mV(t),o=Math.min(i,a),s=0;for(;s<o&&e[s]===t[s];)s++;let c=0;for(;c<o-s&&e[i-1-c]===t[a-1-c];)c++;let l=Array(t.length);for(let e=0;e<s;e++)l[e]=n[e];for(let e=0;e<c;e++)l[a-1-e]=n[i-1-e];i<e.length&&a<t.length&&(l[t.length-1]=n[e.length-1]);for(let e=s;e<t.length;e++)l[e]??=_V(e,r.getLineText(e));return l}function gV(e,t){return t===e.length+1&&e.at(-1)?.endsWith(`
|
|
180
|
+
`)===!0}function _V(e,t,n=e,r=e){return{type:`element`,tagName:`div`,properties:{"data-line":e+1,"data-line-index":`${n},${r}`,"data-line-type":`context`},children:[{type:`element`,tagName:`span`,properties:{"data-char":0},children:[{type:`text`,value:t}]}]}}function vV(e){let t=[],n=0;for(let r=0;r<e.lineCount;r++){let i=e.getLineText(r,!0);t.push(i),n+=i.length}return{lines:t,characterCount:n}}function yV(e){if(e.lang!=null)return[e.lang];let t=Yt(e.prevName??e.name),n=Yt(e.name);return t===n?[n]:[t,n]}function bV(e,t){return Math.max(e.additionLines.length,e.deletionLines.length)>t}function xV(e,t){return e.isPartial&&t&&(e.type===`change`||e.type===`rename-changed`)}function SV(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side&&e.metadata===t.metadata}function CV(e,t){return e.slotName===t.slotName&&e.hunkIndex===t.hunkIndex&&e.lines===t.lines&&e.lineCountKnown===t.lineCountKnown&&e.type===t.type&&e.expandable?.chunked===t.expandable?.chunked&&e.expandable?.up===t.expandable?.up&&e.expandable?.down===t.expandable?.down}async function wV(e,t=300){let n;try{await Promise.race([e(),new Promise(e=>{n=setTimeout(e,t)})])}finally{n!=null&&clearTimeout(n)}}function TV({oldFile:e,newFile:t},n){if(e!==void 0||t!==void 0){if(e===void 0||t===void 0)throw Error(`${n}: Pass null for an intentionally missing oldFile or newFile side`);if(e===null){if(t===null)throw Error(`${n}: You must pass oldFile, newFile, or both`);return{oldFile:e,newFile:t}}return{oldFile:e,newFile:t}}}function EV(e){return{theme:e?.theme,disableLineNumbers:e?.disableLineNumbers,overflow:e?.overflow,collapsed:e?.collapsed,disableFileHeader:e?.disableFileHeader,disableVirtualizationBuffers:e?.disableVirtualizationBuffers,stickyHeader:e?.stickyHeader,preferredHighlighter:e?.preferredHighlighter,useCSSClasses:e?.useCSSClasses,useTokenTransformer:$L(e),tokenizeMaxLineLength:e?.tokenizeMaxLineLength,tokenizeMaxLength:e?.tokenizeMaxLength,diffStyle:e?.diffStyle,diffIndicators:e?.diffIndicators,disableBackground:e?.disableBackground,hunkSeparators:typeof e?.hunkSeparators==`function`?`custom`:e?.hunkSeparators,expandUnchanged:e?.expandUnchanged,loadDiffFiles:e?.loadDiffFiles,parseDiffOptions:e?.parseDiffOptions,collapsedContextThreshold:e?.collapsedContextThreshold,lineDiffType:e?.lineDiffType,maxLineDiffLength:e?.maxLineDiffLength,expansionLineCount:e?.expansionLineCount,headerRenderMode:e?.renderCustomHeader==null?`default`:`custom`}}function DV(e){return e.isPartial&&(e.type===`change`||e.type===`rename-changed`||e.type===`rename-pure`)}function OV(e){let t={...e};return delete t.cacheKey,t}function kV(e,t){if(e.isPartial||t.isPartial)throw Error(`FileDiff.shouldResetEditorForExternalDiff: diffs must be fully hydrated`);let n=e.lang??Yt(e.name),r=t.lang??Yt(t.name),i=e.type!==`new`,a=t.type!==`new`;return e.name!==t.name||n!==r||i!==a||e.deletionLines.length!==t.deletionLines.length||e.deletionLines.some((e,n)=>e!==t.deletionLines[n])}function AV(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function jV(e,t){let{oldFile:n}=e;return n==null?t.type===`new`:t.type!==`new`&&n.name===(t.prevName??t.name)&&AV(n.lines,t.deletionLines)}var MV=-1,NV=class{options;workerManager;requestOwnerRender;static LoadedCustomComponent=!0;__id=`file-diff:${++MV}`;type=`file-diff`;fileContainer;spriteSVG;pre;codeUnified;codeDeletions;codeAdditions;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;hasAdoptedThemeCSS=!1;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;headerElement;headerPrefix;headerFilenameSuffix;headerMetadata;headerCustom;separatorCache=new Map;errorWrapper;placeHolder;hunksRenderer;resizeManager;scrollSyncManager;interactionManager;annotationCache=new Map;get lineAnnotations(){return this.renderedData?.lineAnnotations??Gr}managersDirty=!1;deletionFile;additionFile;fileDiff;editSession;renderedData;pendingData;forceRenderOverride;renderRange;pendingFiles;appliedPreAttributes;headerCache={lastRenderedHTML:void 0,html:void 0,fileDiff:void 0};lastRowCount;mounted=!1;enabled=!0;editor;refreshViewTimeout;lineStateRefreshPending=!1;deferredSelectedLines;deferredEditorActiveLine;constructor(e={theme:ti},t,n){this.options=e,this.workerManager=t,this.requestOwnerRender=n,this.hunksRenderer=this.createHunksRenderer(e),this.resizeManager=new II,this.scrollSyncManager=new kz,this.interactionManager=new hI(`diff`,gI(e,typeof e.hunkSeparators==`function`||(e.hunkSeparators??`line-info`)===`line-info`||e.hunkSeparators===`line-info-basic`?this.handleExpandHunk:void 0,this.getLineIndex)),this.workerManager?.subscribeToThemeChanges(this),this.enabled=!0}handleHighlightRender=()=>{this.rerender()};getTheme(){return this.workerManager?.getDiffRenderOptions().theme??this.options.theme??ti}getHunksRendererOptions(e){return EV(e)}createHunksRenderer(e){return new oV(this.getHunksRendererOptions(e),this.getAnnotationSlotName,this.handleHighlightRender,this.workerManager)}getLineIndex=(e,t=`additions`)=>this.getLineIndexForDiff(this.getDiffForLineIndex(),e,t);getDiffForLineIndex(){return this.getRenderedDiff()}getLineIndexForDiff(e,t,n){if(e==null)return;let r=e.hunks.at(-1),i,a;hunkIterator:for(let o of e.hunks){let e=n===`deletions`?o.deletionStart:o.additionStart,s=n===`deletions`?o.deletionCount:o.additionCount,c=yR(e,s)+1,l=o.splitLineStart,u=o.unifiedLineStart;if(t<c){let e=c-t;i=Math.max(u-e,0),a=Math.max(l-e,0);break hunkIterator}if(t>=c+s){if(o===r){let e=t-(c+s);i=u+o.unifiedLineCount+e,a=l+o.splitLineCount+e;break hunkIterator}}else{for(let e of o.hunkContent)if(e.type===`context`){if(t<c+e.lines){let e=t-c;a=l+e,i=u+e;break hunkIterator}c+=e.lines,l+=e.lines,u+=e.lines}else{let r=n===`deletions`?e.deletions:e.additions;if(t<c+r){let r=t-c;i=u+(n===`additions`?e.deletions:0)+r,a=l+r;break hunkIterator}c+=r,l+=Math.max(e.deletions,e.additions),u+=e.deletions+e.additions}break hunkIterator}}if(i!=null&&a!=null)return[i,a]}setOptions(e){e!=null&&(this.options=e,this.clearReusableHeader(),this.hunksRenderer.setOptions(this.getHunksRendererOptions(e)),this.syncInteractionOptions())}syncInteractionOptions(){this.interactionManager.setOptions(gI(this.options,typeof this.options.hunkSeparators==`function`||(this.options.hunkSeparators??`line-info`)===`line-info`||this.options.hunkSeparators===`line-info-basic`?this.handleExpandHunk:void 0,this.getLineIndex))}mergeOptions(e){this.options={...this.options,...e}}setThemeType(e){(this.options.themeType??`system`)!==e&&(this.mergeOptions({themeType:e}),this.applyCachedThemeState(e))}applyCachedThemeState(e){if(typeof this.options.theme==`string`||this.fileContainer==null||this.appliedThemeCSS==null)return!1;let t=this.appliedThemeCSS.baseThemeType??e;return this.appliedThemeCSS.themeType!==t&&(this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,e,this.appliedThemeCSS.baseThemeType),!0)}hasThemeChanged(){return this.appliedThemeCSS!=null&&!cI(this.appliedThemeCSS.theme,this.getTheme())}getHoveredLine=()=>this.interactionManager.getHoveredLine();getAnnotationSlotName=e=>QL(this.editSession?.annotations,e,eL);getLatestAnnotations(){return this.pendingData?.lineAnnotations??this.editSession?.annotations?.current??this.lineAnnotations}getAnnotationsForDiff(e){let{pendingData:t}=this;return t!=null&&hR(e,t.fileDiff)?t.lineAnnotations:this.lineAnnotations}isNewAnnotations(e){let t=this.editSession?.annotations;return e===this.getLatestAnnotations()?!1:t==null||e!==t.provided&&e!==t.current}setLineAnnotations(e){let t=this.editSession?.annotations;if(t!=null){if(!this.isNewAnnotations(e))return;ZL(t,e,eL)}let n=this.getWorkingDiff();n!=null&&(this.pendingData={fileDiff:n,lineAnnotations:e})}syncEditSessionAnnotationsFromEditor(e){let t=this.editSession?.annotations;return t==null||e===t.current?!1:(t.current=e,this.renderedData!=null&&(this.renderedData.lineAnnotations=e),this.pendingData=void 0,this.hunksRenderer.setLineAnnotations(e),this.renderAnnotations(),!0)}canPartiallyRender(e,t,n){return!(e||t||n||typeof this.options.hunkSeparators==`function`)}setSelectedLines(e,t){this.lineStateRefreshPending?this.deferredSelectedLines=[e,t]:this.interactionManager.setSelection(e,t)}setEditorActiveLine(e,t){this.lineStateRefreshPending?this.deferredEditorActiveLine=[e,t]:this.interactionManager.setEditorActiveLine(e,{lineNumberOnly:t?.lineNumberOnly,side:t?.side??`additions`})}flushDeferredLineState(){let{deferredEditorActiveLine:e,deferredSelectedLines:t}=this;this.lineStateRefreshPending=!1,this.deferredEditorActiveLine=void 0,this.deferredSelectedLines=void 0,e!=null&&this.setEditorActiveLine(...e),t!=null&&this.interactionManager.setSelection(...t)}flushManagers(){if(!this.managersDirty||this.pre==null){this.managersDirty=!1;return}let{diffStyle:e=`split`,overflow:t=`scroll`}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,{disableAnnotations:t===`wrap`,columnVariables:this.shouldApplyColumnVariables(t)?`apply`:`measure`}),t===`scroll`&&e===`split`?this.scrollSyncManager.setup(this.pre,this.codeDeletions,this.codeAdditions):this.scrollSyncManager.cleanUp(),this.managersDirty=!1}shouldApplyColumnVariables(e){return typeof this.options.hunkSeparators==`function`||e===`scroll`&&(this.lineAnnotations.length>0||this.pre?.hasAttribute(`data-has-merge-conflict`)===!0)}getCodeScrollLeft(){return Math.max(this.codeUnified?.scrollLeft??0,this.codeDeletions?.scrollLeft??0,this.codeAdditions?.scrollLeft??0)}setCodeScrollLeft(e){this.codeUnified!=null&&(this.codeUnified.scrollLeft=e),this.codeAdditions!=null&&(this.codeAdditions.scrollLeft=e),this.codeDeletions!=null&&(this.codeDeletions.scrollLeft=e)}__getEffectiveCodeOptions(){return{...this.options,...this.hunksRenderer.getEffectiveCodeOptions()}}cleanUp(e=!1){let{editor:t}=this;aI(this.handleEditSessionRender),this.emitPostRender(!0),t?.cleanUp(e?`recycle`:`discard`),e||(this.editor=void 0),this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.managersDirty=!1,this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,e||(this.pendingFiles=void 0),this.isComponentManaged||this.fileContainer?.remove(),this.fileContainer=void 0,this.mounted=!1,e||(this.renderedData=void 0,this.pendingData=void 0),this.clearAuxiliaryNodes(),this.annotationCache.clear(),this.pre?.remove(),this.pre=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.headerElement?.remove(),this.headerElement=void 0,this.clearHeaderSlots(),this.placeHolder?.remove(),this.placeHolder=void 0,this.headerCache.lastRenderedHTML=void 0,e||this.clearReusableHeader(),this.errorWrapper?.remove(),this.errorWrapper=void 0,this.spriteSVG=void 0,this.lastRowCount=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,e?this.hunksRenderer.recycle():(this.hunksRenderer.cleanUp(),this.workerManager=void 0,this.fileDiff=void 0,this.editSession=void 0,this.deletionFile=void 0,this.additionFile=void 0),this.refreshViewTimeout!=null&&(clearTimeout(this.refreshViewTimeout),this.refreshViewTimeout=void 0),this.lineStateRefreshPending=!1,this.deferredEditorActiveLine=void 0,this.deferredSelectedLines=void 0,this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate({fileContainer:e,prerenderedHTML:t,preventEmit:n=!1,lineAnnotations:r,fileDiff:i,...a}){if(!this.enabled)throw Error(`FileDiff.hydrate: attempting to call hydrate after cleaned up`);if(this.fileContainer!=null)throw Error(`FileDiff.hydrate: hydrate can only be called before the instance has rendered or hydrated`);let o=TV(a,`FileDiff.hydrate`),s=o?.oldFile,c=o?.newFile;this.hydrateElements(e,t);let l=this.editor!=null;l||RV(this.pre,IV({fileDiff:i,oldFile:s,newFile:c}),this.options.collapsed)||zV(this.headerElement,LV({fileDiff:i,oldFile:s,newFile:c}),this.options.disableFileHeader)?this.render({...a,fileContainer:e,lineAnnotations:r,fileDiff:i,forceRender:l||a.forceRender,preventEmit:!0}):this.hydrationSetup({fileDiff:i,lineAnnotations:r,...o}),n||this.emitPostRender()}hydrateElements(e,t){this.fileContainer!==e&&this.emitPostRender(!0),GL(e,t);for(let t of e.shadowRoot?.children??[])if(t instanceof SVGElement)this.spriteSVG=t;else if(t instanceof HTMLElement){if(t instanceof HTMLPreElement){this.pre=t;for(let e of t.children)e instanceof HTMLElement&&e.tagName.toLowerCase()===`code`&&(`deletions`in e.dataset&&(this.codeDeletions=e),`additions`in e.dataset&&(this.codeAdditions=e),`unified`in e.dataset&&(this.codeUnified=e))}else`diffsHeader`in t.dataset?this.headerElement=t:t instanceof HTMLStyleElement&&t.hasAttribute(`data-theme-css`)?this.themeCSSStyle=t:t instanceof HTMLStyleElement&&t.hasAttribute(`data-unsafe-css`)&&(this.unsafeCSSStyle=t,this.appliedUnsafeCSS=t.textContent)}this.pre!=null&&(this.syncCodeNodesFromPre(this.pre),this.pre.removeAttribute(`data-dehydrated`)),this.fileContainer=e,this.hydrateMeasuredScrollbar()}hydrationSetup({fileDiff:e,oldFile:t,newFile:n,lineAnnotations:r}){let i=r??this.getLatestAnnotations();this.pendingData=void 0,this.additionFile=n,this.deletionFile=t,this.fileDiff=e??(t!==void 0&&n!==void 0?Dz(t,n,this.options.parseDiffOptions):void 0),this.renderedData=this.fileDiff==null?void 0:{fileDiff:this.fileDiff,lineAnnotations:i},this.fileDiff!=null&&this.adoptRenderData(this.fileDiff),this.pre!=null&&(this.syncInteractionOptions(),this.hunksRenderer.hydrate(this.fileDiff),this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.managersDirty=!0,this.flushManagers())}rerender(){!this.enabled||this.getInputDiff()==null&&this.additionFile==null&&this.deletionFile==null||this.requestRender()||this.render({forceRender:!0,renderRange:this.renderRange})}requestRender(){let{requestOwnerRender:e}=this;return this.editSession!=null||e==null?!1:(this.forceRenderOverride=!0,e(),!0)}get isComponentManaged(){return this.requestOwnerRender!=null}onThemeChange(){this.hunksRenderer.clearRenderCache(),this.rerender()}handleExpandHunk=(e,t,n)=>{this.expandHunk(e,t,n)};expandHunk=(e,t,n)=>{this.loadFilesIfNecessary(),this.hunksRenderer.expandHunk(e,t,n),this.rerender()};loadFilesIfNecessary(){let e=this.getInputDiff(),{loadDiffFiles:t}=this.options;if(e==null||!DV(e)||this.pendingFiles?.fileDiff===e)return;if(t==null)throw Error(`FileDiff: loadDiffFiles is required to load full files for a partial diff`);let n=this.loadFilesForDiff(e,t),r=this.pendingFiles={fileDiff:e,promise:n};r.promise=n.finally(()=>{this.pendingFiles===r&&(this.pendingFiles=void 0)})}__canAttachEditor(){let e=this.getInputDiff();return e!=null&&!e.isPartial}async prepareForEditing(){if(this.__canAttachEditor())return;let e=this.__prepareForEditing();if(e==null){let e=this.getInputDiff();throw e?.isPartial===!0&&!DV(e)?Error(`FileDiff.prepareForEditing: this partial diff cannot be hydrated; provide a complete diff`):Error(`FileDiff.prepareForEditing: a partial diff requires loadDiffFiles`)}if(await e,!this.__canAttachEditor())throw Error(`FileDiff.prepareForEditing: the diff did not finish loading`)}__prepareForEditing(){if(this.__canAttachEditor())return;let e=this.getInputDiff();if(e?.isPartial===!0&&!DV(e))throw Error(`FileDiff: this partial diff cannot be hydrated; provide a complete diff to edit`);return this.loadFilesIfNecessary(),this.pendingFiles?.promise}async loadFilesForDiff(e,t){try{let n=await t(e);if(this.getInputDiff()!==e)return;await this.handleFilesLoaded(e,n)}catch(e){if(this.options.disableErrorHandling===!0)throw e;console.error(e)}}async handleFilesLoaded(e,t){this.getInputDiff()===e&&e.isPartial&&(wR(`merge`,e,t),this.setHydratedState(t),this.installHydratedSessionDiff(e)?this.rerender():(await wV(()=>this.primeHighlightCache(e)),this.enabled&&this.getInputDiff()===e&&this.rerender()))}installHydratedSessionDiff(e){if(e.isPartial)throw Error(`FileDiff.installHydratedSessionDiff: diffs cannot be partial for editing`);return this.getInputDiff()===e&&this.editSession?.outgoingDiff!=null&&(this.installEditSession(e),!0)}updateInputDiff(e,t){if(hR(this.getInputDiff(),e))return!1;let n=this.getLatestAnnotations();this.fileDiff=e;let{editSession:r}=this,i=r?.outgoingDiff??r?.diff;return r!=null&&(e.isPartial?r.inputDiff=e:this.installEditSession(e),this.editSession!=null&&(this.editSession.outgoingDiff=i)),this.editSession?.annotations!=null&&t!=null&&(this.editSession.annotations=XL(t,eL,this.editSession.annotations)),this.pendingData={fileDiff:this.editSession?.diff??e,lineAnnotations:this.editSession?.annotations?.current??t??n},i!=null&&e.isPartial&&this.loadFilesIfNecessary(),!0}installEditSession(e,t,n){let r=e.additionLines.join(``),i=t==null?void 0:CR(t.contents),a=n!=null&&jV(n,e);if(n!=null&&!a)throw Error(`FileDiff: retained session cannot resume against a different old file`);if(t!=null&&t.contents!==r&&!a)throw Error(`FileDiff: retained edits are missing their diff session state`);let o=t==null||t.name===e.name&&t.lang===e.lang&&t.contents===r,s=OV(e);t!=null&&i!=null&&!o&&(s.name=t.name,s.lang=t.lang),a&&n!=null&&t!=null&&i!=null&&(s.additionLines=i,s.additionCharacterCount=t.contents.length,s.type=n.type,s.hunks=n.hunks,s.editSessionDirty=!0,kB(s));let c=this.editSession?.annotations??XL(this.getLatestAnnotations(),eL);this.editSession={diff:s,inputDiff:e,annotations:c,outgoingDiff:this.editSession?.outgoingDiff},this.pendingData={fileDiff:s,lineAnnotations:c.current},this.hunksRenderer.beginEditSession(s,o&&!a?e:void 0)}setHydratedState(e){this.deletionFile=e.oldFile,this.additionFile=e.newFile,this.workerManager?.cleanUpTasks(this.hunksRenderer),this.hunksRenderer.clearRenderCache()}render({fileDiff:e,deferManagers:t=!1,forceRender:n=!1,preventEmit:r=!1,lineAnnotations:i,fileContainer:a,containerWrapper:o,renderRange:s,...c}){if(!this.enabled)throw Error(`FileDiff.render: attempting to call render after cleaned up`);n=this.forceRenderOverride??n,this.forceRenderOverride=void 0;let l=TV(c,`FileDiff.render`),u=l?.oldFile,d=l?.newFile;this.editor?.__postponeBgTokenizeToNextFrame();let{collapsed:f=!1,themeType:p=`system`,expandUnchanged:m=!1}=this.options,h=f?void 0:s,g=this.hasThemeChanged(),_=l!=null,v=_&&(!FV(u,this.deletionFile)||!FV(d,this.additionFile)),y=e!=null&&!hR(e,this.getInputDiff()),b=i!=null&&(i.length>0||this.getLatestAnnotations().length>0)&&this.isNewAnnotations(i);if(!f&&GI(h,this.renderRange)&&!n&&!b&&!g&&(e!=null&&!y||e==null&&!v)){let e=this.applyCachedThemeState(p);return e&&this.finalizeRender(),e}let x;e==null&&_&&(v||this.getInputDiff()==null)&&(x=Dz(l.oldFile,l.newFile,this.options.parseDiffOptions));let{renderRange:S}=this;this.renderRange=h,_?(this.deletionFile=u,this.additionFile=d):e!=null&&(this.deletionFile=void 0,this.additionFile=void 0),e!=null&&y?this.updateInputDiff(e,i):x!=null&&(y=!0,this.updateInputDiff(x,i)),y&&this.clearReusableHeader(),i!=null&&this.setLineAnnotations(i);let C=this.getWorkingDiff();if(C==null)return!1;C.editSessionDirty===!0&&this.shouldSelfHealEditSession()&&(VB(C,this.options.parseDiffOptions),this.hunksRenderer.refreshHighlightedResult()),m&&this.loadFilesIfNecessary(),this.hunksRenderer.setOptions(this.getHunksRendererOptions(this.options)),this.syncInteractionOptions(),this.prepareRenderData(this.hunksRenderer.getDiffForNextRender(C));let{disableErrorHandling:w=!1,disableFileHeader:T=!1}=this.options;if(T&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.headerCache.lastRenderedHTML=void 0),this.clearHeaderSlots()),a=this.getOrCreateFileContainer(a,o),this.applyCachedThemeState(p),f){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{let e=this.hunksRenderer.renderDiff(C,zr);e!=null&&this.applyThemeState(a,e.themeStyles,p,e.baseThemeType),e?.headerElement!=null&&this.applyHeaderToDOM(e.headerElement,a,e.fileDiff),this.renderSeparators([]),this.adoptRenderData(e?.fileDiff??C),this.injectUnsafeCSS()}catch(e){if(w)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,a)}return this.finalizeRender(),r||this.emitPostRender(),!0}try{let e=this.getOrCreatePreNode(a);if(this.canPartiallyRender(n,b,v||y||g||!hR(this.getRenderedDiff(),C))&&this.applyPartialRender({fileDiff:C,previousRenderRange:S,renderRange:h})){let e=this.getRenderedDiff();e!=null&&this.adoptRenderData(e)}else{let t=this.hunksRenderer.renderDiff(C,h);if(t==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.isWorkingPool()&&this.workerManager.initialize().catch(()=>{}).then(()=>this.rerender()),!1;this.applyThemeState(a,t.themeStyles,p,t.baseThemeType),t.headerElement!=null&&this.applyHeaderToDOM(t.headerElement,a,t.fileDiff),t.additionsContentAST!=null||t.deletionsContentAST!=null||t.unifiedContentAST!=null?this.applyHunksToDOM(e,t):this.pre!=null&&(this.pre.remove(),this.pre=void 0),this.renderSeparators(t.hunkData),this.adoptRenderData(t.fileDiff)}this.applyBuffers(e,h),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.managersDirty=!0,t||this.flushManagers(),this.finalizeRender(),this.editor!=null&&this.syncRenderViewToEditor()}catch(e){if(w)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,a)}return r||this.emitPostRender(),!0}finalizeRender(){}emitPostRender(e=!1){let{fileContainer:t,options:{onPostRender:n}}=this;if(e){if(!this.mounted||(this.mounted=!1,t==null))return;this.options.onPostRender?.(t,this,`unmount`);return}if(t==null)return;let r=this.mounted?`update`:`mount`;this.mounted=!0,n?.(t,this,r)}getInputDiff(){return this.fileDiff}getWorkingDiff(e=this.fileDiff){return this.editSession?.diff??e}getRenderedDiff(){return this.renderedData?.fileDiff}__getNextRenderData({fileDiff:e,lineAnnotations:t}){let n=this.editSession?.annotations;if(n!=null)return{fileDiff:e,lineAnnotations:t!=null&&this.isNewAnnotations(t)?t:n.provided};let r=this.getWorkingDiff(e)??e,i=this.hunksRenderer.getDiffForNextRender(r);return{fileDiff:i,lineAnnotations:t!=null&&hR(i,r)?t:this.getAnnotationsForDiff(i)}}prepareRenderData(e){this.hunksRenderer.setLineAnnotations(this.getAnnotationsForDiff(e))}adoptRenderData(e){let{pendingData:t}=this,n=t!=null&&hR(e,t.fileDiff);this.renderedData={fileDiff:e,lineAnnotations:n?t.lineAnnotations:this.lineAnnotations},n&&(this.pendingData=void 0)}syncRenderViewToEditor(){let{editor:e,fileContainer:t}=this,n=this.getLatestAnnotations(),r=this.computeEditorRenderRange(this.renderRange),i=this.getWorkingDiff();if(e==null||t==null||i==null||i.isPartial)return;let a=a=>{if(!this.enabled||this.editor!==e||this.fileContainer!==t||this.getWorkingDiff()!==i)return;let o=this.editSession?.outgoingDiff,s=this.getInputDiff(),c=o!=null&&s!=null&&o!==i,l=c&&o!=null&&s!=null?kV(o,s):!1;e.__syncRenderView({highlighter:a,fileContainer:t,fileDiff:i,lineAnnotations:n,renderRange:r,externalDocument:c,resetHistory:l})},o=this.getTheme(),s=i.lang??Yt(i.name),c=Xr({theme:o,lang:s});c==null?$r({themes:Br(o),langs:[`text`,s],preferredHighlighter:vL(this.workerManager,this.options)}).then(a).catch(e=>{e instanceof fi||console.error(e)}):a(c)}computeEditorRenderRange(e){let t=this.getWorkingDiff();if(e==null||t==null||tL(e))return e;let{diffStyle:n=`split`,expandUnchanged:r=!1,collapsedContextThreshold:i=1}=this.options,a,o;return Qz({diff:t,diffStyle:n,startingLine:e.startingLine,totalLines:e.totalLines,expandedHunks:r?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:i,callback:({additionLine:e})=>{e!=null&&(a??=e.lineNumber,o=e.lineNumber)}}),a==null||o==null?{...e,startingLine:0,totalLines:0}:{...e,startingLine:a-1,totalLines:o-a+1}}__acknowledgeDocumentUpdate(){this.editSession!=null&&(this.editSession.outgoingDiff=void 0)}__acceptEditorChange(e){let{lineAnnotations:t}=e;t!=null&&this.syncEditSessionAnnotationsFromEditor(t)}emitEditChange(e){let{onEditChange:t}=this.options;t?.(e)}__captureDocumentSessionState(e=!0){let t=this.getInputDiff(),{diff:n,outgoingDiff:r}=this.editSession??{};if(r!=null&&t!=null){if(!t.isPartial&&kV(r,t))return;n=r}if(!(n==null||n.isPartial))return{diffSession:{oldFile:n.type===`new`?null:{name:n.prevName??n.name,lines:e?[...n.deletionLines]:n.deletionLines},type:n.type,hunks:e?_R(n.hunks):n.hunks},hasChanges:n.editSessionDirty===!0}}__attachEditor(e){if(this.type!==`file-diff`)throw Error(`FileDiff.__attachEditor: cannot attach an editor to a "${this.type}" diff`);if(this.editor!=null)throw Error(`FileDiff.__attachEditor: an editor is already attached`);if(!this.__canAttachEditor())throw Error(`FileDiff.__attachEditor: a complete diff is required before editing`);let t=()=>{this.editor=void 0,this.finishEditSession()};try{return this.resumeEditorRendering(e),t}catch(e){throw t(),e}}__resumeEditor(e){if(this.editor!==e)throw Error(`FileDiff.__resumeEditor: editor association changed`);this.resumeEditorRendering(e)}resumeEditorRendering(e){let t=this.getInputDiff(),n=this.editSession?.outgoingDiff;n!=null&&t!=null&&!t.isPartial&&this.editSession?.diff===n&&this.installEditSession(t);let r=this.editSession==null&&t!=null&&!t.isPartial?t:void 0;r==null?this.editSession!=null&&this.hunksRenderer.beginEditSession(this.editSession.diff):this.installEditSession(r,e.__getDocumentContents(PV(r)),e.__getDocumentSessionState()),this.editor=e,this.getInputDiff()?.isPartial===!0&&this.loadFilesIfNecessary();let i=this.editSession?.diff;this.hunksRenderer.editorRenderReady()?(i!=null&&this.hunksRenderer.diffCache===i&&this.adoptRenderData(i),this.syncRenderViewToEditor()):this.rerender()}finishEditSession(){this.hunksRenderer.endEditSession(),this.finalizeEditSessionHunks()}__completeEditSession(e,t){this.settleEditSession(t===`install`,e)}settleEditSession(e,t){let{editSession:n}=this;if(n==null)return;let{diff:r,inputDiff:i,annotations:a}=n,o=a?.provided??this.lineAnnotations;if(this.editor!=null)throw Error(`FileDiff.__completeEditSession: detach the editor before completing the session`);this.hunksRenderer.endEditSession(),this.finalizeEditSessionHunks();let s=a?.current,c,l=null,u=null,d=!1,f;if(t==null)throw Error(`FileDiff.__completeEditSession: editor is required for completion`);let p=vR(r),m={name:p.name,contents:p.additionLines.join(``)};p.lang!=null&&(m.lang=p.lang);let h={fileDiff:p,editor:t,originalFileDiff:i,oldFile:p.type===`new`?null:{name:p.prevName??p.name,contents:p.deletionLines.join(``)},newFile:m,lineAnnotations:s,originalLineAnnotations:o};Object.freeze(h);try{if(t.__emitEditComplete(h),this.options.onEditComplete?.(h)===`accept`){if(p.cacheKey!=null&&p.cacheKey===i.cacheKey)throw Error(`FileDiff.__completeEditSession: an accepted diff must not reuse the replaced diff cacheKey`);c=p,l=h.oldFile,u=h.newFile}}catch(e){d=!0,f=e}if(e&&c!=null&&this.additionFile!=null&&(this.deletionFile=l,this.additionFile=u),this.editSession=void 0,this.fileDiff=e&&c!=null?c:i,this.pendingData={fileDiff:this.fileDiff,lineAnnotations:e&&c!=null?s??o:o},e&&this.fileContainer!=null&&this.rerender(),d)throw f}finalizeEditSessionHunks(){let e=this.getWorkingDiff();if(e==null||e.editSessionDirty!==!0)return!1;let{collapsedContextThreshold:t=1}=this.options,n=zB(e,this.hunksRenderer.getExpandedHunksMap(),t);return VB(e,this.options.parseDiffOptions),this.hunksRenderer.setExpandedHunksMap(BB(e,n)),this.hunksRenderer.refreshHighlightedResult(),this.escalateEditSessionRender(),!0}applyDocumentChange(e,t){let n=this.editSession?.diff;if(n==null)throw Error(`FileDiff.applyDocumentChange: requires an active edit session`);this.detachAdditionLines(),this.hunksRenderer.beginEditSession(n),this.hunksRenderer.applyDocumentChange(e),t!=null&&this.syncEditSessionAnnotationsFromEditor(t),this.rerender(),this.interactionManager.setSelectionDirty()}applySuspendedDocumentChange(e,t){this.applyDocumentChange(e,t),this.hunksRenderer.clearRenderCache()}updateRenderCache(e,t,n={}){let r=this.editSession?.diff;if(r==null)throw Error(`FileDiff.updateRenderCache: requires an active edit session`);this.detachAdditionLines(),this.hunksRenderer.beginEditSession(r);let{shouldRefreshDiffsView:i,lineCountChangeInFlight:a}=n;this.hunksRenderer.updateRenderCache(e,t,a,n.changedDocumentLines,n.documentLineCount)?(this.refreshViewTimeout!=null&&(clearTimeout(this.refreshViewTimeout),this.refreshViewTimeout=void 0),this.lineStateRefreshPending=!0,this.escalateEditSessionRender()):i===!0&&(this.refreshViewTimeout!=null&&clearTimeout(this.refreshViewTimeout),this.lineStateRefreshPending=!0,this.refreshViewTimeout=setTimeout(()=>{this.refreshViewTimeout=void 0,this.options.diffStyle===`split`?this.refreshSplitDiffView():this.refreshUnifiedDiffView(),this.flushDeferredLineState()},150))}detachAdditionLines(){let{diff:e,inputDiff:t}=this.editSession??{};e!=null&&(e.additionLines===t?.additionLines||e.additionLines===e.deletionLines)&&(e.additionLines=[...e.additionLines])}isLineRenderable(e){let t=this.getRenderedDiff();if(t==null)return!0;let{expandUnchanged:n=!1,collapsedContextThreshold:r=1}=this.options;return Wz({fileDiff:t,lineNumber:e,expandedHunks:n?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:r})}getNearestRenderableLine(e,t){let n=this.getRenderedDiff();if(n==null)return e;let{expandUnchanged:r=!1,collapsedContextThreshold:i=1}=this.options;return Gz({fileDiff:n,lineNumber:e,direction:t,expandedHunks:r?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:i})}revealLine(e){let t=this.getRenderedDiff(),{expandUnchanged:n=!1,collapsedContextThreshold:r=1,expansionLineCount:i=100}=this.options;if(t==null||t.isPartial||n)return!1;let a=this.hunksRenderer.getExpandedHunksMap();for(let[n,o]of t.hunks.entries()){let[s,c]=zz(o);if(e<s){let c=Bz({isPartial:t.isPartial,rangeSize:o.collapsedBefore,expandedHunks:a,hunkIndex:n,collapsedContextThreshold:r}),l=s-c.rangeSize;if(c.renderAll||e<l+c.fromStart||e>=s-c.fromEnd)return!1;let u=e-(l+c.fromStart)+1,d=s-c.fromEnd-e;return u<=d?this.expandHunk(n,`up`,u+i):this.expandHunk(n,`down`,d+i),!0}if(e<c)return!1}let o=Uz({fileDiff:t,hunkIndex:t.hunks.length-1,expandedHunks:a,collapsedContextThreshold:r,errorPrefix:`FileDiff.revealLine`});if(o==null||o.renderAll)return!1;let s=t.hunks[t.hunks.length-1],[,c]=zz(s);return e<c+o.fromStart||e>=c+o.rangeSize?!1:(this.expandHunk(t.hunks.length,`up`,e-(c+o.fromStart)+1+i),!0)}shouldSelfHealEditSession(){return this.editor==null}escalateEditSessionRender(){iI(this.handleEditSessionRender)}handleEditSessionRender=()=>{this.rerender(),this.flushDeferredLineState()};removeRenderedCode(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(let{element:e}of this.separatorCache.values())e.remove();this.separatorCache.clear();for(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}renderPlaceholder(e){if(this.fileContainer==null)return!1;if(this.emitPostRender(!0),this.cleanChildNodes(),this.placeHolder==null){let e=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:`open`});this.placeHolder=document.createElement(`div`),this.placeHolder.dataset.placeholder=``,e.appendChild(this.placeHolder)}return this.setPlaceholderHeight(e)}setPlaceholderHeight(e){return this.placeHolder!=null&&(this.placeHolder.style.setProperty(`height`,`${e}px`),!0)}async primeHighlightCache(e=this.getInputDiff()){let{workerManager:t}=this;if(e==null||t==null||!t.isWorkingPool()||e.cacheKey==null||iV(e))return;let n=this.options.tokenizeMaxLength??1e5;Math.max(e.additionLines.length,e.deletionLines.length)>n||await t.primeDiffHighlightCache(e).catch(e=>{cR(e)||console.error(e)})}cleanChildNodes(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.clearAuxiliaryNodes(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.codeAdditions?.remove(),this.codeDeletions?.remove(),this.codeUnified?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.themeCSSStyle?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.codeAdditions=void 0,this.codeDeletions=void 0,this.codeUnified=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.pre=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.headerCache.lastRenderedHTML=void 0,this.lastRowCount=void 0,this.mounted=!1}renderSeparators(e){let{hunkSeparators:t}=this.options;if(this.isComponentManaged||this.fileContainer==null||typeof t!=`function`){for(let{element:e}of this.separatorCache.values())e.remove();this.separatorCache.clear();return}let n=new Map(this.separatorCache);for(let r of e){let e=r.slotName,i=this.separatorCache.get(e);if(i==null||!CV(r,i.hunkData)){i?.element.remove();let n=document.createElement(`div`);n.style.display=`contents`,n.slot=r.slotName;let a=t(r,this);a!=null&&n.appendChild(a),this.fileContainer.appendChild(n),i={element:n,hunkData:r},this.separatorCache.set(e,i)}n.delete(e)}for(let[e,{element:t}]of n.entries())this.separatorCache.delete(e),t.remove()}renderAnnotations(){if(this.isComponentManaged||this.fileContainer==null){for(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear();return}let e=new Map(this.annotationCache),{renderedData:t,options:{renderAnnotation:n}}=this;if(n!=null&&t!=null){let{fileDiff:r,lineAnnotations:i}=t;for(let[t,a]of i.entries()){let i=this.getAnnotationSlotName(a),o=`${t}-${i}`,s=this.annotationCache.get(o);if(s==null||s.fileDiff!==r||!SV(a,s.annotation)){s?.element.remove();let e=n(a,r);if(e==null)continue;s={element:kL(i),annotation:a,fileDiff:r},s.element.appendChild(e),this.fileContainer.appendChild(s.element),this.annotationCache.set(o,s)}e.delete(o)}}for(let[t,{element:n}]of e.entries())this.annotationCache.delete(t),n.remove()}renderGutterUtility(){let{renderGutterUtility:e}=this.options;if(this.fileContainer==null||e==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let t=e(this.interactionManager.getHoveredLine);if(t!=null&&this.gutterUtilityContent!=null)return;if(t==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let n=AL();n.appendChild(t),this.fileContainer.appendChild(n),this.gutterUtilityContent=n}getOrCreateFileContainer(e,t){let{fileContainer:n}=this,r=e??n??document.createElement(`diffs-container`),i=n!==r;return n!=null&&i&&this.editor?.__captureFocusForDOMReplacement(),i&&this.emitPostRender(!0),this.fileContainer=r,n!=null&&i&&(this.headerCache.lastRenderedHTML=void 0,this.headerElement=void 0),t!=null&&this.fileContainer.parentNode!==t&&t.appendChild(this.fileContainer),i&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(e){let{shadowRoot:t}=e;if(t!=null)for(let e of t.children)e instanceof SVGElement?this.spriteSVG??=e:qL(e)&&e.hasAttribute(`data-theme-css`)?(this.themeCSSStyle??=e,this.hasAdoptedThemeCSS=!0):qL(e)&&e.hasAttribute(`data-unsafe-css`)&&(this.unsafeCSSStyle??=e,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(e){let t=e.shadowRoot??e.attachShadow({mode:`open`});if(this.spriteSVG==null){let e=document.createElement(`div`);e.innerHTML=TL;let t=e.firstChild;t instanceof SVGElement&&(this.spriteSVG=t)}this.spriteSVG!=null&&this.spriteSVG.parentNode!==t&&t.appendChild(this.spriteSVG)}getOrCreatePreNode(e){let t=e.shadowRoot??e.attachShadow({mode:`open`});return this.pre==null?(this.pre=document.createElement(`pre`),this.appliedPreAttributes=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,t.appendChild(this.pre)):this.pre.parentNode!==t&&(this.editor?.__captureFocusForDOMReplacement(),t.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodesFromPre(e){this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0;for(let t of Array.from(e.children))t instanceof HTMLElement&&(t.hasAttribute(`data-unified`)?this.codeUnified=t:t.hasAttribute(`data-deletions`)?this.codeDeletions=t:t.hasAttribute(`data-additions`)&&(this.codeAdditions=t))}applyHeaderToDOM(e,t,n){this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;let{headerCache:{fileDiff:r,html:i,lastRenderedHTML:a}}=this,o=(n!==this.editSession?.diff&&hR(r,n)?i:void 0)??gi(e);if(this.headerCache.html=o,this.headerCache.fileDiff=n,o!==a){let e=document.createElement(`div`);e.innerHTML=o;let n=e.firstElementChild;if(!(n instanceof HTMLElement))return;this.headerElement==null?t.shadowRoot?.prepend(n):t.shadowRoot?.replaceChild(n,this.headerElement),this.headerElement=n,this.headerCache.lastRenderedHTML=o}if(this.isComponentManaged)return;let{renderCustomHeader:s,renderHeaderPrefix:c,renderHeaderFilenameSuffix:l,renderHeaderMetadata:u}=this.options;if(s!=null){let e=s(n)??void 0;this.headerCustom=this.upsertHeaderSlotElement(t,this.headerCustom,ei,e),this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0;return}let d=c?.(n)??void 0,f=l?.(n)??void 0,p=u?.(n)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(t,this.headerPrefix,Lr,d),this.headerFilenameSuffix=this.upsertHeaderSlotElement(t,this.headerFilenameSuffix,Vr,f),this.headerMetadata=this.upsertHeaderSlotElement(t,this.headerMetadata,ii,p),this.headerCustom?.remove(),this.headerCustom=void 0}clearReusableHeader(){this.headerCache.html=void 0,this.headerCache.fileDiff=void 0}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(e,t,n,r){if(r==null){t?.remove();return}let i=t??this.createHeaderSlotElement(n);return t??e.appendChild(i),this.replaceHeaderSlotContent(i,r),i}replaceHeaderSlotContent(e,t){e.replaceChildren(),t instanceof Element?e.appendChild(t):e.innerText=`${t}`}createHeaderSlotElement(e){let t=document.createElement(`div`);return t.slot=e,t}injectUnsafeCSS(){let{unsafeCSS:e}=this.options;this.pre?.toggleAttribute(`data-custom-styles`,!!e);let t=this.fileContainer?.shadowRoot;t!=null&&(e==null||e===``?(this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0):(this.unsafeCSSStyle?.parentNode!==t||this.appliedUnsafeCSS!==e)&&(this.unsafeCSSStyle??=jL(),this.unsafeCSSStyle.parentNode!==t&&t.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=RL(e),this.appliedUnsafeCSS=e))}applyThemeState(e,t,n,r){let i=e.shadowRoot??e.attachShadow({mode:`open`}),a=r??n,o=this.getTheme(),s=typeof o==`string`?o:{...o},c=PL(i);this.themeCSSStyle?.parentNode===i&&this.appliedThemeCSS?.themeStyles===t&&this.appliedThemeCSS.themeType===a&&this.appliedThemeCSS.scrollbarGutter===c?this.appliedThemeCSS.theme=s:this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===i?(this.hasAdoptedThemeCSS=!1,this.appliedThemeCSS={theme:s,themeStyles:t,themeType:a,baseThemeType:r,scrollbarGutter:c}):(this.themeCSSStyle=tR({shadowRoot:i,currentNode:this.themeCSSStyle,themeCSS:zL(t,a,c)}),this.appliedThemeCSS=this.themeCSSStyle==null?void 0:{theme:s,themeStyles:t,themeType:a,baseThemeType:r,scrollbarGutter:c})}hydrateMeasuredScrollbar(){let e=this.fileContainer?.shadowRoot;e!=null&&this.themeCSSStyle!=null&&(this.themeCSSStyle.textContent=BL(this.themeCSSStyle.textContent??``,PL(e)))}shouldGuardRebuildScroll(){return this.editor!=null&&YL()}applyHunksToDOM(e,t){this.shouldGuardRebuildScroll()?eR(e,()=>this.replaceCodeColumns(e,t)):this.replaceCodeColumns(e,t)}applyCodeColumnsInPlace(e,t,n){let r=this.getColumnPair(e);if(r==null)return!1;let i=BV(t[0]),a=BV(t[1]);return i==null||a==null?!1:(r.gutter.innerHTML=gi(i),r.content.innerHTML=gi(a),n!==this.lastRowCount&&(r.gutter.style.setProperty(`grid-row`,`span ${n}`),r.content.style.setProperty(`grid-row`,`span ${n}`)),!0)}replaceCodeColumns(e,t){let{overflow:n=`scroll`}=this.options,r=(this.options.hunkSeparators??`line-info`)===`line-info`,i=n===`wrap`?t.rowCount:void 0;this.cleanupErrorWrapper(),this.applyPreNodeAttributes(e,t);let a=!1,o=[],s=this.hunksRenderer.renderCodeAST(`unified`,t),c=this.hunksRenderer.renderCodeAST(`deletions`,t),l=this.hunksRenderer.renderCodeAST(`additions`,t);this.editor?.__captureFocusForDOMReplacement(),s==null?c!=null||l!=null?(c==null?(this.codeDeletions?.remove(),this.codeDeletions=void 0):(a=this.codeDeletions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions=WL({code:this.codeDeletions,columnType:`deletions`,rowSpan:i,containerSize:r}),this.applyCodeColumnsInPlace(this.codeDeletions,c,t.rowCount)||(this.codeDeletions.innerHTML=this.hunksRenderer.renderPartialHTML(c)),o.push(this.codeDeletions)),l==null?(this.codeAdditions?.remove(),this.codeAdditions=void 0):(a=a||this.codeAdditions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeAdditions=WL({code:this.codeAdditions,columnType:`additions`,rowSpan:i,containerSize:r}),this.applyCodeColumnsInPlace(this.codeAdditions,l,t.rowCount)||(this.codeAdditions.innerHTML=this.hunksRenderer.renderPartialHTML(l)),o.push(this.codeAdditions))):(this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0):(a=this.codeUnified==null||this.codeAdditions!=null||this.codeDeletions!=null,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.codeUnified=WL({code:this.codeUnified,columnType:`unified`,rowSpan:i,containerSize:r}),this.applyCodeColumnsInPlace(this.codeUnified,s,t.rowCount)||(this.codeUnified.innerHTML=this.hunksRenderer.renderPartialHTML(s)),o.push(this.codeUnified)),o.length===0?e.textContent=``:a&&e.replaceChildren(...o),this.lastRowCount=t.rowCount}applyPartialRender({fileDiff:e,previousRenderRange:t,renderRange:n}){let{pre:r,codeUnified:i,codeAdditions:a,codeDeletions:o,options:{diffStyle:s=`split`}}=this;if(r==null||t==null||n==null||!Number.isFinite(t.totalLines)||!Number.isFinite(n.totalLines)||this.lastRowCount==null)return!1;let c=this.getCodeColumns(s,i,o,a);if(c==null)return!1;let l=t.startingLine,u=n.startingLine,d=l+t.totalLines,f=u+n.totalLines,p=Math.max(l,u),m=Math.min(d,f);if(m<=p)return!1;let h=Math.max(0,p-l),g=Math.max(0,d-m),_=this.trimColumns({columns:c,trimStart:h,trimEnd:g,previousStart:l,overlapStart:p,overlapEnd:m,diffStyle:s});if(_<0)throw Error(`FileDiff.applyPartialRender: failed to trim to overlap`);if(this.lastRowCount<_)throw Error(`FileDiff.applyPartialRender: trimmed beyond DOM row count`);let v=this.lastRowCount-_,y=(t,n)=>{if(!(n<=0))return this.hunksRenderer.renderDiff(e,{startingLine:t,totalLines:n,bufferBefore:0,bufferAfter:0})},b=y(u,Math.max(p-u,0));if(b==null&&u<p)return!1;let x=y(m,Math.max(f-m,0));if(x==null&&f>m)return!1;let S=(e,t)=>{if(e!=null){if(s===`unified`&&!Array.isArray(c))this.insertPartialHTML(s,c,e,t);else if(s===`split`&&Array.isArray(c))this.insertPartialHTML(s,c,e,t);else throw Error(`FileDiff.applyPartialRender.applyChunk: invalid chunk application`);v+=e.rowCount,this.adoptRenderData(e.fileDiff)}};return this.cleanupErrorWrapper(),S(b,`afterbegin`),S(x,`beforeend`),this.lastRowCount!==v&&(this.applyRowSpan(s,c,v),this.lastRowCount=v),!0}insertPartialHTML(e,t,n,r){if(e===`unified`&&!Array.isArray(t)){let e=this.hunksRenderer.renderCodeAST(`unified`,n);this.renderPartialColumn(t,e,r)}else if(e===`split`&&Array.isArray(t)){let e=this.hunksRenderer.renderCodeAST(`deletions`,n),i=this.hunksRenderer.renderCodeAST(`additions`,n);this.renderPartialColumn(t[0],e,r),this.renderPartialColumn(t[1],i,r)}else throw Error(`FileDiff.insertPartialHTML: Invalid argument composition`)}refreshSplitDiffView(){let e=this.getWorkingDiff();if(this.options.diffStyle!==`split`||e==null)return;let t=this.hunksRenderer.renderDiff(e,this.renderRange);if(t==null)return;let n=this.getCodeColumns(`split`,this.codeUnified,this.codeDeletions,this.codeAdditions);if(!Array.isArray(n))return;let r=(e,n)=>{if(n==null)return;let r=this.hunksRenderer.renderCodeAST(e,t),i=BV(r?.[0]),a=BV(r?.[1]);for(let[e,t]of[[n.gutter,i],[n.content,a]])if(t!=null&&e.childElementCount===t.length)for(let n=0;n<t.length;n++){let r=e.children[n],i=t[n].properties[`data-line-type`];i!=null&&r.dataset.lineType!==i&&(r.dataset.lineType=i)}};r(`deletions`,n[0]),r(`additions`,n[1]),this.adoptRenderData(t.fileDiff)}refreshUnifiedDiffView(){let e=this.getWorkingDiff();if(this.options.diffStyle!==`unified`||e==null)return;let t=this.hunksRenderer.renderDiff(e,this.renderRange);if(t==null)return;let n=this.getCodeColumns(`unified`,this.codeUnified,this.codeDeletions,this.codeAdditions);if(n==null||Array.isArray(n))return;let r=this.hunksRenderer.renderCodeAST(`unified`,t),i=BV(r?.[0]),a=BV(r?.[1]),o=()=>{for(let[e,t]of[[n.gutter,i],[n.content,a]])t!=null&&(e.innerHTML=gi(t));t.rowCount!==this.lastRowCount&&(this.applyRowSpan(`unified`,n,t.rowCount),this.lastRowCount=t.rowCount),this.adoptRenderData(t.fileDiff)};this.shouldGuardRebuildScroll()?eR(this.pre,o):o(),this.renderSeparators(t.hunkData),this.managersDirty=!0,this.flushManagers(),this.syncRenderViewToEditor()}renderPartialColumn(e,t,n){if(e==null||t==null)return;let r=BV(t[0]),i=BV(t[1]);if(r==null||i==null)throw Error(`FileDiff.insertPartialHTML: Unexpected AST structure`);let a=i.at(0);n===`beforeend`&&a?.type===`element`&&typeof a.properties[`data-buffer-size`]==`number`&&this.mergeBuffersIfNecessary(a.properties[`data-buffer-size`],e.content.children[e.content.children.length-1],e.gutter.children[e.gutter.children.length-1],r,i,!0);let o=i.at(-1);n===`afterbegin`&&o?.type===`element`&&typeof o.properties[`data-buffer-size`]==`number`&&this.mergeBuffersIfNecessary(o.properties[`data-buffer-size`],e.content.children[0],e.gutter.children[0],r,i,!1),e.gutter.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(r)),e.content.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(i))}mergeBuffersIfNecessary(e,t,n,r,i,a){if(!(t instanceof HTMLElement)||!(n instanceof HTMLElement))return;let o=this.getBufferSize(t.dataset);o!=null&&(a?(r.shift(),i.shift()):(r.pop(),i.pop()),this.updateBufferSize(t,o+e),this.updateBufferSize(n,o+e))}applyRowSpan(e,t,n){let r=e=>{e!=null&&(e.gutter.style.setProperty(`grid-row`,`span ${n}`),e.content.style.setProperty(`grid-row`,`span ${n}`))};if(e===`unified`&&!Array.isArray(t))r(t);else if(e===`split`&&Array.isArray(t))r(t[0]),r(t[1]);else throw Error(`dun fuuuuked up`)}trimColumnRows(e,t,n){let r=0,i=0,a=0,o=!1,s=n>=0;if(e==null)return 0;let c=Array.from(e.content.children),l=Array.from(e.gutter.children);if(c.length!==l.length)throw Error(`FileDiff.trimColumnRows: columns do not match`);for(;a<c.length&&!(t<=0&&!s&&!o);){let e=l[a],u=c[a];if(a++,!(e instanceof HTMLElement)||!(u instanceof HTMLElement))throw console.error({gutterElement:e,contentElement:u}),Error(`FileDiff.trimColumnRows: invalid row elements`);if(o&&(o=!1,e.dataset.gutterBuffer===`annotation`&&`lineAnnotation`in u.dataset||e.dataset.gutterBuffer===`metadata`&&`noNewline`in u.dataset))e.remove(),u.remove(),i++;else if(`lineIndex`in e.dataset&&`lineIndex`in u.dataset)(t>0||s&&r>=n)&&(e.remove(),u.remove(),t>0&&(t--,t===0&&(o=!0)),i++),r++;else if(`separator`in e.dataset&&`separator`in u.dataset)(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);else if(e.dataset.gutterBuffer===`annotation`&&`lineAnnotation`in u.dataset)(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);else if(e.dataset.gutterBuffer===`metadata`&&`noNewline`in u.dataset)(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);else if(e.dataset.gutterBuffer===`buffer`&&`contentBuffer`in u.dataset){let a=this.getBufferSize(u.dataset);if(a==null)throw Error(`FileDiff.trimColumnRows: invalid element`);if(t>0){let n=Math.min(t,a),r=a-n;r>0?(this.updateBufferSize(e,r),this.updateBufferSize(u,r),i+=n):(e.remove(),u.remove(),i+=a),t-=n,t===0&&r===0&&(o=!0)}else if(s){let t=r,o=r+a-1;if(n<=t)e.remove(),u.remove(),i+=a;else if(n<=o){let t=o-n+1,r=a-t;this.updateBufferSize(e,r),this.updateBufferSize(u,r),i+=t}}r+=a}else throw console.error({gutterElement:e,contentElement:u}),Error(`FileDiff.trimColumnRows: unknown row elements`)}return i}trimColumns({columns:e,diffStyle:t,overlapEnd:n,overlapStart:r,previousStart:i,trimEnd:a,trimStart:o}){let s=Math.max(0,r-i),c=n-i;if(c<0)throw Error(`FileDiff.trimColumns: overlap ends before previous`);let l=o>0,u=a>0;if(!l&&!u)return 0;let d=l?s:0,f=u?c:-1;if(t===`unified`&&!Array.isArray(e))return this.trimColumnRows(e,d,f);if(t===`split`&&Array.isArray(e)){let t=this.trimColumnRows(e[0],d,f),n=this.trimColumnRows(e[1],d,f);if(e[0]!=null&&e[1]!=null&&t!==n)throw Error(`FileDiff.trimColumns: split columns out of sync`);return e[0]==null?n:t}throw console.error({diffStyle:t,columns:e}),Error(`FileDiff.trimColumns: Invalid columns for diffType`)}getBufferSize(e){let t=Number.parseInt(e?.bufferSize??``,10);return Number.isNaN(t)?void 0:t}updateBufferSize(e,t){e.dataset.bufferSize=`${t}`,e.style.setProperty(`grid-row`,`span ${t}`),e.style.setProperty(`min-height`,`calc(${t} * 1lh)`)}getColumnPair(e){if(e==null)return;let t=e.children[0],n=e.children[1];if(t instanceof HTMLElement&&n instanceof HTMLElement&&t.dataset.gutter!=null&&n.dataset.content!=null)return{gutter:t,content:n}}getCodeColumns(e,t,n,r){if(e===`unified`)return this.getColumnPair(t);{let e=this.getColumnPair(n),t=this.getColumnPair(r);return e!=null||t!=null?[e,t]:void 0}}updateBuffers(e){this.pre!=null&&this.applyBuffers(this.pre,e)}applyBuffers(e,t){t==null||this.shouldDisableVirtualizationBuffers()?(this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0)):(t.bufferBefore>0?(this.bufferBefore??(this.bufferBefore=document.createElement(`div`),this.bufferBefore.dataset.virtualizerBuffer=`before`,e.before(this.bufferBefore)),this.bufferBefore.style.setProperty(`height`,`${t.bufferBefore}px`),this.bufferBefore.style.setProperty(`contain`,`strict`)):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),t.bufferAfter>0?(this.bufferAfter??(this.bufferAfter=document.createElement(`div`),this.bufferAfter.dataset.virtualizerBuffer=`after`,e.after(this.bufferAfter)),this.bufferAfter.style.setProperty(`height`,`${t.bufferAfter}px`),this.bufferAfter.style.setProperty(`contain`,`strict`)):this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0))}shouldDisableVirtualizationBuffers(){return this.options.disableVirtualizationBuffers??!1}applyPreNodeAttributes(e,{additionsContentAST:t,deletionsContentAST:n,totalLines:r},i){let{diffIndicators:a=`bars`,disableBackground:o=!1,disableLineNumbers:s=!1,overflow:c=`scroll`,diffStyle:l=`split`}=this.options,u={type:`diff`,diffIndicators:a,disableBackground:o,disableLineNumbers:s,overflow:c,split:l!==`unified`&&t!=null&&n!=null,totalLines:r,customProperties:i};EL(u,this.appliedPreAttributes)||(KL(e,u),this.appliedPreAttributes=u)}applyErrorToDOM(e,t){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;let n=t.shadowRoot??t.attachShadow({mode:`open`});this.errorWrapper??=document.createElement(`div`),this.errorWrapper.dataset.errorWrapper=``,this.errorWrapper.textContent=``,n.appendChild(this.errorWrapper);let r=document.createElement(`div`);r.dataset.errorMessage=``,r.innerText=e.message,this.errorWrapper.appendChild(r);let i=document.createElement(`pre`);i.dataset.errorStack=``,i.innerText=e.stack??`No Error Stack`,this.errorWrapper.appendChild(i)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function PV(e){return{name:e.name,lang:e.lang,contents:e.additionLines.join(``)}}function FV(e,t){return e==null||t==null?e==null&&t==null:gR(e,t)}function IV({fileDiff:e,oldFile:t,newFile:n}){return e!=null&&e.hunks.length>0||t!=null||n!=null}function LV({fileDiff:e,oldFile:t,newFile:n}){return e!=null||t!=null||n!=null}function RV(e,t,n=!1){return!n&&e==null&&t}function zV(e,t,n=!1){return e==null&&t&&!n}function BV(e){if(e!=null&&e.type===`element`)return e.children??[]}function VV({fileDiff:e,metrics:t,disableFileHeader:n,hunkSeparators:r,expandUnchanged:i,expandedHunks:a,collapsedContextThreshold:o,canHydratePartialDiff:s}){let c=uR(t,n),l=c,u=i?!0:a,d=e.hunks.length-1;for(let n=0;n<e.hunks.length;n++){let i=e.hunks[n];if(i==null)throw Error(`computeEstimatedDiffHeights: invalid hunk index`);let a=Bz({isPartial:e.isPartial,rangeSize:i.collapsedBefore,expandedHunks:u,hunkIndex:n,collapsedContextThreshold:o}),f=(a.fromStart+a.fromEnd)*t.lineHeight;if(c+=f,l+=f,a.collapsedLines>0){let e=Xz({type:r,metrics:t,hunkIndex:n,hunkSpecs:i.hunkSpecs})?.totalHeight??0;c+=e,l+=e}c+=i.splitLineCount*t.lineHeight,l+=i.unifiedLineCount*t.lineHeight;let p=HV(i);c+=p.split*t.lineHeight,l+=p.unified*t.lineHeight;let m=n===d?Uz({fileDiff:e,hunkIndex:n,expandedHunks:u,collapsedContextThreshold:o,errorPrefix:`computeEstimatedDiffHeights`}):void 0;if(m!=null){let e=(m.fromStart+m.fromEnd)*t.lineHeight;if(c+=e,l+=e,m.collapsedLines>0){let e=Zz({type:r,metrics:t})?.totalHeight??0;c+=e,l+=e}}else if(n===d&&e.isPartial&&s){let e=Zz({type:r,metrics:t})?.totalHeight??0;c+=e,l+=e}}if(e.hunks.length>0){let e=pR(t);c+=e,l+=e}return{splitHeight:c,unifiedHeight:l}}function HV(e){if(!e.noEOFCRAdditions&&!e.noEOFCRDeletions)return{split:0,unified:0};let t=e.hunkContent.at(-1);if(t==null)return{split:0,unified:0};if(t.type===`context`){let e=+(t.lines>0);return{split:e,unified:e}}return UV(e,t)}function UV(e,t){let n=(t.deletions>0&&e.noEOFCRDeletions?1:0)+(t.additions>0&&e.noEOFCRAdditions?1:0),r=t.deletions>0&&e.noEOFCRDeletions,i=t.additions>0&&e.noEOFCRAdditions;return{split:r||i?1:0,unified:n}}var WV=3e3,GV=new Map,KV=-1,qV=class extends NV{__id=`little-virtualized-file-diff:${++KV}`;renderType=`virtualized`;top;height=0;metrics;cache={heightDeltas:new Map,measuredHeightDeltaTotal:0,estimatedSplitHeight:void 0,estimatedUnifiedHeight:void 0,checkpoints:[],totalLines:0,fileAnnotationHeight:0,ghostTextRows:GV,ghostTextRowsByIndex:new Map};isVisible=!1;isSetup=!1;virtualizer;layoutDirty=!0;currentCollapsed;pendingHydratedDiff;pendingExpansions;pendingRender;constructor(e,t,n,r,i){super(e,r,i),this.virtualizer=t,this.metrics=lR(n)}setMetrics(e,t=!1){let n=lR(e);(t||!sI(this.metrics,n))&&(this.metrics=n,this.resetLayoutCache({includeEstimatedHeights:!0}))}setLineAnnotations(e){this.syncLineAnnotations(e)&&(this.forceRenderOverride=!0)}syncLineAnnotations(e){return e==null||!this.isNewAnnotations(e)||e.length===0&&this.getLatestAnnotations().length===0?!1:(super.setLineAnnotations(e),!0)}syncEditSessionAnnotationsFromEditor(e){return super.syncEditSessionAnnotationsFromEditor(e)?(this.forceRenderOverride=!0,!0):!1}setFileAnnotationHeight(e){let t=this.cache.fileAnnotationHeight;return e!==t&&(this.cache.fileAnnotationHeight=e,this.cache.measuredHeightDeltaTotal+=e-t,!0)}hasFileAnnotations(e){let t=this.getLayoutAnnotations();return bL(t)?t.some(t=>t.lineNumber===0?e.type===`new`?t.side===`additions`:e.type!==`deleted`||t.side===`deletions`:!1):!1}getLineHeight(e,t=!1){return this.getEstimatedLineHeight(t)+(this.cache.heightDeltas.get(e)??0)}getEstimatedLineHeight(e=!1){let t=e?2:1;return this.metrics.lineHeight*t}setOptions(e){if(this.isAdvancedMode())throw Error(`VirtualizedFileDiff.setOptions cannot be used inside CodeView. Update CodeView options instead.`);if(e==null)return;let{options:t}=this,n=!lI(t,e),r=n&&tH(t,e);super.setOptions(e),r&&this.resetLayoutCache({forceSimpleRecompute:!0,includeEstimatedHeights:nH(t,e)}),n&&(this.forceRenderOverride=!0),n&&this.isSimpleMode()&&this.virtualizer.instanceChanged(this,r)}setThemeType(e){if(this.isAdvancedMode())throw Error(`VirtualizedFileDiff.setThemeType cannot be used inside CodeView. Update CodeView options instead.`);super.setThemeType(e)}resetLayoutCache({forceSimpleRecompute:e=!1,includeEstimatedHeights:t=!1,resetRenderRange:n=!0}={}){this.layoutDirty=!0,this.cache.fileAnnotationHeight=0,this.cache.heightDeltas.clear(),this.cache.measuredHeightDeltaTotal=0,this.cache.ghostTextRows=GV,this.cache.ghostTextRowsByIndex.size>0&&this.cache.ghostTextRowsByIndex.clear(),this.invalidateDerivedLayoutCache(t,n),e&&this.isSimpleMode()&&this.computeApproximateSize()}invalidateDerivedLayoutCache(e,t=!0){this.layoutDirty=!0,this.cache.checkpoints.length>0&&(this.cache.checkpoints.length=0),this.cache.totalLines!==0&&(this.cache.totalLines=0),e&&(this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0),this.renderRange!=null&&t&&(this.renderRange=void 0)}applyGhostTextRows(e,t){let{cache:{heightDeltas:n,ghostTextRows:r,ghostTextRowsByIndex:i},metrics:{lineHeight:a}}=this;if(r===t)return!1;let o=this.getDiffStyle(),s=new Map;for(let[n,r]of t){let t=this.getLineIndexForDiff(e,n+1,`additions`);t!=null&&s.set(o===`split`?t[1]:t[0],r)}let c=!1;for(let e of new Set([...i.keys(),...s.keys()])){let t=((s.get(e)??0)-(i.get(e)??0))*a;if(t===0)continue;let r=(n.get(e)??0)+t;r===0?n.delete(e):n.set(e,r),this.cache.measuredHeightDeltaTotal+=t,c=!0}return this.cache.ghostTextRows=t,this.cache.ghostTextRowsByIndex=s,c}reconcileHeights(){let e=!1,{options:{overflow:t=`scroll`},metrics:{lineHeight:n}}=this,r=this.placeHolder==null?this.getRenderedDiff():this.getLayoutDiff();if(this.fileContainer==null||r==null)return this.height!==0&&(e=!0),this.height=0,e;this.top=this.getVirtualizedTop(),e=this.applyGhostTextRows(r,this.editor?.__getGhostTextRows()??GV);let{ghostTextRowsByIndex:i}=this.cache,a=t!==`scroll`||this.lineAnnotations.length>0||this.isResizeDebuggingEnabled();if(this.placeHolder!=null||!a&&this.cache.heightDeltas.size===0&&this.cache.fileAnnotationHeight===0)return e&&(this.computeApproximateSize(!0),this.setPlaceholderHeight(this.height)),e;let o=this.getDiffStyle(),s=o===`split`?[this.codeDeletions,this.codeAdditions]:[this.codeUnified];if(this.renderRange!=null&&SL(this.renderRange)){let t=JV(s)??0;this.setFileAnnotationHeight(t)&&(e=!0)}for(let t of s){if(t==null)continue;let r=t.children[1];if(!(r instanceof HTMLElement))continue;let s=o===`split`&&t===this.codeDeletions;for(let t of r.children){if(!(t instanceof HTMLElement))continue;let r=t.dataset.lineIndex;if(r==null)continue;let c=oH(r,o),l=i.get(c)??0;if(s&&l>0)continue;let u=this.cache.heightDeltas.get(c)??0;if(!a&&u===l*n)continue;let d=t.getBoundingClientRect().height+l*n,f=!1;t.nextElementSibling instanceof HTMLElement&&(`lineAnnotation`in t.nextElementSibling.dataset||`noNewline`in t.nextElementSibling.dataset)&&(`noNewline`in t.nextElementSibling.dataset&&(f=!0),d+=t.nextElementSibling.getBoundingClientRect().height);let p=this.getEstimatedLineHeight(f),m=d-p;m!==u&&(e=!0,this.cache.measuredHeightDeltaTotal+=m-u,m===0?this.cache.heightDeltas.delete(c):this.cache.heightDeltas.set(c,m))}}return(e||this.isResizeDebuggingEnabled())&&this.computeApproximateSize(!0),e}onRender=e=>this.fileContainer!=null&&(e&&(this.top=this.getVirtualizedTop()),this.render());flushManagers(){super.flushManagers(),this.lineStateRefreshPending&&this.flushDeferredLineState()}updateCodeViewLayout(e,t,n,r){let i=!1,a=!1,{pendingExpansions:o,pendingHydratedDiff:s,options:{collapsed:c=!1}}=this;if(s!=null&&(this.pendingHydratedDiff=void 0,s.expectedDiff===e&&(Object.assign(e,s.nextDiff),this.setHydratedState(s.files),this.installHydratedSessionDiff(e),this.forceRenderOverride=!0,i=!0,a=!0)),o!=null){this.pendingExpansions=void 0;for(let{hunkIndex:e,direction:t,expansionLineCountOverride:n}of o)this.hunksRenderer.expandHunk(e,t,n),this.forceRenderOverride=!0,a=!0}let l=this.updateInputDiff(e,r),{pendingRenderDiff:u,layoutDiffChanged:d,renderedDiffChanged:f,annotationsChanged:p}=this.updatePendingRender(e,r);return!this.forceRenderOverride&&(l||f||p)&&(this.forceRenderOverride=!0),(n?.resetDiffLayoutCache===!0||d)&&(i=!0),(d||n?.resetDiffLayoutCache===!0&&n.includeEstimatedDiffHeights)&&(a=!0),n?.metrics!=null&&(this.metrics=lR(n.metrics),i=!0,a=!0),this.currentCollapsed!==c&&(this.currentCollapsed=c,i=!0),i?this.resetLayoutCache({includeEstimatedHeights:a}):a&&this.invalidateDerivedLayoutCache(!0),this.top=t,this.computeApproximateSize(!1,u),this.height}getLinePosition(e,t=`additions`){let n=this.getLayoutDiff();if(n==null||e<1)return;let r=this.getLineIndexForDiff(n,e,t);if(r==null)return;let{disableFileHeader:i=!1,expandUnchanged:a=!1,collapsed:o=!1,collapsedContextThreshold:s=1}=this.options,c=this.getDiffStyle(),l=this.getHunkSeparatorType(),u=c===`split`?r[1]:r[0];this.approximateLayoutCheckpoints(n);let d=uR(this.metrics,i),f=this.getLayoutCheckpointBeforeLineIndex(u),p=f?.top??d+this.cache.fileAnnotationHeight;if(o)return{top:dR(this.metrics,i),height:0};let m;return Qz({diff:n,diffStyle:c,startingLine:f?.renderedLineIndex??0,expandedHunks:a?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:s,callback:({hunkIndex:e,hunk:t,collapsedBefore:n,collapsedAfter:r,deletionLine:i,additionLine:a})=>{let o=c===`split`?a?.splitLineIndex??i?.splitLineIndex:a?.unifiedLineIndex??i?.unifiedLineIndex;if(o==null)throw Error(`VirtualizedFileDiff.getLinePosition: missing line index data`);if(n>0){let r=Xz({type:l,metrics:this.metrics,hunkIndex:e,hunkSpecs:t?.hunkSpecs});if(r!=null){if(p+=r.gapBefore,u>=o-n&&u<o)return m={top:p,height:r.height},!0;p+=r.height+r.gapAfter}}let s=this.getLineHeight(o,(a?.noEOFCR??!1)||(i?.noEOFCR??!1));if(o===u)return m={top:p,height:s},!0;if(p+=s,r>0){let e=Zz({type:l,metrics:this.metrics});if(e!=null){if(u>o&&u<=o+r)return m={top:p+e.gapBefore,height:e.height},!0;p+=e.totalHeight}}return!1}}),m}getEditorViewport(){return this.virtualizer.type===`simple`?this.virtualizer.getRoot():this.virtualizer.getContainerElement()}getNumericScrollAnchor(e){let t=this.getLayoutDiff();if(t==null)return;let{disableFileHeader:n=!1,expandUnchanged:r=!1,collapsed:i=!1,collapsedContextThreshold:a=1}=this.options;if(i)return;let o=this.getDiffStyle(),s=this.getHunkSeparatorType();this.approximateLayoutCheckpoints(t);let c=this.getLayoutCheckpointBeforeTop(e),l=c?.top??uR(this.metrics,n)+this.cache.fileAnnotationHeight,u;return Qz({diff:t,diffStyle:o,startingLine:c?.renderedLineIndex??0,expandedHunks:r?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:a,callback:({hunkIndex:t,hunk:n,collapsedBefore:r,collapsedAfter:i,deletionLine:a,additionLine:c})=>{let d=o===`split`?c?.splitLineIndex??a?.splitLineIndex:c?.unifiedLineIndex??a?.unifiedLineIndex;if(d==null)throw Error(`VirtualizedFileDiff.getNumericScrollAnchor: missing line index data`);if(r>0){let e=Xz({type:s,metrics:this.metrics,hunkIndex:t,hunkSpecs:n?.hunkSpecs});e!=null&&(l+=e.totalHeight)}if(l>=e&&(a==null?c!=null&&(u={lineNumber:c.lineNumber,side:`additions`,top:l}):u={lineNumber:a.lineNumber,side:`deletions`,top:l},u!=null))return!0;let f=this.getLineHeight(d,(c?.noEOFCR??!1)||(a?.noEOFCR??!1));if(l+=f,i>0){let e=Zz({type:s,metrics:this.metrics});e!=null&&(l+=e.totalHeight)}return!1}}),u}getVirtualizedHeight(){return this.height}getAdvancedStickySpecs(e){let t=this.getLayoutDiff();if(this.top==null||t==null)return;if(this.options.collapsed===!0)return{topOffset:this.top,height:this.height};let n=e==null?this.renderRange:this.computeRenderRangeFromWindow(t,this.top,e);if(n==null)return;let{bufferBefore:r,bufferAfter:i,totalLines:a}=n,o=0;if(a===0){let t=e??this.virtualizer.getWindowSpecs();this.top<t.top&&(o=i)}return{topOffset:this.top+r+o,height:this.height-(r+i)}}cleanUp(e=!1){let t=this.cache.ghostTextRows.size>0;t&&(this.layoutDirty=!0);let n=e&&this.isAdvancedMode()&&this.fileContainer!=null&&(t||!hR(this.getRenderedDiff(),this.getWorkingDiff()));this.fileContainer!=null&&this.isSimpleMode()&&this.getSimpleVirtualizer()?.disconnect(this.fileContainer),e||(this.resetLayoutCache({includeEstimatedHeights:!0}),this.pendingExpansions=void 0,this.pendingHydratedDiff=void 0),this.pendingRender=void 0,this.isSetup=!1,super.cleanUp(e),n&&this.virtualizer.instanceChanged(this,!0)}expandHunk=(e,t,n)=>{this.getInputDiff()!=null&&(this.loadFilesIfNecessary(),this.isAdvancedMode()?(this.pendingExpansions??=[],this.pendingExpansions.push({hunkIndex:e,direction:t,expansionLineCountOverride:n})):(this.hunksRenderer.expandHunk(e,t,n),this.resetLayoutCache({includeEstimatedHeights:!0}),this.computeApproximateSize()),this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0))};async handleFilesLoaded(e,t){if(this.getInputDiff()===e&&e.isPartial){if(this.isAdvancedMode()){let n=wR(`clone`,e,t);if(await wV(()=>this.primeHighlightCache(n)),this.getInputDiff()!==e)return;this.pendingHydratedDiff={expectedDiff:e,nextDiff:n,files:t}}else{if(wR(`merge`,e,t),this.setHydratedState(t),!this.installHydratedSessionDiff(e)&&(await wV(()=>this.primeHighlightCache(e)),this.getInputDiff()!==e))return;this.resetLayoutCache({includeEstimatedHeights:!0}),this.computeApproximateSize()}this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0)}}loadFilesIfNecessary(){if(this.pendingHydratedDiff!=null){if(this.pendingHydratedDiff.expectedDiff===this.getInputDiff())return;this.pendingHydratedDiff=void 0}super.loadFilesIfNecessary()}isLineRenderable(e){if(super.isLineRenderable(e))return!0;let{pendingExpansions:t}=this,n=this.getRenderedDiff();if(t==null||t.length===0||n==null)return!1;let{expansionLineCount:r=100,collapsedContextThreshold:i=1}=this.options,a=new Map(this.hunksRenderer.getExpandedHunksMap());for(let e of t){let t={...a.get(e.hunkIndex)??{fromStart:0,fromEnd:0}},n=e.expansionLineCountOverride??r;(e.direction===`up`||e.direction===`both`)&&(t.fromStart+=n),(e.direction===`down`||e.direction===`both`)&&(t.fromEnd+=n),a.set(e.hunkIndex,t)}return Wz({fileDiff:n,lineNumber:e,expandedHunks:a,collapsedContextThreshold:i})}invalidateEditSessionLayout(){this.getSimpleVirtualizer()?.markDOMDirty(),this.resetLayoutCache({forceSimpleRecompute:this.isSimpleMode(),includeEstimatedHeights:!0,resetRenderRange:!1}),this.isSimpleMode()||this.computeApproximateSize(!0),this.getSimpleVirtualizer()?.requestHeightReconcile(this)}escalateEditSessionRender(){this.invalidateEditSessionLayout(),this.enabled&&this.getInputDiff()!=null&&(this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0))}shouldSelfHealEditSession(){return!this.isAdvancedMode()&&super.shouldSelfHealEditSession()}setVisibility(e){this.isAdvancedMode()||this.fileContainer==null||(this.renderRange=void 0,e&&!this.isVisible?(this.top=this.getVirtualizedTop(),this.isVisible=!0):!e&&this.isVisible&&(this.isVisible=!1,this.rerender()))}rerender(){if(!this.enabled||this.getInputDiff()==null&&this.additionFile==null&&this.deletionFile==null)return;let e=this.getWorkingDiff(),t=e==null?void 0:this.hunksRenderer.getDiffForNextRender(e);this.isSimpleMode()&&(this.pendingRender=void 0),this.forceRenderOverride=!0,this.isSimpleMode()&&this.requestRender()||this.virtualizer.instanceChanged(this,!hR(this.getRenderedDiff(),t))}get isComponentManaged(){return this.getAdvancedVirtualizer()?.isComponentManaged??super.isComponentManaged}syncGhostTextRows(){let e=this.getAdvancedVirtualizer();e==null?this.getSimpleVirtualizer()?.requestHeightReconcile(this):(e.capturePendingLayoutAnchor(),this.layoutDirty=!0,e.instanceChanged(this,!0))}applyDocumentChange(e,t,n=!1){let{renderRange:r}=this;this.getAdvancedVirtualizer()?.capturePendingLayoutAnchor(),super.applyDocumentChange(e,t),this.getSimpleVirtualizer()?.markDOMDirty(),this.resetLayoutCache({forceSimpleRecompute:this.isSimpleMode(),includeEstimatedHeights:!0,resetRenderRange:!1});let i=this.getRenderedDiff();if(!this.isSimpleMode())this.computeApproximateSize(!0);else if(n&&r!=null&&i!=null){let e=this.virtualizer.getWindowSpecs(),t=this.computeRenderRangeFromWindow(i,this.top??0,e);t.bufferAfter!==r.bufferAfter&&this.updateBuffers(t)}this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0)}computeApproximateSize(e=!1,t=this.getLayoutDiff()){let n=this.isResizeDebuggingEnabled();if(!e&&!this.layoutDirty&&!n)return;let r=this.height===0;if(this.height=0,this.cache.checkpoints=[],this.cache.totalLines=0,t==null){this.layoutDirty=!1;return}this.applyGhostTextRows(t,this.editor?.__getGhostTextRows()??GV);let{disableFileHeader:i=!1,collapsed:a=!1}=this.options;a?(this.height+=dR(this.metrics,i),this.layoutDirty=!1):(this.height=this.getActiveEstimatedHeight(t)+this.cache.measuredHeightDeltaTotal,n&&!r&&this.validateComputedHeight(t),this.layoutDirty=!1)}getLayoutDiff(){return this.pendingRender?.diff??this.getRenderedDiff()}getLayoutAnnotations(){let{pendingRender:e}=this;return e==null?this.lineAnnotations:this.getAnnotationsForDiff(e.diff)}getActiveEstimatedHeight(e=this.getLayoutDiff()){this.ensureEstimatedDiffHeights(e);let t=this.getDiffStyle()===`split`?this.cache.estimatedSplitHeight:this.cache.estimatedUnifiedHeight;if(t==null)throw Error(`VirtualizedFileDiff.getActiveEstimatedHeight: missing estimated height`);return t}ensureEstimatedDiffHeights(e=this.getLayoutDiff()){if(e==null){this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0;return}if(this.cache.estimatedSplitHeight!=null&&this.cache.estimatedUnifiedHeight!=null)return;let{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsedContextThreshold:r=1}=this.options,{splitHeight:i,unifiedHeight:a}=VV({fileDiff:e,metrics:this.metrics,disableFileHeader:t,hunkSeparators:this.getHunkSeparatorType(),expandUnchanged:n,expandedHunks:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:r,canHydratePartialDiff:rH(e,this.options.loadDiffFiles!=null)});this.cache.estimatedSplitHeight=i,this.cache.estimatedUnifiedHeight=a}validateComputedHeight(e=this.getLayoutDiff()){if(this.fileContainer==null||e==null)return;let t=this.fileContainer.getBoundingClientRect();t.height===this.height?console.log(`VirtualizedFileDiff.computeApproximateSize: computed height IS CORRECT`):console.log(`VirtualizedFileDiff.computeApproximateSize: computed height doesnt match`,{name:e.name,elementHeight:t.height,computedHeight:this.height})}render({fileContainer:e,fileDiff:t,forceRender:n=!1,lineAnnotations:r,...i}={}){let a=TV(i,`VirtualizedFileDiff.render`),o=a!=null,s=a?.oldFile,c=a?.newFile,l=o&&(!aH(s,this.deletionFile)||!aH(c,this.additionFile)),u=t??this.getInputDiff();t==null&&o&&(l||this.getInputDiff()==null)&&(u=Dz(a.oldFile,a.newFile,this.options.parseDiffOptions));let{forceRenderOverride:d,isSetup:f}=this;this.forceRenderOverride=void 0;let p=u!=null&&!hR(this.getInputDiff(),u),m=p||l;if(e=this.getOrCreateFileContainer(e),u==null)return console.error(`VirtualizedFileDiff.render: attempting to virtually render when we dont have the correct data`),!1;p&&this.updateInputDiff(u,r);let{pendingRenderDiff:h,layoutDiffChanged:g,renderedDiffChanged:_,annotationsChanged:v}=this.pendingRender!=null&&this.pendingRender.workingDiff===(this.getWorkingDiff(u)??u)?{pendingRenderDiff:this.pendingRender.diff,layoutDiffChanged:!1,renderedDiffChanged:!1,annotationsChanged:this.syncLineAnnotations(r)}:this.updatePendingRender(u,r);if(g&&this.resetLayoutCache({includeEstimatedHeights:!0}),f)this.top??=this.getVirtualizedTop(),this.layoutDirty&&this.isSimpleMode()&&(this.getSimpleVirtualizer()?.markDOMDirty(),this.computeApproximateSize(!1,h));else{this.computeApproximateSize(!1,h);let t=this.getSimpleVirtualizer();if(this.top??=this.getVirtualizedTop(),this.isAdvancedMode())this.isVisible=!0;else{if(t==null)throw Error(`VirtualizedFileDiff.render: simple virtualizer is not available`);t.connect(e,this),this.isVisible=t.isInstanceVisible(this.top??0,this.height)}this.isSetup=!0}if(!this.isVisible&&this.isSimpleMode()&&(!m||!f))return a!=null&&(this.deletionFile=s,this.additionFile=c),p&&this.clearReusableHeader(),this.renderPlaceholder(this.height);let y=this.virtualizer.getWindowSpecs(),b=this.top??0,x=this.computeRenderRangeFromWindow(h,b,y);return super.render({fileDiff:u,fileContainer:e,renderRange:x,lineAnnotations:r,forceRender:(d??n)||v||_||p,...a,...i})}finalizeRender(){if(!hR(this.getRenderedDiff(),this.pendingRender?.diff))throw Error(`VirtualizedFileDiff.render: rendered a different diff than its prepared layout`);this.pendingRender=void 0,this.isSimpleMode()&&this.getSimpleVirtualizer()?.requestHeightReconcile(this)}updatePendingRender(e,t){let n=this.getWorkingDiff(e)??e,r=this.getRenderedDiff(),{pendingRender:i}=this,a=i?.diff??r,o=this.hunksRenderer.getDiffForNextRender(n);return this.pendingRender={workingDiff:n,diff:o},{pendingRenderDiff:o,annotationsChanged:this.syncLineAnnotations(t),layoutDiffChanged:!hR(a,o),renderedDiffChanged:!hR(r,o)}}syncVirtualizedTop(){this.top=this.getVirtualizedTop()}shouldDisableVirtualizationBuffers(){return this.isAdvancedMode()||super.shouldDisableVirtualizationBuffers()}shouldGuardRebuildScroll(){return!1}isSimpleMode(){return this.virtualizer.type===`simple`}isAdvancedMode(){return this.virtualizer.type===`advanced`}getVirtualizedTop(){return this.virtualizer.type===`advanced`?this.virtualizer.getLocalTopForInstance(this):this.fileContainer==null?0:this.virtualizer.getOffsetInScrollContainer(this.fileContainer)}getSimpleVirtualizer(){return this.virtualizer.type===`simple`?this.virtualizer:void 0}getAdvancedVirtualizer(){return this.virtualizer.type===`advanced`?this.virtualizer:void 0}isResizeDebuggingEnabled(){return this.getSimpleVirtualizer()?.config.resizeDebugging??!1}getDiffStyle(){return this.options.diffStyle??`split`}getHunkSeparatorType(){return iH(this.options.hunkSeparators)}approximateLayoutCheckpoints(e){if(!this.layoutDirty&&this.cache.checkpoints.length>0||e.hunks.length===0||this.options.collapsed===!0)return;let{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsedContextThreshold:r=1}=this.options,i=e.hunks.length-1,a=rH(e,this.options.loadDiffFiles!=null),o=this.getDiffStyle(),s=this.getHunkSeparatorType(),c=n?!0:this.hunksRenderer.getExpandedHunksMap(),l=YV(this.cache.heightDeltas),u=uR(this.metrics,t)+this.cache.fileAnnotationHeight,d=0,f=({rowCount:e,startLineIndex:t,preSeparatorHeight:n=0,postSeparatorHeight:r=0,metadataOffsets:i=[]})=>{if(e<=0)return;let a=d,o=d+e,s=QV(a);for(;s<o;){let e=s-a,r=u+(e>0?n:0)+e*this.metrics.lineHeight+$V(i,e)*this.metrics.lineHeight+XV(l,t,t+e);this.cache.checkpoints.push({renderedLineIndex:s,lineIndex:t+e,top:r}),s+=WV}u+=n+e*this.metrics.lineHeight+i.length*this.metrics.lineHeight+XV(l,t,t+e)+r,d=o};for(let t=0;t<e.hunks.length;t++){let n=e.hunks[t];if(n==null)throw Error(`VirtualizedFileDiff.approximateLayoutCheckpoints: invalid hunk index`);let l=Bz({isPartial:e.isPartial,rangeSize:n.collapsedBefore,expandedHunks:c,hunkIndex:t,collapsedContextThreshold:r}),u=l.collapsedLines>0?Xz({type:s,metrics:this.metrics,hunkIndex:t,hunkSpecs:n.hunkSpecs})?.totalHeight??0:0;f({rowCount:l.fromStart,startLineIndex:(o===`split`?n.splitLineStart:n.unifiedLineStart)-l.rangeSize});let d=u;f({rowCount:l.fromEnd,startLineIndex:(o===`split`?n.splitLineStart:n.unifiedLineStart)-l.fromEnd,preSeparatorHeight:d}),l.fromEnd>0&&(d=0);let p=t===i?Uz({fileDiff:e,hunkIndex:t,expandedHunks:c,collapsedContextThreshold:r,errorPrefix:`VirtualizedFileDiff`}):void 0,m=p!=null&&p.collapsedLines>0||t===i&&a?Zz({type:s,metrics:this.metrics})?.totalHeight??0:0,h=p==null?0:p.fromStart+p.fromEnd,g=o===`split`?n.splitLineCount:n.unifiedLineCount,_=o===`split`?n.splitLineStart:n.unifiedLineStart;f({rowCount:g,startLineIndex:_,preSeparatorHeight:d,postSeparatorHeight:h===0?m:0,metadataOffsets:eH({diffStyle:o,hunk:n,rowCount:g})}),p!=null&&h>0&&f({rowCount:h,startLineIndex:_+g,postSeparatorHeight:m})}this.cache.totalLines=d}getLayoutCheckpointBeforeLineIndex(e){if(e<=0||this.cache.checkpoints.length===0)return;let t=0,n=this.cache.checkpoints.length-1,r;for(;t<=n;){let i=t+n>>1,a=this.cache.checkpoints[i];if(a==null)throw Error(`VirtualizedFileDiff: invalid checkpoint index`);a.lineIndex<=e?(r=a,t=i+1):n=i-1}return r}getLayoutCheckpointBeforeTop(e,t){let n=0,r=this.cache.checkpoints.length-1,i=-1;for(;n<=r;){let t=n+r>>1,a=this.cache.checkpoints[t];if(a==null)throw Error(`VirtualizedFileDiff: invalid checkpoint index`);a.top<=e?(i=t,n=t+1):r=t-1}if(t==null)return i>=0?this.cache.checkpoints[i]:void 0;for(let e=i;e>=0;e--){let n=this.cache.checkpoints[e];if(n==null)throw Error(`VirtualizedFileDiff: invalid checkpoint index`);if(n.renderedLineIndex%t===0)return n}}getExpandedLineCount(e,t){let n=0;if(e.isPartial){for(let r of e.hunks)n+=t===`split`?r.splitLineCount:r.unifiedLineCount;return n}let{expandUnchanged:r=!1,collapsedContextThreshold:i=1}=this.options,a=r?!0:this.hunksRenderer.getExpandedHunksMap();for(let[r,o]of e.hunks.entries()){let s=t===`split`?o.splitLineCount:o.unifiedLineCount;n+=s;let c=Math.max(o.collapsedBefore,0),{fromStart:l,fromEnd:u,renderAll:d}=Bz({isPartial:e.isPartial,rangeSize:c,expandedHunks:a,hunkIndex:r,collapsedContextThreshold:i});c>0&&(n+=d?c:l+u)}let o=Uz({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:a,collapsedContextThreshold:i,errorPrefix:`VirtualizedFileDiff`});return o!=null&&(n+=o.fromStart+o.fromEnd),n}getLayoutLineCount(e,t){let n=this.getExpandedLineCount(e,t),r=t===`split`?e.splitLineCount:e.unifiedLineCount;return Math.max(n,r,e.additionLines.length,e.deletionLines.length,this.cache.totalLines)}computeRenderRangeFromWindow(e,t,{top:n,bottom:r}){let{disableFileHeader:i=!1,expandUnchanged:a=!1,collapsedContextThreshold:o=1}=this.options,{hunkLineCount:s,lineHeight:c}=this.metrics,l=this.getDiffStyle(),u=this.getHunkSeparatorType(),d=rH(e,this.options.loadDiffFiles!=null),f=this.height,p=this.getLayoutLineCount(e,l),m=uR(this.metrics,i),h=e.hunks.length>0?pR(this.metrics):0,{fileAnnotationHeight:g}=this.cache,_=m+g,v=Math.max(0,f-m-g-h),y=this.hasFileAnnotations(e),b=t+m,x=g>0&&y&&b<r&&b+g>n;if(t<n-f||t>r)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:f-m-h};if(p<=s||e.hunks.length===0)return{startingLine:0,totalLines:s,bufferBefore:0,bufferAfter:0};this.approximateLayoutCheckpoints(e),p=this.getLayoutLineCount(e,l);let S=Math.ceil(Math.max(r-n,0)/c),C=Math.ceil(S/s)*s+s,w=C/s,T=w,E=[],D=(n+r)/2,O=this.getLayoutCheckpointBeforeTop(Math.max(0,n-t-C*c*2),s),k=t+(O?.top??_),A=O?.renderedLineIndex??0,j,M,N;if(Qz({diff:e,diffStyle:l,startingLine:O?.renderedLineIndex??0,expandedHunks:a?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:o,callback:({hunkIndex:i,hunk:a,collapsedBefore:o,collapsedAfter:c,deletionLine:f,additionLine:p})=>{let m=p==null?f.splitLineIndex:p.splitLineIndex,h=p==null?f.unifiedLineIndex:p.unifiedLineIndex,g=(p?.noEOFCR??!1)||(f?.noEOFCR??!1),v=i===e.hunks.length-1&&a!=null&&(l===`split`?m===a.splitLineStart+a.splitLineCount-1:h===a.unifiedLineStart+a.unifiedLineCount-1),y=(o>0?Xz({type:u,metrics:this.metrics,hunkIndex:i,hunkSpecs:a?.hunkSpecs}):void 0)?.totalHeight??0;k+=y;let b=A%s===0,x=Math.floor(A/s);if(b&&(E[x]=k-(t+_+y),N!=null)){if(N<=0)return!0;N--}let S=this.getLineHeight(l===`split`?m:h,g);if(k>n-S&&k<r&&(j??=x),M==null&&k+S>D&&(M=x),N==null&&k>=r&&b&&(N=T),A++,k+=S,c>0||v&&d){let e=Zz({type:u,metrics:this.metrics});e!=null&&(k<r&&k+e.totalHeight>n&&(j??=x),M==null&&k+e.totalHeight>D&&(M=x),k+=e.totalHeight)}return!1}}),j==null){if(x)j=0,M=0;else return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:f-m-h}}M??=j;let ee=Math.round(M-w/2),te=Math.max(0,Math.ceil(p/s)-w),ne=Math.max(0,Math.min(ee,te)),re=ne*s,ie=ee<0?C+ee*s:C,P=E[ne]??0,ae=re===0?0:g+P,oe=ne+ie/s,se=oe<E.length?v-E[oe]:v-(k-t-_);return{startingLine:re,totalLines:ie,bufferBefore:ae,bufferAfter:Math.max(0,se)}}};function JV(e){let t;for(let n of e){if(n==null)continue;let e=n.children[1];if(e instanceof HTMLElement)for(let n of e.children)n instanceof HTMLElement&&n.dataset.lineAnnotation===`-1,-1`&&(t=Math.max(t??0,n.getBoundingClientRect().height))}return t}function YV(e){let t=Array.from(e).sort((e,t)=>e[0]-t[0]),n=[],r=[0],i=0;for(let[e,a]of t)n.push(e),i+=a,r.push(i);return{lineIndexes:n,prefixTotals:r}}function XV({lineIndexes:e,prefixTotals:t},n,r){if(n>=r||e.length===0)return 0;let i=ZV(e,n);return(t[ZV(e,r)]??0)-(t[i]??0)}function ZV(e,t){let n=0,r=e.length;for(;n<r;){let i=n+r>>1,a=e[i];if(a==null)throw Error(`VirtualizedFileDiff: invalid prefix index`);a<t?n=i+1:r=i}return n}function QV(e){return Math.ceil(e/WV)*WV}function $V(e,t){let n=0;for(let r of e)r<t&&n++;return n}function eH({diffStyle:e,hunk:t,rowCount:n}){if(n<=0||!t.noEOFCRAdditions&&!t.noEOFCRDeletions)return[];let r=t.hunkContent.at(-1);if(r==null)return[];if(r.type===`context`)return[n-1];let i=Math.max(r.deletions,r.additions),a=r.deletions+r.additions;if(e===`split`)return i>0&&(t.noEOFCRAdditions||t.noEOFCRDeletions)?[n-1]:[];let o=[],s=n-a;return r.deletions>0&&t.noEOFCRDeletions&&o.push(s+r.deletions-1),r.additions>0&&t.noEOFCRAdditions&&o.push(n-1),o}function tH(e,t){return(e.diffStyle??`split`)!==(t.diffStyle??`split`)||(e.overflow??`scroll`)!==(t.overflow??`scroll`)||(e.collapsed??!1)!==(t.collapsed??!1)||(e.disableLineNumbers??!1)!==(t.disableLineNumbers??!1)||(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.diffIndicators??`bars`)!==(t.diffIndicators??`bars`)||(e.hunkSeparators??`line-info`)!==(t.hunkSeparators??`line-info`)||!!e.loadDiffFiles!=!!t.loadDiffFiles||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??1)!==(t.collapsedContextThreshold??1)||e.unsafeCSS!==t.unsafeCSS}function nH(e,t){return(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.hunkSeparators??`line-info`)!==(t.hunkSeparators??`line-info`)||!!e.loadDiffFiles!=!!t.loadDiffFiles||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??1)!==(t.collapsedContextThreshold??1)}function rH(e,t){return e.isPartial&&t&&(e.type===`change`||e.type===`rename-changed`)}function iH(e){return typeof e==`function`?`custom`:e??`line-info`}function aH(e,t){return e==null||t==null?e==null&&t==null:gR(e,t)}function oH(e,t){let[n,r]=e.split(`,`).map(Number);return t===`split`?r:n}function sH({hunkIndex:e,lineIndex:t,conflictIndex:n}){return`merge-conflict-action-${e}-${t}-${n}`}function cH(e,t){let n=t.hunks[e.hunkIndex];if(n!=null)return{hunkIndex:e.hunkIndex,lineIndex:lH(n,e.startContentIndex)}}function lH(e,t){let n=e.unifiedLineStart;for(let r=0;r<t;r++){let t=e.hunkContent[r];n+=t.type===`context`?t.lines:t.deletions+t.additions}return n}function uH(e){let t=(0,H.useRef)(e);return(0,H.useInsertionEffect)(()=>void(t.current=e)),(0,H.useCallback)((...e)=>t.current(...e),[])}var dH=(0,H.createContext)(void 0);function fH(){return(0,H.useContext)(dH)}var pH={position:`absolute`,top:0,bottom:0,textAlign:`center`,whiteSpace:`normal`,touchAction:`none`},mH={display:`contents`};function hH(){return null}function gH({fileDiff:e,actions:t,renderCustomHeader:n,renderHeaderPrefix:r,renderHeaderFilenameSuffix:i,renderHeaderMetadata:a,renderAnnotation:o,renderGutterUtility:s,renderMergeConflictUtility:c,lineAnnotations:l,getHoveredLine:u,getInstance:d,getAnnotationSlotName:f=eL}){let p=n?.(e),m=r?.(e),h=i?.(e),g=a?.(e);return(0,U.jsxs)(U.Fragment,{children:[p==null?(0,U.jsxs)(U.Fragment,{children:[m!=null&&(0,U.jsx)(`div`,{slot:`header-prefix`,children:m}),h!=null&&(0,U.jsx)(`div`,{slot:`header-filename-suffix`,children:h}),g!=null&&(0,U.jsx)(`div`,{slot:`header-metadata`,children:g})]}):(0,U.jsx)(`div`,{slot:ei,children:p}),o!=null&&l?.map((t,n)=>(0,U.jsx)(`div`,{slot:f(t),children:o(t,e)},n)),t!=null&&c!=null&&d!=null&&t.map(t=>{if(t==null)return;let n=_H(t,e);return(0,U.jsx)(`div`,{slot:n,style:mH,children:c(t,d)},n)}),s!=null&&(0,U.jsx)(`div`,{slot:`gutter-utility-slot`,style:pH,children:s(u)})]})}function _H(e,t){let n=cH(e,t);return n==null?void 0:sH({hunkIndex:n.hunkIndex,lineIndex:n.lineIndex,conflictIndex:e.conflictIndex})}var vH=(0,H.createContext)(void 0);function yH(e,t){return typeof window>`u`&&t!=null?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`template`,{shadowrootmode:`open`,dangerouslySetInnerHTML:{__html:t}}),e]}):(0,U.jsx)(U.Fragment,{children:e})}var bH=(0,H.createContext)(void 0);function xH(){return(0,H.useContext)(bH)}function SH(){let[e]=(0,H.useState)(()=>{let e=0,t;return{getSnapshot:()=>e,subscribe(e){return t=e,()=>{t=void 0}},forceUpdate(){e++,t?.()}}});return(0,H.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot),e.forceUpdate}function CH(e,t){"use no memo";return e.current?.__getNextRenderData(t)}var wH=typeof window>`u`?H.useEffect:H.useLayoutEffect;function TH({fileDiff:e,oldFile:t,newFile:n,options:r,editorOptions:i,editStateKey:a,lineAnnotations:o,selectedLines:s,prerenderedHTML:c,metrics:l,hasGutterRenderUtility:u,hasCustomHeader:d,disableWorkerPool:f,edit:p,onEditChange:m,onEditComplete:h}){let g=xH(),_=s!==void 0,v=(0,H.useContext)(vH),y=fH(),[b,x]=(0,H.useState)(),S=uH(e=>m?.(e)),C=m==null?void 0:S,w=(0,H.useRef)(null),T=uH(r=>{let i=h?.(r)??`reject`;return i===`accept`&&(w.current={fileDiff:{installed:r.fileDiff,stale:r.originalFileDiff},filePair:e==null?{fileDiff:r.fileDiff,installed:{oldFile:r.oldFile,newFile:r.newFile},stale:{oldFile:t??null,newFile:n??null}}:null,annotations:{installed:r.lineAnnotations,stale:r.originalLineAnnotations}}),i}),E=h==null?void 0:T,D=EH({acceptedCache:w,fileDiff:e,newFile:n,oldFile:t,parseDiffOptions:r?.parseDiffOptions}),O=(0,H.useRef)(null),k=SH(),A=CH(O,OH(w,D,o))??{fileDiff:D,lineAnnotations:o??Gr},j=(0,H.useRef)(null),M=(0,H.useRef)(null),N=uH(()=>{if(y==null)throw Error(`FileDiff: EditContext is not attached`);return y(`file-diff`,i??{},a)}),ee=uH(e=>{if(e!=null){if(O.current!=null)throw Error(`useFileDiffInstance: An instance should not already exist when a node is created`);g==null?O.current=new NV(jH({controlledSelection:_,hasCustomHeader:d,hasGutterRenderUtility:u,onEditChange:C,onEditComplete:E,options:r}),f?void 0:v,k):O.current=new qV(jH({controlledSelection:_,hasCustomHeader:d,hasGutterRenderUtility:u,onEditChange:C,onEditComplete:E,options:r}),g,l,f?void 0:v,k),O.current.hydrate({fileDiff:D,fileContainer:e,lineAnnotations:o,prerenderedHTML:c})}else{if(O.current==null)throw Error(`useFileDiffInstance: A FileDiff instance should exist when unmounting`);M.current=null,O.current.cleanUp(),O.current=null,j.current=null}});wH(()=>{let{current:e}=O;if(e==null)return;let t=jH({controlledSelection:_,hasCustomHeader:d,hasGutterRenderUtility:u,onEditChange:C,onEditComplete:E,options:r}),n=!lI(e.options,t);if(e.setOptions(t),!p&&(M.current=null,j.current!=null)){let{current:e}=j;j.current=null,e()}let i=AH(D,o,w);if(e.render({forceRender:n,fileDiff:i.fileDiff,lineAnnotations:i.lineAnnotations}),s!==void 0&&e.setSelectedLines(s),!p||j.current!=null)return;if(y==null)throw Error(`FileDiff: EditContext is not attached`);let a=()=>{O.current===e&&j.current==null&&e.__canAttachEditor()&&(j.current=MH(e,N),k())};if(e.__canAttachEditor()){M.current=null,a();return}let c=e.__prepareForEditing();if(c==null){M.current=null;return}if(M.current?.promise===c)return;let l={promise:c};M.current=l,c.then(()=>{M.current===l&&(a(),M.current=null)}).catch(e=>{M.current===l&&(M.current=null,x(e))})});let te=(0,H.useCallback)(()=>O.current?.getHoveredLine(),[]),ne=(0,H.useCallback)(e=>O.current?.getAnnotationSlotName(e)??eL(e),[]);if(b!=null)throw b;return{...A,ref:ee,getHoveredLine:te,getAnnotationSlotName:ne}}function EH({acceptedCache:e,fileDiff:t,newFile:n,oldFile:r,parseDiffOptions:i}){return(0,H.useMemo)(()=>{if(t!=null)return t;let{current:a}=e,o=a?.filePair;if(a!=null&&o!=null){if(DH(r,n,o.stale)||DH(r,n,o.installed))return o.fileDiff;a.filePair=null}return Dz(r??null,n??null,i)},[e,t,r,n,i])}function DH(e,t,n){return yL(e??void 0,n.oldFile??void 0)&&yL(t??void 0,n.newFile??void 0)}function OH(e,t,n){"use no memo";return kH(t,n,e.current)}function kH(e,t,n){return{fileDiff:n?.fileDiff!=null&&hR(e,n.fileDiff.stale)?n.fileDiff.installed:e,lineAnnotations:n?.annotations!=null&&t===n.annotations.stale?n.annotations.installed:t}}function AH(e,t,n){let{current:r}=n,i=kH(e,t,r);return r==null||(r.fileDiff!=null&&!hR(e,r.fileDiff.stale)&&(r.fileDiff=null),t!==r.annotations?.stale&&(r.annotations=null),r.fileDiff==null&&r.annotations==null&&r.filePair==null&&(n.current=null)),i}function jH({options:e,controlledSelection:t,hasCustomHeader:n,hasGutterRenderUtility:r,onEditChange:i,onEditComplete:a}){return{...e,controlledSelection:t,renderCustomHeader:n?hH:e?.renderCustomHeader,renderGutterUtility:r?hH:e?.renderGutterUtility,onEditChange:i,onEditComplete:a}}function MH(e,t){let n=t();try{return n.edit(e)}catch(e){throw n.cleanUp(),e}}function NH({fileDiff:e,options:t,editorOptions:n,editStateKey:r,metrics:i,lineAnnotations:a,selectedLines:o,className:s,style:c,prerenderedHTML:l,renderAnnotation:u,renderCustomHeader:d,renderHeaderPrefix:f,renderHeaderFilenameSuffix:p,renderHeaderMetadata:m,renderGutterUtility:h,disableWorkerPool:g=!1,edit:_=!1,onEditChange:v,onEditComplete:y}){let{ref:b,getHoveredLine:x,getAnnotationSlotName:S,fileDiff:C,lineAnnotations:w}=TH({fileDiff:e,options:t,editorOptions:n,editStateKey:r,metrics:i,lineAnnotations:a,selectedLines:o,prerenderedHTML:l,hasGutterRenderUtility:h!=null,hasCustomHeader:d!=null,disableWorkerPool:g,edit:_,onEditChange:v,onEditComplete:y}),T=gH({fileDiff:C,renderCustomHeader:d,renderHeaderPrefix:f,renderHeaderFilenameSuffix:p,renderHeaderMetadata:m,renderAnnotation:u,renderGutterUtility:h,lineAnnotations:w,getHoveredLine:x,getAnnotationSlotName:S});return(0,U.jsx)(Kr,{ref:b,className:s,style:c,children:yH(T,l)})}var PH=3e3,FH=`text-foreground hover:bg-accent aria-pressed:bg-accent inline-flex h-7 min-w-7 cursor-pointer items-center justify-center rounded-lg px-1.5 [&_svg]:opacity-80`,IH=`text-muted-foreground hover:text-foreground aria-pressed:bg-background aria-pressed:text-foreground dark:aria-pressed:bg-input/72 inline-flex h-6 cursor-pointer items-center justify-center rounded-md px-2.5 aria-pressed:shadow-xs`;function LH(e){let[t,n]=(0,H.useState)(null),[r,i]=(0,H.useState)(null),[a,o]=(0,H.useState)(0),s=(0,H.useRef)({patch:null,count:0}),c=L(e=>e.prefs.diff),l=gn(),[u,d]=tc(`diffFlipped`,[]);function f(e){fn({...I().prefs,diff:{...c,...e}})}(0,H.useEffect)(()=>{let t=!0,r=!1;async function a(){if(!r){r=!0;try{let r=await R(e.machine,`git.diff`,{projectId:e.projectId});if(!t||(i(null),r===s.current.patch))return;s.current={patch:r,count:s.current.count+1},n(r.trim()===``?[]:rz(r,`${e.projectId}:${s.current.count}`).flatMap(e=>e.files))}catch(e){t&&i(Xn(e))}finally{r=!1}}}function o(){document.hidden||a()}a();let c=window.setInterval(o,PH);return window.addEventListener(`focus`,o),()=>{t=!1,window.clearInterval(c),window.removeEventListener(`focus`,o)}},[e.machine,e.projectId,e.running,a]);let p=t??[],m=Yi(p,e=>Yi(e.hunks,e=>e.additionLines)),h=Yi(p,e=>Yi(e.hunks,e=>e.deletionLines));return(0,U.jsxs)(`div`,{className:`bg-background flex h-full min-h-0 min-w-0 flex-col`,children:[(0,U.jsxs)(`div`,{className:`border-border/60 bg-background flex h-(--workspace-topbar-height) shrink-0 items-center justify-between gap-2 border-b pr-3 pl-3`,children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1`,children:[(0,U.jsx)(B,{size:`icon-sm`,variant:`ghost`,title:`Close`,"aria-label":`Close`,onClick:e.onClose,children:(0,U.jsx)(V,{icon:mr,className:`size-3.5`})}),(0,U.jsx)(`span`,{className:`text-foreground min-w-0 truncate text-xs font-medium`,children:`Uncommitted changes`})]}),(0,U.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[p.length>0&&(0,U.jsxs)(`span`,{className:`text-2xs mr-1 inline-flex items-center gap-1 font-mono tabular-nums`,children:[(0,U.jsxs)(`span`,{className:`text-diff-addition`,children:[`+`,m]}),(0,U.jsxs)(`span`,{className:`text-diff-deletion`,children:[`-`,h]})]}),(0,U.jsx)(B,{size:`icon-sm`,variant:`ghost`,title:`Refresh diff`,"aria-label":`Refresh diff`,onClick:()=>o(a+1),children:(0,U.jsx)(V,{icon:Pt,className:`size-3.5`})}),p.length>0&&(0,U.jsx)(B,{size:`icon-sm`,variant:`ghost`,title:c.collapsed?`Expand all files`:`Collapse all files`,onClick:()=>{d([]),f({collapsed:!c.collapsed})},children:(0,U.jsx)(V,{icon:c.collapsed?gs:Jt,className:`size-3.5`})}),(0,U.jsxs)(`div`,{className:`bg-input/40 flex shrink-0 items-center rounded-lg p-0.5`,children:[(0,U.jsx)(`button`,{className:IH,"aria-pressed":!c.split,"aria-label":`Stacked diff view`,onClick:()=>f({split:!1}),children:(0,U.jsx)(V,{icon:is,className:`size-3.5`})}),(0,U.jsx)(`button`,{className:IH,"aria-pressed":c.split,"aria-label":`Split diff view`,onClick:()=>f({split:!0}),children:(0,U.jsx)(V,{icon:Lo,className:`size-3.5`})})]}),(0,U.jsx)(`button`,{className:FH,"aria-pressed":c.wrap,title:c.wrap?`Disable line wrapping`:`Enable line wrapping`,onClick:()=>f({wrap:!c.wrap}),children:(0,U.jsx)(V,{icon:bt,className:`size-3.5`})})]})]}),(0,U.jsxs)(`div`,{className:`diff-render-surface min-h-0 flex-1 overflow-y-auto [--code-background:var(--background)]`,children:[r!==null&&(0,U.jsx)(`p`,{className:`text-muted-foreground p-4 text-center text-xs`,children:r}),r===null&&t===null&&(0,U.jsx)(`p`,{className:`text-muted-foreground p-4 text-center text-xs`,children:`Loading…`}),r===null&&t?.length===0&&(0,U.jsxs)(`div`,{className:`flex h-full flex-col items-center justify-center gap-3 p-6 text-center`,children:[(0,U.jsx)(V,{icon:_o,className:`text-muted-foreground/40 size-8`}),(0,U.jsxs)(`div`,{className:`grid gap-1`,children:[(0,U.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`No uncommitted changes`}),(0,U.jsx)(`p`,{className:`text-muted-foreground/50 text-xs italic`,children:`If it works, don’t touch it.`})]})]}),r===null&&p.map(e=>{let t=c.collapsed!==u.includes(e.name);function n(){d(u.includes(e.name)?u.filter(t=>t!==e.name):[...u,e.name])}return(0,U.jsx)(`div`,{onClick:e=>{e.nativeEvent.composedPath().some(e=>e instanceof Element&&e.hasAttribute(`data-title`))&&n()},children:(0,U.jsx)(NH,{fileDiff:e,options:{theme:l,themeType:`dark`,unsafeCSS:`:host,
|
|
181
|
+
[data-diffs-header],
|
|
182
|
+
[data-diff],
|
|
183
|
+
[data-file],
|
|
184
|
+
[data-error-wrapper],
|
|
185
|
+
[data-virtualizer-buffer] {
|
|
186
|
+
--diffs-header-font-family: var(--font-sans) !important;
|
|
187
|
+
--diffs-font-family: var(--font-mono) !important;
|
|
188
|
+
--diffs-bg: var(--code-background) !important;
|
|
189
|
+
--diffs-light-bg: var(--code-background) !important;
|
|
190
|
+
--diffs-dark-bg: var(--code-background) !important;
|
|
191
|
+
--diffs-token-light-bg: transparent;
|
|
192
|
+
--diffs-token-dark-bg: transparent;
|
|
193
|
+
|
|
194
|
+
--diffs-bg-context-override: color-mix(
|
|
195
|
+
in srgb,
|
|
196
|
+
var(--code-background) 97%,
|
|
197
|
+
var(--code-foreground)
|
|
198
|
+
);
|
|
199
|
+
--diffs-bg-hover-override: color-mix(
|
|
200
|
+
in srgb,
|
|
201
|
+
var(--code-background) 94%,
|
|
202
|
+
var(--code-foreground)
|
|
203
|
+
);
|
|
204
|
+
--diffs-bg-separator-override: color-mix(
|
|
205
|
+
in srgb,
|
|
206
|
+
var(--code-background) 95%,
|
|
207
|
+
var(--code-foreground)
|
|
208
|
+
);
|
|
209
|
+
--diffs-bg-buffer-override: color-mix(
|
|
210
|
+
in srgb,
|
|
211
|
+
var(--code-background) 90%,
|
|
212
|
+
var(--code-foreground)
|
|
213
|
+
);
|
|
214
|
+
|
|
215
|
+
--diffs-bg-context-gutter-override: var(--code-background);
|
|
216
|
+
--diffs-addition-color-override: var(--diff-addition);
|
|
217
|
+
--diffs-deletion-color-override: var(--diff-deletion);
|
|
218
|
+
--diffs-bg-addition-hover-override: color-mix(
|
|
219
|
+
in srgb,
|
|
220
|
+
var(--code-background) 85%,
|
|
221
|
+
var(--diff-addition)
|
|
222
|
+
);
|
|
223
|
+
--diffs-bg-addition-emphasis-override: color-mix(
|
|
224
|
+
in srgb,
|
|
225
|
+
var(--code-background) 65%,
|
|
226
|
+
var(--diff-addition)
|
|
227
|
+
);
|
|
228
|
+
|
|
229
|
+
--diffs-bg-deletion-hover-override: color-mix(
|
|
230
|
+
in srgb,
|
|
231
|
+
var(--code-background) 85%,
|
|
232
|
+
var(--diff-deletion)
|
|
233
|
+
);
|
|
234
|
+
--diffs-bg-deletion-emphasis-override: color-mix(
|
|
235
|
+
in srgb,
|
|
236
|
+
var(--code-background) 65%,
|
|
237
|
+
var(--diff-deletion)
|
|
238
|
+
);
|
|
239
|
+
|
|
240
|
+
background-color: var(--diffs-bg) !important;
|
|
241
|
+
color: var(--code-foreground) !important;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
:is(
|
|
245
|
+
[data-line],
|
|
246
|
+
[data-line-annotation],
|
|
247
|
+
[data-merge-conflict],
|
|
248
|
+
[data-merge-conflict-actions],
|
|
249
|
+
[data-no-newline]
|
|
250
|
+
)[data-selected-line] {
|
|
251
|
+
--diffs-line-bg: light-dark(
|
|
252
|
+
color-mix(
|
|
253
|
+
in lab,
|
|
254
|
+
var(--code-background) 88%,
|
|
255
|
+
color-mix(in srgb, var(--code-background) 50%, var(--diffs-modified-base))
|
|
256
|
+
),
|
|
257
|
+
color-mix(
|
|
258
|
+
in lab,
|
|
259
|
+
var(--code-background) 80%,
|
|
260
|
+
color-mix(in srgb, var(--code-background) 70%, var(--diffs-modified-base))
|
|
261
|
+
)
|
|
262
|
+
) !important;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
:is([data-gutter-buffer], [data-column-number])[data-selected-line] {
|
|
266
|
+
--diffs-line-bg: light-dark(
|
|
267
|
+
color-mix(
|
|
268
|
+
in lab,
|
|
269
|
+
var(--code-background) 91%,
|
|
270
|
+
color-mix(in srgb, var(--code-background) 35%, var(--diffs-modified-base))
|
|
271
|
+
),
|
|
272
|
+
color-mix(
|
|
273
|
+
in lab,
|
|
274
|
+
var(--code-background) 85%,
|
|
275
|
+
color-mix(in srgb, var(--code-background) 60%, var(--diffs-modified-base))
|
|
276
|
+
)
|
|
277
|
+
) !important;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
[data-indicators='bars']
|
|
281
|
+
:is(
|
|
282
|
+
[data-column-number],
|
|
283
|
+
[data-gutter-buffer='annotation']
|
|
284
|
+
)[data-selected-line] {
|
|
285
|
+
position: relative;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
[data-indicators='bars']
|
|
289
|
+
:is(
|
|
290
|
+
[data-column-number],
|
|
291
|
+
[data-gutter-buffer='annotation']
|
|
292
|
+
)[data-selected-line]::before {
|
|
293
|
+
position: absolute !important;
|
|
294
|
+
inset-block: 0 !important;
|
|
295
|
+
inset-inline-start: 0 !important;
|
|
296
|
+
display: block !important;
|
|
297
|
+
width: 4px !important;
|
|
298
|
+
min-width: 4px !important;
|
|
299
|
+
max-width: 4px !important;
|
|
300
|
+
height: auto !important;
|
|
301
|
+
padding: 0 !important;
|
|
302
|
+
content: '' !important;
|
|
303
|
+
background-color: var(--diffs-modified-base) !important;
|
|
304
|
+
background-image: none !important;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
[data-file-info] {
|
|
308
|
+
background-color: var(--code-background) !important;
|
|
309
|
+
border-block-color: transparent !important;
|
|
310
|
+
color: var(--code-foreground) !important;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
[data-diffs-header] {
|
|
314
|
+
position: sticky !important;
|
|
315
|
+
top: 0;
|
|
316
|
+
z-index: 4;
|
|
317
|
+
background-color: var(--code-background) !important;
|
|
318
|
+
border-bottom-color: transparent !important;
|
|
319
|
+
align-items: center !important;
|
|
320
|
+
font-family: var(--font-sans) !important;
|
|
321
|
+
font-size: 12px !important;
|
|
322
|
+
line-height: 1 !important;
|
|
323
|
+
min-height: 32px !important;
|
|
324
|
+
padding-block: 6px !important;
|
|
325
|
+
padding-inline: 8px 12px !important;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
[data-diffs-header]:hover {
|
|
329
|
+
background-color: var(--code-background) !important;
|
|
330
|
+
box-shadow: inset 3px 0
|
|
331
|
+
color-mix(in srgb, var(--code-foreground) 24%, transparent);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
:is([data-separator='line-info'], [data-separator='line-info-basic']) {
|
|
335
|
+
height: 24px !important;
|
|
336
|
+
margin-block: 0 !important;
|
|
337
|
+
--diffs-bg-separator: color-mix(
|
|
338
|
+
in srgb,
|
|
339
|
+
var(--code-background) 97%,
|
|
340
|
+
var(--code-foreground)
|
|
341
|
+
);
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
:is([data-separator='line-info'], [data-separator='line-info-basic'])
|
|
345
|
+
[data-separator-content] {
|
|
346
|
+
color: color-mix(
|
|
347
|
+
in srgb,
|
|
348
|
+
var(--code-foreground) 50%,
|
|
349
|
+
var(--code-background)
|
|
350
|
+
) !important;
|
|
351
|
+
font-family: var(--font-sans) !important;
|
|
352
|
+
font-size: 11px !important;
|
|
353
|
+
text-decoration: none !important;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
:is([data-separator='line-info'], [data-separator='line-info-basic'])
|
|
357
|
+
[data-expand-button] {
|
|
358
|
+
color: color-mix(
|
|
359
|
+
in srgb,
|
|
360
|
+
var(--code-foreground) 50%,
|
|
361
|
+
var(--code-background)
|
|
362
|
+
) !important;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
:is(
|
|
366
|
+
[data-separator='line-info'],
|
|
367
|
+
[data-separator='line-info-basic']
|
|
368
|
+
)[data-expand-index]
|
|
369
|
+
:is([data-separator-content], [data-expand-button]):hover {
|
|
370
|
+
color: var(--code-foreground) !important;
|
|
371
|
+
background-color: color-mix(
|
|
372
|
+
in srgb,
|
|
373
|
+
var(--code-background) 92%,
|
|
374
|
+
var(--code-foreground)
|
|
375
|
+
) !important;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
[data-diffs-header] [data-header-content] {
|
|
379
|
+
align-items: center !important;
|
|
380
|
+
line-height: 1 !important;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
[data-diffs-header] :is([data-title], [data-prev-name]) {
|
|
384
|
+
line-height: 16px !important;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
[data-diffs-header] [data-metadata] {
|
|
388
|
+
align-items: center !important;
|
|
389
|
+
line-height: 1 !important;
|
|
390
|
+
font-variant-numeric: tabular-nums;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
[data-diffs-header] [data-additions-count],
|
|
394
|
+
[data-diffs-header] [data-deletions-count] {
|
|
395
|
+
font-family: var(--font-mono) !important;
|
|
396
|
+
font-size: 11px !important;
|
|
397
|
+
font-variant-numeric: tabular-nums;
|
|
398
|
+
line-height: 1 !important;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
[data-diffs-header] [data-change-icon],
|
|
402
|
+
[data-diffs-header] [data-rename-icon] {
|
|
403
|
+
display: block;
|
|
404
|
+
flex-shrink: 0;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
[data-title] {
|
|
408
|
+
cursor: pointer;
|
|
409
|
+
transition: color 120ms ease;
|
|
410
|
+
font-family: var(--font-sans) !important;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
[data-title]:hover {
|
|
414
|
+
color: color-mix(
|
|
415
|
+
in srgb,
|
|
416
|
+
var(--code-foreground) 84%,
|
|
417
|
+
var(--primary)
|
|
418
|
+
) !important;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
[data-diff],
|
|
422
|
+
[data-file] {
|
|
423
|
+
transition: opacity 200ms ease-out;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
@starting-style {
|
|
427
|
+
[data-diff],
|
|
428
|
+
[data-file] {
|
|
429
|
+
opacity: 0;
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
@media (prefers-reduced-motion: reduce) {
|
|
434
|
+
[data-diff],
|
|
435
|
+
[data-file] {
|
|
436
|
+
transition: none;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
`,collapsed:t,lineDiffType:`word-alt`,overflow:c.wrap?`wrap`:`scroll`,diffStyle:c.split?`split`:`unified`},renderHeaderPrefix:()=>(0,U.jsx)(`button`,{className:`text-muted-foreground hover:text-foreground flex size-5 cursor-pointer items-center justify-center`,"aria-label":t?`Expand file`:`Collapse file`,onClick:n,children:(0,U.jsx)(V,{icon:t?jt:uo,className:`size-3.5`})})})},e.name)})]})]})}function RH(e){let t=L(e=>e.items),n=L(e=>e.earlier),r=L(t=>Ee(t.machines,e.machine,e.sessionId)),i=[...n,...t],a=JP(i,r),o=a.agents.find(t=>t.item.id===e.selected),s=a.tasks.find(t=>t.item.id===e.selected),c=o===void 0?null:aF(o.item);return(0,U.jsxs)(`div`,{className:`bg-background flex h-full min-h-0 min-w-0 flex-col`,children:[(0,U.jsxs)(`div`,{className:`border-border/60 bg-background flex h-(--workspace-topbar-height) shrink-0 items-center gap-1 border-b pr-3 pl-3`,children:[(0,U.jsx)(B,{size:`icon-sm`,variant:`ghost`,title:`Close`,"aria-label":`Close`,onClick:e.onClose,children:(0,U.jsx)(V,{icon:mr,className:`size-3.5`})}),o===void 0&&s===void 0&&(0,U.jsx)(`span`,{className:`text-foreground min-w-0 truncate text-xs font-medium`,children:`Tasks`}),(o!==void 0||s!==void 0)&&(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 text-xs`,children:[(0,U.jsx)(B,{size:`icon-sm`,variant:`ghost`,title:`Back to tasks`,"aria-label":`Back to tasks`,onClick:()=>e.onSelect(null),children:(0,U.jsx)(V,{icon:Za,className:`size-3.5`})}),o!==void 0&&c!==null&&(0,U.jsxs)(U.Fragment,{children:[o.status===`Running`?(0,U.jsx)(sF,{className:c.tone}):(0,U.jsx)(oF,{className:c.tone}),(0,U.jsx)(`span`,{className:`text-foreground shrink-0 font-medium`,children:c.name}),c.description!==``&&(0,U.jsx)(`span`,{className:`text-muted-foreground min-w-0 truncate`,children:c.description}),o.status===`Running`&&o.agentId!==null&&e.sessionId!==null&&(0,U.jsx)(zH,{machine:e.machine,sessionId:e.sessionId,taskId:o.agentId})]}),s!==void 0&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(V,{icon:vo,className:`text-muted-foreground size-4 shrink-0`}),(0,U.jsx)(`span`,{className:`text-foreground min-w-0 truncate font-medium`,children:YP(s.item)}),(0,U.jsx)(`span`,{className:z(`text-muted-foreground shrink-0`,s.status===`Failed`&&`text-destructive`),children:s.status}),s.status===`Running`&&s.taskId!==null&&e.sessionId!==null&&(0,U.jsx)(zH,{machine:e.machine,sessionId:e.sessionId,taskId:s.taskId})]})]})]}),o===void 0&&s===void 0&&(0,U.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto p-3`,children:[(0,U.jsx)(`h2`,{className:`text-muted-foreground px-1 pb-1.5 text-xs font-medium`,children:`Agents`}),a.agents.length===0&&(0,U.jsx)(`p`,{className:`text-muted-foreground px-1 py-1 text-xs`,children:`No agents in this thread.`}),(0,U.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:[...a.agents.filter(e=>e.status===`Running`),...a.agents.filter(e=>e.status!==`Running`)].map(t=>{let n=aF(t.item);return(0,U.jsxs)(`button`,{type:`button`,"aria-label":`Open ${n.name} agent: ${n.description}`,className:`bg-secondary hover:bg-accent focus-visible:ring-ring/70 flex w-full cursor-pointer items-center gap-2 rounded-lg px-3 py-2 text-left text-[13px] leading-5 tracking-[-0.04px] select-none focus-visible:ring-2 focus-visible:outline-none`,onClick:()=>e.onSelect(t.item.id),children:[t.status===`Running`?(0,U.jsx)(sF,{className:n.tone}):(0,U.jsx)(oF,{className:n.tone}),(0,U.jsx)(`span`,{className:`text-foreground shrink-0 font-medium`,children:n.name}),(0,U.jsx)(`span`,{className:`text-foreground min-w-0 flex-1 truncate`,children:n.description}),(0,U.jsx)(`span`,{className:z(`text-muted-foreground shrink-0 text-xs`,t.status===`Failed`&&`text-destructive`),children:t.status})]},t.item.id)})}),(0,U.jsx)(`h2`,{className:`text-muted-foreground px-1 pt-5 pb-1.5 text-xs font-medium`,children:`Tasks`}),a.tasks.length===0&&(0,U.jsx)(`p`,{className:`text-muted-foreground px-1 py-1 text-xs`,children:`No background tasks in this thread.`}),(0,U.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:[...a.tasks.filter(e=>e.status===`Running`),...a.tasks.filter(e=>e.status!==`Running`)].map(t=>(0,U.jsxs)(`button`,{type:`button`,"aria-label":`Open task: ${YP(t.item)}`,className:`bg-secondary hover:bg-accent focus-visible:ring-ring/70 flex w-full cursor-pointer items-center gap-2 rounded-lg px-3 py-2 text-left text-[13px] leading-5 tracking-[-0.04px] select-none focus-visible:ring-2 focus-visible:outline-none`,onClick:()=>e.onSelect(t.item.id),children:[(0,U.jsx)(V,{icon:vo,className:z(`size-4 shrink-0`,t.status===`Running`?`text-foreground animate-pulse`:`text-muted-foreground`)}),(0,U.jsx)(`span`,{className:`text-foreground min-w-0 flex-1 truncate`,children:YP(t.item)}),(0,U.jsx)(`span`,{className:z(`text-muted-foreground shrink-0 text-xs`,t.status===`Failed`&&`text-destructive`),children:t.status})]},t.item.id))})]}),o!==void 0&&(0,U.jsx)(VH,{item:o.item,agentId:o.agentId,running:o.status===`Running`,items:i,found:a,cwd:e.cwd,onSelect:e.onSelect},o.item.id),s!==void 0&&e.sessionId!==null&&(0,U.jsx)(BH,{machine:e.machine,sessionId:e.sessionId,command:s.item.command,path:s.path,events:s.events,running:s.status===`Running`},s.item.id)]})}function zH(e){return(0,U.jsx)(B,{size:`xs`,variant:`outline`,className:`shrink-0`,onClick:()=>Ie(e.machine,e.sessionId,e.taskId),children:`Stop`})}function BH(e){let[t,n]=(0,H.useState)(void 0),[r,i]=(0,H.useState)(null),a=(0,H.useRef)(null),o=(0,H.useRef)(!0);(0,H.useEffect)(()=>{let t=e.path;if(t===null)return;let r=!0;async function a(t){try{let a=await R(e.machine,`tasks.output`,{sessionId:e.sessionId,path:t});if(!r)return;n(a),i(null)}catch(e){r&&i(Xn(e))}}a(t);let o=e.running?window.setInterval(()=>void a(t),2e3):null;return()=>{r=!1,o!==null&&window.clearInterval(o)}},[e.machine,e.sessionId,e.path,e.running]),(0,H.useLayoutEffect)(()=>{let e=a.current;e!==null&&o.current&&(e.scrollTop=e.scrollHeight)},[t,e.events]);let s=e.path===null?e.events.join(`
|
|
440
|
+
`):t?.text??``;return(0,U.jsxs)(`div`,{ref:a,className:`min-h-0 flex-1 overflow-y-auto overscroll-y-contain p-3`,onScroll:e=>{let t=e.currentTarget;o.current=t.scrollHeight-t.scrollTop-t.clientHeight<40},children:[e.command!==``&&(0,U.jsxs)(`p`,{className:`text-muted-foreground pb-2 font-mono text-xs [overflow-wrap:anywhere] whitespace-pre-wrap`,children:[`$ `,e.command]}),r!==null&&(0,U.jsx)(`p`,{className:`text-destructive text-xs`,children:r}),r===null&&e.path!==null&&t===void 0&&(0,U.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:`Loading…`}),r===null&&e.path!==null&&t===null&&(0,U.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:`The output file no longer exists.`}),t?.truncated===!0&&(0,U.jsx)(`p`,{className:`text-muted-foreground pb-2 text-xs`,children:`Showing the end of the output.`}),e.path===null&&e.events.length===0&&(0,U.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:`No events yet.`}),t?.text===``&&(0,U.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:e.running?`No output yet.`:`No output.`}),s!==``&&(0,U.jsx)(`pre`,{className:`bg-secondary text-foreground rounded-lg p-3 font-mono text-xs leading-5 [overflow-wrap:anywhere] whitespace-pre-wrap select-text`,children:s})]})}function VH(e){let t=(0,H.useRef)(null),n=(0,H.useRef)(!0),[r,i]=(0,H.useState)([]);(0,H.useLayoutEffect)(()=>{let e=t.current;e!==null&&n.current&&(e.scrollTop=e.scrollHeight)},[e.items,e.running]);function a(e){i(r.includes(e)?r.filter(t=>t!==e):[...r,e])}let o=e.items.filter(t=>t.parent===e.item.id),s=o.length===0;(0,H.useEffect)(()=>{s&&e.agentId!==null&&ye(e.item.id,e.agentId)},[s,e.item.id,e.agentId]);let c=o.at(0),l=c?.kind===`user`?c:null,u=_F({prompt:null,first:!1,items:l===null?o:o.slice(1)},e.running?{partial:``}:null);return(0,U.jsxs)(`div`,{ref:t,className:`min-h-0 flex-1 overflow-y-auto overscroll-y-contain px-4 pt-1 pb-8`,onScroll:e=>{let t=e.currentTarget;n.current=t.scrollHeight-t.scrollTop-t.clientHeight<40},children:[l!==null&&(0,U.jsx)(eF,{title:`Prompt`,pending:!1,grouped:!0,open:r.includes(`prompt`),onToggle:()=>a(`prompt`),children:(0,U.jsx)(Rt,{text:l.text,className:`text-muted-foreground text-[13px]`})}),u.map((t,n)=>{let i=u[n-1];return(0,U.jsx)(`div`,{className:z(i===void 0?`pt-2`:t.kind===`working`?void 0:gF(t)&&gF(i)?`pt-2`:`pt-4`,t.kind===`assistant`&&`group/assistant`),children:(0,U.jsx)(YF,{row:t,agents:e.found.agents,tasks:e.found.tasks,running:e.running,compacting:!1,fork:!1,expanded:r.includes(t.key),onToggle:a,onOpenTask:e.onSelect,rewind:!1,cwd:e.cwd})},t.key)})]})}var HH=(0,H.lazy)(async()=>({default:(await bi(async()=>{let{EditorDialog:e}=await import(`./editor-dialog-D5uma-Ri.js`);return{EditorDialog:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]))).EditorDialog})),UH=`text-foreground hover:bg-accent data-[pressed=true]:bg-accent relative grid h-7 min-w-7 cursor-pointer place-items-center rounded-lg border border-transparent [&_svg]:size-4 [&_svg]:opacity-80`;function WH(e){let[t,n]=(0,H.useState)(!1),r=KH(e,()=>n(!0));return(0,U.jsxs)(U.Fragment,{children:[r.map(e=>(0,U.jsxs)(`button`,{className:UH,"data-pressed":e.pressed,"aria-label":e.label,title:e.title,onClick:e.onSelect,children:[(0,U.jsx)(V,{icon:e.icon}),e.badge]},e.id)),t&&(0,U.jsx)(H.Suspense,{children:(0,U.jsx)(HH,{machine:e.selection.machine,projectId:e.selection.projectId,onClose:()=>n(!1)})})]})}function GH(e){let[t,n]=(0,H.useState)(!1),r=KH(e,()=>n(!0));return(0,U.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(0,U.jsxs)(ve,{open:e.open,onOpenChange:e.onOpenChange,children:[(0,U.jsx)(P,{asChild:!0,children:(0,U.jsxs)(`button`,{className:z(UH,`data-[state=open]:bg-accent`),"aria-label":`More`,title:`More`,children:[(0,U.jsx)(V,{icon:Jo}),r.some(e=>e.attention)&&(0,U.jsx)(`span`,{className:`bg-muted-foreground ring-background absolute top-0.5 right-0.5 size-1.5 rounded-full ring-2`})]})}),(0,U.jsxs)(N,{className:`w-56`,align:`end`,children:[r.map(e=>(0,U.jsxs)(se,{onSelect:e.onSelect,children:[(0,U.jsx)(V,{icon:e.icon}),(0,U.jsx)(`span`,{className:`flex-1`,children:e.label}),e.detail]},e.id)),e.children]})]}),t&&(0,U.jsx)(H.Suspense,{children:(0,U.jsx)(HH,{machine:e.selection.machine,projectId:e.selection.projectId,onClose:()=>n(!1)})})]})}function KH(e,t){let n=(0,H.useSyncExternalStore)(RN,()=>zN().alerts.length>0),r=(0,H.useSyncExternalStore)(RN,()=>zN().layout.tabs.filter(t=>t.projectId===e.selection.projectId).length),i=L(e=>{if(e.selection?.sessionId===null)return 0;let t=JP([...e.earlier,...e.items],un(e));return[...t.agents,...t.tasks].filter(e=>e.status===`Running`).length});return[{id:`diff`,label:`Diff`,title:`Diff`,icon:Do,pressed:e.panel===`diff`,attention:e.changed,badge:e.changed&&(0,U.jsx)(`span`,{className:`bg-muted-foreground ring-background absolute top-0.5 right-0.5 size-1.5 rounded-full ring-2`}),detail:e.changed&&(0,U.jsx)(`span`,{className:`bg-muted-foreground size-1.5 rounded-full`}),onSelect:()=>e.onPanel(e.panel===`diff`?null:`diff`)},{id:`terminal`,label:`Terminal`,title:`Terminal (${Yn}+\`)`,icon:ms,pressed:e.terminal,attention:n,badge:r>0&&(0,U.jsx)(`span`,{className:z(`absolute top-0 right-0 grid h-3 min-w-3 place-items-center rounded-full px-0.5 text-[8px] leading-none font-medium tabular-nums`,n?`bg-primary text-primary-foreground`:`text-foreground bg-[color-mix(in_srgb,var(--foreground)_22%,var(--background))]`),children:r}),detail:r>0&&(0,U.jsx)(`span`,{className:z(`text-xs tabular-nums`,n?`text-primary`:`text-muted-foreground`),children:r}),onSelect:()=>e.onTerminal(!e.terminal)},{id:`tasks`,label:`Tasks`,title:`Tasks`,icon:hs,pressed:e.panel===`tasks`,attention:i>0,badge:i>0&&(0,U.jsx)(`span`,{className:`text-foreground absolute top-0 right-0 grid h-3 min-w-3 place-items-center rounded-full bg-[color-mix(in_srgb,var(--foreground)_22%,var(--background))] px-0.5 text-[8px] leading-none font-medium tabular-nums`,children:i}),detail:i>0&&(0,U.jsx)(`span`,{className:`text-muted-foreground text-xs tabular-nums`,children:i}),onSelect:()=>e.onPanel(e.panel===`tasks`?null:`tasks`)},{id:`browser`,label:`Browser`,title:`Browser`,icon:no,pressed:e.panel===`browser`,attention:!1,badge:null,detail:null,onSelect:()=>e.onPanel(e.panel===`browser`?null:`browser`)},{id:`editor`,label:`Editor`,title:`Editor`,icon:ys,pressed:!1,attention:!1,badge:null,detail:null,onSelect:t}]}function qH(e){return(0,U.jsxs)(U.Fragment,{children:[e.panel===`browser`&&(0,U.jsx)(QF,{machine:e.selection.machine,onClose:()=>e.onPanel(null)}),e.panel===`diff`&&(0,U.jsx)(LH,{machine:e.selection.machine,projectId:e.selection.projectId,running:e.running,onClose:()=>e.onPanel(null)},`${e.selection.machine} ${e.selection.projectId}`),e.panel===`tasks`&&(0,U.jsx)(RH,{machine:e.selection.machine,cwd:e.cwd,sessionId:e.selection.sessionId,selected:e.selectedTask,onSelect:e.onSelectTask,onClose:()=>e.onPanel(null)})]})}function JH(){let e=L(e=>e.selection),t=L(e=>e.machines.length>0),n=r();return n===null?e===null?t?(0,U.jsx)(`div`,{className:`bg-sidebar relative flex min-w-0 flex-1 pt-[env(safe-area-inset-top)] pb-[env(safe-area-inset-bottom)]`,children:(0,U.jsx)(LO,{className:`min-w-0 flex-1 border-r-0`,mobile:!0})}):(0,U.jsx)(`main`,{className:`bg-background flex flex-1 overflow-y-auto pt-[env(safe-area-inset-top)] pb-[env(safe-area-inset-bottom)]`,children:(0,U.jsx)(oD,{})}):(0,U.jsx)(YH,{selection:e}):(0,U.jsx)(UP,{machine:n,mobile:!0,leading:(0,U.jsx)(B,{variant:`ghost`,size:`icon-xs`,className:`h-full w-11 rounded-none`,"aria-label":`Back`,title:`Back`,onClick:()=>ae(`chat`,()=>void _.navigate({to:`/`,search:{},replace:!0})),children:(0,U.jsx)(V,{icon:Za})})})}function YH(e){let t=L(t=>He(t,e.selection.machine)),n=L(t=>t.sessions.find(t=>t.machine===e.selection.machine&&t.id===e.selection.sessionId)),r=L(t=>k(t,e.selection.machine,e.selection.projectId)?.path??``),i=ac(e.selection.machine,e.selection.projectId),a=L(ie),o=Tp(e.selection.machine,t.status===`online`?e.selection.projectId:null,a),s=Ep({machine:e.selection.machine,projectId:e.selection.projectId,repos:o.repos,onRefresh:o.refresh}),c=(0,H.useSyncExternalStore)(RN,()=>zN().open),l=ke({from:`__root__`,select:e=>e.panel??null}),[u,d]=(0,H.useState)(null),f=o.repos.some(e=>e.changed>0),p=l!==null||c,m=(0,H.useCallback)(e=>{p?qe(e):re(e,`overlay`)},[p]),h=(0,H.useCallback)(e=>{d(null),e===null?XH():m({panel:e,bottom:void 0})},[m]),g=(0,H.useCallback)(e=>{h(`tasks`),d(e)},[h]);function _(e){e?m({panel:void 0,bottom:`terminal`}):XH()}return(0,U.jsxs)(`main`,{className:`bg-background flex min-w-0 flex-1 flex-col overflow-hidden pt-[env(safe-area-inset-top)] pb-[env(safe-area-inset-bottom)]`,children:[(0,U.jsxs)(`header`,{className:`flex h-(--workspace-topbar-height) shrink-0 items-center gap-1.5 px-2`,children:[(0,U.jsx)(B,{variant:`ghost`,size:`icon`,"aria-label":`Back`,onClick:()=>ae(`chat`,he),children:(0,U.jsx)(V,{icon:Za,className:`text-foreground size-5`,strokeWidth:2})}),(0,U.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,U.jsx)(`div`,{className:`text-foreground truncate font-medium`,children:n?.title??`New thread`}),t.status===`online`&&(0,U.jsxs)(`div`,{className:`text-muted-foreground truncate text-xs`,children:[t.name,` / `,i]}),t.status!==`online`&&(0,U.jsxs)(`div`,{className:`text-warning-foreground truncate text-xs`,children:[t.status===`connecting`&&`Connecting to ${t.name}…`,t.status===`offline`&&`${t.name} is offline, reconnecting…`,t.status===`unpaired`&&`${t.name} needs pairing`]})]}),(0,U.jsx)(GH,{selection:e.selection,panel:l,terminal:c,changed:f,open:s.menuOpen,onOpenChange:s.setMenuOpen,onPanel:h,onTerminal:_,children:o.repos.length>0&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(A,{}),(0,U.jsx)(Dp,{git:s,collapsed:!0})]})}),(0,U.jsx)(Op,{git:s})]}),(0,U.jsx)(`div`,{className:`relative flex min-h-0 min-w-0 flex-1 flex-col`,children:(0,U.jsxs)(H.Fragment,{children:[(0,U.jsx)(qF,{onOpenTask:g}),(0,U.jsx)(Xf,{})]},`${e.selection.machine} ${e.selection.sessionId??e.selection.projectId}`)}),(0,U.jsx)(xr,{open:p,onOpenChange:()=>h(null),children:(0,U.jsx)(Tr,{children:(0,U.jsxs)(_r,{"aria-describedby":void 0,className:`bg-background data-open:animate-in data-open:slide-in-from-right fixed inset-0 z-40 flex flex-col pt-[env(safe-area-inset-top)] pb-[env(safe-area-inset-bottom)] text-sm duration-200 outline-none [--workspace-topbar-height:44px] motion-reduce:animate-none`,children:[(0,U.jsxs)(Dr,{className:`sr-only`,children:[l===`diff`&&`Diff`,l===`tasks`&&`Tasks`,l===`browser`&&`Browser`,l===null&&`Terminal`]}),(0,U.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[l!==null&&(0,U.jsx)(qH,{panel:l,selection:e.selection,cwd:r,running:a,selectedTask:u,onSelectTask:d,onPanel:h}),l===null&&c&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`border-border/60 flex h-(--workspace-topbar-height) shrink-0 items-center gap-1 border-b px-3`,children:[(0,U.jsx)(B,{size:`icon-sm`,variant:`ghost`,title:`Close`,"aria-label":`Close`,onClick:()=>_(!1),children:(0,U.jsx)(V,{icon:mr,className:`size-3.5`})}),(0,U.jsx)(`span`,{className:`text-foreground min-w-0 truncate text-xs font-medium`,children:`Terminal`})]}),(0,U.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,U.jsx)(FP,{view:e.selection.projectId})})]})]})]})})})]})}function XH(){ae(`overlay`,()=>qe({panel:void 0,bottom:void 0}))}var ZH=window.matchMedia(`(min-width: 768px)`),QH=800;function $H(e){return ZH.addEventListener(`change`,e),()=>ZH.removeEventListener(`change`,e)}function eU(){let e=(0,H.useSyncExternalStore)($H,()=>ZH.matches);return Ys(`mod+k`,()=>Ce(!I().paletteOpen),{enableOnFormTags:!0,preventDefault:!0}),(0,U.jsxs)(`div`,{className:`flex h-dvh text-sm`,children:[e?(0,U.jsx)(nU,{}):(0,U.jsx)(JH,{}),(0,U.jsx)(sD,{}),e?(0,U.jsx)(eD,{}):(0,U.jsx)(aD,{}),(0,U.jsxs)(`div`,{className:z(`fixed z-50 flex flex-col gap-2`,e?`right-4 bottom-4 items-end`:`inset-x-4 top-[calc(env(safe-area-inset-top)+0.5rem)] items-center`),children:[(0,U.jsx)(lp,{}),(0,U.jsx)(na,{})]})]})}function tU(e){qe({panel:e??void 0})}function nU(){let e=L(e=>e.selection),t=L(e=>e.sessions),n=r(),i=L(e=>e.selection===null?``:k(e,e.selection.machine,e.selection.projectId)?.path??``),a=L(e=>{let t=d(e);return t===null?null:He(e,t)}),[o,s]=(0,H.useState)(!0),c=(0,H.useRef)(null),[l,u]=(0,H.useState)(!1),f=ke({from:`__root__`,select:e=>e.panel??null}),p=(0,H.useRef)(`diff`),[m,h]=(0,H.useState)(null),g=(0,H.useCallback)(e=>{h(e),tU(`tasks`)},[]),[_,v]=tc(`panelWidth`,540),[y,b]=(0,H.useState)(280),x=(0,H.useSyncExternalStore)(RN,()=>zN().open),S=L(ie),C=Tp(e?.machine??``,a?.status===`online`?e?.projectId??null:null,S),w=Ep({machine:e?.machine??``,projectId:e?.projectId??``,repos:C.repos,onRefresh:C.refresh}),T=t.find(t=>t.machine===e?.machine&&t.id===e.sessionId),E=ac(e?.machine??``,e?.projectId??``);return Ys([`meta+backquote`,`ctrl+backquote`],e=>{e.stopPropagation(),qN(!zN().open)},{enableOnFormTags:!0,preventDefault:!0,eventListenerOptions:{capture:!0}}),Ys([`mod+j`,`mod+shift+b`],e=>{e.stopPropagation(),tU(O().panel===void 0?p.current:null)},{enableOnFormTags:!0,preventDefault:!0,eventListenerOptions:{capture:!0}}),(0,H.useEffect)(()=>{f!==null&&(p.current=f)},[f]),Ys([`mod+b`,`mod+shift+j`],()=>s(e=>!e),{enableOnFormTags:!0,preventDefault:!0}),(0,H.useEffect)(()=>{if(n!==null)return;let e=c.current;if(e===null)throw Error(`header is not mounted`);let t=new ResizeObserver(e=>u(e[0].contentRect.width<QH));return t.observe(e),()=>t.disconnect()},[n]),n===null?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(LO,{className:z(`relative`,!o&&`hidden`),mobile:!1,onHide:()=>s(!1)}),!o&&(0,U.jsx)(`div`,{className:`fixed top-0 left-3 z-50 flex h-(--workspace-topbar-height) items-center`,children:(0,U.jsx)(B,{variant:`ghost`,size:`icon-sm`,"aria-label":`Show sidebar`,title:`Show sidebar (${Yn}+B)`,onClick:()=>s(!0),children:(0,U.jsx)(V,{icon:at})})}),(0,U.jsxs)(`main`,{className:`bg-background relative flex min-w-0 flex-1 flex-col overflow-hidden`,children:[(0,U.jsxs)(`header`,{ref:c,className:z(`bg-background flex h-(--workspace-topbar-height) shrink-0 items-center gap-3 pr-3 pl-[3.25rem]`,o&&`pl-5`),children:[e!==null&&a!==null&&(0,U.jsx)(`nav`,{className:`min-w-0 flex-1`,children:(0,U.jsxs)(`ol`,{className:`flex min-w-0 items-center gap-3 text-sm`,children:[(0,U.jsxs)(`li`,{className:`text-icon-muted flex shrink-0 items-center gap-1.5`,children:[(0,U.jsx)(Md,{icon:a.icon,className:`size-3.5 shrink-0`}),(0,U.jsx)(`span`,{className:`max-w-40 truncate`,children:a.name})]}),(0,U.jsx)(`li`,{"aria-hidden":!0,className:`text-icon-muted shrink-0`,children:`/`}),(0,U.jsxs)(`li`,{className:`text-muted-foreground flex min-w-0 shrink items-center gap-1.5 font-medium`,title:`${a.name}:${i}`,children:[(0,U.jsx)(dc,{machine:e.machine,projectId:e.projectId,className:`size-3.5`}),(0,U.jsx)(`span`,{className:`max-w-40 truncate`,children:E})]}),(0,U.jsx)(`li`,{"aria-hidden":!0,className:`text-icon-muted shrink-0`,children:`/`}),(0,U.jsx)(`li`,{className:z(`text-foreground min-w-10 truncate font-medium`,o&&`flex-1`),children:T?.title??`New thread`}),!o&&(0,U.jsx)(`li`,{className:`shrink-0`,children:(0,U.jsx)(MO,{hideDone:!0})})]})}),e===null&&!o&&(0,U.jsx)(MO,{hideDone:!0}),e===null&&(0,U.jsx)(`span`,{className:`flex-1`}),a!==null&&a.status!==`online`&&(0,U.jsxs)(`span`,{className:`text-warning-foreground shrink-0 text-xs`,children:[a.status===`connecting`&&`Connecting to ${a.name}…`,a.status===`offline`&&`${a.name} is offline, reconnecting…`,a.status===`unpaired`&&`${a.name} needs pairing`]}),e!==null&&(0,U.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-1`,children:[!l&&C.repos.length>0&&(0,U.jsx)(kp,{machine:e.machine,projectId:e.projectId,repos:C.repos,onRefresh:C.refresh}),l&&C.repos.length>0&&(0,U.jsxs)(ve,{open:w.menuOpen,onOpenChange:w.setMenuOpen,children:[(0,U.jsx)(P,{asChild:!0,children:(0,U.jsx)(B,{variant:`ghost`,size:`icon-sm`,"aria-label":`Git actions`,title:`Git actions`,children:(0,U.jsx)(V,{icon:Jo})})}),(0,U.jsx)(N,{className:`w-56`,align:`end`,children:(0,U.jsx)(Dp,{git:w,collapsed:!0})})]}),(0,U.jsx)(`span`,{className:`bg-foreground/15 mr-1 ml-2.5 h-4 w-px`}),(0,U.jsx)(WH,{selection:e,panel:f,terminal:x,changed:C.repos.some(e=>e.changed>0),onPanel:e=>{h(null),tU(e)},onTerminal:qN})]})]}),(0,U.jsxs)(`div`,{className:`flex min-h-0 flex-1`,children:[(0,U.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col overflow-x-hidden`,children:[(0,U.jsxs)(`div`,{className:`relative flex min-h-0 min-w-0 flex-1 flex-col`,children:[a===null&&(0,U.jsx)(oD,{}),e===null&&a!==null&&(0,U.jsx)(`div`,{className:`grid flex-1 place-items-center p-6 text-center`,children:(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h1`,{className:`text-foreground text-3xl font-normal tracking-tight`,children:`Pick a thread, or start one`}),(0,U.jsx)(`p`,{className:`text-muted-foreground mt-2 text-sm`,children:`Open a project from the sidebar to talk to Claude.`})]})}),e!==null&&(0,U.jsxs)(H.Fragment,{children:[(0,U.jsx)(qF,{onOpenTask:g}),(0,U.jsx)(Xf,{})]},`${e.machine} ${e.sessionId??e.projectId}`)]}),e!==null&&x&&(0,U.jsxs)(`aside`,{className:`border-border/80 bg-background relative shrink-0 overflow-hidden border-t`,style:{height:y},children:[(0,U.jsx)(`div`,{role:`separator`,"aria-orientation":`horizontal`,className:`group absolute inset-x-0 top-0 z-30 h-1.5 cursor-row-resize touch-none select-none`,onPointerDown:e=>Jn(e,e=>{let t=Math.max(120,Math.floor(window.innerHeight*.8));b(Math.min(t,Math.max(120,window.innerHeight-e.clientY)))}),children:(0,U.jsx)(`span`,{className:`group-hover:bg-border group-active:bg-primary/60 pointer-events-none absolute inset-x-0 top-0 h-px transition-colors`})}),(0,U.jsx)(FP,{view:e.projectId})]})]}),e!==null&&f!==null&&(0,U.jsxs)(`div`,{className:`relative flex shrink-0`,style:{width:_},children:[(0,U.jsx)(`div`,{role:`separator`,"aria-orientation":`vertical`,className:`group absolute inset-y-0 -left-1 z-20 w-2 cursor-col-resize select-none`,onPointerDown:e=>Jn(e,e=>{let t=Math.max(360,Math.floor(window.innerWidth*.7)),n=Math.min(t,Math.max(360,window.innerWidth-e.clientX));v(n)}),children:(0,U.jsx)(`span`,{className:`group-hover:bg-border group-active:bg-primary/60 pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 transition-colors`})}),(0,U.jsx)(`div`,{className:`bg-background flex min-w-0 flex-1 flex-col overflow-hidden rounded-tl-lg border-t border-l`,children:(0,U.jsx)(qH,{panel:f,selection:e,cwd:i,running:S,selectedTask:m,onSelectTask:h,onPanel:tU})})]})]})]}),(0,U.jsx)(Op,{git:w})]}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(LO,{className:z(`relative`,!o&&`hidden`),mobile:!1,onHide:()=>s(!1)}),(0,U.jsx)(UP,{machine:n,mobile:!1,leading:!o&&(0,U.jsx)(B,{variant:`ghost`,size:`icon-xs`,"aria-label":`Show sidebar`,title:`Show sidebar (${Yn}+B)`,onClick:()=>s(!0),children:(0,U.jsx)(V,{icon:at})})})]})}var rU=class extends H.Component{state={error:null};static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error(e,t.componentStack)}render(){let e=this.state.error;return e===null?this.props.children:(0,U.jsxs)(`div`,{className:`flex h-dvh flex-col items-center justify-center gap-3 p-4 text-center`,children:[(0,U.jsx)(`p`,{className:`font-medium`,children:`Something went wrong`}),(0,U.jsx)(`p`,{className:`text-muted-foreground max-w-xl text-sm whitespace-pre-wrap`,children:e.message}),(0,U.jsx)(B,{onClick:()=>location.reload(),children:`Reload`})]})}},iU=document.getElementById(`root`);if(!iU)throw Error(`root element missing`);if(`serviceWorker`in navigator){let e=navigator.serviceWorker.controller!==null,t=document.querySelector(`link[rel="manifest"]`)!==null;navigator.serviceWorker.addEventListener(`controllerchange`,()=>{e&&location.reload()}),navigator.serviceWorker.addEventListener(`message`,e=>{e.data.type===`openSession`&&ce({machine:e.data.machine,projectId:e.data.project,sessionId:e.data.sessionId})}),navigator.serviceWorker.register(t?`/sw.js?pwa`:`/sw.js`,{type:`classic`}).catch(e=>console.error(`could not register the service worker`,e))}addEventListener(`keydown`,e=>{(e.metaKey||e.ctrlKey)&&e.key===`w`&&e.preventDefault()},{capture:!0}),await Wt(),ct(),et({open:e=>{Sa(e).catch(e=>console.error(`could not refresh the push subscription`,e))}}),Ma(),NN(),_.routeTree.update({component:eU}),(0,Zi.createRoot)(iU).render((0,U.jsx)(H.StrictMode,{children:(0,U.jsx)(rU,{children:(0,U.jsx)(Wi,{router:_})})}));export{gI as $,WL as A,mL as B,wR as C,hR as D,gR as E,jL as F,QI as G,eL as H,AL as I,KI as J,JI as K,kL as L,BL as M,zL as N,KL as O,RL as P,hI as Q,EL as R,NR as S,_R as T,$I as U,tL as V,ZI as W,WI as X,GI as Y,II as Z,Dz as _,SV as a,aI as at,BR as b,Lz as c,Fz as d,fI as et,Pz as f,kz as g,Az as h,CV as i,sI as it,UL as j,GL as k,Rz as l,jz as m,qV as n,lI as nt,oV as o,iI as ot,Mz as p,qI as q,NV as r,cI as rt,oB as s,WV as t,dI as tt,Iz as u,rz as v,vR as w,zR as x,tz as y,TL as z};
|